摘要: Imagine that there are plenty of Button controls and we need to change all of their Text when they are clicked. May be there are many ways to imple... 阅读全文
posted @ 2014-01-10 14:13 wonkju 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 回调机制:window中: 例如按钮的点击事件,对于控制台等程序,一般程序从Main开始. 例如当发生按钮的点击事件的时候,是操作系统去调用执行对应的方法,而非人为用代码调用.即是使用回调的机制.js中: Functions are objects Functions in Javas... 阅读全文
posted @ 2014-01-10 13:54 wonkju 阅读(246) 评论(0) 推荐(0) 编辑
摘要: If you are care a littile about the time your algorithm cost,you should notice that,you my use StringBuilder instead of string itself if you gonna change the string literals. Today,I test them,and the result is so much difference. Nomal string operates: 1 System.Diagnostics.Stopwatch sw = new ... 阅读全文
posted @ 2014-01-10 12:51 wonkju 阅读(586) 评论(0) 推荐(0) 编辑
摘要: For all of we programmers,we should always remember that "Premature optimization is the root of all evil". (Ref) When again,I come back to the 'Data Structure and Algorithm',following the algorithms that the .net provides,using the '.net reflector',I realise that I was too 阅读全文
posted @ 2014-01-10 11:59 wonkju 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 1 //1 加到 100 的 时间复杂度: 2 int n = 100; 3 int sum = 0; 4 for(int i = 1; i n -> ∞. 阅读全文
posted @ 2014-01-08 02:03 wonkju 阅读(931) 评论(0) 推荐(0) 编辑
摘要: Length is the longer or longest dimension of a rectangle (or even an object).Ref:http://mathforum.org/library/drmath/view/57801.html 阅读全文
posted @ 2014-01-08 01:03 wonkju 阅读(461) 评论(0) 推荐(0) 编辑
摘要: Ref:http://www.w3schools.com/js/js_comparisons.asp 1 var r = 1; 2 var result = r || 2; 3 console.log(result); 4 //output: 1 5 6 r = 0; 7 result = r |... 阅读全文
posted @ 2014-01-08 00:40 wonkju 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Hash,in wikipedia, may relevant to many stuffs. In javascript, hashis a group of name/value pairs where a unique name points to a unique value, and... 阅读全文
posted @ 2014-01-07 21:59 wonkju 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Array ClassProvides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays in the common language runtimeIn my opinion,int32[] is an example of Array,so is double[] and so on.for instance:1 Int32[] ints = new int[3];2 //... 阅读全文
posted @ 2014-01-07 10:53 wonkju 阅读(439) 评论(0) 推荐(0) 编辑
摘要: If we want to move file to the directory that does not exist,and if we perform a File.Move,it will result return an error shows that 'The path is not ... 阅读全文
posted @ 2014-01-07 02:05 wonkju 阅读(217) 评论(0) 推荐(0) 编辑