人生是一场不能存盘的RPG,我只能尽量多搞几个Screenshot

June 23, 2007

Martial Art Vocabulary

Filed under: 其他

Self-defence

Punch

Kick

Head butt

Stand-Up Aggression

Choke

Collar Grab

Bear Hug Over the Arms

June 19, 2007

Classic Mistakes in Development

Filed under: 经验积累

By Steve McConnell
http://blogs.construx.com/blogs/stevemcc/archive/2007/06/15/Classic-Mistakes-Updated.aspx

Confusing estimates with targets
Excessive multi-tasking
Assuming global development has a negligible impact on total effort
Unclear project vision
Trusting the map more than the terrain
Outsourcing to reduce cost
Letting a team go dark (replaces the previous “lack of management controls”)

People-Related Mistakes

Process-Related Mistakes

Product-Related Mistakes

Technology-Related Mistakes

1. Undermined motivation

2. Weak personnel

3. Uncontrolled problem employees

4. Heroics

5. Adding people to a late project

6. Noisy, crowded offices

7. Friction between developers and customers

8. Unrealistic expectations

9. Lack of effective project sponsorship

10. Lack of stakeholder buy-in

11. Lack of user input

12. Politics placed over substance

13. Wishful thinking

14. Overly optimistic schedules

16. Insufficient risk management

17. Contractor failure Insufficient planning

18. Abandonment of planning under pressure

19. Wasted time during the fuzzy front end

20. Shortchanged upstream activities

21. Inadequate design

22. Shortchanged quality assurance

23. Insufficient management controls

24. Premature or too frequent convergence

25. Omitting necessary tasks from estimates

26. Planning to catch up later

27. Code-like-hell programming

28. Requirements gold-plating

29. Feature creep

30. Developer gold-plating

31. Push me, pull me negotiation

32. Research-oriented development

33. Silver-bullet syndrome

34. Overestimated savings from new tools or methods

35. Switching tools in the middle of a project

36. Lack of automated source

June 18, 2007

Enable multisession of vista remote desktop

Filed under: 使用技巧

Currently, Vista just support single session of remote desktop connection.
There is a patch broking this limitation.
vista_concurrent_rdp_sessions.rar

Instruction:
1.Copy termsrv.dll.patched32bit into %SystemRoot%\System32\
2.Run patch_termsrv_32bit.bat as Administrator.
3.Reboot.

凤凰大视野-中国远征军

Filed under: 乱翻书

http://baike.baidu.com/history/id=787492
重要中国将领及人物

卫立煌 - 1944年第二次远征军总司令
戴安澜 - 第200师师长
廖耀湘 - 第22师师长
宋希濂 - 第11集团军军长
李弥 - 第8军副军长兼荣一师师长
杜聿明 - 1942年第一次远征军总指挥
余韶 - 第96师师长
甘丽初 - 第6军军长
彭壁生 - 第49师师长
吕国铨 - 第93师师长
刘伯龙 - 第28师师长
马维骥 - 第29师师长
张珍 - 第66军军长
孙立人 - 新38师师长
史迪威 - (美国人)中印缅战区参谋长,中国驻印军总司令

1.
美方参谋:约瑟夫.史迪威
1942年2月,中国10万远征军入缅,其编制为第5军,第6军和第66军。
第5军 军长杜聿明, 下辖机械化200师(约9000人),师长戴安澜
第6军
第66军
全国15个机械化师,9个用于远征.

先头部队为第5军200师,当时中国唯一的机械化部队,师长戴安澜,安徽无为人,毕业于
黄埔3期,参加长城保卫战,台儿庄,武汉战役,35岁升任200师师长.
1939年11月, 广西昆仑关,200师对阵敌第五师团,毙敌少将中村正雄.
入缅前(1941.12-1942.2)驻于滇西保山.

2.同古(Toungoo)战役
第5军200师经畹町入缅,3月6日抵缅甸中部水陆交通要冲同古(东吁),直面兵力两倍于
己的敌55师团,激战于色当河大桥.
3月15日前后同古机场失守.守军团长李树正遭军法枪决.
激战至3月29日,敌56师团3天行军300公里增援,色当河桥头阵地失守,战局急转直下.
30日,廖耀湘率22师增援,掩护200师撤退.
此役200师伤亡过半.日军集结4个师团约10万人迅速北上.局势危急.

3.盟军大撤退
罗卓英上将任远征军第一路司令,新38师师长孙立人奉命守卫曼德勒(Mandalay).
盟军意图集结中方3个军,英方5个师约25万人与敌在曼德勒会战.
4月12日敌33师团一个联队(1000多人)围攻缅中部油田仁安羌,英军主力7000人被围
4月16日,孙立人派刘放武113团前往增援.4月18日上午退敌解围.
4月20日曼德勒正面英军不辞而别,并计划炸桥.
蒋介石急令远征军将会战改为纵深防御,重点放在腊戌
4月28日,敌主力56师团占领腊戌,远征军退路被截断.英军向印度撤退,6万远征军向
缅北密支那撤退.
5月,56师团抢先占领密支那.

