Jeffrey&Lynny

一个温馨小家庭的.Net生活

导航

2008年6月14日 #

Programming Pearls: Chatper3 Problem4 [Dates Caculation]

摘要: The first program The second program Lesson Learned: 将daysInMonth[]的内容拷贝到leapYearDaysInMonth[]的时候忘记将闰二月改为29天... 看来每次写完一条语句都应该verify一下。这个看似浪费时间,却真正能够减少debugging的大量时间呀 The third program Input: 1981 8 ... 阅读全文

posted @ 2008-06-14 13:22 比尔盖房 阅读(249) 评论(0) 推荐(0) 编辑

2008年6月8日 #

Programming Pearls: Chatper3 Problem3 [Print Banner]

摘要: ProgrammingPearlsChapter3Problem3 The output is like this: xxxxxxxxx xxxxxxxxx xx xx xx xx xx xx xxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxx xxx xxx xxx xxx ... 阅读全文

posted @ 2008-06-08 12:16 比尔盖房 阅读(311) 评论(0) 推荐(0) 编辑

2007年7月18日 #

Studying Probability Theory

摘要: Chapter 1. How to prove that the r combination from n elements is n!/((n-r)!*r!) ?Answer: we may first find out the permutation of r elements from n: we have n*(n-1)*(n-2)...*(n-r+1) = n!/(n-r)!. In t... 阅读全文

posted @ 2007-07-18 17:55 比尔盖房 阅读(278) 评论(0) 推荐(0) 编辑

2007年6月26日 #

Studying "Concrete Mathematics"

摘要: Chapter 1 Homework 10. When n=0, the Q(n)=0 is trivial. To move Q(n), we need first transfer (n-1) disks from A to C. This moves are the same as R(n-1). After (n-1) disks, we may directly move the la... 阅读全文

posted @ 2007-06-26 15:13 比尔盖房 阅读(319) 评论(0) 推荐(0) 编辑

2007年6月12日 #

Studying "Introduction to Algorithms"

摘要: Chapter 2 2.1-3: Linear_Search(A, n, v) for iT(2^k)=2^klg(2^k) When n=2^(k+1), T(n)=2T(n/2)+n =2T(2^k)+2^(k+1) =2*2^k*lg(2^k)+2^(k+1) =2^(k+1)*k+ 2^(k+1) =(k+1)*2^(k+1) ... 阅读全文

posted @ 2007-06-12 16:12 比尔盖房 阅读(576) 评论(0) 推荐(0) 编辑

2006年10月28日 #

Testing SEH tips

摘要: I use the code snippet below to test some points of SEH: #define WIN32_LEAN_AND_MEAN#include#includevoid main(){ char *str="this is a local string"; printf("Entering main function\n"); ... 阅读全文

posted @ 2006-10-28 22:50 比尔盖房 阅读(216) 评论(0) 推荐(0) 编辑

2006年8月24日 #

How DebuggerRCThread is lauched?

摘要: 001bf8c4 7957c147 mscorwks!DebuggerRCThread::Start [c:\rotor\sscli20\clr\src\debug\ee\rcthread.cpp @ 1520]001bf940 792c7f41 mscorwks!Debugger::Startup+0x26a [c:\rotor\sscli20\clr\src\debug\ee\debugger... 阅读全文

posted @ 2006-08-24 17:23 比尔盖房 阅读(531) 评论(0) 推荐(0) 编辑

2006年8月21日 #

Public Symbols vs Private Symbols[zt]

摘要: When you build a driver or other program, the program's symbols are usually stored in symbol files, although some older compilers store certain symbols in the executable file. When a debugger is analy... 阅读全文

posted @ 2006-08-21 18:12 比尔盖房 阅读(624) 评论(0) 推荐(0) 编辑

2006年8月12日 #

The magic of NativeWindow-- How does .Net Winform manage Win32 controls

摘要: 1. Every .Net winform control inherits from System.Windows.Forms.Control class. In its constructor, you will see this key statement: public Control(){ this.window = new Control.ControlNativeWindo... 阅读全文

posted @ 2006-08-12 22:36 比尔盖房 阅读(896) 评论(0) 推荐(0) 编辑

2006年8月7日 #

.Net Windows Service

摘要: static void Main(){ System.ServiceProcess.ServiceBase[] ServicesToRun; // More than one user Service may run within the same process. To add // another service to this process, change the fo... 阅读全文

posted @ 2006-08-07 17:52 比尔盖房 阅读(642) 评论(0) 推荐(0) 编辑