2007年11月30日 星期五

鬆餅很好吃

學校計中前有在賣鬆餅
外酥內軟的很好吃
巧克力口味的 吃了整個心情都好起來
我算還蠻容易滿足的 不一定需要什麼大魚大肉 簡單的東西也不錯

lol

該死的
不要在自私自利了
多為別人想想,這樣世界才能更美好

2007年11月28日 星期三

好像常被誤解

被誤解就被誤解我能怎樣?
因為連我都搞不清楚我是誰了
如果我有能力改變世界,I will
打嘴砲都是輕鬆的啦
關於我的個性,或是說我想成為人的個性
像年輕的麥克。柯里昂
像麥田捕手的男主角
像少爺的男主角
哈哈 我又在發瘋了 胡言亂語
看到一堆道貌岸然 死守成規 說話虛偽 的人實在很討厭
我想要成為誠實的人 有做就有做 沒做就沒做
像少爺說"惡作劇和懲罰是連在一起的,沒有懲罰的惡作劇就不好玩了"真有道理
世界上就是一堆想要惡作劇 但不要懲罰的人 才會這麼邪惡

被說"不夠圓滑, 不知變通"
我勒幹你娘機掰,我說啊,關你屁事

幹 我就是要這樣活下去 , 哈哈哈哈

有時候明明根很多人在一起
但我卻覺得只有我一個人
我馬上陷入自己的世界中
好噁心的感覺

2007年11月26日 星期一

我是個討厭的傢伙

有時候很寂寞需要人陪
就算是討厭的人我也會忽然對他親切
但身邊有人時我又覺得很煩,可不可以讓我一個人?
這時我常做的不外乎
擺臭臉、
不理、
不厭煩模樣、
講話尖酸刻薄、
挑釁、
我真是討厭的傢伙

MSN這種東西很邪惡,我想先封他1禮拜看看。
不想被什麼東西綁住
我想做到就算身邊什麼東西被奪走或是消失也能處之泰然。

2007年11月25日 星期日

階段性的朋友

人一生會遇到許多人
在這些人中可以成為階段性朋友然後成為有再聯絡的朋友再成為可以互訴心事的朋友的機率有多少呢?
以我而言
大概是0.01*0.001*0.0001
所以說我只有有在聯絡的朋友 沒有什麼知心的朋友
所有我呈現在朋友面前的東西,都不是真正的我
或許有時候會出來說一下"哈囉"然後就躲起來了
我認為要了解自己都很困難的,實在沒什麼心力去了解別人啊
對於所有虛偽的人際關係我都很討厭
愛情也沒什麼感覺( 或許時間還沒到 )
我有時候想要一個人在一個沒有人認識我的地方生活著,我需要的只有親切就夠了

nothing really matters to me

出自Bohemian Rhapsody, 我很喜歡的一首歌
雖然不太清楚歌詞在講什麼, 但聽一次就喜歡了
最後一句歌詞便是 Nothing really matters to me , 帶點無奈的感覺
有點 "什麼對我都不重要了,因為我已經失去最重要的東西" 這種感嘆
對我而言什麼才是最重要的東西呢? 我不清楚,而且我正在尋找。

2007年11月23日 星期五

吃太多

昨天..
早上吃了泡麵
中午吃了很多蛋糕麵包,還有便當( 感謝對面研究室的 )
晚上吃了三媽臭臭鍋
隔天起來肚子就很不舒服
中午吃了滷味
晚上吃了皮蛋粥
算一算這兩天吃了半公斤的熱量
要小心了

2007年11月22日 星期四

likely, unlikely

這兩個東西在linux kernel裡面常常出現
用在做最佳化程式碼的工作,避免long jump的overhead
#define likely(x) __builtin_expect((x),1) ,expect x ==1
#define unlikely(x) __builtin_expect((x),0) ,expecy x ==0

__builtin_expect((x),1) 是gcc的buildin function

用法:

if ( likely( int ) ){
比較可能
}else{
比較不可能
}

if( unlikely( int ) ){
比較不可能
}else{
比較可能
}

DS