4.败走野人山
5月,杜聿明下令北撤,200师负责断后亦北撤,18日遭伏击,师长戴安澜重伤,5月底,余
部2000余人分散突围回国.
5月26日戴安澜将军牺牲于缅北茅邦村.
孙立人抗命突围,5月26日率部安全进入印度.

window.onload and body onload =

Filed under: ASP.NET

本文测试环境为IE7,vs2005
<html>
<head>
<title>Untitled Page</title>
<script type=”text/javascript”>
function pageLoaded()
{
window.status=”Page loaded”;
}

</script>
</head>
<body onload=”pageLoaded();”>
<script type=”text/javascript”>
window.onload=windowLoad;

function windowLoad()
{
window.status=”Window loaded”;
}
</script>
</body>
</html>
当这个html页面被加载时,windowLoad()会被执行,而pageLoaded()不会被执行.
如果把JavaScript代码全部放在<Head>中
<html>
<head>
<title>Untitled Page</title>
<script type=”text/javascript”>
function pageLoaded()
{
window.status=”Page loaded”;
}
window.onload=windowLoad;

function windowLoad()
{
window.status=”Window loaded”;
}
</script>
</head>
<body onload=”pageLoaded();”>
</body>
</html>
则pageLoaded()执行而windowLoad()不执行.

MSDN对onload有如下描述
The onload attribute of the body object sets an onload event handler for the window.

可见,在IE解析html文件时,后出现的设定会覆盖前边的设定.即window.onload
和onload=” “,后出现者起作用.

如果要两者都执行,则要使用attachEvent来指定window load时要运行的函数:
if (document.all){
window.attachEvent(’onload’,FuncName)
}
else{
window.addEventListener(’load’,FuncName,false);
}

June 16, 2007

Technical Vocabulary

Filed under: 其他

Evaluating the technical feasibility.You need to demonstrate the feasibility of your design.

Object-oriented programming concept: inheritance, modularity, polymorphism, and encapsulation.

The Application object corresponds to a single application.

This means being able to evaluate requirements and then recommend, evaluate, and
refine a design for the application

Silver-bullet syndrome

Developer will translate stakeholders’ vision into tangible software.

As technologists, our first instinct to any problem might be to write some code.

The result of this thinking are beneficial to the organization.

June 15, 2007

睡觉的诀窍 南怀瑾

Filed under: 乱翻书

睡觉的诀窍 南怀瑾

……所以,根据医学和我的体验、观察,一个人真正睡着觉最多只有两个钟头,其余都是浪费时间,躺在枕头上做梦,没有哪个人不做梦。至于醒来觉得自己没有做梦,那是因为他忘记了。通常一个人睡两个钟头就够了,为什么有人要睡七、八个钟头?那是你赖床躺在枕头上休息的习惯养成的,并非我们需要那么久的睡眠时间,尤其打坐做功夫的人晓得,正午只要闭眼真正睡着三分钟,等于睡两个钟头,不过要对好正午的时间。夜晚则要在正子时睡着,五分钟等于六个钟头。就这个时间的学问又大了,同宇宙法则、地球法则、易经阴阳的道理有关系,而且你会感觉到,心脏下面硬是有一股力量降下来,与丹田(肾上)的力量融合,所谓”水火既济”,豁然一下,那你睡眠够了,精神百倍。所以失眠或真要夜里熬夜的人,正子时的时刻,哪怕二十分钟也一定要睡,睡不着也要训练自己睡着。过了正子时大约十二点半以后,你不会想睡了,这很糟糕。更严重的,到了天快亮,四、五点钟,五、六点卯时的时候,你又困得想睡,这时如果一睡,一天都会昏头。所以想从事熬夜工作的人,正子时,即使有天大的事也要摆下来,睡它半小时,到了卯时(7:00)想睡觉千万不要睡,那一天精神就够了。不过失眠的人都挨过十二点,在床上翻来覆去睡不着,结果快天亮睡着了,到第二天下午都昏头昏脑,因此你会感觉失眠、睡眠不足,实际上是你没有经验。

“午时”一般约合今天的中午十一点至十三点之间,午时三刻是将近正午十二点,太阳挂在天空中央,是地面上阴影最短的时候。
这在当时人看来是一天当中”阳气”最盛的时候。

古代十二时辰对照表
  子时 23点–1点

  丑时 1点– 3点

  寅时 3点–5点

  卯时 5点–7点

  辰时 7点–9点

  巳时 9点–11点

  午时 11点–13点

  未时 13点–15点

  申时 15点–17点

  酉时 17点–19点

  戌时 19点–21点

  亥时 21点–23点

  另外,每一时辰又细分为初和正,如23点为子初,半夜24点为子正,中午12点为午正,下午1点为未初

June 11, 2007

Can not open CHM with chinese name or in folder with chinese folder

Filed under: 使用技巧

Solution:
In “Regional and Language options” dialog, Set “Standards and formats” to Chiese (PRC)

June 6, 2007

SnagIt免费注册

Filed under: 开发工具

SnagIt 7.2.5免费注册地址:http://www.techsmith.com/snagit/ukdn.asp

SnagIt 7.2.5下载地址:http://www.oldapps.com/OldApps/SnagIT/SnagIt725.exe

