Mar 20

Ah, homeward bound I go!
Why not go home, seeing that my field
and gardens are overgrown?
Myself have made my soul serf to my body:
why have vain regrets and mourn alone?

Fret not over bygones
and the forward journey take.
Only a short distance have I gone astray,
and I know today I am right,
if yesterday was a complete mistake.

Lightly floats and drifts the boat,
and gently flows and flaps my gown.
I inquire the road of a wayfarer,
and sulk at the dimness of the dawn.

Then when I catch sight of my old roofs,
joy will my steps quicken.
Servants will be there to bid me welcome,
and waiting at the door are the greeting children.

Gone to seed, perhaps, are my garden paths,
but there will still be
the chrysanthemums and the pine!
I shall lead the youngest boy in by the hand,
and on the table there stands a cup full of wine!

Holding the pot and cup, I give myself a drink,
happy to see in the courtyard the hanging bough.
I lean upon the southern window with an immense satisfaction,
and note that the little place is cosy enough to walk around.

The garden grows more familiar
and interesting with the daily walks.
What if no one knocks at the always closed door!
Carrying a cane I wander at peace,
and now and then look aloft to gaze at the blue above.

There the clouds idle away from their mountain recesses
without any intent or purpose,
and birds, when tired of their wandering flights,
will think of home.
Darkly then fall the shadows and, ready to come home,
I yet fondle the lonely pines and loiter around.

Ah, homeward bound I go!
Let me from now on learn to live alone!
The world and I are not made for one another,
and why go round like one looking for what he has not found?

Content shall I be with conversations with my own kin,
and there will be music and books
to while away the hours.
The farmers will come and tell me that spring is here
and there will be work to do at the western farm.

Some order covered wagons;
some row in small boats.
Sometimes we explore quiet, unknown ponds,
and sometimes we climb over steep, rugged mounds.

There the trees, happy of heart, grow marvelously green,
and spring water gushes forth with a gurgling sound.
I admire how things grow and prosper
according to their seasons,
and feel that thus, too, shall my life go its round.

Enough!
How long yet shall I this mortal shape keep?
Why not take life as it comes,
and why hustle and bustle like one on an errand bound?

Wealth and power are not my ambitions,
and unattainable is the abode of the gods!
I would go forth alone on a bright morning,
or perhaps, planting my cane,
begin to pluck the weeds and till the ground.

Or I would compose a poem beside a clear stream,
or perhaps go up to Tungkao
and make a long-drawn call on top of the hill.
So would I be content to live and die,
and without questionings of the heart,
gladly accept Heaven's will.

-- excerpted from The Importance of Living, by Lin Yutang


Mar 17

qsort包含在<stdlib.h>头文件中,此函数根据你给的比较条件进行快速排序,通过指针移动实现排序。排序之后的结果仍然放在原数组中。使用qsort函数必须自己写一个比较函数。

函数原型:

void qsort (void  *base,size_t num,size_t size , int (* comparator)(const void * , const void  *));

用法以及参数说明:

Base数组起始地址
num数组元素个数
size每一个元素的大小
comparator函数指针,指向比较函数
1比较函数要接受两个参数,一般要转换成要比较数据的类型;
2比较函数的返回值要反映两个参数是大于,等于还是小于的关系,分别用一个正数,0和一个负数表示。
在比较函数中以第一个参数和第二个参数比较则是从小到大排序。反过来则是从大到小排序。看下面的例子:

对int类型数组排序
int num[100];

int cmp ( const void *a , const void *b )
{
return *(int *)a - *(int *)b;
}

qsort(num,100,sizeof(num[0]),cmp);

Mar 17

你也许看进球Top 10,音乐Top 100,电影Top 20之类的东西,有想过给数学定理排名吗?
在99年的一次数学大会上有人给出了“百大数学定理”列表,附有定理证明的时间和证明者。
http://personal.stevens.edu/~nkahl/Top100Theorems.html

其中,排名前十位的数学定理如下:
1. 根号2是无理数
2. 代数基本定理
3. 有理数集是可数集
4. 勾股定理
5. 素数定理
6. 歌德尔不完备定理
7. 二次互反律
8. 不可能尺规三等分角和倍立方体
9. 圆的面积
10. 费马小定理的欧拉推广

Mar 14

今天好像是爱因斯坦大牛的生日哦!

来源:http://curvebank.calstatela.edu/birthdayindex/mar/mar14einstein/einsteingrades.jpg

            http://curvebank.calstatela.edu/birthdayindex/mar/mar14einstein/mar14einstein.htm

Mar 14
其实早想在特别的今天写一篇日志的,但是不知道写什么好。看到M67做的这张图片,我算是服了他的创造力。
转过来收藏了。

注意图片中书的页数。

Mar 12

因为这学期选修《易经》,所以最近就研究了一下太极图,其实我们周围有很多的太极图:

韩国国旗:

Mar 12
今天又发现一个很奇妙的数字序列
 
                                      1/9801=
0.00010203040506070809101112131415161718192021222324252627282930313233
3435363738394041424344454647484950515253545556575859606162636465666768
69707172737475767778798081828384858687888990919293949596979900010203...
 
这是一个有198位循环结的循环小数。
 
其实要制造这样的分数并不难,难的是找到这样形式简单的,比如我用Mathematica找了一个这样的:
 
                                 13717421/1111111111=
0.0123456789012345678901234567890123456789...
 
 
我是在这个网站上看到的,你可以在上面进行分数和小数的转换,可以算出分数是有限的还是循环的,并可以给出循环结。可以在这个网站上进行这类有趣分数序列的探索,不过好像计算能力不算强,像我上面这个0-9的循环就算不出来。