Sunday, October 3, 2010

My first piano lesson

Technically it's my daughter first piano lesson at Yamaha Music School. Yamaha Music School require parent to stick around for the first 2 years.

The lesson began with singing "Do Re Me". I was thinking to myself, "Are we here for singing lesson or piano lesson?". It imply began to make sense when we were asked to turn on the electronic piano. That's right Electronic Piano! All students use electronic piano, only the teacher has a real piano in front. The real deal sounds so much better. Back to the singing, the teacher was actually using singing as a way to remember the notes.

So my daughter went playing the notes "Do Do Do".
"It's Do Do Do; Not do do do." : said the teacher.

What's up? What's the diff? The timing was not correct. The kids are playing too fast.

Next come the treble clef, the five lines and where to draw Do Re Me. Finally, I'm learning how to read the musical score! Am I the one attending piano lesson or my daughter? This is really a great deal. I'm paying only for my daughter school fees and I get to attend free piano lesson too!

It turns out the first song they are learning is "Hot Cross Buns!" which goes "Me Re Do, Me Re Do, Do Do Re Re Me Re Do".

That's for today lesson. For homework, the kids have to go back and learn the next song "May had a little lamb".

How I wish the piano I ordered from piano master will come in sooner so that both me and my daughter can start practising. Till then, we can only practise with our fingers.

Friday, March 7, 2008

How to change password for AV Tech DVR

Step 1: Download and install remote management; click the Download AP button shown below:


Step 2: Login to DVR using the default username/password: admin


Step 3: Click on the System Config Button:


Step 4: Select the user account and click "EDIT" button


Step 5: Enter the new password you desire and click the "APPLY" button. You're done.

Monday, March 3, 2008

Configuring Internet Explorer 7 to accept Unsigned ActiveX Control for remotely viewing CCTV

For security reason, Internet Explorer 7 default configuration does not allow downloading of unsigned ActiveX Control.

The following instructions will guide users to configure Internet Explorer 7 to give user the chance to install Unsigned ActiveX Control.

Step 1: What you will see if Internet Explore 7 refuse to run the embedded ActiveX Control




Step 2: Click on the yellow bar and click Install ActiveX Control

Internet Explorer will display the following dialog if the ActiveX Control had not been signed by a key that it knows.


Step 3: Select Internet Option.


Step 4: Select "Security" Tab and click on the Custom Level button.



Step 5: Change "Download unsigned ActiveX Controls" from the default "Disable" to "Prompt"; Click OK to accept the changes.





Step 6: As in Step 2 click on the yellow bar and select "Install ActiveX" again. Click on the "Install" button when Internet Explorer 7 prompt you the following dialog.


Congratulation! If you are able to follow the above 6 steps, you should be watching your remote camera now.

Monday, January 14, 2008

A pool of water made my car dance.

Today is 14-Jan-2008, Day 1 of my Make Up Training (MUT) for the In-Camp-Training (ICT) I deferred last year. This ICT is going to last 23 days; the longest ICT ever. The timing cannot be any more worst as it stretch all the way till the day before Chinese New Year eve. When people are busy cleaning, decorating, preparing to welcome the new "RAT" year, I will be fighting a war in the forest.

