Archive for the ‘Uncategorized’ Category

Basic way of backing up Xanga

六月 13, 2013

(Please share if you have a better way) The basic way to archive your Xanga:
1. Sign in (or click forget my “password") and go to
2. Generate an archive by clicking the button “Update Your Archives"
3. Wait until they are generated, the time it takes depends on how large is your blog. (Mine is mostly text so it’s done in a few minutes; if you have lots of photos then it will take longer.)
4. Download the zip file(s). That would give you the plain blog, black on white. No # views, but comments will be there.
5. Copy the CSS script from any of your page to see your blog in colour. That is, open up and check out the source code. Copy the block that starts with <style type="text/css"> and ends with </style>, then paste it into your page.

Meanwhile I’m looking for better ways to make it look and feel the same.

Nook HD+ cover

十一月 17, 2012

As opposed to a Google Nexus 7 or Kindle Fire or Apple iPad, the choices for a cover is limited and Barnes and Nobles wants $40 to $45 for one. I’m not paying that, so I decided to make one.

Since my 1st edition Nook is out of order the cover that I bought with it is essentially useless, so my plan is to rip it off and turn it into a new cover for my Nook HD+. Of course the new Nook has more than double the screen estate that means the material from the old cover is good enough for the front, like the smart cover (except it is not smart 😉 ).

Turns out the whole cover is glued not stitched together the two layers (synthetic leather and felt) can be separated easily. However the foam padding hold on to the plastic backing too tightly that I cannot separate it. This means the backings cannot be reused. So I had to use cardboards to make that up. Tools used are box cutter, scissors, Elmer’s glue, super glue, restickable tabs, permenant marker and clips. Elmer’s glue is applied whenever a large area needs to be glued together and super glue comes in when glueing up the corners. The restickable tabs are for mounting the finished cover to the back of the Nook.

I’ve also put some leftover synthetic leather on the right side of the Nook so the power button will not be depressed so easily, and to provide friction when the cover is used as a stand. It holds up the Nook at an angle of 15 degrees or less from vertical, and for anything more you need something heavy at the back (say water bottle) to keep it from sliding. Permenant markers are there to make the strip on the side inconspicuous.

I hope this thing will hold up against use. 🙂

P.S. I wrote something about the Nook HD+ here.

On Moral and National Education (MNE) in Hong Kong

九月 8, 2012

To my friends who want to know why I’m posting (spamming?) a lot of messages on facebook these days, here’s an article by NY times:

News coverage of the hunger strike all over the world can be found in this google map (pins in cyan; pink and yellow for protests again the patriotism class on 1st July and 29th July, resp.):

When we say this is going to brainwash our students, the government says it won’t. After some thoughts, it probably won’t brainwash them. But does that mean it’s okay? No. If government says it won’t, the hidden message could be what it’s teaching is not true, as witnessed in the teaching materials.* Why would we teach something that’s not true to our kids?

Now the government backed down and revoked the 2015 deadline for every school to start teaching the subject. This looks like a small victory for HK people, but I hope that they will not be fooled. Think about it. Till now only a few school stood up and say they are not going to implement it. What about others, especially those pro-Beijing or pro-government schools? How many of our kids will study in those schools?

The back down, which appeared a day before the legislative elections (on Sunday, 9 Sep 2012) is thought by many a way to mitigate the public animosity toward the education plan could hurt pro-Beijing candidates at the polls. Parents concern group recorded the LegCo candidates’ stance on Moral and National Education curriculum. From the list you can see not many say firmly that they support the curriculum. It’s understandable why that is the case. That would mean losing votes. More of the pro-government candidates are vague on their stance. The group also organized a map of the stance of different schools in Hong Kong, for parents’ and alumni’s information. Another student organization Scholarism also ask people to protest against the curriculum, the leader of which is only a 15-year-old high school student.

Arguments I have heard over these weeks also include: if we are teaching something that’s not true to our kids (and government say they are not brainwashed), what would happen is that we teach them how to live with lies, that you would write something in your exam that you do not believe. They will learn to cope with lies, and this is something that will seriously hinders the advancement of our country and our people.

There are also report saying the school management system (a computer system for managing info) has list for students who did not attend the MNE mainland learning trip (which, according to those who attended, covers achievements in mainland like the high speed trains and none of the things on the dark side like the accidents caused by the signal system). How can one say there’s no hidden agenda here?

Another thing I find it crazy is to ask students to assess their peers about their affection towards the country. You can assess me on whether I did the math correctly or not, but affection towards the country? No way. The curriculum guideline suggests that students should feel agitated when they see the national flag. What? One doesn’t need to be taught to love one’s country, right? This is to ask student to fake their feelings.

Oh, one incident that made many HK people furious is the words from our secretary for education Mr. Eddie Ng Hak-kim, who said “the majority of those who remained silent is supportive of the curriculum."  in a TV interview. What a distorted logic! We can’t remain silent any more.

What people attended the protest and hunger strike wanted is government to retract the subject, for we already have moral education, as well as Chinese history (which the education bureau made it a non-core class at the beginning of the millennium** and now not many study and I think it’s a pity). I hope people in HK will not be fooled.

There are more arguments than what I listed here (I’m sure I missed a lot more) and honestly I feel tired of having to read all those news about this MNE every day. This remotely reminds me a comment someone pointed out regarding the June 4th massacre in 1989: “I don’t want my kids to go to the candlelight vigils every year. Rather, I want the government to recognize what happened in 1989 was wrong and make it a holiday for memorial, and my kids can do whatever they want on that day instead of hanging on to it for years to come." I just hope there be fewer incidents like this that we Hong Kong people can focus on what we want to do (obviously going out there on the streets protesting in this hot weather is not fun).

* examples of which can be seen in one of the teaching handbooks, where it says (pardon my translation) “Content (essence?) of the Beijing Consensus – 4. Advanced, selfless and united ruling party" (original, as appeared in the handbook, p.10): “中國模式的內涵 – 四。進步,無私與團結的執政集團"). That’s a blatant lie. At the bottom of the same page, a panel titled “political parties fight against each other and the people suffer" (政黨惡鬥,人民受災) is referring to the US, where democrats and republicans rivaled against each other to be the ruling party, and as a means to canvassing reject the budget proposed by the other party which leads to closure of government and directly affecting daily lives of people. But the problem is, showing the “advantage" of the democratic centralism by giving this example is partial and biased. On the whole the handbook covered mostly the bright side of things, and the dark side like the internet censoring, harmful powdered milk and the crash between two high speed trains are left as an extended reading. (More controversial incidents like the Tiananmen massacre is not even mentioned.)

