Type: Posts; User: IllegalCharacter
Search took 0.02 seconds.
June 26th, 2008, 01:57 PM
Oops, forgot a follow-up.
Alternatively, if the scripts you want to run are Perl, you can use require:
.. random code ..
if ( .. some condition .. )
June 26th, 2008, 01:54 PM
You can use the backticks (`) to execute a system command:
$result = `random system command`;
This will execute "random system command" and then put the output of the command into $result.
June 26th, 2008, 01:48 PM
If you're using onchange, Firefox doesn't trigger the event until the focus leaves the field. You should use onkeyup instead if you want the event to fire whenever the user types something.
June 26th, 2008, 01:05 PM
Which X library are you using? GTK+, qt, wxWidgets? There isn't a single API.
June 26th, 2008, 01:04 PM
I usually use ImageMagick, but I think DevIL (formerly OpenIL) might be pretty good: http://openil.sourceforge.net/
Not sure how performance oriented it is, but you can use it in conjunction with...
June 26th, 2008, 12:51 PM
In unistd.h there is a function called getcwd() that gets the current working directory.
You can use getenv (in stdlib.h) to get the HOME environment variable, which is by default /home/username/:...
June 26th, 2008, 12:42 PM
Looks to me like your algorithm is to find a single path. You set the nodes to visited, then once you've found a path it returns and doesn't look for any more paths.
What you should be doing...
Since your masks are all zero, it filters out any colours you're trying to put. Hence why you have black ;)
Try putting this in:
Uint32 rmask, gmask, bmask, amask;
rmask = 0x000000ff;
If you're new to Linux, or don't feel like spending hours learning how to use the text editor, don't go with vi/vim or emacs. These editors are very powerful, but take a long time to learn.
Then I'd recommend going with C and some library, be it DirectX, OpenGL, SDL, or whatever. They probably either used one of those, bought a commercial library to use, or rolled their own. I doubt...
April 30th, 2008, 10:29 AM
I think you're going about this the wrong way. There are usually several ways to solve a given problem. By wasting a lot of time trying to figure out how somebody else did it, why not just do it your...
April 28th, 2008, 03:12 PM
Please use code tags, like this:
This is a block of text surrounded by [code] tags.
inFile.seekg(ios_base::beg); after your first inFile.close().
April 27th, 2008, 10:55 PM
You can use OpenGL too. Or, try downloading the source for Gecko and take a peek at that.
April 27th, 2008, 10:52 PM
What 7stud is trying to say is "use code tags", like this:
here is some code, I used a [code] tag for it
April 19th, 2008, 10:51 PM
You can use a recursive parser, like this (pseudo-code):
function parse(input, i)
if input[i] = ']' return null
node = new node
node.value = parse an (x,y)
accept a '['
April 15th, 2008, 04:42 PM
I'd stick to OpenGL for the following reasons:
1) It's cross-platform. This might not affect you now if you don't use a non-Windows platform, but in the future you might want to have a version for...
April 9th, 2008, 01:16 PM
When using a command line like this:
a.out < file1
it loads the file in using cin (only on Linux too, this won't work on Windows), but like this:
a.out file1 file2
March 30th, 2008, 03:15 PM
Use the ps command with the a modifier to get a list of your processes, and pipe it to grep:
ps a | grep perl
From this you should see something like:
6343 pts/0 Ss+ 0:00...
March 30th, 2008, 03:08 PM
No problem. You'll also find the Prototype library that Scriptaculous is based on very useful when you start learning AJAX. I would recommend looking at this too.
March 28th, 2008, 06:01 PM
You can do something like this:
March 28th, 2008, 12:10 PM
March 28th, 2008, 12:03 PM
There's a couple ways of doing this. First, are you using #ifndef/#defines at the start of your .h file? Like this:
//stuff in the file
March 28th, 2008, 11:45 AM
If you're using a FILE pointer, you can do the same technique RandomPerson said, except with the C file functions:
FILE * myFile = fopen("...", "r");
January 4th, 2008, 10:24 PM
You could inherit a class from ios_base or ios, however you'll have to manually override the << operator for each type you want to be able to use.
If you want you could probably just write your...
December 12th, 2007, 10:56 PM
OpenGL is a library for using 3D graphics. It is cross-platform and relatively simple, at least compared to Direct3D. I don't think I really need to go into details on the usefulness of 3D graphics,...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.