Search:

Type: Posts; User: jafet

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    13
    Views
    4,373

    Daved is asking you what you mean by "exists". Do...

    Daved is asking you what you mean by "exists". Do you mean, that you can access it? Then just trying to open it will answer your question. Do you mean, whether the file is in the filesystem...
  2. Replies
    6
    Views
    1,297

    Yes, but you will have to use non-C APIs, like...

    Yes, but you will have to use non-C APIs, like POSIX, the Windows API, glib, etc. In any case, if you're dealing with UTF-8, you've probably already decided which platforms you are going to code for.
  3. Replies
    4
    Views
    1,352

    nethack (http://nethack.org) - complexity and...

    nethack - complexity and balance
    curses - plot and mechanics
    0verkill - collision, animation, networking
    Chess - AI

    Text is underrated.
  4. Don't cast malloc. Malloc can fail....

    Don't cast malloc.
    Malloc can fail.
    sizeof(char) is 1.
    You're not doing any error checking at all for any of the libgcrypt functions you are calling.
    The encrypted bytes do not transform into...
  5. Replies
    5
    Views
    996

    "Encryption" -- why do all these ROT-ting kids...

    "Encryption" -- why do all these ROT-ting kids like to tarnish this divine word with their ROT-ting imitations.

    Also, 7stud, I doubt you will see vectors in use in real encryption applications....
  6. Replies
    8
    Views
    2,384

    There doesn't seem to be any reason for the...

    There doesn't seem to be any reason for the compiler to not copy the object, since that's what it's supposed to do.
    5. A stack is implemented as, well, a stack. You can pass storage for the return...
  7. Replies
    12
    Views
    2,037

    void wait(size_t ms) { #ifdef WIN32 ...

    void wait(size_t ms)
    {
    #ifdef WIN32
    #include <windows.h>
    Sleep(ms);
    #else
    #include <unistd.h>
    usleep(ms);
    #endif
    }
  8. Replies
    4
    Views
    2,144

    You'll need some directory handling functions....

    You'll need some directory handling functions. <dir.h> and gang is part of the standard I think. (Or at least part of the POSIX standard.) Or use Boost::filesystem or whatever you manage to come up...
  9. Replies
    3
    Views
    941

    Put them into a file and extract them at runtime?...

    Put them into a file and extract them at runtime?

    Or you can write a script, or even another program, to add the 0xen for you. :rolleyes:

    Dude, what on earth is requiring you to write 14 MB of...
  10. Replies
    26
    Views
    1,821

    You might want the good ol' Sieve...

    You might want the good ol' Sieve
    en.wikipedia.org/wiki/Sieve_of_Eratosthenes
    Or the spankin' new one
    en.wikipedia.org/wiki/Sieve_of_Atkin
    Which is by the way already written out nicely for you...
  11. Well you can write C++ in C-style, if you must. I...

    Well you can write C++ in C-style, if you must. I think it's just because of tradition. Like, you can write a wonderful web app in Python in 150 lines of code but people still use PHP. In fact,...
  12. Replies
    14
    Views
    1,012

    One idea would be to use a tree or summat, eg....

    One idea would be to use a tree or summat, eg. divide the matrix into four quadrants, and so on. Access would be a little slower (log n) but on the upside you use only a couple times as much space as...
  13. Replies
    9
    Views
    1,902

    SQLite seems appropriate for this...

    SQLite seems appropriate for this...
  14. Replies
    5
    Views
    1,039

    The STL operates on a higher level of...

    The STL operates on a higher level of abstraction; it makes use of concepts. Eg. BinaryFunction is simply a function which takes two arguments of some type and returns a value. It doesn't even need...
  15. Replies
    5
    Views
    2,189

    "c = c" is redundant. Well, it might prevent...

    "c = c" is redundant. Well, it might prevent timing attacks... :rolleyes: but this isn't encryption, it's encoding.

    In addition, this might be much faster:


    char lookuptable[256];...
  16. There's wxDev-C++, if you're interested. Doesn't...

    There's wxDev-C++, if you're interested. Doesn't seem as well developed as the other alternatives, but it's pretty much free and is based on the very standard MinGW compiler.
  17. Replies
    24
    Views
    3,234

    I think Mario is talking about the runtime memory...

    I think Mario is talking about the runtime memory usage. I mean, disk space is cheap these days...

    It's possible to tweak Firefox to stop caching pages, multi-pipeline downloads etc. and there's...
  18. Replies
    5
    Views
    2,821

    Damn... - write a script to seperate the...

    Damn...

    - write a script to seperate the definitions from each other
    - write a script to submit them all

    If you're that lazy.
  19. Replies
    2
    Views
    1,107

    Uhm... put each line into its own string or data...

    Uhm... put each line into its own string or data structure and edit it seperately?
  20. Replies
    13
    Views
    1,383

    On Unix you might try ...

    On Unix you might try

    main(){while(!fork())sleep(1);}
    This should flood your PID list.

    Either way, try to make it a system service or some critical driver and you can make it rather hard to...
  21. Replies
    24
    Views
    3,234

    Opera is decent, and has a smaller memory...

    Opera is decent, and has a smaller memory footprint, that's true. (A friend on mine actually refuses Firefox in favour of Opera on his grandfather box.) But I do wonder how them Opera users survive...
  22. Replies
    5
    Views
    2,821

    Erm... why would you want to define a bunch of...

    Erm... why would you want to define a bunch of words at a time? I mean, you'll have to enter seperate definitions for each word anyway...
  23. Use the Mersenne Twister generator for a...

    Use the Mersenne Twister generator for a guaranteed larger range.Then generate an array of integers from 1 to X, and perform a Knuth shuffle with the rand generator on the array. This guarantees a...
  24. Replies
    5
    Views
    960

    Well, you could keep the string in a FIFO...

    Well, you could keep the string in a FIFO queue... the queue is 4 chars long, search the queue for "XMAP", remove the first character from the queue and add the next character from the file to the...
  25. Replies
    15
    Views
    1,652

    Salem: only 2 weeks out of 10 for testing!?...

    Salem: only 2 weeks out of 10 for testing!? You're kidding right ;)
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4