The morning past uneventfully as we waited to be "adopted" based on the special trade we were trained in during our active days (BTW, I'm a trained SharpShooter). I was really hoping that they don't need me and maybe I will get to enjoy this 23days "holiday". Too bad for me, "B" Company is in need of a sharpshooter and I get "attached" to them for the whole of this ICT.

We spent the afternoon attending lectures, laying around, reading books.... Not as bad as I thought. Guess what, we get to have "nights off" on the 1st day of ICT. Not only that, we also get to book in next morning instead of 2359 on the same day. This is unheard of in my own unit. Hmmm.... I'm starting to like this unit. :D

It was raining heavily during the afternoon and the roads are all wet (more importantly very slippery). As I was driving home along Lim Chu Kang Lane 1, a pool of water by the side of the road caught my attention. I thought to myself, it's just a pool of water. Shouldn't pose any threat to me nor my car. How wrong can I be. I cannot really recall what actually happened as everything happened so fast. Beginning with my left tyre splashing the pool of water onto the side of the road. Due to increased drag on my front left wheels, my car skidded.... I remember trying very hard to steer clear of a few trees by the side of the road and to stay on the track. I have no ideas how my car had travelled during that scaring 1-2 seconds. All I can remember is my car came to a stop after a 180 degree spin.

It's a MIRACLE!!! I actually "drive" out of this alive, unharmed and my car - unscratched (except maybe for the 4 pretty new tyres). I thought that would be the end of my close encounter. Nope... Wrong AGAIN. While trying to turn my vehicle around, I drove my car onto the road side as I was too lazy to do a full 3-point turn. I should have known better not to do that. It had been raining and the road is wet and muddy. My 2 fronts wheel got stucked in the muddy roadside, unable to move forward nor backwards. When everything looks so dismay, a white Isuzu lorry (registration number: YK8687L) pulled over and offered to help. So they pushed and I pushed (the throttle).... the car just couldn't get back onto the track due to the depression formed by the muddy roadside.

They signalled me to drive the car forward a little bit and we tried again to push the car back on track. Another car drive up behind mine and it was so kind of the driver to help give a little push. With the help of these 3 man, my car finally got back on track once again.

I really want to offer my most grateful THANK YOU! to these 3 total strangers who offered their help unconditionally. It's really wonderful to know that people are so willing to offer their help in our country, Singapore. THANK YOU!

Thursday, January 10, 2008

Programmatically determining an interface IP Address in Linux - C

To determine the IP Adrress, Subnet mask or Broadcast address of an interface in Linux, programmer can use ioctl system call with SIOCGIFADDR request.

The third parameter to ioctl represents a pointer to the structure ifreq, defined in :

struct ifreq {
char ifr_name[IFNAMSIZ];/* Interface name */
union {
struct sockaddr ifr_addr;
struct sockaddr ifr_dstaddr;
struct sockaddr ifr_broadaddr;
struct sockaddr ifr_netmask;
struct sockaddr ifr_hwaddr;
short ifr_flags;
int ifr_ifindex;
int ifr_metric;
int ifr_mtu;
struct ifmapifr_map;
char ifr_slave[IFNAMSIZ];
char ifr_newname[IFNAMSIZ];
char * ifr_data;
};
};
  • ifr_name is the name of the interface for which information is to be retrieved. The OS/400 implementation requires this field to be set to a NULL-terminated string that represents the interface IP address in dotted decimal format. Depending on the request, one of the fields in the
  • ifr_ifru union will be set upon return from the ioctl() call.
  • ifr_addr is the local IP address of the interface.
  • ifru_mask is the subnetwork mask associated with the interface.
  • ifru_broadaddr is the broadcast address.
  • ifru_flags contains flags that give some information about an interface (for example, token-ring routing support, whether interface is active, broadcast address, and so on).
  • ifru_mtu is the maximum transfer unit configured for the interface.
  • ifru_rbufsize is the reassembly buffer size of the interface.
  • ifru_linename is the line name associated with the interface.
  • ifru_TOS is the type of service configured for the interface.
Sample code:
#include
#include
#include
#include
#include
#include
#include
#include

int main(int argc, char* argv[])
{
int socketd;
char szIPAddr[255];
char szNetmask[255];
char szBroadcast[255];
struct ifreq ifr;

socketd = socket(AF_INET, SOCK_DGRAM, 0);
if (socketd <= 0)
{
perror("socket");
return -1;
}

strcpy(ifr.ifr_name, "eth0");

if (0 == ioctl(socketd, SIOCGIFADDR, &ifr))
{
strcpy(szIPAddr, inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr));
}

if (0 == ioctl(socketd, SIOCGIFNETMASK, &ifr))
{
strcpy(szNetmask, inet_ntoa(((struct sockaddr_in *)&ifr.ifr_netmask)->sin_addr));
}

if (0 == ioctl(socketd, SIOCGIFBRDADDR, &ifr))
{
strcpy(szBroadcast, inet_ntoa(((struct sockaddr_in *)&ifr.ifr_broadaddr)->sin_addr));
}

printf("IP: %s Netmask: %s Broadcast: %s\n",
szIPAddr, szNetmask, szBroadcast);

close(socketd);
}

Friday, December 21, 2007

Changing Windows Vista Start Menu Power button to "Power Off"

Windows Vista come packaged with the power button configured to put the machine in hibernation mode instead of the usual power off which had been the default for all previous version of Windows.
If only hibernation works flawlessly, I would not mind leaving the setting as per default configuration. Sadly many applications, including Windows Vista itself, does not handle Windows resume properly. The network icon in taskbar can sometimes "disappear", application crashes upon resume, etc...
The behaviour of the start menu power button can be changed in the Advance Power Option; to get to it:
Control Panel -> Power Options -> Change Plan Settings -> Change advanced power settings.
In the Power Options dialog box, there might be more than 1 plan; on my laptop there are 3 plans, Dell Recommended, Power saver, and High Performance. Each will have its own set of advance power settings.


Another dialog box will appear upon clicking on "Change plan settings" as follows:

In the "Change Plan Settings" dialog box, click on "Change advanced power settings".

Finally, changed the Start Menu power button to your desired peference.
This is how my Start Menu looks like after changing it to "Shut Down".

Thursday, December 20, 2007

The revamped Straits Times Index - As on 8 October 2007

As on 8 October 2007, the Straits Times Index (STI) comprise 30 blue-chip companies on the SGX Mainboard ranked by market capitalisation as at 31 August 2007
  1. CAPITALAND
  2. CAPITAMALL TRUST
  3. CITY DEVELOPMENTS
  4. COSCO CORP SINGAPORE
  5. DBS GROUP HOLDINGS
  6. FRASER AND NEAVE
  7. GENTING INTERNATIONAL
  8. HONG KONG LAND
  9. JARDINE CYCLE & CARRIAGE
  10. JARDINE STRATEGIC
  11. KEPPEL CORP
  12. KEPPEL LAND
  13. NEPTUNE ORIENT LINES
  14. NOBLE GROUP
  15. OLAM INTERNATIONAL
  16. OVERSEAS CHINESE BANKING
  17. SEMBCORP INDUSTRIES
  18. SEMBCORP MARINE
  19. SIA ENGINEERING
  20. SINGAPORE AIRLINES
  21. SINGAPORE EXCHANGE
  22. SINGAPORE PRESS HOLDINGS
  23. SINGAPORE TECHNOLOGIES ENGINEERING
  24. SINGAPORE TELECOM
  25. STARHUB
  26. THAI BEVERAGE
  27. UNITED OVERSEAS BANK
  28. WILMAR INTERNATIONAL
  29. YANGZIJIANG SHIPBLDG HLDGS
  30. YANLORD LAND GROUP
Source: Singapore Exchange Limited (SGX)http://info.sgx.com/webnewscentre.nsf/bcb6f015b16e5258482569a7001af139/48256838002f07b14825736b003f8d7c?OpenDocument