Mittwoch, 31. Dezember 2008

Sonntag, 28. Dezember 2008

推薦: <<柏楊曰─讀通鑑‧論歷史>>

推薦: <<柏楊曰──讀通鑑‧論歷史>>

http://nrch.cca.gov.tw/ccahome/website/site4/BY_Collect/b9000e0/cca220003-li-wpkbbyb9000e0toc-0000-u.html

柏楊
  常常被問起一個問題:讀歷史,人能够從中取得教訓嗎?

  我在1998年7月台北遠流出版公司出版的《柏楊曰》第一集序中曾説:歷史的教訓,因為人類的健忘和野心家的篡改,而微乎其微……現在我補充:原因是經驗無法傳承,事非經過 不知難。這是上帝創造人類開的一項最大的玩笑。

盡管人性古今一致、中外不分,可是每一個人的生存基因中都同様有非常頑强的自我毁滅因子,既無法從歷史借鏡, 也很不容易自我克制。世界文明能向前邁進一步,才會有這麽艱巨的工程,這裏面牽涉到大自然的生態環境、牽涉到國民性與文化的累積,更决定于一個族群政策與 制度的抉擇。文明的更上層樓,是一個民族救危存亡的裏程碑。

   歷史的功能如果純粹從以上的角度來衡量,不但可讀性大减,連值不值得書寫都令人質疑。事實上,歷史的借鏡固然微弱,但,人類的歷史實在是世界進化的卷 標,讓你知道我們從怎麽様的原點出發,歷經的路程以及終將要奔赴的方向。如果没有歷史,人類的生存就茫茫無所歸依,所有生存中的顛簸、匍匐、挣扎、奮鬥都 是汹涌波濤中的一葉扁舟,没有舵手,也没有彼岸。

從這個角度認知,歷史的功能就不同于“使用手册”,它不可能告訴你如何開機、如何操作、如何修復、如何换 新零件……但,却是整個世界的文明生産制作不可或缺的原創力。

 中國是世界文明古國之一,有綿長豐富的歷史,在整個世界文明發展的進程中,她不只是汪洋大海中的一葉扁舟,簡直是一艘驚動四海的航空母艦。人類能不能振 衰起弊,和中國歷史能不能創造新猷息息相關。

可是,中國歷史上封建制度太長,暴君暴行接連不斷。人民唯一能期待的就是遇到“明君”“以德化民”,這實在是 天大的騙術。可憐,我們善良的人民幾千年來都眼巴巴地在被剮、被殺、被黥、被刖、被磔……之餘,叩首仰望“明君”由天而降。

   我用《柏楊曰》來讀歷史、提出我對傳統歷史不同角度的分析和批判,除了鍛練自己誠實面對自己國家的歷史之外,也要設法使讀歷史的人擺脱以往士大夫 附庸權貴,為執掌大權的皇帝老爺張目、護短,甚至為他們的酷虐暴行提供最没有良心的 合理化理論的習行。

我仍然要説我的史觀,未必能掌握歷史的全貌,而我擺脱傳統文化的包袱,不為君王唱贊美歌,而只為蒼生、為一個“人”的立場和尊嚴,説“人”話,從“以人為本”的角度來重新審視歷史。
  
2006年9月于台北



Samstag, 27. Dezember 2008

一 代 AV 天 后 飯 島 愛 陳 屍 香 閨

一 代 AV 天 后 陳 屍 香 閨
飯 島 愛 離 奇 死 (25 Dec 2008)

蘋果日報 :【 本 報 訊 】 飯 島 愛 , 一 個 「 三 十 世 代 」 開 外 男 性 都 不 會 忘 記 的 名 字 。 她 有 天 使 面 孔 、 魔 鬼 身 材 , 在 無 數 AV ( 成 人 電 影 ) 中 身 演 出 , 之 後 更 打 破 壁 壘 , 成 為 首 位 成 功 打 入 藝 能 界 殿 堂 的 AV 女 優 , 在 AV 界 寫 下 一 個 經 典 傳 奇 。 然 而 , 這 位 一 代 AV 天 后 昨 日 被 發 現 陳 屍 香 閨 , 懷 疑 自 殺 , 短 短 36 年 的 生 命 坎 坷 到 底 。

http://www1.appledaily.atnext.com//template/apple/art_main.cfm?iss_id=20081225&sec_id=4104&subsec_id=11866&art_id=12013871



Donnerstag, 25. Dezember 2008

EE4206/EE5806 Digital Image Processing

EE4206/EE5806 Digital Image Processing

Chapte 3 : Intensity Transformations and Spatial Filtering

main points

1.Basic Intensity Transformation Functions

- Image Negatives
- Log Transformation
- Power-Law (Gamma) Transformation
- Piecewise-Linear Transformation Functions

2. Histogram Processing

- Histogram Equalization
- Histogram Matching (Specification)
- Local Histogram Processing
- Using Histogram Statistics for Image Enhancement

3. Spatial filtering

- Spatial Correlation and Convolution
- Vector Representation of Linear Filtering
- Generating Spatial Filter Masks

4. Smoothing Spatial Filters

- Order-Statistic (Nonlinear)Filters

5. Sharpening Spatial Filters

- Using the Second Derivative for Image Sharpening -The Laplacian
- Unsharp Masking and Highboost Filtering
- Using first-Order Derivative for (Nonlinear) Image Sharpening -The Gradient



Montag, 22. Dezember 2008

推薦:黃堅--《思想門--先秦諸子解讀》

推薦:黃堅--《思想門--先秦諸子解讀》


本書是對孔子、孟子、莊子、墨子、韓非、蘇秦 的一次充滿力量與冒險的解讀。 文章不拘學院套路,另開闡釋法門,演練了一場先秦諸子與當今社會風氣相互激蕩、生發的實驗。

孔子是否“打劫”了儒者? 儒學在現實生活中是利還是弊?
蘇秦的一生是 ”無間道” ?!

徹底廢棄 “儒學”, “國學” 復興才有希望。

在作者筆下,孔子童心未泯、風趣搞怪,孟子是個很不好說話的人,而韓非子則是“三重棄兒”,蘇秦的一生是“一場玩笑”。

作者追溯了“儒”的起源,並提出: 只有徹底廢棄 “儒學”,“國學”復興才有希望——“將蒙在中華文明美味湯麵上的儒學油垢,一撇而盡。讓每一個獨立、真實的生命體,直接照射在二十一世紀的陽光下。”

http://www.cp1897.com.hk/product_info.php?BookId=9789620427480



Samstag, 20. Dezember 2008

陰符經注解序

陰符經注序

  陰符經三百餘字,其言深奧,其理精微,鑿開混沌,剖析鴻蒙,演造化之秘,闡性命之幽,為古今來修道第一部真經。唐陸龜蒙謂黃帝所著,宋陳淵謂黃帝受於廣成子,朱文公亦謂黃帝著,邵堯夫謂戰國時書,程伊川又謂非商末即週末時書。其說紛紛,各述所知,究無定見。以予論之,世皆傳為黃帝陰符經,丹經子書,俱謂陰符經系黃帝所作,考之文字,始於黃帝,興于唐虞夏商,或者黃帝撰作,口口相傳,不記文字,後世成真仙侶,筆之於書,流傳世間,亦未可定。

