2009/06/21

Google App engine

p7135683.jpg (by plateaukao)
Biei.Japan

I forgot how I bumped into this site Google App engine. I saw there's a small youtube video at the right-hand side. Out of curiosity, I clicked on the video and gave it a gimplse. Wow, it's written in Python. That made me more interested in how it works. Within hours, I wrote my first google app based on its simple sample provided in the Google App Engine SDK. Hey, but it's already good enough to compete with my onlinedic!! The speed is amazing comparing to my desktop client. Instead of completing my first workable (and useful) android app, I ported my onlinedic to google apps. Well, I just changed the I/O part of my original python scripts. As for the html post-processing part, I did not change them at all.

Now, I have French-English dictionary, Yahoo Chinese-English dictionary, and French Conjugator ready on the internet! I can always have these basic function set as long as I have internet access.

Here are some notes about what obstacles I encountered while writing this small app.

1. use python 2.5 instead of python 2.6
If you are using python version other than 2.5, it'd better that you install python2.5 too.
It will prevent you from bumping into a out-of-nowhere debugging error.
(I spent some time on finding this out on my ubuntu 9.0)

2. There's new_project_temple folder in the SDK root directory. That's where you can start with.

3. Do not use urllib from python library. Use urlfetch from google.appengine.api instead.

4. You can only upload/update your files to google app server, but you CANNOT download these files from the server!!
So, remeber to back up your files and use version control systems by yourself.


LINK:
http://onlinedict.appspot.com


REF:
http://code.google.com/intl/zh-TW/appengine/

The Thirteenth Tale 第十三個故事 -- Diane Setterfield

P6192119.jpg
Nagoya.Japan

看完了。很久沒有一股作氣看完一本小說了。雖然一本書厚達快四百頁,但是我還是在週六把它看完了(昨天先看的一百頁不算的話)。一開始的描述方式很特別,這或許是讓我能夠一直看下去的原因吧。故事中的人物不算多,但是卻隨著同一主題不斷帶出細節來。沒有特別冷場的情節,每一幕都會引著你再讀下去。藉由場景的交換,讓注意力可以不斷集中。

看完時,呼~有時間唸書的感覺真好。

2009/06/20

nrg to iso conversion under linux (ubuntu)

PB175023 (by plateaukao)
Geneve.Swiss

黑白 (by plateaukao)
Annecy.France

Photos de Similaire composition.
Well, it's a piece of cake.
Just type in the title into google and you can find the solution within seconds.

Just install nrg2iso from apt and it's done.

2009/06/19

成長,就意謂著失去嗎?

IMAG0554.jpg (by plateaukao)
Taipei.Taiwan

以前看到天氣不錯,或是有大景,二話不說,請了假回家拿相機,就上山了。
現在…
就這麼在跟同事下樓吃晚飯前,對著樓梯間的窗戶外用手機拍張照片,
然後無奈地快步下樓跟上其他人。

能不能不要帶人呢? 能不能過得自在些呢?

ca me manque

RIMG0006.jpg (by plateaukao)
Annecy.France

ca me manque, la vue de ma chambre a annecy.
chaque matin, je me reveillais en regardant la belle vue dehors,
soit du soleil, soit du brouillard, il change tout le temps.

IMAG0551.jpg (by plateaukao) IMAG0550.jpg (by plateaukao)
Taipei.Taiwan

Parfois, il fait tres beau a taipei.
Malheureuesment, je dois rester dans le bureau toute la journee.

2009/06/17

法文文法 -- 動詞時態教學

P1110117 (by plateaukao)
Semnoz.France

快忘光了。有空來複習一下,順便記錄一下吧。
法文主要有下列動詞時態:

l'indicatif 直陳式

le present 現在式

l'imparfait 未完成過去式
le passe simple 簡單過去式

le passe compose 複合過去式
le passe anterieur
le plus-que-parfait

le futur simple
le futur anterieur
le futur dans le passe
le futur anterieur dans le passe
le passe immediat

l'imperatif 命令式

le conditionnel 條件式

le subjonctif 虛擬式

l'infinitif 不定式

le passe simple 簡單過去式

IMAG0532 (by plateaukao)
Sushi.Taipei

le passe simple(簡單過去式),唯一一個還沒學到怎麼動詞變化的時態,所以趁還有力氣時,先把它寫一遍。這是一個主要用於書寫的時態。一般會話時,對於過去的事情,不是用l'imparfait就是用le passe compose在描述。了不起,頂多再加上個le plus-que-parfait。但是在書寫時,一般會用le passe simple來取代掉le passe compose。至於原因…我也不知道。可能在寫字的時候,le passe compose,每次都得寫兩個字,法國人覺得很麻煩,所以又生出來le passe simple來減輕句子中到處擺的動詞(純屬鬼扯…)。l'imparfait跟le passe simple的用法會在別篇裡頭說明,這邊就不多說廢話。我們直接來看一下動詞的變化吧。

第一類動詞 (er 結尾,例如aimer)
j'aimai
tu aimas
il aima
nous aimâmes
vous aimâtes
ils aimèrent

第二類動詞 (ir 結尾,例如finir)
je finis
tu finis
il finit
nous finîmes
vous finîtes
ils finirent

第三類動詞 (亂七八糟動詞)

je courus
tu courus
il courut
nous courûmes
vous courûtes
ils coururent

je vins
tu vins
il vint
nous vînmes
vous vîntes
ils vinrent

不規則動詞 etre
je fus
tu fus
il fut
nous fûmes
vous fûtes
ils furent

不規則動詞 avoir
j'eus
tu eus
il eut
nous eûmes
vous eûtes
ils eurent

很機車的變化吧。規則的動詞還算好記,在單數時,只要把詞幹接上ai, as, a就行(avoir的現在式變化);複數時,再記一下特別的變法就行。

我每次看小說時都會搞混的,就是avoir跟etre的變化。明明是Etre,可是變化後,變成F開頭;然後明明原本是A開頭的avoir在變化後,變成e開頭的字。有時會讓我弄不清究竟他是有了什麼,還是是什麼…

以上。

REF:
http://fr.wikipedia.org/wiki/Pass%C3%A9_simple

乩童警探 一二集

接連看了兩集。第一集還算新鮮,到了第二集就看得比較慢了。一來,劇情雖然常會提到乩童,但真的跟乩童又沒有什麼關係。第二集後半大概就猜出是怎麼一回事了,但還是很享受在作者解釋的過程。只是前面舖陳有點久,而且人物有點多,再加上我是斷斷續續的看,看到後來都快忘了誰是誰,或是誰曾經出過什麼...