傳說linux kernel 雖用C寫的,但是寫得很OO,又很有效率,果然不假,裡面用了很多嘆為觀止的程式碼。 真是藝術 只能這樣說。
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
簡單的說,就是在做記憶體的shift從目前的pointer shift到struct的位址
讓你可以操作該struct
這種寫法 我絕對想不出來Orz
//這真是太神奇了 傑克

#define size_t unsigned int
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)

struct a{
int ab;
int ac;
};

int main()
{
struct a c;
c.ab = 10;
c.ac = 100;
int *ptr = &c.ab;

struct a *b;
b = container_of(ptr, struct a, ab );

printf("%d", b->ac );

return 0;
}

印出100, 這種東西 , 可以用來把介面抽出來, 並實做在很多資料結構上!

next

列一下我有興趣 接下來會做的事情
device driver
embedded system
assembly language / Computer architecture
Operating System / tracing linux kernel
having fun :D

2007年11月21日 星期三

安逸是一條危險的道路

人總是想走安逸的道路
我也是
但走了之後總會心理不安
走安逸的道路對自己是沒什麼幫助的
現在有點後悔 但走都走了 只好繼續走下去
實在是很討厭這樣

2007年11月20日 星期二

back to school

人們都是被奴役著
而且習慣被奴役了
畢竟,人是卑鄙的動物

2007年11月19日 星期一

虛榮

覺得很寂寞時,我最好的方法就是去睡一覺
對身邊任何虛假的東西都感到厭惡
要有覺悟,你要有覺悟
您瘋了,您又在說胡話了

詩經

從國中到高中唸了6年的文言文,老實說都只是在應付考試,實在是很討厭
真想用別的角度再重新復習一下以前唸的東西
但是我要什麼時侯才有時間重拾古文觀止呢

父兮生我!母兮鞠我!拊我畜我,長我育我,顧我復我,出入腹我,欲報之德,昊天罔極!

2007年11月17日 星期六

we can work it out

Life is very short, and there is no time.
生命很短暫,請好好把握。

"不要浪費時間"這是大一時當時歡送學長畢業時,他留給我一張卡片上面寫的字
到現在真的有這種感觸,想一想我把許多時間花在很多事情上,而那些大多是雜事

我一直告訴自己不要在浪費時間了,去追求自己想做的事吧。

hmm

"少爺:看完了,真是一部好小說
接下來拿出"卡拉馬助夫兄弟" 是杜斯陀也夫斯基的作品
看俄國文學最討厭的就是人名
費XXX . XXXX . 卡拉馬助夫 , 真要命, 每個人的名子都超過10個字,人物又多...
不像"少爺"那樣用"紅襯衫" , "貍貓" , "半熟瓜" , "馬屁精" , "暴風" , "瑪丹娜" 用這種簡單綽號呢

我特別喜歡描述中低下階層人民生活的小說或是某種特別時期的小說( 例如戰爭 )
還有描述人性,像是心理黑暗面、溫暖的一面、情慾、仇恨,還有有趣的lol
杜斯陀也夫斯基正是其中描寫人物心理面最強的小說家,目前看過他的"罪與罰"跟現在看的這本
我想以後還會找一些他的書來看^^

2007年11月16日 星期五

free

有時候很想逃脫這一切

你不會有時覺得很無趣嗎

有點想要一個人到國外工作 哈哈 我又亂說話了

home

現在在高雄老家
躺在睡了多年的床上,看著小說 感覺真不錯
重新複習"少爺"這本小說
我很喜歡夏目漱石的敘事風格,平鋪直敘,有點像是西方的海明威吧?
也許會抽個空到書局去逛逛,我不太喜歡圖書館緊張的氣氛,到了圖書館好像連呼吸都要放輕

聲音還沒回復 禮拜一要練團耶 囧 行嗎?

2007年11月13日 星期二

more effective c++

最近在玩C++, 前幾天在玩C++ STL
今天找了effective & more effective C++兩本書來看
這兩本書很早就塞在我的硬碟了,只是以前一直看不懂
現在總算可以從裡面讀出點趣味來了

