Sorry

My recent leisure reading on apology brought back my memory of a long-run Blondie comic strip, in which Mr. Dithers decides to apologize to Dagwood for calling him a "dimwitted noodle brain." Dithers then apologizes by saying, "Dagwood, I'm sorry you're a dimwitted noodle brain" and declares that his conscience is clear because of his "heartfelt apology." (And no prizes for guessing that Mr. Dithers uses the words "I'm sorry" in the sense to express compassion

沽期金

portfolio 無謂公開,因為實情無貨在手,只有少少工行call輪和零碎股票。每出手就告訴大家好了。

上星期入了一張期指(恒指),一廂情愿的希望G20會有驚喜及人行會減息,結果當然是令人失望。所以今天就平了。

今天,沽了一張

程式數學題

最近發現一個叫 Project Euler 的網站,是一個數學問題的網站,特點是這些問題通常都要用程式解決,例如:

  • Add all the natural numbers below one thousand that are multiples of 3 or 5.
  • Find the largest prime factor of a composite number.
  • Find the only pythagorean triplet, {a,b,c}, for which a + b + c = 1000

這些程式


從舊男友中尋自己


有 時 會 回 想 與 前 男 友 的 往 事 , 不 是 為 了 懷 念 , 是 為 了 認 識 自 己 更 多 , 為 了 知 道 當 時 的 我 怎 會 讓 一 些 極 其 怪 異 的 事 件 發 生 。 無 可 否 認 , 有 些 怪 異 事 件 的 主 腦 是 我 , 有 些 卻 是 當 時 的 「 他 」 。 不 過 , 當 時 雙 方 都 是 當 局 者 , 所 以 迷 了 , 可

Checking systems with RPM verification (part 2)

There are at least two useful tricks beyond basic RPM verification that can be useful in some situations.

The first is that RPM's verification doesn't have to use the systemdatabase; instead it can get the MD5 checksums from a .rpm itself.This is done with ' rpm -V -p '. Naturally the .rpm had betterbe the same version that's installed, and of course prelinking isstill an issue if you don't trust the systemthat much.


A hint for email providers

Here is something that I shouldn't have to say to all sorts of emailproviders but apparently need to:

If someone says that you have spammed them, your first reaction shouldnot be to proclaim that you are a legitimate business (and that youdon't spam and that you have strong policies and so on); your firstreaction should be to profusely apologize and attempt to open a dialogso that you can fix the situation.

There are a number of reasons for this, assuming that you are a


嘻笑而不怒罵:談陶傑《恭敬有罪》


書名:恭敬有罪
作者:陶傑
出版:CUP

曾經有一段日子,我深深著迷於陶傑的專欄,每天都要讀他的文字,社會上發生的任何事都希望讀到他的意見。我喜歡陶傑不是出於個人崇拜,而是因為透過他在文章中的辛辣批判與嘻笑怒罵

你好嗎?





你好嗎?我很好。我很掛念你。




Getting Python's encoding and decoding straight

Because I have recently been confusing myself with this, and because itis not clearly documented in the Python standard library or the tutorial(at least not that I could spot):

  • .decode() decodes a plain string (ie, bytes in some encoding) toa Unicode string.
  • .encode() encodes a Unicode string into a plain string.

Feeding a plain string to the unicode() constructor is the same ascalling .decode() on the string.

Things get weird if you call .encode


流感中招

so sick....