Dec 30 2007

姜汁炖鲜奶

Posted by admin

材料:牛奶1小盒(250ml),糖3-4汤匙,姜汁一茶匙,蛋白4只(打匀),白醋2滴

1.鲜奶小火煮暖(边煮边搅),熄火.(千万不要煮滚)

2.加入糖,搅至糖完全溶入奶

3. 边搅边加入蛋白

4. 再加入姜汁

5. 最后,加白醋2滴

6.搅匀后,把奶过滤,倒进2小碗里(过滤可以用做蛋糕的过滤网或者是鱼汤袋都可以,过滤后可以令炖奶更嫩)

7.用保鲜袋包好,小火蒸12分钟,完成

2碗份量的姜汗炖奶

Filed under : cookbook | No Comments »
Dec 29 2007

Top 20 Amazing Science Facts

Posted by admin

Another trivia list! This list explores a variety of fascinating scientific facts that you probably are unaware of. Science is still a very mysterious subject so there are millions of trivial facts about it - this will be the first of many scientific fact lists in the future.

Facts 1 - 5


1. There are 62,000 miles of blood vessels in the human body - laid end to end they would circle the earth 2.5 times

2. At over 2000 kilometers long The Great Barrier Reef is the largest living structure on Earth Read more »

Filed under : 看文章 | 1 Comment »
Dec 29 2007

Firefox里快捷查询英语单词

Posted by admin

爱词霸是我常用的一个在线查单词的网站,但经常要打开它的页面然后输入查询的单词,搞得我非常不耐烦,so…当然要hack一下了!在Bookmarks(书签)里添加一个链接,内容如下:
Name: 爱词霸
Location: http://dict.iciba.com/%s/
Keyword: w

查询单词的时候就在地址栏输入w 查询的单词
如:
w how
(查询how这个单词)
w dictionray
(将查询dictionary这个单词)

注:name一栏你喜欢改什么名字就改什么吧,Location那一栏不能改变,因为是提交给服务器的地址。Keyword是关键字,也随你喜欢改什么就什么。

Filed under : technology | No Comments »
Dec 27 2007

how do you get people to help you?

Posted by admin

Find the best in everybody. One of the things that Jon Snoddy as I said told me is that you might have to wait a long time. sometimes years, but
people will show you their good side just keep waiting no matter how long it takes. No one is all evil. Everybody has a good side, just keep waiting,
it will come out.
每个人都有闪光点。我提到的乔恩.史诺曾告诉我说,人们会向你展示自己善的一面,但你可能要等待很长的时间,有时甚至好几年才能见到。但不论多久
都要等待。没人是完全邪恶。每一个人都有善的一面,只要继续等待,它就会显现。

So. How do you get people to help you? you can’t get there alone. People have to help you and I do believe in karma. I believe in paybacks. you
get people to help you by telling the truth. Being earnest.  I’ll take an earnest person over a hip person every day, because hip is short term.
Earnest is long term.
如何让别人来帮助你?你不能单打独斗。你需要人来帮你。你相信因果报应。我相信回报。你讲真话,你们就来帮你。真挚做人。我会毫不犹豫的选择一个
真诚的人,而不是一个时髦的人,因为时髦是短暂的。真诚是长远的。

择自关于梦想-生命的最后讲座 的一段话,同时这个讲座也是非常值得一看的。片中的主讲人Randy Pausch是卡耐基梅隆大学的计算机系教授,他的肝脏上发现有多个恶性肿瘤,很可能只有3-6个月的健康了。Pausch教授就是在这种情形下作的这次演讲,演讲的题目是“实现儿时的梦想” (Achieving Your Childhood Dreams And Enable Dreams of Dreams)

视频

Filed under : 看文章 | No Comments »
Dec 24 2007

I need to wake up

Posted by admin

Tags:



