
butterfly.Taiwan
山形尖叫,因為有山形才看的。
好怪的一部片。
==
看同事都是用NX也不是vncviewer,所以我也上網找文件設定了一下。
果然速度快了很多,不會像vncviewer那樣,卡得要命。
https://help.ubuntu.com/community/FreeNX
http://www.nomachine.com/download-client-windows.php

Annecy.France
It's a small tool written to randomly show my photos from flickr. I quite enjoy viewing photos in this way. It helped me to discover photos that I didn't notice before. However, there are some limitations to it:
1. in current configuration, 10 photos will be shown every time I launch it. it takes too much time to do so. I have to wait for tens of seconds or even longer.
2. in GUI version, no thread is implemented, so the UI is blocked after the button is pressed.
To make it better, I did some minor changes:
1. create a thread for fetching photos from flickr, and use wx events to post event to htmlwindow. Don't know how to use lock or mutex under python yet, though...
import threading2. add a function to only return a photo info at a time, instead of returning a html file with 10 photo infos.
from time import sleep
(FetchDoneEvent, EVT_FETCH_DONE) = wx.lib.newevent.NewEvent()
class FetchThread(threading.Thread):
def __init__(self,w):
threading.Thread.__init__(self)
# windows for posting events
self.w = w
def run (self):
fi = None
for x in range(10):
print x
if fi == None:
(content,fi) = fetch_photo()
else:
content = fetch_photo(fi)
evt = FetchDoneEvent(source=content)
while (self.w.loading):
sleep(0.5)
wx.PostEvent(self.w, evt)
class MyHtmlWindow(html.HtmlWindow):
def __init__(self, parent, id ):
html.HtmlWindow.__init__(self, parent, id, style=wx.NO_FULL_REPAINT_ON_RESIZE)
self.Bind(EVT_FETCH_DONE, self.OnFetchDone)
self.loading = 0
def OnLinkClicked(self, linkinfo):
import os
os.startfile(linkinfo.GetHref())
def OnFetchDone(self, e):
#self.LoadPage("myflickr.html")
self.loading = 1
if self.start_fetching != 1:
self.AppendToPage(e.source)
else:
self.SetPage(e.source)
self.start_fetching = 0
self.loading = 0
class SimpleFrame(wx.Frame):
def __init__(self, *args, **kwargs):
...
def OnButtonClicked(self,e):
FetchThread(w=self.html).start()
self.html.SetPage("") Fetching......
self.html.start_fetching = 1
def fetch_photo(fi=None):
print 'fetch_photo'
if fi == None:
fi = FlickrIndex(API_KEY, SECRET_KEY, MY_USER_ID)
return fi.print_random_photos(10),fi
else:
return fi.print_random_photos(10)

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.
====
Link: Vimium
It not only shows the results correctly for you, but also removes the annoying ad window in the middle of the screen.
http://userscripts.org/scripts/show/33286
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/

Des feuilles.Annecy
Update (20090617)
I wrote a small app with this python library. Currently it can merely work. The speed is slow, but it works somehow.
And~~ the screenshots!
1. Login UI: well, that's almost you need to login your account




The UI is done by wxpython, so you have to install wxpython on your system if you want to test this program. And thanks for python's portability, I think it can run well under Linux too.
DOWNLOAD:
http://daniel.kao.googlepages.com/plurkao.zip
REF:
David - The Unofficial Plurk API in Python
Boa Constructor Download
http://plurkapi.com/http/methods

Autumn.Annecy
接下來是在寫這支python script時,需要注意的一些問題,和特別查到的資詢:
1. URL request時的Referer:無名小站從以前就一直被人垢病相簿不行外連,因為在抓圖時,它會檢查這個request是從哪發來的。為了要順利抓到照片,在程式裡必須塞一個假的,可以通過它檢查的網址給它。如此一來,就不行用單純的urllib完成,而得改用urllib2才行。
def GetURLContent(u):
req=urllib2.Request(url=u)
#req.add_header('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113')
req.add_header('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.9.0.11) Gecko/2009060215')
req.add_header('Referer','http://www.wretch.cc')
return urllib2.urlopen(req)
如上,先在request中加上Referer的header就可以了。
3. 抓的時候,記得要設一下sleep,不然抓太頻繁好像會被擋掉。所以每抓一張就加個sleep(10)或sleep(20)讓它休息一下。
4. 原本有打算把描述和標題塞到jpeg的exif裡頭的,可是編碼問題一直搞不定,所以算了。因為加了,一般的image viewer也看不到。
5. 用urllib2抓下image後,可以用read()讀出image的內容;存檔時記得開檔要用"wb"的flag,這樣子存出來的照片才能看。
6. 沒了。就這麼簡單。真想不通我怎麼搞了那麼久才寫好。
下載 DOWNLOAD:
http://daniel.kao.googlepages.com/WretchGrabPhoto.py
使用方式:
0. 先在電腦上裝好Python。
1. 把WretchGrabPhoto.py下載下來,放在隨便一個目錄
2. 用cmd開啟一個Dos視窗,進到該目錄,然後執行下面這行 (python執行檔的位置要看你灌的是哪一版而定)
c:\Python24\python.exe WretchGrabPhoto.py "the_url_to_the_first_photo_in_the_album" html_to_be_saved.html
3. 等它執行完,用IE或Firefox開啟你自己設定的html檔就行了
參考:
Read & Write JPEG COM and EXIF metadata [jpeg] [python] [image] [metadata] [exif]
fetidcascade.com - Python Exif Utilities
Team Programming Dragon.編程龍 » Blog Archive » 用 wget 抓無名單一相簿
下載無名Blog文章裡的圖片 | 無為閣
破解無名小站下載相簿照片作者: 井民全前言
下午出門騎好久沒有騎的腳踏車,
不然肚子愈來愈大了。