The handbook I was talking about can be obtained from (sorry, Chinese only): or

Even this handbook is to be ditched and not used in schools, the millions of taxpayer’s money has already been spent and the (allegedly pro-Beijing) organization who prepared this handbook has benefited from it.

** This is probably why our chief executive say this MNE is the result of 10 years of preparation (國教科是經過十年的蘊釀才推出的).

P.S. This is probably the lengthiest blog I’ve written in English so far. It’s pretty disorganized, I know.


七月 6, 2012







八月 21, 2011







P.S. 一直不知道"蒞"音同"利","有邊讀邊"並不適用。


五月 22, 2011


第一次整蒜蓉開邊蝦。唔記得落酒,加上蒜蓉唔夠蓉(應該用grater、石磨或者garlic press)。雪櫃仲有幾兩蝦,下次再試過。


More Nook comments

五月 22, 2011

To enable installing apps in NookMarket:

Twook (version: 0.0.8): consistently turn the screen off when I move from the password field to the submit button. Solution: press any page flip button to turn the screen back on in the login page. Reading tweets on Nook is great but tweeting one isn’t, because of the lower sensitivity of the keyboard compared to iPod Touch and you need arrow key to navigate to your typos and correct them (no spell check of course).

WikiLocker: allows you to lock your wifi so it doesn’t turn off (beware of battery drain), turn wifi off, keep touchscreen on, disable screensaver and stop adb.