就其世傳之說,丹經之載,謂黃帝著之,亦無不可,但此書沿訛已久,苦無善本,字句差錯者極多,或借驪山老姥百言演道、百言演法、百言演術之說,紊亂聖道,以盲引盲;更有借伊呂張果子房孔明注語欺世惑人者,似此魚目混珠,指鹿為馬,大失真經妙旨。予於乾隆四十四年,歲次己亥,於南台深處,取諸家注本,校正字句,細心斟酌,略釋數語,述其大意,掃邪救正,以破狂言亂語之弊,高明者自能辨之。

  時大清嘉慶三年歲次戊午九月九日 棲雲山 素樸散人悟元子 劉一明 敘於 自在窩中



陰符經注解跋

  陰符經者,黃帝演道書也。而談兵之家,視為天時孤虛旺相之理,人事進退存亡之因,即緇黃之流,淺窺聖經,謬為注疏者亦不少,不幾誤璞為鼠,以青作黃乎?我悟元老師,造性命之精,證天人之奧,體古聖覺世之婆心,思發其覆,憫後學窮理而無門,詳為之解,掃諸說之悖謬,詮陰符之肯綮,其中盡性至命之學,有為無為之理,靡不詳明且備,將數千年埋沒之陰符,至今原旨畢露,而無餘蘊矣。經雲:觀天之道,執天之行,盡矣。僕則曰:聖經之精,聖道之微,盡矣。

  大清嘉慶三年歲次戊午九月九日 受業門人 王附青 雲峰甫 沐手敬題 軒轅黃帝著
  洮陽門人 張陽全 校閱
  悟元子 劉一明 注
  後學 陶鑄靈 重刊

  陰者,暗也,默也,人莫能見,莫能知,而己獨見獨知之謂;符者,契也,兩而相合,彼此如一之謂;經者,徑也,道也,常也,常行之道,經久不易之謂。陰符經即神明暗運,默契造化之道。默契造化,則人與天合,一動一靜,皆是天機,人亦一天矣。上中下三篇,無非申明陰符經三字,會得陰符經三字,則三篇大意可推而知矣。



1. 上篇

  1.1 觀天之道,執天之行,盡矣。

  性命之道,一天道也。天之道,陰陽之道耳。修道者能知天道之奧妙,而神明默運,竊陰陽之氣,奪造化之權,可以長生不死,可以無生無死,然其最要處,則在能觀能執耳。何謂觀?格物致知之為觀,極深研幾之為觀,心知神會之為觀,迴光返照之為觀,不隱不瞞之為觀;何謂執?專心致志之為執,身體力行之為執,愈久愈力之為執,無過不及之為執,始終如一之為執。

觀天道,無為之功,頓悟也,所以了性;執天行,有為之學,漸修也,所以了命。能觀能執,用陰陽之道以脫陰陽,依世間法而出世間,性命俱了,心法兩忘,超出天地,永劫長存,只此二句,即是成仙成佛之天梯,為聖為賢之大道,外此者,皆是旁門曲徑,邪說淫辭,故曰盡矣。
 
 1.2 天有五賊,見之者昌。

  五賊者,金木水火土也。天以陰陽五行化生萬物,氣以成形,而人即受此氣以生以長,但自陽極生陰,先天入於後天,五行不能和合,自相賊害,各一其性,木以金為賊,金以火為賊,火以水為賊,水以土為賊,土以木為賊,是謂天之五賊也。惟此五賊,百姓日用而不知,順行其氣,以故生而死,死而生,生死不已。若有見之者,逆施造化,顛倒五行,金本克木,木反因之而成器;木本克土,土反因之而生榮;土本克水,水反因之而不泛;水本克火,火反因之而不燥;火本克金,金反因之而生明;克中有生,五賊轉而為五寶,一氣混然,還元返本,豈不昌乎!
 
1.3 五賊在心,施行於天。宇宙在乎手,萬化生乎身。

  人秉五行之氣而生身,身中即具五行之氣。然心者身之主,身者心之室,五賊在身,實在心也。但心有人心道心之分;人心用事,則五賊發而為喜怒哀樂欲之五物;道心用事,則五賊變而為仁義禮智信之五德。若能觀天而明五行之消息,以道心為運用,一步一趨,盡出於天而不由人,宇宙雖大,如在手掌之中;萬化雖多,不出一身之內;攢五行而合四象,以了性命,可不難矣。
 
1.4 天性,人也。人心,機也。立天之道,以定人也。

  天性者,天賦之性,即真如之性,所謂真心,不識不知,順帝之則,而人得以為人者是也;人心者,氣質之性,即知識之性,所謂機心,見景生情,隨風揚波,而人因之有生有死者是也。天性者,天機,即是天道;人心者,人機,即是人道。守天機者存,順人機者亡。惟大聖人觀天道,執天行,中立不倚,寂然不動,感而遂通,修真性而化氣性,守天道而定人心,不使有一毫客氣雜於方寸之內也。

 1.5 天發殺機,移星易宿;地發殺機,龍蛇起陸;人發殺機,天地反覆;天人合發,萬化定基。

  殺機者,陰肅之氣,所以傷物也;然無陰不能生陽,非殺無以衛生,故天之殺機一發,則周而復始,而星宿移轉,斗柄回寅;地之殺機一發,則剝極而複,龍蛇起陸,靜極又動;惟人也亦俱一天地也,亦有此陰陽也,若能效天法地,運動殺機,則五行顛倒而地天交泰,何則?人心若與天心合,顛倒陰陽只片時。天時人事合而一之,則萬物變化之根基即於此而定矣。中庸所謂致中和,天地位焉,萬物育焉者,即此也。
  
1.6 性有巧拙,可以伏藏。

  人秉陰陽之氣以成形,具良知良能以為性,性無不善,而氣有清濁。秉氣清者為巧,秉氣濁者為拙。性巧者多機謀,性拙者多貪癡。巧性拙性皆系氣質之性,人心主事,非本來之天性。修真之道,采先天,化後天,而一切巧拙之性,皆伏藏而不用矣。

 1.7 九竅之邪,在乎三要,可以動靜。

  九竅者,人身上七竅,下二竅也;三要者,耳目口也。人身九竅皆受邪之處,而九竅之中,惟耳目口三者為招邪之要口,耳聽聲則精搖,目視色則神馳,口多言則氣散,精氣神一傷,則全身衰敗,性命未有不喪者。人能收視,返聽,希言,閉其要口,委志虛無,內念不出,外念不入,精氣神三品大藥凝結不散,九竅可以動,可以靜,動之靜之,儘是天機,並無人機,更何有邪氣之不消滅哉!
 
1.8 火生於木,禍發必克;奸生於國,時動必潰。知之修煉,謂之聖人。

  火喻邪心,木喻性,奸譬陰惡,國譬身。木本生火,火發而禍及木,則木克;邪生於心,邪發而禍及心,則性亂;國中有奸,奸動而潰其國,則國亡;陰藏於身,陰盛而敗其身,則命傾;身心受累,性命隨之,於此而知潛修密煉,觀天道,執天行,降伏身心,保全性命,不為後天五行所拘者,非聖人其誰與歸?
  
1.9 天生天殺,道之理也。

  天道陰陽而已,陽主生,陰主殺,未有陽而不陰,生而不殺之理。故春生夏長秋斂冬藏,四時成序,周而復始,迴圈不已,亙古如是也。




