delete all history of one file with sensitive data

一个命令一个命令的敲吧。这个试过是可以work的,记下来, 以备需要。 步骤一: 从你的资料库中清除文件 以Windows下为例(Linux类似), 打开项目的Git Bash,使用命令:  git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch path-to-your-remove-file' --prune-empty --tag-name-filter cat --...

学习下 WTL 的 thunk-转载的,写的很好

学习下 WTL 的 thunk 由于 C++ 成员函数的调用机制问题,对C语言回调函数的 C++ 封装是件比较棘手的事。为了保持C++对象的独立性,理想情况是将回调函数设置到成员函数,而一般的回调函数格式通常是普通的C函数,尤其是 Windows API 中的。好在有些回调函数中留出了一个额外参数,这样便可以由这个通道将 this 指针传入。比如线程函数的定义为: typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(    LPVOID...

Unit Testing

http://artofunittesting.com/definition-of-a-unit-test/   A good unit test is: §  Able to be fully automated §  Has full control over all the...

ATL::CRegKey trick

please pay attention on REGSAM. HKEY m_hKey;     REGSAM m_samWOW64;   NND, default is HKEY_READ | HKEY_WRITE, so you understood. 0