2007年第79届奥斯卡最佳歌曲
改善全球变暖问题,你我有责。而I need to wakeup正是《难以忽视的真相-An Inconvenient Truth》的片尾曲。主唱是获得过数次格莱美奖的知名创作歌手,并且主唱是乳腺癌患者,这更表现了作者的无惧。 Read more »

Filed under : funny | No Comments »
Dec 19 2007

gtalk的翻译机器人!

Posted by admin

Google Talk 官方发布了N多版本的翻译机器人,用户可以通过添加相应的GT Bot为好友,同时输入希望被翻译语种。

英文转中文:en2zh@bot. talk.google.com
中文转英文:zh2en@bot.talk.google.com

以此类推:ar2en, bg2en, de2en, de2fr, el2en, en2ar, en2de, en2el, en2es, en2fr, en2it, en2ja, en2ko, en2nl, en2ru, en2zh, es2en, fi2en, fr2de, fr2en, hi2en, hr2en, it2en, ja2en, ko2en, nl2en, ru2en, uk2en, ur2en, zh2en,fr2de.

Filed under : funny | 1 Comment »
Dec 19 2007

Sql中InnoDB类型转换为MyISAM命令

Posted by admin

ALTER TABLE 表名 TYPE= MyISAM;
连编码一起转
ALTER TABLE 表名 Type=MyISAM CHARACTER SET utf8;

Filed under : funny | No Comments »
Dec 16 2007

js显示相对时间

Posted by admin

TYPO的show_dates_as_local_time()函数是用来显示相对的发贴时间。
首先链接typo.js

<%= javascript_include_tag "typo" %>

在application的help里添加

def js_distance_of_time_in_words_to_now(date)
time = date.utc.strftime("%a, %d %b %Y %H:%M:%S GMT")
"<span class=\"typo_date\" title=\"#{time}\">#{time}</span>"
End

View里

<%= js_distance_of_time_in_words_to_now(date) %>


<script type="text/javascript">
//<![CDATA[
show_dates_as_local_time()
//]]>
</script>

OK,不过这js只显示8星期内的相对时间,超过则显示为原始时间。

Filed under : technology | No Comments »
Dec 13 2007

用ruby完成c程序设计书的习题

Posted by admin

Tags:

最大公约数和最小公倍数
m
n求余为a, a不等于0
m <- n, n <- a, 继续求余
否则
n 为最大公约数
最小公倍数 = 两个数的积 / 最大公约数

a=gets.to_i
b=gets.to_i
max=a*b
if a
b,a=a,b
end
re=a%b #remainder
while re!=0
a,b=b,re
re=a%b
end
print “Greatest common divisor: “,b,”\n”,”lease common multiple: “,max/b

水仙花数

for number in 100..999
hundred=number/100
ten=(number-hundred*100)/10
a=(number-hundred*100)%10
total=hundred**3+ten**3+a**3
if number==total
print "#{number} is right\n"
end
end

一个球从100m高度自由落下,每次落地后反跳回原高度的一半,再反弹。求它在第10次落地时,共经过多少米?第10次反弹多高?

x=100.0
y=0.0
10.times do
y+=x/2+x
x=x/2
end
puts y,x

猴子吃桃

=begin
# recursion
def monkey(n)
if n==1
c=1
else
c=(monkey(n-1)+1)*2
end
c
end
puts monkey(10)
=end
x=1
10.times do
puts x
x=(x+1)*2
end

求素数
for m in 1..300000
k=Math.sqrt(m)
is=true
for i in 2..k
if m%i==0
is=false
break
end
end
if is
print m," "
end
end

Filed under : technology | No Comments »
Dec 11 2007

8 CORE Mac Pro OFFICIALLY announced by Apple!!

Posted by admin

apple.com — 8-core or quad-core Mac Pro workstation Meet the latest addition to the Mac Pro family: The world’s first 3.0GHz, 8-core Intel Xeon-based Mac Pro. Consider the bar officially raised.
苹果正式发布了8核的Mac Pro