I'm trying to use the fastcgi protocol to handle dynamic http requests. The basic idea is that the web server handles all static requests. Then, dynamic requests -- identified by urls such as...
Type: Posts; User: coder8137
I'm trying to use the fastcgi protocol to handle dynamic http requests. The basic idea is that the web server handles all static requests. Then, dynamic requests -- identified by urls such as...
I am trying to decide how to design the following server architecture. The
server will accept() connection attempts from a web server over either a UNIX
socket or TCP/IP. Once a connection has been...
From Game Maker, you can get the window handle (for the main window) using window_handle(). You'll have to pass this to the DLL and then use the win API to set the parent of your new window. However,...
Well, you could have 2 separate programs; the game and one to send the score. Don't release the source to the latter. Each time you send a score, send a long a hash of the game binary, the game...
I've done this before (University Project) using cdecl.
In the cpp_header:
/* auto generated junk by Visual Studio. Preferably, use your own include guard (instead
of #pragma once...
Here's one way that stops data duplication.
In my_enum.H
MY_MACRO_NAME(SSSE,
"Almost South, with a bit of East.", /* just a description */
"Any other detail...
I forgot to mention that you need to replace all of these
<br>
with these:
<br />
Good to see that you put in the DOCTYPE, but, considering that I brought it up, I should probably warn you about the choice you made. XHTML is the latest and greatest, but not actually supported by...
It may depend on the browser, but I'm not sure. In Firefox 2.0.0.4 (Linux) it works fine (you can change the encoding under the View menu and test it). I can't comment on the others at the moment....
You should be able to just leave the BOM, if you like, and tell the browser that you're sending UTF-8. (This is because UTF-8 is the same as 7 bit ASCII (for the first 128 chars).) As you're using...
You may also want to read up on scanf(), its return value and "flushing the input buffer". There's zillions of articles in the FAQ about it and it's discussed about 5 times a week on this board.
I just checked it out; very nice. I think the main controls (arrow keys and zoom functions) are pretty good and easy to use. The others might be a little harder to remember. I noticed though that...
Just to clarify, whilst 5*2^-3 can be accurately represented, it is actually stored as 1.25 * 2^(-1), since the mantissa is a binary fraction. 101 doesn't represent 5, it's 1.25 or 1 + 1/4.
Yes, you're right. Bad choice of values on my behalf.
Anyways, despite all of this now being rather unrelated to the original post, I'll post some code, which I wrote some time ago, to look at the...
It's often a percentage of (one of) the numbers you're trying to compare. Thus it would vary automatically depending on whether the number is 0.0000324 or 3x10^56.
That doesn't prove anything,...
Yes, often type double can accurately represent even more integer values than a plain int, but it's not required. You can check float.h for info like DBL_MANT_DIG and others.
That's a different...
Zero... good code if you wish to be fired:
typedef enum {
t_int,
t_node_ptr,
t_int_ptr
} assign_types;
struct node {
That's not quite what I meant. The problem with the way you're implementing it is that you can't change xmin/xmax/ymax/ymin freely. Most changes will result in the graph being completly wrong, rather...
As stated previously, you should generally only be trying to do this if the replacement string is the same length as the search string. If that's the case:
1) open the file in binary mode
2) use...
Most probably not. It might work with simple equations, but not with the ones for the Fern (as far as I can see). For example, try it on the 2nd equation for the fern, given on the website. I'm...
The easiest way to understand everything, is if you consider the program as 2 seperate steps. At the moment, you have been mixing them together, making things a lot harder.
Step 1: Calculating the...
hehe, didn't feel like switching users then.
Anyways, the transformations should probably be:
ifs_elem sierp[] = {{0.5, 0.0, 0.0, 0.5, 0.0*WIDTH / 2, 0.0*HEIGHT},
{0.5,...
Actually, I'll take that back about your math being correct.
For example, you start with:
x=WIDTH/2 = 640/2 = 320
Now, taking the transformation 3, the next few x points you plot will be:
...
(0,0) will mean that all points will fall between 0 <= x < 2 and 0 <= y < 1. Therefore your program would have probably output 2 pixels, since you don't use floats. Hence the need to scale it up.
...
Thanks Salem, I'll check it out.