遗憾的是SnagIt 7.2.5的安装程序在Vista上无法安装.

June 5, 2007

AJAX Components

Filed under: ASP.NET

http://ajax.asp.net/about/default.aspx?tabid=47

1.ASP.NET 2.0 AJAX Extensions and Document, Source Code
扩展ASP.NET 2.0 server-side从而提供了和ASP.NET兼容的AJAX编程模型

2.Microsoft AJAX Library
JaveScript library

3.ASP.NET AJAX Control Toolkit
ASP.NET AJAX control SDK以及sample
在线演示http://ajax.asp.net/ajaxtoolkit/

4.ASP.NET Futures

5.Sample Applications

为什么在派生类中再次实现一个Interface?

Filed under: .NET, C#

比如:
TemplateContorl实现了INameContainer,其派生类UserContorl又实现INameContainer.

INameContainer仅仅是一个marker interface,其用途也就是看一个class是否实现了此interface,
UserContorl就算不实现INameContainer,仍然可以cast为INameContainer.

又如:
StringCollection,实现了IList, ICollection, IEnumerable,而IList实现了ICollection, IEnumerable,
ICollection又实现了IEnumerable.
其目的在于可在StringCollection中显式实现这些Interface,对一些方法的参数类型进行强化:
public int IndexOf(string value);
int IList.IndexOf(object value)
{
return this.IndexOf((string) value);
}
以便在编译阶段发现问题.

考察如下代码:
interface ITest
{
void ShowMsg();
}

interface IITest:ITest
{
}

public class TestA : ITest
{
public void ShowMsg()
{

Console.WriteLine(”TestA:”);

}

void ITest.ShowMsg()
{

Console.WriteLine(”TestA:ITest”);

}
}
public class TestB :TestA, ITest
{
public void ShowMsg() //Complier warning,hides inherited member ‘TestA.ShowMsg()’
{
Console.WriteLine(”TestB:”);
}
void ITest.ShowMsg()
{

Console.WriteLine(”TestB:ITest”);
}
}

TestB test = new TestB();
test.ShowMsg();
(test as TestA).ShowMsg();

ITest itest = new TestB();
itest.ShowMsg();
输出:
TestB:
TestA:
TestB:ITest
如果去掉TestB对ITest的实现, (test as ITest).ShowMsg();将输出TestB:

戍戎戊戌

Filed under: 乱翻书

戍(树), 人+戈,守边

戎(荣), 十为甲+戈,本意为兵器的总合,后泛指军事.弓、殳、矛、戈、戟为古代五戎

戊(勿), 天干第5,属中央,戊戌维新,指1898年(农历戊戌年).

戌(虚), 地支第11,十二生肖属狗,指晚上七点钟至九点钟

June 4, 2007

Working with Vista .net 3.0

Filed under: .NET, Windows platform

1.Virtual Studio
Vista只支持 vb6和vs2005, 使用vs2005
需要VS2005 sp1 和 vs2005 sp1 update for vista

2.sql server
Microsoft SQL Server 2005 requires SP2 to run on Windows Vista.

3.IIS
http://blogs.msdn.com/webdevtools/archive/2006/09/18/761206.aspx
Developing Web Applications on Windows Vista with Visual Studio 2005
Select Web Management Tools->IIS6 Management Compatibility->IIS Metabase and IIS6 configuration compatiblity
Select WWW service->ASP.ET
Run Visual Studio 2005 in the context of an administrator account

4..NET framework
Microsoft .NET Framework 3.0 Deployment Guide
http://msdn2.microsoft.com/en-us/library/aa480173.aspx

SDK for vista and .net framework 3.0
Visual Studio 2005 extensions for .NET Framework 3.0

Visual Studio 2005 Extensions for WwF
Visual Studio 2005 Extensions for WCF, WPF 。

机器性能测试网站

Filed under: 网络资源

http://www.systemrequirementslab.com/referrer/srtest

How to get IIS version

Filed under: ASP.NET

I found this registry in a web applcation setup project.

registry path:
HKLM\SYSTEM\CurrentControlSet\Services\W3SVC\Prarameters
value: MajorVersion

June 3, 2007

当词霸2006遭遇vista

Filed under: 使用技巧

安装ciba2006时,除了黑屏一次,还算正常.
运行ciba2006,vista弹出一个”Program Compatibility Assistant”对话框,我选择了”Check for solutions online”,呵呵,金山还真地给出了solution:
http://cp.iciba.com/vistainfo/ciba06.shtml

尊敬的用户您好:

   目前《金山词霸2006专业版》支持的操作系统是简体中文/繁体中文/英文/日文Windows98/ME/2000/XP,尚不支持Vista操作系统。因此在Vista操作系统上安装时可能会出现一些不可预见的错误,当有错误出现时,请尽快进行软件卸载。

  《金山词霸2007专业版》提供免费支持至Vista操作系统的升级服务,详细信息,请登陆www.iciba.com

  感谢您使用我们的产品!

                                北京金山软件有限公司






















Get free blog up and running in minutes with Blogsome
Theme designed by Hadley Wickham