- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 8
- Posts with Upvotes
- 4
- Upvoting Members
- 8
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
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: … | |
Re: 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 … | |
Re: 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). | |
Re: 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. | |
Re: Rather than arguing, try a web search: 'php login example' gives me several million(!) results. | |
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 … | |
Re: 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? | |
Re: Try looking up 'javascript date convert' - the date object does all the work for you. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: And if you wish to simply print text with a newline in it, it's \n, not /n. | |
Re: 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 … | |
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 … | |
Re: 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. | |
Re: 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 … | |
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 … | |
Re: 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 … | |
Re: 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, … | |
Re: 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. | |
Re: 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 … | |
Re: 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, … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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? | |
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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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 … |