Wednesday, August 29, 2007

Missed call alert for Symbian phones (S60 3rd Edition)

Yesterday I missed a call from my boss when I was taking a day off. I didn't notice that until the evening. This is because my Nokia N80, diff from my previous Motorola E398, doesn't beep or vibrate or give any signal periodically when there is a missed call.

Writing a program to solve this is not difficult, just a matter of finding the API to check the status of missed calls. With Google, that is easy. The Central Repository is supposed to held the information.

// We need to query the central repository
CRepository* cRepository = CRepository::NewLC(KCRUidLogs);

TInt num;
// Get the number of missed calls
    cRepository->Get(KLogsNewMissedCalls, num));

But my copy of S60 3rd Edition SDK, Maintenance Release (with Carbide.c++ Express) doesn't has the definition of the constant KCRUidLogs . After some searches and guessing, it turns out that many functionalities of the S60 phones are not defined in the SDK. You will need to get the SDK API Plugin from Nokia.

Anyway, I tried to add the above code into a Hello World project that I have in Carbide. And it is working fine. I also used the CPeriodic class to set a timer to wake up the program periodically. It will beep when there are missed calls.

CPeriodic* iTicker;


const TInt KPeriodicTimerInterval5Sec(5000000);
const TInt KPeriodicTimerInterval3Min(1000000 * 60 * 3);

iTicker = CPeriodic::NewL(CActive::EPriorityStandard);
// start the timer
    TCallBack(PeriodicTimerCallBack, this));


  • Make the program to start automatically when the phone boot up. This will probably need me to request a developer certificate from Symbian Signed to sign the application.

  • Stop the application from being killed. When there is not enough memory, the OS will just kill some background programs to free up some memory for the foreground application. Need to find a way to prevent the alert program from being killed.


staying late in office to rewrite the spaghetti SQL code...

accidentally changed the input method from normal english to chinese 速成... and when i typed "query", it became 扎河... hmmm... reminded me of 雞扎 + 河粉... (yes, i know. normally these 2 things don't go together... usually ppl will just think of 扎肉河粉... but anyway)...

... yummy...

Tuesday, August 28, 2007

continue blue

after finished the catcher in the rye, i have started to re-read this:

the curious incident of the dog in the night-time

CK²III Headamp

Repost after HD crashed

Built this discrete headamp in early April. The Cavalli-Kan Kumisa III is a all-discrete amp. The op-amps are used for DC servo only.

The big blue caps are from Vishay BC... which I heard should be as good as Panasonic FC. The rectifier diodes are "hyperfast" RHRP860.

Monday, August 27, 2007


EDIT 20210416: the download files were lost when I moved the site from self-hosted machine to Blogger. Found the jar file from old backup though.

Repost. Lost this article when my HD crashed

The built-in voice recorder of my N80 phone is a bit crappy. Why do they limit the recording to just 1 minute?

Anyway, this is simple J2ME program that utilize the JSR 135: Mobile Media API to handle the recording part. The audio format is in AMR (change the source code if you want WAV). But too bad that I didn't sign the jar :P. So every time it starts to record, the system will prompt you for the permission of accessing user data and the multimedia devises etc.

Disclaimer: This application is for fun only. No guarantee whatsoever. Use at your own risk.

The application is available for download here. The source code is also available.

Saturday, August 25, 2007

the catcher in the rye

just finished the book... as expected, blue as hell... and found i really resemble the main character... yellow, childish, like to day-dream...

hope i won't end up in an institution eventually...

Anyway, I keep picturing all these little kids playing some game in this big field of rye and all. Thousands of little kids, and nobody's around - nobody big, I mean - except me. And I'm standing on the edge of some crazy cliff. What I have to do, I have to catch everybody if they start to go over the cliff - I mean if they're running and they don't look where they're going I have to come out from somewhere and catch them. That's all I do all day. I'd just be the catcher in the rye and all. I know it's crazy, but that's the only thing I'd really like to be.

~J.D. Salinger, The Catcher in the Rye

Wednesday, August 22, 2007




Tuesday, August 21, 2007

LCD Panel

Lost similar article when the server crashed. Just a quick recap before I forgot.

LCD panels are not created equal. Common panel types are TN, IPS, MVA, and PVA (reference: wiki). Generally speaking, if you want good color re-production, avoid TN panels as they usually have limited viewing angles and some can't even display full 24-bit colors. But they do have fast response time (meaning good for games and movies). IPS/MVA/PVA are a bit slower (some are much slower) but have better quality.

If you want to check the panel used in a specific monitor, go here. For instance, just type in "Eizo" and analyse the search result. You can see that the more expensive CG/CE models (that targeted the professional graphics market) used either the IPS or PVA panels.

You can also compare two particular 19" consumer grade models: the S1901 (6ms TN panel) cost around USD460 vs the S1921 (20 ms PVA panel) at around USD520 as of today. See the difference?

Sunday, August 19, 2007

Dance with my father - Luther Vandross

Back when I was a child
Before life removed all the innocence
My father would lift me high
And dance with my mother and me and then

Spin me around ‘til I fell asleep
Then up the stairs he would carry me
And I knew for sure I was loved

If I could get another chance
Another walk, another dance with him
I’d play a song that would never, ever end
How I’d love, love, love to dance with my father again

Ooh, ooh

When I and my mother would disagree
To get my way, I would run from her to him
He’d make me laugh just to comfort me
Then finally make me do just what my mama said

Later that night when I was asleep
He left a dollar under my sheet
Never dreamed that he would be gone from me

If I could steal one final glance
One final step, one final dance with him
I’d play a song that would never, ever end
‘Cause I’d love, love, love to dance with my father again

Sometimes I’d listen outside her door
And I’d hear how my mother cried for him
I pray for her even more than me
I pray for her even more than me

I know I’m praying for much too much
But could you send back the only man she loved
I know you don’t do it usually
But dear Lord, she’s dying to dance with my father again
Every night I fall asleep and this is all I ever dream

幾個月前在網上偶然聽到這首歌,但找了數間唱片店都找不到有這歌的CD。今天「出城」去買書送給朋友時,終於在書店附近的 HKR 找到了…


Thursday, August 16, 2007

super typhoon

As of Aug 16 evening... 有冇咁誇張... o_0

火息 車立



Shortly after moved to my new home, the HD on my ak47 machine went silent... and now finally it is back online again!!

Lessons learned:

- BACKUP! BACKUP! BACKUP!... Re-installing FreeBSD was fast... but configuring it back to the way it was really takes time. This machine serves as my web server, network router, mail server, firewall, VPN server etc. And the last backup I have is from a few months ago. The backup for the blog is even older... orz

- Upgrading Typo (my blog engine) is easy... Thanks to Postgresql and Ruby on Rails. I just needed to install the corresponding FreeBSD packages/ports. Followed by installing Gem and Typo. Then execute the blog's old DB backup script to recreate the DB structure. And finally execute

$ export RAILS_ENV=production
$ rake db:migrate

to upgrade the DB schema. 30 minutes later this blog is back to life (less the articles that were created in the last 6 months as I don't have the backup...@#$@#%#!$)