【转载】嫌麻煩,會錯過

2010年4月29日 pighead 没有评论

转自:蔡康永的博客

15歲覺得游泳難,放棄游泳,到18歲遇到一個你喜歡的人約你去游泳,你只好說“我不會耶”。

18 歲覺得英文難,放棄英文,28歲出現一個很棒但要會英文的工作,你只好說“我不會耶”。

人生前期越嫌 麻煩,越懶得學,後來就越可能錯過讓你動心的人和事,錯過新風景


( 和這篇味道類似的 , 還 有另一篇 : 成名 , 晚一點或許更好 )

可以看看 康 永的微博 [ 博客,是客廳 ~~ 微博,是夜店 ]

分类: 移花接木 标签:

Windows XP系统中用户帐号面板空白解决的方法

2010年3月4日 pighead 没有评论

虽然XP都快要被淘汰了,但是有用的东西还是转一下

这种情况为

1)内核文件损坏或者

如果是内核文件损坏,那就比较麻烦,只有重新安装系统了.

2)内核文件被修改
可以在 开始-运行中输入sfc    /scannow,然后按回车,放入系统盘,按提示完成就可以了。

或者直接在 开始-运行中输入以下命令,每输入一个命令按一下回车。

regsvr32 nusrmgr.cpl
regsvr32 mshtml.dll
regsvr32 jscript.dll
regsvr32 /i shdocvw.dll
regsvr32 vbscript.dll
regsvr32 appwiz.cpl
regsvr32 msi.dll
regsvr32 mshtmled.dll
regsvr32 /i shell32.dll

分类: 随便说说 标签:

有空好好学习吧

2010年3月4日 pighead 没有评论

小滴如是说,我觉得也是,在社区大学最后一年,整个人都变懒了……

第一次同一天连续两个考试(真正的连续啊,4:30pm考到6:30pm,然后开车到另一个学校7:00pm再开始考),第一次考完完全没感觉也预测不到grade

看来真的要像小滴说的,有空好好学习

原来这个不是中国特色嘛……

2010年3月1日 pighead 2 条评论

在cnbeta看到一篇名为 《不会编程的程序员》 的文章,原文是其实更有趣,不过是英文来着的 “Why Can’t Programmers.. Program?” 里面那个简单的程序我也大概花了5-10分钟编出来吧,但只停留在能出来结果的层面,还不够简洁,不知道实际面试的时候会不会要求消耗最小的资源来达到目的呢?

看来程序员不会编程不单单是中国才有的,是一国际性的东西。

不会编程的程序员

分类: Programming, Scheme 标签:

算法果然是王道

2010年2月27日 pighead 2 条评论

这个学期有两堂的programming课,果然algorithm和construction才是重中之重啊……越来越觉得自己很笨

分类: Scheme 标签: ,

村上春樹在耶路撒冷演講

2010年2月16日 pighead 没有评论

转自一五一十部落

**引用開始**

「Always on the side of the egg 永遠站在雞蛋的一側」

Good evening. I have come to Jerusalem today as a novelist, which is to say as a professional spinner of lies.

各位晚上好,我今天作為一名小說家來到耶路撒冷的,也就是說一名職業謊言製造者。

Of course, novelists are not the only ones who tell lies. Politicians do it, too, as we all know. Diplomats and generals tell their own kinds of lies on occasion, as do used car salesmen, butchers and builders. The lies of novelists differ from others, however, in that no one criticizes the novelist as immoral for telling lies. Indeed, the bigger and better his lies and the more ingeniously he creates them, the more he is likely to be praised by the public and the critics. Why should that be?

當然,並不是只有小說家才說謊的。政治家也說謊,正如大家所知道的。外交官和將軍有時也要說著他們自己的謊言,就如同二手 車推銷員、劊子手以及建築師一樣。但是,小說家的謊言與其他人不一樣,因爲沒有人會批評小說家,稱他們說謊不道德。實際上,小說家的謊言說得越大越好,編 造謊言的能力越高明,他才更可能受到公衆和評論家的認可和好評。這是爲什麽呢?