It would be nice if there can be gamma settings in the pdf viewer—the CMR fonts commonly used in LaTeX appears to be thin on screen (both computer and Nook). I have yet to figure out a way to hack this:

The first one is the original APDFViewer output whereas the second one is an image processed with gamma=0.5 from the computer. PaperCrop will do this for you but the resulting file is huge because the pages are converted into images in PDF.

Bookshelves do not survive a reboot? Why?


五月 17, 2011

(This is not meant to be a detail review, just a few points that interest/annoy me.)

Chinese file name is supported, but for EPUB format books a CSS has to be added so that it will use the built-in font for displaying Chinese, or otherwise you’ll get ‘????’. For PDFs it relies on the built-in fonts for displaying Chinese.

The built-in Chinese font is okay, but if you think it’s not, you can slip in your own font.

Nook uses Adobe ADE (Adobe Digital Edition) to display PDFs and EPUBs. If you choose a font size that is too big for a page, it starts to reflow your document. The result may not be what you want: (i) words can be broken half way depending on the PDF, and (ii) formulas would be unreadable.
(There are 6 font sizes for you to choose from, but Nook only maintain a global setting which means you cannot have small for one file and medium for another—you must switch the font size every time. [Mine is on firmware ver 1.5])

The USB mode is good—no software needs to be installed on the PC side (although you may want to install Calibre—a free ebook management software)

Screensaver: choose between Cityscape, Nature (nice) and Authors (not that good). There are a couple of images in each set.

Charging light does not disturb reading—it’s at the bottom and you won’t see it from the front.

If you don’t crop the PDF it’s likely you’ll get sub-optimal results (a lot of white margins)

(cropped PDF)

After you have hacked (root) the Nook there’s another option for viewing PDFs (APDFViewer). When opening a PDF file it will ask you which one to use.

APDFViewer allows landscape mode. You need to crop the white margins of the PDF, though, because by default it does “fit to page" in portrait mode and “fit to width" in horizontal mode. Other zoom levels exists, but is limited to 25%, 50%, 75%, 100%, 125%, 150%, 200%, 250% and 300%. There’s no “panning" from the touch screen and buttons provided are minimal (from left to right: zoom level, rotate (upright or 90-degree clockwise; edit: long press for clockwise), page up/down (tap and hold for page selection slider) and quit. (as of ver 0.0.3)

As for cropping the PDFs, pdfscissors is free and nice but will leave a watermark at the first page and the last page (*edit, 13 Oct 2011: the watermark is removed in 0.0.2). PDFill PDF Tools (8.0) somehow produce files that Nook has trouble determining the borders. pdfcrop script is another option. (edit: Briss also works—thanks Ke Wu for pointing it out)

(edit: Documents made with LaTeX do not look so good because the Computer Modern Roman font does not look good on screen—the strokes tend to be thin.)

Instead of making a lot of edits there’s more comments here.

九月 13, 2010



…… 睇嚟係有小朋友搞鬼將啲label亂咁擺……
唯有用住先,唔啱再退貨。(因為試坐嗰張凳係真皮,貴成四十蚊美金… 過千銀港紙一張凳似乎太過貴喇。)

Dollar City. 類似香港既十蚊店,不過唔係每樣野都係一蚊。望落同雜貨舖差唔多。 (另外一間叫Dollar Tree既就真係全部一蚊…再加稅)

Target. 百貨公司一間。貨品被客人亂放一通,所以要用呢部機去check價錢…

My new home (cont’)

八月 25, 2010

This is my backyard. It’s very large.

With the blue sky it’s even better.

The landlord (who is another CS PhD student starting this year) brought me a bed. The timing is perfect that it came when I no longer want to sleep on the airbed (coz it hurts my back).

Other photos have been posted but due to time limitation*, I’ll write about the rest later.

* Originally we’ll have internet setup by today, but the Verizon guy came and say they have to dig up the road and lay the cable, which means we’ll not get internet this month… (oh my gosh!) We are trying to see if other companies can offer internet this week… Can’t imagine I’m going back to the university twice in a day, given the distance between my home and the university!