30
Mar

无题

工作需完成,
健身靠坚持。
学车要开始,
生活得继续。

为何我却感受不到昔日激情,
莫非真已被打磨的如此润滑?

人生几回秋,
岁月莫蹉跎。
莫待回首空悲叹,
拼搏当从今日始。

26
Mar

Matching unicode characters in Regular Expression / 使用正则表达式匹配Unicode字符

search google for: 非英文语系字符范围

and here is the general result:

2E80~33FFh:中日韩符号区。收容康熙字典部首、中日韩辅助部首、注音符号、日本假名、韩文音符,中日韩的符号、标点、带圈或带括符文数字、月份,以及日本的假名组合、单位、年号、月份、日期、时间等。

3400~4DFFh:中日韩认同表意文字扩充A区,总计收容6,582个中日韩汉字。

4E00~9FFFh:中日韩认同表意文字区,总计收容20,902个中日韩汉字。

A000~A4FFh:彝族文字区,收容中国南方彝族文字和字根。

AC00~D7FFh:韩文拼音组合字区,收容以韩文音符拼成的文字。

F900~FAFFh:中日韩兼容表意文字区,总计收容302个中日韩汉字。

FB00~FFFDh:文字表现形式区,收容组合拉丁文字、希伯来文、阿拉伯文、中日韩直式标点、小符号、半角符号、全角符号等。

比如需要匹配所有中日韩非符号字符,那么正则表达式应该是^[\u3400-\u9FFF]+$
理论上没错, 可是我到msn.co.ko随便复制了个韩文下来, 发现根本不对, 诡异
再到msn.co.jp复制了个’お’, 也不得行..

然后把范围扩大到^[\u2E80-\u9FFF]+$, 这样倒是都通过了, 这个应该就是匹配中日韩文字的正则表达式了, 包括我們臺灣省還在盲目使用的繁體中文

而关于中文的正则表达式, 应该是^[\u4E00-\u9FFF]+$, 和论坛里常被人提起的^[\u4E00-\u9FA5]+$很接近

需要注意的是论坛里说的^[\u4E00-\u9FA5]+$这是专门用于匹配简体中文的正则表达式, 实际上繁体字也在里面, 我用测试器测试了下’中華人民共和國’, 也通过了, 当然, ^[\u4E00-\u9FFF]+$也是一样的结果

Also information on this page seems useful:

http://x.discuz.net/180642/viewspace_19070.html

_____________

TODO:

Add discussion about encoding, character-set and related issue.

19
Mar

Fitness Plan / 健身计划 [1]

I mentioned this topic in the other post last week, and today I’m going to tell what I feel about the first day.

With the supervision of my coach they assigned, I started this plan by taking a so-called warm up program — long distance running. 20 minutes at the speed of 8km/h, which I found was not so difficult for me later on. But it was really effective for I kept perspiring after doing that. During the rest time, I was told not allowed to eat or drink lots of stuff, including any wines, alcohol drinks, chafing dish, and my favourite: pork. But don’t be desperated as beef is strongly suggested. I wonder how long one can stick to this kind of diet, just trying my best.

more…

14
Mar

Taking driver training course in Shanghai [1]

I signed up for a driver training course today. This is the second significant decision that I made this year ( the first one is about Aerobics and physical care of my body which I mentioned in the other Chinese post several days ago).

The school that I chose is called “WanGuo”, not only because it is the largest here in Pudong, but also that the feedback from my colleagues indicates it’s not bad. so this is it. I will review the steps for this registration in case someone else needs it as well.

First you need to pick up a suitable school. There are plenty of them, choose one close to you, or those who promised to pick you up in front of your house, or those who have regular buses that pass by your home. Also the reputation is very important for that school, you can ask your friends, friends’ friends, co-workers, anyone you know or search the internet for information.

more…

07
Mar

The Difference Between a College and University

 Basically one of my colleagues discussed this with me this morning, and I googled it with the following answer (from: http://apps.carleton.edu/intl/looking/collegevsuniv/ )

—————————————————————–

College or University - what is the difference?

In a global context, the words “college” and “university” can inspire confusion. Different countries use the same words to name different things. What is usually called a “college” in Europe is really more like the two-year institution called a “Community College” in the U.S.

In the United States, when you ask someone what differentiates the two, the first response is likely to be “not much.”

How they’re basically the same:

  • While many factors affect the quality of an institution, the same type of Baccalaureate or Bachelor’s degrees can be conferred by both colleges and universities.
  • Admission requirements differ according only to selectivity-Highly ranked colleges are often more selective than universities.
  • Both colleges and universities can be either privately or publicly operated.
  • The phrase “going to college” is used to mean attending any university or college in the U.S.

How they generally differ:

  • Colleges tend to be smaller, with smaller class sizes and students receiving more personal attention from faculty.
  • Universities offer Masters and Doctorate degrees-requiring completion of the Bachelors degree first.
  • Universities tend to be larger, with faculty time and attention divided between research and teaching.
  • Some large Universities will have divisions named “The College of Liberal Arts” or the “College of Engineering.”

So, what are the benefits of a small “College” like Carleton?

  • Because of Carleton’s small size, Carleton students have more opportunity to work one-on-one with faculty on research and special projects than almost anywhere.
  • You’ll always be taught by professors at Carleton-not by graduate students. 95 percent of Carleton faculty hold the highest degree in their fields.
  • Carleton classes are small and engaging-the student faculty ratio is 11:1. Your professors will know your name and take an interest in your success.
  • Everyone has the opportunity to be involved in more than a hundred student groups-from athletics to politics to theatre.