有些許慌張,或許是因為感冒了
扁桃腺又發炎了,吃藥的關係
最近幾次練球都打沒多久就沒力了
腳步都跟不上,攻擊位置都沒到當然也都失誤
後天的比賽遇到不錯的強敵,希望能以百分百的狀態上場
最近要養足精神,要調整心態,我需要自信!
I need to trust myself.
2009年5月22日 星期五
2009年5月18日 星期一
2009年4月18日 星期六
Charlie The Unicorn with chinese subtitles
目前有這三集有中文字幕,都沒有甚麼特別的點 = =...
可是看了就想笑 Orz..... 尤其是香蕉王 嘴角失守....
第一集的梗是 Candy(糖果) 跟 Kidney(腎臟) 發音很像...
2009年3月25日 星期三
矩陣相乘
兩個二為矩陣的相乘,矩陣元素為浮點數,
Input 為 M1.txt M2.txt
Ouput 為 Output.txt
文字檔格式為
row
column
elements
例如2x3的矩陣:
2
3
1 2 3
4 5 6
=====結構與函式定義=====
// Matrix Structure
typedef struct MATRIX
{
int row;
int column;
float **data;
}MAT;
// M3 = M1 * M2
MAT M1, M2, M3;
void Init(MAT &mat);
void Multiply(const MAT mat1, const MAT mat2, MAT &mat3);
void Clear();
=====Main.cpp=====
#include "matrix.h"
#include <stdio.h>
#define FtoI // Float to Integer
int main(int argc, char **argv)
{
freopen("M1.txt","r",stdin);
scanf("%d", &M1.row);
scanf("%d", &M1.column);
Init(M1);
freopen("M2.txt","r",stdin);
scanf("%d", &M2.row);
scanf("%d", &M2.column);
Init(M2);
freopen("Output.txt","w",stdout);
Multiply(M1, M2, M3);
Clear();
return 0;
}
// Allocate memory space to matrix structure
void Init(MAT &mat)
{
mat.data = new float*[mat.row];
for(int i=0; i<mat.row; i++)
mat.data[i] = new float[mat.column];
for(int i=0;i<mat.row;i++)
for(int j=0;j<mat.column;j++)
{
float temp;
scanf("%f", &temp);
mat.data[i][j] = temp;
}
}
// M3 = M1 * M2
void Multiply(const MAT mat1, const MAT mat2, MAT &mat3)
{
if(mat1.column == mat2.row)
{
mat3.row = mat1.row;
mat3.column = mat2.column;
mat3.data = new float*[mat3.row];
for(int i=0; i<mat3.row; i++)
mat3.data[i] = new float[mat3.column];
// Multiply
for(int k=0; k<mat2.column; k++)
for(int i=0; i<mat1.row; i++)
{
mat3.data[i][k] = 0; // Set M3 to zero
for(int j=0; j<mat2.row; j++)
mat3.data[i][k] += mat1.data[i][j] * mat2.data[j][k];
}
printf("%d\n%d\n", mat3.row, mat3.column);
for(int i=0;i<mat3.row;i++)
{
for(int j=0;j<mat3.column;j++)
#ifdef FtoI
printf("%d\t", (int)mat3.data[i][j]);
#else
printf("%f\t", mat3.data[i][j]);
#endif
printf("\n");
}
}
else
printf("Dimentions error.\n");
}
// Release the memory space
void Clear()
{
delete M1.data;
delete M2.data;
delete M3.data;
}
Input 為 M1.txt M2.txt
Ouput 為 Output.txt
文字檔格式為
row
column
elements
例如2x3的矩陣:
2
3
1 2 3
4 5 6
=====結構與函式定義=====
// Matrix Structure
typedef struct MATRIX
{
int row;
int column;
float **data;
}MAT;
// M3 = M1 * M2
MAT M1, M2, M3;
void Init(MAT &mat);
void Multiply(const MAT mat1, const MAT mat2, MAT &mat3);
void Clear();
=====Main.cpp=====
#include "matrix.h"
#include <stdio.h>
#define FtoI // Float to Integer
int main(int argc, char **argv)
{
freopen("M1.txt","r",stdin);
scanf("%d", &M1.row);
scanf("%d", &M1.column);
Init(M1);
freopen("M2.txt","r",stdin);
scanf("%d", &M2.row);
scanf("%d", &M2.column);
Init(M2);
freopen("Output.txt","w",stdout);
Multiply(M1, M2, M3);
Clear();
return 0;
}
// Allocate memory space to matrix structure
void Init(MAT &mat)
{
mat.data = new float*[mat.row];
for(int i=0; i<mat.row; i++)
mat.data[i] = new float[mat.column];
for(int i=0;i<mat.row;i++)
for(int j=0;j<mat.column;j++)
{
float temp;
scanf("%f", &temp);
mat.data[i][j] = temp;
}
}
// M3 = M1 * M2
void Multiply(const MAT mat1, const MAT mat2, MAT &mat3)
{
if(mat1.column == mat2.row)
{
mat3.row = mat1.row;
mat3.column = mat2.column;
mat3.data = new float*[mat3.row];
for(int i=0; i<mat3.row; i++)
mat3.data[i] = new float[mat3.column];
// Multiply
for(int k=0; k<mat2.column; k++)
for(int i=0; i<mat1.row; i++)
{
mat3.data[i][k] = 0; // Set M3 to zero
for(int j=0; j<mat2.row; j++)
mat3.data[i][k] += mat1.data[i][j] * mat2.data[j][k];
}
printf("%d\n%d\n", mat3.row, mat3.column);
for(int i=0;i<mat3.row;i++)
{
for(int j=0;j<mat3.column;j++)
#ifdef FtoI
printf("%d\t", (int)mat3.data[i][j]);
#else
printf("%f\t", mat3.data[i][j]);
#endif
printf("\n");
}
}
else
printf("Dimentions error.\n");
}
// Release the memory space
void Clear()
{
delete M1.data;
delete M2.data;
delete M3.data;
}
2009年3月15日 星期日
2009年2月24日 星期二
Lost In Translation
YouTube 配樂連結
實在是很平靜很耐聽又有味道的一首歌
加上女主角又很美
感覺 很棒
有機會來看看這部片好了 ( 愛情,不用翻譯 )
應該是不錯,是Scarlett Johansson早期所拍的電影
電影簡介
實在是很平靜很耐聽又有味道的一首歌
加上女主角又很美
感覺 很棒
有機會來看看這部片好了 ( 愛情,不用翻譯 )
應該是不錯,是Scarlett Johansson早期所拍的電影
電影簡介
2009年2月23日 星期一
2009年2月11日 星期三
CodeBlocks、Dev-C++ 使用 OpenCV
CodeBlocks 設置方法 、 Dev-C++ 設置方法
CodeBlocks:
1. Project → Build options...
2. Linker settings 中的 Other linker options: 加入
-lhighgui -lcv -lcxcore
3. Serach directories 中的 Compiler 加入
C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\cv\include
4. Serach directories 中的 Linker 加入
C:\Program Files\OpenCV\lib
Dev-C++:
1. 在 Tools → Compiler Options → Compiler → 將 Linker Command 的框框勾起來且加
-lhighgui -lcv -lcxcore -lcvaux -lcvcam
2. Tools → Compiler Options → Directories → Libraries 加入
C:\Program Files\OpenCV\lib
使用 CodeBlocks 每次開新專案都要重新再加入路徑
而 Dev-C++ 則不用
但是用 Dev-C++ 又不好 tracing code = =.... 真是討厭
CodeBlocks:
1. Project → Build options...
2. Linker settings 中的 Other linker options: 加入
-lhighgui -lcv -lcxcore
3. Serach directories 中的 Compiler 加入
C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\cv\include
4. Serach directories 中的 Linker 加入
C:\Program Files\OpenCV\lib
Dev-C++:
1. 在 Tools → Compiler Options → Compiler → 將 Linker Command 的框框勾起來且加
-lhighgui -lcv -lcxcore -lcvaux -lcvcam
2. Tools → Compiler Options → Directories → Libraries 加入
C:\Program Files\OpenCV\lib
3. Tools → Compiler Options → Directories → C Includes 加入
C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\cv\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\cvaux\include
C:\Program Files\OpenCV\otherlibs\cvcam\include
4. Tools → Compiler Options → Compiler → Directories → C++ Includes
C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\cv\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\cvaux\include
C:\Program Files\OpenCV\otherlibs\cvcam\include使用 CodeBlocks 每次開新專案都要重新再加入路徑
而 Dev-C++ 則不用
但是用 Dev-C++ 又不好 tracing code = =.... 真是討厭
2009年1月14日 星期三
2009年1月11日 星期日
Yesterday Once More - 木匠兄妹
When I was young I'd listen to the radio.當我還是小女還時,我常聽收音機。
Waiting for my favorite songs.等待著我心愛的歌。
When they played I'd sing along.當它們播放出來的時候,我會跟著唱。
It make me smile.這令我笑容滿面。
Those were such happy times and not so long ago.不久前的回憶那真是段美好的時光。
How I wondered where they'd gone.我不知道那段美好時光怎麼消失了。
But they're back again just like a long lost friend.現在它們就像久無音信的老朋友又回來了。
All the songs I love so well.所有的歌都是我所喜歡的。
Every shalala every wo'wo still shines ! 每一個紗啦啦,每一個哦哦依舊閃耀!
Every shing-a-ling-a-ling that they're starting to sing.他們開始唱的每一個昕鈴鈴-
So fine ! 都如此美妙!
When they get to the part.當他們唱到那段-
Where he's breaking her heart.男孩使女孩傷心的部分時。
It can really make me cry.也讓我流下了眼淚。
Just like before.就像昔日一樣。
It's yesterday once more ! 仿佛昨日重現!
(Shoobie do lang lang)
(Shoobie do lang lang)
Looking back on how it was in years gone by. 回首過去的幾年。
And the good times that had.以及我曾擁有的好時光。
Makes today seem rather sad.使今日更加傷感。
So much has changed ! 太多的轉變!
It was songs of love that I would sing to them.那些舊日跟唱過的舊情歌。
And I'd memorise each word.我仍然記得沒一句歌詞。
Those old melodies still sound so good to me.那些舊旋律聽起來仍然那麼悅耳。
As they melt the years away.它們使歲月消融!
Every shalala every wo'wo still shines ! 每一個紗啦啦,每一個哦哦依舊閃耀!
Every shing-a-ling-a-ling that they're starting to sing.他們開始唱的每一個昕鈴鈴-
So fine ! 都如此美妙!
All my best memorise come back clearly to me.所有美好的回憶都在我腦海裡清晰的浮現!
Some can even make me cry.有些甚至令我淚流滿脈面。
Just like before.就象昔日一樣。
It's yesterday once more ! 仿佛昨日重現!
(Shoobie do lang lang)
Every shalala every wo'wo still shines ! 每一個紗啦啦,每一個哦哦依舊閃耀!
Every shing-a-ling-a-ling that they're starting to sing.他們開始唱的每一個昕鈴鈴-
So fine ! 都如此美妙!
Every shalala every wo'wo still shines ! 每一個紗啦啦,每一個哦哦依舊閃耀!
Every shing-a-ling-a-ling that they're starting to sing.他們開始唱的每一個昕鈴鈴-
So fine ! 都如此美妙!
Love Is All Around - Wet Wet Wet
Love Is All Around
I feel it in my fingers, I feel it in my toes
Love is all around me and so the feeling grows
It's written on the wind, it's everywhere I go
So if you really love me, come on and let it show
You know I love you I always will
My mind's made up by the way that I feel
There's no beginning, there'll be no end
'Cause on my love you can depend
I see your face before me, as I lay on my bed
I kinda get to thinking of all the things we said
You gave a promise to me, and I gave mine to you
I need someone beside me in everything I do
You know I love you I always will
My mind's made up by the way that I feel
There's no beginning, there'll be no end
'Cause on my love you can depend
It's written on the wind, it's everywhere I go
So if you really love me, come on and let it show
Come on and let it show
2009年1月10日 星期六
訂閱:
文章 (Atom)