// show stack and heap
// malloc and new 的差別在於 malloc只是單純的allocate記憶體但沒有call constructor!
#include
//#define PI 3.1415926 avoid this

//item 11
//write your own versions of the copy constructor and the assignment operator if you have any pointers in your class.
//當你的class有pointer ,而你使用預設的assign or copy operator你很可能會造成memory leak的error, 某個obj可能delete某個memory, 在你不知覺情況下

using namespace std;

//item 1
const double PI = 3.14;

class test {
public:

//item 9 最好提供一個空的constructor ! , 否則在多載建構子時, 若直接使用new 會發生錯誤
test()
{
this -> myNumber = "000";
}

test( char* P )
{
this->myNumber = P;
}

//item 1
static const double PI = 3.1415926; //save space!

// item 1 more flexible
friend ostream& operator<<( ostream& a, test& b);

//item 6
~test()
{
delete myNumber;
}

int magic;
private:
char* myNumber;
};

ostream& operator<<( ostream& a, test& b )
{
a << b.myNumber;
return a; // << << << <<
}


int main()
{
//item 2
test* me = new test( "0910883869" );
cout << *me << endl;

//item 3
test* p = ( test* ) malloc( sizeof( test ) * 10 ); // no construct .. gabarge?
test* p2 = new test[ 10 ]; // shound use this, call the constructor for each objs in ary
delete [] p2; // shound use the, call the destructor for each objs in ary
free( p );

//item 5, avoid using typedef for arys!
string *str1 = new string();
string *str2 = new string[100];
delete str1;
str1 = 0;
//use delete [] str1 causes error!
delete [] str2;
str2 = 0;

//item 7 out of memory condition , 很深入的探討記憶體不足的問題(例外處理), 當要alocate大量記憶體時,值得借鏡
try {
p = new test[1000];
} catch( std::bad_alloc &p) {
cout << "out of memory";
// 實際上不知道在哪時發生的,但記憶體已經分配到空間了
}

return 0;
}

2007年11月12日 星期一

much better

好多了!
今天很早就跑回家^^
希望大家都要多保重自己~

忽然很想看小說
想想我已經多久沒有看自己真正想看的書了

我還蠻喜歡看小說的^^
準備找時間看一下 "西線無戰事" :P

感冒了

從懷疑到確信大概花了半天
我感冒了 哈哈

AutoHotkey

一個很好用的鍵盤滑鼠marco軟體
這種類似的軟體很多,但不是功能不全就是要錢的
auto hotkey不但功能齊全,免費,更是open source!
早上在找一個可以控制Up Down Left Right的軟體
寫程式常常要這樣移動很麻煩( 如果用vi 就可以進入control mode )
改一下果然很令人滿意:)

2007年11月10日 星期六

lol


中國人的觀念老人就該含飴弄孫,享天倫之樂
但我倒是希望我能一直工作到死。
不想成為工作狂,也許不是工作,但我希望一直有個目標
像兩津他爺爺一樣或是烏龍派出所的作者一樣,他說我要畫烏龍派出所畫到死
事實上去日本玩的時候他們老人卻一點都不老
不太像台灣的老人一整天聚在公園賭博唱卡啦OK
我看到許多老人都在工作( 那個機場的指導遊客如何填寫入境單的人 至少70歲)
有人認為老了就應該退休,這我也認同,但退休應該有計畫的退休
而不是每天很無所事事的活,那我寧願工作( 我指的是有意義的工作 )
像在不忍池看到的那位老人一個人扛著沈重的攝影器材,自得其樂的觀察野鳥
像John Lennon有提到
Life is what happened to you while you busying making other plan.
或是刺激1995的主角說道
Get busy living or get busy dying.
都給我相當多的啟示

2007年11月9日 星期五

世界很多人需要幫助

當你快樂的、舒適的活著時
很多人在受苦
有人吃不飽
你能夠活著心安嗎?

Orz

從這學期開始常常會找對面研究室的一起去吃飯
中午晚上 順便在那邊看看電視
但我以前絕對不會這樣,總是一個人默默吃飯
也許我也逐漸在改變吧?

