Tuesday Oct 19, 2010

JAXB Compile Failure

When compile my code that uses JAXB with JDK1.5, I got an error "cannot access javax.xml.stream.XMLEventReader". There is no such error if I compile it with JDK1.6. The way to fix it is to include jsr173_api.jar in the classpath along with jaxb-api.jar, jaxb-impl.jar and jaxb1-impl.jar. This class javax.xml.stream.XMLEventReader is part of JDk1.6, that is why the compiling issue only happens to JDK1.5.

Thursday Jun 10, 2010

Snow Leopard

Days ago, I ownloaded an app. The installation failed because it is for Snow Leopard. I then realized that Mac OS X 10.6 had been released for a while, actually a year ago. I thought I should upgrade my macbook. It worked great, but should I give Snow Leopard a try?

[Read More]

Monday May 10, 2010


Yesterday I finished my first 20K trail run at Oakland Redwood Regional Park. I was surprised, I was totally impressed by myself. I am so proud of my time, less than 1:50 http://ultrasignup.com/results_event.aspx?did=8951. My best estimation before the race was within 2:30, as I neither run a long distance like this nor run a trail. Actually I hoped I could finish it by 3 hours.

Let me tell you how difficult it was. The elevation gain is 1,720 feet. Especially it started raining heavily for 20-30 minutes right before the race beginning. The trail was slippery and mud sticked to my shoes, made them not just wet but also much heavier. And it was cold. I should have worn a pair of gloves. But it was fun, a serous fun in Mother's day. Happy Mother's Day!

Friday Feb 05, 2010

CVS Branch Move, Delete and Rename

Today I have to move a cvs branch on a file. The cvs branch was created yesterday, but there was a new checkin needs to go into the branch. Instead of checking into the new branch, one can move the branch tag on that specific file. For example, to tag on revision 1.6 of a file

cvs tag -r 1.6 -F branch_tag file_name

[Read More]

Friday Nov 20, 2009

Non-active Facebook Account Will Be Deleted

(no subject)

Facebook is recently becoming very overpopulated,there have been many members complaining that Facebook is becoming very slow. Records show that the reason is that there are too many non-active Facebook members and, on the other side, too many new Facebook members.

We will be sending this message around to see if members are active or not. If you are active please send to at least 15 other users using Copy+ Paste to show that you are still active. \*Those who do not send this message within 2 weeks will be deleted without hesitation to create more space.\*

Send this message to all your friends and to show me that your still active and you will not be deleted.

Founder of Facebook,
Mark Zuckerberg

Do you receive a mail like this one? Don't know who made this up originally. But it is not a phishing mail for sure. Wondering what the purpose is this. Here is the response from Facebook Pass It On

Tuesday Nov 10, 2009


Received GC approval notice today. I didn't expected it that soon. Today is just 10th of November. I thought I would get it within this year. Waited 9 years. What a long time!

Thursday Nov 05, 2009

MySQL Error 1064

Seeing following error when adding new records to mysql DB:

ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read, ......

[Read More]

How to Prevent H1N1 - Best Advice So Far

Someone forward this one to me. Don't know where it originated. But it makes sense in my opinion.

How to Prevent H1N1 - Best Advice So Far(如何预防H1N1 - 来自医生的忠告)
N95口罩是用来阻隔95% 的0.3μ微粒,,而H1N1病毒的大小是0.1μ左右。所以,靠N95口罩防H1N1就像用蚊帐来挡雨。

[Read More]

Saturday Oct 31, 2009

US Daylight Saving Time Ends Today

Daylight Saving Time (DST) at US ends today. When checking when the DST ends this year, I read the history of Daylight Time in the US at here. It changed so many times. It is unexpectedly complicated.

[Read More]

Friday Oct 09, 2009

Lotus Touts

My kid sent me this circulating email talking about some Lotus Touts. I don't like email chain letters, but the Lotus Touts in this one is nice. I would like to follow this guidance if it is not too late.

ONE. Give people more than they expect and do it cheerfully.

TWO. Marry a man/woman you love to talk to. As you get older, t heir conversational skills will be as important as any other.

THREE. Don't believe all you hear, spend all you have or sleep all you want.

FOUR. When you say, 'I love you,' mean it.

FIVE. When you say, 'I'm sorry,' look the person in the eye..

SIX. Be engaged at least six months before you get married.

SEVEN. Believe in love at first sight.

EIGHT. Never laugh at anyone's dreams. People who don't have dreams don't have much.

NINE. Love deeply and passionately. You might get hurt but it's the only way to live life completely..

TEN. In disagreements, fight fairly.. No name calling.

ELEVEN. Don't judge people by their relatives.

TWELVE. Talk slowly but think quickly.

THIRTEEN. When someone asks you a question you don't want to answer, smile and ask, 'Why do you want to know?'

FOURTEEN.. Remember that great love and great achievements involve great risk.

FIFTEEN. Say 'bless you' when you hear someone sneeze.

SIXTEEN. When you lose, don't lose the lesson.

SEVENTEEN. Remember the three R's: Respect for self; Respect for others; and Responsibility for all your actions.

EIGHTEEN. Don't let a little dispute injure a great friendship.

NINETEEN. When you realize you've made a mistake, take immediate steps to correct it.

TWENTY. Smile when picking up the phone. The caller will hear it in your voice.

TWENTY- ONE. Spend some time alone.

Sunday Sep 27, 2009

MySQL x86 vs x86_64

Rails and mysql worked just fine for me. However, after updated rails today, I got lots of mysql errors. There are lots of recommendations I found on the net. But this is the one - Installing Rails 2.2 on Mac OS X - MySQL problem - resolved my problem.

Tuesday Sep 22, 2009

String as Primary Key

Sometimes, we want to set a primary key of a database table to be a string instead of integer. This is perfectly OK though not best.

However, seems this is not possible when creating tables by using ruby on rails. This post helps a lot.

The following is the sample code:

create_table :employees, {:id => false} do |t|
t.string :emp_id
t.string :first_name
t.string :last_name
execute "ALTER TABLE employees ADD PRIMARY KEY (emp_id);"

Wednesday Aug 12, 2009

Meteor Shower

With support of my wife, we inspired our body to go with us. We hit the trail around 9PM. The sun had set completely, but it was not dark. Street lights were so bright at night. We didn't need to take out flashlights.

[Read More]

Wednesday Jul 08, 2009

Firecookie, Firebug and Firefox

Updated my firefox to 3.5 yesterday, suddenly found cookie is no longer manageable on privacy tab. As I have to work on web applications, losing the ability of viewing and removing cookies is a big deal for me.

What to do? search the web as always. I found firecookie implemented by Jan Odvarko. You can go to mozilla site to add it. Note, it only works along with firebug. Good luck!

Monday Jun 29, 2009

Museum Free Days at SF Bay

Free 1st Sunday
Asian Art Museum - 200 Larkin st., San Francisco

Free 1st Tuesday
Cartoon Art Museum - 655 Mission St., San Francisco
de Young Museum - 50 Hagiwara Tea Garden Dr., San Francisco
Legion of Honor - 34th Ave & Clement St., San Francisco
San Francisco Museum of Modern Art - 151 Third St., San Francisco

Free 1st Wednesday
Exploratorium - 3601 Lyon St., San Francisco
Bay Area Discovery Museum, 557 McReynolds Rd. Sausalito, CA 94965

Free 1st Thursday
Berkeley Art Museum & Pacific Film Archive - 2626 Bancroft Way, 2621 Durant Ave, Berkeley
Burlingame Pez Museum - 214 California Dr., Burlingame

Free 2nd Sunday
Oakland Museum of California - 1000 Oak St., Oakland

Free 3rd Wednesday
California Academy of Sciences - 55 Music Concourse Dr., San Francisco




« June 2016