2010/04/28
2010/04/18
2010/04/17
French 20071010
feuille
la suède
la suisse
les Bays-pas
certe = bien sûr
turc -> turque
grec -> grecque
Ils habitent
Pérou -> péruvien
méditerranéens
de méditerrané
la riz cuit <-> cru
les sports aquatiques
nautiques
poissons crus
le denmark, les danois
phare
échiquier 棋盤
une mutation = un grand changement
ont eu à cœur = avoir envie = vouloir très fort
une priorité: la chose le plus important
dirigeants: les personnes qui conduit le pays
, viragule
km2 -> carré
sommet: 頂峰
francophones/francophiles (aime le ~)
62 ans -> l'âge de la retraite
1945 -> 1990 très belle période
au coude à coude: égale
en 1801: en mille huit cent un
:en dix-huit cent un
un recensement = compter la population
a crû = croitre = augmenter
cru -> croire
des jets d'eau naturels
pollution forte
ciel est toujours gris
large = étroit
grand != petit
le main -d'œuvre est moins chère
les 4 saisons sont très marquée.
la population est serrée.
beaucoup d'espace.
courant
l'avortement: abortion
récemment
la suède
la suisse
les Bays-pas
certe = bien sûr
turc -> turque
grec -> grecque
Ils habitent
Pérou -> péruvien
méditerranéens
de méditerrané
la riz cuit <-> cru
les sports aquatiques
nautiques
poissons crus
le denmark, les danois
phare
échiquier 棋盤
une mutation = un grand changement
ont eu à cœur = avoir envie = vouloir très fort
une priorité: la chose le plus important
dirigeants: les personnes qui conduit le pays
, viragule
km2 -> carré
sommet: 頂峰
francophones/francophiles (aime le ~)
62 ans -> l'âge de la retraite
1945 -> 1990 très belle période
au coude à coude: égale
en 1801: en mille huit cent un
:en dix-huit cent un
un recensement = compter la population
a crû = croitre = augmenter
cru -> croire
des jets d'eau naturels
pollution forte
ciel est toujours gris
large = étroit
grand != petit
le main -d'œuvre est moins chère
les 4 saisons sont très marquée.
la population est serrée.
beaucoup d'espace.
courant
l'avortement: abortion
récemment
2010/04/11
2010/04/09
2010/04/04
Flickr Random Image Picker
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)
訂閱:
文章 (Atom)
中國 App 商業模式 -- 王泌
很有系統地介紹了中國近幾年比較大的幾十個 app,包含他們主要的商業模式,投資者,和特色在哪裡。對於想要了解中國 App (網路服務) 市場的人來說,會是個很好的入門書。雖然已經是兩三年前的資料了,這兩三年又有了很大的變化,但依然是個很好的起點。
-
Sushi.Taipei le passe simple(簡單過去式),唯一一個還沒學到怎麼動詞變化的時態,所以趁還有力氣時,先把它寫一遍。這是一個主要用於書寫的時態。一般會話時,對於過去的事情,不是用l'imparfait就是用le passe compose在描述。了...
-
(山寺.日本) 幾乎快忘了當初有拍這張照片。記憶力真的愈來愈差了。 幾年前的藏王行,途中有在山寺稍做停留。 山寺是個小鎮,鎮上最有名的(或是目前我還記得的…),就是它建在山上的寺廟。 上山的路很陡,想必當初寺廟蓋得也很辛苦吧。 到了山腰或是山頂,就可以放眼往山谷和另...
-
(Jellyfish.Osaka.Japan) 去水族館看水母,已經成了到各地水族館既定的行程。在微光下,要拍攝出動人的水母照片,難度頗高。若是能拍攝到,當天的心情一定會特別好。 **** 新版的教育廣播電台網站,把原先可以直接下載的連結全變成了網頁。有些課程只能線上...