Also, try reading a compiler error that mentions an std::<vector<std::string > > std::string itself expands to std::basic_string<yadda yadda yadda>. I'm sure there was a good reason for it, but I'll be darned if I can figure it out.
IMO, string is just a special case of container. Since there are multiple types of elements commonly used in strings, (different character encodings, Unicode vs Multibyte, etc) they did what they did for vectors and templatized on the element type. They also templatized the memory management scheme to allow allocation performance enhancements since allocation is/can be one of the most-expensive-most-commonly-used operations in C++. If they didn't templatize it they would have had to have multiple separate implementations for each character encoding and memory management paradigm. Since there are only 3 numbers in CS, zero, one, and many, this would have been anethema to the STL designers.
Templates are not supported when targetting the CLR - target Win32 and you'll be just fine. If you're targetting the CLR - you not only lose templates, but also multiple inheritance. You effectively get a subset of C++.. (so much for M$'s claim of language independence for the CLR.. hehehehe)
Word on the grapevine is that generics is a possible future extension of the CLR and C#.
I can only pray this is the case, I have spent a lot of time getting good at the C++ Standard Library and the STL, and I now have a warm place in my heart for the amazing, frustrating, elegant beast. Until generic programming is available in C#, it will definitely be a mixed bag for me.
Don't read headers to learn STL. Get a good book like
[...]
I like "STL Tutorial and Reference Guide" by Musser and Saini (Addison-Wesley
Professional series, aka. The Swoosh books). Yes, the online guide is also very
handy.
Don't inherit from an STL container. [...]
Thought I already said that.... *shrug*
You probably already know this, but in general, you can rule out extending any class that does not have a virtual
destructor. This is true for two reasons: destroying a reference to the
base class will not call your inherited destructor and secondly failing to
declare a virtual destructor is a widely accepted C++ declaration style to indicate
the class should not be inherited since there is no "sealed" or
whatever in C++.
I bought a Geforce MX/TV tuner (the Deluxe Combo model) combo made by AsusTek, and it sounds like the Creative Digital VCR is an improvement. My card's digital vcr software was buggy as hell, and the Windows 2000 version has never left beta (available only on their website.)
I'll discuss the Windows 9x version, since it is the only version that really worked. The sound had a hissing, broken quality If I used timeshifting feature. It did not record to a known format, but to a special format developed by Asus. An hour at a Tivo-like quality would take over 2GB, which was a problem, because the program wrote only to one file, and the file size was limited to 2GB. I did have fun recording music videos in highest quality and using the included movie editing software to spend several hours turning the proprietary format into mpeg-2, but really, it wasn't worth my time.
I've since bought a TiVo, and it is night-and-day. It was quite easy to add a hard drive for a total of ~34 hours at the highest quality, and the television guide and automatic programming are alone enough to make it much better than any pc recorder without this feature. I only wish it were easy to pull the mpeg-2 streams out of the TiVo and put them on my hard drive.
Several people have already pointed out that "natural" doesn't mean "good for you".
And even beyond your points, natural and good for you don't always mean in your best interest. One of the effects of receiving sufficient or excessive nutrition is that cells (and animals) tend to focus on procreating at the expense of their own lifespans. There is a fundamental biological process that kills cells faster when there is an abundance of nutrience. That means, even though malnurishment is "bad" for you, you may live longer on a carefully malnourished diet.
This makes sense from an evolutionary standpoint because in lean times you are best served by just surviving until better times when you can procreate or help your tribe/etc in other ways. Similarly, if you are stressed and not getting enough sleep, it may mean that you are going through some other kind of negative period in which the body's best bet is simply to extend life until better times roll around. In fact, recent studies suggest that those who sleep about 6-7 hours a night live longer than those who sleep 8-10.
IIRC there was an experiment where a factory secretly "spiked" the water cooler with pure caffiene goodness.
That seems unlikely. I've never tasted pure caffeine, but I have read that it is quite bitter. You would think someone would notice that the water tasted a little "off."
It's too horrible to contemplate: sleep is the only thing moderating the life cycles of some of hard-core addicts and preventing them from sinking as far as drug addicts can (most addictive drugs are stimulants and keep you up.) Without sleep regulating their addiction the whole lot of them will descend into dementia, not that they aren't far from that now.
There is a reason you get sleepy. Your body and mind needs to rest and recharge and sleepiness is the signal to do so.
You make this claim as if it were intuitively obvious, but please let me argue that it may be wrong.
There are other possible reasons we sleep, for example it may be because we are day hunters and we would just be using excessive calories if our bodies were at full burn 24 hrs/day. Sleep may be nothing but a food conservation program built into our evolution. Lions sleep a huge number of hours a day, probably because not burning calories when you aren't hunting for a huge calorie glut of a meal is the best strategy for surviving lean times. Some (all?) bears hibernate, probably for the same reason.
So while you may be right, I think it is wrong to say sleep is a given and that's the end of it. Pregnancy used to be a given if you had sex, and while there are many people who still believe the only natural motivation and consequence of sex is procreation, many people now separate the two activities. I think Tiredness and Sleep may someday be separated in the same way. Sleep can be fun, but so can other things with which sleep can interfere.
I don't think that Valve [valvesoftware.com] would be in any position to give out either Quake 3 engine source code or "data manipulation tools for the data on which that engine operates" for an id Software [idsoftware.com]game.
You are right, of course, but your comment seems to imply that I am confusing Quake 3 with Valve. Unless I am horribly mistaken, Half-Life is built on (a somewhat modified) Quake 3 engine. They paid ID a ton of money for the source and they modified it. I'm sure they had to sign an NDA, so you are right in that they are not in a position to give away the engine, but you are wrong in your condescending tone.
Your *asterisks* make me *wish* you understood html.:)
Really, I don't know what you are complaining about. Microsoft Office and Visual Studio have tremendous scripting features, as does just about every major application these days. It's not like Valve gives you the Quake 3 engine source code, they just give you the data manipulation tools for the data on which that engine operates.
As for the 'non-scaling' criticism: to quote Dogbert, 'Pah!' They do what they're supposed to do. I never criticised my Spectrum because it didn't have dolby sound; I wouldn't criticise my roaches because they don't write operas.
It is not a critism of the robots in themselves, but of the methodology. Humans become capable of manipulating new ideas when they develop a symbology for modeling those ideas mentally. The various finite state automata that Rod Brooks has developed are useful in themselves, but unless the reviewer failed to mention it, they do not portend a new way of designing complex life-like systems. This is not because there is no merit to his ideas, but because his ideas are not new, FSA's are widely recognized as an excellent way of implementing real-time limited-adaptability behavior. I used multiple software-implemented FSA's to control my easter-egg-hunting robot back in college years ago, and I definitely wasn't breaking any ground. He has simply applied them (very!) well to the tasks for which they are best suited: simple machines with limited behaviors.
If he had provided a set of equations or even just a pseudo-algorithm for breaking down complex, adaptive behaviors into multiple interlinked AFSA's, he would have significantly advanced AI, but I saw no such evidence in this book review.
I think that I was to spurt out 1000 "random" numbers they would'nt be as random as a computers
The problem with this statement is there is more than one definition of random. Human-generated numbers would be non-random in that they are compressible: if you ran a perfect WinZip on a 1000 sequence generated by a human, it would find repeating patterns and uneven distributions, and it would reduce the data size by a statistically significant amount, on average. But because humans receive a rich input from the world around them, including indirect inputs from truely random sources such as cosmic rays, their numbers are completely unpredictable, on average.
Most computers are non-random in that they have an invariant algorithm they use to generate their random data. Their data is irreducible and statistically random, yet predictable. If you made a computer like a human, giving it input that comes from truely random sources, then they would give you truely random numbers. And of course, people have done this, but it is simpler just to use a truely random source as directly as possible.
Well you can't point a telescope towards the sun and expect to see something!
I suspect it is a blind spot not because of the atmospheric effect (we do have Hubble in orbit, and masking for terrestrial telescopes, after all, and if it were directly in line then we would see its profile as a dark spot on the sun) but because if an object is (nearly) between the observer and the light source, only a tiny portion of its surface would be illuminated from the perspective of the observer.
been listening to the audio book version of Niven & Pournelle's "Lucifer's Hammer"
I remember reading that book years ago. One quote from the book has stuck with me all that time: They are up in the shuttle observing the comet, with all the microcomets and debris shining in the sun, and one of the astronauts says, "Duck's-eye view of a shotgun blast."
Gotta love it. Good book if you want to see some honest speculation about what a civilization-ending hit might do to the world. As a bonus, it's the only book I've read that makes a nuclear power plant a protagonist (IMO.)
What is more interesting is if you think about what would happen if the moon was to go away... Colder areas would become colder and warmer areas would become warmer without some type of climate circulation
Well, I for one will take this scenario over a 100 ft super-saiyan Gorilla.
But don't forget the heroine will be unscratched and complely unclad except for super-short shorts and a sailor shirt and will pose with her feet apart yet her knees together, so she can be both balanced and modest at the same time.
And the battle will take place in a completely denuded desert area with a bunch of rock spires and outcropppings that slide and explode all over the place
Languages are around forever because they are easy to support when they're dead, i.e. they stop evolving in a significant way.
Live languages change, ideally the best parts stay and the worst parts are deprecated.
Old languages stick around, and occasional releases are defecated.
You can support crap as long as you don't play with it, and if you put crap in a seive don't expect to be left with the best parts.
Oh, the most overlooked asset of the show is the voice actor who does Jet Black. What a lyrical, interesting voice. I especially love the promos he does for upcoming episodes.
Word on the grapevine is that generics is a possible future extension of the CLR and C#.
I can only pray this is the case, I have spent a lot of time getting good at the C++ Standard Library and the STL, and I now have a warm place in my heart for the amazing, frustrating, elegant beast. Until generic programming is available in C#, it will definitely be a mixed bag for me.You probably already know this, but in general, you can rule out extending any class that does not have a virtual destructor. This is true for two reasons: destroying a reference to the base class will not call your inherited destructor and secondly failing to declare a virtual destructor is a widely accepted C++ declaration style to indicate the class should not be inherited since there is no "sealed" or whatever in C++.
I'll discuss the Windows 9x version, since it is the only version that really worked. The sound had a hissing, broken quality If I used timeshifting feature. It did not record to a known format, but to a special format developed by Asus. An hour at a Tivo-like quality would take over 2GB, which was a problem, because the program wrote only to one file, and the file size was limited to 2GB. I did have fun recording music videos in highest quality and using the included movie editing software to spend several hours turning the proprietary format into mpeg-2, but really, it wasn't worth my time.
I've since bought a TiVo, and it is night-and-day. It was quite easy to add a hard drive for a total of ~34 hours at the highest quality, and the television guide and automatic programming are alone enough to make it much better than any pc recorder without this feature. I only wish it were easy to pull the mpeg-2 streams out of the TiVo and put them on my hard drive.
Get a TiVo!
But if he just used Schlitz the effect would be the same and it would be perfectly legal!
And even beyond your points, natural and good for you don't always mean in your best interest. One of the effects of receiving sufficient or excessive nutrition is that cells (and animals) tend to focus on procreating at the expense of their own lifespans. There is a fundamental biological process that kills cells faster when there is an abundance of nutrience. That means, even though malnurishment is "bad" for you, you may live longer on a carefully malnourished diet.
This makes sense from an evolutionary standpoint because in lean times you are best served by just surviving until better times when you can procreate or help your tribe/etc in other ways. Similarly, if you are stressed and not getting enough sleep, it may mean that you are going through some other kind of negative period in which the body's best bet is simply to extend life until better times roll around. In fact, recent studies suggest that those who sleep about 6-7 hours a night live longer than those who sleep 8-10.
Go figure.
That seems unlikely. I've never tasted pure caffeine, but I have read that it is quite bitter. You would think someone would notice that the water tasted a little "off."
And they call it EverCrack now.
It's too horrible to contemplate: sleep is the only thing moderating the life cycles of some of hard-core addicts and preventing them from sinking as far as drug addicts can (most addictive drugs are stimulants and keep you up.) Without sleep regulating their addiction the whole lot of them will descend into dementia, not that they aren't far from that now.
You make this claim as if it were intuitively obvious, but please let me argue that it may be wrong.
There are other possible reasons we sleep, for example it may be because we are day hunters and we would just be using excessive calories if our bodies were at full burn 24 hrs/day. Sleep may be nothing but a food conservation program built into our evolution. Lions sleep a huge number of hours a day, probably because not burning calories when you aren't hunting for a huge calorie glut of a meal is the best strategy for surviving lean times. Some (all?) bears hibernate, probably for the same reason.
So while you may be right, I think it is wrong to say sleep is a given and that's the end of it. Pregnancy used to be a given if you had sex, and while there are many people who still believe the only natural motivation and consequence of sex is procreation, many people now separate the two activities. I think Tiredness and Sleep may someday be separated in the same way. Sleep can be fun, but so can other things with which sleep can interfere.
You are right, of course, but your comment seems to imply that I am confusing Quake 3 with Valve. Unless I am horribly mistaken, Half-Life is built on (a somewhat modified) Quake 3 engine. They paid ID a ton of money for the source and they modified it. I'm sure they had to sign an NDA, so you are right in that they are not in a position to give away the engine, but you are wrong in your condescending tone.
Really, I don't know what you are complaining about. Microsoft Office and Visual Studio have tremendous scripting features, as does just about every major application these days. It's not like Valve gives you the Quake 3 engine source code, they just give you the data manipulation tools for the data on which that engine operates.
Prediction: You're so circumspect, thoughtful, and slow to jump on the bandwagon that your extinction from Slashdot is guaranteed.
Prolly closer to their guts.
They can only aspire to the high quality of the thesbians in the original game.
It is not a critism of the robots in themselves, but of the methodology. Humans become capable of manipulating new ideas when they develop a symbology for modeling those ideas mentally. The various finite state automata that Rod Brooks has developed are useful in themselves, but unless the reviewer failed to mention it, they do not portend a new way of designing complex life-like systems. This is not because there is no merit to his ideas, but because his ideas are not new, FSA's are widely recognized as an excellent way of implementing real-time limited-adaptability behavior. I used multiple software-implemented FSA's to control my easter-egg-hunting robot back in college years ago, and I definitely wasn't breaking any ground. He has simply applied them (very!) well to the tasks for which they are best suited: simple machines with limited behaviors.
If he had provided a set of equations or even just a pseudo-algorithm for breaking down complex, adaptive behaviors into multiple interlinked AFSA's, he would have significantly advanced AI, but I saw no such evidence in this book review.
The problem with this statement is there is more than one definition of random. Human-generated numbers would be non-random in that they are compressible: if you ran a perfect WinZip on a 1000 sequence generated by a human, it would find repeating patterns and uneven distributions, and it would reduce the data size by a statistically significant amount, on average. But because humans receive a rich input from the world around them, including indirect inputs from truely random sources such as cosmic rays, their numbers are completely unpredictable, on average.
Most computers are non-random in that they have an invariant algorithm they use to generate their random data. Their data is irreducible and statistically random, yet predictable. If you made a computer like a human, giving it input that comes from truely random sources, then they would give you truely random numbers. And of course, people have done this, but it is simpler just to use a truely random source as directly as possible.
heheh, oops, forgot that less-than is a reserved html control character, anyway 3.14 is good enough to an insignificant engineering error factor!
Dummy, everyone knows pi is exactly 3.14 with a
They sure seem energetic about this idea.
Within months the company will be all washed up.
Will they have to buy land for this, or do they already own the tidal?
Surfice it to say, this is a good idea.
Wave goodbye to fossil fuels.
Will the public embrace it, Ocean it?
I suspect it is a blind spot not because of the atmospheric effect (we do have Hubble in orbit, and masking for terrestrial telescopes, after all, and if it were directly in line then we would see its profile as a dark spot on the sun) but because if an object is (nearly) between the observer and the light source, only a tiny portion of its surface would be illuminated from the perspective of the observer.
I remember reading that book years ago. One quote from the book has stuck with me all that time: They are up in the shuttle observing the comet, with all the microcomets and debris shining in the sun, and one of the astronauts says, "Duck's-eye view of a shotgun blast."
Gotta love it. Good book if you want to see some honest speculation about what a civilization-ending hit might do to the world. As a bonus, it's the only book I've read that makes a nuclear power plant a protagonist (IMO.)
Well, I for one will take this scenario over a 100 ft super-saiyan Gorilla.
And the battle will take place in a completely denuded desert area with a bunch of rock spires and outcropppings that slide and explode all over the place
and...
nevermind!
Live languages change, ideally the best parts stay and the worst parts are deprecated.
Old languages stick around, and occasional releases are defecated. You can support crap as long as you don't play with it, and if you put crap in a seive don't expect to be left with the best parts.
Oh, the most overlooked asset of the show is the voice actor who does Jet Black. What a lyrical, interesting voice. I especially love the promos he does for upcoming episodes.