2010/03/31

霞光, 火天之城

R8079826
Riverside.Taipei.Taiwan

原來五十公里比我想像中的還要長。
不過時速平均不到十公里,也太誇張了。

====

火天之城。沒有字幕,每到重點必聽不懂。
不過,電影畢竟是電影,光看畫面也可以猜出個七八成。

2010/03/22

onlinedict線上版小改進

PB124666
lac d'Anncey.France

在這邊看到,透過點小設定,可以讓Chrome的網址列充當搜尋引擎,自訂想要的搜尋。之前用Google App Enginen包裝出來的OnlineDict,只有吃由form餵入的資料,也就是只支援post的方式。為了要讓它也可以做為Chrome搜尋用的引擎,就得要為它做點小改變,讓它也支援get方式的查詢才可以。

所以,我改了一下程式碼。有多簡單呢?就copy paste一行程式碼而已。
原本def get(self)底下是直接呼叫OutputHtml(),現在改成呼叫post(self),就可以跟post做一模一樣的處理了。

#/usr/bin/env python

import cgi

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

import os
from google.appengine.ext.webapp import template

import Dict

class OnlineDic(webapp.RequestHandler):
def __init__(self):
self.fren_dic = Dict.collins_fren_dict()
self.ench_dic = Dict.yahoo_dict()
self.eijiro_dic = Dict.eijiro_dict()

def get(self):
self.post()

def post(self):
word = self.request.get('word')
dic = self.request.get('dic')
if dic == 'Fr-En':
content = self.fren_dic.doSearch(word)
content = content // handling
elif dic == 'Ja-En':
content = self.eijiro_dic.doSearch(word)
else:
content = self.ench_dic.doSearch(word)
self.OutputHtml(content,dic)


def OutputHtml(self, content="", dic=""):
template_values = { 'content': content,
'dic': dic,
}
path = os.path.join(os.path.dirname(__file__), 'index.html')
self.response.out.write(template.render(path, template_values))

application = webapp.WSGIApplication(
[('/', OnlineDic)],
debug=True)

def main():
run_wsgi_app(application)

if __name__ == "__main__":
main()

# vim:set nu et ts=4 sw=4 cino=>4:

網站在此:http://onlinedict.appspot.com/
目前支援法翻英,範例如下:
http://onlinedict.appspot.com/?dic=Fr-En&word=%s
英翻中
http://onlinedict.appspot.com/?dic=En-Ch&word=%s
日翻英
http://onlinedict.appspot.com/?dic=Ja-En&word=%s

為了貼上面的程式碼,特別去找了一個透過javascript的syntax highlighter,路徑如下:
http://alexgorbatchev.com/wiki/SyntaxHighlighter
使用方式可以參考下面這個網址:
http://www.craftyfella.com/2010/01/syntax-highlighting-with-blogger-engine.html

2010/03/21

高速鐵路新時代 -- 蘇昭旭

R8079705
Tenyuan Temple.Taiwan

隔了多年,又到了天元宮。
發現自己的拍照技術還是一樣爛。
遇到兩位同事。

===

主要介紹的高鐵,好像都坐過了:
日本的新幹線、
法國的TGV、
德國的ICE、
再加上台灣的高鐵。

沒想到光是高鐵的歷史,就可以寫出厚厚一本書。
書末還列了其他幾本作者的鐵路相關著作。
看得出來作者對於鐵道有無比的熱情。

玩火的女孩 -- The Girl Who Played With Fire

P2080775
Geneve.Swiss

還是一樣黑暗

2010/03/20

Vimium

R1040178.JPG
Seattle.US

No chance to visit Mountain Ranier and Mountain Baker in Seattle.
However, a casual view on the road side is already attractive enough.

====

Vimium is another Chrome extension that tries to simulate the key behaviors of Vi editor. Comparing to Vrome, it allows you to customize(map/unmap) its default key mappings, which is quite useful if you are used to other key mappings.

For example, I like to use H/L for going backward/forward among the tabs with vimperator on firefox. Instead of using the default J/K with Vimium on Chrome, I can change it back to the way I like.

Link: Vimium

2010/03/18

龍紋身的女孩

P5045763
Cannes.France

坎城,在非旺季的時間來到這個城市,感受不到他巨星雲集的盛況。
在城市的一角,有老城可以逛。
老城是在小丘陵上,上去後可以遠眺海邊。
如果能來這兒度假,住在老城區應該很棒吧。

====

還蠻好看的。
雖然翻譯有點怪,但是就劇情而言,還是吸引人的。
片頭的法院判決,前因後果在小說裡寫了一堆,看了我一兩天,
結果電影就那麼輕描淡寫的幾個鏡頭帶過。

可見,之後的劇情在小說裡會有多麼的精彩。

玩火的女孩也備齊了,週末前把它看完吧。

2010/03/14

Did you hear about the Morgans 名牌冤家

R8056288
Koriyama.Japan

很可愛的一副畫,可惜在路旁,經過風吹日晒後,有點髒了。

****

休葛蘭和Sarah Jessica Parker演的一部愛情片。
就劇情而言,沒有什麼太特別的地方。
但拍片場景是在懷俄明州鄉下,演員也都操著當地的口音,聽起來很特別。

忠犬小八

PC291188
Annecy.France

湖水是畫布,今天畫的是蛇前進的軌跡。

****

