摘要:        
When editingAlt + F7 在打开的所有窗口中选择:不松开Alt,按左右键导航 ctrl + ] go to ({['s match ctrl + - go previous view ctrl + shift + - go next vie...    
阅读全文
posted @ 2009-03-12 16:20
MainTao
阅读(3907)
推荐(0)
 
		
    
        
        
摘要:        
(*) Command line argument 设置方法 在Solution Explorer/project$/properites/Debug下设置 (*) Warning level 在Solution Explorer/project$/properites/Build下设置,数越大越严格 (*) Output path 在Solution Explorer/project$/...    
阅读全文
posted @ 2009-03-10 10:38
MainTao
阅读(364)
推荐(0)
 
		
    
        
        
摘要:        
The Console class also recalls some of my Unix programming memories. When I was a Unix programmer, I used a terminal called SecureCRT, whose window width can be wider than 80 characters. Is 80 enough...    
阅读全文
posted @ 2009-03-09 23:08
MainTao
阅读(1923)
推荐(0)
            
        
        
摘要:        
注:C#语言发展十分迅速,而且仍然有很大的提升空间,所以现在写下的有关C#语言上的一些限制,可能过一两年就不同了,所以需要不断更新。至于C++,因为已经很久没怎么变动,所以就容易得多。 (*) 允许初始化成员变量 C#允许 C++不允许 (*) 编译器自动添加默认无参构造函数 c++:当用户实现了有参构造函数,编译器就不添加了。 c#:对于class与C++一样。但对于struct,无论用户实...    
阅读全文
posted @ 2009-03-09 20:08
MainTao
阅读(3868)
推荐(0)
            
        
        
摘要:        
The class recalls my Unix programming memory :)    
阅读全文
posted @ 2009-03-09 14:52
MainTao
阅读(265)
推荐(0)
            
        
        
摘要:        
When we want to control the memory layout, we must use System.Runtime.InteropServices namespace, it contains some useful attributes such as StructLayoutAttribute, FieldOffsetAttribute and also some us...    
阅读全文
posted @ 2009-03-09 11:09
MainTao
阅读(2233)
推荐(1)
 
		
    
        
        
摘要:        
(*) unsafe 和 fixed Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->unsafe { int[] array = new int[10]; for (int i = 0; i cl...    
阅读全文
posted @ 2009-03-06 13:28
MainTao
阅读(16469)
推荐(3)
 
		
    
        
        
摘要:        
写出下面这段晦涩难懂但却极为高效的代码的人,真是个败类。 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->// For more information about Year 2038 problem please refer to // http:...    
阅读全文
posted @ 2009-02-26 10:28
MainTao
阅读(560)
推荐(0)
 
		
    
        
        
摘要:        
目录(*) 数组的排序复杂度O(n*n)的有selection sortbubble sortrank sort下面对这三种算法进行讲解:selection sort思路:首先找出最大的元素,把它移动到最后(即a[n-1]的位置上),然后在余下的n-1个元素中找出最大的,移动到a[n-2],如此进行下去直到只剩下一个元素。[代码]代码中用临时变量max来保存最大元素,而不用a[idxOfMax],...    
阅读全文
posted @ 2008-07-04 00:56
MainTao
阅读(559)
推荐(0)
 
		
    
        
        
摘要:        
什么样的问题可以用递归? 其实很多问题都可以用递归解决,例如数列的求和: #include using namespace std; template T recrusive_sum(T a[], int idx) { if(idx == 0) // 退出条件 return a[0]; else return a[idx] + recr...    
阅读全文
posted @ 2008-06-29 18:57
MainTao
阅读(589)
推荐(0)