232 karma · joined April 20, 2009
I can imagine some poor developer, unable to figure out why it seems to always throw a StackOverflowException, putting that return statement in in frustration, and forgetting about it.
Facebook lighting is directly overhead; Windows 3.1 was off to the left a bit :)
It looks like it just uses the raw RGB values from the image, sampled in a 25x25 grid spanning the image. The orientation isn't random, but is chosen to avoid the sharper regions of the image, preferring to pick the points representative of smoother areas of colour.
>>> dis.dis(exec_code_object_and_return_x)
2 0 LOAD FAST 0 (codeobj)
3 LOAD_CONST 0 (None)
6 DUP_TOP
7 EXEC_STMT
3 8 LOAD_FAST 1 (x)
11 RETURN_VALUE
The interesting case is the second one, in which the compiled codeobj uses DELETE_NAME, which doesn't throw an error (if "del x" was in a function, it would use DELETE_FAST, which would throw an UnboundLocalError if it was used before x was assigned,) and the function then uses LOAD_FAST, which references the function argument directly, and so retrieves the value for return.By compiling and injecting bytecode like this, the program ends up using two different methods of variable access, which seem to sidestep each other completely.
1MB for 8192 identifiers (as opposed to 128K as strings, or 64K as ints) 384GB for 3 billion identifiers (rather than 38GB strings, or 19GB ints) 119GiB if 1 in 3 is unique (rather than 12GiB strings, or 6GiB ints)
6GiB is not a lot of RAM anymore.
50% is 50/100, or 0.5 of the whole
0.004% of the sky is 0.004/100, or 0.00004 of the whole sky.
In the US and Canada, I can't recall ever seeing anything more than a holstered pistol.
from menagerie.cat import models as cat_models
from menagerie.dog import models as dog_models
from menagerie.mouse import models as mouse_models
Because otherwise it doesn't match the code in the first example for #3, and also because if your packages are ordered that way, then why not just from menagerie.models import cat, dog, mouse
and forget about changing the local module name.No, that can't be right. I hope you're just misremembering that, but the whole problem with patent trolls is that you can't use your own portfolio for defense.
A large patent portfolio is a good weapon against other giants in your industry: IBM, Apple, Oracle, Google, (and once upon a time) Sun. Those people basically can't sue you for violating one of their patents if you have several thousand of your own: they're bound to be in violation of at least one of yours, and it's a mutually-assured-destruction scenario.
A patent troll, on the other hand, doesn't do anything. They can sue you with relative impunity, since there's almost no chance that they're doing anything that you can use against them. The size of your own patent portfolio doesn't even enter the picture.
That's what I was expecting -- I tried to search for "Martinez" and "Padbury"; two of the names prominently featured in the front page stories right now, and got a "0 results" page for both terms.
Based on this, the assumption seemed to be that SOPA passing would render DNSSEC effectively illegal within the US. Even if not actually illegal, it would be perceived as too-risky-to-implement by large corporations; effectively killing it.
The code is right there in the article -- in this case, for this specific kind of string, at the C level, they very clearly are null-terminated strings.
No, you don't get to see that at the Ruby level, it's all nicely abstracted away, but that is exactly what is happening inside the VM.
You also need to keep in mind that strings in Python 3 are Unicode-only, so much of the processing will be different. The equivalent to a Python 2.x string is called 'bytes'. It would be interesting to use this to compare string vs bytes performance under Py3k.
The one test which definitely will not work out-of-the-box is #3, for the reason above. "Character" arrays are now referred to as "byte" arrays, and you'll have to change array('c') to array('b') to get the original 8-bit behaviour, or to array('u') to use Unicode characters.
If you really need to just design the first screenful of a page in landscape orientation, then go ahead and draw a big horizontal line through the centre of the page -- label it "FOLD" if it helps, and just work on that screen.
From the original response: "In cleaning up spam on the old site we got a bit overeager and decided it wouldn't make sense to leave the broken remains."
I did notice this bit, though:
"Little Printer sits in your home, but it’s BERG Cloud that does the heavy lifting. Because publications are created in our cloud on the Web, not in your front room, we can offer more services for your Little Printer without the need for updates or a replacement product.
"BERG Cloud Bridge sits by your broadband router and wirelessly connects Little Printer to the Internet, which makes it easy for you to place Little Printer where you can see it."
And then I noticed the domain that this page is hosted at; the people who built the little bridge box are the same people who make the printer. So, it makes perfect sense to me that they would build devices that work together, on their own little network, if each promotes sales of the other. Not an odd choice at all.
Clearly, Canonical can't do anything right.
Oh, and also, Mint has had a huge rise in popularity at the same time, and, by the way, the graph shown in the article, in addition to any methodological flaws it may have, only shows relative numbers; Ubuntu drops from 11% down to something like 4%, but of what total? We have no idea from this graph whether there is an absolute drop or rise in the number of Ubuntu installs; only that Mint has taken off, relative to other distributions.
There's nothing in the data shown that ties this to Unity specifically, or even anything about Ubuntu itself. There have been hundreds of changes between 11.04 and 11.10, and the Linux landscape itself is changing at the same time. I don't see any firm data presented to blame the UI.
This should be a winning strategy, against two losing games. The key is that the odds in game B vary, and you structure your gameplay such that you're mostly playing game B when the odds are better than even.
Oh, and you'd likely be kicked out of any casino in Vegas for doing this.
map(functools.partial(operator.add,2), [1, 2, 3])
Contrast this with CVS, where I would have 1.124.1.1, 1.124.1.2, erc., and you would have 1.124.2.1, 1.124.2.2, or with Subversion, where I might get revisions 125, 128, and 129, while the server gave your commits #124, 127 and 130, and someone else, on a totally different part of the project got #126.
As long as development proceeds linearly, on a single branch, then yeah, it's about the save as revision numbers in a centralized RCS -- once you start branching and merging, though, it represents a different concept entirely.