Saturday, December 20, 2008

Tips from Shanghai trip (TSP-08)

1. Having >20kg luggage, go for taxi (>100 RMB)

2. Having <20kg, style="font-weight: bold;">TAI PING YANG, establishing in XU JIA HUI area (also the name of metro)

4. YU YUAN Garden is very nice for tourist. You will see many chinese's character building and these are store where you can buy something chinese people think you like. And I like them! The price is cheap (after divide by two!!!)

5. Don't believe chinese people when you ask for direction of bus... They want to help you but just I don't know why they were telling me the different way all the time!!!

6. Map at Airport is very useful, take it!

7. Cruising is very nice at night

8. Another interesting place for shopping IT stuff is HUANG PI NAN LU

9. Air pollution here exceeds the limit that one Bangkok girl can handle well, let think about how bad it is!!!

10. You should have a good sleep...

Thursday, December 11, 2008

The trouble with love is...by Kelly Clarkson

Love can be a many splendored thing
Can't deny the joy it brings
A dozen roses, diamond rings
Dreams for sale and fairy tales
It'll make you hear a symphony
And you just want the world to see
But like a drug that makes you blind,
It'll fool ya every time

The trouble with love is
It can tear you up inside
Make your heart believe a lie
It's stronger than your pride
The trouble with love is
It doesn't care how fast you fall
And you can't refuse the call
See, you got no say at all

Now I was once a fool, it's true
I played the game by all the rules
But now my world's a deeper blue
I'm sadder, but I'm wiser too
I swore I'd never love again
I swore my heart would never mend
Said love wasn't worth the pain
But then I hear it call my name

(The trouble with) The trouble with love is
It can tear you up inside
Make your heart believe a lie
It's stronger than your pride
The trouble with love is
It doesn't care how fast you fall
And you can't refuse the call
See, you got no say at all

Every time I turn around
I think I've got it all figured out
My heart keeps callin' and I keep on fallin'
Over and over again
This sad story always ends the same
Me standin' in the pourin' rain
It seems no matter what I do
It tears my heart in two

(The trouble with love is) The trouble with love, yeah
(It can tear you up inside) It can tear you up inside
(Make your heart believe a lie) Make your heart believe a lie
It's stronger than your pride

