My recent reading (procrastination) habits have changed.
I now frequent NachDenkSeiten, which is maintained by the authors of the recent German bestseller "Meinungs-Mache".
I wish to propagate this.
Talking to a student from China at my university, it came to him as a surprise that I mentioned I couldn't afford tution fees of 500 EUR per semester. About 1000 EUR per semester are the mean even for China. He countered "But Germany is rich!".
I too dream of going to that Germany someday. The link above contains hints on where it went off to.
2009年9月3日木曜日
2009年8月20日木曜日
Chinese Cheatsheet
The following is an excerpt from "Reform of the Chinese written language", Foreign Languages Press, Peking 1958.
Scheme for a Chinese phonetic alphabet
- In annotating the Chinese characters, the letters zh, ch and sh may be simplified as ẑ, ĉ and ŝ.
- Note 1. Seven categories of syllables as represented by the characters 知、蚩、詩、日、資、雌 and 思 take i as their vowel. They are spelt as zhi, chi, shi, ri, zi, ci and si respectively.
- Note 2. The sound êrh is spelt er. As a final, it is represented by r. Thus: ertong (兒童 children), huar (花兒 flower).
- Note 3. When used alone, the vowel e is spelt as ê.
- Note 4. Y is used as a semi-vowel in syllables beginning with i when not preceded by consonants. This: yi (衣), ya (呀), ye (耶), yao (腰), you (憂), yan (烟), yang (央), ying (英), yong (雍).
W is used as a semi-vowel in syllables beginning with u when not preceded by consonants. Thus: wu (烏), wa (蛙), wo (窩), wai (歪), wei (威), wan (弯), wen (温), wang (汪), weng (翁).
Y is used as a semi-vowel in syllables beginning with ü when not preeded by consonants. In this case the two dots above u are omitted. Thus: yu (迀), yue (約), yuan (寃), yun (暈).
In syllables beginning with the consonants j, q and x, the two dots above u are also omitted. Thus: ju (居), qu (区) and xu (虚). But in syllables beginning with the consonants n or l the two dots must be retained. Thus: nü (女), lü (呂). - Note 5. When preceded by consonants, iou, uei and uen are spelt as iu, ui and un. Thus: niu (牛), gui (旧), lun (論).
- Note 6. In annotating the Chinese characters, the letters ng can be simplified as ŋ.
2009年8月17日月曜日
Intelligent Design Sort
Introduction
Intelligent design sort is a sorting algorithm based on the theory of intelligent design.Algorithm Description
The probability of the original input list being in the exact order it's in is 1/(n!). There is such a small likelihood of this that it's clearly absurd to say that this happened by chance, so it must have been consciously put in that order by an intelligent Sorter. Therefore it's safe to assume that it's already optimally Sorted in some way that transcends our naïve mortal understanding of "ascending order". Any attempt to change that order to conform to our own preconceptions would actually make it less sorted.Analysis
This algorithm is constant in time, and sorts the list in-place, requiring no additional memory at all. In fact, it doesn't even require any of that suspicious technological computer stuff. Praise the Sorter!2009年8月12日水曜日
SimpleXPath
PHP's SimpleXML, although deficient when it comes to parsing tags within CDATA --
-- and interpreting invokation parameters --
-- well although deficient in these subjects, is still useful since it provides subtree-accessbility via Xpath - in a simplified form.
Task: find all Div-tags that belong to class "foo".
Xpath (2.0) does it like this:
This works error-free and result-free also in SimpleXML's Xpath implementation. However, this:
works as expected.
Thanks to dimuthu for poiting this out.
<div>Hello<em>World</em></div>
is found to have "World" emitted and "Hello" be put into CDATA.-- and interpreting invokation parameters --
simplexml_load_string( $xml, null, LIBXML_NOENT )
does nothing to disregard 'erroroneous entities' in <a href="my.php?a=1&b=2">
(&b is considered an entity and expected as &b;)-- well although deficient in these subjects, is still useful since it provides subtree-accessbility via Xpath - in a simplified form.
Task: find all Div-tags that belong to class "foo".
Xpath (2.0) does it like this:
//div[@class="foo"]
This works error-free and result-free also in SimpleXML's Xpath implementation. However, this:
//div[contains(@class,"foo")]
works as expected.
Thanks to dimuthu for poiting this out.
2009年8月6日木曜日
URI has an authority component
This morning I changed computers and got this warning from the GWT.
Problem was: I had accessed my workspace over a network-path containing a UNC-element (e.g.
Since I'll be using Eclipse over the same mount too, the other problem of having the AppEngine path stored in the workspace (and not being found when using an installation on another computer) is avoided as well.
Problem was: I had accessed my workspace over a network-path containing a UNC-element (e.g.
\\myserver\gwt-src
). Connecting the path to a driver letter on Windows worked fine.Since I'll be using Eclipse over the same mount too, the other problem of having the AppEngine path stored in the workspace (and not being found when using an installation on another computer) is avoided as well.
GWT & Eclipse samples import
My first try on GWT. Also my about-first on Eclipse. I heard it's good but found that SciTE started up much faster, so I stuck with it until now.
Figuring out how to open the samples.
Changing into the directories (
The real method is almost trivial (if you know Eclipse): create a new Java-project from the samples and then right-click Google -> WebToolkit Settings and enable it. Do not enable AppEngine on the Hello-Project.
Also described here: http://code.google.com/intl/de/eclipse/docs/existingprojects.html
Figuring out how to open the samples.
Changing into the directories (
C:\Programme\eclipse\plugins\com.google.gwt.eclipse.sdkbundle.win32_1.7.0.v200907291526\gwt-windows-1.7.0\samples\Hello
) and calling ant hosted
The real method is almost trivial (if you know Eclipse): create a new Java-project from the samples and then right-click Google -> WebToolkit Settings and enable it. Do not enable AppEngine on the Hello-Project.
Also described here: http://code.google.com/intl/de/eclipse/docs/existingprojects.html
登録:
投稿 (Atom)