jhdevos
This looks like a developer mistaking a command line interface for an API.
Unless an (interactive) CL interface is explicitly marked as being an API, and documented in such a way, and regression tests exist to make sure the interface remains backwards-compatible - you should never program against it. Ask for a proper API to access.
(edit: formatting)
Section 4.5 in the language spec deals with parameterized types; 4.5.1 deals with wildcards. Of course, there is no example in the specs that clearly points out what happens in this example - otherwise this wouldn't have remained undiscovered for so many years :)
If you can show, using the rules in the spec, that the sample program shouldn't pass type checking, then you'll have proved the article wrong :-)
As for the problem itself: it really has nothing to do with inner classes (they are static in the example!). The problem is with this line:
Constrain<U,? super T> constrain = null;
which leads the type system to assume that there is a type that is a superclass of T, which also is a subclass of B (from the 'Constrain' class) - even though no such type could possibly exist! The evil trick is in the 'null' - even though a type with the stated constraints is impossible, and so no actual 'real' value of this generic type could exist, 'null' is part of all types, so the compiler can't see the problem.It really is a problem in the type system as defined in the standard, not just a compiler bug.
There were quite some people that thought trees were faster than hash tables though - mostly the ones that had some incling of what a hash table does, but didn't know the entire picture. At least in all those cases I had the pleasure of educating them a little bit :-)
Only in the sense that you can't forbid anyone else /having/ an idea, just that you can forbid them doing anything with it.
In software, it is definitely the idea that is protected, not the specific implementation - otherwise, copyright would be enough.
(BTW: This is not just meant as a joke, nor just as instigating fear of the singularity - turning a question on its head can sometimes lead to interesting insights).
It's very hard do really do in a 'double blind' way - I would not be able to think of something that is to all appearances equal to the real mindfulness mediation, but actually only a fake. There's no substance to it.
Do you have any suggestions to do it better?
And they do not prove at all that the same can be done for any kind of instrument: trumpets and trombones are a lot cheaper to make than things like bassoons - you can find very cheap brass trumpets on ebay for very little money, some of which are surprisingly acceptable; and a rather good trumpet will set you back quite a lot less than a basson only fit for a beginner.
Other browsers will probably have similar options.
In principle, that is sort of what the patent system was intended for. (I still don't agree with it, but that's another story).
What he means is that the total time taken by ALL executions of the inner loop combined is at most N, not that each run of the inner loop takes at most N steps (otherwise it would become quadratic).
The C++ standard, of course :) But if you prefer some lighter reading, either http://www.cplusplus.com/reference/mutex/mutex/unlock/ or http://en.cppreference.com/w/cpp/thread/mutex/unlock explain what happens, in slightly different ways. I usually prefer the cppreference version, because it uses terminology from the standard more consistently, but there is no harm in reading multiple explanations about difficult concepts like these :)
I'd repeat the explanation here, but I think you'd best be served by reading one of the two links above.
I've tried installing Windows 7 on an old Dell laptop a while ago. I got it working eventually, but had to hunt around for drivers for various things -- rather important things, like network, and video. In the end, I had to persuade some download site to give me the Windows XP drivers for the video card, and it worked with that (which, btw, is pretty awesome).
Of course, this is just anecdote, just like any story about Linux not working immediately on some modern laptop is -- but my experience is that these kinds of issues are much rarer than 10 years ago. Especially with Linux (with which I have most experience), but also with Windows.
This was about people residing in the country illegally. Everyone understands the headline immediately, but it's still pretty ridiculous.
And that is the whole point of this article; there already is a lot of programming culture that we simply don't know about because those people don't hang out on HN. They deserve a StackOverflow, too :)
Just take a look at some simple examples in both, and you'll quickly see what I mean. Even though I'm a fan of OpenCL because it is available on more platforms, Cuda is a lot better suited as a learning platform.
<div style="margin:20px 10px 32px 0px;padding:0;background-color:#eeeeee;border-bottom:#cccccc 1px solid; width:220px; height:300px; background:url(images/print-int-2013.png) no-repeat; float:left;"><input name="cds_term_value" type="radio" id="radio" value="1" style="margin-top:138px;margin-left:10px;" /></div>
<div style="margin:20px 10px 32px 0px;padding:0;background-color:#eeeeee;border-bottom:#cccccc 1px solid; width:220px; height:300px; background:url(images/digital-int-2013-v2.png) no-repeat; float:left;"><input name="cds_term_value" type="radio" id="radio" value="2" CHECKED style="margin-top:138px;margin-left:10px;" /></div>
<div style="margin:20px 10px 32px 0px;padding:0;background-color:#eeeeee;border-bottom:#cccccc 1px solid; width:220px; height:300px; background:url(images/bundle-int-2013.png) no-repeat; float:left;"><input name="cds_term_value" type="radio" id="radio" value="3" style="margin-top:138px;margin-left:10px;" checked="" /></div>
The 'div' that you had checked earliers has an empty 'CHECKED' attribute, while the third one has the 'checked=""' that firefox apparently picks up.Oh come on. It's an evolution of what was there before; Palm OS was already very clearly moving in that direction. There is very little that is conceptually new in the first iPhone.
The execution was superb, and everyone certainly got shaken awake by the fact that that level of quality was even possible... but the core ideas were already there.
* what the compiler will enforce: this has nothing to do with thread safety, and will allow what you mention.
* what guarantees the standard library will give:
[17.6.5.9/3] A C++ standard library function shall not directly or indirectly modify objects (1.10) accessible by threads other than the current thread unless the objects are accessed directly or indirectly via the function’s non-const arguments, including this.
This means that the standard library assumes that your const objects will be thread safe in order to guarantee thread-safety itself. Updating a global without synchronization is not thread-safe.