才騎沒多久,就開始下雨了。
在下狂風暴雨的前一刻,我躲進了某家7-11還是全家的騎樓,
在它外頭的桌椅旁看著大雨直直下,大風猛吹。
一旁一樣是在躲雨的路人,都在討論說,這跟颱風來了沒有什麼兩樣。
回程時經過景美舊橋。
目前舊橋好像要拆了 (廢話,都剩下不到一半長了)。
摩托車可以走一旁的便道。
汽車的話就得要繞道而行了。
回家後,很廢,什麼事都沒做。
週六就這麼結束了。
晚上吃了碗辛拉麵。
****

Hong Kong
I wanna try out how to write Android softwares on my borrowed Magic device. In order to take notes of my studies, I will write down something here for my later refernce.
1. System requirement and Installation

油條.Taipei
I've been using Firefox + vimperator 2.0 for quite some time. It makes my browsing experiences as smoothly as the silk. Today, I found some tips about how to make vimperator even better! These tips exist long before I found them. It's a pity that I did not do much survey on this before.
First of all, some key mappings to make navigation more easily:
map <c-c> Y
map <c-g> YP
map j 8<c-e>
map k 8<c-y>
map H gT
map L gt
style -name commandline-ime chrome://* #liberator-commandline-command input {ime-mode: inactive;}
http://github.com/VoQn/vimperator-colorscheme/tree
set guioptions=n/N
N means displaying the number on the tab icon; n means displaying the number after the icon.

Airport.Hong Kong
I saw the fly's eyes in the airport.
****

la feuille rouge.Annecy.France
我果然是衝動型買者。
雖然從eeepc最早期7吋版本上市,我就一直關注著這一塊市場,
不過我關心的可不是它會不會大賣,而是什麼時候要入手一台來玩玩。
沒錯,只是要玩玩而已。
因為上班已經有配電腦了,下班又有一台老當益壯的筆電在幫我養動物。
平常要看看影片,靠它完全不是問題。
所以,買來唯一的好處就是…玩玩而已,滿足自己的好奇心。
昨天又在pchome上不斷翻來覆去,最終還是下手了。
目前10吋系列的,如果不要超持久的電力,其實1萬上下就可以買得到。
之前我用過Asus的s200,所以知道9吋螢幕用起來的感覺。
這次還是選大一點10吋的。雖然攜帶上會麻煩一點,
但是舒適度會高很多。
最終,選定了1000HE,號稱擁有9.5小時電力的持久機。
很多人喜歡它的巧克力鍵盤,不過對我來說那並不是很重要的因素。
既然在s200上,打字就可以跟飛的一樣了,只要鍵盤比s200大,我都能快速適應吧。
之所以著重在電力上是因為…這樣子出門就可以不用帶充電器,也少掉到處找插座的麻煩。
不過,才到手一天,還沒機會讓它出去走走。
目前唯一比較另我討厭的缺點是:觸控板的左右鍵很難按!
要壓很用力才有反應。
其他的,so far so good...繼續熟悉中。
改天再把它改灌成linux吧。
REF:
Simple Ripper2
StreamRipper
****
Today, one of my colleagues asked me if I know any other tools that we can use to browse source codes efficiently. Well, it's a good question that I did not pay much attention with. While developing softwares with Visual Studio, it's common to only use its built-in intelligence engine. The intelligence engine can already fulfill most of the requirement of general programmers. If it's still notpowerful enough as a code browser, we usually use Source Insight as a second choice. Source Insight did a great job on cross referencing codes.
However, there's one drawback of Source Insight: it does not support unicode files so far. When it comes to unicode source files, you have only two options: first, convert all your source files into non unicode files, which is not a good way; second, use another tools to do the job for you.
Long time ago, I tried Source Navigator. So, I gave it another try with my current ongoing projects today. What I appreciate is, it can build the class heirarchy chart for me. The layout is clear enough to get a whole picture of class relationships. As for source code cross referencing, I found it a bit lousy and slow. Not sure if it's because my nb is not powerful enough.
REF:

