Friday, November 27, 2009

Une pièce de musique traditionnelle du japon « Sakura »

Mon professeur du cours de musique m'a demandé de trouver une vidéo de la pièce de musique japonaise qui s'appelle « Sakura » qui veut dire fleurs de cerise. J'en ai trouvé une. C'est belle.



Monday, November 23, 2009

World Wildlife Fund: Oil and Ice Tour: Are we giving up ice for oil?

I attended an event by World Wildlife Fund the other day.

It is incredible that one barrel of oil (natural gas) is used par three barrels of oil produced being extracted from tar sand. What a waste of natural gas!

The speaker said that in order to sustain civilization, the ratio of the energy used and the energy generated must be at least 1:5.

Saturday, November 21, 2009

Tokyo Cabient and rufus/tokyo table locking

This may be obvious but I just write it anyway.

It is from http://rufus.rubyforge.org/rufus-tokyo/Rufus/Tokyo/Table.html and what I tried out based on the information there.

1. When you instantiate Rufus::Tokyo::Table, it gets the default mode of :write and :create, which locks the table.

-> So instantiating another fails with "Rufus::Tokyo::TokyoError: (err 16) lock error".

2. If the mode is :read and 'f' (non blocking lock), multiple instances can be created and each can read.

-> But when one is with the mode :write and 'f' (non blocking lock), instantiating another with the mode :read and 'f' fails with "Rufus::Tokyo::TokyoError: (err 16) lock error".

3. When one is instantiated with the mode :write and 'f' (non blocking lock), instantiating another with the mode :read and 'e' (non locking) succeeds.

-> And you can read from either instances.

-> When you write a value with that first instance with the mode :write and 'f', you can read the value from that first instance. But in order to read the value from the other second instance with the mode :read and 'e', you have to first close it and instantiate a new one with the mode :read and 'e'. Otherwise, that second instance doesn't read the newly added value.

4. When multiple instances are instantiated in the same thread (e.g same Rails console), thread occurs with "Rufus::Tokyo::TokyoError: (err 1) threading error".

5. If table file is never created, the mode :create must be specified.

20th Anniversary of the fall of Berlin Wall

I wanted to write what I felt at that time but have been busy.

November 9, 2009 was the 20th anniversary of the fall of Berlin Wall.

20 years ago, I was thinking of visiting East Europe to be in the middle of the change. But I didn't because the only experience of traveling abroad that far was China and I wasn't sure if I could go around. Instead, I traveled to Malaysia, Singapore, and Australia.
That itself was a good experience. But I regret that I didn't go to East Europe at that time.

Looking back, after gaining lots of experience traveling abroad, I think I was able to go around there without a problem, finding a hotel, etc.

During these 20 years, what have I done?
Surely, my intention in my mind has been always doing something good, contributing to protect human rights and democracy, etc. But in reality, I haven't achieved anything in those long 20 years, caught up with unimportant things.