Facebook Javascript SDK – A Simple Login Page with OAuth 2.0

A few months ago, i published several posts about Facebook Javascript SDK but they no longer work since Facebook updates to OAuth 2.0. So this post is the updated version of
Facebook Javascript SDK – A Simple Login Page
and it should work works with OAuth2. Continue reading Facebook Javascript SDK – A Simple Login Page with OAuth 2.0

李怡 – 無權力者的權力

剛去世的捷克人權總統哈維爾,一生追求的信念是「生活在真實中」。他認為人民拒絕謊言,堅持真相,就是「無權力者的權力」。他在以此為名的一本書中說:
「極權制度觸及到個人生活的每個角落,不過在這樣做的時候披着意識形態的面紗。因此,虛偽與謊言充斥着社會:官僚政府叫作人民政府;工人階級在工人階級當家作主的名義之下被奴役;個人地位的徹底喪失說成是人的最終的解放;剝奪人民的新聞渠道被稱為保障人民的新聞渠道;用權勢駕馭人民說成是人民掌握權力;濫用職權、專橫跋扈便是實行法治;壓制文化就是發展文化;毫無言論自由就是最高的言論自由;選舉鬧劇是最高的民主;禁止獨立思考是最科學的世界觀。因為當權者作了自己的謊言的俘虜,就不得不把一切都顛倒黑白。它篡改歷史,歪曲現實,虛構未來;它揑造統計資料;它假裝不存在一個無孔不入和無法無天的警察機器;它裝作尊重人權,從不迫害任何人;它假裝什麼都不怕;它假裝從不弄虛作假。」 Continue reading 李怡 – 無權力者的權力

龍應台 – 我們的村落

我們的村落
(2011香港大學醫學院畢業典禮演講中文翻譯)

學程二期
我一般非常不情願在畢業典禮演講,因為這個場合的聽眾一定是最糟糕的聽眾——你還沒開口,他就巴不得你已經結束,而且,他決心已下,不管你說甚麼,只要戴着方帽子走出了這個大廳的門,他這一生不會記得你今天說過的任何一句話。

雖然如此,我還是來了,不僅只是因為,受邀到醫學院演講是一份給我的光榮和喜悅,也因為我「精打細算」過了——遲早有一天,我會「落」在你們的手裏。當那一天到來的時候,我自然渴望在床邊低頭探視我的你,不只在專業上出類拔萃,更是一個具有社會承擔、充滿關懷和熱情的個人。

我們都說這是一個畢業典禮,五六年非常艱難的醫學訓練,今天結束了。我倒覺得,是不是可以這樣看:今天其實只是你「學程一期」的畢業典禮,一期的核心科目是醫學。但是今天同時是你「學程二期」的開學典禮,二期的核心科目是「人生」。二期比一期困難,因為它沒有教科書,也沒有指導教授。在今天的十五分鐘裏我打算和你們分享的,是一點點我自己的「人生」筆記。 Continue reading 龍應台 – 我們的村落

Drupal – Show a node location with Google Map in Views

We could add location information to node using the Location module. If the GMap module is enabled, we could even show the location with Google Map in Views.
1. Download and enable the GMap module.
 

2. Edit the Locative information of any content type. Make sure the Coordinate Chooser is set to Allow. Continue reading Drupal – Show a node location with Google Map in Views

Drupal – $data->field_name problem in Views Custom Field

We have talked about using Views Custom Field which really makes Views more versatile. In the custom PHP field, you can get the data of other fields from $data. But the field names under the $data may changed later as you modify the view.

A workaround is to get the field data from $data using the field_id. Continue reading Drupal – $data->field_name problem in Views Custom Field

Eureka! – 2011 Review

Happy new year!

In 2011, I have completed the Postaday 2011 campaign. That means i published a blog post every day in 2011. Although i have no plan to keep it in 2012, i would try to keep blogging whenever i have time and i hope those articles could help to solve your problem.

Another big change on me in 2011 is that i have been being unemployed since Oct 2011. haha~ yes, i have quit! I have taken the first step of my dream. Currently i am working on my own project and i hope this first phase could be completed in 2012. I hope i could make some big progress this year.

About Eureka! Blog, it was visited 644,033 times in 2011. There is a significant decline in Dec 2011 because of the change of domain name form ykyuen.wordpress.com to eureka.ykyuen.info. I couldn’t figure out any solution to migrate the indexed content by Google from the old domain name to the new one. Anyway, time could heal.

  • 2011 Jan – 32,177
  • 2011 Feb – 35,444
  • 2011 Mar – 45,735
  • 2011 Apr – 42,041
  • 2011 May – 45,556
  • 2011 Jun – 51,663
  • 2011 Jul – 57,875
  • 2011 Aug – 63,162
  • 2011 Sep – 66,573
  • 2011 Oct – 74,941
  • 2011 Nov – 81,173
  • 2011 Dec – 47,693
  • 2011 Total – 644,033

That’s all for 2011 and wish you every success in 2012! =)

陶傑 – 猩猩與人

網上熱傳的短片:美國一個野生動物愛好者,在烏干達野生動物園拍大猩猩,大猩猩發現了他,龐然走過來,對他摟抱親嘴,他心頭狂跳,不敢亂動,怕二百磅的大猩猩獸性發作,一拳就能打死人。

但有驚無險,大猩猩很有愛心,把他接吻一通就走人。人對猩猩有偏見,以為畜牲暴戾,其實,猩猩雖與人同源,人比猩猩可以更殘酷。

一九三四年,希特拉剛上台不久,納粹德國逮捕了德國猶太詩人穆山(Erich Mühsam)Continue reading 陶傑 – 猩猩與人

Dream BIG and go for it =)