robbie 的个人资料Gone with the Wind照片日志列表 工具 帮助
3月9日

Enjoy FingerPrint

最近,鸟枪换炮了, 换了台 Compaq nc6400 Laptop.
装HP的Security Manager for ProtectTools 时, 报错说no permission for "CreateKetSet", connect system administrator.
因为装不上security manager for protecttools, 就不能玩指纹识别登录了, 所以稍微研究了一下,
发现原因是其他安全程序替换了MachineKeys 的访问权限, 可以通过修改MachineKeys 的访问权限的搞定
标准路径是:
C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys
 
 
 
 

JavaScript彻底隐藏你HTML网页的源代码

<html>
<head>
<script>
function clear() {
Source=document.body.firstChild.data;
document.open();
document.close();
document.body.innerHTML=Source;
}
</script>
</head>
<body onload=clear()>
<!--
<div align=center>呵呵,现在试试能否看到我的源代码?
</div>
-->
</body>
</html>

删除、添加Windows Live Messenger的共享目录

 
添加 regsvr32 "E:\Program Files\MSN Messenger\fsshext.8.0.****.dll"
删除 regsvr32 -u "E:\Program Files\MSN Messenger\fsshext.8.0.****.dll"
6月10日

杀死进程

用法:开个cmd.exe窗口,输入:ntsd -c q -p PID
 
只有System、SMSS.EXE和CSRSS.EXE不能杀。
前两个是纯内核态的,最后那个是Win32子系统,ntsd本身需要它。ntsd从2000开始就是系统自带的用户态调试工具。被调试器附着(attach)的进程会随调试器一起退出,所以可以用来在命令行下终止进程。使用ntsd自动就获得了debug权限,从而能杀掉大部分的进程。ntsd会新开一个调试窗口,本来在纯命令行下无法控制,但如果只是简单的命令,比如退出(q),用-c参数从命令行传递就行了。NtsdNtsd 按照惯例也向软件开发人员提供。只有系统开发人员使用此命令。有关详细信息,请参阅 NTSD 中所附的帮助文件。


  

3月30日

What's New in .Net 2.0 (1)

Google Search Macro in VS2003 
 
Public Module Search
    Sub GoogleSearch()
        Dim strUrl As String
        Dim selection As TextSelection = DTE.ActiveDocument.Selection()
        If (Not selection Is System.DBNull.Value) And (selection.Text <> "") Then
            strUrl = "www.google.com/search?q=" + selection.Text
            DTE.ExecuteCommand("View.URL", strUrl)
        Else
            MsgBox("Select Text first to Search")
        End If
    End Sub
End Module
 
Google Search Macro in VS2005
 
Public Module Search
    Sub GoogleSearch()
        Dim strUrl As String
        Dim selection As TextSelection = DTE.ActiveDocument.Selection()
        If Not String.IsNullOrEmpty(selection.Text) Then
            strUrl = "www.google.com/search?q=" + selection.Text
            DTE.ExecuteCommand("View.WebBrowser", strUrl)
        Else
            MsgBox("Select Text first to Search")
        End If
    End Sub
End Module 
2月28日

The more ...

The more you learn, the more you know.

The more you know, the more you forget.

The more you forget, the less you know.

Why bother to learn?

酒吧英文扫盲

1、 BASE:基酒.一般鸡尾酒都是以某种烈酒为主体的,那么这种烈酒就被称为基酒;
2、 BARTENDER:调酒师;
3、 DRY:在葡萄酒中意为不甜;在琴酒和啤酒中则为烈;
4、 HALF&HALF:一半水,一半酒;
5、 ON THE ROCKS:加冰块;
6、 RIMMING A GLASS:杯口加糖圈
7、 SWEET&SOUR:一半柠檬汁和一半糖浆的混合液
8、 TIE ME UP:点同样的酒,喝完了酒保自动再来一杯
9、 RECIPE:酒谱配方,即指调制鸡尾酒的配方
10、UP OR DOWN:UP指鸡尾酒杯,DOWN指老式杯,也就是加冰或不加冰
11、FIZZ:混合饮料之一,其特点是有气泡
12、FRAPPE:将酒倒入盛满碎冰的杯内的一种鸡尾酒。
13、CHASER:饮用酒精度数高的酒类时,辅饮的饮料。
14、SOBER:醒酒
15、PROOF:美国的酒精计量单位,用酒精度数除以2,比如100PROOF代表酒精度数为50度。
16、DAIQUIRI:是一种通常以水果为主,加香甜酒和大量的碎冰用果汁机加以调制
17、GIN:琴酒,又称金酒、毡酒,杜松子酒,英国、荷兰的国饮。大致分三种:美国GIN,荷兰GENEVA,野莓SLOEGIN。
18、VODKA: 伏特加,多用土豆、玉米酿制,产于俄罗斯、芬兰,经典的喝法为熏鱼+鱼子酱+伏特加。大致分四种:标准VODKA,香料FLAVOURRED VODKA,辣椒VODKA-PERISOVKA,柠檬VODDKA LIMONAYA。
19、RUM:兰姆酒,产于牙买加,最著名的为摩根船长。
20、WHISKY:威士忌,通常美国和加拿大所产的写为WHISKEY,苏格兰出产的写为WHISKY,最好的饮用年限为15年。
21、BRANDY:白兰地,最好的白兰地产于法国的干邑(COQNAC),品种有人头马,轩尼诗(HENNICI),MARTINI。
22、TEQUILA:龙舌兰,又叫特基拉,产于墨西哥,最经典的喝法为柠檬+盐+特基拉。
23、COINTREAU:柑桔酒
24、SODA WATER:苏打水
25、GINGER ALE:姜啤酒
26、TONIC WATER:汤力水
27、GRENADINE:红石榴糖浆
28、CHERRY HEERING:樱桃酒
29、ADVOCAAT:蛋黄酒
30、AMARETTO:杏仁酒
31、COCORIBE:椰子酒
32、KAHLUA:咖啡酒
33、CREAM DECACAO:可可酒
34、GALLIANO:茴香酒
35、GET PEPPERMINT:薄荷酒
36、BAILEYSIRISH CREAM:爱尔兰忌廉酒
37、白兰地的缩写字母意义:E代表ESPECIAL(特级),
V代表VERY(非常好),
S代表SUPERICR(高级),
X代表EXTRA(特醇),
F代表FINE(好),
O代表OLD(老,陈年),
P代表PALE(淡色),
C代表COQNAC(干邑)。
38、年限标志:V O 代表12-15年;V V O 代表15-18年;
V S O代表18-20年,V S O P代表25-35年,
X O代表45年,EXTRA代表75年,NAPOLENO代表年数不详。

办理护照

总部地址是浦东民生路1500号,地铁2号线上海科技馆站下,3号口出站向前走过两个路口就到了,因为我去的时候是礼拜六,竟然在我前面有700多人排队,晕!等了2个小时才轮到。

准备材料:

  1. 申请表:现场可以领表。
  2. 身份证原件及复印件一份,现场可以复印。
  3. 户口簿原件及复印件一份,现场可以复印。
  4. 二寸照片三张,一张贴表,两张上交。可以自己带,但我自带的被认为不像本人,巨晕!只好到现场专门的房间去照,30块钱6张,速度很快,也不用重新排队。

申请过程:

进正门左拐。先要领一个号,人不多的话,速度很快,大概1分钟10个人。材料递交以后得到一张回执。可以选择快递或自取,自取可以选择浦东总部或者徐家汇分部,预计取护照的日期是10个工作日左右。

领取过程:

