星期一, 1月 03, 2011
星期六, 12月 18, 2010
你要坐Bus(巴士)還是Benz(賓士),吃魚翅還是粉絲,都要自己負責。
香港電臺知名主持人梁繼璋曾給兒子寫過一封信,這封信很快流傳於各大網站,很多父親看後感觸很深,
我覺得不只給兒子,其實適合所有人看!
最喜歡最後一句"無論愛不愛,下輩子都不會再見",讓我想 起在美國上中國哲學課時老師常說的:
菩薩案前一爐香,修得來世鐵心腸,你能參得了嗎?
下輩子,無論愛與不愛,都不會再見----送給兒子的備忘錄
我兒:寫這備忘錄給你,基於三個原則:
(一)人生福禍無常,誰也不知可以活多久,有些事情還是早一點說好。
(二)我是你的父親,我不跟你說,沒有人會跟你說。
(三)這備忘錄裡載的,都是我經過慘痛失敗得回來的體驗,可以為你的成長省回不少冤枉路。
以下,便是你在人生中要好好記住的事:
(一)對你不好的人,你不要太介懷,在你一生中,沒有人有義務要對你好,除了我 和你媽媽。
至於那些對你好的人,你除了要珍惜、感恩外,也請多防備一點!
因為每個人做每件事,總有一個原因,他對你好,未必真的是因為喜歡你,請你必須搞清楚,而不必太快將對方
看作真朋友。
(二)沒有人是不可代替,沒有東西是必須擁有。看透了這一點,將來你身邊的人不再要你,或許失去了世間上最愛的一切時,
也應該明白,這並不是什麼大不了的事。
(三)生命是短暫的,今日你還在浪費著生命,明日會發覺生命已遠離你了。因此,愈早珍惜生命,你享受生命的日子也愈多,
與其盼望長壽,倒不如早點享受。
(四)世界上並沒有最愛這回事,愛情只是一種霎時的感覺,而這感覺絕對會隨時日、心境而改變。
如果你的所謂最愛離開你,請耐心地等候一下!讓時日慢慢沖洗,讓心靈慢慢沉澱,你的苦就會慢慢淡化。
不要過分憧憬愛情的美,不要過分誇大失戀的悲。
(五)雖然很多有成就的人士都沒有受過很多教育,但並不等於不用功讀書,就一定可以成功。
你學到的知識,就是你擁有的武器。人,可以 白手興家,但不可以手無寸鐵,謹記!
(六)我不會要求你供養我下半輩子,同樣地我也不會供養你的下半輩子,當你長大到可以獨立的時候,我的責任已經完結。
以後,你要坐Bus(巴士)還是Benz(賓士),吃魚翅還是粉絲,都要自己負責。
(七)你可以要求自己守信,但不能要求別人守信,你可以要求自己對人好,但不能期待人家對你好。
你怎樣對人,並不代表人家就會怎樣對你,如果看不透這一點,你只會徒添不必要的煩惱。
(八)我買了十多二十年六合彩,還是一窮二白,連三獎也沒有中,這證明人要發達,還是要努力工作才可以,世界上並沒有
免費午餐。
(九)親人只有一次的緣分,無論這輩 子我和你會相處多久,也請好好珍惜共聚的時光,下輩子,無論愛與不愛,都不會再見。
明天與意外不知誰先到,何不微笑過一天!
星期五, 12月 17, 2010
JavaScript detect OS version
OSName="Win 7";
else if ((OS.indexOf("Windows NT 6.0")!=-1))
OSName="Win Vista/Server 08";
else if (OS.indexOf("Windows ME")!=-1)
OSName="Win ME";
else if ((OS.indexOf("Windows NT 4.0")!=-1) || (OS.indexOf("WinNT4.0")!=-1) || (OS.indexOf("WinNT")!=-1))
OSName="Win NT";
else if ((OS.indexOf("Windows NT 5.2")!=-1))
- http://webcache.googleusercontent.com/search?q=cache:9Ri9Q_b_cq0J:douglubey.com/JavaScriptHowToDetectOperationSystemBrowserDivTags.aspx+javascript+detect+win7&cd=1&hl=zh-TW&ct=clnk&gl=tw
- http://douglubey.com/JavaScriptHowToDetectOperationSystemBrowserDivTags.aspx
- http://webcache.googleusercontent.com/search?q=cache:z0vQ777L3n4J:www.javascripter.net/faq/operatin.htm+java+script+OS+detect&cd=1&hl=zh-TW&ct=clnk&gl=tw
星期四, 12月 09, 2010
星期四, 12月 02, 2010
Force Download in Lighttpd
星期四, 11月 04, 2010
Precision and Recall
- Source = 被尋找的資料庫
- Target = 在 Source 內 某一種同類型的資料
- ALLFind = 找出來的所有資料
- GoldenFind = AllFind 裡跟 Target Match 的資料
- 跟 Source 多少一點關系都沒有。
- 找資來的資料,命中越高越好,如果找錯......只影響Precision,但至少保住了 Recall。
- 也就是說 Precison & Recall 都為1時最佳。.
- Precision = 1 比 Recall =1 簡單.
Recall = 400 / 500 = 80%
星期三, 11月 03, 2010
Frequently asked questions about basic auth
Frequently asked questions about basic auth
The following questions tend to get asked very frequently with regard to basic authentication. It should be understood that basic authentication is very basic, and so is limited to the set of features that has been presented above. Most of the more interesting things that people tend to want, need to be implemented using some alternate authentication scheme.
How do I log out?
Since browsers first started implementing basic authentication, website administrators have wanted to know how to let the user log out. Since the browser caches the username and password with the authentication realm, as described earlier in this tutorial, this is not a function of the server configuration, but is a question of getting the browser to forget the credential information, so that the next time the resource is requested, the username and password must be supplied again. There are numerous situations in which this is desirable, such as when using a browser in a public location, and not wishing to leave the browser logged in, so that the next person can get into your bank account.
However, although this is perhaps the most frequently asked question about basic authentication, thus far none of the major browser manufacturers have seen this as being a desirable feature to put into their products.
Consequently, the answer to this question is, you can't. Sorry.
星期二, 11月 02, 2010
- mkdir obj
- cd obj
- ../configure
- gmake
- gmake install
+#include "/usr/include/boost/cstdlib.hpp"
#include "sysc/utils/sc_report.h"
+using namespace std;