the fool on the hill 一首我蠻喜歡的歌
說到一個沒有辦法被人家了解的人默默坐在山坡上的故事
我想成為這樣的人嗎? maybe , 並不是想要成為怪咖, 只是我要走自己的路
不想被別人的想法干涉,想要盡量靠自己
就算有另一半我也希望她是想法非常獨立的人

到目前為止接受了不少人的幫助,心理很感謝,也希望有一天可以幫助別人
像pay love forward電影一樣,一個小男孩竟然可以想出這種概念
還努力的執行

《道德經》:
上士聞到,勤而行之;中士聞到;若存或亡;下士聞到,大笑之。

我想目前還是中士吧努力往上士前進。
活著,我只希望能夠死而無憾!
you may say I'm a dreamer but I'm not the only one
I hope you someday will join us, and the world will be as one.

2007年11月8日 星期四

Debug的重要性

寫程式 大概有1/3時間 或更多是在debug
debug的工具非常重要(除此之外test case也很重要)
我認為一個成熟的程式需要經過相當多的測試
聽一個老師說過在台灣測試工程師都是菜鳥,但國外相反
反而測試的人相當重要( 這點我相當同意 )
用visual studio有提供相當方便的debug 工具( 唉 人總是會想往安逸的道路走 )
雖然GDB也很好用 但實在是不夠user friendly
IDE整合開發式環境 還是有其存在的必要的 !

ACM 101 第二次就過了,有兩個秘訣 1. 先找Test Case自己測試 2. 多用Debugger

// ACM101.cpp: 主要專案檔。

#include

using namespace std;

class Block {
public:
Block( int i )
{
myNum = i;
CurrentNum = i;
Nstacks = 0;
Stacks = new Block*[ 24 ];
MyBase = this;
}

void ReturningMe() {
CurrentNum = myNum;
Nstacks = 0;
MyBase = this;
}

void ReturningStacks() {
for( int i = 0; i < Nstacks; ++i ) {
Stacks[ i ]->ReturningMe();
}
Nstacks = 0;
}

void StackLeave(bool MeLeave) {
if ( MyBase != this ) {
MyBase->Nstacks -= ( ( int )MeLeave + Nstacks );
for( int i = 0; i <>Nstacks; ++i ) {
if( MyBase->Stacks[ i ] == this ) break;
MyBase->Stacks[ i ]->Nstacks -= ( ( int )MeLeave + Nstacks );
}
}
}

int myNum;
int CurrentNum;
int Nstacks;
Block **Stacks;
Block *MyBase;
};

struct instruction {
char action[5];
char style[5];
int a;
int b;
};

bool Parse(struct instruction &o) {
cin >> o.action;
if( !strcmp( o.action, "quit" ) ) return false;
cin >> o.a;
cin >> o.style;
cin >> o.b;
return true;
};

/* move onto */
bool operator-( Block &a, Block &b )
{

// puts block a onto block b after returning any blocks that are stacked on top of blocks a and b to their initial positions.
a.StackLeave(true);
a.ReturningStacks();
b.StackLeave(false);
b.ReturningStacks();

a.CurrentNum = b.CurrentNum;
a.MyBase = b.MyBase;

b.Nstacks = 1;
b.Stacks[ 0 ] = &a;

if( b.MyBase != &b ) {
b.MyBase->Nstacks += 1;
b.MyBase->Stacks[ b.MyBase->Nstacks - 1 ] = &a;
for( int i = 0; i <>Nstacks; ++i ) {
if( b.MyBase->Stacks[ i ] == &b ) break;
b.MyBase->Stacks[ i ]->Nstacks += 1;
b.MyBase->Stacks[ i ]->Stacks[ b.MyBase->Stacks[ i ]->Nstacks - 1 ] = &a;
}
}

return true;
}