My answer would be this: namely, that by telling skilful lies–which is to say, by making up fictions that appear to be true–the novelist can bring a truth out to a new place and shine a new light on it. In most cases, it is virtually impossible to grasp a truth in its original form and depict it accurately. This is why we try to grab its tail by luring the truth from its hiding place, transferring it to a fictional location, and replacing it with a fictional form. In order to accomplish this, however, we first have to clarify where the truth-lies within us, within ourselves. This is an important qualification for making up good lies.

我的答案是:通過更有技巧地說謊——也就是說,創作看起來似乎是真實的小說——小說家才能夠将真相帶到新的地方,才能讓新的陽光 撒到這片新的土地上。在多數情況下,幾乎不可能以其原始形式掌握真相,也不可能準确地闡述真相。這就是爲什麽我要将真相從衆多掩蓋之中拉出來,将它放到一 個虛幻的地方,再用一種虛幻的形式将它替代。但是要想做到這一點,我們首先要清楚真實的謊言在我們心中,就在我們自己的心中。這是要想編造完美謊言的一個 非常重要的資質。

Today, however, I have no intention of lying. I will try to be as honest as I can. There are only a few days in the year when I do not engage in telling lies, and today happens to be one of them.

但今天,我并不想說謊。我會盡可能地做到誠實。這也是一年當中我不說謊的爲數不多的幾天之一,今天碰巧就是其中之一。

So let me tell you the truth. In Japan a fair number of people advised me not to come here to accept the Jerusalem Prize. Some even warned me they would instigate a boycott of my books if I came. The reason for this, of course, was the fierce fighting that was raging in Gaza. The U.N. reported that more than a thousand people had lost their lives in the blockaded city of Gaza, many of them unarmed citizens–children and old people.

讓我來告訴你們真相。在日本有許多人建議我不要來這裏接受“耶路撒冷文學獎”。甚至有些人警告我,如果我要堅持來的 話,他們就會掀起抵制閱讀我的小說的活動。當然,原因是加沙的戰争正如火如荼。據聯合國報道,已經有一千多人在已封鎖的加沙城失去了他們的生命,許多都是 手無寸鐵的平民——孩子和老人。

Any number of times after receiving notice of the award, I asked myself whether traveling to Israel at a time like this and accepting a literary prize was the proper thing to do, whether this would create the impression that I supported one side in the conflict, that I endorsed the policies of a nation that chose to unleash its overwhelming military power. Neither, of course, do I wish to see my books subjected to a boycott.

在接到這個獲獎通知後我不斷地問自己,是否要在這樣一個特殊時刻來耶路撒冷,接受這樣的文學獎是否是現在該做的事情,這樣做是否會讓人産生一種印象,說我支持沖突中的其中一方,說我支持選擇向世界展示其龐大軍事力量的國家的政策呢。當然我也不希望看到我的書遭到抵制。

Finally, however, after careful consideration, I made up my mind to come here. One reason for my decision was that all too many people advised me not to do it. Perhaps, like many other novelists, I tend to do the exact opposite of what I am told. If people are telling me– and especially if they are warning me– “Don’t go there,” “Don’t do that,” I tend to want to “go there” and “do that”. It’s in my nature, you might say, as a novelist. Novelists are a special breed. They cannot genuinely trust anything they have not seen with their own eyes or touched with their own hands.

但最後在經過深思熟慮後,我還是決定來到耶路撒冷。我之所以做出這樣的決定,原因之一就是有太多的人不想讓我來這裏。 可能與許多其他小說家一樣,我總是要做人們反對我做的事情。如果人們對我說——并且特别是如果他們警告我——“不要去那裏”、“不要這樣做”,我就偏偏要 去那裏,偏偏要這樣做。你可能會說,這就是小說家的性格。小說家是另類。如果他們沒有親眼所見,沒有親手觸摸,他們是不會真正相信任何事情的。

And that is why I am here. I chose to come here rather than stay away. I chose to see for myself rather than not to see. I chose to speak to you rather than to say nothing.

這就是我來到這裏的原因。我選擇來這裏,而不是逃避。我選擇親自來看一看,而不是回避,我選擇在這裏向大家說幾句,而不是沉默。

