- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 31
- Posts with Upvotes
- 29
- Upvoting Members
- 26
- Downvotes Received
- 15
- Posts with Downvotes
- 13
- Downvoting Members
- 10
Re: The two reasons with the greatest probability (IMO) are as follows: 1) The hardware specifications of your computer are too low. Reasons include but are not limited to: CPU clock speed, RAM amount and timing, motherboard front side bus speed, hard disk read and write rates, and graphics processing ability. … | |
Re: You'll want to set a keyboard hook using the Win32 API, to detect when the key combination is pressed. Here is the [MSDN documentation for SetWindowsHookEx](http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990%28v=vs.85%29.aspx) Here is [some random tutorial I found](http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=11920&lngWId=3) about setting a hook, with code examples given. | |
Re: Let's say you want Player 1's average of Stat #1 for both games, This means, array[0][0][0] + array[0][1][0] / 2 (games) = average | |
Re: Firstly you should pick a problem that requires automation. The subject is broad, to say the least. Is the project physical, or purely virtual? In what way is change required? Can you map the change logically? Can you define every factor which may have to be adapted? Current intelligence models … | |
Re: One and two have fixed width, which consume the entirety, so it returns. | |
Re: I don't see a destructor at all. You can define one this way: `~CObject( ) { delete [] mName; }` | |
Re: addArticle( ... ) will be interpreted in the context of the pointer. You'll want to cast it first, // C++11 auto Magazine((CMagazine*)A3); // C++3 CMagazine * Magazine((CMagazine*)A3); Before you call the function itself Magazine->doSometing( ); // To be quite honest it doesn't really matter what the buffer pointer is L1.addArticle((void*)Thing); … | |
Re: To answer your broad question broadly, open the text file, separate it into lines, delimit each line by comma It's a comma and line break separated file. | |
Re: Unlike iamthwee, I also enjoy "plain ole sockets", it can be useful to understand in a lot of cases. I looked through your source and saw no "overt" errors at a glance. I did wonder, are you sure that static cookie does what you think it does? If you accept … | |
Re: Call me crazy, but I'm pretty sure you misinterpreted "Do not use any string or array **functions**" How can you store a letter (sentence, letter as in formal message) without at least allocating memory for it in some arbitrary place or another? This tells me that it must be OK … | |
Re: Something like this? public void backgroundthread() { while (true) { // Forever, do... if(runsomeCode) { // Check for this necessary condition once per 10ms this.Invoke((MethodInvoker)delegate { runsomeCode = false; // Disable this one-off condition MessageBox.Show("Some code will run here!"); } } // This sleep belongs to the parent loop. Thread.Sleep(10); … | |
Re: Personally, I like the [sieve of eratosthenes](http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes) for most problems requiring evaluation of primes under 100,000,000,000 or so. It's especially beautiful in its ease of implementation in any language. | |
Re: typedef char * (*stringReturn) (); // This is a function taking no arguments and returning string stringReturn * (*funcArray[256])(); // This is an array of functions returning the above type DWORD (*funcArray[256])(); // Alternatively, you could cast the function address to unsigned int // return (DWORD)&stringReturnObject; | |
Re: Some context please? I would open a socket on port 80 to the host with winsock. You could use something like selenium if you're OK with opening the browser. What are the limitations of your objective? | |
Re: Vi is a text editor, much like notepad. It has nothing to do with your question, probably... Check out the [locate](http://linux.die.net/man/1/locate) command. | |
Re: Like pritaeas said, `if( ! $total_deals ) die("Query failed.")` or `if( $result = mysql_query("") ) { /* ... */ }` | |
Re: For some reason, the compiler seems to think that you have a open parenthesis. To be honest, it could be from the line before. I won't pretend to know about DX9, I don't make games. Perhaps one of the all caps defines you are using is in fact a function. … | |
Re: In order to solve this problem, perhaps some [light reading about general Python syntax](http://docs.python.org/2/tutorial/classes.html) may guide you. | |
Re: Redefine SWAP this way. `#define SWAP(a,b) float * t=a;a=b;b=t;` I'm not sure how you can pass implicit type to the define pre-processor. If anyone has any idea, I'd love to know. By the way, you could also perform a XOR swap. #define SWAP(a,b) a^=b;b^=a;a^=b; #define SWAPPTRCONT(a,b) *a^=*b;*b^=*a;*a^=*b; | |
Re: [The GNU Awk User's Guide](http://www.gnu.org/software/gawk/manual/gawk.html) This is a good place to start. | |
Re: $files = array( ); $dir = opendir( $name ); while( false !== ($file = readdir($dir)) ) { if( $file != '.' && $file != '..' ) { $pop = explode('.',$file); $ext = ""; if(count($pop)>1) $ext = array_pop($pop); $files[implode('.',$pop)][] = $ext; } } closedir($dir); print_r($files); | |
Re: Why is everything based on deque size instead of content? | |
Re: int threeDim[x][y][z]; Algorithm is a synonym of calculus, it means "method" | |
Re: You can also traverse the array linearly, int height(13), width(7); int matrix[height][width]; for(int i=0;i<height*width;++i) { if( !(i%width) ) printf( "\r\n" ); printf( "%d ", matrix[ i / width ][ i % width ] ); } | |
Re: I'll help you, start by defining the entire state of the game. We'll call this `int board[9] = { 0 };` A 3x3 space in two dimensions. 0 - Unknown state 1 - Player 1 claims 2 - Player 2 claims Next, you want to allow input. The simplest inputs … | |
Re: Hey, the error is vector.empty() doesn't take 1 argument | |
Re: First you want to start a session. session_start(); | |
Re: switch(...) { } // The switch ends while( expr ) ; // Do nothing // Forever... | |
Re: Well, update doesn't return anything. So of course you can't translate NOTHING into ROW. Also, you don't need to wrap your query in parenthesis [ UPDATE table SET value=('value') ] Why not [ SET value='value' ] ??? Plus, it's better if you refer to post with quotes rather than symbol. … |