Thursday, November 30, 2006

MATLAB: Creat equidistant N points between A and B

Suppose we have a range [2 11], and we want to divide it into 10 separate equidistant ranges. Now the question is that what are the separators. At the first glance, we usually have the following MATLAB code:

[2: (11-2)/10:11]

>> [2: (11-2)/10:11]

ans =

2.0000 2.9000 3.8000 4.7000 5.6000 6.5000 7.4000 8.3000 9.2000 10.1000 11.0000

However, there is a function LINSPACE(X1, X2, N) that can handle it:

linspace(2,11,11)

>> linspace(2, 11,11)

ans =

2.0000 2.9000 3.8000 4.7000 5.6000 6.5000 7.4000 8.3000 9.2000 10.1000 11.0000

In LINSPACE(X1, X2, N), X1 and X2 are defined by the range, and N is the quantitiy of points including X1 and X2 in this range. Because we divide the range into 10 separate equidistant ranges which means that there are 11 points in total. Thus here N is 10+1=11.

Saturday, November 25, 2006

Free software 11: AOL Safety and Security Center

AOL is such a liberal security product provider recently ;P. Followed by Active Virus Shield , AOL bring us a Safety and Security Center powered by McAfee recently.


The AOL Safety and Security Center software suite includes:
AOL® Virus Protection
AOL® Firewall
AOL® Spyware Protection
AOL® Parental Controls