我在申请时选择的是自取方式,进正门右拐,不用排队领号,直接到3号窗口。假如和本人一样晕,没带回执就去了,先要到5号窗口交身份证后查个号,付款200元后就行了。工作人员态度很好:)

2分钟左右搞定。

2月26日

网络连接里的图标忽然不见了

不知怎么回事,最近网络连接里的里的图标忽然都不见了,但上网还行,搞了很久 巨晕。
......
 
终于找到这么一篇:
 
 
想到,最近搞过DCOM配置的,看来Windows的问题还是微软KB有点用。:)
12月28日

修复 Visual Studio 2003 的 Wizard

If you have recently created your own VS.NET add-in, or used someone else's, and uninstalled it, you may have run into the following error (or one similar) in VS.NET when trying to add a new object to your application:

Could not run the 'C:\Program Files\Microsoft Visual Studio .NET\VC#\CSharpProjectItem\LocalProjecrtItems\..\CSharpAddWinFormWiz.vsz' wizard'

The general symptom is: "Could not run the + some .vsz file + wizard." when you try to add a class, form, or whatever to your VS.NET project.

First of all, if you didn't write the addin, you can't fix the uninstall. If you did write the add-in, go into the setup project and mark everything as excluded that might already be on the user's system. In particular, extensibility.dll and vslangproj.dll. If you're using any of the Office components (MSO components), such as command bars, you will want to mark those DLLs as system.