李察吉爾演的。
沒想到他會演這一類型的片。
片裡的秋田犬,小隻的很可愛,長大的很漂亮。
故事性有點薄弱,不知道是不是真實故事改編的。

電影中的房子很漂亮,下次想要找時間畫一下。

等一個人咖啡 -- 九把刀

PA107256.JPG
快出太陽吧。我想拍照。

****

愛情故事。
平凡人沒有不平凡的愛情故事,
只好在小說中尋找。
偶爾看看還好,
看多了,會讓人覺得這世界為什麼沒有那麼美好。

有些情節,寫得又有點像是武俠小說了。
就故事性而言,跟蔡智恒給我的感覺差不多,
不過,就筆觸來看,我比較喜歡蔡智恒的文筆。

這篇有點長。所以用iphone看得有點累。

2010/03/11

追尋現代中國 -- 最後的王朝 史景遷

P4264962
Albertville.France

很喜歡看國外建築物上的畫作。
原是很死板的一面牆,
藉由或大或小的壁畫,讓它有了生命。

這在建築密度高或是充滿高樓的城市裡,是幾乎看不到的。

****

一本外國人描述的現代中國史。
以前唸歷史,就只有上課時那麼幾本教科書,
既死板,又沒有說明每件事情的前因後果和細節,
花了一大堆時間在死背應付考試。
到頭來,現在還是全忘光了。

這本追尋現代中國,啃了好久終於啃完了。
雖然才短短三百多頁,可是讀來還是相當辛苦。

接下來,看其他類似的書應該會快一些了吧。

2010/03/10

聽說

R8060725.JPG
Parmelan.France

蠻好看的一部電影。
兩個女主角都很可愛,
男主角彭于彥演得也不錯。
雖然結果我看到一半就猜出來了…

2010/03/09

在天堂遇見的五個人

P5035533
Des feuilles verts
Marseille.France

坐車時看的。
心得的話…看別人寫的就好了。

Bouquet Final (Final Arrangements)

photo
Furano.Hokkaido

每次畫畫,都充滿驚喜,
期待畫完後,看到的結果。
很多時候,效果不盡理想,
但是為了那偶爾出現一兩次的成就感,
還是畫得樂此不疲。

****

就英文片名看來,還以為是什麼懸疑片或動作片。
就法文片名來看,就清楚多了,最後的花束。
這部片的主題跟日本的送行者一樣,是在講殯葬業者,
不過,法國人的拍法果然跟日本人有很大的差異。
整部片都沒有一絲的嚴肅的感覺,
很多橋段也很讓人發笑。

2010/03/07

電影

P6226749
Annecy.France

Pour elle. 劇情還蠻緊湊的。但是,這樣的結局,真的是好的嗎?

New York I love You
將很多小故事組合在一起,描述在紐約市中生活的形形色色的人。
很喜歡劇中某些橋段的配樂

Hot Summer Days 全城熱戀
一部電影,可以讓我前前後後看上四五個小時,我也真是會摸的。
又是部幾個小故事組合起來的電影。
片中不乏大明星,連張曼玉也有客串演出。
其中,我比較喜歡張學友和劉若英的那段,
徐若瑄跟張震那段也不錯,尤其是那便利貼在牆上的貼出來的愛心,
應該花了不少工夫吧。

2010/03/05

onlinedict by google app engine

PB173371
Central Station.NYC.US

I posted an article about using Google App Engine in last June, and the experiment target is the onlinedict. Everything goes well and since onlinedict is originally written in python, the porting task is without any efforts.

However, there's one limitation of using Google App Engine: You can get your codes back from the server. You have to keep your codes somewhere. That's quite strange as a policy. I know it may be easier to control the whole system on google side, but as a user, it's troublesome ofr me because I am too lazy to my stuff in another source control website.

As a consequence, I lost my codes after re-installing OS on my nb for several times. Although my original work still runs well, it looks bad on all mobile devices. The words are too small to read. However, I don't have original codes anymore! no way to improve it at all!

Finally, I decided to rewrite it again,since this website should help me most on mobile devices. If the outlook on devices are bad, then it is somehow useless to me. Well, the first thing to do is study again how to apply the google app engine framework into my dictionaries. With the help of the tutorial, I quickly achieved what I have done last time: a working fr-en, ch-en dictionary, and, plus eijiro dictionary!

The most difficult part (not really difficult at all, I just don't know how to do) is to adopt some css style to make it look great on mobile devices. Well, I found a good refernce site: http://building-iphone-apps.labs.oreilly.com/. And, it's free!

Okay, after several hours of work, I am happy with my new dictionary now. The font size is good, the input control is at the right position, with some hints in the box. Three online dictionaries are available. It's time to go to sleep again~~

2010/03/04

心情不好…心情不好…心情不好…

R8079420

為什麼會這樣…為什麼會這樣…
這要誰來承擔,誰來設法解決呢?
有參考書可以給我翻翻嗎?

跨界通訊 - 陳又津

昨天從圖書館借的書,一口氣把它看完了。很特別的題材,在講老人的社會問題,以及人為什麼不行自行決定生死,只能在醫院拖著已經殘破不堪的身體,直到最後短氣的那一刻。 書中還有提到想成為女生的男生,以及透過網路可以達到的一些社群效果。算是把一些現代的元素組合得蠻好的作品。 推薦。