Monday, September 29, 2014

Singtel, M1, Starhub Multi-SIM - Setting to Primary SIM



If you are using any of the Singtel, M1 or Starhub Multi-SIM cards, you will have 2 or more SIM card.  However only 1 will be the Primary SIM card.  The rest will be Secondary SIM cards.


Primary SIM cards are able to call out and receive calls
Secondary SIM cards are only able to call out


In order to switch any card to a Primary SIM card, please key in the following in dialer:

SingTel: Dial *141# and press call.
StarHub: Dial *118# and press call.
M1: Dial *136# and press call.


Sunday, September 7, 2014

China Prepaid cards balance enquiry

China Telecom

http://www.189.cn/bj/
Send "1" to "10001".  It will return with a menu of all options.
Send "101" to "10001".  It will return your remaining prepaid value.


China Mobile
Send "113" to "10086".  It will return your remaining prepaid value.


China Unicom
Send "YE" to "10010".  It will return your remaining prepaid value.


Monday, May 26, 2014

Adding Endpoints in batch for Microsoft Azure Virtual Machines

For Virtual Machines in Microsoft Azure, you have to create Endpoints in order for traffic to enter your VM.

You can add Endpoints using the Azure Portal, but you can only do it one at a time.  This is very tedious.

You can use Power Shell to add the Endpoints too.

Start > Windows Azure > Windows Azure PowerShell

This will launch the Windows Power Shell with Azure support.
Execute this command to retrieve the "PublishSettingsFile" for your Azure account.

Get-AzurePublishSettingsFile

This will launch the Windows Power Shell with Azure support.
Execute this command to retrieve the "PublishSettings" file for your Azure account.
Save the PublishSettings" file in your root drive for easier access for the next command.
Execute this command to install the certificate into your certificate store and configure your subscription settings for PowerShell.

Import-AzurePublishSettingsFile "C:\myAzure.publishsettings"

Now you are ready to add the Endpoints in batch mode.
You need to replace the "CloudServiceName" with the name you used in the "Cloud Services" of your Azure account.  Then you need to replace the "VMName" with the name you used in the "Virtual Machines".

You can modify the code to specify your port ranges and the TCP or UDP endpoints.


$vm = Get-AzureVM -ServiceName "CloudServiceName" -Name "VMName";

$i=23401
do
{ 
 $vm |
 Add-AzureEndpoint -LocalPort $i -PublicPort $i -Name iPerfU$i -Protocol TCP | 
 Update-AzureVM; 
 $i+=1
}
until ($i -gt 23409 )

 

Tuesday, December 10, 2013

Windows 7 - Disable signature verification of drivers

Windows7 natively blocks unsigned drivers, preventing the installation of these drivers and making the device you want to install useless.

To get around this you must temporarily disable the signature verification process.

Solution

Disable signature verification of drivers:
  • Go to Start Menu > Run and type the following command:
    • bcdedit /set nointegritychecks ON 
  • Restart the PC and install the unsigned driver
  • To enable back the signature verification, type the following command:
    • bcdedit /set nointegritychecks OFF
  • Restart your PC

Thursday, December 20, 2012

How to get Huawei E220 dongle to work in Windows 7

  • Connect the E220 – Windows 7 will only recognize a new USB Mass Storage Device and a CD drive.
  • Open the Device Manager
  • You will see the “Universal Serial Bus controllers” Section.  Look for "USB Mass Storage Device" under this section.
  • Find the one that is related to the E220.  If you see several "USB Mass Storage Device", try unplugging your other USB devices.
  • Right click on the "USB Mass Storage Device" and select “Update Driver Software”
  • Select “Browse my Computer”
  • Select “Let me pick” section at the bottom
  • Un-check the  “Show compatible devices” option.  This will show you a list of Manufacturer and Models.
  • Select “(Standard USB Host Controller)” in the Manufacturer Tab.  This entry is near the top of the list.
  • Select “USB Composite Device” in the Model Tab
  • Click "Next" button to finish installation
  • Disconnect and reconnect your E220 to reinitialise the E220 software
  • It will then pick up the E220 as a modem

Wednesday, June 27, 2012