2. 中篇

  2.1 天地,萬物之盜;萬物,人之盜;人,萬物之盜。三盜既宜,三才既安。故曰:食其時,百骸理;動其機,萬化安。

  天以始萬物,地以生萬物,然既生之,則又殺之,是天地即萬物之盜耳;世有萬物,人即見景生情,恣情縱欲,耗散神氣,幼而壯,壯而老,老而死,是萬物即人之盜耳;人為萬物之靈,萬物雖能盜人之氣,而人食萬物精華,借萬物之氣生之長之,是人即萬物之盜耳。大修行人,能奪萬物之氣為我用,又能因萬物盜我之氣而盜之,並因天地盜萬物之氣而盜之,三盜歸於一盜,殺中有生,三盜皆得其宜矣。三盜既宜,人與天地合德,並行而不相悖,三才亦安矣。三才既安,道氣長存,萬物不能屈,造化不能拘矣。

然此盜之秘密,有一時之功,須要不先不後,不將不迎,不可太過,不可不及,坎來則離受之,彼到而我待之,陽複以陰接之,大要不失其時,不錯其機,故曰,食其時,百骸理,動其機,萬化安。食其時者,趁時而吞服先天之氣也;動其機者,隨機而扭轉生殺之柄也。

食時則後天之氣化,百骸皆理,可以全形;動機則先天之氣複,萬化俱安,可以延年。時也機也,難言也。要知此時即天時,此機即天機,苟非深明造化,洞達陰陽者,烏能知之?噫!八月十五翫蟾輝,正是金精壯盛時,若到一陽才起處,便宜進火莫延遲。

  2.2 人知其神而神,不知不神之神而所以神。

  古今學人,皆認昭昭靈靈之識神,以為本來之元神,故著空執相,千奇百怪,到老無成,有死而已,殊不知此神為後天之神,而非先天之神,乃神而實不神者。先天之神,非色非空,至無而含至有,至虛而含至實,乃不神之神,而實至神者。奈何世人只知後天之神而神,甘入於輪回,不知先天不神之神,能保乎性命,無怪乎萬物盜我之氣而罔覺也。

  2.3 日月有數,小大有定,聖功生焉,神明出焉。其盜機也,天下莫能見,莫能知。君子得之固窮,小人得之輕命。

  人之所以能盜天地萬物之氣者,以其天地萬物有定數焉;天地萬物不能盜人之氣者,以其聖道無形無象焉。如日月雖高,而有度數可推,日則一年一周,天有春夏秋冬之可見;月則三十日一周,天有盈虛朔望之可窺,大為陽,小為陰,陽極則生陰,陰極則生陽,大往小來,小往大來,陰陽迴圈,乃一定不易之道。至人於此推陰陽造化之消息,用功於一時辰內,采鴻蒙未判之氣,以為丹母,奪天地虧盈之數,以為命基,先天而天弗違,後天而奉天時,聖功於此而生,神明於此而出,此功此明,其盜機也,雖天鬼神不可得而測度,而況於人乎!

天下烏得而見,烏得而知?如其能見能知,安能盜之?此其所以為聖,此其所以為神。是道也,非忠臣孝子大賢大德之人不能知,非烈士丈夫俯視一切萬有皆空者不能行。果是真正修道君子,得意忘言,大智若愚,大巧若拙,不到了性了命之後,不肯洩漏圭角,固窮而如無知者也。至於薄福小人,偶嘗滋味,自滿自足,又不自重性命,無而為有,虛而為盈,約而為泰,適以自造罪過,非徒無益,而又害之矣。



3. 下篇

  3.1 瞽者善聽,聾者善視。絕利一源,用師十倍。三返晝夜,用師萬倍。 

 瞽者善於聽,非善聽也,以目無所見,而神藏於耳,故其聽也聰;聾者善於視,非善視也,以耳無所聞,而氣運於目,故其視也明。即此二者以觀,閉目而耳聰,塞耳而目明,況伏先天之氣,舍假修真,存誠去妄者,何患不能長生乎?清靜經曰:眾生所以不得真道者,為有妄心;既有妄心,即驚其神;既驚其神,即著萬物;既著萬物,即生貪求,即是煩惱,煩惱妄想,憂苦身心,便遭濁辱,流浪生死,常沉苦海,永失真道。

妄想貪求,乃利之源也,人能絕此利之一源,則萬有皆空,諸慮俱息,勝於用師導引之功十倍,又能再三自返,存誠去妄,朝乾夕惕,晝夜殷勤,十二時中,無有間斷,漸歸於至善無惡之地,勝於用師導引之功萬倍。蓋師之功,能革其面,而不能革其心;能與人規矩,而不能使人巧;絕利自返,正心地下功,戒慎恐懼於不睹不聞之處,師力焉得而及之?至聖雲:一日克己復禮,天下歸仁焉。為仁由己,而由人乎哉?正此節妙諦。

 3.2 心生於物,死於物,機在目。

  心如主人,目如門戶。本來真心,空空洞洞,無我無人無物,與太虛同體,焉有生死,其有生死者,後天肉團之心耳。心不可見,因物而見,見物便見心,無物心不現。是主人或生或死,物生之,物死之,其所以使物生死心者,皆由目之開門揖盜耳。蓋目有所見,心即受之,是心生死之機,實在目也。人能返觀內照,外物無由而受,生死從何而來?古人雲:滅眥可以卻老,此至言也。

 3.3 天之無恩,而大恩生。迅雷烈風,莫不蠢然。至樂性餘,至靜性廉。

  天至高而萬物至卑,天與物相遠,似乎無恩於物矣。殊不知無恩之中而實有大恩生焉。天之氣鼓而成雷,噓而成風,迅雷震之而萬物發生,烈風吹之而萬物榮旺。發生榮旺,萬物皆蠢然無知,出於自然,此無恩而生大恩,天何心哉?故至樂者,萬物難屈,無拘無束,性常有餘;至靜者,萬物難移,無貪無愛,性常廉潔。樂者無心於余而自餘,靜者無心於廉而自廉,亦如天之無恩而有大恩。無心之用,神矣哉!

 3.4 天之至私,用之至公,禽之制在氣。

  天之道行於無象,運於無形,為物不貳,其至私與。然其四時行而萬物生,其用又至公焉。推其奧妙,其一氣流行,禽制萬物乎?禽者,擒也,統攝之謂;制者,造作之謂;言統攝萬物,製造萬物,在乎一氣也。一氣上升,萬物皆隨之生長,一氣下降,萬物皆隨之斂藏,生長斂藏,總是一氣擒制之,一本散而為萬殊,萬殊歸而為一本。私而公,公而私,非私非公,即私即公,一氣流行,迴圈無端,活活潑潑的也。

