以貌取人

Hi!我叫王迪詩,英文名Daisy,二十八歲。港大法律系畢業後,我再到英國倫敦大學修讀法律碩 士,回港後加入國際性律師行做律師,每兩年跳槽一次。我現在工作的這間firm以英國律師 主,所以像我這樣懂中英文的香港律師,在

Clever large integers

Where bitmap is a Python long, consider the innocent looking Pythonexpression:

bitmap = bitmap & ~(1L << bit)

This is the perfectly normal way of clearing a bit in a bitmap, soit looks like there's nothing peculiar going on here.

Except that Python longs are of indefinite (and theoretically infinite)length, and what makes this expression work in normal integers is thatthe two pieces have the same (finite) size. So Python is clearly notjust doing straight binary operations here


武打片.女人仔.廟街

Continue reading...

北京公幹之倒數篇

一連五日的北京公幹終於完成,辛苦工作的細節就不表了,說些開心事.
留在京城最後一晚,有幸出席了奧運倒數一周年的晚會.
說有幸,總對是事實,全國十幾億人,只有一萬人可以在天安門現場觀看倒數一周年的儀式和晚會
Continue reading...

A gotcha with the format of dump archives

Most archive formats, such as tarballs, cpio archives, and zip archives,interleave the file names (and their directory structure) with the filecontents. The dump filesystem backup program such as Solaris ufsdump do not. The dump archive format starts with an index that has all of thefilenames and the directory structure; after this comes the actual filecontent, labeled by inode number.

This has an important consequence for detecting damaged archives. In aninterleaved format like a tarfile, getting a full file listing requiresreading the


千世修來共枕眠

可記得,上一次你在男人臂彎中沉沉入睡是何時?

還記得,男人的體溫汨汨滲入你的髮膚的感覺?

既然安心將最軟弱的一面交托給男人,既然放心男人有大能遮風擋雨。

如果有一天他惹你生氣,只扁一扁嘴,然後微笑好嗎?

他等

小恙


Explaining some university staff peculiarities

I think that universities not having a return on investment as such may go at least part of the way to explain someweird university behaviors around staff. The core issue is that withoutan ROI it becomes difficult to see the cost of how staff spend theirtime.

(With a ROI for projects it is easy to see how having staff spend theirtime on a lower-ROI activity more or less directly costs you money.)

Not only does this effectively make staff into a constant sunk costregardless of what you have


轉貼王/流浪兒

關心皇后司法覆核的朋友,看電視新聞會擔心贏面,其實,不是的。這裡有司法覆核的主要理據。不單是為了皇后,也必是將來香港的保育工作的重要參考,大家都乘機充實下自己。




小低
轉貼本blog多次,也投桃報李轉貼番佢:


A surprise with the Provides header in RPM

Normally, one of the things RPM bases dependencies on is package names.The problem with doing only this is packages that want to depend oncapabilities instead of specific packages; for example, that there issome mailer installed, not specifically that Sendmail is installed. Todeal with this, RPM introduced the Provides: directive, which lets anRPM package tell the overall RPM system that it is providing somethingthat is not obvious from its name, its files, and so on.

In implementing this, RPM has chosen to