SingTel, Starhub, M1 APN Settings

SingTel

  • APN: e-ideas
    • Username: 65ideas
    • Password: 65ideas
  • APN: internet
    • Username: LEAVE_BLANK
    • Password: LEAVE_BLANK

Singtel(HiCard Prepaid)
  • APN: hicard
    • Username: 65
    • Password: 65ideas

Starhub

  • APN: shwapint
    • Username: LEAVE_BLANK
    • Password: LEAVE_BLANK
  • APN: shwap
    • Username: LEAVE_BLANK
    • Password: LEAVE_BLANK

Starhub (MaxMobile Prepaid)
  • APN: shppd
    • Username: LEAVE_BLANK
    • Password: LEAVE_BLANK

M1

  • APN: sunsurf
    • Username: 65
    • Password: user123

M1 (M Card Prepaid)
  • APN: miworldmcard
    • Username: 65
    • Password: user123


Number to dial : *99#

Monday, June 25, 2012

Retrieve FileZilla FTP Password


You have created a FTP Site in FileZilla site manager.  Some months later, you forgot the password to the FTP Site.

Is there any way to retrieve the password stored in the FileZilla site manager?
Some version of FileZilla store its password in plaintext.  Meaning, you just need to open the file using Notepad and you can see the password.


The following files are what you need to know about:
filezilla.xml – Stores most recent server info including password in plaintext.
recentservers.xml – Stores all recent server info including password in plaintext.
sitemanager.xml – Stores all saved sites server info including password in plaintext.
These files can usually be found in the following directories:
Windows XP/2K: “C:\Documents and Settings\username\Application Data\FileZilla”
Windows Vista: “C:\Users\username\AppData\Roaming\FileZilla\”

Friday, February 3, 2012

How to get RSS feed from Twitter ?

If there is a Twitter feed that you want to add to your RSS reader, just use the following URL format.

https://twitter.com/statuses/user_timeline/ChannelNewsAsia.rss

Replace the account "ChannelNewsAsia" with the account that you want.

Friday, December 2, 2011

《永远吃不肥2 》Buffet Buffet 2

《永远吃不肥2 》Buffet Buffet 2
October 2011

Episode 1
Dinner with Dai Yang Tian and Zhou Ying

Below $20

Bumbu Restaurant
44 Kandahar Street
Singapore 198897
Between $20 - $40
Grand Park Orchard
270 Orchard Road
Singapore 238857
Above $40
Todai Singapore
2 Bayfront Ave #B2-01 The Shoppes @ Marina Bay Sands


Episode 2
Lunch with Bryan Wong and Adam Chen

Below $20
Khansama Tandoori Castle
8A Biomedial Grove, Biopolis, #01-20, 21, 22 Immunos
Between $20 - $40
Buffet Town
252 North Bridge Road
#B1-44E Raffles City Shopping Centre
Above $40
Oscar's
Conrad Centennial Singapore
Two Temasek Boulevard


Episode 3
下午茶 with Constance Song and Pan Ling Ling
Below $20
汕头海鲜 @ Toa Payoh
Blk 181 Toa Payoh Lorong 4 #02-602
Between $20 - $40
Orchard Cafe @ Orchard Hotel
442 Orchard Road
Above $40
The Landing Point @ Fullerton Bay Hotel
80 Collyer Quay


Episode 4

Supper
Crystal Café porridge
谭鱼头 steamboat
Z'en Japanese Cuisine



Episode 5

Brunch
Tung Lok Seafood @ East Coast
Shabuya (shabu shabu)
Basilico @ The Regent


Episode 6

Breakfast
Nostalgia Hotel
Straits Café @ Rendevous Hotel
One-Ninety @ Four Season Hotel


Episode 7

Special Flavor
Kantipur Tandoori Restaurant (Nepalise Food)
Beirut Grill (Lebanese Food)
Don Quijote (Spanish Tapas)


Episode 8

Semi-Buffet
Brizo Restaurant @ Park Hotel Clarke Quay
Café 2000 @ M Hotel
Ristorante Bologna @ Marina Mandarin



