2006/09/29

Fix display problem in 'man' page

export LANG="POSIX"

2006/09/19

Hash table is unordered

Create a table by:

for (my $i=0; $i<$#dat_array+1; $i++)
{
   $table{"$dat_array[$i]"} = "$res_array[$i]";
}

Print table by:

while ((my $key, my $val) = each (%table))
{
   print "$key\t$val\n";
}

You will get different order as you created in array.

2006/09/18

Add Baidu Search Engine in Firefox

Create baidu.src file like below and save it in "C:\Program Files\Mozilla Firefox\searchplugins". It's better to get a 16x16 size icon named baidu.gif/baidu.png in the same directory, otherwise the default icon will be used.

just found a original icon @ www.baidu.com/favicon.ico. Use flashget download it, rename to baidu.gif and save it. Restart firefox, you will see the change. 9/19/06

<search
version="7.1"
name="Baidu"
description="Search www.baidu.com"
action="http://www.baidu.com/s"
searchForm="http://www.baidu.com"
method="GET"
queryCharset="utf-8"
>
<input name="wd" user="">
<inputnext name="start" factor="10">
<inputprev>
<input name="ie" value="utf-8">
<input name="oe" value="utf-8">

<interpret
browserResultType="result"
charset = "UTF-8"
resultListStart="<!--a-->"
resultListEnd="<!--z-->"
resultItemStart="<!--m-->"
resultItemEnd="<!--n-->"
>
</search>

2006/09/14

Which software is installed?

9/14:
NOD32 V2.51.30 -- a great antivirus software with very low memory usage
ZHIGUANG PINYIN V5 -- a top selectioin for chinese input
Storm Player -- came with a rather complete decoders to play most format videos
Logitech QuickCam Driver -- just need it for that wonderful Webcam Pro 5000
Creative Audigy2 ZS Driver -- so so software
Ultrakeyboard -- wow! it can recover what you enter, but I have removed it.
9/15:
Flashget -- a classical download tool without AD.
Firefox Extension -- because of extension and tab, firefox became famous
  • Flashget-- it is hard to find now
  • Tab X - close button on each tab
  • Tabbrowser preferences - open firefox searching result in a new tab
  • Gmail Notifier -- it would be better if supported multiple accounts
  • Forecasefox -- information for Acueweather.com
  • Google Bookmarks Button -- replacement of firefox's one
9/16:
Bitcomet
-- the most popular BT download tool
Adobe Arobat Reader -- Must have for PDF files
Kingsoft CIBA
9/17:
Skype
--talk to my wife
Brother all-in-one -- printer mainly
ACDSee Photo Manager 9
Daemon Tool
-- virtual CD rom
Nero 7 Premium -- failed...
9/18
eMule -- P2P download in your hand
Nero 7 -- installed again. It try to handle everything, but I decline it.
UtraMon -- excellent software for multiple mointors user
9/19
MSN messenger 7.5-- somewhat lower CPU usage than Skype
10/5
foobar2000 -- better than winamp? no sure. But it's absolutely a good player

Reinstalling XP

After using for one year, it is probably a good time to reinstall OS for my one years and 9 monthes old TOSHIBA-A75-S229, in order to speed up the system. However it is really time-consuming.

9/12: I decided to update system instead of a fresh install. Unfortunately, the installing process stuck at 34% left. No sure what happen, maybe there are some drivers missing or some other defects. I couldnot simply format the disk since I had not backup my data yet. copy, xcopy, xxcopy, nothing can acutally copy a whole folder for me. I wanted to use Partition Magic to seperate a partition from 'C:' drive for installing a linux, and then copy a data out. But I was out of luck, PM messed up the Partition Table.

9/13: I bought a hard drive encloser, put the hard disk in, and connected it to my company's laptop; finally I found all data were safe. But, there was a strange partition left in the hard drive, which cound not be read and formatted even I formated C: drvie and loaded a new operating system. The error message is "Missing Operating System." PM TOTALLY WON'T WORK!!! Fortunately, I found a great software in the world, PARTITION TABLE DOCTOR, which fixed the partition table for me.

9/14: Uninstalled a lot of juck software came with Toshiba's recovery CD. Next, it is a bunch of soteware will be installed.

2006/09/06

Enable SSI

Enable SSI (Server Side Includes) by edit httpd.conf.

1. Add folowing code:

<Location />
AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes
</Location/>


2. restart Apache:

apachectl graceful

CGI.pm

Verify whether CGI.pm is installed and which version:

perl -MCGI -e print "CGI.pm version $CGI::VERSION\n";

2006/09/01

Send a mail with attachment in Unix

A simple way to send a mail with attachment in Unix. Of course, you can use 'backtick' or 'system call' include it in a Perl code.

cat some_directory/file_a | uuencode filename | mail -s "subject" receiver@emailaddress < some_directory/file_b


Note:
file_a is a file that will be attached
file_b is a file that will be displayed as a message