- Strength to Increase Rep
- +10
- Strength to Decrease Rep
- -2
- Upvotes Received
- 217
- Posts with Upvotes
- 187
- Upvoting Members
- 112
- Downvotes Received
- 11
- Posts with Downvotes
- 11
- Downvoting Members
- 9
Re: [QUOTE=LaMouche;1669197]You're writing the entire array writePlanet each time you call save().[/QUOTE] No. OP is writing a same nonsensical pointer multiple times. Here is the essential code: [CODE]void save(planet_t writePlanet[], int totalSize){ for(count = 0; count<PLANET_SIZE; count++){ /**/ fwrite( &writePlanet, sizeof(writePlanet), 1, outFile); printf("\n%s", writePlanet[count].name); /* Test to see if its … | |
Re: There must be a load of open source WAV readers around. In case you don't want to dig into other people's code, [URL="http://www.ringthis.com/dev/wave_format.htm"]here[/URL] is a brief description of a WAV format. I guess that's enough to start with. If you have more specific questions, do ask. | |
Re: [B]> gcc filename.c -lpthread[/B] is not enough. You also need [COLOR="Red"]-lrt[/COLOR] | |
Re: [QUOTE=firstPerson;1612554]Waiting for I/O counts as it constitute to time used by processor for waiting[/QUOTE] Waiting for IO uses no processor time. The processor is busy running other processes. | |
Re: This is no GoExpert, yet we do "have a clue". So, what is your question? | |
Re: Take a close look at line 25. Are you sure you [I]want[/I] a shift to be logical? | |
Re: What does mkNode return? Or, to put it other way around, why mkNode returns nothing? | |
Re: Notice that sleep() delays the whole process (that is all threads are sleeping). It kind of defeats the purpose, don't you think? | |
Re: Short answer: [ICODE]system("cmd /c dir")[/ICODE] Long answer: [ICODE]system()[/ICODE] expects an executable. [ICODE]dir[/ICODE] is not, it is a builtin. | |
Re: Error code 2 is ERROR_FILE_NOT_FOUND. If the path you entered contains spaces, the statement [QUOTE][CODE] cin >> way[50];[/CODE][/QUOTE] will only read the first "word" of the path. Use getline(). | |
Re: I don't see anything wrong with the line 9. Can you post an error message? I do see however an error at line 10 - missing parameter for the second [icode]%d[/icode] | |
Re: I don't think a linked list is a right approach. You need a dependency graph, along the lines of [CODE]struct gate { bool result; bool resolved; gate * dep1; gate * dep2; };[/CODE] To calculate the output, you just simply traverse the graph starting from the output gate (remember, pull … | |
Re: You are on Solaris, right? Add `-lsocket -lnsl` to the command line. That will pick up the necessary libraries. | |
| Re: You didn't initialize [ICODE]buf.priority[/ICODE] (mtype in the msgsnd terms). msgsnd requires it to be positive, thus EINVAL. Adding [CODE] buf.priority = 2; [/CODE]at around line 43 heals everything. PS: Why 2? Because of 2 at line 76... |
Re: Python QA automation these days is centered around [nosetest](http://nose.readthedocs.org). Their site is a good starting point. | |
Re: The problem with signal is that there's not much you can do in a handler. The list of signal-safe functions is quite limited (man 7 signal), and printf is not one of them. I don't know what exactly your sql querying involves, but the gut feeling says that signal handler … | |
Re: Line 31 is sort of funny. You need to switch on wParam instead. | |
Re: To begin with, the `attr` object is not initialized, so calling `pthread_attr_getschedpolicy` on it is meaningless (thus your output of question marks). > As to scheduling, the shecduler is not deterministict. Not so. | |
Re: Step 1: form a sed script based on the csv file Step 2: apply sed to all the files you need to modify Assuming csv (that is, columns are separated with comma, and comma doesn't appear anywhere neither in old nor in new values), the sed script can be trivially … | |
Re: In this context the process usually means the manufacturing process, as at TSMC. Next generation of the process is switching, for example, from 40 to 28 nanometers. | |
Re: In the ChanNameVAlign case you want to split at the transition from lowercase to uppercase: `s/\([a-z]\)\([A-Z]\)/\1 \2/g` In the OSDSettings, I don't see a non-contradictory criteria. | |
Re: The way you wrote it, checkurl() is not a method of Ui_MainWindow class, but a standalone function. Give it a proper indentation. | |
Re: PIL does not support alpha in BMP files. You need to strip it yourself. Something like (warning: untested): [CODE]img = Image.open("file.png") r, g, b, a = img.split() img = Image.merge("RGB", (r, g, b)) img.save("file.bmp")[/CODE] | |
Re: Please explain what "not working" means in your situation. Through the crystal ball I can see that you need to pace out the sampling. A single pin IO usually implies a time-based protocol. | |
Re: This is the linker command your gcc generated (I just broke it up into few lines for clarity: > c:/mingw/bin/../libexec/gcc/mingw32/4.6.2/collect2.exe -Bdynamic -u ___register_frame_info -u ___deregister_frame_info -o Pascal.exe c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../crt2.o c:/mingw/bin/../lib/gcc/mingw32/4.6.2/crtbegin.o -Lc:/mingw/bin/../lib/gcc/mingw32/4.6.2 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../.. -L/mingw/lib -lgmpxx -lgmp C:\DOCUME~1\DMS40\LOCALS~1\Temp\ccKxmt7C.o -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s … | |
Re: First of all, you cannot manipulate names. A name is a property of a computer, and it should stay intact. What you need is to allocate a port over which the game communications would occur. This port number is to be known for all participating computers in advance. In the … | |
Re: Objection! This solution presumes architectural details not mentioned in the problem statement (32-bit values). Here's another log-time solution, which scales for any width: for (shift = 1; shift < sizeof(challenge); shift <<= 1) challenge |= challenge >> shift; answer = challenge & ~(challenge >> 1)); Of course in reality, such … | |
Re: > str = ("cat %s >> combinedObjects.o", argv[i]); What in your opinion this line is doing? | |
Re: It means that Horse.cpp is not present (at least, in the directory where you run make). What does the ls output look like? | |
Re: [QUOTE] It is only copying the file buffer up to the null char into the http request. [CODE] sprintf(Post_Request, "%s%s\r\n", Post_Request, ReadBuffer);[/CODE][/QUOTE] Sure. What else would you expect from "%s"? |