Now, let's suppose that I've finished reading slashdot, and I want to carry on editing my image,
then you just switch from the virtual desktop with your browser to the virtual desktop with GIMP and can carry on editing your image. At least that's what I do.
Well, he passed the event horizon between life and death.
That it's an event horizon is proved by the facts that no one ever came back, we don't get any information from the other side, and sooner or later we all will fall through it.
Suicide is not a crime in the US. Attempted suicide is a crime... although maybe we should ask if it should be.
Obviously the crime is in failing to kill yourself. I'd say that's a clear message. Those sites telling you how to successfully commit suicide just help in crime prevention.
It's not like someone's browsing, and they see the wikipedia entry and decide to kill themselves.
That depends. Maybe he finds an error, tries to correct it and gets immediately reverted. This makes him so depressed that he commits suicide (but after the experience, he doesn't trust Wikipedia on telling him the best way).
Well, the head line isn't "Flowers smell...", but "Flowers' smell..." i.e. "The smell of the flowers..."
And yes, "smell" indeed is a noun as well as a verb, and Webster's New Encyclopedic Dictionary gives as one meaning of that noun: "2: the property of a thing that affects the olfactory organs: odor"
Oh, and the same source gives as one meaning of the verb: "4a: to give off an odor" - therefore flowers indeed do smell, although that's irrelevant to the interpretation of the title.
If a terrorist is going to hijack a plane in order to crash it in a building, wouldn't he choose a plane which he can expect to remain in the air until the building is reached?
And if a plane is hijacked by terrorists, wouldn't it be an advantage if some hacker in the economy class can take control of the plane?
You see, the unsafety makes the plane more secure from terrorists!:-)
Given that up to the 386, the FP always was a separate chip (the 486 was the first one which offered an integrated FPU), I'd not say it was a marketing decision. Note that the original 8087 (the floating point chip for the 8086) was more independent from the main processor than later FP coprocessors/FPUs; that's why there's the FWAIT instruction, which originally directed the main processor to wait for the 8087 to finish its calculations.
This is a horrible attitude, as many students (including myself) are not going into software development.
In that case, why are you studying CS? It's like studying physics and complaining that you won't need all that quantum mechanics at the engineering job you plan to get. The answer of course is, if you are just interested in engineering, you should study engineering instead.
The C++ standard contains the complete standard library definition. Note that there are complete books just about the standard library (and some even just about the STL subset). And C++0x adds more to it (more STL classes, a random number generator framework, a threading library, regular expressions,...).
Reminder to myself: If using angle brackets, never forget to preview, even in the middle of the night!
The last paragraph should have read:
We don't. Only "iostream" (for std::cin and std::cout) and "ostream" (for operator<< on ostream and std::endl) is needed. "istream" isn't needed because we don't use operator>>, but istream_iterator for input (the fact that istream_iterator internally uses operator>> is irrelevant here; it's the job of the "iterator" header to make sure everything needed in the implementation of the iterator is included; indeed, on a compiler implementing export, might only be included in the corresponding.cc file of "iterator" (and thus not even indirectly in your own translation unit). Moreover "iomanip" isn't needed because you don't use any of the manipulators defined there (you need "iomanip" only for iterators which take arguments).
And yet, it gives wrong result for certain input data.
Well, the first problem I see with this code is that it uses integer division. The fact that "/" on integers gives an integer division isn't just a problem of C++, but of many languages (Pascal did get it right by using a separate operator, div, for integer division, and reserving / for float division). Thus if you enter the numbers "1" and "2", instead of the correct answer 1.5 you'll get 1. To get floating point division, you must have at least one of the types be a floating point type. This could e.g. be done by replacing v.size() with double(v.size()) or (preferrably, because it avoids a type cast) (v.size() + 0.0). Of course, the variable avg shouldn't be int either, but a floating point type.
Another problem of the code is related to the fact that v.size() is an unsigned type, which will give unexpected results if the sum on the left is negative (but then, this problem wouldn't occur if the correct floating point division was used). This is due to the rule inherited from C that mixing signed and unsigned in arithmetics will cause the signed value be converted to unsigned. This can also give other surprising results; e.g. v.size() > -1 will always evaluate to false.
The code also has other problems, like missing error handling for I/O errors and for empty sequence (i.e. no numbers given at all, which will result in division by zero). But that's hardly a language problem.
Bonus points for explaining why we need "istream", "ostream" and "iomanip" headers here in addition to "iostream" (and we do, if we want this to be portable).
We don't. Only "iostream" (for std::cin and std::cout) and "ostream" (for operator>, but istream_iterator for input (the fact that istream_iterator internally uses operator>> is irrelevant here; it's the job of the "iterator" header to make sure everything needed in the implementation of the iterator is included; indeed, on a compiler implementing export, might only be included in the corresponding.cc file of "iterator" (and thus not even indirectly in your own translation unit). Moreover "iomanip" isn't needed because you don't use any of the manipulators defined there (you need "iomanip" only for iterators which take arguments).
then you just switch from the virtual desktop with your browser to the virtual desktop with GIMP and can carry on editing your image. At least that's what I do.
The sentence started with: "For me"
It wasn't a statement claiming to speak an absolute truth, but a personal judgement clearly marked as such.
Well, he passed the event horizon between life and death.
That it's an event horizon is proved by the facts that no one ever came back, we don't get any information from the other side, and sooner or later we all will fall through it.
That's OK as long as he stays clear from Redmont.
Obviously the crime is in failing to kill yourself. I'd say that's a clear message. Those sites telling you how to successfully commit suicide just help in crime prevention.
That depends. Maybe he finds an error, tries to correct it and gets immediately reverted. This makes him so depressed that he commits suicide (but after the experience, he doesn't trust Wikipedia on telling him the best way).
So you are seeing Anti-Higgs?
Well, the head line isn't "Flowers smell ...", but "Flowers' smell ..." i.e. "The smell of the flowers ..."
And yes, "smell" indeed is a noun as well as a verb, and Webster's New Encyclopedic Dictionary gives as one meaning of that noun: "2: the property of a thing that affects the olfactory organs: odor"
Oh, and the same source gives as one meaning of the verb: "4a: to give off an odor" - therefore flowers indeed do smell, although that's irrelevant to the interpretation of the title.
If a terrorist is going to hijack a plane in order to crash it in a building, wouldn't he choose a plane which he can expect to remain in the air until the building is reached?
:-)
And if a plane is hijacked by terrorists, wouldn't it be an advantage if some hacker in the economy class can take control of the plane?
You see, the unsafety makes the plane more secure from terrorists!
It still only has the ordinary symmetries of a plane. No supersymmetry in sight.
Drop the W., it's unpopular anyway. Just call it CAN, and watch Obama advertising it (yes, we CAN!)
You don't know the PPPoF (PPP over Fiddle) protocol? You'll soon see Fiddle to the Home networks ...
Given that up to the 386, the FP always was a separate chip (the 486 was the first one which offered an integrated FPU), I'd not say it was a marketing decision. Note that the original 8087 (the floating point chip for the 8086) was more independent from the main processor than later FP coprocessors/FPUs; that's why there's the FWAIT instruction, which originally directed the main processor to wait for the 8087 to finish its calculations.
No, he quite obviously has invented an Airbus.
But attempted conspiracy is entirely possible: Imagine you want to start a conspiracy, but don't find anyone who's willing to conspire with you ...
What about Slashdot? After all, you might not want your ISP to know that you read such subversive web sites! :-)
"We want this machine off, and we want it off now!"
But I can predict which team the machine will predict to win: Team #42
You mean because you never know whether the link will have expired when you next open the bookmark?
In that case, why are you studying CS? It's like studying physics and complaining that you won't need all that quantum mechanics at the engineering job you plan to get. The answer of course is, if you are just interested in engineering, you should study engineering instead.
The C++ standard contains the complete standard library definition. Note that there are complete books just about the standard library (and some even just about the STL subset). And C++0x adds more to it (more STL classes, a random number generator framework, a threading library, regular expressions, ...).
You can't.
But with GC, at least your bugs don't stick in your face by creating segfaults or the like. If you have bugs, they at least should be well hidden. :-)
The last paragraph should have read: We don't. Only "iostream" (for std::cin and std::cout) and "ostream" (for operator<< on ostream and std::endl) is needed. "istream" isn't needed because we don't use operator>>, but istream_iterator for input (the fact that istream_iterator internally uses operator>> is irrelevant here; it's the job of the "iterator" header to make sure everything needed in the implementation of the iterator is included; indeed, on a compiler implementing export, might only be included in the corresponding
Well, the first problem I see with this code is that it uses integer division. The fact that "/" on integers gives an integer division isn't just a problem of C++, but of many languages (Pascal did get it right by using a separate operator, div, for integer division, and reserving / for float division). Thus if you enter the numbers "1" and "2", instead of the correct answer 1.5 you'll get 1. To get floating point division, you must have at least one of the types be a floating point type. This could e.g. be done by replacing v.size() with double(v.size()) or (preferrably, because it avoids a type cast) (v.size() + 0.0). Of course, the variable avg shouldn't be int either, but a floating point type.
Another problem of the code is related to the fact that v.size() is an unsigned type, which will give unexpected results if the sum on the left is negative (but then, this problem wouldn't occur if the correct floating point division was used). This is due to the rule inherited from C that mixing signed and unsigned in arithmetics will cause the signed value be converted to unsigned. This can also give other surprising results; e.g. v.size() > -1 will always evaluate to false.
The code also has other problems, like missing error handling for I/O errors and for empty sequence (i.e. no numbers given at all, which will result in division by zero). But that's hardly a language problem.
We don't. Only "iostream" (for std::cin and std::cout) and "ostream" (for operator>, but istream_iterator for input (the fact that istream_iterator internally uses operator>> is irrelevant here; it's the job of the "iterator" header to make sure everything needed in the implementation of the iterator is included; indeed, on a compiler implementing export, might only be included in the corresponding