Search:

Type: Posts; User: bernt

Page 1 of 18 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    3,440

    Poll: FWIW I have not seen a cube made up of 6...

    FWIW I have not seen a cube made up of 6 *triangles*... yet :D
  2. Replies
    5
    Views
    4,081

    Visual Studio 2010 has support for the ...

    Visual Studio 2010 has support for the <random> header, which is now part of the C++11 standard. <random> has support for lognormal distributions, among many other things; here's a quick example of...
  3. Replies
    10
    Views
    1,260

    I'm not certain exactly what it is you're trying...

    I'm not certain exactly what it is you're trying to do but from what I gather Boost::FunctionTypes (and/or Boost::Fusion) would be of interest to you if you still want to go the templates route. It's...
  4. Replies
    15
    Views
    3,189

    The diagram on this page...

    The diagram on this page might help.
  5. Replies
    3
    Views
    1,180

    num[N]=rand()%(num[99]-num[0]+1)+num[0]; ...

    num[N]=rand()%(num[99]-num[0]+1)+num[0]; /*Formula for extracting Casual(random) Numbers with the biggest and smalletst value included */

    printf("\n%d : %d",i,num[N]);

    Did you mean...
  6. Replies
    16
    Views
    4,200

    Don't forget about the Windows lackeys...

    Don't forget about the Windows lackeys.
  7. Replies
    5
    Views
    1,626

    'this' is a pointer in C++, use the '->' operator.

    'this' is a pointer in C++, use the '->' operator.
  8. Replies
    10
    Views
    1,189

    Something worth noting since this looks like a...

    Something worth noting since this looks like a scientific application: if N does not evenly divide RAND_MAX, this method tends to favor lower numbers very slightly, more so with large N.

    If an...
  9. Replies
    4
    Views
    3,390

    The Config Type = "Dynamic Library" should work....

    The Config Type = "Dynamic Library" should work. Perhaps try jiggling the handle: "Clean Solution" and rebuild?
    If you have multiple projects in the solution, make sure you're changing/building the...
  10. You can use a library like ncurses (pdcurses on...

    You can use a library like ncurses (pdcurses on Windows) to get non-blocking input. There *are* other options (namely, using functionality from your OS or putting IO into a separate thread) but they...
  11. Replies
    5
    Views
    1,393

    There is also Boost.MultiIndex...

    There is also Boost.MultiIndex (which is modeled after database ideas, but with a more STL-like interface).
  12. Thread: C code question

    by bernt
    Replies
    5
    Views
    1,192

    Imagine I gave you any arbitrary list of values,...

    Imagine I gave you any arbitrary list of values, say [1, 10, 6, 7, 9] --- how would you find the sum then?
    If you can calculate the amount received on each day it should be trivial; don't try to...
  13. Replies
    53
    Views
    8,130

    There's an obvious exception to this rule, and...

    There's an obvious exception to this rule, and that's when a company provides support for their products (though this would arguably fit under the "backed by labor" category). Stuff like email...
  14. Here, "x / y" is casted to double *after* the...

    Here, "x / y" is casted to double *after* the calculation x/y has been made.

    Explicitly casting to double before the calculation:


    average = ((double) x) / ((double) y);

    will get you the...
  15. Replies
    8
    Views
    4,229

    Characters are laid out contiguously and in order...

    Characters are laid out contiguously and in order '0' through '9', so, eg. (int)('0' - '0') = 0, and (int)('5' - '0') = 5.
    Given a character 'n' representing some digit 0-9, (int)('n' - '0') = n....
  16. Replies
    8
    Views
    4,229

    Sorry, I couldn't help myself... :p ...

    Sorry, I couldn't help myself... :p

    hextodec.c:


    #include <stdio.h>

    int main(void)
    {
    int val;
  17. Replies
    53
    Views
    8,130

    What I find amazing about this legislation is...

    What I find amazing about this legislation is that it's high-profile, controversial, *and* bipartisan. You can see the split at-a-glance here, and it's not very often you see those sorts of numbers...
  18. Replies
    4
    Views
    2,170

    AFAIK .xls is a pretty complex format. .csv...

    AFAIK .xls is a pretty complex format.

    .csv (Comma Separated Values) on the other hand, is exactly what's on the tin: a list of values separated by commas. You can open a csv file in Notepad to...
  19. Replies
    5
    Views
    2,488

    There's no semicolon after the "return 0". I...

    There's no semicolon after the "return 0". I don't know if this was a copy-paste error, but it's possible that you were just running the last successful build (presumably from before you inserted the...
  20. Replies
    6
    Views
    2,249

    struct Player { char player_name[50]; ...

    struct Player
    {
    char player_name[50];
    int player_type;
    double money;
    struct Player *next;
    }; //<-----


    I miss these semicolons all the time too.
  21. Replies
    30
    Views
    5,334

    I've been able to get this reliably on the logout...

    I've been able to get this reliably on the logout page. Haven't noticed it on any other occasions, though. (Firefox 8.0 on Linux)
  22. Replies
    9
    Views
    2,499

    If you're going to use result like it's a...

    If you're going to use result like it's a one-dimensional array, then define it as such. Otherwise you should access the array like it's actually two dimensional: with a row and column index.
  23. Replies
    3
    Views
    1,857

    Adding a cout

    Adding a


    cout << int(v) << endl;

    to the loop, it looks like the actual value of data is just under what it should be, e.g. something like 134.289999999. The behavior of int(v) is to round...
  24. Replies
    21
    Views
    15,299

    Ha. I just visited Wikipedia -- it only "blacks...

    Ha. I just visited Wikipedia -- it only "blacks out" if you have Javascript enabled.
  25. Replies
    21
    Views
    15,299

    Xefer Wikipedia Radial Graph...

    Xefer Wikipedia Radial Graph
Results 1 to 25 of 428
Page 1 of 18 1 2 3 4