YanmingSan.Taiwan
Lexipedia,一個好玩的網站,可以把一個單字相關的字詞用mind map的方式列出來。
可能可以增加記憶的速度吧。
REF:
http://lexipedia.com/
****
上週就發現到有這個展覽,
不過沒有一時衝動,趕在週末跑去。
4/18才開展,選在那個週末去,擺明是跟自己過意不去。
龐畢度,曾經在它門口外經過兩次,卻沒有一次有進去。
由此可知,我是個大老粗,對於這些博物館一點兒研究也沒有。
不過,既然人家都大老遠地從法國跑來台灣展覽,
看在票價不貴的份上,我還是找了一天去逛了一圈。
其中,最讓我欣賞的,還是米羅的藍色二號(是二號吧?)。
大塊的色彩,再加上點和線;畫畫何必搞得太複雜呢?
另外,衝擊比較大的是另一個個展:方力鈞的生命之渺。
一堆小光頭和蓮花,在天空中奔跑;
一個大光頭在水中游來游去,等等。
對於一個真正的畫家來說,重要的不是技巧(因為畫家人人都得具備),
而是想要透過做出來的作品表達什麼,怎麼表達。
看到牆壁上他的年史,他在我這年紀時就已經揚名國際了。
我還在原地蹉跎光陰啊…

Daan Forest Park.Taipei.Taiwan
像這樣子嗎?
有粗有細,長短不一的線?
我沒慧根,哈。
****
人是需要放鬆的。
自己的嗓門特別大,平常還得注意說話不行太大聲。
不過唱歌的話,就隨便了。
反正有mic,誰唱都一樣大聲。
****
吃飯時,覺得用滑鼠移來移去看新聞很麻煩嗎?
那來試試這個會自動跳新聞的Lunch Reader吧。
REF:
http://playpcesor.blogspot.com/2009/04/lunch-reader.html
****
原來GRD II 可以拍出這麼棒的照片。
我的GRD II 看了一定會哭的。
http://blog.ricoh.co.jp/GR/archives/2009/04/post_357.html

最近逛書店時,會順便再逛逛文具區。
目前缺的用具是,擦筆和軟橡皮。
擦筆可以用來磨畫紙上已經畫好的筆跡,
軟橡皮則是可以揉成任意形狀,利用按的方式來改變畫面的亮度。
這兩個我到現在還是沒找到。
不過,週日的時候倒是找到了這個:三角形的橡皮擦。
長成這種形狀,有了它之後我就不用再煩惱要把我的pentel橡皮擦轉到哪個角度才是乾淨的。
特地又買了一條橡皮擦芯。
這樣子夠我用上好一陣子吧。
(因為其實我不太用橡皮擦的…)

在中正紀念堂畫的。一直搞不清楚左邊是什麼廳,右邊是什麼廳。
畫得很亂,尤其是地板的部分。
太偷懶了,把廣場的地板畫得四不像。

今天一時心血來潮,想說這幅已經爛了,
就來用色鉛筆,沾上水來作畫試試看。
沒想到還蠻好玩的。
顏色深淺的控制比畫水彩容易,
而且不會有顏料一次擠太多的問題。
反正要畫多少,就從色鉛筆上沾多少下來。
只是,還不知道要怎麼混色。
好在我的色鉛筆是24色的,還頂得住。

最後,好久沒畫素描了。
昨天照著朋友寄來的DM畫了一張。
*****
在法國,有很方便的數位電視可以看。光是免收費的,就有十幾台。
現在,在iPhone上,各家業者也開始推透過3G network看電視的服務。
Orange推出的是TV from Orange。
你必須要加入一個月42歐元的xxx數據方案才能使用這項服務。
就Engadget iMobile的說法是…目前提供的都還是些怪怪的頻道。
反觀,SFR推出的頻道就正常多了,是平常看得到的頻道。
如果台灣的iPhone也推出類似的服務,
我大概也不會想用吧。
除非,日文頻道和TV5 monde都有被包含進去,
不然,我還是情願靠家裡的動物幫我網羅好東西。
REF:
http://blogs.lexpress.fr/conso/2009/04/les-pieges-de-la-video-sur-iph.php?xtor=RSS-188
http://www.engadgetmobile.com/2009/04/13/oranges-streaming-tv-app-for-iphone-goes-live-in-france/















