陶傑 – 通識敗局

特區政府推行「通識教育」,慘遭前宗主英國的考試局公然歧視,只承認香港高考理化史地的學科成績,獨「通識」這一科考試,英國不予承認。洋人不承認,壞了,「通識」還讀來做什麼?本人兩年前已經鐵批:「香港的通識教育」,一定死路一條。
 

我宣判了,英國考試局執行。香港的學校和家長,就該有數了,趕快取消通識這一科,時間省下來,寧願讓小孩玩電腦遊戲,至少電腦遊戲,還可以訓練小腦條件反射,通識,卻會淪為「通蠢」。
因為據說沒有「課程範圍」,不知教什麼,怎樣出題,怎樣評分改卷。為了方便「考試」,漸漸許多懶人自作主張,把「通識」定為「時事討論」,從國際新聞、世界盃,到余曾鬥嘴、功能組別,都可列為「通識教育」。
  Continue reading 陶傑 – 通識敗局

Portecle – Keystore and Certification Manager

Previously, i was working with an web application which allows me to upload a certificate into a keystore. Unfortunately, it only accept certificate in Base64/PEM format but not binary. So i have to convert the certificate into Base64/PEM and this could be done by Portecle.

Portecle is a very useful Java program with User Interface which make keystore and certificate management a piece of cake. The following screenshots show you how to get the Base64/PEM encoding from a binary certificate. Continue reading Portecle – Keystore and Certification Manager

iPhone – Wrap Text in UILabel

In UILabel, there is an adjustsFontSizeToFitWidth property which will automatically adjust the text font size to fit the UILabel width.

UILabel *aLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 20.0)];
aLabel.adjustsFontSizetoWidth = YES; // This is a must
aLabel.minimumFontSize = 8.0f; 
aLabel.numberOfLines = 1; // This is a must too =.=

But this only work for numberOfLines = 1Continue reading iPhone – Wrap Text in UILabel

Maven – Using maven-jetty-plugin to Start a webapp of another Maven Module

Normally, the maven-jetty-plugin should be configured in the pom of your Maven webapp project/module. But the project i am working is a legacy Java project with many modules and the webapp module depends on others. so i cannot simply start it due to the build sequence.

What i am going to do is to add an new Maven module for integration test of the Maven webapp module and it would be build in the last module such that all other modules are ready.
Continue reading Maven – Using maven-jetty-plugin to Start a webapp of another Maven Module

吳志森 – 「堅定可信」這塊招牌還敢掛出來嗎?

不到一個月之前,一位據稱代表中央與溫和民主派溝通的駐港官員,對民主黨/普選聯的區議會方案,在公開場合提出了幾乎不容辯駁的質疑:「功能界別的立法會議員,應該有屬於特定的專業、行業和組織的選民選舉產生。如果把選民的基礎擴大到全社會,既不符合《基本法》的立法原意,也容易引起質疑,這是不是符合全國人大的決定?」

政治一天都太長,何況是一個月。同一個人,同一個中央代表,又與香港最大的反對黨會面,180度轉變:「中央政府認為,一人兩票區議會方案,沒有違反基本法,也沒有違反人大決議。」
Continue reading 吳志森 – 「堅定可信」這塊招牌還敢掛出來嗎?

Run Selenium in Tapestry Maven Project

If you want to know how to run Selenium in a Maven webapp project, you can refer to the following post.
Selenium – Integrate the Selenium Tests into Maven Build
 

If you are a Tapestry user, the pom.xml in the above article may not work as the webapp cannot be started in the Embedded Jetty (404 Not Found). I am not sure the reason behind but i find a work around to solve the problem. The tricky thing is in the Embedded Jetty configuration in the cargo2-maven-plugin.
Continue reading Run Selenium in Tapestry Maven Project

Selenium – Integrate the Selenium Tests into Maven Build

In this article, i will show you how to integrate the Selenium tests into a Maven webapp project using the selenium-maven-plugin and cargo-maven2-plugin.

In this example, i used JUnit as the testing framework. There is no problem if you use TestNG to replace JUnit. This example is a simple Java webapp Maven project which only shows a simple html page (index.jsp). During the build, a Selenium Server is started with the webapp deployed in the Embedded Jetty. It then runs an Unit Test (Selenium Test) during the Maven integration-test life cycle. Here comes to the code.
Continue reading Selenium – Integrate the Selenium Tests into Maven Build

Dream BIG and go for it =)