(The trouble with love is)
It's in your heart
It's in your soul (doesn't care how fast you fall)
You won't get no control
(and you can't refuse the call)
See, you got no say at all

(The trouble with love is) Oh, yeah
(It can tear you up inside)
(Make your heart believe a lie)

Monday, December 8, 2008

มาเรียนภาษา ซี กันเถอะ : goodbye world!

Introduction to C Programming...


#include
int main()
{
printf("Goodbye, cruel world!\n");
return(0);
}


1. Compiling and linking your source code

The compiler translates the information in the source code file into instructions the computer can understand. The linker then converts that information into a runnable program.

The GCC compiler recommended and used in this book combines the compiling and linking steps. An object file is created by GCC but it is automatically deleted when the final program file is created.

Object code files end in OBJ or sometimes just O. The first part of the object file name is the same as the source code filename.

Compiling GOODBYE.C: at terminal being in your source code's directory and then...
gcc goodbye.c -o goodbye
Nothing happen! The only time you see a message is if you made an error.

2. Running the final result
In the Unix-like operating systems, you must specify the program's path or location before the program name. Type this command.
./goodbye
Press the Enter key and the program runs, displaying this marvelous text on your screen:
Goodbye, cruel world!




มาเรียนภาษา ซี กันเถอะ The stuff you need to know before you read all the other stuff in this book...

ขอได้รับคำขอบคุณจาก ซีฟอร์ดัมมี่ เซคเคินอิดิชั่น แอนด์ บิททอแรนท์...

The stuff you need to know before you read all the other stuff in this book...

you need two things to program in C on your computer:
- A compiler
- A place to put your programs

For Mac OS X:
GCC compiler is installed and ready to used.
To confirm this, open a terminal window and type the following line at the command prompt
gcc -v

Making programs, you need two tools:
- an editor
- a compiler

For the various UNIX operating systems, you have multiple editor choices.
The simplest text editor is Easy Editor, activated with the ee command.
The author' favorite editor for working with C is vim, a variant on the infamous vi editor in UNIX. Unlike vi, vim uses colors to code text.

Compiling and linking:
This step transforms the meek and mild text file into a robust and useable program on your computer.
The main thrust of programming the individual examples in this book involves the following three steps.
1. Ensure that you're in the work folder

2. Use your text editor to create your source code file

3. Compile and link the source code:
Compiling and linking are both handled by the GCC command. As an example, here's what you need to type to compile and link the GOODBYE.C source code created in Step 1:
gcc goodbye.c -o goodbye
- gcc, the command to compile and link the source code
- goodbye.c, the name of the source code file
- -o, the output switch
- goodbye, the name of the final program
If you leave off the -o switch and its option, GCC creates the program file named a.out. The author doesn't recommend this. Instead, remember the -o option and specify a nmae for the output program. The name can be the same as the source code file, but without the .c extension.

4. Run the program
UNIX runs only programs found on the path, and the author doesn't recommend to put your learn directory on the path.
To get the operating system to notice your program, you have to be specific about where the program lives (in the current folder, for example). you do that by prefixing ./ to the program's name. To run the goodbye program, type the following at the prompt:
./goodbye
and the program runs.

Tip: For each program you create, there are two files on disk: the source code file (a text file) and the program file. That's generally how things go in this book.
Tip: The GCC compiler automatically sets the permission bits on the resulting program file, allowing it to be run. Usually, it's -rwxr-xr-x
If you create your own programs that you want to run, copy them to a bin directory beneath your home directory, and put that directory on the path.


Wednesday, December 3, 2008

Paris ตอนที่ สาม

เดินฝ่าฝนกันไปกับจูเลียนด้วยร่มหักๆออราเคิลที่ติดสอยห้อยตามมาจากเมืองไทยเพียงอันเดียว แน่นอนว่าไอ้จูเลียนเป็นคนถือ แล้วกรู (เจ้าของร่ม) ก็ต้องเปียกเป็นธรรมดา (ไม่เข้าใจเหมือนกันว่าไอ้การที่ผู้ชายถือร่มตามมารยาทแล้วสุดท้ายผู้หญิงเปียกเนี่ย มันดียังไง) ก็ฝ่าๆๆๆๆกันไป ไอ้จูเลียนก็ไม่ได้ช่วยอธิบายอะไรเลย ข้าพเจ้าก็ต้องเห็นเอง ดูเอง เข้าใจเอาเอง ว่ามันมีไรบ้างแถวนั้น แต่เอาเหอะ อย่างน้อยก็ได้เห็นอ่ะนะ จะเอาไรมากกะเพื่อนผู้ชาย

เดินไปได้สักพัก (สองป้ายเมโทร...ไกลเชีย) ก็เจอกับเพื่อนจูเลียนซักที หญิงท่านนี้มีนามว่า อาลีน (มะใช่ อาหลิงอ้า อาหลิง ลื้อมายืนตงนี้ทามมาย...) เป็นคนสวิส พูดอังกฤษกะฝรั่งเศสโคตรรรรร ชัด เธอเรียนโทอยู่ในปารีสทางด้านการแปล ใช่แล้วเธอเป็นนักแปล โหย ทึ่งเจงๆ...

จากนั้นก็ชวนกันไปนั่งดื่มในบาร์ที่เรียกว่า ฟูร์มีบาร์ (ตามที่ได้เล่าไปในตอนก่อนหน้านี้แล) สองคนนั้นเค้าหนาวกัน ดิฉันกลับร้อนคะ สองคนนั้นเลยสั่งกาแฟ ชอคโกแลตร้อนมาดื่มกันแก้หนาว ข้าพเจ้ารึ ขอโค้กแล้วกัน... (ฮา) ก็เลยมาถึงเรื่องที่จูเลียนมันชอบว่าเราว่าเป็นสาวมีปัญหาด้านฮอโมน ระหว่างที่มันเล่าเรื่องนี้ให้อาลีนฟัง ข้าพเจ้าก็ถอดพูลโลเวอร์ฮ่ะ (มันร้อนเจงๆนะ ขอบอก ไอ้การกึ่งเดินกึ่งวิ่งมาไกลสองป้ายเมโทรท่ามกลางฝนเนี่ย) ก็คุยๆๆๆ (พวกมันนะที่คุย... คนไม่เคยรู้จัก ไม่ชอบคุยอยู่แล้วเป็นการส่วนตัว) แล้วสาวเจ้าก็บอกว่าจะพาไปดูรอบๆ