|
Since you've already done some C, I'll recommend The C Programming Language. A lot of it will just be review, but it makes some things you might have a foggy understanding more precise and it's actually incredibly concise and accessible. Depending on where you're going with CS, Mythical Man Month, Extreme Programming Explained, and Pragmatic Programmer are pretty great reads more focused on programming as a profession/art than CS theory. Probably want to wait a year or two for these or at least re-read in a few years though, not because they're hard(they're not), but because more experience puts them into context.
|
# ¿ Feb 24, 2008 16:42 |
|
|
# ¿ May 6, 2024 13:00 |
|
hey wiz posted:If he used an on change event, why not deselect all other check boxes before selecting the current one? Along the same lines.... Why a checkbox and not a radio box? no need to write code to enforce rules that the browser will enforce for free
|
# ¿ Apr 5, 2008 19:44 |
|
Just pull in the profile page and search for the string in what you get back. Haven't done php in a long time but I think you can use fopen. The url to use is like http://forums.somethingawful.com/member.php?action=getinfo&username=poopiehead
|
# ¿ Apr 6, 2008 15:44 |
|
clay posted:I'm loading the netflix dataset to memory. Right now I have it load the entire dataset into memory each pass which is pretty silly and takes about 4 minutes. I want to mmap it all once so I can just load the mmaped file. Are you trying to load multiple times in the same process or running multiple processes. If it's the former, just allocate the array as an int** and pass it around. code:
code:
poopiehead fucked around with this message at 12:21 on May 5, 2008 |
# ¿ May 5, 2008 01:41 |
|
heres a really lovely way that would probably work. But I know for sure there's a much easier way to do it, Just don't know linux well enough. the syntax is close but definitely wrong, but until someone answers for real, that should workcode:
code:
poopiehead fucked around with this message at 02:02 on May 13, 2008 |
# ¿ May 13, 2008 01:55 |
|
I wrote a quick version in C# and I get 12s,1s,0.5s for the three different algorithms(I forget the number of iterations), so your algorithms are correct. Your problem may be that you're just doing a lot of work in each iteration of your loop. If you loop through half as many times but do twice as much work then you don't get a speedup. You should try to avoid recomputing values that won't change like sqrt(inp) and count*6 every time through the loop. Also your third case in the inner loop causes an extra count*6 and an extra comparison. Last, you should minimize IO while doing a timing test because it can mess with the results.
|
# ¿ May 25, 2008 15:53 |
|
How can you make a program that runs in eclipse but doesn't run on the command line? Or do you just mean that you, personally, had to know how to build and run it?
|
# ¿ Jun 1, 2008 02:43 |
|
|
# ¿ May 6, 2024 13:00 |
|
edit: I meant to post this in the Java thread...
|
# ¿ Jun 21, 2008 05:50 |