Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

606 Good

About Miserable

  • Rank
  1. Miserable

    Bad joke, don't read!

    Quote:Original post by Lode Let's talk about the joke instead of the grammar. Why? I think the grammar is a good deal more entertaining ...
  2. Miserable

    Bad joke, don't read!

    Quote:Original post by capn_midnight have, HAVE! "What would HAVE David Mills said..." "of" doesn't even make sense. "What would David Mills have said ..."
  3. Miserable

    The 1601 date start thing, an answer

    Quote:Original post by CpMan The reason is that a leap year is every four years except in certain centuries, I think the ones divisble by 4 (not sure about this). A year is a leap year if it is divisible by 4, unless it is divisible by 100, in which case it is not a leap year unless it is also divisible by 400.
  4. Miserable

    [python] array's

    What we are dealing with is known as slicing, which basically amounts to selecting a subsequence (slice) of a sequence (this can be any type of ordered sequence: tuple, list, string ...). The syntax is seq[start:end] (where either start or end may be omitted to signify defaults of beginning and end of sequence, respectively) or, with an optional step parameter, seq[start:end:step] so that the slice [start, end) starts at index start, ends at index end-1 (as usual, the end of the range is exclusive), and we move in increments of step (for instance, taking every second or every third element). A few examples with strings: >>> "hello"[1:5] 'ello' >>> "hello"[0:4] 'hell' >>> "hello"[0:4:1] 'hell' >>> "hello"[0:5:2] 'hlo' >>> "hello"[::-1] 'olleh' >>> "hello"[4::-1] 'olleh'
  5. Miserable

    [python] array's

    Quote:Original post by Fruny You can reverse the string by writing a[::1]<:tt>. It's more efficient than your version. Surely a typo: a[::-1].
  6. Miserable

    Disturbing article on casual sex

    Quote:Original post by kSquared Statistically speaking, the question is now, "What is the probability of obtaining one or more failures in 100 trials?" Clearly this is equal to (1 - P*), where P* is "the probability of obtaining exactly zero failures in 100 trials". The probability of obtaining exactly zero failures in 100 trials is C(100,0)* p100 * q0, where p and q are your chances of success and failure respectively. Depending on which method of contraception you employ, you get different results. Let's assume you use a condom for argument's sake and she doesn't use birth control. We'll be generous and assume that condoms have a 95% success rate in any given sex session. This gives p ~= .95, q ~= .05. Over 100 trials, the chance that you will have exactly zero failures is thus (.95)100 = Pcondom ~= 0.00592, or roughly six-tenths of a percent. That means that the chance of getting one or more people pregnant in 100 trials is virtually 100% (about 99.4%). Talk about gambling with your future! As I said, of course, this assumes that the numbers given mean the success rate in any given trial. If they're a lifetime success rate, that's a whole different story. It'd sure be nice if they said which one! These failure probabilities are generally given for an estimated typical amount of sexual intercourse over one year. Thus your 100 trials translate to 100 years of active sex life—quite an accomplishment, you must admit!
  7. Miserable

    Getting number of elements in an array

    Quote:Original post by smr Can't you just use sizeof? No. When you dynamically allocate an array, the variable is simply of a pointer type, so sizeof will return only the size of a pointer—usually 4 on 32-bit platforms, 8 on 64-bit platforms, et cetera.
  8. First, you would obviously have to read into something other than an int, as previously indicated. You could always do something like this: #include <limits> // ... int64 input; // Assume some suitable type of large numbers is available std::cin >> input; if(input <= std::numeric_limits<int>::max()) // ... // ... I'm barely awake and clearly not thinking straight. Don't listen to me, listen to doynax. [Edited by - Miserable on May 20, 2005 10:53:49 AM]
  9. Miserable

    Trying Linux

    There's a Gnome equivalent of Knoppix, called Gnoppix. As it happens, it is based on Ubuntu ...
  10. Miserable

    Trying Linux

    My vote goes to Ubuntu Linux, for several reasons: It is nice and polished, it is beginner friendly, it is based on Debian which means that it has sane package management, and it comes with a live CD (in fact there is even a unified live/install DVD).
  11. Miserable

    Filling an array with data

    Assuming you are using C or C++, you cannot assign to an array (only array elements) except during initialisation. You could avoid some tedium by creating a new array and copying it into the old: int array[] = {1,2,3,4,5}; // ... lots o' stuff ... int temp[] = {10,15,20,25,30}; std::copy(temp, temp+5, array); [Edited by - Miserable on May 12, 2005 10:42:51 AM]
  12. Miserable

    which type?

    Quote:Original post by Strife VectorLinux is Slackware-based. Really the only difference is that it just doesn't have packages that would be resource-heavy, as far as I know. At least in terms of it being "designed for" low-end machines. You can essentially do this with any of the aforementioned distros, just maybe by selectively installing certain components. Oh, of course; my point is that VectorLinux is well suited for older computers out of the box with default settings; less hassle.
  13. Miserable

    which type?

    I love Gentoo, but compiling it on a P2—especially if you want a GUI environment—would be excruciatingly painful (unless you can distcc or compile on another box). A better choice might be something like VectorLinux which, unlike the other distributions mentioned in this thread, is designed precisely to be light enough to run on lower-end machines. (For instance, they claim it should run fine on 32 MB of RAM.)
  14. Miserable

    Cross Platform Installer?

    Quote:Original post by bkt I'm not familer with OSX, but I know its based upon *BSD and I'm not sure if you can use the same compiled binaries for a *nix distribution. Even if it supports ELF binaries, bear in mind that OSX runs only on PPC-based architectures, and most people running *nix boxes will probably be using some x86 derivative, with a completely different instruction set—obviously binaries aren't portable across unrelated architectures.
  15. Miserable

    what next? debian?

    Quote:Original post by lemurion You can use precompiled packages with Gentoo, they are called GRP iirc, just look at the Gentoo handbook they tell about it. Read about "Stage 3" With the caveat that this applies only to installation. While some big packages are available in precompiled form (for example Firefox, Thunderbird, and OpenOffice.org, which is a horror to compile), most of your updates and programs installed after the initial setup will be source based. I love my Gentoo, but if you don't have the time and hardware to compile your programs, it's not a good idea.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!