Please do allow me to deliver a message, one very personal message. It is something that I always keep in mind while I am writing fiction. I have never gone so far as to write it on a piece of paper and paste it to the wall: rather, it is carved into the wall of my mind, and it goes something like this:

請允許我在這裏向你們傳遞一條信息,是一個非常私人的信息。在我寫小說時我總是在心裏牢記,但我從來都不會把它寫在紙上,貼在牆上,我是把它刻在了心靈的牆上,這條信息是這樣的:

“Between a high, solid wall and an egg that breaks against it, I will always stand on the side of the egg.”

“在一座高大堅實的牆和與之相撞的雞蛋之間,我永遠都站在雞蛋的一側”。

Yes, no matter how right the wall may be and how wrong the egg, I will stand with the egg. Someone else will have to decide what is right and what is wrong; perhaps time or history will do it. But if there were a novelist who, for whatever reason, wrote works standing with the wall, of what value would such works be?

是的,無論牆是多麽的正确,雞蛋是多麽地錯誤,我都站在雞蛋的一側。其他人可能會判斷誰是誰非,也許時間或歷史會來判斷。但是,如果一個小說家無論因何種原因站在牆的一側來創造,那麽他的作品的價值何在呢?

What is the meaning of this metaphor? In some cases, it is all too simple and clear. Bombers and tanks and rockets and white phosphorus shells are that high wall. The eggs are the unarmed civilians who are crushed and burned and shot by them. This is one meaning of the metaphor.

這個比喻是什麽意思呢,在有些時候,非常簡單明了。轟炸機、坦克、火箭以及白磷彈就是那堵高牆,雞蛋是被這些武器毀滅、燒傷并擊斃的手無寸鐵的百姓。這就是這個比喻的其中一層含義。

But this is not all. It carries a deeper meaning. Think of it this way. Each of us is, more or less, an egg. Each of us is a unique, irreplaceable soul enclosed in a fragile shell. This is true of me, and it is true of each of you. And each of us, to a greater or lesser degree, is confronting a high, solid wall. The wall has a name: it is “The System.” The System is supposed to protect us, but sometimes it takes on a life of its own, and then it begins to kill us and cause us to kill others–coldly, efficiently, systematically.

但是,并不僅僅是這些。它還 有更深一層的含義,我們來這樣考慮一下,我們中的每一個人或多或少都是一個雞蛋。我們中的每一個人都是存在于一個脆弱外殼中唯一的、不可替代的靈魂。我也 一樣,對你們中的每一個人也一樣。并且,我們中的每一個人在某種程度上也面臨着一堵高大堅實的牆。這個牆有一個名字:那就是“體制”。這個體制本來是要保 護我們的,但是有時候它會呈現出它自己的一面,然後就開使殘殺我們,并使我們去殘殺他人——冷酷、有效、系統地殘殺。

I have only one reason to write novels, and that is to bring the dignity of the individual soul to the surface and shine a light upon it. The purpose of a story is to sound an alarm, to keep a light trained on the System in order to prevent it from tangling our souls in its web and demeaning them. I truly believe it is the novelist’s job to keep trying to clarify the uniqueness of each individual soul by writing stories–stories of life and death, stories of love, stories that make people cry and quake with fear and shake with laughter. This is why we go on, day after day, concocting fictions with utter seriousness.

我 寫小說只有一個原因,那就是要給予每一個靈魂以尊嚴,并且讓他們接受陽光的沐浴。情節的目的聽起來是一種警報,是對體制進行光芒的培訓,阻止它將我們的靈 魂纏結在它的圈套中,防止踐踏我們的靈魂。我忠實地相信,小說家的職責就是通過創作故事——關于生死、關于愛情、讓人哭泣和顫慄以及讓人大笑不已的故事, 讓人們意識到每一個靈魂的唯一性。這就是我不停創作的原因,日復一日,以十分嚴肅的態度創作小說。

My father passed away last year at the age of ninety. He was a retired teacher and a part-time Buddhist priest. When he was in graduate school in Kyoto, he was drafted into the army and sent to fight in China. As a child born after the war, I used to see him every morning before breakfast offering up long, deeply-felt prayers at the small Buddhist altar in our house. One time I asked him why he did this, and he told me he was praying for the people who had died in the battlefield. He was praying for all the people who died, he said, both ally and enemy alike. Staring at his back as he knelt at the altar, I seemed to feel the shadow of death hovering around him.