3.5  生者死之根,死者生之根。恩生於害,害生於恩。

  天道生物,即是一氣。上下運用一氣,上為陽,下為陰。陽者,生也,恩也;陰者,死也,害也。然有生必有死,有死必有生,是生以死為根,死以生為根也;有恩必有害,有害必有恩,是恩在害生,害在恩生也。若人死裏求生,則長生而不死,人能害裏尋恩,則有恩而無害,出此入彼,可不慎乎!

  3.6 愚人以天地文理聖,我以時物文理哲;

  愚人不知生死恩害,是天地造化迴圈之秘密,直以天地文理為聖矣。我則謂天文有象,地理有形,著之於外者,可見可知,未足為天地之聖。若夫時物之文理,無象無形,乃神運之道,藏之於內者,不可見,不可知,正天地之所以為哲也。蓋物有時而生,有時而死。當生之時,時生之,不得不生;當死之時,時死之,不得不死。生者,恩也,死者,害也,生而死,死而生,恩而害,害而恩,生死恩害,皆時運之,亦無非天地神道運之。天地神道不可見,因物以見之,觀於物之生死有時,而天地神道之明哲可知矣。

 3.7 人以愚虞聖,我以不愚虞聖;人以其奇期聖,我以不奇期聖。

  性命之道,始於有作人難見,及至無為眾始知。故古來修真上聖,當有作之時,黜聰毀智,韜明養晦,斡天關,回斗柄,采藥物於恍惚杳冥之鄉,行火候於無識無知之地,委志虛無,神明默運,雖天地鬼神,不可得而測度,而況於人乎?乃人不知其中奧妙,或以愚度聖人,彼豈知良賈深藏,若虛而實有,不愚之運用乎?當無為之時,和光同塵,積功修德,極往知來,一叩百應,神通廣大,智慧無邊,而人或以奇期聖人,彼豈知真常應物,而實非奇異之行藏也。聖人不愚,亦如時物文理之哲,聖人不奇,亦如天地文理不聖。聖人也,所參天地之化育,而德配天地者也。

  3.8沉水入火,自取滅亡。

  人之慳貪恩愛,如水淵也;酒色財氣,如火坑也。一切常人,不窮天地造化之道,不究聖功性命之學,自暴自棄,以假為真,以苦為樂,沉於水淵而不知,入於火坑而不曉,自取滅亡,將誰咎乎?

3.9  自然之道靜,故天地萬物生。天地之道浸,故陰陽勝。陰陽相推,而變化順矣。

  大道無形,生育天地;大道無名,長養萬物。無形無名,自然至靜之道。然靜者動之基,靜極而動,天地萬物即於此而生焉。一生天地,而天地即得自然之道以為道,故天地之道浸。浸者,浸潤漸入之謂,亦自然之義。惟其浸潤自然,動不離靜,靜不離動,一動一靜,互為其根,故陰陽勝。動為陽,靜為陰,動極而靜,靜極而動,陰極生陽,陽極生陰,陰陽相推,四時成序,萬物生成,或變或化,無不順之,造物者豈有心於其間哉?蓋以自然之道無形,無形而能變化,是以變化無窮也。

  3.10 是故聖人知自然之道不可違,因而制之。至靜之道,律曆所不能契。爰有奇器,是生萬象,八卦甲子,神機鬼藏。陰陽相勝之術,昭昭乎進於象矣。 

 聖人者,與天地合其德者也。惟與天地合德,故不違天地自然之道,因而裁制變通,與天地同功用。何則?自然之道,非色非空,至無而含至有,至虛而含至實,有無兼該,虛實並應者也。故以言其無,則虛空一氣,無聲無臭,其為道也至靜,靜至於至,雖律曆之氣數,有所不能契。夫律曆能契有形,不能契無形,至靜則無形矣,律曆焉得而契之?[囟/比]陵師所謂有物先天地,無名本寂寥者是也。以言其有,則造化不測,包羅一切,其為器也最奇,器至於奇,是謂神器。神也者,妙萬物而為言者也。

故萬象森羅,八卦相湯,甲子迴圈,神之伸機,鬼之屈藏,無不盡在包容之中。[囟/比]陵師所謂能為萬象主,不逐四時凋者是也。靜道者,無名天地之始;神器者,有名萬物之母。老子所謂無欲以觀其妙者,即觀其始也;有欲以觀其竅者,即觀其母也。非有不能成無,非觀竅難以觀妙。觀妙之道,萬有皆空,無作無為;觀竅之道,陰陽變化,有修有證。

聖人不違自然之道,因而制之,觀天道,執天行,從後天中返先天,在殺機中盜生機,顛倒五行,逆施造化,以陰養陽,以陽化陰,陽健陰順,陰陽混合,由觀竅而至觀妙,由神器而入至靜,由勉強而抵自然,有無一致,功力悉化,陰陽相勝之術,昭昭乎進於色象之外矣。要知此術非尋常之術,乃竊陰陽、奪造化之術,乃轉璿璣、脫生死之術。

昔黃帝修之,而乘龍上天;張葛許修之,而超凡入聖;以至拔宅者八百,飛升者三千,無非由此道而成之。籲!陰符經三百餘字,句句甘露,字字珠玉,示性命不死之方,開萬世修真之路,天機大露,後世丹經子書,雖譬喻千般,無非申明陰陽相勝之術,有志者若見此經,誠心敬閱,求師一訣,倘能直下承當,大悟大徹,勤而行之,以應八百之讖,有何不可?



城大PCLL-Law 扣起1分肥你全個programme?

城大PCLL-Law 扣起1分肥你全個programme?

http://www.inmediahk.net/node/1001815




黃帝陰符經

黃帝陰符經

全書只有457字,共分三章。

1. 上篇——論道
2. 中篇——論法
3. 下篇——論術


上篇

  觀天之道,執天之行,盡矣。故天有五賊,見之者昌。五賊在乎心,施行乎天。宇宙在乎手,萬化生乎身。天性,人也。人心,機也。立天之道,以定人也。天發殺機,天地反覆。天人合發,萬化定基。性有巧拙,可以伏藏。九竅之邪,在乎三要,可以動靜。火生於木,禍發必克。奸生於國,時動必潰。知之修煉,謂之聖人。

中篇

  天生天殺,道之理也。天地,萬物之盜;萬物,人之盜;人,萬物之盜。三盜既宜,三才既安。故曰:食其時,百骸理;動其機,萬化安。人知其神而神,不知其不神之所以神也。日月有數,大小有定,聖功生焉,神明出焉。其盜機也,天下莫能見,莫能知。君子得之固躬,小人得之輕命。

下篇

  瞽者善聽,聾者善視;絕利一源,用師十倍;三反晝夜,用師萬倍。心生於物,死於物,機在於目。天之無恩而大恩生,迅雷烈風,莫不蠢然。至樂性餘,至靜性廉。天之至私,用之至公,禽之制在氣。生者死之根,死者生之根。恩生於害,害生於恩。愚人以天地文理聖,我以時物文理哲。人以虞愚聖,我以不虞愚聖。人以期其聖,我以不期其聖。故曰:沉水入火,自取滅亡。自然之道靜,故天地萬物生。天地之道浸,故陰陽勝。陰陽相推,而變化順矣。是故聖人知自然之道不可違,因而制之。至靜之道,律歷所不能契。爰有奇器,是生萬象。八卦甲子,神機鬼藏。陰陽相勝之術,昭昭乎進乎象矣。

http://baike.baidu.com/view/263384.htm



Donnerstag, 18. Dezember 2008

倪震宣布與周慧敏結婚

倪震宣布與周慧敏結婚

(明報)12月19日(2008) 星期五 00:05

成為城中話題的倪震 與周慧敏 戀情峰迴路轉,倪震下午2時許向傳媒表示,已跟周慧敏申請註冊結婚。

倪震的聲明全文如下:

