原创 Excel VBA 開發環境

Excel VBA 開發環境 打開VB編輯器: 細節參見幫助文檔:  

原创 KMP算法非遞歸實現——菜鳥與高手的區別

#include <string> using namespace std; //來自網絡 //以計算下一個元素的next值爲中心 static void preKmp(const char *x, int len, int kmpNe

原创 C++憤恨者札記8—— 常引用參數也不可靠的情況

#include <vector> #include <string> using namespace std; //parameter 's' can only make sure reference value can't be m

原创 C++憤恨者札記10——bind2nd示例

#include <vector> #include <string> #include <algorithm> using namespace std; //can't use reference arg //bool Filter

原创 C++憤恨者札記6——函數指針與函數對象

class ClxInc { public: int operator () ( int a) { return ++a; } }; template <class T> int TempFn( int a, T Fn ) {

原创 只管理指定後綴的.gitignore

#exclude all file with a suffix *.* #exclude all file without suffix * #except dir !*/ #except batch file !*.bat

原创 VIM中常用序列生成及數值轉換

"output A-Z exe "let i=65|while i<=90|put =printf('%c', i)|let i=i+1|endwhile" "output '0-9A-F' exe "let i=0|while i<1

原创 Use kdiff3 in git

Install kdiff3. Here the path is: C:\Program Files\KDiff3\ Set the kdiff3 path in Git: Create a conflict and specif

原创 VS2010中創建並用C++及C#測試COM組件

VS2010中創建並用C++及C#測試COM組件 創建ATL工程: 1.新建工程: 2.在工程嚮導中使用默認設置: 3.添加ALT simple object: 4.添加函數與屬性: 5.添加實現代碼: 測

原创 C++憤恨者札記7——函數適配器

C++憤恨者札記7——函數適配器 考慮編寫一個通用的計數函數TestCount,再用它來統計字符串空格的個數:#include <string> #include <iostream> using namespace std; boo

原创 The format of string resources

This article give a detail of usage of FindResourceEx for string table: http://blogs.msdn.com/b/oldnewthing/archive/20

原创 C++憤恨者札記9——vector.erase與set.erase

//使用erase分別清理vector與set中的內容 #include <vector> #include <string> #include <set> using namespace std; void FnVec() { v

原创 未提供頭文件情況下,C++中使用COM

未提供頭文件情況下,C++中使用COM     前面用CPP測試COM時,需要使用MIDL生成的_i.c與*.h文件。本文示範無這些文件的情況下,用CPP使用COM的方法。 測試工程必須是MFC工程(創建MFC工程過程省略)。 1.添加T

原创 Solution of Vim E303 Error under Win 7

ViM: Unable to open swap file Problem 1 E303: Unable to open swap file for "[No Name]", recovery impossible Y

原创 C# automation Excel

C# automation Excel 添加using:using System.Reflection; using Excel = Microsoft.Office.Interop.Excel; 加入引用: C:\Program Fi