<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/binwind</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; binwind]]></copyright><item><title><![CDATA[realproxy类]]></title><link>https://blog.csdn.net/binwind/article/details/3554544</link><guid>https://blog.csdn.net/binwind/article/details/3554544</guid><author>binwind</author><pubDate>Fri, 19 Dec 2008 01:57:00 +0800</pubDate><description><![CDATA[nunit中的dyanamicrank,觉得非常的强大。开始觉得没有metadata program的c#怎么做到的。。查看了源代码才知道是使用了realproxy这个类。。这个类非常强大啊。。。。。看代码     class Program    {        interface ABC        {             void Hello();]]></description><category></category></item><item><title><![CDATA[解析C++虚函数表]]></title><link>https://blog.csdn.net/binwind/article/details/3087485</link><guid>https://blog.csdn.net/binwind/article/details/3087485</guid><author>binwind</author><pubDate>Thu, 16 Oct 2008 22:22:00 +0800</pubDate><description><![CDATA[http://www.51cto.com/art/200712/62673.htm 里面给出的例子个人感觉不够好，应该用成员函数指针而不应该用函数指针。否则无法传递成员。。我给出的例子如下 #include "stdafx.h" #include  using namespace std;class Base{private:    int i;]]></description><category></category></item><item><title><![CDATA[我读boost源代码笔记 第五篇 quote.hpp]]></title><link>https://blog.csdn.net/binwind/article/details/2712403</link><guid>https://blog.csdn.net/binwind/article/details/2712403</guid><author>binwind</author><pubDate>Sat, 26 Jul 2008 01:45:00 +0800</pubDate><description><![CDATA[quote的作用是把一个metafunction,变换成为一个metafunction class,我们都知道,metafunction是无法进行传递的。例如我们有一个metafunciton AddPointerMetaFunction作用是添加指针templatestruct AddPotionerMetaFunction{	typedef T* type;}; 我们还]]></description><category></category></item><item><title><![CDATA[获得自动生成的ID]]></title><link>https://blog.csdn.net/binwind/article/details/2561577</link><guid>https://blog.csdn.net/binwind/article/details/2561577</guid><author>binwind</author><pubDate>Wed, 18 Jun 2008 15:44:00 +0800</pubDate><description><![CDATA[在写数据库的时候，一般作为主键的ID是自动生成的，怎么获得这个自动生成的id呢？有人说用 select Max(id) from table但是这是不可以的(请考虑多个连接并发的情况)所以争取的办法是insert into table values (...)select @@identity from table可以获得本连接插入的上一个自动生成的id]]></description><category></category></item><item><title><![CDATA[我读boost源代码笔记 第三篇 关于has_xxx.hpp]]></title><link>https://blog.csdn.net/binwind/article/details/2550686</link><guid>https://blog.csdn.net/binwind/article/details/2550686</guid><author>binwind</author><pubDate>Sun, 15 Jun 2008 20:04:00 +0800</pubDate><description><![CDATA[这次要说的是has_xxx.hpp, 这一段小小的代码虽然很简短,但是写得很精彩,不容错过,请大家留意了。首先我们来谈谈has_xxx.hpp的作用, has_xxx就是用来判断某一个类中是否有xxx这个inner class，我们用has_type为例子说明问题(boost/mpl/aux_/has_type.hpp)struct A{	typedef int type]]></description><category></category></item><item><title><![CDATA[我读boost笔记 附录：宏中不支持模板]]></title><link>https://blog.csdn.net/binwind/article/details/2545087</link><guid>https://blog.csdn.net/binwind/article/details/2545087</guid><author>binwind</author><pubDate>Fri, 13 Jun 2008 21:25:00 +0800</pubDate><description><![CDATA[宏里面不支持模板的使用的。具体看看本文就了解了void say(int a){	std::cout << a << std::endl;}#define TEST_MACRO(n) say(n)template class Test_Template{public:	static const]]></description><category></category></item><item><title><![CDATA[我读boost源代码笔记 第二篇 is_function代码的阅读]]></title><link>https://blog.csdn.net/binwind/article/details/2540591</link><guid>https://blog.csdn.net/binwind/article/details/2540591</guid><author>binwind</author><pubDate>Thu, 12 Jun 2008 17:28:00 +0800</pubDate><description><![CDATA[type_traits里面有着很多的文件，很难一一阅读完，这里说明is_function这个metafunction和他们所涉及到的一些其他的源文件，愿能起到抛砖引玉的作用吧。 首先来说的就是is_function，我们首先查阅到boost/type_traits/is_funcion.hpp line 64struct is_function_impl就是is_functio]]></description><category></category></item><item><title><![CDATA[我读boost源代码笔记 第一篇 编译器版本确定]]></title><link>https://blog.csdn.net/binwind/article/details/2540556</link><guid>https://blog.csdn.net/binwind/article/details/2540556</guid><author>binwind</author><pubDate>Thu, 12 Jun 2008 17:18:00 +0800</pubDate><description><![CDATA[不同的编译器对于template的支持不同的，boost对于不同的编译器是不同编译方法，因此开始特别强调本人使用的编译环境：本文使用的编译器版本为为VC 8.0, (主流了国人都是用visual studio的了，如果你用的不是visual studio本人写的读boost笔记对你就没有太大用了)此外本笔记使用的是boost源代码的1.0版本，因为本人在阅读源代码的时候可能会对源代码进行改动，]]></description><category></category></item><item><title><![CDATA[指向临时变量的引用]]></title><link>https://blog.csdn.net/binwind/article/details/2281765</link><guid>https://blog.csdn.net/binwind/article/details/2281765</guid><author>binwind</author><pubDate>Fri, 11 Apr 2008 13:15:00 +0800</pubDate><description><![CDATA[ c++规定指向临时变量的引用只能为常数，具体看看代码了什么是临时变量又怎么产生的呢，可以看看一下代码 void f(short const & b)...{}int _tmain(int argc, _TCHAR* argv[])...{    int i = 20;    short const & b = i;//i is not a short, so generate a]]></description><category></category></item><item><title><![CDATA[协变返回型别]]></title><link>https://blog.csdn.net/binwind/article/details/2233478</link><guid>https://blog.csdn.net/binwind/article/details/2233478</guid><author>binwind</author><pubDate>Mon, 31 Mar 2008 16:29:00 +0800</pubDate><description><![CDATA[协变返回类型(covariant return type) ,这意味着派生类的重载函数可以返回从被重载的函数的返回类型派生的类型。如下面代码，注意D中VF返回类型是D*不是B*class B...{public:    virtual B* VF()    ...{        //....    }};class D:public B...{public:    virtual]]></description><category></category></item><item><title><![CDATA[关于nifty counters]]></title><link>https://blog.csdn.net/binwind/article/details/2147502</link><guid>https://blog.csdn.net/binwind/article/details/2147502</guid><author>binwind</author><pubDate>Tue, 04 Mar 2008 21:32:00 +0800</pubDate><description><![CDATA[上一篇blog里面列的关键字中的nifty counters又叫做schwarz counters,发现其他关键字用baidu search以下都有结果，但是nifty counter没有。找到了那本c++ faqs。写出关于nifty counters的使用方法                                    This is the most restr]]></description><category></category></item><item><title><![CDATA[[zz]The One: A Singleton Discussion]]></title><link>https://blog.csdn.net/binwind/article/details/2147462</link><guid>https://blog.csdn.net/binwind/article/details/2147462</guid><author>binwind</author><pubDate>Tue, 04 Mar 2008 21:13:00 +0800</pubDate><description><![CDATA[转贴一个老外的关于singleton的讨论,列出几个关键字，可以学习学习1.Meyers Singleton2. Nifty Counter3.Zerob Singleton4.function try blocks5.Double Checked Locking PatternAbstractThe singleton is a recurring pattern used by pr]]></description><category></category></item><item><title><![CDATA[匿名namespace,linkage,non-type argument]]></title><link>https://blog.csdn.net/binwind/article/details/2147312</link><guid>https://blog.csdn.net/binwind/article/details/2147312</guid><author>binwind</author><pubDate>Tue, 04 Mar 2008 19:22:00 +0800</pubDate><description><![CDATA[好久没有更新了。收集一下最近看过的几个问题的link关于匿名namespace的作用http://bbs.ustc.edu.cn/cgi/bbsgcon?bn=CPlusPlus&fn=G460B6463&num=326关于里面使用了 non-type argument来测试linkage的作法，因为是需要编译时就知道值的所以参数必须是external linkage的关于exte]]></description><category></category></item><item><title><![CDATA[ZZ C语言宏定义技巧]]></title><link>https://blog.csdn.net/binwind/article/details/2031793</link><guid>https://blog.csdn.net/binwind/article/details/2031793</guid><author>binwind</author><pubDate>Wed, 09 Jan 2008 13:27:00 +0800</pubDate><description><![CDATA[有价值收藏C语言宏定义技巧（常用宏定义）    写好C语言，漂亮的宏定义很重要，使用宏定义可以防止出错，提高可移植性，可读性，方便性 等等。下面列举一些***软件中常用得宏定义。。。。。。   1，防止一个头文件被重复包含 #ifndef COMDEF_H #define COMDEF_H   //头文件内容 #endif 2，重新定义一些类型，防止由于各种平台和编译器的不同，而产生的类型]]></description><category></category></item><item><title><![CDATA[virtual inherit内存布局问题]]></title><link>https://blog.csdn.net/binwind/article/details/1895179</link><guid>https://blog.csdn.net/binwind/article/details/1895179</guid><author>binwind</author><pubDate>Tue, 20 Nov 2007 18:33:00 +0800</pubDate><description><![CDATA[本文起因是由于bird在gfriend里面法的帖子c++问：一般normal derived class & virtual derived class 的memory storage有什么区别作出解释class A...{public:    int i;};class B1:virtual public A...{};class B2:virtual public A...{};cla]]></description><category></category></item><item><title><![CDATA[memset使用的一个错误]]></title><link>https://blog.csdn.net/binwind/article/details/1841569</link><guid>https://blog.csdn.net/binwind/article/details/1841569</guid><author>binwind</author><pubDate>Wed, 24 Oct 2007 12:51:00 +0800</pubDate><description><![CDATA[一般喜欢用memset来初始化一个内存块。所以在使用的时候可能操作如下int buffer[256];memset(buffer,0,sizeof(buffer));这是正确的但是如果    int f[256];    memset(f,1,sizeof(f));得到的结果不是f[0] = 1,而是f[0] = 16843009,注意因为memset的第一个参数是]]></description><category></category></item><item><title><![CDATA[c++中unicode utf8, gb2312还有url_encoding]]></title><link>https://blog.csdn.net/binwind/article/details/1785772</link><guid>https://blog.csdn.net/binwind/article/details/1785772</guid><author>binwind</author><pubDate>Fri, 14 Sep 2007 23:16:00 +0800</pubDate><description><![CDATA[ 我这里说的unicode指的是在windows下用wchar_t表示的那个unicode, 也就是L"xxx"中表示的那个unicode,也就是在编译选项里面用unicode 并且_T("XXX") 中的unicode下面的代码TCHAR english[] = _T("Hello");TCHAR chinese[] = _T("你好");char chineseA[] = "你好";c]]></description><category></category></item><item><title><![CDATA[本地密码加密]]></title><link>https://blog.csdn.net/binwind/article/details/1785723</link><guid>https://blog.csdn.net/binwind/article/details/1785723</guid><author>binwind</author><pubDate>Fri, 14 Sep 2007 22:29:00 +0800</pubDate><description><![CDATA[首先我们有一个安全假设，就是在同一台机器，同一个用户名，可以看到密码，否则无法破解密码，所以我们可以使用一对windows api进行加解密的操作，这对函数用当前机器和用户名生成一组密钥，对数据进行加解密，如果换一台机器或者改变一个用户名，或者2者都改变，将无法成功揭秘到msdn上查找这两个函数的相关介绍就可以了CryptUnprotectData,CryptProtectData]]></description><category></category></item><item><title><![CDATA[关于在office toolbar中自定义控件]]></title><link>https://blog.csdn.net/binwind/article/details/1785719</link><guid>https://blog.csdn.net/binwind/article/details/1785719</guid><author>binwind</author><pubDate>Fri, 14 Sep 2007 22:26:00 +0800</pubDate><description><![CDATA[ 我用英文写的东西，狗屁不通，也懒得翻译了，讲究看看吧As we know the word COM does not provide enough interface for us to customize the toolbar interface, we can only create four type of control: button, edit box, menu  (pop ]]></description><category></category></item><item><title><![CDATA[Registry Scripting]]></title><link>https://blog.csdn.net/binwind/article/details/1785713</link><guid>https://blog.csdn.net/binwind/article/details/1785713</guid><author>binwind</author><pubDate>Fri, 14 Sep 2007 22:21:00 +0800</pubDate><description><![CDATA[什么是Registry Scripting可以看一下的url, 简单的说就是一个往注册表里面写数据的脚本http://msdn2.microsoft.com/en-us/library/k32htktc(VS.80).aspx上面是Registry Scripting的使用，我们如何能够调用Registry Script呢。下面是我的代码，运行当前目录下的一个ATestAddin.rgs的]]></description><category></category></item></channel></rss>