Posts
 
Reputation
Joined
Last Seen
Ranked #614
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
8
Posts with Upvotes
4
Upvoting Members
8
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
4 Endorsements
Ranked #396
Ranked #2K
~15.0K People Reached
Favorite Tags
Member Avatar for Dervish1

I'm trying to learn how to do some simple things with MFC - I'm not used to the toolkit. I want to load a png image from disk and display it at a chosen location in the program's window, but am getting a debug assertion error: atlimage.h Line: 1624 Expression: …

Member Avatar for rproffitt
0
209
Member Avatar for texxs

I still consider myself a relative novice with javascript and html. However, once I finally understood the basics, I found the Dojo toolkit to be the most useful: you only load those pieces you need, its widget system is good for creating a consistent UI layer, and the way its …

Member Avatar for Dervish1
0
141
Member Avatar for CodeWarrior14

Also don't forget that there's no guarantee the data written by fread doesn't have a null in it. So that's another reason that strlen is a bad way to figure out the buffer's length. (And to follow the above advice to use fread's return value).

Member Avatar for Dervish1
0
3K
Member Avatar for The Old Man

I've used it more recently than that, but primarily when I was working on code generators for compilers - so everything else could be written in higher-level languages. In other words, there are certain environments where it's useful, but they tend to be pretty specialized, as Rubberman said.

Member Avatar for sDJh
0
186
Member Avatar for zzmrzz

Rather than arguing, try a web search: 'php login example' gives me several million(!) results.

Member Avatar for imti321
-9
374
Member Avatar for Dervish1

I have a known good web page that works without (known) errors when it loads. However, when I try to load it using a very laggy connection (more than 6-10 seconds to load the page - when all works well, it can load in under 500 ms), my hosting provider …

Member Avatar for LesF
0
175
Member Avatar for John_74

First, line 61 is a typo: '=' is not a comparison, but rather an assignment. But whether or not it's correct, are you sure your calling function is interpreting the false return correctly?

Member Avatar for Dervish1
0
238
Member Avatar for raopatwari

Try looking up 'javascript date convert' - the date object does all the work for you.

Member Avatar for Dervish1
0
74
Member Avatar for Kent55

Since you're doing all the rendering work in your canvas, why not simply draw the squares you want on the canvas and change the rendering speed when the user moves over them? As someone else suggested, search for 'collision detection' and write your own code to implement it. Trying to …

Member Avatar for Dervish1
0
296
Member Avatar for Kent55

While that game example doesn't really make good use of jquery (it would be almost identical if written without using the jquery library -- drag and drop is built into HTML5 and doesn't require much extra work beyond what was already done there), making a game typically involves lots of …

Member Avatar for Dervish1
0
234
Member Avatar for davy_yg
Re: PHP

Remember that everything on a web site has two parts: the part that comes to your browser (client side) and the part that stays behind on the server (server side). Client side is primarily javascript. Server-side, any general purpose programming language can work, so long as it does what you …

Member Avatar for diafol
0
118
Member Avatar for Mohamed_26

And if you wish to simply print text with a newline in it, it's \n, not /n.

Member Avatar for diafol
0
274
Member Avatar for chrisschristou

I would think it's a matter of putting some code into the mouseover to modify the contents of the div. This forces a redraw, of course, which might be a bit ugly if you have a large grid that has to be redone. Alternately, you might try assigning each item …

Member Avatar for iamthwee
0
469
Member Avatar for Dervish1

I've got a web page that allows the user to create a canvas that can be as much as 50,000 pixels on a side (they're maps). I draw everything on a canvas, scaled to the user's viewport. Unfortunately, you can't print a canvas; you have to convert it to an …

Member Avatar for LastMitch
0
168
Member Avatar for Mr.M

You can also use some combination of server-side technologies with your code. For example, Javascript's `xmlhttprequest` (or however that's spelled) and something on the server-side to take its data and store it in your file.