/* move over */
bool operator-=( Block &a, Block &b )
{

// puts block a onto the top of the stack containing block b, after returning any blocks that are stacked on top of block a to their initial positions.

a.StackLeave(true);
a.ReturningStacks();

a.CurrentNum = b.CurrentNum;
a.MyBase = b.MyBase;

for( int i = 0; i < b.Nstacks; ++i ) {
b.Stacks[ i ]->Nstacks += 1;
b.Stacks[ i ]->Stacks[ b.Stacks[ i ]->Nstacks - 1 ] = &a;
}

b.Nstacks += 1;
b.Stacks[ b.Nstacks - 1 ] = &a;

if ( b.MyBase != &b ) {
b.MyBase->Nstacks += 1;
b.MyBase->Stacks[ b.MyBase->Nstacks - 1 ] = &a;
for( int i = 0; i <>Nstacks; ++i ) {
if( b.MyBase->Stacks[ i ] == &b ) break;
b.MyBase->Stacks[ i ]->Nstacks += 1;
b.MyBase->Stacks[ i ]->Stacks[ b.MyBase->Stacks[ i ]->Nstacks - 1 ] = &a;
}
}

return true;
}

/* pile onto */
bool operator|( Block &a, Block &b )
{

// moves the pile of blocks consisting of block a, and any blocks that are stacked above block a, onto block b. All blocks on top of block b are moved to their initial positions prior to the pile taking place. The blocks stacked above block a retain their order when moved.
a.StackLeave(true);
b.StackLeave(false);
b.ReturningStacks();

a.CurrentNum = b.CurrentNum;
a.MyBase = b.MyBase;

for( int i = 0; i < a.Nstacks; ++i ) {
a.Stacks[ i ]->CurrentNum = b.CurrentNum;
a.Stacks[ i ]->MyBase = b.MyBase;
}

b.Nstacks = 1;
b.Stacks[ 0 ] = &a;
for( int i = 0; i < a.Nstacks; ++i ) {
b.Nstacks += 1;
b.Stacks[ b.Nstacks - 1 ] = a.Stacks[ i ];
}

if( b.MyBase != & b ) {
b.MyBase->Nstacks += 1;
b.MyBase->Stacks[ b.MyBase->Nstacks - 1 ] = &a;
for( int i = 0; i < a.Nstacks; ++i ){
b.MyBase->Nstacks += 1;
b.MyBase->Stacks[ b.MyBase->Nstacks - 1 ] = a.Stacks[ i ];
}

for( int i = 0; i <>Nstacks; ++i ) {
if( b.MyBase->Stacks[ i ] == &b ) break;
b.MyBase->Stacks[ i ]->Nstacks += 1;
b.MyBase->Stacks[ i ]->Stacks[ b.MyBase->Stacks[ i ]->Nstacks - 1 ] = &a;
for( int j = 0; j < a.Nstacks; ++j ) {
b.MyBase->Stacks[ i ]->Nstacks += 1;
b.MyBase->Stacks[ i ]->Stacks[ b.MyBase->Stacks[ i ]->Nstacks - 1 ] = a.Stacks[ j ];
}
}

}

return true;
}

