A note about the ordering of mixin classes

In Python, when you have a class that inherits from both a primary classand some mixin classes (for example, if you're using the SocketServerstuff ),it's conventional to declare your class's inheritance list with theprimary class first:

class Real(primary, mixin1, mixin2):    ....

However, an important safety tip: if your mixin class overrides methodsof the primary class, it has to be first . Failure to observe thissafety tip can cause head


My zeroth law of compromised machines

If you can't find anything wrong, you haven't looked carefully enough.

The immediate corollary is also important:

If you can't find anything, the intruders are still there.

The leading cause for not finding anything wrong on a machine youknow is compromised is that you haven't detected the rootkit thatis hiding things from you.


浪漫與童話之間 — 宮崎駿 三鷹美術館

原先守護著天空之城的機械人,移居在此守候,感覺依然孤獨。

Continue reading...

太多文章把東西推下去了。

搬屋依舊進行中。

1. 皇后碼頭到底是怎樣!
暗地裡傷心。就算我們的櫈阻街,貼在牆上的照片和詩礙著誰了。乘機拆走,爛仔行逕。睇少幾日都唔得。

Continue reading...

搬家中一次過

1. 文明單位:賀歲片
嘉賓:卓男

看過了《心想事成》,才懂得慶幸自己愛的是周星馳。

2. 明報meanwhile斑駁日常(週四、五、六)

眾所

眾所周知,李義山以下的中國古典文學傳統裡,「無題詩」通常指愛情詩。「愛情」是「無」,


Fixing Python's string .join()

The thing that has always irritated me about string .join() is that itdoesn't stringify its arguments; if one of the things in the sequence tobe joined isn't a string, .join() doesn't call str() on it, it justpukes. This is periodically annoying and inconvenient.

It recently occurred to me that this can be fixed, like so:

class StrifyingStr(str):  def join(self, seq):    s2 = [str(x

The quick overview of DiskSuite failover

Solaris 8 DiskSuite does failover on disks (logical or otherwise), notfilesystems or partitions. Solaris then gives you up to seven partitionsper disk (technically you get eight, but DiskSuite takes one for itsmetadata); you then use these partitions as the building blocks formirrors, stripes, and filesystems.

Disks are grouped together into metasets, and one machine in yourfailover cluster owns each metaset at any given time and is the onlymachine allowed to do IO to any of its disks. As a consequence,


飲番杯冰凍啤酒……..

來到東京,我暫且要將釣魚台、三年零八個月、南京大屠殺等等國仇家恨拋諸腦後,因為看見的諸多事物與等等細節,都一一教我立即愛上。

沒辦法,飯,還是人家的較香。

沒十年,也起碼有八載沒來過日本。我不是購物狂,也


耐人尋味


放了幾天假

今日才認真讀報

在"明報"A6版讀到這則廣告

真不知道43年296日後那位何老先生看了廣告有何感想

世事紛擾

每個人都有自己的故事

謹以這則耐人尋味的廣告作為豬年的開端

Getting around LiveJournal's new minimum page width

LiveJournal recently started forcing at least some pages,such as the default style for individual entries , to have a minimum width.Worse, the forcing is done in such a way that text is wrapped to thewidth even if your browser is narrow, which makes the pages prettyunreadable. I noticed this change right away, because they picked aminimum page width that was somewhat larger than the width my browser isbasically fixed at.

Today I got irritated enough to do something about it. First I had tofind what