Wednesday, March 25, 2009

十二星座的時間劃分





星座     日期(公曆)    英文名 
魔羯座 (12/22 - 01/19) Capricorn 
水瓶座 (01/20 - 02/18) Aquarius 
雙鱼座 (02/19 - 03/20) Pisces 
牡羊座 (03/21 - 04/20) Aries 
金牛座 (04/21 - 05/20) Taurus 
雙子座 (05/21 - 06/21) Gemini 
巨蟹座 (06/22 - 07/22) Cancer 
獅子座 (07/23 - 08/22) Leo 
處女座 (08/23 - 09/22) Virgo 
天秤座 (09/23 - 10/22) Libra 
天蝎座 (10/23 - 11/21) Scorpio 
射手座 (11/22 - 12/21) Sagittarius
怎麼記?以終止時間為準,然後以20為單位,所以可改寫成
-1, -2, 0, 0, 0, 1, 2, 2, 2, 2, 1, 1
-1代表20-1,-2代表20-2,然後依序加上月份1,2,3,4,5, ..., 12。
所以就知道第一個星座是1/19結束,所以第二個星座開始是1/20,以此類推。

怎麼記星座順序?
就魔水魚,羊牛子,蟹獅女,秤蝎射。
希望可以一解我老是記不起來的困擾!

參考至

Tuesday, March 24, 2009

HTK in Ubuntu

Reference from http://www.voxforge.org/home/dev/acousticmodels/linux/create/htkjulius/tutorial/download/comments/additional-instructions-to-compile-htk-on-ubuntu-8-hardy

make sure you have gcc, make.
$ gcc -v
$ make -v

If you don't have make
$ sudo apt-get install make
If you don't have gcc
$ sudo apt-get install build-essential
You may need 
$ sudo apt-get install libx11-dev
if make all error

You should be get the right result.

Thursday, March 19, 2009

mkoctfile problem on Cygwin

I tired to use mkoctfile to compile hello.cc, the example of Octave and C/C++.

First, I got the error messages as follows,
==========================================================
$ mkoctfile hello.cc
/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: cannot find -loctave
collect2: ld returned 1 exit status
==========================================================
I found the solution from
Rename libctave.dll.a to liboctave.dll.a.

Then,
=========================================================
$ mkoctfile hello.cc
/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lreadline
collect2: ld returned 1 exit status
=========================================================
It seems to be I didn't have library readline.
I tried to install from Cygwin setup program,
libs/libreadline5 4.3-5 GNU readline and history libraries
libs/libreadline6 5.2.13-11 GNU readline and history libraries
But this doesn't solve my problem,
So I manually install the libraries,
Donwload packages,

And then, I got error messages as follows,
=========================================================
$ mkoctfile hello.cc
/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lgfortranbegin
collect2: ld returned 1 exit status
=========================================================
Go to Cygwin official site to search fortranbegin.
Then I have to install the package, devel/gcc4-fortran: Fortran subpackage.

Finally, I solved my problem ^^

mkoctfile in Ubuntu

We need octave3.0-header first.
$ sudo apt-get install octave3.0-header

After the accomplishment of download and installation,
you can use mkoctfile now.

Do followin the steps.
You can compile hello.cc successfully and run it helloworld (1,2,3)

Clicky

Clicky Web Analytics