我的父親是在去年去世的,享年九十歲。他是一名退休教 師,是一名兼職佛教高僧。他從京都的研究生院畢業後,應征入伍,被派到中國打仗。作爲一個戰後出生的孩子,我每天早晨在早飯前,總是看到他的在我家的小佛 教祭壇前非常虔誠地長時間地祈禱。有一次我就問父親爲什麽要這樣做,他就告訴我說,他是在爲戰争中死去的人們祈禱。他說,他爲所有死去的人祈禱,無論是同 盟還是敵人。當我看着他跪在祭壇前的背影時,我似乎感受到了萦繞在他周圍的死亡的陰影。

My father died, and with him he took his memories, memories that I can never know. But the presence of death that lurked about him remains in my own memory. It is one of the few things I carry on from him, and one of the most important.

我的父親去世了,帶着他的記憶,我永遠都不可能知道的記憶。但是環繞在他周圍的那些死亡卻留在了我自己的記憶中。這是我從他那裏學習到東西之一,也是最重要的東西之一。

I have only one thing I hope to convey to you today. We are all human beings, individuals transcending nationality and race and religion, and we are all fragile eggs faced with a solid wall called The System. To all appearances, we have no hope of winning. The wall is too high, too strong–and too cold. If we have any hope of victory at all, it will have to come from our believing in the utter uniqueness and irreplaceability of our own and others’ souls and from our believing in the warmth we gain by joining souls together.

今天我只希望向你們傳達一個信息。我們都是 人類,是超越國籍、種族和宗教的個體的人,我們都是脆弱的雞蛋,要面臨被稱作“體制”的堅實的牆。從外表來看,我們根本就沒有赢的希望。這堵牆太高太堅實 ——并且太冷酷了。如果我們有一點戰勝它的希望,那就是來源于我們對我們自己以及他人靈魂唯一性和不可替代性的信念,來源于我們對将靈魂聯合起來可獲得溫 暖的信念。

Take a moment to think about this. Each of us possesses a tangible, living soul. The System has no such thing. We must not allow the System to exploit us. We must not allow the System to take on a life of its own. The System did not make us: we made the System.

花一點時間來考慮這些,我們每一個人都擁有有形的生動的靈魂,而體制沒有。我們不能讓體制來剝削我們。我們不能讓體制現出它自己的一面。不是體制創造了我們,而是我們建立了體制。

That is all I have to say to you.

這就是我想要對你們說的。

I am grateful to have been awarded the Jerusalem Prize. I am grateful that my books are being read by people in many parts of the world. And I would like to express my gratitude to the readers in Israel. You are the biggest reason why I am here. And I hope we are sharing something, something very meaningful. And I am glad to have had the opportunity to speak to you here today.

非常感謝授予了我耶路撒冷文學獎。我也非常感謝世界各地有那麽多人看了我寫的書。我還要感謝以色列的讀者們。你們是我來到這裏的最主要原因。我希望我們能夠分享一些東西,一些有非常有意義的東西。我也非常高興今天有機會在這裏發言。

Thank you very much.

謝謝大家。

**引用結束**

分类: 随便说说 标签:

Scheme: trace function

2010年2月16日 pighead 没有评论

I will record the experience or some useful command here.

The first one is used to trace a function calls, very useful.

>(trance func)

func is the function you define.

The next time you invoke func you will see the trace of function calls.

分类: Scheme 标签:

WIN7下Live Message在任务栏出现两个任务的解决办法

2010年1月22日 pighead 1 条评论

在WIN7使用Live Message的过程中,发现LM会在WIN7的任务栏出现两个任务,一个是LM的默认窗口,一个是以我的ID登录后的窗口。其实两者是同一个东西,我不明白为什么MS要搞成这个样子。一开始懒得搞,后来越看越不顺眼,上网一google原来大家都不喜欢,然后也有了解决方法:

How to Have Windows Live Messenger with a Windows 7 Taskbar or Tray Icon

