Friday, October 29, 2010

Change Oracle Password

Just a note to remind myself how to change the password for GCSS.

Goto "Start", "Run"
type
sqlplus username/password@tnsnameconnection
type
password
enter old password
enter new password an confirm new password.
A message will appear on success.
CTRL-C to exit.

Wednesday, October 27, 2010

Junk Mail Proof Letter Box and SingPost

Regarding the Junk Mail Proof Letter Box and SingPost. Town Council simply ask me to opt out (according to their reply to me). They are not going to stop SingPost.

According to ST reporter Irene Tham in her article "Locked out of Competition?", IDA replies "it is not an area that the IDA policies."

SingPost has a reply in Stomp. They are obligated to deliver "addressed or unaddressed."

So what is the result? No where to turn to.

Well in that case we should be obligated to return it via the "return mail" letter box as the junk mail is "wrongly addressed". Don't throw it away as it is deemed by SingPost as legitimate. If you throw it away you are unethical. You are throwing away an admail which is "not addressed to you" and which SingPost deemed it as legitimate "mail".

Since the admail is not addressed to you, it should be a wrong delivery as it is not addressed to you. You are, therefore, obligated to return the wrongly delivered mail to the sender via SingPost. In this way, you keep the lobby area of your HDB Block clean and did a good civil service. SingPost can't complain that you throw junks into the "return letter" letter box otherwise they slap themselves.

Tuesday, October 26, 2010

SingPost and Junk Proof Letter Box

It used to be quite disgusting when your fellow residents simply drop the junk mail on to the floor in front of the Letter Box. Like myself, they are also so sick of the countless daily dosage of the junk mail. I still remember the first day when I moved in and checked the letter box. It was jam packed with junk.

The installation of "junk mail proof letter box" seemed to be a timely relief.

Actually the new letter box come as a surprise. There was no letter informing us of the change. One day you walked to the letter box and find empty and void at the place where it used to be. Then you notice some stickers with arrow pointing you to the new location.

The newly moved letter box looks totally shameful. It was dusty and dirty all over. Dust was even found inside the letter box. How the dirt gets into the letter box is anybody's guess. Since my letter box was actually at the side of the letter box set, I think the worker actually puts his hand into my letter box as a grip support.

It goes on for a few week till there is a letter informing us to collect the new letter box. I was quite glad when the keys was collected. It signals the new era of "No Junk Mail".

When I get the first ever junk mail from the letter box. I was quite surprised. How did the junk mail get into the box. The lid on my letter box is openable but is latched and can only be unlatched from the inside after you opened the letter box with your key.

On the next day, I happened to go downstairs and a post delivery man was putting in mails. I realize that he actually put in a junk mail into the letter boxes. I also noticed that there are quite a lot of fliers on his bike when he moved the bicycle pass me. Now, how did this happen? Then I realize that SingPost was privatized. This is, perhaps, another way they could earn money.

Since my new letter box is junk mail proof type, I would think that it is designed to prevent junk mails from getting in. Even the mail delivery person has no rights to put in junk mails right?

I wrote in to SingPost to check out. Their reply is candid. They simply say that they do put in "admail" and even indicate to me the schedule of what junk mail they put in.

Stop there! Why are they doing it? Is it not my letter box is now "junk mail proof"? On what authority can they put in "junk mail" while all others are now not able? If they can put in one, what is stopping them from not putting a whole bundle of it. In which case, what then is the "junk mail proof letter box" is for huh?

Does the Town Council install the "junk mail proof letter box" to benefit us or SingPost? Surely the former is the case. If SingPost can bypass that purpose and enjoy the monopoly of it then I may ask again "who benefits from the junk mail proof letter box"?

I am writing to MP, Town Council, forum, blogs, facebook etc. to highlight this strange behavior of SingPost. Hopefully more people can query the various authorities of this oddity.

Thursday, October 21, 2010

Enter Foreign Language for some applications

Modern program usually allows Unicode displays and input. However, many programmer still does not cater to Il8n (Internationalization). How then could I input and read Simplified Chinese instead of English in these programs.

Microsoft did provide some help however limited it is. You could set one language as the "system locale". According to Microsoft help "the system locale is the language that is used to display menus and dialog boxes for programs that do not use Unicode."

Setting it is simple.

  1. Go to "Control Panel".
  2. Click to open "Regional and Language Options".
  3. Click "Administrative" tab.
  4. Under "Language for non-unicode programs 'system locale'", click "change system locale".
  5. Choose the language of your choice and click "ok".
The above applies to Vista only. Also, you would have installed the Simplified Chinese IME. If you can't get it from Microsoft. Go to Google and search for "google IME". Unfortunately, there are only two IME available. The other one is Japanese IME.

I am not sure if Google selectively show IME available for the region. I sure hope so.

Wednesday, October 20, 2010

Testing Ajax

I normally create Ajax that calls a PHP which generates the XML code.

If the PHP page generates the XML nicely, Ajax will be able to process the data accordingly. However, if there is a PHP error, Ajax will not return the correct result.

Testing the called page is a headache if you use IE.

For example, if the page has a missing parameter

IE will show "The following tags were not closed:yourxmltag....". If you try to "view source", IE will tell you "The xml source file is unavailable for viewing".

Firefox will at least tell you that "SQL failed". At lease Firefox shows the php error when "view source".


Monday, October 18, 2010

SSIS Editing

When I start to use SQL SERVER 2005, I have no idea how to change the legacy DTS packages migrated from the old version of SQL Server to a SSIS package. It took me a long time to find myself around how to edit SSIS before I manage to create one SSIS package. In the process, I actually have to install Visual Studio (visual basic).

I changed a new laptop recently. To my surprise, the visual studio express series is available but I don't seems to be able to download it. There is no link to download it at all even though the Microsoft MSDN download shows the page.

Searching the internet actually turns out the fact that SQL Server itself has the tool to edit SSIS without installing Visual Studio externally. The installation is in the install disk 2 (tools). It is under Client Components, Business Intelligence Development Studio. When you select this option, the installation will actually install Visual Studio and with it the BDIS.

Friday, October 15, 2010

IF ELSE using Ternary condition.

I used to code simple if/else condition codes for simple operations. For example,

if ($x > $y)
$mycolor="red";
else
$mycolor="green";

echo "$myvalue";

It is just a if/else condition.

I have just discovered that there is a simpler method to do so. This is by the Ternary conditioning ?: code.

The example can be made simpler as follows

$mycolor= ($x > $y") ? "red" : "green";
echo "$myvalue";

It sure makes thing easier and less coding.