Unable to start VirtualBox after upgraded from 4.1.12 to 4.2.18


, , , ,

I have a Ubuntu virtualbox vm which is on virtualbox version 4.1.12, today I have upgraded to the newest version 4.2.18, and then the vm won’t be able to start, check the VBoxSVC.log(at “%HOMEDRIVE%%HOMEPATH%\.VirtualBox\” found out the following errors like:

ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={29989373-b111-4654-8493-2e1176cba890} aComponent={Medium} aText={Property ‘Special/GUI/Hints’ does not exist}, preserve=false

Dig the internet a little bit, seems related to the Guest Additions, revert the vm to previous saved snapshot(which still works), upgrade the Guest Additions from 4.1.12 to 4.2.8, reboot, the vm works again


Cool website(regexper.com) can transfer regex to graphic chart


, ,

I used to create a test case related a US SSN text field data validation, there is a Regex(Regexp or Regular Expression):

"^(?!000)([0-6]\d{2}|7([0-6]\d|7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}$"

which defined the input validation, I figured it out at the beginning, but after one month later when I look back the documentation, there is only “!@#$%%^” in my head.

And here is a very cool site (http://www.regexper.com/) could transfer the Regex to a much easier understandable graphic chart like this:


Update: forgot to mention, the expression need to be in JavaScript style

Export Google Reader feeds Step by Step


, , , , , , , , , ,

I guess everyone already knew that Google Reader Service will be terminated by July, so I just created this step by step instructions to export all my feeds for backup through Google Takeout service(hope this one won’t be terminated :P)

Here it is:

  1. Navigate to Google Reader SettingsGoogle Reader Export Feeds Step by Step 01
  2. Select “Import/Export” tab, then choose “Download your data through Takeout”Google Reader Export Feeds Step by Step 02
  3. Then will be redirected to takeout page with reader data generatingGoogle Reader Export Feeds Step by Step 03
  4. Wait the process reach 100%, then click “Create Archive”Google Reader Export Feeds Step by Step 04
  5. Now the Reader data can be downloaded as a zip fileGoogle Reader Export Feeds Step by Step 05
  6. The zip file should include all reader data you haveGoogle Reader Export Feeds Step by Step 06

Now you’ll be able to import your reader feeds to an alternative like feedly

Selenium Tips


, ,

Mark a few Selenium tips:

  1. Generate and Store current date in “YYYYMMDD” format

    And the javascript code is here:

    javascript{ d=new Date(); d.getFullYear().toString()+((d.getMonth()+1)<10?"0"+(d.getMonth()+1).toString():(d.getMonth()+1))+(d.getDate()<10?"0"+d.getDate().toString():d.getDate().toString()); }
  2. Override Untrusted SSL Self Certificates

Config sharing clipboard between guest Ubuntu 13.04 (Raring Ringtail) and host Windows 2008 R2


, ,

After finished installation of Ubuntu 13.04(Raring Ringtail) in VirtualBox, found out that by default the clipboard is not shared between the host(Windows Server 2008 R2) and the guest(Ubuntu 13.04 Raring Ringtail)

Here are the fix steps:

  1. In VirtualBox guest window, navigate to: Devices -> “Install guest additions…”, finish the installation
  2. Now navigate to: Machine -> Settings -> General Tab -> Advanced tab -> Now should appear “Shared Clipboard” option, select “Bidirectional”, click “OK”

Now should be able to copy/paste text between the guest and the host

Add Customized Workitem(like: Change Request) to Requirement Category in Team Foundation Server 2012


, , , , , ,

By default, After you created a project in Microsoft Team Foundation Server 2012, “Requirement Categor” only contains “User Story” as its member, then when you attempt to “Add existing requirements to a test plan”, only the “User Story” workitem will be acceptable.

In most case, when there is Change Request issued to the team, QA will need to have test case associated with it as well, which expect to add Change Request as requirement and can be added to a test plan.

We can achieve this by the following steps(need to obtain TFS administration permission first):

  1. Export Work Item Type Categories to a xml file:
    run the following command form “Developer Command Prompt for VS2012”:

    c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>witadmin exportcategories /collection:http://TFSServer:8080/tfs/yourcollection /p:myproject /f:myproject-original.xml
  2. Modify the xml file and add Change Request as member of Requirement Category, which should like this:
    <CATEGORY name="Requirement Category" refname="Microsoft.RequirementCategory">
      <DEFAULTWORKITEMTYPE name="User Story"/>
      <WORKITEMTYPE name="Change Request"/>

    and save the modified xml as “myproject-modified.xml”

  3. Import the modified Work Item Type Categories xml file back to the project:
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>witadmin importcategories /collection:http://TFSServer:8080/tfs/yourcollection /p:myproject /f:myproject-modified.xml

Restart your Test Manager 2012, you should be able to add Change Request to a test plan now

Reference: Customize the Categories for Work Item Types [witadmin]

Create an Excel Report from Microsoft Query by execute the SQL Query directly against SQL SERVER 2012


, , , ,

Recently I was required to provide an excel report related to Microsoft Team Foundation Server workitems, but the requirement is kind of hard to get from Microsoft Visual Studio 2012 Queries directly, which means it’s also not possible to export the report to excel as well.

After a little search, I found out there is a functionality of excel that allow you to create report from a external data source by using Microsoft Query.

You need to have the ‘Read’ Access to the SQL Server Database you like to generate the report

Here is a simple tutorial that how it works:

  1. Open Excel -> Navigate to “Data” tab -> Navigate to “From Other Sources” tool at toolbar -> Select “From Microsoft Query”
  2. From the “Choose Data Source” window, Select “<New Data Source>” and then click on “OK” buttonCreate an Excel Report from Microsoft Query by execute the SQL query directly against SQL SERVER 2012 - 01
  3. Which leads another popup window “Create New Data Source”, fill the data source name you want, select driver as ‘SQL Server’, then click on “Connect…” button, which popup another window for authentication, you can enter/select your DB Server Name, if you like to use windows authentication, you can check “Use Trusted Connection” or fill the DB username/password if you want to use SQL Server DB authentication.Create an Excel Report from Microsoft Query by execute the SQL query directly against SQL SERVER 2012 - 02
  4. Click “OK” button will pop up the Microsoft Query window with Query Wizard, which we gonna cancel it since we’re going to add SQL query directlyCreate an Excel Report from Microsoft Query by execute the SQL query directly against SQL SERVER 2012 - 03Then click “Close” in “Add Tables” popupCreate an Excel Report from Microsoft Query by execute the SQL query directly against SQL SERVER 2012 - 04
  5. The next step is enter the SQL query you like to execute for your report by clicking the ‘SQL’ tool button from Microsoft Query toolbar.Create an Excel Report from Microsoft Query by execute the SQL query directly against SQL SERVER 2012 - 05Paste or Write your statement in the popup, then click on “OK” button, Microsoft Query will execute the statement and return the result, and if the SQL query cannot be represented graphically, you’ll need to confirm to run it anyway.Create an Excel Report from Microsoft Query by execute the SQL statement directly against SQL SERVER 2012 - 06
  6. After you get the result, and verify is what you want, you can click “Return Data to Microsoft Excel” sub-menu and return to Excel,Create an Excel Report from Microsoft Query by execute the SQL statement directly against SQL SERVER 2012 - 07and choose where you like to put the result data in your excel sheet, or you can add/modify the report type as you like in excel.Create an Excel Report from Microsoft Query by execute the SQL statement directly against SQL SERVER 2012 - 08

After you save the excel file, you should be able to update the report by choosing “Refresh” button from “Data” tab, and no need to repeat this complex procedure again. 😛

Example: Python connect to Microsoft SQL SERVER 2012 on Windows


, , ,


  1. Python 2.7.3 (32bit) installed
  2. Pymssql win32 module 2.0.0b1 module installed
  3. Microsoft® SQL Server® 2012 Native Client installed(search for “sqlncli.msi”)

Assuming that you have a table named: “user”, and it’s contains two columns: “firstname”, “lastname”, we can use the following code to retrieve the data by the following example code:

import _mssql
conn = _mssql.connect(server='dbhostIP', user='dbusername', password='dbpassword', database='dbname')
conn.execute_scalar("SELECT [firstname],[lastname] FROM [user]")
for row in conn:
    print "FirstName: %s, LastName: %s" % (row['firstname'],row['lastname'])

Result should be something like:

FirstName: MATTHEW, LastName: Carter
FirstName: Mi, LastName: Bal
FirstName: Mia, LastName: Bal
FirstName: Mia, LastName: Edwards

Wish Google can still remain the Google Reader service


, , , , , , ,

Google announced that the “Google Reader” service will be shutdown on July 1, 2013:

“We launched Google Reader in 2005 in an effort to make it easy for people to discover and keep tabs on their favorite websites. While the product has a loyal following, over the years usage has declined. So, on July 1, 2013, we will retire Google Reader. Users and developers interested in RSS alternatives can export their data, including their subscriptions, with Google Takeout over the course of the next four months.”

I would like to say that Google reader service is by far the most frequently visited Google site other then Gmail for me at least, Google might have a good reason(like: doesn’t make money from it?) to shut it down, but for thousands out there using this service daily is a disaster, I know there are several alternatives, but using one Google authentication to control your reading feed it so much better by using another third party’s service.

So if you like to express the similar feeling, please update this topic: “Powering down Google Reader” in Google Groups

Update: If the Google Takeout doesn’t work for you or you don’t like the output json format, the “Google Reader Subscriptions Export” function still working, and you can get a XML(OPML) format instead