Thursday, November 12, 2009

Clean MBR with SystemRescueCD

Update 29 Nov 2009, Sun
Finally home!
Luckily beside a pre-paration, there is a post-solution.
The post-solution is to clean the Master Boot Record (MBR) with the command:
dd if=/dev/zero of=/dev/sda bs=446 count=1

* change '/dev/sda' to the relevant harddisk/device name
~ dataset definition dd | input file if | output file of | blocksize bs | number of blocks count
~ bs=446 (keep partition table intact) | bs=512 (completely wipe out hard disk)

Now stuck on the screen was the message:
Verifying DMI Pool Data...

Here, one solution is to update the MBR by modifying partitions, e.g. combining two ntfs partitions into one.

Success!

*******************
Today 12 Nov 2009, Thu
Haven't been using my experimental linux OS for more than a year now and so decided to delete it by formating the two linux partitions to ntfs. It was a mistake!? Now the WinXP OS couldn't boot up and stuck on the screen was the message:
Verifying DMI Pool Data...

Grub loading stage 1.5
Grub loading. Please wait...
Error 17
auto... auto | en | ro | ja | zh-CN :

zh-CN... en | ro | ja | zh-CN :
initialize

Tuesday, November 3, 2009

Search On Google - Navigation Update (Greasemonkey)


Things done:

1) Created a refresh key to rebuild hint tags. Useful when the hint tags go out of alignment when using the Show Option / Hide Option that was newly added by Google.

2) Added one more mood (green) to the HotKey z. This on-the-go-mood will reload the current tab with the link's url. Found it useful in another script that does keyboard navigation for the rest of the web, however not too sure of the usefulness in the Google Search Site. Might take it out after more tries.

3) One important addition is the fast focus to the query box. Is it the many experimental scripts installed on my Firefox that the cursor doesn't go immediately to the query box or is it Google's standard? Anyway, thought it useful so added this in to help my lazy hands.

Saturday, October 31, 2009

Edit Excel Query Connection to New Location

What is to be done when the location of our raw data has moved and there is a relating Excel file to maintain? Manually, we can go to
1) click connection, 2) click properties, 3) click definition, 4) click browse, 5) locate the file, 6) set up delimited Text Import Wizard Step 1, click next, 7) set up delimiters Step 2, 8) set up step 3, 9) click OK again

[It probably will work. However there might also be an error from MS Office Excel after all these hard work. And if it works, we need to do it 7 times when there are 7 worksheets to be updated.]

Quicker way:

Place the cursor on a cell within the cell range of the query
Open VBEditor (Alt-F11)

Open the Intermediate window (Ctrl-G)

Type the command: ?ActiveCell.QueryTable.Connection [press enter]
(The relevant connection info will be echoed back, e.g. TEXT;G:\raw_data\file1.txt



Type the command: ActiveCell.QueryTable.Connection = "TEXT;D:\raw_data\file1.txt" [press enter]
(Notice that the drive G: is changed to D: in this case)

Optional (as required):
Once the above is done, the delimiters will all be automatically set to none. So to set the delimiter as a comma:

Type the command: ActiveCell.QueryTable.TextFileCommaDelimiter = true [press enter]
(To set the delimiter as a comma... )


Type the command: ActiveCell.QueryTable.TextFileOtherDelimiter = ";" [press enter]
(Or any delimiter as needed e.g. ;)