嚇了一跳
How not to design an API (in C): the enum ordering mistake
Suppose that you are creating an API in C and that you have a returnvalue that is just right for an enum ; for example, it communicateseither 'all is okay' or some range of errors and exceptional conditions.Here's how not to write this API:
typedef enum { ERROR_1, ERROR_2, ERROR_3, ALL_OK } error_t;
You don't want to do this, because sooner or later you're going to wantto add another error
那一年,我二十歲
〈速寫之一:UC Berkeley校園〉
一陣清風
吹來廣場那邊的
一把略有走調的二胡
和幾個沒有和聲的口號
找一片樹蔭坐下
木板長凳上有裂紋和葉影
在樹蔭下看陽光
看你在陽光下找樹蔭
看樹蔭在陽光下等你
鐘樓又響了
我從來時的小徑走
那些松鼠仍在那
Allowing Organic Groups Administrators the Ability to Unpublish/Publish and Schedule Content
One requirement of the Archdiocese of St. Louis' website is that group administrators are able to publish and unpublish the content inside their groups, and they should also be able to schedule posts for automated publishing and unpublishing at a later time.
To do this, I used the following modules:
- OG User Roles
- Scheduler
- Publish Content
- [EDIT: I'm now using the Override Node Options module rather than Publish Content - it gives more fine-grained control over visibility of node form options.]
After enabling these modules,

Grasshopper
Anne Lamott wrote that it took years for her to discover that the first step in finding out the truth is to begin unlearning almost everything adults had taught her. I tried thinking of words that I told my little sister when she was young. And I did discover Anne Lamott is right.
One green spring afternoon, I'd been enjoying myself in the garden while my little sister waited for the surprise his brother brought home. I
Exceptions versus error return values
Python has two ways of signalling that a function has failed; you canraise an exception or return a special error value of some sort. I useboth techniques in different circumstances; since I've recently beenwriting some Python code, I've been thinking about exactly what thosecircumstances are, as far as I can tell.
(Self-analysis is tricky given that I don't particularly think throughthe choice when I'm making it; I handle errors however seems right forthe function I'
補上一筆
深宵抄歌詞時間 - 獨立宣言
哭過以後,抹走眼淚,跟自己說一句「喂! 小玲,堅強d丫」。
可以對所有的人好,但不可以隨便心軟,更永遠不可以容許自己軟弱。
如果不是憑著許多許多的小幸運,大概已經死了七