網頁標準推的是 Semantic Markup ,也就是在你裝飾你的網頁前,應該先搞好網頁的結構,做好規劃工作。不過,很多人在開始寫網頁時,也只是打開 WYSIWYG 的編輯器,邊想要加什麼就加什麼。因為 WYSIWYG 所以在 Code level 是否 Semantic 對於用家來說根本看不見,
Iterator & Generator Gotchas
Python iterators are objects (or functions, using some magic) thatrepeatedly produce values, one at a time, until they getexhausted. Python introduced this general feature to efficientlysupport things like:
for line in fp.readlines(): ... do something with each line ...
Without iterators, .readlines() would have to read the entire fileinto memory, split it up into lines, and return a huge list; now, thiscode only has one line in memory at any given
AJAX vs Dialups
AJAX is short for 'Asynchronous Javascript And XML', the common termfor the technology behind highly interactive web sites like GoogleMaps and Google Mail. Given that the features AJAX enables (from thelarge to the small) are very appealing to designers, we're pretty muchguaranteed to see more and more use of it on web sites.
But please don't reach for AJAX too fast, because there is such athing as being too interactive.
AJAX's interactivity comes through communication, and communicationtakes
豪俾佢
做野!(請廣傳轉載乜都好)
《保衛一種不背棄弱勢社群的民主運動》聯署行動
--支持同志七一繼續牽頭
編按:發起團體將於六月十九日於西洋菜街行人專用區發表初步收集到的簽名人數,歡迎大家踴
無煙新世紀
深夜無線熱播的《創世紀之天地有情》,葉榮添自從許文彪死左之後,就將阿彪個「無煙城」計劃,當左做自己個仔一樣。當然,葉榮添自己,經常在窗明几淨的會議室煲煙(前兩晚先
痛到想死
話說落雨落到狗屎咁既朝早十點幾,我如常返工,o係出lift既時候,濕淋淋既地板令我腳底一滑,好一隻右腳腳指公踢左埋lift門邊
Putting a pleasant Python surprise to use
Although I've been programming in Python for a few years now, it keepssurprising me with little bits and pieces. Here's a neat Python languagefeature that I recently used for the first time (discovered originallythrough Bram Cohen's LiveJournal).
A common programming pattern is 'search for a something to work on, butstop if you don't find anything'. In Python one might write it somethinglike this (taken more or less from DWiki 's source):
found = False
Pitfalls in generating Last-Modified:
Every HTTP reply from a web server can include a Last-Modified: header, which theoretically tells interested parties when the web pagewas last modified. This is really something that works best when theweb server is just sending out static files; when it is generatingdynamic content, like DWiki does, things get interesting.
The major use of Last-Modified: is to decide when a browser already hasa current copy of the web page and doesn't need to fetch it again. Thus,with dynamic pages