分类: 随便说说 标签:

让代码更美:10大编程字体

2010年1月20日 pighead 没有评论

转载自三秒

日复一日的编写代码,有没有感到审美疲劳?也许些许的改变就能让我们感到生活更美好。

换一种编程字体吧!体验一种新的代码感觉。

下面我眼中的十大编程字体:

10. Courier

基本上所有的系统都自带了此种字体,有时候它又以Courier New的名字出现。不幸的是很多终端和编辑器都默认使用此种字体,虽然这不会影响使用,但这会影响心情,它太枯燥了。以前看到这样一句评论:久不见牡丹会以仙人掌为美。这句评论形Courier字体非常合适。所以如果你还有其他选择的话,请勿使用此字体。更不幸的事情是最后你还是会继续使用它,那3秒只能强烈建议你调整一下字体大小并消除锯齿。

9. Andale Mono

稍微比Courier好一点的字体,有些时候它也被用作默认字体。3秒给它的定义是:一个软件不自带就不会有人去专门下载使用的一种字体。

8. Monaco

使用苹果Mac的人们对它不陌生,它是Mac的默认字体,3秒的经验是:使用它时,把字体设置为9号或者10号时会更好,这样看起来就相对不寒酸了。

7. Profont

Profont是一种类Monaco的位图字体,你能够在Mac, Windows和Linux上面使用,Mac平台的ProFontX就是它的修改版,当然两个字体并非出自同一作者之手。如果使用它,你把字体调小一点为好。而且如果你是非Mac平台,它是Monaco的最佳替代者。如果你喜欢微小字体或者喜欢眼疲劳,你可以考虑一下它。

6. Monofur

Monofur是一种独特的等宽字体,各种大小看起来都非常不错,前提是你已经设置为消除锯齿。这种字体的外观比较独特,看着它容易让你想起上世纪八十年代Sun的Solaris(SunOS)上的OPENLOOK窗口管理器。如果你喜欢新鲜的东西,你可以试一下这种字体,再次提示一下:消除锯齿。

5. Proggy

Proggy是一种很干净的等宽字体,貌似受到很多Windows用户的青睐,在Mac上它同样工作正常。使用它一般把字体调小点,不要消除锯齿。

4. Droid Sans Mono

Droid 字体家族 适合手机等小屏幕的移动平台,比如Android。它在Apache许可证下授权。伟大的编程字体,在我列出的等宽字体中它是最突出的一个。

3. Deja Vu Sans Mono

Deja Vu 是我最喜欢的免费字体家族之一,基于Vera字体家族。Deja Vu已经能够支持更多的字符了,并保持了Vera的外观和感觉。适于任何大小,只要你消除锯齿。

2. Consolas

Consolas是商业字体,它是Luc(as) de Groot为微软ClearType字体家族设计的,与微软很多产品绑定在一起,所以幸运的是可能你的系统上已经有它的存在了。如果你在不消除锯齿的情况下使用它,那还不如使用Courier吧!

1. Inconsolata

Inconsolata是我最喜欢的等宽字体,而且是免费的。在发现它之后,3秒迅速改变了Deja Vu Sans Mono作为我默认编程字体的情况。从终端窗口到代码编辑器,我让它无处不在。它的风格非常独特。设计它的时候就已经把锯齿消除了,就算是非常小的时候也很清晰—真正的情况是它适合于任何大小。感谢Raph Levien创造了Inconsolata,并让它免费。


这些字体中大部分是免费的,可以自由下载。有些是是商业软件的一部分,比如Consolas。

你感觉怎么样?如果感觉相见恨晚,不妨去尝试一下。

原文 http://3seconds.cn/2010/01/20/10-programming-fonts.html

分类: 小道消息 标签:

Rainbow

2009年7月14日 林胖胖 2 条评论

唱卡拉OK时在门口巧遇的大彩虹,说巧遇是因为一开始我根本没发现它,过马路的时候突然看到隔壁路上有辆车载等绿灯,车里的人拿着手机向我的方向照过来。我非常奇怪,干嘛照我呢?扭头过去,才发现他是在照这条大彩虹。

用户插入图片

分类: 加州流浪记 标签: