Archive for May, 2010

java string split - escape |

Wednesday, May 19th, 2010

You read the java doc. Yep, super easy.

String s=”a,b,c”

String () aStr=s.split(”,”);

aStr will hold

A b c

How about if s is “a|b”?

Before pulling your hairs off, here is the answer:

S.split(”\\|”);

Do think about it why, though.

Answer: Because | and \ are special characters in java so you have to escape them.

N900 tips: how to activate scim-googlepinyin?

Tuesday, May 4th, 2010

You installed it, but just could not make it work.

Trick: check if there’s a file called /etc/event.d/scim; If yes, just delete it. Wola, after that, CTL+SPACE, you’ll see Chinese characters prompted.