Emulating C structs in Python
One of the few data types from C that I miss when writing Python codeis struct s. The simplest replacement is dictionaries, but that meansyou have to write thing['field'] instead of thing.field . I can'tstand that (it's the extra characters).
If you want thing.field syntax in Python, you need an object. Thesimplest C struct emulation is just to use a blank object andset fields on it:
class MyStruct: passms = MyStruct(
Weekly spam summary on December 17th, 2005
To start with, Hotmail's numbers:
- 3 emails accepted from Hotmail, at least two of them likely spam.
- 263 messages rejected because they came from non-Hotmail emailaddresses.
- 106 messages sent to our spamtraps.
- 33 messages refused because their sender addresses had already hitour spamtraps.
- 6 messages refused due to their origin IP address (five for being inthe SBL, and one from Nigeria).
Despite all of these crappy numbers, we've determined that we get atleast
要臉不要臉
李明逵晚上聲稱, 拘留 在告士打道集結的900人。
被拘留期間, 被拘留人士載歌載舞,激叫口號 。打出來的電話說好開心。應該是世上最自由的被拘留人士。我們幾個兜了好多個圈,想盡辦法都進不去。應該是世上最想
你還有什麼辦法
是有的 。就
我不明白這些警察
我們幾個二十來歲的朋友,手持「香港警察
The problem of secrecy
The problem of secrecy is that it lets people hide their mistakes.People don't like admitting to mistakes, so if given a chance a fairnumber of people will actively hide them. And secrecy hides people'smistakes passively by preventing inspection of things.
Hidden mistakes cannot be corrected and cannot be learned from.Sometimes they become wrapped in layers of denial, preventing evenpeople in the know from doing anything, because to do something wouldbe to negate the denials.
Sometimes secrecy is passive, where people are
On the web, text colours are an all or nothing thing
Every so often I think about giving WanderingThoughts ' breadcrumbs barup at the top a background colour to make it stand out better (perhapsa nice yellow like Jakob Nielsen uses). Butevery time I've had that thought, I cringe at the amount of workinvolved and leave it alone.
It's a lot of work because on the web, there is no such thing asspecifying just one text colour property . I can't just specify thebackground colour for the breadcrumbs; I would have to
文輝出書
去年我也為另外兩位老友出書而寫文章,甚至當主持。
每次有這些事情,我們也會擔心被譏為小圈子。
不過,算了吧!出一本書會有人眼紅,不出書也會有人眼紅,澳門有很多人患有紅眼症,總希望全世界
同時讀好多本書
剛剛讀完的書
余就風<十兄弟>
企管隨筆是我喜歡讀的書,因為與我的生活息息相關,對照我的工作環境,處處有
文化,走出去!
要做