「動搖過,才懂得堅定;失去過,才學會珍惜。一場風波,令我們更了解互相的愛;四方壓力,使我們更體會到彼此的不可分割。試煉,成就了信心。慧敏答應嫁給我了,我們已申請註冊結婚。祝福我們吧。」



Geertz--Local Knowledge

Clifford Geertz

地方知識: 詮釋人類學論文集
Local Knowledge: Further essays in interpretive anthropology. (1983)

http://hypergeertz.jku.at/HyperGeertz-1980-1989.htm

http://en.wikipedia.org/wiki/Clifford_Geertz



王 維 基 聲 明 全 文

王 維 基 聲 明 全 文


王 維 基 聲 明 全 文 。


各 位 朋 友 :

過 了 這 十 二 天 , 我 上 了 人 生 寶 貴 的 一 課 : 堅 持 直 率 , 用 辭 謹 慎 。

亞洲 電 視 是 一 個 具 有 使 命 和 社 會 責 任 的 機 構 , 無 論 從 香 港 人 的 立 場 還 是 其 他 因 素 來 考慮 , 亞 視 始 終 是 一 個 香 港 人 的 電 視 台 , 我 認 為 這 個 方 向 至 今 依 然 正 確 。 香 港 的 人 均本 地 生 產 總 值 是 內 地 十 多 倍 , 中 國 是 我 們 的 國 家 , 有 能 力 時 , 我 們 應 該 想 想 有 什 麼貢 獻 , 而 不 是 過 份 依 賴 。

亞 視 始 終 是 一 間 商 營 機 稱 , 他 的 希 望 在 於 自 己, 不 可 以 長 期 依 靠 賑 助 。 亞 視 從 新 定 位 , 讓 創 作 有 更 大 的 空 間 、 讓 觀 眾 有 更 多 選 擇, 令 亞 視 成 為 香 港 有 公 信 力 的 媒 體 , 這 是 我 們 三 人 的 共 同 夢 想 。 直 至 今 天 , 我 依 然擁 抱 這 個 熱 切 期 待 。

從 接 受 這 份 工 作 的 第 一 天 起 , 我 已 經 知 道 這 是 一 項艱 鉅 的 任 務 。 聽 張 永 霖 先 生 所 言 : 「 出 任 執 行 主 席 一 職 , 百 感 交 集 , 戰 戰 兢 兢 , 如履 薄 冰 。 」 , 我 就 想 起 康 有 為 先 生 廢 除 八 股 文 , 一 段 可 歌 可 泣 的 歷 史 。

沒有 膽 識 , 就 幹 不 了 大 事 。 要 改 革 , 我 沒 有 想 過 得 到 全 部 人 的 認 同 ; 改 革 的 過 程 中 ,我 們 要 面 對 固 有 利 益 者 的 強 大 阻 力 ; 要 改 革 成 功 , 就 一 定 要 迅 速 、 全 面 和 徹 底 , 更重 要 的
是 , 要 有 後 備 計 劃 。


以 上 種 種 , 我 已 經 有 充 足 準 備 。 過 往 四 年 , 我 在城 市 電 訊 亦 在 進 行 過 類 似 改 革 工 作 , 公 司 由 幾 年 前 虧 損 數 億 元 到 今 天 賺 一 億 二 千 多萬 。 我 認 為 這 種 全 面 改 革 , 對 亞 視 來 說 是 必 須 的 ; 改 革 的 目 的 , 是 要 令 員 工 對 自 己的 公 司 、 工 作 和 人 生 重 投 信 心 , 感 到 驕 傲 。

我 不 是 一 個 輕 言 放 棄 的 人 ,我 已 盡 我 的 最 大 努 力 。 我 依 然 深 信 我 所 做 的 大 部 份 事 , 對 亞 視 和 員 工 都 是 正 確 和 有利 的 , 只 是 , 大 家 的 步 伐 並 不 一 致 。 我 也 曾 經 說 過 , 我 已 經 愛 上 這 間 公 司 , 因 為 那裡 充 滿 希 望 和 優 秀 的 前 線 員 工 , 這 種 想 法 至 今 不 變 。 我 一 直 以 堅 持 直 率 , 真 心 待 人, 所 做 的 一 切 , 都 從 亞 視 和 員 工 的 利 益 為 出 發 點 。

最 後 , 我 想 提 提 張 永霖 先 生 , 因 為 我 在 他 身 上 學 到 很 多 。 正 如 Linus 說 過 , 我 們 是 背 對 背 的 , 無 其 他 人可 以 離 間 我 們 。 雖 然 在 短 暫 的 未 來 , 我 不 能 再 和 他 一 起 為 亞 視 服 務 , 但 我 會 繼 續 默默 的 支 持 他 。

可 能 我 倆 實 在 太 用 心 去 做 事 , 根 本 不 單 止 當 這 是 一 份 工 作, 更 將 亞 視 當 成 自 己 的 公 司 。 若 我 們 之 間 任 何 一 個 出 現 差 錯 , 都 只 因 為 太 過 用 心 、太 過 投 入 。 由 始 至 終 , 我 沒 有 考 慮 過 自 己 個 人 的 成 敗 和 利 益 , 我 們 只 有 一 個 焦 點 :怎 樣 才 可 以 令 亞 視 走 上 成 功 之 路 。 可 惜 , 事 情 發 展 就 像 很 多 愛 情 故 事 一 樣 , 你 最 愛的 , 不 一 定 是 和 你 結 婚 和 生 活 的 那 位 。

我 們 擁 有 一 個 共 同 目 標 , 只 可 惜, 在 日 常 運 作 上 出 現 不 同 看 法 。 就 好 像 爸 爸 媽 媽 照 顧 他 們 的 嬰 孩 一 樣 , 孩 子 過 了 晚上 的 飲 奶 時 間 , 仍 然 熟 睡 。 到 底 應 該 由 他 安 睡 , 還 是 叫 醒 他 喝 奶 呢 ? 雖 然 觀 點 不 同, 大 家 都 只 是 希 望 用 最 好 的 方 法 去 照 顧 孩 子 , 愛 心 卻 是 共 通 的 。

大 家 都 同 意 , 要 為 亞 視 建 立 新 文 化 和 新 路 向 。 我 選 擇 在 這 時 退 下 來 , 應 該 是 最 恰 當 的 做 法 。

無論 如 何 , 在 過 往 的 十 二 天 , 我 倆 一 直 緊 密 合 作 , 所 做 的 每 一 件 事 、 每 一 個 決 定 都 有我 們 的 共 同 意 見 和 討 論 。 藉 此 , 我 衷 心 感 謝 他 帶 領 我 走 過 這 一 段 路 。 工 作 完 結 了 ,兄 弟 情 仍 在 。

最 後 , 是 關 於 亞 洲 小 姐 面 試 的 。 我 用 錯 字 眼 , 但 我 絕 無 半點 不 尊 重 之 意 , 失 言 亦 是 無 心 之 失 。 無 論 如 何 , 我 必 須 承 認 這 是 一 個 錯 誤 。 對 此 我深 感 歉 疚 , 衷 心 希 望 得 到 佳 麗 和 大 眾 的 原 諒 。

王 維 基
二 零 零 八 年 十 二 月 十 七 日



EE4206/EE5806 Digital Image Processing

