Search:

Type: Posts; User: Differ

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    26
    Views
    13,479

    Ah, I just came back and saw the "doubles" part....

    Ah, I just came back and saw the "doubles" part. Many apologies; my solution will only work for integers.
  2. Replies
    45
    Views
    4,320

    Which is exactly what happened. Everybody in the...

    Which is exactly what happened. Everybody in the top 4 filled in at around 3 mil.

    As for the half-size array, I did that to conserve memory, not to make it run faster.

    Everybody else was way...
  3. Replies
    3
    Views
    5,235

    Bloodshed made a compiler?

    Bloodshed made a compiler?
  4. Replies
    11
    Views
    1,499

    That was really stupid of me. I didn't think of...

    That was really stupid of me. I didn't think of that.
  5. Replies
    11
    Views
    1,499

    I mean, a hacker can use SoftIce to actually go...

    I mean, a hacker can use SoftIce to actually go into the program and change the locations it's downloading from, after everything has been processed. A relatively simple task.
  6. Replies
    45
    Views
    4,320

    Rules are one prime per line, 20 seconds to...

    Rules are one prime per line, 20 seconds to generate primes. It's mainly the displaying that's causing problems. The generating is minimal.

    I didn't know how smn = (smn == 4) ?2:4; worked, so I...
  7. Replies
    11
    Views
    1,499

    Put the checksums on a hosting service. Have the...

    Put the checksums on a hosting service. Have the program check that website.

    Anyways, if they can change the text file, they can change anything. So they can simply alter the md5 sum and insert...
  8. Replies
    45
    Views
    4,320

    It's at page 2. I'm not quite sure if we're...

    It's at page 2. I'm not quite sure if we're allowed to write it to file; let me check.
  9. Replies
    45
    Views
    4,320

    It turns out that the code of actually...

    It turns out that the code of actually determining the primes is virtually instant. It's the displaying that's the problem. =(

    Is there a way I could multi-thread this?
  10. Replies
    45
    Views
    4,320

    Yes it is. I didn't notice that when I updated my...

    Yes it is. I didn't notice that when I updated my code. Thanks for the heads-up.
  11. Replies
    11
    Views
    1,499

    Just use a md5 checksum. When it starts...

    Just use a md5 checksum. When it starts downloading things from other sites, have the program connect to your computer and verify the checksum.
  12. Replies
    45
    Views
    4,320

    Same here, only seems to work with GCC on Linux.

    Same here, only seems to work with GCC on Linux.
  13. Replies
    45
    Views
    4,320

    I already did that. What do you think my array is...

    I already did that. What do you think my array is for?
  14. int *ptr; ptr = new int[5000];

    int *ptr;
    ptr = new int[5000];
  15. Replies
    45
    Views
    4,320

    I guess I used a faster version of the Sieve of...

    I guess I used a faster version of the Sieve of Eratosthenes.
  16. Replies
    45
    Views
    4,320

    Same here: the MinGW I have needs the std...

    Same here: the MinGW I have needs the std namespace. I started with the package that came with Dev-C++, then overwrote it with the MinGW from the CVS.

    For some reason, my MinGW doesn't let me...
  17. Replies
    14
    Views
    2,407

    I didn't even know that function existed. It...

    I didn't even know that function existed. It certainly looks cleaner than my way. =)
  18. This info would be interesting to me, too. My...

    This info would be interesting to me, too.

    My high school programming teacher said that when you declare variables, they contain whatever was left in them from the previous program. However, I'm...
  19. Replies
    45
    Views
    4,320

    Wait, so it's standard to use lowercase words? ...

    Wait, so it's standard to use lowercase words?

    I don't know what's going on, but GCC doesn't seem to need the std namespace. I got used to it (coding in Windows) a project member took it out, and...
  20. Replies
    14
    Views
    2,407

    Most probably. How else would you do it, though?...

    Most probably. How else would you do it, though?

    Comments don't stack

    #IF 0's get lost all over your code (plus you can't keep track of what the code you're 0'ring out does, and whether you...
  21. Replies
    14
    Views
    2,407

    In support of #defines

    They aren't good practice in general, but there is one case in which they can be justified (I think):

    Let's say you have a program that has multiple versions. You want to compare them, and don't...
  22. Replies
    45
    Views
    4,320

    It's closed. Sorry. I have no clue what sieves...

    It's closed. Sorry.

    I have no clue what sieves are, so sorry about that too. =\



    //////////
    //Kevin Yin
    //July 12, 2007
    //Lists of primes
  23. Replies
    45
    Views
    4,320

    It's a competition to see who can generate the...

    It's a competition to see who can generate the hugest list of primes in a given time period. It's gotten so bad that people are trying to optimize their programs just for the 20 second interval.

    ...
  24. Replies
    5
    Views
    1,040

    If you want to use system("clear") you must have...

    If you want to use system("clear") you must have #include <stdlib.h>.
  25. Replies
    26
    Views
    13,479

    Ints -> Rounding -> Zero.

    Ints -> Rounding -> Zero.
Results 1 to 25 of 27
Page 1 of 2 1 2