/* pile over */
bool operator|=( Block &a, Block &b )
{

// puts the pile of blocks consisting of block a, and any blocks that are stacked above block a, onto the top of the stack containing block b. The blocks stacked above block a retain their original order when moved.
a.StackLeave(true);

a.CurrentNum = b.CurrentNum;
a.MyBase = b.MyBase;

for( int i = 0; i < a.Nstacks; ++i ) {
a.Stacks[ i ]->CurrentNum = b.CurrentNum;
a.Stacks[ i ]->MyBase = b.MyBase;
}


for( int i = 0; i < b.Nstacks; ++i ) {
b.Stacks[ i ]->Nstacks += 1;
b.Stacks[ i ]->Stacks[ b.Stacks[ i ]->Nstacks - 1 ] = &a;
for( int j = 0; j < a.Nstacks; j++ ) {
b.Stacks[ i ]->Nstacks += 1;
b.Stacks[ i ]->Stacks[ b.Stacks[ i ]->Nstacks - 1 ] = a.Stacks[ j ];
}
}

b.Nstacks += 1;
b.Stacks[ b.Nstacks - 1 ] = &a;
for( int i = 0; i < a.Nstacks; ++i ) {
b.Nstacks += 1;
b.Stacks[ b.Nstacks - 1 ] = a.Stacks[ i ];
}


if( b.MyBase != & b ) {
b.MyBase->Nstacks += 1;
b.MyBase->Stacks[ b.MyBase->Nstacks - 1 ] = &a;
for( int i = 0; i < a.Nstacks; ++i ){
b.MyBase->Nstacks += 1;
b.MyBase->Stacks[ b.MyBase->Nstacks - 1 ] = a.Stacks[ i ];
}

for( int i = 0; i <>Nstacks; ++i ) {
if( b.MyBase->Stacks[ i ] == &b ) break;
b.MyBase->Stacks[ i ]->Nstacks += 1;
b.MyBase->Stacks[ i ]->Stacks[ b.MyBase->Stacks[ i ]->Nstacks - 1 ] = &a;
for( int j = 0; j < a.Nstacks; ++j ) {
b.MyBase->Stacks[ i ]->Nstacks += 1;
b.MyBase->Stacks[ i ]->Stacks[ b.MyBase->Stacks[ i ]->Nstacks - 1 ] = a.Stacks[ j ];
}
}

}
return true;
}
int main()
{
int Num_Block;
struct instruction ReadIn;

cin >> Num_Block;
Block **Blocks = new Block*[ Num_Block ];
for( int i = 0; i < Num_Block; ++i ) {
Blocks[ i ] = new Block( i );
}

bool Valid;

while( Parse( ReadIn ) ) {

Valid = true;

if( ReadIn.a == ReadIn.b ) Valid = false;

for( int i = 0; i <>Nstacks; ++i ) {
if( Blocks[ ReadIn.a ]->Stacks[ i ]->myNum == ReadIn.b ) {
Valid = false;
break;
}
}
for( int i = 0; i <>Nstacks; ++i ) {
if( Blocks[ ReadIn.b ]->Stacks[ i ]->myNum == ReadIn.a ) {
Valid = false;
break;
}
}

if( Valid == false ) continue;

if( strcmp( ReadIn.action, "move" ) == 0 ) {
if( strcmp( ReadIn.style, "onto" ) == 0 ) {
*Blocks[ ReadIn.a ] - *Blocks[ ReadIn.b ];
}else if(strcmp( ReadIn.style, "over" ) == 0 ) {
*Blocks[ ReadIn.a ] -= *Blocks[ ReadIn.b ];
}
}else if( strcmp( ReadIn.action, "pile" ) == 0 ) {
if( strcmp( ReadIn.style, "onto" ) == 0 ) {
*Blocks[ ReadIn.a ] | *Blocks[ ReadIn.b ];
}else if(strcmp( ReadIn.style, "over" ) == 0 ) {
*Blocks[ ReadIn.a ] |= *Blocks[ ReadIn.b ];
}
}
/*
//Debug
for( int i = 0; i < Num_Block; ++i ) {
cout << i << ":" ;
for( int j = 0; j < Num_Block; ++j ) {
if( Blocks[ j ]->CurrentNum == i && Blocks[ j ]->MyBase == Blocks[ j ] ) {
cout << " " <<>myNum;
for( int k = 0; k < ( Blocks[ j ]->Nstacks ); ++k ) {
cout << " " <<>Stacks[ k ]->myNum;
}
break;
}
}
cout << endl;
}*/

}

for( int i = 0; i < Num_Block; ++i ) {
cout << i << ":" ;
for( int j = 0; j < Num_Block; ++j ) {
if( Blocks[ j ]->CurrentNum == i && Blocks[ j ]->MyBase == Blocks[ j ] ) {
cout << " " <<>myNum;
for( int k = 0; k < ( Blocks[ j ]->Nstacks ); ++k ) {
cout << " " <<>Stacks[ k ]->myNum;
}
break;
}
}
cout << endl;
}

system( "pause" );
return 0;
}