EE4206/EE5806 Digital Image Processing

Notes, tutorial, and assignments questions

http://www.spl.it.cityu.edu.hk/~ebook/notes/notes.html

login: student
password: image

This maths is quite difficult. If you don't understand the maths, you cannot write those image processing programs.



Mittwoch, 17. Dezember 2008

Cora Diamond : Riddles and Anselm's Riddle

Cora Diamond : Riddles and Anselm's Riddle

notes, p.273

On riddle phrases

1. Riddle phrase: a linguistic expression put together by continuing familiar patterns, so the question or request looks like those we know how to use;

2. to solve it, though, what we need is not somethingof which we have been given a description, but something which it willstrike us as right to call by the phrase.

3. And it is the familiarity of the pattern which makes it possible for us not to see the kind of quest we are engaged in.



Cora Diamond: Realism and The Realistic Spirit

Cora Diamond: Realism and The Realistic Spirit
notes p.59

Berkeley on misunderstandings about language:

1. when language is not being used to communicate information about particular matters in the world as we know it in experience, it is used to communicate information about something else...

2. when we can follow a bit of language, we take it that we must have in our mind an idea of what it is the words we understand stand for.



EE4216/EE5816 Internet Client-Server Comp

EE4216/EE5816 Internet Client-Server Computing

This course is about java network programming

Recommended text:

Reilly and Reilly (2002))
Java network Programming and Distributed Computing



Dienstag, 16. Dezember 2008

Cora Diamond- Riddles and Anselm's Riddle

Cora Diamond : Riddles and Anselm's Riddle

The Realistic Spirit

notes: p267

1. Where you can ask, you can look for an answer, and where you cannot look for an answer, you cannot ask either. Nor can you find an answer.

2. Do something which I shall be inclined to accept as a solution, though I don't know now what it will be like.

3.WE remain in the situation of linguistic description or interpretations. What we want is to change it.



Sonntag, 14. Dezember 2008

BitTorrent 估值大跌

BitTorrent估值大跌 廢除1700萬美元融資項目

騰訊科技訊 北京時間12月15日消息(2008),據國外媒體報導,美國科技博客網站Techcrunch創始人邁克爾•阿靈頓(Michael Arrington)周日撰文稱,美國知名檔共用服務商BitTorrent近日向公司股東發送的一封絕密電子郵件顯示,受美國金融危機等因素影響,該公司目前估值大幅下降,因此被迫廢除已於今年夏季完成的1700萬美元融資專案。

...
...

BitTorrent聯合創始人阿什文•納文(Ashwin Navin)上月初表示,自己將辭去公司總裁職務,然後將同Google旗下視頻共用網站YouTube聯合創始人陳士俊等人組建一家創業公司。

http://www.techcrunch.com/2008/12/14/bad-times-for-bittorrent-17-m-financing-undone-valuation-plummets/



Cora Diamond: Belief in Abstract General Ideas

Cora Diamond : Realism and the Realistic Spirit

notes,50

The disease of Belief in Abstract General Ideas.

"Its most characteristic symptom is his way of conceiving the connections between events. The only reason there can be for accepting a prediction is belief in a connection supposed to be real, in the sense if independent of our thoght, and for which the observed regularity is evidence."

But the term "real connection" is an abstract idea.

"You do indeed believe that you believe it!"



Freitag, 12. Dezember 2008

EE3206 Java Polymorphism

EE3206/EE5805 Java programming and Applictions

notes on Savitch(2006)'s Absolute Java , p 478-486

1. Polymorphism refers to the ability to associate many meanings to one method name by means of the late binding mechanism.

2. with late binding, the definition of a method is not bound to an invoction of the method until run time, in fact, not until th time at which the particular invocation takes place.


//Sales.java
//superclass
public class Sale
{
private String name;
private double price;

public Sale()
{
name = "No name yet";
price =0;
}

public Sale(String theName, double thePrice)
{
setName(theName);
setPrice(thePrice);
}

public Sale(Sale originalObject)
{
if(originalObject == null)
{
System.out.print("Error: null Saleobject.");
System.exit(0);

}
name = originalObject.name;
price = originalObject.price;

}
public static void announcement()
{
System.out.println("this is the Sale class");
}

public double getPrice()
{
return price;
}
public void setPrice(double newPrice)
{
if(newPrice >= 0)
price = newPrice;
else
{
System.out.println("Error: Negative price.");
System.exit(0);
}
}
public String getName()
{
return name;
}
public void setName(String newName)
{
if (newName != null && newName !="")
name = newName;
else
{
System.out.println("Error: Improper name value.");
System.exit(0);

}


}
public String toString()
{
return (name + " Price and TTotal Cost = $" + price);
}
public double bill()
{
return price;
}

/* returns true if the names are the same and the
bill for the calling object is equal to the bill for otherSale; */

public boolean equalDeals(Sale otherSale)
{
if(otherSale == null)
return false;
else
return (name.equals(otherSale.name)
&& bill() == otherSale.bill() );
}

/* returns true if the bill for the calling
object is less than the bill for otherSale */

public boolean lessThan(Sale otherSale)
{
if(otherSale == null)
{
System.out.println("Error: null Sale object");
System.exit(0);

}
return (bill() < otherSale.bill() );

}
public boolean equals(Object otherObject)
{
if (otherObject == null)
return false;
else if (getClass() != otherObject.getClass())
return false;
else
{
Sale otherSale = (Sale)otherObject;

return(name.equals(otherSale.name)
&& (price == otherSale.price));
}
}

}


//DiscountSale.java
//derived class, note the method name
public class DiscountSale extends Sale
{
private double discount;
//cannot be negative

public DiscountSale()
{
super();
discount = 0;

}
public DiscountSale(String theName,
double thePrice, double theDiscount)

{
super(theName, thePrice);
setDiscount(theDiscount);

}
public DiscountSale(DiscountSale originalObject)
{
super(originalObject);
discount = originalObject.discount;

}
public static void announcement()
{
System.out.println("This is theDiscountSale class.");
}
public double bill()
{
double fraction = discount/100;

return (1-fraction) *getPrice();
}
public double getDiscount()
{
return discount;
}

public void setDiscount(double newDiscount)
{
if (newDiscount >= 0)
discount = newDiscount;
else
{
System.out.println("Error: Negative discount.");
System.exit(0);

}
}
public String toString()
{
return (getName() + " Price = $" + getPrice()
+ " Discount = " + discount
+"%\n" + " Total cost = $"
+ bill());
}
public boolean equals(Object otherObject)
{
if (otherObject == null)
return false;
else if (getClass() != otherObject.getClass())
return false;
else
{
DiscountSale otherDiscountSale =
(DiscountSale)otherObject;

return(super.equals(otherDiscountSale)
&& discount == otherDiscountSale.discount);

}
}


}


//LateBindingDemo.java : main
public class LateBindingDemo
{
public static void main(String[] args)
{
Sale simple = new Sale("floor mat", 10.00);
DiscountSale discount = new DiscountSale("floor mat", 11.00, 10);

System.out.println(simple);
System.out.println(discount);

if (discount.lessThan(simple))
System.out.println("Discounted item is cheaper");
else
System.out.println("Discount item is not cheaper.");

Sale regularPrice = new Sale("cup holder", 9.99);
DiscountSale specialPrice =
new DiscountSale("cup holder", 11.00, 10);

System.out.println(regularPrice);
System.out.println(specialPrice);

if (specialPrice.equalDeals(regularPrice))
System.out.println("Deals are equal.");
else
System.out.println("Deals are not equal.");


}

}