Episode 9
Romeo Tan, Hong Huifang
SuanThai Restaurant
Chang Korean BBQ
The Square @ Furama Riverfront Hotel
 
 
Episode 10

Lunch Buffet


1) 莲心素食餐厅
Quality Hotel (二楼)
2) 鲜得来 @ Nex
3) Rise Restaurant

Sunday, September 4, 2011

How to Minimize Skype to Windows 7 System Tray (Notification Area)

On Windows 7, Skype default behavior is to minimize to the Task Bar.  On Skype dialog, clicking the Minimize button or the "X" (Close button) will both cause Skype to minimize to the Task Bar.

Here’s how to minimize Skype to system tray (notification area) on Windows 7.
Using Skype Built-In Method
  1. In Skype, go to Tools -> Options.
  2. Then, click on Advanced tab to go to Advanced settings.
  3. Uncheck (or untick) the Keep Skype in the taskbar while I’m signed in option.
  4. Click Save.
Now when you click the "X" (Close button), Skype will minimize to the System Tray (Notification Area).
Note : clicking the Minimize button will still minimize to the Task Bar.


Tuesday, December 28, 2010

How to enable multi-region on DVD Drive Matshita UJ892

In a typical laptop DVD Drive, you will only have 5 times to set the Region Code of the physical drive.

You can patch the DVD Drive's firmware to allow unlimited setting of the Region Code.

This entry is tested for Matshita DVD Drive model UJ892 only.

1. Download the firmware flashing tool : "MatshitaWinDump" and "MatshitaFlash".
Link here
2. Follow the instruction on the website to do the backup of your DVD Drive's firmware and to create a patched firmware.
3. Follow the instruction on the website to run the flashing program to flash to the patched firmware.
4. Install DVD43 to enable decrypting of your DVD.
Link here

Wednesday, December 15, 2010

Simulating keypress

The following code will allow you to simulate the keypress of the keyboard.
This function accepts a string to simulate typing them. It will press the Enter key at the end of the simulation. The code will handle pressing of the "Shift" key when needed.

C++ Source code. MFC.

===============


void SendKeypress(CString strText)
{
int len, i;
char c;
len = strText.GetLength();
for (i = 0; i < len; i++) {
c = strText[i];
WORD vkey = VkKeyScan(c);
WORD shift = HIBYTE(vkey);
BYTE scan = MapVirtualKey(vkey, 0);
if (shift) {
keybd_event(VK_SHIFT, MapVirtualKey(VK_SHIFT,0), 0, 0);
}
keybd_event(vkey, scan, 0, 0);
keybd_event(vkey, scan, KEYEVENTF_KEYUP, 0);
if (shift) {
keybd_event(VK_SHIFT, MapVirtualKey(VK_SHIFT,0), KEYEVENTF_KEYUP, 0);
}
}
// Press "Enter"
keybd_event(VK_RETURN, 0x1c, 0 , 0);
keybd_event(VK_RETURN, 0x9c, KEYEVENTF_KEYUP, 0);
}

Simulate clicking of mouse buttons

The following code allows you to simulate clicking of the mouse button programmatically.
It will remember the current cursor position, move to the coordinate to click, perform the click and restore the cursor position.

C++ source code.

===============

void ClickOnPoint(int x, int y)
{
POINT prevPt;
GetCursorPos(&prevPt);
SetCursorPos(x, y);

mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);

SetCursorPos(prevPt.x, prevPt.y);
}

Check whether a file exist in C++

The following code allows you do check whether a particular file exist.

C++ source code. Using Shell API.

=======

BOOL CheckFileExist(LPCTSTR lpszFullPathName)
{
BOOL bResult = FALSE;
SHFILEINFO shfileinfo;
if (SHGetFileInfo(lpszFullPathName, 0, &shfileinfo, sizeof(SHFILEINFO), SHGFI_DISPLAYNAME) != 0) {
// File Exist
bResult = TRUE;
}
return bResult;
}

Monday, October 25, 2010

How to extend Windows XP grace period

When you install a fresh Windows XP, you are given 30 days grace period to activate the OS. You can use the following method to extend the grace period by another 30 days.

You have to do this before your grace period is over.
eg, 1-2 days before it activation is required.