However, this time you must have to provide an AOL e-mail address or an AOL My eAddress to download; and AIM e-mail is not acceptable here ;(. Fortunatel you can get one AOL account now for free (zip code is five digits and phone number can be found via Yahoo or Google ;P).

Here is the download page:

Friday, November 24, 2006

Latex: \headheight is too small

You never know what you will meet when you use Latex, luckily, we can search Google or Yahoo to find the answer. However, it cannot help all the times. There is a problem you may come across using package fancyhdr:

Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 14.49998pt.
We now make it that large for the rest of the document.

It was not easy to find the answer via either Google or Yahoo. Here is the solution. Insert

\setlength{\headheight}{15pt}

in the preamble, i.e. before \begin{document}.

Tips:
  • \headheight defines the height of the header.

  • \setlength{len-cmd}{length}
The \setlength command is used to set the value of a length command, len-cmd, which is specified as the first argument. The length argument can be expressed in any terms of length LaTeX understands, i.e., inches (in), millimeters (mm), points (pt), etc.

Thursday, November 23, 2006

Daily growing : desolation deep into the marrow

Daily growing is a song from The Blue Idol, an album of Irish music amalgamation by Altan. It is of a sense of desolation that is deep into your marrow.


Here is the lyric:
The trees, they grow high, and the leaves, they do grow green
Many is the time my true love I've seen
Many an hour I watched him all alone
He's young but he's daily growing

Father, dear father, you've done me great wrong
You have married me to a boy who is too young
I am twice twelve and he is but fourteen
He's young but he's daily growing

Daughter, dear daughter, I've done you no wrong
I have married you to a great lord's son
And he will be a man for you when I am dead and gone
He's young but he's daily growing

Father, dear father, if you see fit
We'll send him to college for another year yet
I'll tie a blue ribbon all around his head
To let the maidens know that he is married

One day I was looking over my father's castle wall
I spied all the boys playing with a ball
And my own true love, he was the flower of them all
He's young but he's daily growing

And so early in the morning at the dawning of the day
They went into a hayfield for to have some sport and play
And what they did there she never would declare
But she never more complained of his growing

At the age of fourteen he was a married man
At the age of fifteen, the father of my son
At the age of sixteen, his grave, it was green
And death had put an end to his growing

I'll buy my love some flannel, I'll make my love a shroud
And every stitch I put in it, the tears, they'll pour down
Amd every stitch I put in it, how the tears, they will flow
Cruel fate has put an end to his growing

Friday, November 17, 2006

"Cannot Open Volume for Direct Access" Error Message When Chkdsk Runs at Startup

At http://support.microsoft.com/kb/823439, Microsoft presents that "Cannot Open Volume for Direct Access" error message when Chkdsk runs at startup can be solved by upgrading to windows XP sp2. However, still lots of people suffered, are suffering or will suffer this error message even if they are running on sp2.

Possibly, what you will meet are as follows:

1 In the Windows Command Prompt window, provided C disk has some problem, run chkdsk c: /f doesn't make the windows XP load chkdsk at startup. However, if you run chkdsk c: /r instead, chkdsk will run but the "Cannot Open Volume for Direct Access" error message will come.

2 If you try to search Microsoft knowledge base, it will tell the relationship between chkdsk and session manager. But the command relating to C disk doesn't work.

3 If you run Diskeeper to defragment, the error message will be "Diskeeper has detected that CHKDSK is scheduled to run on the volume: Please run CHKDSK /F." (Official solution can be found at http://support.diskeeper.com/support/diskeeperfaqs.aspx?Page=5&Subpage=2&cust=1&RId=1&CId=1&SId=5, but it doesn't help much.)

Tried most solutions but didn't work? Don't re-install Windows XP SP2 now, try Windows XP Recovery Console first. Use the command chkdsk c: or chkdsk c:/p to repair it.

How to use Windows XP Recovery Console can be found at http://support.microsoft.com/kb/307654.

Wednesday, November 15, 2006

Free software 11: CA Anti-Virus 2007

Update: this software is no longer provided.

In a previous post, I brought you an anti-virus software called Active Virus Shield , this time I will introduce another anti-virus software: CA Anti-Virus 2007. In fact, CA Anti-Virus 2007 is not a free software, but it provides 12 months free trial if you download it from this website: http://home3.ca.com/Microsoft/.


This software is only recommended to the fans of CA anti-virus software. If you just want to find a good, free anti-virus software, I still suggest Active Virus Shield that is more powerful and reliable. According to my experience, CA anti-virus software may perform well in USA, but not in other countries, never in China.

Update:
To apply for CA Anti-Virus 2009, go to http://home3.ca.com/SubscriptCenter/MSTrialRegistration.aspx?cid=573. Again, unless you are fan of this software, it is not recommended.

Friday, November 10, 2006

Free software 10: Tux Typing

In Free software 8: Tux racer, we introduced the linux penguin race; this time we will introduce another program: Tux Typing.

Tux typing is an educational typing tutor for children, of course, it is for adults who cannot resist the cute penguin as well.

(When I fist came to Australia, I was surprised that lots of Australians cannot type without looking at the keyboard.)

The official website is http://tuxtype.sourceforge.net/. If you can help Tux for Kids, go to http://www.tux4kids.com/node/5to obtain more information. (The photo showed here is copied from the official website.)

Tuesday, November 07, 2006

Eliminate the page number on the Latex title page

"LATEX will automatically number pages, but often you don't want a page number on the title page. To eliminate the page number on the first page, put \thispagestyle{empty} before the \maketitle. "

This paragraph is copied from http://stuff.mit.edu/afs/sipb.mit.edu/project/www/latex/guide/node9.html. However, if you follow this guide, the page number will still stand there, never leave with the wind. The correct way is that put \thispagestyle{empty} after the \maketitle. When using \ chapter, the same rule should be obeyed.

By the way, don't use \thank with \maketitle, there is a bug that Latex will produce an additional (mostly blank) page in the output.

Wednesday, November 01, 2006

Free software 9: ATnotes

According to the Chinese adage '' A good memory is inferior to a rotten brush pen", it is better write down something improtant rather than keeping them in memory.

ATnotes is a FREE program which creates notes on your desktop. Stay in the system tray, take only a little system resources: it really does a good job. Moreover, it supports 46 languages. Just download the language file and copy in to ATnotes install directory, it will display your required language automatically. You can also set up the hot keys to accelerate your work ;P.

Unluckily, ATnotes is discontinued. Anyway, it is a quite good software that is worthy to be used. The official website is http://atnotes.free.fr/. The image displayed here is copied from the homepage.

Here are the features listed in the homepage:
  • dragable and resizeable notes anywhere on the desktop
  • notes are autosizing as text is entered
  • custom font, background color, text color and border color for each note
  • single or repeated alarms for each note with visual and audio alarm signal
  • hide notes until manually activated or until a specified date/time
  • minimize notes to the first line of text and restore the note size to fit the whole text
  • open URLs, e-mail addresses and file shortcuts in notes with the associated program
  • get an overview of all current notes in the note list
  • search for notes containing a specified text
  • user defined system-wide hotkeys for important functions
  • send notes to other computers in a local network
  • user interface can be translated into any language