Now, if this has already hosed your system (likely, if you're here), then you need a fix. The best fix is simply to run the repair for VS.NET by going to control panel, add/remove programs, and clicking "Change/Remove" for VS.NET and then choose the Repair option. On my laptop, this is an all day affair.

For a quick and dirty fix, you can try the following. This shouldn't cause any problems, but it may not fix everything, depending on what was in the setup.

1: Open a command prompt and go to the IDE directory of your VS.NET install. On my machine it's found here: C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE

2: Type: regasm extensibility.dll

3: Type: regasm vslangproj.dll

4: Download this file (regtlb.zip) and unzip it to a location that's in your path. I have a utils directory where I keep a bunch of command prompt tools.

5: Go to the directory: C:\Program Files\Common Files\Microsoft Shared\MSEnv

6: Type: regtlb vslangproj.tlb

You should be good to go at this point. If you're not, go for the repair option, and take the rest of the day off.

Now, for the credit where credit is due department. This information was obtained from the VSNETADDIN group on Yahoo!

The solution (and the regtlb code) was offered up by Craig Skibo of Microsoft. The source code for regtlb is here.

As a side note: regtlb is a type library registration program, similar to regsvr32.exe, except it works on type libraries instead of executeables.

It's possible you're getting this for some reason unrelated to add-ins, or it's possible that this fix doesn't do it for you. If that's the case, all I can say is, do the repair and enjoy the rest of your day.

12月26日

MDA,给软件开发带来什么?

MDA是"模型驱动构架"(Model Driven Architecture)的缩写。它是由OMG定义的一个软件开发框架。其关键之处是,模型在软件开发过程中扮演了非常重要的角色。在MDA中,软件开发过程是由对软件系统的建模行为驱动的。

MDA开发生命周期和传统的生命周期并没有很大的不同。MDA的工件是形式化模型,也就是可以被计算机理解的模型。下面列出的3种模型位于MDA的核心:

 平台独立模型(PIM):具有高抽象层次、独立于任何实现技术的模型。

 平台相关模型(PSM):为某种特定实现技术量身定做,让你用这种技术中可用的实现构造来描述系统的模型。PIM会被变换成一个或多个PSM。

代码(code):用源代码对系统的描述(规约)。每个PSM都将被变换成代码。

传统上,从模型到模型的变换,或者从模型到代码的变换,主要是手工完成的。与此相反,MDA变换总是由工具执行的,许多工具可以把PSM变换成代码,这并不令人惊奇。MDA的创新之处是把PIM到PSM的变换也自动化了。

软件开发是什么

Alistair Cockburn在他的Agile Software Development一书中归纳了业界对软件开发的看法:以C.A.R Hoare为代表的数学观、以Bertrand Meyer为代表的工程观、以很多程序员为代表的手工艺观,还有一些程序员则认为软件开发是神秘的创造行为。当然,近20年来,也有越来越多的人对软件开发持建模观,比如Ivar Jacobson就曾声称:软件开发就是建模。MDA Explained一书的作者也指出:代码就是模型。Cockburn则在他的书中独树一帜地提出:软件开发是一种协作游戏。

自然,持不同软件开发观的项目主导者会关注软件开发过程的不同方面。为了节省资源,我们希望软件开发领域的研究者和项目主导者(实践者)的关注焦点是真正决定项目成败的那个方面。否则,学术界投入大量时间精力去研究对项目成败无足轻重的因素,项目主导者把大量人力物力用于控制项目中无关紧要的方面(如Cockburn调侃地指出的:开发场所的环境湿度),那岂不冤枉至极?

那么,这个"至关重要"的方面究竟是什么呢?是工具?是过程?是整个方法学?还是人?或者是别的我们尚未注意到的因素?目前,没有人知道确切答案。或许,每个方面都对项目成败有些影响吧。无论如何,因为MDA将会对软件开发的各个方面都产生深远影响,所以不管您对软件开发持何观点,您都无法回避MDA。下文我将简述MDA对软件开发各方面带来的影响。

MDA改变了协作游戏的角色和规则

好吧,我们就按照Cockburn的说法,把软件开发看作协作游戏好了。不过,任何游戏总要有参与者和游戏规则吧?目前,编码员是重要的游戏参与者,但在MDA版本的协作游戏中,没有这个角色了,取而代之的是建模者。但是,MDA也引入了另一个新游戏——这个游戏不是编写软件产品,而是编写变换规则。变换规则市场会逐渐成长,就像基于组件的开发启动了组件市场那样。在新游戏中,原来的编码员中的精英人物将找到他们新的位置,而他们也将自豪地发现,他们编写的代码将获得程度空前的复用。至于游戏规则的改变,我在这里说不好也说不全,请您在玩新版本的游戏时慢慢体会吧J

MDA改变了开发过程

目前,许多项目经理都很注重开发过程。或许因为过程对项目成败真的很重要,或许仅仅因为过程是软件开发中项目经理唯一可以施加较大影响的方面。无论如何,MDA对开发过程的改变不容忽视。

比如,开发过程的需求分析阶段依然存在,不过需求分析员要编写的不再是需求分析文档,而是PIM——平台独立模型。需求分析文档和PIM有什么区别?阅读需求分析文档的是人,是设计师或者程序员,但阅读PIM的则主要是类似于编译器的自动工具。

既然需求分析阶段产生的工件改变了,那么依赖需求分析阶段结果的设计阶段自然也要改变,而"编码"这项工作则需要完全重新定义了。测试、部署等阶段也会有相应改变。此处不再详叙,请阅读本书正文。

MDA改变了开发工具

随着技术的进步,开发工具的改变一直都没有停止。当主流开发语言是汇编的时候,您可曾想象到含自动完成、重构、集成调试器的IDE?你可曾想到会有一天汇编代码不再由人手写而是由编译器自动生成并且可以高度优化?那么,当主流开发语言的抽象层次即将再次跃升,开发工具的革命也将到来。在MDA的世界中,"变换工具"扮演了传统编译器的角色,传统编译器则退居目前汇编器(就是把汇编语言翻译成机器语言的程序)的地位,其余各层工具依次后退。调试器也将逐渐进化,就如同从机器码级调试(汇编语言级调试)向源码级调试的过渡那样,慢慢过渡到模型级调试。在IDE中最重要的也不再是基于文本的代码编辑窗口,而是基于图形的建模窗口。人们将像现在谈论一个API函数那样谈论一个设计模式(design patterns),而代码模式(idioms)将完全由变换工具自动生成,不再是人们关心的内容。

MDA让你重新认识文档、代码、模型

以前,我们倾向于认为,给人看的文档或者模型不需要写得太精确,因为人总会有很强的理解力,人的大脑能够"全自动"地更正一些无关紧要的错误并补全一些省略之处。另外,文档或者模型写得太精确是浪费时间,因为文档和模型又不能变成可以运行的产品,你总是需要用代码把模型重新翻译一遍。Cockburn和一些XP推崇者的观点更极端:文档和模型不重要,人们拿着文档或者围在画着模型的白板前的讨论才重要,因为真正的沟通不是发生于阅读文档之时,而是发生于人与人的讨论中。

好吧,或许以前确实如此。但MDA将完全颠覆这一现实。模型不再主要是给人看的了,而主要是给机器看的。写的精确一点也不再是浪费时间,因为只写一遍(您不需要再把文档和模型手工翻译成代码)而且早晚要认真地写一遍。至于围在白板前的讨论——如果是在讨论如何编码实现某个模型,那么很抱歉,这样的讨论不再需要了。当然,其他方面的沟通还是需要的,但必须承认,游戏规则已经改变,游戏中的关卡已经改变,您有了不少新的"通关任务",而很多老任务则自然取消了。

MDA带来了数学般的精确性

是的,凡是能让机器理解和自动处理的东西都必须是数学般地精确的。您在编译程序时有没有遇到过这样的编译器信息:"警告:第nnn行代码具有二义性"?那意思就是,请您把代码写得更精确些。那么,MDA要说的就是,请您把模型建得更精确性。MDA工具会严格检查您的模型以确保这一点的。

MDA为新方法学提供了土壤

如果软件开发是游戏,那么方法学就是攻略。或许高手不需要攻略也能把游戏玩通关,但大多数人在攻略的指导下能少走很多弯路。MDA制定了新的游戏规则,那么我们自然可以期待新版本的攻略如雨后春笋般出现。即便是同一个游戏,您手中有了不同的战斗工具、不同的装备,玩法也会不同。那么,既然MDA带来了很多新一代的工具,新的方法学会诞生也不足为奇了。

既然提到方法学,我就再多说几句。把软件工程中"methodology"这一术语译为"方法学"其实颇具误导性,因为这个词的内涵往往不是哲学老师常挂于嘴边的"世界观和方法学"的那个方法学,而是指一系列你需要照着做的方法,或者说一系列约束开发人员的规则。它不是"研究方法的学科",而就是一系列方法和规则的集合。

按照规则的多少和约束的强弱,可以大致地把方法学分为重型和轻型两种。"重型方法学"比较正规和严谨,在采用重型方法学的项目中,开发人员具有较强的可替换性,因为方法学本身强制要求开发者把他所创造的所有东西都记录在案(按照该方法学规定的格式),所以参与项目的新人能借助这些文档很快上手(前提是新人也熟悉这种方法学规定的格式),从而开发人员跳槽对项目的冲击也相对较小。项目经理们可能会比较偏爱这样的方法学,因为这样一来他们掌控的因素比较多,风险就比较小。开发人员则不会喜欢这样的方法学,因为在采用重型方法学的项目中,他们只是可替换的螺丝钉,难以感觉到自己的重要性。而且做连篇累牍的文案工作纯属利他(对经理、对可能加入的新人有利),毫不利己(很无聊很费时间,而且占用的是自己本可用于开发的时间)。

轻型方法学则具有相反的特质。记录在案的东西不多,交付的就是代码以及可以跑的产品,当然还有测试用例。大多数交流是口头的、非正式的,很高效,但也只存在项目成员的脑海中。如果成员从项目中离去,那么他脑海中的这些东西也随之带走。因为开发人员往往都希望自己具有不可替代的重要性,而且一般都觉得写程序比写文档好玩,再者轻装向前可以走得比较快(因为不必把时间浪费于编写正规文档),所以开发人员一般都比较偏爱轻型方法学。

一般而言,大型项目采用重型方法学好一点,因为项目人手多,周期长,即便所有员工都很爱戴老板很忠于公司很喜欢这个项目,但这么多人在这么长时间内一个都不跳槽一个都不生病一个都不结婚生孩子也是挺难办到的。而小型项目则往往采用轻型方法学好一点。Cockburn提出的水晶方法族就充分考虑了项目规模的因素,当然,还考虑了项目紧要性等别的因素。

那么,MDA有没有对某种类型的方法学特别垂青呢?没有,MDA是"轻重咸宜"的。既然XP(极限编程)俨然已是轻型方法的招牌,那么自有好事者用模型替换代码,提出了XM(极限建模)。轻型方法的另一特征是迭代和重构,MDA极佳的同步特性也为之提供了有力支持。而重型方法也能从MDA获益匪浅。重型方法有一大特征就是书写详尽的文档,创建大量的模型,那么MDA说:让文档更详尽些吧,让模型更精确些吧......详尽精确到机器都能理解并自动编译了,这一量变到质变的转换也就完成了。

从学术界及业界,我们已经看到,一些传统的方法学正从MDA这一变革中汲取新的养分,而新的方法学也能从MDA的土壤中茁壮成长。或许未来20年中,又会有一批涉及MDA的新方法学著作出现吧。

创造性的脑力劳动是无可替代的

所有的改革都会在一定程度上重新分配社会资源,都会造成新的富人和新的穷光蛋。MDA也不例外。不过MDA所威胁到的是只会老老实实地把详尽的设计文档翻译成C++或者Java代码的人。

社会发展的历史就是一部机器逐渐替代人的劳动的历史。所以部分人失业是进步的必然代价。不要试图阻止技术进步的脚步,因为技术进步的同时也会创造新的工作机会。比如MDA很可能就会创造出新的变换定义集市场。但是,只要您从事的工作具有创造性,就无法被机器取代。

软件设计是需要创造性的,这一创造性或者体现在代码中,或者体现在文档中。在MDA出现之前,如果我们认真地编写文档,然后认真地编写代码,那么我们进行了两遍创造性劳动,这浪费了劳动力。而有些软件成熟度(CMM)级别高的企业(特别是印度和日本企业)是这样做的:认真地编写文档,代码则是文档的精确翻译。更多的中国企业则是这样做的:文档敷衍了事(敷衍CMM检查组或者敷衍上级领导和客户),创造性劳动则在编码阶段做。这些做法的优劣不去评述,但只要您做的是创造性工作,那么在MDA的世界中您会如鱼得水的,因为工具只是为您节约了做无聊琐事的时间,让您可以把精力集中到创造性过程中去。

业界和IT媒体前段时间曾有"大量需要软件蓝领"的声音,我不知道当时是否真的有此需要。但我在此大胆预言:MDA一旦普及,软件蓝领会大量失业。因此,我敬请读者您不要把"软件蓝领"作为您的职业生涯目标。如要在未来立足软件开发业,请您永远不要放弃自己创造性思维的能力。

12月13日

Google Code Jam 2005 我的第一题答案

using System;
public class BusStops
{
 public int countStops(string[] cityMap, int walkingDistance)
 {
  int count=0;
  int x=0;
  int y=0;
  for(int i=0;i<cityMap.Length;i++)
  {
   for(int j=0;j<cityMap[i].Length;j++)
   {
    if(cityMap[i][j]=='X')
    {
     x=i;
     y=j;
    }
   }
  }
  for(int i=0;i<cityMap.Length;i++)
  {
   for(int j=0;j<cityMap[i].Length;j++)
   {
    if(cityMap[i][j]=='B')
    {
     if((Math.Abs(i-x)+Math.Abs(j-y))<=walkingDistance)
     {
      count++;
     }
    }
   }
  }
  return count;
 }
}

Google Code Jam 2005 我的第二题答案

using System;
using System.Collections;
public class PlayCards
{
 ArrayList H=new ArrayList();
 ArrayList S=new ArrayList();
 ArrayList D=new ArrayList();
 ArrayList C=new ArrayList();
 ArrayList A1=new ArrayList();
 ArrayList A2=new ArrayList();
 ArrayList A3=new ArrayList();
 ArrayList A4=new ArrayList();
 ArrayList A5=new ArrayList();
 ArrayList A6=new ArrayList();
 ArrayList A7=new ArrayList();
 ArrayList A8=new ArrayList();
 ArrayList A9=new ArrayList();
 ArrayList A10=new ArrayList();
 public int maxCards(string[] cards)
 {
  string strCardsX="";
  string strCardsY="";
  int max1=MaxX(cards,ref strCardsX);
  int max2=MaxY(cards,ref strCardsY);
  string[] tempX=strCardsX.Split('|');
  string[] tempY=strCardsY.Split('|');
  string[] strCardsXs=new string[strCardsX.Split('|').Length-1];
  string[] strCardsYs=new string[strCardsY.Split('|').Length-1];
  for(int i=0;i<tempX.Length-1;i++)
  {
   strCardsXs[i]=tempX[i];
  }
  for(int i=0;i<tempY.Length-1;i++)
  {
   strCardsYs[i]=tempY[i].TrimEnd(',');
  }
  int max=MaxXY(strCardsXs,strCardsYs);
  return max;
 }
 public int MaxX(string[] cards, ref string strCardsX)
 {
  if(cards==null || cards[0]=="")
  {
   return 0;
  }
  int maxX=0;
  H=new ArrayList();
  S=new ArrayList();
  D=new ArrayList();
  C=new ArrayList();
  for(int i=0;i<cards.Length;i++)
  {
   switch(cards[i].Split(' ')[1])
   {
    case "H":
    {
     if(H.Count>0)
     {
      for(int j=0;j<H.Count;j++)
      {
       if(int.Parse(cards[i].Split(' ')[0].ToString())<int.Parse(H[j].ToString().Split(' ')[0]))
       {
        H.Insert(j,cards[i]);
        break;
       }
       if(j==H.Count-1)
       {
        H.Add(cards[i]);
        break;
       }
      }
     }
     else
     {
      H.Add(cards[i]);
     }
     break;
    }
    case "S":
    {
     if(S.Count>0)
     {
      for(int j=0;j<S.Count;j++)
      {
       if(int.Parse(cards[i].Split(' ')[0].ToString())<int.Parse(S[j].ToString().Split(' ')[0]))
       {
        S.Insert(j,cards[i]);
        break;
       }
       if(j==S.Count-1)
       {
        S.Add(cards[i]);
        break;
       }
      }
     }
     else
     {
      S.Add(cards[i]);
     }
     break;
    }
    case "D":
    {
     if(D.Count>0)
     {
      for(int j=0;j<D.Count;j++)
      {
       if(int.Parse(cards[i].Split(' ')[0].ToString())<int.Parse(D[j].ToString().Split(' ')[0]))
       {
        D.Insert(j,cards[i]);
        break;
       }
       if(j==D.Count-1)
       {
        D.Add(cards[i]);
        break;
       }
      }
     }
     else
     {
      D.Add(cards[i]);
     }
     break;
    }
    case "C":
    {
     if(C.Count>0)
     {
      for(int j=0;j<C.Count;j++)
      {
       if(int.Parse(cards[i].Split(' ')[0].ToString())<int.Parse(C[j].ToString().Split(' ')[0]))
       {
        C.Insert(j,cards[i]);
        break;
       }
       if(j==C.Count-1)
       {
        C.Add(cards[i]);
        break;
       }
      }
     }
     else
     {
      C.Add(cards[i]);
     }
     break;
    }
   }
  }
   
  if(H.Count>=3)
  {
   int temp=0;
   for(int i=0;i<H.Count-1;i++)
   {
    if(int.Parse(H[i].ToString().Split(' ')[0])+1==int.Parse(H[i+1].ToString().Split(' ')[0]))
    {
     strCardsX+=H[i]+",";
     temp++;
    }
    else
    {
     if(temp>=2)
     {
      strCardsX+=H[i]+"|";
      maxX+=temp+1;
     }
     if(temp==1)
     {
      strCardsX=strCardsX.Replace(H[i-1]+",","");
     }
     temp=0;
    }
   }
   if(temp>=2)
   {
    strCardsX+=H[H.Count-1]+"|";
    maxX+=temp+1;
   }
   if(temp==1)
   {
    strCardsX=strCardsX.Replace(H[H.Count-3]+",","");
   }
  }
  if(S.Count>=3)
  {
   int temp=0;
   for(int i=0;i<S.Count-1;i++)
   {
    if(int.Parse(S[i].ToString().Split(' ')[0])+1==int.Parse(S[i+1].ToString().Split(' ')[0]))
    {
     strCardsX+=S[i]+",";
     temp++;
    }
    else
    {
     if(temp>=2)
     {
      strCardsX+=S[i]+"|";
      maxX+=temp+1;
     }
     if(temp==1)
     {
      strCardsX=strCardsX.Replace(S[i-1]+",","");
     }
     temp=0;
    }
   }
   if(temp>=2)
   {
    strCardsX+=S[S.Count-1]+"|";
    maxX+=temp+1;
   }
   if(temp==1)
   {
    strCardsX=strCardsX.Replace(S[S.Count-3]+",","");
   }
  }
   
  if(D.Count>=3)
  {
   int temp=0;
   for(int i=0;i<D.Count-1;i++)
   {
    if(int.Parse(D[i].ToString().Split(' ')[0])+1==int.Parse(D[i+1].ToString().Split(' ')[0]))
    {
     strCardsX+=D[i]+",";
     temp++;
    }
    else
    {
     if(temp>=2)
     {
      strCardsX+=D[i]+"|";
      maxX+=temp+1;
     }
     if(temp==1)
     {
      strCardsX=strCardsX.Replace(D[i-1]+",","");
     }
     temp=0;
    }
   }
   if(temp>=2)
   { 
    strCardsX+=D[D.Count-1]+"|";
    maxX+=temp+1;
   }
   if(temp==1)
   {
    strCardsX=strCardsX.Replace(D[D.Count-3]+",","");
   }
  }
  if(C.Count>=3)
  {
   int temp=0;
   for(int i=0;i<C.Count-1;i++)
   {
    if(int.Parse(C[i].ToString().Split(' ')[0])+1==int.Parse(C[i+1].ToString().Split(' ')[0]))
    {
     strCardsX+=C[i]+",";
     temp++;
    }
    else
    {
     if(temp>=2)
     {
      strCardsX+=C[i]+"|";
      maxX+=temp+1;
     }
     if(temp==1)
     {
      strCardsX=strCardsX.Replace(C[i-1]+",","");
     }
     temp=0;
    }
   }
   if(temp>=2)
   {
    strCardsX+=C[C.Count-1]+"|";
    maxX+=temp+1;
   }
   if(temp==1)
   {
    strCardsX=strCardsX.Replace(C[C.Count-3]+",","");
   }
  }
  return maxX;
 }
 public int MaxY(string[] cards,ref string strCardsY)
 {
  int maxY=0;
  A1=new ArrayList();
  A2=new ArrayList();
  A3=new ArrayList();
  A4=new ArrayList();
  A5=new ArrayList();
  A6=new ArrayList();
  A7=new ArrayList();
  A8=new ArrayList();
  A9=new ArrayList();
  A10=new ArrayList();
  for(int i=0;i<cards.Length;i++)
  {
   switch(cards[i].Split(' ')[0].ToString())
   {
    case "1":
    {
     A1.Add(cards[i]);
     break;
    }
    case "2":
    {
     A2.Add(cards[i]);
     break;
    }
    case "3":
    {
     A3.Add(cards[i]);
     break;
    }
    case "4":
    {
     A4.Add(cards[i]);
     break;
    }
    case "5":
    {
     A5.Add(cards[i]);
     break;
    }
    case "6":
    {
     A6.Add(cards[i]);
     break;
    }
    case "7":
    {
     A7.Add(cards[i]);
     break;
    }
    case "8":
    {
     A8.Add(cards[i]);
     break;
    }
    case "9":
    {
     A9.Add(cards[i]);
     break;
    }
    case "10":
    {
     A10.Add(cards[i]);
     break;
    }
   }
  }
  if(A1.Count>=3)
  {
   foreach(object a in A1)
   {
    strCardsY+=a.ToString()+",";
   }
   strCardsY+="|";
   maxY+=A1.Count;
  }
  if(A2.Count>=3)
  {
   foreach(object a in A2)
   {
    strCardsY+=a.ToString()+",";
   }
   strCardsY+="|";
   maxY+=A2.Count;
  }
  if(A3.Count>=3)
  {
   foreach(object a in A3)
   {
    strCardsY+=a.ToString()+",";
   }
   strCardsY+="|";
   maxY+=A3.Count;
  }
  if(A4.Count>=3)
  {
   foreach(object a in A4)
   {
    strCardsY+=a.ToString()+",";
   }
   strCardsY+="|";
   maxY+=A4.Count;
  }
  if(A5.Count>=3)
  {
   foreach(object a in A5)
   {
    strCardsY+=a.ToString()+",";
   }
   strCardsY+="|";
   maxY+=A5.Count;
  }
  if(A6.Count>=3)
  {
   foreach(object a in A6)
   {
    strCardsY+=a.ToString()+",";
   }
   strCardsY+="|";
   maxY+=A6.Count;
  }
  if(A7.Count>=3)
  {
   foreach(object a in A7)
   {
    strCardsY+=a.ToString()+",";
   }
   strCardsY+="|";
   maxY+=A7.Count;
  }
  if(A8.Count>=3)
  {
   foreach(object a in A8)
   {
    strCardsY+=a.ToString()+",";
   }
   strCardsY+="|";
   maxY+=A8.Count;
  }
  if(A9.Count>=3)
  {
   foreach(object a in A9)
   {
    strCardsY+=a.ToString()+",";
   }
   strCardsY+="|";
   maxY+=A9.Count;
  }
  if(A10.Count>=3)
  {
   foreach(object a in A10)
   {
    strCardsY+=a.ToString()+",";
   }
   strCardsY+="|";
   maxY+=A10.Count;
  }
  return maxY;
 }
 public ArrayList Sequence(IList seq,long index)
 {
  if(index==0)
  {
   return null;
  }
  int seqc = seq.Count;
  int divider = 2;
  ArrayList result = new ArrayList();
  result.Add(seq[0]);
  for(int i=1; i<seqc; i++)
  {
   int new_index = Convert.ToInt32(index % divider);
   index = index/divider;
   result.Insert(new_index,seq[i]);
   divider ++;
  }
  return result;
 }
 public int Factorial(int n)
 {
  int result=1;
  for(int i=1;i<=n;i++)
  {
   result*=i;
  }
  return result;
 }
 public int ForFinal(string[] AllKeys1,string key)
 {
  string[] AllKeys2=new string[AllKeys1.Length];
  int length=0;
  for(int i=0;i<120;i++)
  {
   ArrayList il = Sequence(AllKeys1,i);
   if(il==null)
   {
    return 0;
   }
   for(int j=0;j<il.Count;j++)
   {
    AllKeys2[j]=il[j].ToString();
   }
   int b=getLength(AllKeys2,key);
   length=length>b?length:b;
  }
  return length;
 }
 public int getLength(string[] AllKeys,string keys)
 {
  int length=0;
  int temp=0;
  for(int h=0;h<keys.Split(',').Length-1;h++)
  {
   for(int i=0;i<AllKeys.Length;i++)
   {
    if(AllKeys[i].IndexOf(keys.Split(',')[h].ToString())>=0)
    {
     temp++;
    }
    if(temp>1)
    {
     AllKeys[i]=AllKeys[i].Replace(keys.Split(',')[h].ToString()+",","").Replace(","+keys.Split(',')[h].ToString(),"").Replace(keys.Split(',')[h].ToString(),"");
     temp=0;
    }
   }
  }
  for(int i=0;i<AllKeys.Length;i++)
  {
   if(AllKeys[i].Split(',').Length>=3)
   {
    if(AllKeys[i].Split(',')[0].Split(' ')[1]==AllKeys[i].Split(',')[1].Split(' ')[1])
    {
     int count=0;
     for(int j=0;j<AllKeys[i].Split(',').Length-1;j++)
     {
      if(int.Parse(AllKeys[i].Split(',')[j+1].Split(' ')[0].ToString())-int.Parse(AllKeys[i].Split(',')[j].Split(' ')[0].ToString())==1)
      {
       count++;
      }
      else
      {
       count=0;
      }
     }
     length+=(count>0?count+1:0);
    }
    else
    {
     length+=AllKeys[i].Split(',').Length;
    }
   }
  }
  return length;
 }
 public int MaxXY(string[] strCardsXs,string[] strCardsYs)
 {
  string[] strCardXs1=new string[strCardsXs.Length];
  for(int k=0;k<strCardsXs.Length;k++)
  {
   for(int i=0;i<strCardsXs[k].Split(',').Length;i++)
   {
    for(int j=0;j<strCardsYs.Length;j++)
    {
     if(strCardsYs[j].IndexOf(strCardsXs[k].Split(',')[i].ToString())>=0)
     {
      strCardXs1[k]+=strCardsXs[k].Split(',')[i].ToString()+",";
     }
    }
   }
  }
  for(int i=0;i<strCardXs1.Length;i++)
  {
   strCardXs1[i]=strCardXs1[i].TrimEnd(',');
  }
  string[] AllKeys=new string[strCardsXs.Length+strCardsYs.Length];
  for(int i=0;i<strCardsXs.Length;i++)
  {
   AllKeys[i]=strCardsXs[i];
  }
  for(int j=strCardsXs.Length;j<strCardsYs.Length+strCardsXs.Length;j++)
  {
   AllKeys[j]=strCardsYs[j-strCardsXs.Length];
  }
  string keys="";
  for(int i=0;i<strCardXs1.Length;i++)
  {
   keys+=strCardXs1[i]+",";
  }
  return ForFinal(AllKeys,keys);
 }
}
11月22日

吃饭必备

 餐具:
coffee pot 咖啡壶coffee cup 咖啡杯paper towel 纸巾napkin 餐巾table cloth 桌布tea -pot 茶壶tea set 茶具tea tray 茶盘caddy 茶罐dish 碟plate 盘saucer 小碟子rice bowl 饭碗chopsticks 筷子soup spoon 汤匙knife 餐刀cup 杯子glass 玻璃杯mug 马克杯picnic lunch 便当fruit plate 水果盘toothpick 牙签


中餐:
bear's paw 熊掌breast of deer 鹿脯beche-de-mer; sea cucumber 海参sea sturgeon 海鳝salted jelly fish 海蜇皮kelp, seaweed 海带abalone 鲍鱼shark fin 鱼翅scallops 干贝lobster 龙虾bird's nest 燕窝roast suckling pig 考乳猪pig's knuckle 猪脚boiled salted duck 盐水鸭preserved meat 腊肉barbecued pork *烧sausage 香肠fried pork flakes 肉松BAR-B-Q 烤肉meat diet 荤菜vegetables 素菜meat broth 肉羹local dish 地方菜Cantonese cuisine 广东菜set meal 客饭curry rice 咖喱饭fried rice 炒饭plain rice 白饭crispy rice 锅巴gruel, soft rice , porridge 粥noodles with gravy 打卤面plain noodle 阳春面casserole 砂锅chafing dish, fire pot 火锅meat bun 肉包子shao-mai 烧麦preserved bean curd 腐乳bean curd 豆腐fermented blank bean 豆豉pickled cucumbers 酱瓜preserved egg 皮蛋salted duck egg 咸鸭蛋dried turnip 萝卜干西餐于日本料理:
menu 菜单French cuisine 法国菜today's special 今日特餐chef's special 主厨特餐buffet 自助餐fast food 快餐specialty 招牌菜continental cuisine 欧式西餐aperitif 饭前酒dim sum 点心French fires 炸薯条baked potato 烘马铃薯mashed potatoes 马铃薯泥omelette 简蛋卷pudding 布丁pastries 甜点pickled vegetables 泡菜kimchi 韩国泡菜crab meat 蟹肉prawn 明虾conch 海螺escargots 田螺braised beef 炖牛肉bacon 熏肉poached egg 荷包蛋sunny side up 煎一面荷包蛋over 煎两面荷包蛋fried egg 煎蛋over easy 煎半熟蛋over hard 煎全熟蛋scramble eggs 炒蛋boiled egg 煮蛋stone fire pot 石头火锅sashi 日本竹筷sake 日本米酒miso shiru 味噌汤roast meat 铁板烤肉sashimi 生鱼片butter 奶油


冷饮:
beverages 饮料soya-bean milk 豆浆syrup of plum 酸梅汤tomato juice 番茄汁orange juice 橘子汁coconut milk 椰子汁asparagus juice 芦荟汁grapefruit juice 葡萄柚汁vegetable juice 蔬菜汁ginger ale 姜汁sarsaparilla 沙士soft drink 汽水coco-cola (coke) 可口可乐tea leaves 茶叶black tea 红茶jasmine tea 茉莉(香片)
tea bag 茶包lemon tea 柠檬茶white goup tea 冬瓜茶honey 蜂蜜chlorella 绿藻soda water 苏打水artificial color 人工色素ice water 冰水mineral water 矿泉水distilled water 蒸馏水long-life milk 保久奶condensed milk 炼乳; 炼奶cocoa 可可coffee mate 奶精coffee 咖啡iced coffee 冰咖啡white coffee 牛奶咖啡black coffee 纯咖啡ovaltine 阿华田chlorella yakult 养乐多essence of chicken 鸡精ice-cream cone 甜筒sundae 圣代; 新地ice-cream 雪糕soft ice-cream 窗淇淋vanilla ice-cream 香草冰淇淋ice candy 冰棒milk-shake 奶昔straw 吸管

水果:
pineapple 凤梨watermelon 西瓜papaya 木瓜betelnut 槟榔chestnut 栗子coconut 椰子ponkan 碰柑tangerine 橘子mandarin orange 橘sugar-cane 甘蔗muskmelon 香瓜shaddock 文旦juice peach 水蜜桃pear 梨子peach 桃子carambola 杨桃cherry 樱桃persimmon 柿子apple 苹果mango 芒果fig 无花果water caltrop 菱角almond 杏仁plum 李子honey-dew melon 哈密瓜loquat 枇杷olive 橄榄rambutan 红毛丹durian 榴梿strawberry 草莓grape 葡萄grapefruit 葡萄柚lichee 荔枝longan 龙眼wax-apple 莲雾guava 番石榴banana 香蕉熟菜与调味品:
string bean 四季豆pea 豌豆green soy bean 毛豆soybean sprout 黄豆芽mung bean sprout 绿豆芽bean sprout 豆芽kale 甘蓝菜cabbage 包心菜; 大白菜broccoli 花椰菜mater convolvulus 空心菜dried lily flower 金针菜mustard leaf 芥菜celery 芹菜

tarragon 蒿菜beetroot, beet 甜菜agar-agar 紫菜lettuce 生菜spinach 菠菜leek 韭菜caraway 香菜hair-like seaweed 发菜preserved szechuan pickle 榨菜salted vegetable 雪里红lettuce 莴苣asparagus 芦荟bamboo shoot 竹笋dried bamboo shoot 笋干chives 韭黄ternip 白萝卜carrot 胡萝卜water chestnut 荸荠ficus tikaua 地瓜long crooked squash 菜瓜loofah 丝瓜pumpkin 南瓜bitter gourd 苦瓜cucumber 黄瓜white gourd 冬瓜gherkin 小黄瓜yam 山芋taro 芋头beancurd sheets 百叶champignon 香菇button mushroom 草菇needle mushroom 金针菇agaricus 蘑菇dried mushroom 冬菇tomato 番茄eggplant 茄子potato, spud 马铃薯lotus root 莲藕agaric 木耳white fungus 百木耳ginger 生姜garlic 大蒜garlic bulb 蒜头green onion 葱onion 洋葱scallion, leek 青葱wheat gluten 面筋miso 味噌seasoning 调味品caviar 鱼子酱barbeque sauce 沙茶酱tomato ketchup, tomato sauce 番茄酱mustard 芥茉salt 盐sugar 糖monosodium glutamate , gourmet powder 味精vinegar 醋sweet 甜sour 酸bitter 苦lard 猪油peanut oil 花生油soy sauce 酱油green pepper 青椒paprika 红椒star anise 八角cinnamon 肉挂curry 咖喱maltose 麦芽糖糖与蜜饯:
jerky 牛肉干dried beef slices 牛肉片dried pork slices 猪肉片confection 糖果glace fruit 蜜饯marmalade 果酱dried persimmon 柿饼candied melon 冬瓜糖red jujube 红枣black date 黑枣glace date 蜜枣dried longan 桂圆干raisin 葡萄干chewing gum 口香糖nougat 牛乳糖mint 薄荷糖drop 水果糖marshmallow 棉花糖caramel 牛奶糖peanut brittle 花生糖castor sugar 细砂白糖granulated sugar 砂糖sugar candy 冰糖butter biscuit 奶酥rice cake 年糕moon cake 月饼green bean cake 绿豆糕popcorn 爆米花chocolate 巧克力marrons glaces 唐炒栗子牛排与酒:
breakfast 早餐lunch 午餐brunch 早午餐supper 晚餐late snack 宵夜dinner 正餐ham and egg 火腿肠buttered toast 奶油土司French toast 法国土司muffin松饼cheese cake 酪饼white bread 白面包brown bread 黑面包French roll 小型法式面包appetizer 开胃菜green salad 蔬菜沙拉onion soup 洋葱汤potage 法国浓汤corn soup 玉米浓汤minestrone 蔬菜面条汤ox tail soup 牛尾汤fried chicken 炸鸡roast chicken 烤鸡steak 牛排T-bone steak 丁骨牛排filet steak 菲力牛排sirloin steak 沙朗牛排club steak 小牛排well done 全熟medium 五分熟rare 三分熟beer 啤酒draft beer 生啤酒stout beer 黑啤酒canned beer 罐装啤酒red wine 红葡萄酒gin 琴酒brandy 白兰地whisky 威士忌vodka 伏特加on the rocks 酒加冰块rum 兰酒champagne 香槟


其他小吃:
meat 肉beef 牛肉pork 猪肉chicken 鸡肉mutton 羊肉bread 面包steamed bread 馒头rice noodles 米粉fried rice noodles 河粉steamed vermicelli roll 肠粉macaroni 通心粉bean thread 冬粉bean curd with odor 臭豆腐flour-rice noodle 面粉noodles 面条instinct noodles 速食面vegetable 蔬菜crust 面包皮sandwich 三明治toast 土司hamburger 汉堡cake 蛋糕spring roll 春卷pancake 煎饼fried dumpling 煎贴rice glue ball 元宵glue pudding 汤圆millet congee 小米粥cereal 麦片粥steamed dumpling 蒸饺ravioli 馄饨nbsp;cake 月饼green bean cake 绿豆糕popcorn 爆米花chocolate 巧克力marrons glaces 唐炒栗子牛排与酒:
breakfast 早餐lunch 午餐brunch 早午餐supper 晚餐late snack 宵夜dinner 正餐ham and egg 火腿肠buttered toast 奶油土司French toast 法国土司muffin松饼cheese cake 酪饼white bread 白面包brown bread 黑面包French roll 小型法式面包appetizer 开胃菜green salad 蔬菜沙拉onion soup 洋葱汤potage 法国浓汤corn soup 玉米浓汤minestrone 蔬菜面条汤ox tail soup 牛尾汤fried chicken 炸鸡roast chicken 烤鸡steak 牛排T-bone steak 丁骨牛排filet steak 菲力牛排sirloin steak 沙朗牛排club steak 小牛排well done 全熟medium 五分熟rare 三分熟beer 啤酒draft beer 生啤酒stout beer 黑啤酒canned beer 罐装啤酒red wine 红葡萄酒gin 琴酒brandy 白兰地whisky 威士忌vodka 伏特加on the rocks 酒加冰块rum 兰酒champagne 香槟其他小吃:
meat 肉beef 牛肉pork 猪肉chicken 鸡肉mutton 羊肉bread 面包steamed bread 馒头rice noodles 米粉fried rice noodles 河粉steamed vermicelli roll 肠粉macaroni 通心粉bean thread 冬粉bean curd with odor 臭豆腐flour-rice noodle 面粉noodles 面条instinct noodles 速食面vegetable 蔬菜crust 面包皮sandwich 三明治toast 土司hamburger 汉堡cake 蛋糕spring roll 春卷pancake 煎饼fried dumpling 煎贴rice glue ball 元宵glue pudding 汤圆millet congee 小米粥cereal 麦片粥steamed dumpling 蒸饺ravioli 馄饨
11月13日

经典中的经典

但愿人长久,千里共婵娟。
We wish each other a long life so as to share the beauty of this graceful moonlight, even though miles apart.
 
独在异乡为异客,每逢佳节倍思亲。
A lonely stranger in a strange land I am cast, I miss my family all the more on every festive day.
 
大江东去,浪淘尽,千古风流人物。
The endless river eastward flows; with its huge waves are gone all those gallant heroes of bygone years.
 
二人同心,其利断金。
If two people are of the same mind, their sharpness can cut through metal.
 
富贵不能淫,贫贱不能移,威武不能曲,此之谓大丈夫。
It is a true great man whom no money and rank can confuse, no poverty and hardship can shake, and no power and force can suffocate.
 
海内存知己,天涯若比邻。
A bosom friend afar brings distance near.
 
合抱之木,生于毫末,九层之台,起于累土;千里之行始于足下。
A huge tree that fills one’s arms grows from a tiny seedling; a nine-storied tower rises from a heap of earth; a thousand li journey starts with the first step.
 
祸兮,福之所依;福兮,祸之所伏。
Misfortune, that is where happiness depends; happiness, that is where misfortune underlies.
 
见贤思齐焉,见不贤而内自省也。
On seeing a man of virtue, try to become his equal; on seeing a man without virtue, examine yourself not to have the same defects.
 
江山如此多娇,引无数英雄尽折腰。
This land so rich in beauty has made countless heroes bow in homage.
 
举头望明月,低头思故乡。
Raising my head, I see the moon so bright; withdrawing my eyes, my nostalgia comes around.
 
俱往矣,数风流人物,还看今朝。
All are past and gone; we look to this age for truly great men.
 
君子成人之美,不成人之恶。
The gentleman helps others to achieve their moral perfection but not their evil conduct.
 
君子独立不惭于影,独寝不愧于魂。
A righteous man never feels ashamed to face his shadow when standing alone and to face his soul when sleeping alone.
 
君子之交淡如水,小人之交甘如醴。君子淡以亲,小人甘以绝。
The friendship between men of virtue is light like water, yet affectionate; the friendship between men without virtue is sweet like wine, yet easily broken.
 
老吾老以及人之老,幼吾幼以及人之幼。
Expend the respect of theaged in one’s family to that of other families; expend the love of the young ones in one’s family to that of other families.
 
礼尚往来。往而不来,非礼也;来而不往,亦非礼也。
Propriety suggests reciprocity. It is not propriety not to give out but to receive, or vice versa.
 
两情若是长久时,又岂在朝朝暮暮。
If love between both sides can last for aye, why need they stay together night and day?
 
路漫漫其修远兮,吾将上下而求索。
The way ahead is long; I see no ending, yet high and low I’ll search with my will unbending.
 
民为贵,社稷次之,君为轻。
The people are the most important element in a state; next are the gods of land and grain;
least is the ruler himself.
 
千丈之堤,以蝼蚁之穴溃;百尺之屋,以突隙之烟焚。
A long dike will collapse because of an ant-hole in it; a tall building will be burned down by a spark from a chimney’s chink.
 
锲而舍之,朽木不折,锲而不舍,金石可镂。
Carve but give up half way, even a decayed piece of wood will not break; carve without stop, even metal and stone can be engraved.
 
人有悲欢离合,月有阴晴阳缺,此事古难全。
People have sorrow and joy; they part and meet again. The moon dims or shines; it waxes or wanes. Nothing is perfect, not even in the olden days.
 
人之于文学也,犹玉之于琢磨也。
Learning and culture are to a person what polished and grinding are to jade.
 
三人行,必有我师焉。择其善者而从之,其不善者而改之。
Among any three people walking, I will find something to learn for sure. Their good qualities are to be followed, and their shortcomings are to be avoided.
 
士不可以不弘毅,任重而道远。仁以为己任,不亦重乎?死而后己,不亦远乎?
An educated gentleman cannot but be resolute and broad-minded, for he has taken up a heavy responsibility and a long course. Is it not a heavy responsibility, which is to practice benevolence? Is it not a long course, which will end only with his death?
 
士之为人,当理不避其难,临患忘利,遗生行义,视死如归。
A moral intellectual is one who escapes no danger in face of truth, discards personal interests in front of disaster, practices righteousness at the expense of life, and looks upon death as going home.
 
逝者如斯夫!不舍昼夜。
Thepassage of time is just like the flow of water, which goes on day and night.
 
顺天者存,逆天者亡。
Those who follow the Heaven’s law will survive; those who go against it will perish.
 
天将降大任于斯人也,必先苦其心志,劳其筋骨,饿其体肤,空乏其身,行拂乱其所为,所以动心忍性,增益其所不能。
When Heaven is about to place a great responsibility on a great man, it always first frustrates his spirit and will, exhausts his muscles and bones, exposes him to starvation and poverty, harasses him by troubles and setbacks so as to stimulate his spirit, toughen his nature and enhance his abilities.
 
天生我才必有用。
Heaven has endowed me with talents for eventual use.
 
天时不如地利,地利不如人和。
Opportunities vouchsafed by Heaven are less important than terrestrial advantages, which in turn are less important than the unity among people.
 
天行健,君子以自强不息。
As Heaven’s movement is ever vigorous, so must a gentleman ceaselessly strive along.
 
温故而知新,可以为师矣。
He who by reviewing the old can gain knowledge of the new and is fit to be a teacher.
 
物格而后知至,知至而后意诚,意诚而后心正,心正而后身修,身修而后家齐,家齐而后治国,国治而后天下平。
Things investigated, genuine knowledge acquired; genuine knowledge acquired ,thoughts purified; thoughts purified, hearts rectified; hearts rectified, personalities cultivated; personalities cultivated, families regulated; families regulated, the states well governed; the states well governed, the whole world will be in peace and tranquil.
 
相见时难别亦难。
It is unbearable to meet as well as to depart.
 
学不可以已。青取之于蓝,而青于蓝;冰,水为之,而寒于冰。君子博学而日参省乎己,则知明而行无过矣。
There is never an end to learning. The dye extracted from the indigo is bluer than the plant; so is the ice colder than the water. By broadly learning and constantly examining himself every day, the gentleman sharpens his awareness and makes fewer mistakes.
 
学而不思则罔,思而不学则殆。
Learning without thinking leads to confusion; thinking without learning ends in danger.
 
学而不厌,诲人不倦。
Never be contented with your study; never be impatient with your teaching.
 
学如逆水行舟,不进则退。
Learning is like rowing upstream: not to advance is to drop back.
 
有朋自远方来,不亦乐乎。
It is such a delight to have friends coming from afar.
 
玉不琢,不成器。人不学,不知义。
As a jade without chiseling will not become a useful object, a man without learning will not know the Way.
 
欲穷千里目,更上一层楼。
We widen our views three hundred miles by ascending one flight of stairs. /
Exhausting my eyes to a thousand li further, I am ascending one more story of the tower.
 
在天愿做比翼鸟,在地愿为连理枝。
In heaven let us be two birds flying ever together, and on earth two trees with branches interlocked forever.
 
不登高山,不知天之厚也;不临深渊,不知地之厚也。
One can never be aware of the height of the sky or the depth of the earth, if he does not climb up a high mountain or look down into a deep abyss.
 
大道之行也,天下为公。
A public spirit will rule all under the sky when the great Way prevails.
 
大江东去,浪淘尽,千古风流人物。
The endless river eastward flows; with its huge waves are gone all those gallant heroes of bygone years.
 
丹青不知老将近,富贵于我如浮云。
Absorbed in painting, you know not old age is coming; indeed, to me wealth and rank are like clouds scudding.
 
曲则全,枉则直,洼则盈,敝则新,少则得,多则惑。
To be part is to be whole; to be bent is to be straight; to be hollow is to be filled; to be worn out is to be renewed; to have little is to have more; to have much is to be confused.

比尔盖茨的11条人生箴言

In Bill Gates" Book for high school and college graduates, there is a list of 11 things they did not learn in school. In his book, Bill Gates talks about how feelgood, politically-correct teachings created a full generation of kids with no concept of reality and how this education set them up for failure in the real world.
在比尔-盖茨写给高中毕业生和大学毕业生的书里,有一个单子上面列有11项学生没能在学校里学到的事情。比尔-盖茨在书中谈到让你感觉良好的"政治上正确"的教导培养出一整代不知现实为何物的年轻人,这种教育只能导致他们成为现实世界中的失败者。

The 11 things are:
这11项事情是:

Life is not fair, get used to it.
生活是不公平的;要去适应它。

The world won"t care about your self-esteem. The world will expect you to accomplish something before you feel good about yourself.
这世界并不会在意你的自尊。这世界指望你在自我感觉良好之前先要有所成就。

You will not make 40 thousand dollars a year right out of high school. You won"t be a vice president with a car phone, until you earn both.
高中刚毕业你不会一年挣4万美元。你不会成为一个公司的副总裁,并拥有一部装有电话的汽车,直到你将此职位和汽车电话都挣到手。

If you think your teacher is tough, wait till you get a boss. He doesn"t have tenure.
如果你认为你的老师严厉,等你有了老板再这样想。老板可是没有任期限制的。

Flipping burgers is not beneath your dignity. Your grandparents had a different word for burger flipping; they called it opportunity.
烙牛肉饼并不有损你的尊严。你的祖父母对烙牛肉饼可有不同的定义;他们称它为机遇。

If you mess up, it"s not your parents" fault, so don"t whine about our mistakes, learn from them.
如果你陷入困境,那不是你父母的过错,所以不要尖声抱怨我们的错误,要从中吸取教训。

Before you were born, your parents weren"t as boring as they are now. They got that way from paying your bills, cleaning your clothes and listening to you talk about how cool you are. So before you save the rain forest from the parasites of your parents" generation, try "delousing" the closet in your own room.
在你出生之前,你的父母并非像他们现在这样乏味。他们变成今天这个样子是因为这些年来他们一直在为你付账单,给你洗衣服,听你大谈你是如何的酷。所以,如果你想消灭你父母那一辈中的"寄生虫"来拯救雨林的话,还是先去清除你房间衣里的虫子吧。
 
Your school may have done away with winners and losers, but life has not. In some schools they have abolished failing grades; they"ll give you as many times as you want to get the right answer. This doesn"t bear the slightest resemblance to anything in real life.
你的学校也许已经不再分优等生和劣等生,但生活却仍在作出类似区分。在某些学校已经废除不及格分;只要你想找到正确答案,学校就会给你无数的机会。这和现实生活中的任何事情没有一点相似之处。

Life is not divided into semesters. You don"t get summers off and very few employers are interested in helping you find yourself. Do that on your own time.
生活不分学期。你并没有暑假可以休息,也没有几位雇主乐于帮你发现自我。自己找时间做吧。盖茨箴言:电视并不是真实的生活

Television is NOT real life. In real life people actually have to leave the coffee shop and go to jobs.
电视并不是真实的生活。在现实生活中,人们实际上得离开咖啡屋去干自己的工作。

Be nice to nerds. Chances are you"ll end up working for one.
善待乏味的人。有可能到头来你会为一个乏味的人工作。

11月7日

波斯猫(1920)

波斯市场(Persian Market), 英国作曲家凯特尔比于1920年作成,是其最著名的作品 此曲开头凯特尔比提示:“骆驼商队走过来了,”中板,这个旋律加强后,加上男声合唱“巴克细喜,巴克细喜”(请施舍的意思),市场的声音渐渐达到高潮。 独奏大提琴与单簧管在竖琴拌奏下奏出“美丽的公主到来”,接着是“魔术师”、“玩蛇的人”的音乐,官员的巡行,再度听到“请施舍”的声音,公主开始做回府的准备。 市场恢复平静,最后突然以合奏告终结束