這學期修了一門課"嵌入式系統設計"
非常不錯的課
接觸到以前沒有機會碰過的硬體
要知道,所有的software都是建構在hardware上的
在每個Clock跟每個bit之間觀察( PS/2 裝置每個cmd送出11的clock, 起始/終止/ACK 1bit+1byte data)
看看每個針腳的定義, CPU的運作, 裝置的驅動, 記憶體的Maping
bootloader, kernel, cross compile, 用Logic gate寫程式 ...很有趣耶
真是感動阿,雖然以後可能沒什麼機會碰了( VHDL 真是不好寫 哈哈, 要考慮什麼同時 循序性)

跟我們活著的世界一樣,什麼事情都是被一層層包著
把一層層都剝掉,看看裡面是長怎樣 呵呵 單純的好奇心

010101010101010101010101010101010101001101010101010101001010101010101010101

2007年11月6日 星期二

指標

C++的指標實在是很妙的東西
花了一下午做了個實驗
難怪Java不學C++弄指標這種東西(除此之外其他都很像)
弄了一大堆 最後還不是要變成Assembly code (天下武功出少林 哈哈)
不過指標可以用來實做一些特殊的資料結構倒也蠻方便的

#include
#define Size 10

using namespace std;

class Point {
public:
Point()
{

}

Point( int x, int y )
{
this -> x = x;
this -> y = y;
}

void print()
{
cout << "X:" << a0 =" 24601;" a1 =" &a0;" a2 =" (" a3 =" new" i =" 0;" a5 =" new" i =" 0;" a6 =" (" i =" 0;" i =" 0;" j =" 0;" a8 =" (" i =" 0;" i =" 0;" j =" 0;" a9 =" new" i =" 0;" i =" 0;" j =" 0;" b1 =" new">print(); //show 2, 4

Point *b2 = ( Point * ) malloc( sizeof( Point ) );
//b2->print(); //show garbage

Point b3[ Size ];
/*
for( int i = 0; i < b4 =" new" i =" 0;" b5 =" new" i =" 0;" i =" 0;">print();
}


}

自拍

youtube 真是一個有趣的東西
像這種網路服務相當的好玩
可以在上面找到許多有趣的影片, 也可以當作音樂播放器 呵呵

昨天回到家10點多,想說有點時間,把自彈自唱的過程弄下來放到youtube上
一放上去心理就有點緊張,會不會遇到某個外國人說我唱得不好 然後嗆我呢XD
也有點不好意思,會不會太愛現了? 又沒有唱多好
不過也算是往前踏了一小步^^
有時候想太多反而是枷鎖,何不以好玩的心情嘗試看看呢?

http://www.youtube.com/watch?v=q-bR3y5ifIM

2007年11月5日 星期一

....

明明沒有修什麼課啊
為什麼怎麼感覺沒什麼時間
我對時間的感覺似乎跟以前不大一樣了..

...

最近在看著jserv的blog, 真是一個了不起的人啊
無論是他對資訊科技方面的技術或是對文學藝術方面的造詣都相當高
年齡也跟我差不多,是一個值得學習的對象
想想自己就快25了,還是一事無成
活著只是在浪費資源,但我還是卑微的活著:-)

2007年11月4日 星期日

唱歌

我還蠻喜歡唱歌的
但有點不得要領就是
有時走音有時破音有時跟不上拍子
哈哈 但管他的呢 我高興就好

我什麼音樂都聽喔 :{
搖滾 古典 歌劇 音樂劇 輕音樂 民謠 芭樂歌 流行歌 國語歌 台語歌 什麼碗糕

just 4 fun

很多事情對我而言,最重要的是樂趣
我不在意分數這種虛偽的東西( 過去倒是有點在意,現在想起來有點愚蠢 )
這應該算是我的生活態度吧,每個人在追求的東西不一樣
我在追尋什麼呢? 樂趣吧!

2007年11月1日 星期四

nightmare

我常會做惡夢 也會說夢話
我很害怕別人聽到我的夢話, 因為那不是我, 我不能控制那個人說什麼東西

小時候, 總是聽長輩叫你不能做什麼
但現在, 我想要自己確認什麼能做什麼不能做
以抽菸為例, 我認為只要不上癮身體都還可以接受, 我不想要一昧聽從別人的指示活下去
能夠有自己的想法是多麼幸福的一件事
能夠自己做選擇也是很棒的事情

生命是很棒的