Given a set of countable sets , such that is totally ordered by inclusion, videlicet for every either or . Intuitively, for at every step in this chain one element at least must be added, one expects the set to be countable as well.
Suppose is countable. Then the union, is a countable union of countable sets, hence countable. (Suppose is an enumeration of and enumerations of the elements of the chain. Then enumerates .)
Thus is an upper bound of . In the poset of countable subsets of some set , of which is a subset, every non-empty chain has an upper bound. Hence, using Zorn’s lemma there is a maximal element, say .
Suppose is uncountable, then there exists a . is most definitely also countable and which contradicts ’s maximality. We are forced to conclude that there exists an uncountable chain of countable sets.
Cantor’s set theory keeps surprising.
: an example of such a chain is the set of the countable ordinals.
: a “more concrete” example are the downsets in without the empty set and itself. These downsets correspond to real numbers, see Dedekind Cuts.
Although I don’t bear any animosity against most dutch loanwords (except those Anglo-Saxon), the dictionary of the dutch Bond tegen Leenwoorden is a true joy to read.
Since yesterday I, for the first time, enjoy the anything-but-special age of 21 years.
Windows 7 Sins. I strongly agree with points 1, 3, 4, 5 and 6. The arguments for points 2 and 7 are a bit weak, but I do agree with the conclusions.
For the non US audience, it would have been nice to note that if Microsoft (or the US) would recall all foreign licenses for Windows, our entire government is crippled.
were both victim of a DDoS today. Silently, I always hoped that a really long-lasting one will convince them to put effort in a distributed scheme.
Maybe I should be waiting for another Wave.
The frontend for one of those boxes and the source code (see the
When I wanted to react to any changes to a
input textbox immediately, my first instrinct was to use
onChange, however, is called when the
input loses focus.
onKeyPress then? Isn’t called on backspaces.
onKeyDown, maybe? It does get called, but the effect of the keystroke isn’t yet applied, for the return value determines whether it that is done in the first place. (Same story for
onKeyPress by the way.)
onKeyUp does work a bit, except if someone is holding down a single key, for a while.
The solution: hook
onKeyUp and use
setTimeout with a timeout of 0. Yugh. I hate DOM.
: I actually tested this only on one browser.
When I want to generate usernames from real names, which can contain non-ascii characters, you can’t simply ignore the unicode characters. For instance, email@example.com is the right e-mail address for Daniëlle, firstname.lastname@example.org isn’t.
There’s trick. Unicode has got a single code for ë itself, but it has also got a code which (simplified) adds ¨ on top of the previous character. The unicode standard defines a normal form in which (at least) all such characters, which can be, are represented using such modifiers. If you then simply ignore the non-ascii representable codes, you’ll get the desired result.
unicodedata.normalize('NFKD', txt).encode('ASCII', 'ignore').
However, this isn’t the right solution. For instance, in german, one prefers ue as a replacement of ü over u.
for page in Page.objects.all():.
for comment in page.comments.all():
There will be a single query to fetch all pages, but there will be for every page another query to fetch its comments. Luckily, Django has got a nice trick up its sleave:
select_related. Would I use instead of
Page.objects.select_related('comments').all() then Django will use a single joined query to prefetch comments for each page.
select_related only supports forward one-to-many references. No many-to-many; certainly no reverce many-to-many; no reverse one-to-many and no, not even reverse one-to-one (yet). A developer claims it’s impossible (which is bullshit), another asks for patches, which means he doesn’t care doing it himself.
It’s quite easy to manually code around the missing reverse
select_related, but it takes too many ugly lines compared to the single word it could’ve been.
new Date(2009, 1, 1) represents the first of February 2009. Not the second of February nor the first of January. Why this stupidity?
is ugly, but is nice! The solution: prefix
In a few hours I’ll travel the short distance to Bruxelles to visit Fosdem. Once again I’m pretty excited :). Lets hope this time the pink elephants of the Delirium Cafe don’t crush me. If you’re also going, drop me a comment.
It’s soon. The 14th of februari, 00:31:30 (Europe/Amsterdam). Will the world end? Will ancient libc code giggle and break?
Some singletons eat slightly more resources, than you want to give them for free. For instance, if you have a home-brew threadpool singleton, you don’t want it to create its threads if you are not going to use it. The solution: a simple function that creates a stub which proxies attribute access to an ad-hoc created instance.
The sound and performance really aren’t that good, but the visual connection is so powerful:
Bach’s little fuge on a Music Animation Machine.
Yesterday we turned 20. I’ll miss that one.
Tomorrow morning, way too early, I’ll be leaving for the picturesque town of Wacken in the north of Germany to attend the Wacken Open Air festival. I’ll probably be back the third of august and recovered the fourth.
I’m having trouble with the wireless on my 3G iPhone. Either an action works perfectly (for instance downloading e-mail or visiting a website), or it will just time-out. I just jailbroke it and installed sshd. ssh-ing to my it via 3G miraculously works perfectly. However, when connecting to it via WiFi it’ll simply refuse data. That is, until you let the iPhone try to get data itself by for instance visiting a website. Then suddenly the ssh packets come through again. In the background (with screen) I’m running a very frequent ping to my local gateway which makes ssh work perfectly again via WiFi. A very unsatisfying hack.
It seems like an aggressive power safe on the WiFi.