Member Avatar for Dervish1
0
227
Member Avatar for scarletfire

This ends up being several different items, some of which I believe require javascript. HTML supports a text box, and you can put preloaded text into it. Using CSS you can make it a fixed height and scrolling. I don't know how, but I suspect CSS can let you auto …

Member Avatar for designershiv
0
173
Member Avatar for Dervish1

I'm working on my first web app, and have a simple version of the application working. It allows the user to create and edit a fantasy map from a set of terrain tile images - but I can't figure out how to make it print. A print preview (and an …

Member Avatar for Dervish1
0
2K
Member Avatar for cali_kid

I'm assuming you need to find the maximum and minimum grade of the whole set. Since your max and min functions only compare two grades (and you never call them -- you'll get an error if you try to compile what you have above), they need to be called for …

Member Avatar for Tumlee
0
196
Member Avatar for N1GHTS

The pointer is invalid after the return. Exactly how it's implemented depends on the compiler. If you want to access it, you'll need to give it a scope that's permanent -- the most common way to do this is to make it a static or global variable. In any case, …

Member Avatar for N1GHTS
0
149
Member Avatar for GregMalick

I would suggest that your DLL return an appropriate pointer to these structures? I'm not familiar with the DLL environment, but it should be possible to mark said pointer as read-only, at the least.

Member Avatar for GregMalick
0
450
Member Avatar for Petrica7

The only faster method I know of would be low-level operating system calls to allocate your disk sectors and update the directory without actually writing data to the allocated sectors. I haven't seen any Delphi or Pascal libraries for this kind of function, but since I'm sure it's possible to …

Member Avatar for Petrica7
0
400
Member Avatar for moroccanplaya

As I'm reading this, what you have is an archive file that you want to copy one or more source files into. So what you want to do is copy all of the first file into your archive, then to copy all of the second file, and then the third, …

Member Avatar for Dervish1
0
78
Member Avatar for L3gacy

I am far from an expert on Delphi, although I've been maintaining some inherited code that has been written in the language. I understand there are some differences, but you'll find it's almost identical to Pascal -- and there are a number of free alternatives to Pascal. Since Borland has …

Member Avatar for Dervish1
0
256
Member Avatar for ChEeZeBaLL

The only problem with your year string is that it doesn't have a terminating null. It's not stored in the file as a C string, but rather as a set of four characters. The same goes for your other strings, but you are fortunate enough that they happen to be …

Member Avatar for Dervish1
0
994
Member Avatar for daabomb2002

One thing you *can* do, however, is to put some of the rendering code into a program that gets run before the web page is served. The code to draw the page still has to be available in the clear, but some of your content can be pulled up before …

Member Avatar for Arkinder
1
399
Member Avatar for TrueCoding

scanf is the input function in C. You'll want to ask the user for the size of the array, and then have a loop that reads their numbers. Do you know how to do a loop?

Member Avatar for vinitmittal2008
0
487
Member Avatar for Dervish1

I just got a new HP machine. It's one of those pre-built systems, and it came with Windows 7. My previous machine was an XP machine, and so I set up the new one almost exactly like the old. However, one thing seems to work only in a very strange …

Member Avatar for Dervish1
0
110
Member Avatar for rockerjhr

Your inner() function doesn't multiply the last set of values. On line 33, the loop termination should be j < size. That's the only issue that comes to mind; assuming your inner product algorithm is correct.

Member Avatar for Dervish1
0
241
Member Avatar for suvind

I would add that loop unrolling is a technique that is now best left to your compiler. As are optimizations such as moving the test to the beginning or end of the loop -- today's compilers will almost always produce better, faster, code than you will if you use the …

Member Avatar for Dervish1
0
2K
Member Avatar for fizzle

Assuming you're really wanting to find files that have a line beginning with that string, and not with any other characters in front of your SearcText, you might want to consider using strncmp, instead of strcmp. That will also cure your problem with any trailing text (such as a newline …

Member Avatar for fizzle
0
161