Donnerstag, 11. Dezember 2008

EE3206 java this reference

EE3206/EE5805: Java programming and Applications

notes Liang(2009), p 334

The "this" reference is the name of a reference that refers to a calling object itself.

this.i=i; means "assign the value of parameter i to the data field i of the calling object."

We can also use "this" to invoke another constructor of the same class.

Eg:

public Circle()
{
// invoke another constructor
this(1.0);
}




EE3206 java: immutable class

EE3206/EE5805

Java Programming and Application
notes Liang (2009),
p.333

Three requirement for an immutable class

1. declare all fields private

2. provide no set() methods

3.Provide no accessor methods that returns a reference to a data field that is mutable. eg .return a Date object.



周慧敏倪震宣布分手

周慧敏倪震宣布分手

(明報)12月11日 星期四 20:00

藝人周慧敏 和倪震 發表聲明,周慧敏原諒倪震,但會回復朋友關係,倪震就基於「問責」,決定「引疚分手」。

周慧敏的聲明全文如下:

我與倪震識於微時,一起共渡過不能盡算的高低起落,早已磨合了一套我們之間的相處藝術。一個人的問題,兩個人去修正;一個人的挫敗,兩個人去承擔。我倆是一個團隊的,沒分高低,輸贏也是一体。某程度上,周慧敏早已是一位不同面貌的倪震。任誰一方受到傷害,另一方都願抵禦百倍的痛。一起走過將近二十個年頭,絕對不是在一般人的準則下相愛,但外人卻總愛把自己的一套價值觀去評價、批判屬於我倆之間的愛情。

今天我能夠成為自愛,懂得愛人,擁有著無比勇氣與承擔的女人,請不要小看這個精神伴侶在我背後為我付出過的一切努力,包容,寵愛,照顧與扶持。都生活了這麼久,沒有倪震,成就不了今天的周慧敏。所以我敢大膽向各位說一句:「我的伴侶絕對犯得起這個錯誤」,而這句說話,亦只我一人有資格去定論。看到伴侶事後為我做出的承擔,我馬上就原諒了他,又怎會有某些媒體創作出來的痛哭,拍檯,大罵,這般無稽的謊言呢?不到一天,我看到了很多無比荒誕,狠毒,涼薄的炒作與咀咒,妖魔鬼怪都湧進來,愈炒作愈黑暗,致人於死地。

公眾人物談戀愛要承受異於常人理解的壓力,從當年決定和不按常規行事的倪震談戀愛,就知道是一場革命了,亦沒有失望過。香港這片是非地,無風三尺浪,暗箭來自四方八面,行差踏錯一步就如掉進鬥獸場。當中我們需要的信心,包容,付出是一般情侶無法體會的。顯微鏡下看世界,任誰都難合格。我告訴大家,我們不害怕,也不逃避,只是有點累了。在回復到朋友關係以後,我們要好好享受不用被批判的日子,大家為未來再次裝備出發。我相信身份的改變,疏離不了我們之間微妙的關愛。

最後,我要向每位真正支持愛護我的朋友說:「我沒枉費與倪震轟轟烈列地愛過,永遠刻骨銘心,此生無憾。而我自己亦都會好好地勇敢活下去,一如過往。」多謝各位。

而倪震的聲明如下:

最近滿城風雨,矛頭都是我作為一個男朋友怎樣失敗。我多謝大家的意見和抨擊,事發後也承諾過深切反省和負責。想了一星期,我再為我的錯誤向慧敏道歉,也多謝她再一次肯包容我的過失。但感情由兩個人的事,變成了所有人的事,性質已起了改變。雨過天青不難,但可以保證暴風雨不再來嗎?我問了自己這個問題很久,意識到我這次的錯誤並非如一些損友說是技術上不小心,而是結構上出現了明顯的中年危機。我會正視問題,完善自我,不排除尋求專業輔助。在有信心改善之前,我明白到我在大家的心目中,不再是個稱職的男朋友,更不配做慧敏的男朋友。為了令公眾安心,為了顯示我的後悔和承擔,我決定引疚分手,和慧敏結束情侶關係,做回知心的朋友。這無疑是極大的損失,但我相信傳媒界,和慧敏的fans,都會歡迎我這個痛苦的決定。我不是個稱職的男朋友,但做個稱職的好朋友,我很有信心。

我和慧敏相識近二十年,一向互相支持和了解。今日因我的不撿點分手,也不會影響我們繼續來往,處理合作的日常事務,和照顧愛貓。我做錯事,認了錯,向慧敏交待了,也得到慧敏的原諒。基於問責分手,已是極刑。以前種種,我和慧敏不會再作回應。以後種種,請大家尊重我和慧敏只是朋友的關係,不要再訂出情侶的標準。假如我們

我已搬離跑馬地寓所,再一次多謝慧敏多年來的包容,和傳媒多年來的鞭撻。人頭落地了,退一步海闊天空,希望事情可以告一段落。



Mittwoch, 10. Dezember 2008

Frege: Begriffsschrift-preface

Frege's Begriffsschrift :preface

excerpted from "The Frege Reader" edited by M Beaney, p.51.


1. I hope that logicians, if they are not put off by first impression of unfamiliarity, will not repudiate the innovations to which I was driven by a necessity inherent in the subject matter itself.

2. These deviations from what is traditional find their justification in the fact that logic hitherto has always followed ordinary language and grammer too closely.

3. In particular, I believed that the replacement of the concepts subject and predicate by argument and function will prove itself in the long run. It is easy to see how taking a content as a function of an argument gives to concept formation.

4. What also deserves notice is the demostraion of the connection between the meanings of the words: if, and, not, there is, some, all, etc.



Dienstag, 9. Dezember 2008

Cora Diamond: Realism and the Realistic Spirit

Cora Diamond : Realism and the Realistic Spirit

notes: p.43

On philosophical glasses

1. "...the philosopher who takes himself to be wearing irremovable glasses does not take these to be distorting his view. The 'glasses' here are the underlying logical order of all thought... "

2. "Because he is convincedthat all thought must have his order, he is convinced that he is able to ee it in the reality of our actual thought and talk, even though the ways we think and speak do not (to what he takes to be a spuerficial view) appear to exhibit such an order."

3."The removal of the glasses is his being able to see properly what always was before him; what stood in the way of his removing them was a confused understanding of language."



Cora Diamond: Realism and the Realistic Spirit

Cora Diamond: Realism and the Realistic spirit

notes: p.41

1. "The conception of calculation as an experiment tends to strike us as th only realistic one.
Everything else, we think, is monshine. In an experiment we have someing tangible.

2. Ramsey's view on logic: that whenever we make an inference (of any sort) we do so according to some ruleor habit.



Montag, 8. Dezember 2008

Cora Diamond : Intro 2-1

Cora Diamond- The Realistic Spirit

notes p.35

1. The common thing: they do not invite us to give up the making of philosophical propositions because such propositions are nonsensical (because they are a priori, or departures from some language-game, or in whatver other way fail to meet some supposed requirement).

2. They both treat philosophical propositions as constructions we make on the basis of linguistic analogies, patterns, or images in our language.

