Saturday, September 27, 2014

automatically to Windows 8.1 without entering password

Every time Windows boot, I'm required to enter a password to logon to the Windows, while this is great security feature, though sometime I want the system just boot to desktop without any password.

Why? you ask, well just pure laziness I guess, and it's just a media server where I want to set this. I wanted to just press the power button of my PC, and the media server should just be ready. But because the media server service (Plex Media Server) required user to logon to Windows first before it starts itself on the system tray.

So here's the steps to set your Windows 8.1 PC to boot to Windows without any password.

1. Enter "control userpasswords2" in the Run menu (Win + R key), and press Enter.

2. Uncheck "Users must enter a user name and password to user this computer.",

enter your password when prompted.

Now try reboot the PC.

Tuesday, June 24, 2014

OneNote: We need the password to sync this notebook (Error code: 0xE4010643)

It happen to me once and it happen to me twice, and it happen again this morning.

When I saw this message, I knew no mater how many times I hit the "Sync All" it will never goes through (but I did it anyway).

I found these happen to me if I leave OneNote open, and put the computer to hibernate / sleep mode. Somehow when the computer awake from sleep, OneNote will failed to sync due to the credentials is out of sync. 

To avoid this I always close OneNote before putting the computer to sleep and often I simple shutdown the computer.

The fix to this is simply delete the cached credential used by OneNote to connect to server for synchronization, and re-login.