Steps:
1. Open a command prompt.
2. Copy and Paste the following into the command prompt.
rundll32.exe syssetup,SetupOobeBnk
3. Launch Event Viewer (from Administrative Tools in Control Panel). Click on "Application". You will see 1 entry called "Windows Product Activation".
4. Double click on that entry and you will see this "Your Windows product has not been activated with Microsoft yet. Please use the Product Activation Wizard within 30 days. ".
5. Now you have another 30 days of grace period again.

You can repeat this process when the 30 days is ending again. However, you can only do this for 3 times. After that, this method will not work.

Monday, August 30, 2010

Failed to install Visual Studio 2008 SP1

If your system has Microsoft Office installed, you may encounter problem when installing Visual Studio 2008 SP1.

The log shows the "Visual Web Developer" is causing the error.

Here is a solution that works for me. You can give it a try.

=======

Rename (or Delete) these two registry keys:

HKEY_CLASSES_ROOT\Installer\Products\00002109120000000000000000F01FEC

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00002109120000000000000000F01FEC

Renaming the directory

C:\Program Files (x86)\Microsoft Web Designer Tools\VWD

To

C:\Program Files (x86)\Microsoft Web Designer Tools\Junk



(source : http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/315c7885-e680-4a83-b6a5-8a2795f596ea )

Tuesday, August 24, 2010

WinMobile - How to receive SMS

Windows Mobile, C#

Using MessageInterceptor object to receive SMS.
This is not able to read SMS already in the Inbox.


using Microsoft.WindowsMobile.PocketOutlook;
using Microsoft.WindowsMobile.PocketOutlook.MessageInterception;

MessageInterceptor _interceptor = null;

private void Form_OnLoad(object sender, EventArgs e)
{
_interceptor = new MessageInterceptor();
_interceptor.MessageReceived += new MessageInterceptorEventHandler(Interceptor_MessageReceived);
}

void Interceptor_MessageReceived(object sender, MessageInterceptorEventArgs e)
{
SmsMessage msg = e.Message as SmsMessage;
if (msg != null)
{
System.Diagnostics.Debug.WriteLine("From: " + msg.From.Address);
System.Diagnostics.Debug.WriteLine("Body: " + msg.Body);
}
}

WinMobile - How to retrieve a web page

Windows Mobile, C#

The following function is for retrieving a web page from given URL.

bool RetrieveWebPage(String strUrl, ref String strReturn)
{
bool results = true;

try
{
HttpWebRequest request = (HttpWebRequest)System.Net.WebRequest.Create(strUrl);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream receiveStream = response.GetResponseStream();
StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
StringBuilder strbuilder = new StringBuilder();

while (readStream.EndOfStream == false)
{
strbuilder.Append(readStream.ReadLine());
}
response.Close();
readStream.Close();
strReturn = strbuilder.ToString();
}
catch (Exception e)
{
strReturn = "";
results = false;
}

return results;
}

Wednesday, May 12, 2010

Outlook error "Unable to open the Outlook window"

Yesterday I encounter an error in my Outlook. It is able to run but when it at the stage of opening the email window, it prompts the error "Unable to open the Outlook window". Or something similar, I can't remember the exact text.

I did some tracing and found that it is trying to read something from a XML.
C:\Documents and Settings\\Application Data\Microsoft\Outlook\Outlook.xml

My copy of the XML file is corrupted. Fortunately, I have a backup of it. I replaced the corrupted copy and my Outlook is back working.

Sunday, April 25, 2010

MapInfo : Setting default drawing Style

How to set the default drawing Style for the AddMapTool ?

AddMapToolProperties addMapToolProperties = mapControl1.Tools.AddMapToolProperties as AddMapToolProperties;
CompositeStyle cs = addMapToolProperties.CompositeStyle;
LineWidth lw = new LineWidth(5, LineWidthUnit.Pixel);
SimpleLineStyle ls = new SimpleLineStyle(lw, 2, Color.Blue, false);
addMapToolProperties.CompositeStyle.LineStyle = ls;

You create the AddMapToolProperties and change the CompositeStyle according to what you want and then use this addMapToolProperties when creating your AddMapTool.