3. We may come to see that we do not want to go on doing anything with these linguistic constructions; the satisfaction of our needs does not lie that way.

4. We abandon them; we leave them unused; we say "These we do not want." To call them nonsensical is to exclude them in that way from the commerce of our lives.


java Thread pools

EE3206/EE5805

notes on Liang(2009) p. 969

1. java 5 uses the Executor interface for executing tasks in a thread pool and the ExecutorService interface for managing and controlling tasks.




Reading Comprehension

I cannot write java multi-thread programming though I have read the whole chapter on multi-threading.

This is not a problem of reading comprehension.

An empirical question cannot be solved by logical understanding.



柏楊--醜陋的中國人

柏楊全集

醜陋的中國人

http://nrch.cca.gov.tw/ccahome/website/site4/BY_Collect/b9000f0/cca220003-li-wpkbbyb9000f0toc-0000-u.html




EE3206/EE5805 java Thread animations

EE3206/EE5805 Java programming and Application

notes on Liang(2009), p.964

use a thread to control animations


import javax.swing.*;


public class FlashingText extends JApplet implements Runnable
{
private JLabel jlblText = new JLabel("DMC Welcome", JLabel.CENTER);

public FlashingText()
{
add(jlblText);
new Thread(this).start();
}

public void run()
{
try
{
while(true)
{
if (jlblText.getText() == null)
jlblText.setText("DMC Welcome");
else
jlblText.setText(null);

Thread.sleep(300); // static
} // end while

}
catch(InterruptedException e)
{

}
}
}




java : 3 steps to threads

EE3206/EE5805 Java programming and Applications

notes on Liang(2009), p.958-961:

Three steps to start a thread

1. create a class that implements the Runnable interface and implements the run() method.

2. new() a thread object by passing the Runnable object to the Thread class

3. start threads by invoking the start() method

////////////////////////////////////

public class TaskThreadDemo {
public static void main(String[] args)
{
// create tasks
Runnable printA = new PrintChar('a', 100);
Runnable printB = new PrintChar('b', 100);
Runnable print100 = new PrintNum(100);

// 2. create thread objects by passing
// the Runnable object to the Thread class
Thread thread1 = new Thread(printA);
Thread thread2 = new Thread(printB);
Thread thread3 = new Thread(print100);

// 3. start threads
thread1.start();
thread2.start();
thread3.start();

}

//////////////////////////////////////////////////

public class PrintChar implements Runnable
{
// 1. implements th Runnable interface and implements the run() method

private char charToPrint; //the characte to print
private int times; // the number of times to print

public PrintChar(char c, int t)
{
charToPrint = c;
times = t;

}
public void run()
{
for (int i=0; i< times; i++)
System.out.print(charToPrint);

}
}

///////////////////////////////////////

public class PrintNum implements Runnable
{
private int lastNum;

/** a task to print 1,2,3, ...i */
public PrintNum(int n)
{
lastNum =n;

}

public void run()
{
for(int i=1; i<= lastNum; i++)
System.out.print(" " + i);
}
}





Event dispatcher thread

EE3206/EE5805 java programming and Appications

Event dispatcher thread: notes on Liang(2009)

You need to write code in he event dispatch thread to avoid deadlock.


import javax.swing.*;

public class EventDispatcherThreadDemo
extends JApplet
{
// you need to write code in he event dispatch
// thread to avoid deadlock

public EventDispatcherThreadDemo()
{
add(new JLabel("Hi, it runs from an event dispatch thread"));
}

public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable() {
public void run()
{
JFrame frame =
new JFrame("EventDispatcherThreadDemo");
frame.add(new EventDispatcherThreadDemo());
frame.setSize(300,200);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}

}); // anonymous inncer class
}
}




Freitag, 5. Dezember 2008

魑魅魍魎

魑魅魍魎

http://ja.wikipedia.org/wiki/魑魅魍魎

http://dict.idioms.moe.edu.tw/chengyu/mandarin/fulu/dict/cyd/2/cyd02966.htm




中國歷史通俗演義 - 明史

中國歷史通俗演義 - 明史

http://www.open-lit.com/bookindex.php?gbid=112




How to Draw in Java

EE3206/EE5805 Java Programming and Applications

notes from Liang(2009), p.478

How to draw in Java:

1. create a class that extends JPanel

2. override paintComponent()

The paintComponent() is automatically invoked to paint graphics when the component is first displayed or whenever the component needs to be redisplayed.



import javax.swing.*;
import java.awt.Graphics;
import java.awt.*;


public class TestDrawPanel extends JFrame {

public TestDrawPanel()
{
JPanel dp = new DrawPanel();
dp.setBackground(Color.ORANGE);

add(dp);
// 3. add JPanel to the JFrame
}

public static void main(String[] args)
{
TestDrawPanel tdp = new TestDrawPanel();

tdp.setTitle("TestDrawPanel");
tdp.setSize(300,200);
tdp.setLocationRelativeTo(null);
tdp.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
tdp.setVisible(true);

}

class DrawPanel extends JPanel
{
// to draw, 1. create a class that extends JPanel
protected void paintComponent(Graphics g)
{
// 2. override the paintComponent()
//
super.paintComponent(g);

g.setColor(Color.RED);
g.drawLine(10,10, 70, 70);
g.drawRect(30,50 ,150, 100);
}
}


}




Donnerstag, 4. Dezember 2008

Cora Diamond: Later philosophy on Liberating

Cora Diamond : The Realistic Spirit

Introduction II

notes p.33

1. The notion in the later philosophy of philosophy as liberating is thus tied to an ability to look at the use without imposing on it what one thinks must already be there in it.

2. The notion of use itself and what is meant by giving or presenting it thus also changes: an expression is not presented timelessly--its use is not given --by the general form of the proposition it characterizes; use can be seen only as belonging to the spatial, temporal phenomenon of language.



Mittwoch, 3. Dezember 2008

Cora Diamod: No Philosophical Requirements

Cora Diamond : The Realistic Spirt

Notes: P28-29

1. "The aim of philosophy, as I see it, being in a kind of liberation from laying down this or that requirement..."

2. Philosophical Requirements may take the following form:

"Regardless of what things look like, if we are to have or do such-and-such, there must be so-and-so."



Cora Diamond: Intro II

Cora Diamond: The Realistic Spirit

notes: P27-28

1. "Our practice are exploratory, and it is indeed only through such exploration that we come to see fully what it was that we ourselves thought or wanted to say."

The present situation is not to explain and interpret but to explore and configure.


2. "Justification, in ethics as anywhere else goes on within lives we share with others, but what we make count in that life is not laid down in advance.

The force of what we are able to say depends on its relation to the life of the words we use, the place of those words in our lives; and we may make the words tell by argument, by image, by poetry, by Socratic redistribution, ... by proverbs, by all sorts of old and new things."





java : The Most Popular Language

TIOBE Programming Community Index

Java is the most popular programming language in 2008

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html



Montag, 1. Dezember 2008

EE3206/EE5805 Java Sys properties

EE3206/EE5805 Java Programming and Application

Here is the java code to check your system properties:


//
import java.util.*;

public class SysProperty
{

public SysProperty()
{

}

public static void main(String[] args)
{
Properties prop =
System.getProperties();

prop.list(System.out);
}

}