To do this, follow the following steps (Make sure you close OneNote before you proceed):
  1. Go to "Control Panel" > "User Accounts and Family Safety"
  2. Click "Credential Manager"
  3. Click "Manage Windows Credentials"
  4. Look for "MicrosoftOffice15_Data:live:cid=xxxxxxxxx"
  5. Expand the row and click "Remove" and click "Yes" when prompt to confirm.
  6. Don't start OneNote first, but instead, sign-out from Windows and sign-in again.
  7. Start OneNote and key in the credential when prompt. (sometime it doesn't prompt but it fixes the problem)
Update if removing item in step #4 doesn't work. Try removing the following
  • "MicrosoftAccount" - the credential you use to login to Windows
  • "OneDrive Cached Credential" 

Saturday, February 22, 2014

Express.JS quick-start guide on Windows


Express.JS is a fairly new but increasingly popular Node framework for building web application. Being a Node based application means you spin up a web application in just few steps. In this guide, I’m going to show a quick-start on just how to do this on Windows.

  1. Install node.js. See this tutorial if you don’t already have node.js on your Windows.
    • I’m using node v0.10.25, and express 3.4.8 on this guide.
  2. Create a directory for your new Express.JS app, run Command Prompt and cd into the directory. e.g. c:\users\<user name>\projects\fooApp
  3. Install express.js via npm ‘Node Package Manager’ that comes together with node.
    • In the Command Prompt, execute:

      npm install –g express

    • Watch and wait for npm to complete fetching the required dependencies for express.js. It’s going to take a while.
  4. Once installation completed, you will be presented with a summary of what packages has been downloaded and it’s respective version.
  5. Verify the Express.JS is installed and check it’s version with the command:

    express –-version

    Express will response with it’s version number.
  6. Before continue with creating an Express app, have a look at what options is available for creating an Express app.

    express –-help

    • If you do not specify any options, express will use it’s defaults that you see from this help screen
  7. Go ahead and create an express app. Execute:

    express fooApp

    For the sake of simplicity, I’m not going to specify any options.
    • Express will shows a summary of what has been created, and notice that there are 2 short instructions and the end of the summary. So we going to follow exactly that.
  8. Before proceed with the instructions, lets have a look at the content of fooApp/package.json

    cd fooApp
    more package.json

    • Like any other node.js application, the package.json defines the basic information for fooApp and it’s dependencies.
  9. Next we will install the related dependencies:
    npm install
    • Once completed, npm will again shows a summary of what have been downloaded.
  10. Before proceed to run fooApp, take a quick look at these 3 files:
    • fooApp\app.js
    • fooApp\routes\index.js
    • fooApp\views\index.jade
    • app.js – This file define the runtime configuration for fooApp

      routes\index.js & views\index.jade – This is the default route that will be executed when browse to fooApp.
      This give us an idea of what to expect to see when browse to the fooApp, and more importantly the basic idea of the MVC pattern in an Express.JS application.
      The *.jade file is template using node template engine jade.
  11. Proceed to run fooApp, in the Command Prompt, execute:

    node app.js

  12. Browse to http://localhost:3000
    • It works, just like magic.

Thursday, February 13, 2014

Installing and upgrading node.js on Windows

Steps for installation:

  1. Go to and download the latest version of node.  I'll proceed with the Windows Installer (.msi) version.
    1. You can also go to to download installer for other platform.
  2. Run the node-XXXXXXXXXX.msi installer, and proceed to installation like a normal Windows application (basically just Next... , Agree, Next … Finish). I'd strongly suggest that you accepts all the default configurations and selections during the setup.

  3. Once installation completed, start a command prompt and type "node --version" and verify that it shows the version of node.

Steps for upgrade:

  1. I personally don't use any special tools to switch between version of nodes,  I prefer install if using the same Windows Installer. (If you uses all the default settings during setup, upgrading is simple repeating the installation steps to overwrite  the current version of node)
  2. If you want to use NVM (Node Version Manager) kind of tools that available to Linux users, you can use take a look at Nodist ( You can get Nodist via Chocolatey (

Friday, January 3, 2014

Generating INSERT statement from SELECT using SQuirreL SQL

There are often time during development where you would want to test your application with various type of sample data, and you would want those data to be share with other team member as well.

The scenario that I ran into recently is we have some sample data that was enter to a system through a web interface, and for reports developments purposes we need those data to be shared among the team members, so we start to look into exporting those data out using SQL SELECT statements (with the correct WHERE clause) then converting them to equivalent INSERT statement; there are of cause several ways to do this, but I prefer the easy way, using SQuirreL SQL. The insert script can them be shared among the team members.

Following is the steps for completing this

  1. Install SQuirreL SQL
    • Make sure you have JRE7 installed on your machine
  2. Create connection to you database
    • Depending on your database type you need to use different drivers
    • Create the Alias to your database and enter the right connection strings (this can be tricky sometime)
  3. Start the connection session to you database
    • Select your alias and hit the Connect icon 
  4. Write you select statement and run it (CTRL+ENTER)
  5. Bring up the Tools dialog box (CTRL+T)
  6. Look for sql2ins and hit Enter
  7. Done. You will see INSERT statement will be generated right after your SELECT statements.
You can customize what columns you want on the generated INSERT statement by only specifying them in the SELECT statements, and don't forget you can also limit the records by specifying the where clause in your SELECT statements.

There you go, another magic trick.

Saturday, September 14, 2013

Default icons in Windows Phone SDK (use with ApplicationBarIconButton)

Windows Phone SDKs comes with icons that one can also use when developing an app, especially when creating an app bar (aka ApplicationBarIconButton),
These icons are located at

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\vX.X\Icons\

There are different sets of icons, namely the dark icons set for use with a dark windows phone theme, and light icons set for use with light theme, and there is also vector based icons set.

Note: You should only use the icons under the dark folder, during runtime, Windows Phone will automatically put colors on the icons according to the theme selection

Always looks at the icons set and see if you can reuse any of the icons before creating yours, chances are high, icons you needs are already there.

Below is a snapshot of icons available in SDK v7.1 (32 icons)

icons for SDK v7.1

Add there are slightly more icons for SDK v8.0 (37 icons)

icons for SDK v8.0

Also, check out how to create an app bar using XAML on MSDN.

Thursday, August 15, 2013

Disable Gmail Inbox Tabs

If you're a Gmail user, your going to notice that recent changes to the user interface, that's right, there are several tabs now. If you've not seen it, you will soon. Google has decided to roll out the Inbox tabs to all Gmail users.

Gmail's welcome message for Inbox tabs
I've been a Gmail user since it's early days, and this tabs thingy really makes me uncomfortable, I believe there are others out there that has the same feeling as I am. Fortunately, as of today, there is still a way to disable the tabs. And I'll shows you how to do it.

Right after you log in to Gmail, you will be introduce to to the new Inbox interface, where you will see 3 default tabs: Primary, Social & Promotions.

The new Inbox tabs

You emails will be parked under different tabs, this solely depend on what Google think they should be. (and there's an ads pretending to be an email)

Promotions tabs

Moving email between tabs
You can manually move messages between tabs and make them stays on that tabs for future incoming emails. Or you could just 'star' an email to make it appear on the Primary tabs.

All that is good if you want to use tabs to organize your inbox; For me, the existing 'labels' feature are more than enough organize my emails, so I'm going to disable Inbox tabs.

To do this, navigate to the Settings icon on the top right corner and select Configure inbox.

Configure inbox tabs menu

You will be prompted with a dialogue box where you can then select which tabs you wants to enable or disable by checking or un-checking.
Selection of tabs to enable / disable
So go ahead and un-check like crazy. Apparently you can't un-check the Primary tab, because that's where all emails are going to stay when all tabs are gone.
Un-check Social and Promotions to disable those 2 tabs
Hit Save button and you'll be notify that Inbox tabs have been switched off.

Cool, now I get back the old Inbox interface.

Inbox without tabs