<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>逍遥游！！</title>
	<atom:link href="http://blog.chinaacc.com/liuzhantao/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.chinaacc.com/liuzhantao</link>
	<description>乘天地之正，而御六气之辩!</description>
	<pubDate>Sun, 27 May 2012 22:26:47 +0000</pubDate>
	<generator>http://blog.chinaacc.com</generator>	<language>zh-cn</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>5个对网页特殊限制设置的技巧</title>
		<link>http://blog.chinaacc.com/liuzhantao/blog/20110922-2211583829081.html</link>
		<comments>http://blog.chinaacc.com/liuzhantao/blog/20110922-2211583829081.html#comments</comments>
		<pubDate>Thu, 22 Sep 2011 11:58:38 +0000</pubDate>
		<author>liuzhantao@chinaacc.com</author>
		<dc:creator>liuzhantao@chinaacc.com</dc:creator>
		
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://blog.chinaacc.com/liuzhantao/blog/20110922-2211583829081.html</guid>
		<description><![CDATA[


http://www.wangchao.net.cn/bbsdetail_553943.html
1.网页不允许脱机浏览
＜META HTTP-EQUIV="Pragma" CONTENT="no-cache"＞ 
2.文字不允许被打印
＜style＞
@media print {
.notptn {display:none;}
}
＜/style＞
＜div class="notptn"＞我不会被打印出来＜/div＞
3.网页内文字不允许被选种，既不能被CTRL+A，也不能被复制被粘贴。
＜body o]]></description>
			<content:encoded><![CDATA[


http://www.wangchao.net.cn/bbsdetail_553943.html
1.网页不允许脱机浏览
＜META HTTP-EQUIV="Pragma" CONTENT="no-cache"＞ 
2.文字不允许被打印
＜style＞
@media print {
.notptn {display:none;}
}
＜/style＞
＜div class="notptn"＞我不会被打印出来＜/div＞
3.网页内文字不允许被选种，既不能被CTRL+A，也不能被复制被粘贴。
＜body o]]></content:encoded>
			<wfw:commentRss>/liuzhantao/blog/20110922-2211583829081.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>ACE实现FTP客户端</title>
		<link>http://blog.chinaacc.com/liuzhantao/blog/20110905-0509492029081.html</link>
		<comments>http://blog.chinaacc.com/liuzhantao/blog/20110905-0509492029081.html#comments</comments>
		<pubDate>Mon, 05 Sep 2011 09:49:20 +0000</pubDate>
		<author>liuzhantao@chinaacc.com</author>
		<dc:creator>liuzhantao@chinaacc.com</dc:creator>
		
		<category><![CDATA[ace]]></category>

		<guid isPermaLink="false">http://blog.chinaacc.com/liuzhantao/blog/20110905-0509492029081.html</guid>
		<description><![CDATA[



http://blog.csdn.net/ishow99/article/details/4439169
FTP协议详解可以参考这里：http://blog.csdn.net/yxyhack/archive/2007/10/15/1826256.aspx，已经写得比较详细了；   以下是代码：   1、ffcs_ftp_client.h 
view plain

#ifndef    FTP_CLIENT_ACE_H  
#define    FTP_CLIENT_ACE_H  
  
#include <stdio.h>  
  
#include <string>  
#include <sstream><iostream><ace/OS.h><ace/Reactor.h><ace/SOCK_Acceptor.h><ace/SOCK_Connector.h><ace/SOCK_Stream.h><ace/Acceptor.h><ace/Connector.h><stdio.h><stdlib.h><ace/OS.h><ace/FILE_Addr.h><ace/FILE_Connector.h><ace/FILE_IO.h><ace/OS_NS_string.h><ace/OS_NS_stdio.h><< response << std::endl;  
    return true;  
}  
  
/*发送FTP命令*/  
bool FTPClient::Send(const std::string &#038;command)  
{  
    std::cout << command;  
    if (static_cast<ssize_t><< "USER " << this-><< "/r/n";  
    if (this-><< "PASS " << this-><< "/r/n";  
    if (this-><< "QUIT" << "/r/n";  
    if (this-><< "SYST" << "/r/n";  
    if (this-><< "NOOP" << "/r/n";  
    if (this->< 0 ? false : true;  
}  
  
/*修改远程路径，影响下载的远程文件所在路径 或者 上传的文件所保存的路径*/  
bool FTPClient::ChangeRemoteDir(const std::string &#038;dirname)  
{  
    std::stringstream CWD, PWD;  
    std::string  ftp_resp;  
  
    CWD << "CWD " << dirname << "/r/n";  
    if (this-><< "PWD" << "/r/n";  
    if (this->< 0) return false; /*文件不存在*/  
  
    /*修改类型*/  
    TYPE << "TYPE I" << "/r/n";  
    if (this-><< "PASV" << "/r/n";  
    if (this-><< d0 << "." << d1 << "." << d2 << "." << d3;  
    ftp_data_addr.set((p0 << 8) + p1, ip.str().c_str());  
  
    if (connector.connect(stream, ftp_data_addr, &#038;tv) == -1)  
    {  
        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%P&#124;%t) %p/n"), ACE_TEXT("connection failed")), false);  
    }  
  
    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P&#124;%t) connected to (%s:%d)/n/n"), this-><< "STOR " << filename << "/r/n";  
    if (this->< file_info.size_) &#038;& ((file_size=file_put.recv(file_cache, sizeof(file_cache))) ><< "Send " << filename << "(" << file_info.size_ << ") fail! Only sent (" << all_size <<")" << std::endl;  
        return false;  
    }  
  
    std::cout << "Send " << filename << "(" << all_size << ") OK!" << std::endl << std::endl;  
    return true;  
}  
  
/*下载文件*/  
bool FTPClient::GetFile(const std::string &#038;filename)  
{  
    std::stringstream PASV, RETR;  
    std::string  ftp_resp;  
  
    ACE_Time_Value  tv(MAX_CONN_TIMEOUT_SECOND, MAX_CONN_TIMEOUT_MILLISECOND);  
  
    int d0, d1, d2, d3, p0, p1;  
    std::stringstream ip;  
    ACE_INET_Addr ftp_data_addr;  
  
    ACE_SOCK_Stream     stream;  
    ACE_SOCK_Connector  connector;  
  
    ACE_FILE_IO file_put;  
    ACE_FILE_Connector file_con;  
    char file_cache[MAX_BUFSIZE];  
    int file_size, all_size;  
  
    PASV << "PASV" << "/r/n";  
    if (this-><< d0 << "." << d1 << "." << d2 << "." << d3;  
    ftp_data_addr.set((p0 << 8) + p1, ip.str().c_str());  
  
    if (connector.connect(stream, ftp_data_addr, &#038;tv) == -1)  
    {  
        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%P&#124;%t) %p/n"), ACE_TEXT("connection failed")), false);  
    }  
  
    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P&#124;%t) connected to (%s:%d)/n/n"), this-><< "RETR " << filename << "/r/n";  
    if (this-><< "Recv " << filename << "(" << all_size << ") OK!" << std::endl << std::endl;  
    return true;  
}  
  
/*名字列表*/  
bool FTPClient::NList(std::string &#038;pathlist, const std::string &#038;pathname)  
{  
    std::stringstream PASV, NLST;  
    std::string  ftp_resp;  
  
    ACE_Time_Value  tv(MAX_CONN_TIMEOUT_SECOND, MAX_CONN_TIMEOUT_MILLISECOND);  
  
    int d0, d1, d2, d3, p0, p1;  
    std::stringstream ip;  
    ACE_INET_Addr ftp_data_addr;  
  
    ACE_SOCK_Stream     stream;  
    ACE_SOCK_Connector  connector;  
  
    char file_cache[MAX_BUFSIZE] = {0};  
    int file_size;  
  
    PASV << "PASV" << "/r/n";  
    if (this-><< d0 << "." << d1 << "." << d2 << "." << d3;  
    ftp_data_addr.set((p0 << 8) + p1, ip.str().c_str());  
  
    if (connector.connect(stream, ftp_data_addr, &#038;tv) == -1)  
    {  
        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%P&#124;%t) %p/n"), ACE_TEXT("connection failed")), false);  
    }  
  
    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P&#124;%t) connected to (%s:%d)/n/n"), this-><< "NLST" << "/r/n";  
    }  
    else  
    {  
        NLST << "NLST " << pathname << "/r/n";  
    }  
    if (this-><< "PASV" << "/r/n";  
    if (this-><< d0 << "." << d1 << "." << d2 << "." << d3;  
    ftp_data_addr.set((p0 << 8) + p1, ip.str().c_str());  
  
    if (connector.connect(stream, ftp_data_addr, &#038;tv) == -1)  
    {  
        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%P&#124;%t) %p/n"), ACE_TEXT("connection failed")), false);  
    }  
  
    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P&#124;%t) connected to (%s:%d)/n/n"), this-><< "LIST " << pathname << "/r/n";  
    if (this-><< "RNFR " << srcname << "/r/n";  
    if (this-><< "RNTO " << dstname << "/r/n";  
    if (this-><stdio.h><stdlib.h><string><ace/OS.h>]]></description>
			<content:encoded><![CDATA[



http://blog.csdn.net/ishow99/article/details/4439169
FTP协议详解可以参考这里：http://blog.csdn.net/yxyhack/archive/2007/10/15/1826256.aspx，已经写得比较详细了；   以下是代码：   1、ffcs_ftp_client.h 
view plain

#ifndef    FTP_CLIENT_ACE_H  
#define    FTP_CLIENT_ACE_H  
  
#include <stdio.h>  
  
#include <string>  
#include <sstream><iostream><ace/OS.h><ace/Reactor.h><ace/SOCK_Acceptor.h><ace/SOCK_Connector.h><ace/SOCK_Stream.h><ace/Acceptor.h><ace/Connector.h><stdio.h><stdlib.h><ace/OS.h><ace/FILE_Addr.h><ace/FILE_Connector.h><ace/FILE_IO.h><ace/OS_NS_string.h><ace/OS_NS_stdio.h><< response << std::endl;  
    return true;  
}  
  
/*发送FTP命令*/  
bool FTPClient::Send(const std::string &#038;command)  
{  
    std::cout << command;  
    if (static_cast<ssize_t><< "USER " << this-><< "/r/n";  
    if (this-><< "PASS " << this-><< "/r/n";  
    if (this-><< "QUIT" << "/r/n";  
    if (this-><< "SYST" << "/r/n";  
    if (this-><< "NOOP" << "/r/n";  
    if (this->< 0 ? false : true;  
}  
  
/*修改远程路径，影响下载的远程文件所在路径 或者 上传的文件所保存的路径*/  
bool FTPClient::ChangeRemoteDir(const std::string &#038;dirname)  
{  
    std::stringstream CWD, PWD;  
    std::string  ftp_resp;  
  
    CWD << "CWD " << dirname << "/r/n";  
    if (this-><< "PWD" << "/r/n";  
    if (this->< 0) return false; /*文件不存在*/  
  
    /*修改类型*/  
    TYPE << "TYPE I" << "/r/n";  
    if (this-><< "PASV" << "/r/n";  
    if (this-><< d0 << "." << d1 << "." << d2 << "." << d3;  
    ftp_data_addr.set((p0 << 8) + p1, ip.str().c_str());  
  
    if (connector.connect(stream, ftp_data_addr, &#038;tv) == -1)  
    {  
        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%P&#124;%t) %p/n"), ACE_TEXT("connection failed")), false);  
    }  
  
    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P&#124;%t) connected to (%s:%d)/n/n"), this-><< "STOR " << filename << "/r/n";  
    if (this->< file_info.size_) &#038;& ((file_size=file_put.recv(file_cache, sizeof(file_cache))) ><< "Send " << filename << "(" << file_info.size_ << ") fail! Only sent (" << all_size <<")" << std::endl;  
        return false;  
    }  
  
    std::cout << "Send " << filename << "(" << all_size << ") OK!" << std::endl << std::endl;  
    return true;  
}  
  
/*下载文件*/  
bool FTPClient::GetFile(const std::string &#038;filename)  
{  
    std::stringstream PASV, RETR;  
    std::string  ftp_resp;  
  
    ACE_Time_Value  tv(MAX_CONN_TIMEOUT_SECOND, MAX_CONN_TIMEOUT_MILLISECOND);  
  
    int d0, d1, d2, d3, p0, p1;  
    std::stringstream ip;  
    ACE_INET_Addr ftp_data_addr;  
  
    ACE_SOCK_Stream     stream;  
    ACE_SOCK_Connector  connector;  
  
    ACE_FILE_IO file_put;  
    ACE_FILE_Connector file_con;  
    char file_cache[MAX_BUFSIZE];  
    int file_size, all_size;  
  
    PASV << "PASV" << "/r/n";  
    if (this-><< d0 << "." << d1 << "." << d2 << "." << d3;  
    ftp_data_addr.set((p0 << 8) + p1, ip.str().c_str());  
  
    if (connector.connect(stream, ftp_data_addr, &#038;tv) == -1)  
    {  
        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%P&#124;%t) %p/n"), ACE_TEXT("connection failed")), false);  
    }  
  
    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P&#124;%t) connected to (%s:%d)/n/n"), this-><< "RETR " << filename << "/r/n";  
    if (this-><< "Recv " << filename << "(" << all_size << ") OK!" << std::endl << std::endl;  
    return true;  
}  
  
/*名字列表*/  
bool FTPClient::NList(std::string &#038;pathlist, const std::string &#038;pathname)  
{  
    std::stringstream PASV, NLST;  
    std::string  ftp_resp;  
  
    ACE_Time_Value  tv(MAX_CONN_TIMEOUT_SECOND, MAX_CONN_TIMEOUT_MILLISECOND);  
  
    int d0, d1, d2, d3, p0, p1;  
    std::stringstream ip;  
    ACE_INET_Addr ftp_data_addr;  
  
    ACE_SOCK_Stream     stream;  
    ACE_SOCK_Connector  connector;  
  
    char file_cache[MAX_BUFSIZE] = {0};  
    int file_size;  
  
    PASV << "PASV" << "/r/n";  
    if (this-><< d0 << "." << d1 << "." << d2 << "." << d3;  
    ftp_data_addr.set((p0 << 8) + p1, ip.str().c_str());  
  
    if (connector.connect(stream, ftp_data_addr, &#038;tv) == -1)  
    {  
        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%P&#124;%t) %p/n"), ACE_TEXT("connection failed")), false);  
    }  
  
    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P&#124;%t) connected to (%s:%d)/n/n"), this-><< "NLST" << "/r/n";  
    }  
    else  
    {  
        NLST << "NLST " << pathname << "/r/n";  
    }  
    if (this-><< "PASV" << "/r/n";  
    if (this-><< d0 << "." << d1 << "." << d2 << "." << d3;  
    ftp_data_addr.set((p0 << 8) + p1, ip.str().c_str());  
  
    if (connector.connect(stream, ftp_data_addr, &#038;tv) == -1)  
    {  
        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%P&#124;%t) %p/n"), ACE_TEXT("connection failed")), false);  
    }  
  
    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P&#124;%t) connected to (%s:%d)/n/n"), this-><< "LIST " << pathname << "/r/n";  
    if (this-><< "RNFR " << srcname << "/r/n";  
    if (this-><< "RNTO " << dstname << "/r/n";  
    if (this-><stdio.h><stdlib.h><string><ace/OS.h>]]></content:encoded>
			<wfw:commentRss>/liuzhantao/blog/20110905-0509492029081.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>定位错误：glibc detected :double free or corruption</title>
		<link>http://blog.chinaacc.com/liuzhantao/blog/20110831-3116051629081.html</link>
		<comments>http://blog.chinaacc.com/liuzhantao/blog/20110831-3116051629081.html#comments</comments>
		<pubDate>Wed, 31 Aug 2011 16:05:16 +0000</pubDate>
		<author>liuzhantao@chinaacc.com</author>
		<dc:creator>liuzhantao@chinaacc.com</dc:creator>
		
		<category><![CDATA[c]]></category>

		<guid isPermaLink="false">http://blog.chinaacc.com/liuzhantao/blog/20110831-3116051629081.html</guid>
		<description><![CDATA[



http://socol.iteye.com/blog/695872
定位free/malloc的位置和参数，可以在对应的.cpp/.h文件中添加：
 


C代码  <img  src="http://socol.iteye.com/images/icon_star.png" alt="收藏代码">



#include ＜stdio.h＞  
    #include ＜stdlib.h＞  
      
      
      
    void *  
    debug_malloc(size_t size, const char *file, int line, const char *func)  
   ]]></description>
			<content:encoded><![CDATA[



http://socol.iteye.com/blog/695872
定位free/malloc的位置和参数，可以在对应的.cpp/.h文件中添加：
 


C代码  <img  src="http://socol.iteye.com/images/icon_star.png" alt="收藏代码">



#include ＜stdio.h＞  
    #include ＜stdlib.h＞  
      
      
      
    void *  
    debug_malloc(size_t size, const char *file, int line, const char *func)  
   ]]></content:encoded>
			<wfw:commentRss>/liuzhantao/blog/20110831-3116051629081.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>虚拟地址</title>
		<link>http://blog.chinaacc.com/liuzhantao/blog/20110805-0514502029081.html</link>
		<comments>http://blog.chinaacc.com/liuzhantao/blog/20110805-0514502029081.html#comments</comments>
		<pubDate>Fri, 05 Aug 2011 14:50:20 +0000</pubDate>
		<author>liuzhantao@chinaacc.com</author>
		<dc:creator>liuzhantao@chinaacc.com</dc:creator>
		
		<category><![CDATA[系统]]></category>

		<guid isPermaLink="false">http://blog.chinaacc.com/liuzhantao/blog/20110805-0514502029081.html</guid>
		<description><![CDATA[


在电脑的专用术语中，虚拟地址（Virtual Address）标识一个非物理的实体地址。这个术语常用在虚拟内存和虚拟网络地址当中。　　由于Windows程序时运行在386保护模式下，这样程序访问存储器所使用的逻辑地址称为虚拟地址，与实地址模式下的分段地址类似，虚拟地址也可以写为“段：偏移量”的形式，这里的段是指段选择器。　　Windows 2000 使用基于分页机制的虚拟内存。每个进程有4GB的虚拟地址空间。基于分页机制，这4GB地址空间的一些部分被映射了物理内存，一些部分映射硬盘上的交换文件，一些部分什么也没有映射。程序中使用的都是4GB地址空间中的虚拟地址。而访问物理内存，需要]]></description>
			<content:encoded><![CDATA[


在电脑的专用术语中，虚拟地址（Virtual Address）标识一个非物理的实体地址。这个术语常用在虚拟内存和虚拟网络地址当中。　　由于Windows程序时运行在386保护模式下，这样程序访问存储器所使用的逻辑地址称为虚拟地址，与实地址模式下的分段地址类似，虚拟地址也可以写为“段：偏移量”的形式，这里的段是指段选择器。　　Windows 2000 使用基于分页机制的虚拟内存。每个进程有4GB的虚拟地址空间。基于分页机制，这4GB地址空间的一些部分被映射了物理内存，一些部分映射硬盘上的交换文件，一些部分什么也没有映射。程序中使用的都是4GB地址空间中的虚拟地址。而访问物理内存，需要]]></content:encoded>
			<wfw:commentRss>/liuzhantao/blog/20110805-0514502029081.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>爱由心生</title>
		<link>http://blog.chinaacc.com/liuzhantao/blog/20110711-1118590129081.html</link>
		<comments>http://blog.chinaacc.com/liuzhantao/blog/20110711-1118590129081.html#comments</comments>
		<pubDate>Mon, 11 Jul 2011 18:59:01 +0000</pubDate>
		<author>liuzhantao@chinaacc.com</author>
		<dc:creator>liuzhantao@chinaacc.com</dc:creator>
		
		<category><![CDATA[默认分类]]></category>

		<guid isPermaLink="false">http://blog.chinaacc.com/liuzhantao/blog/20110711-1118590129081.html</guid>
		<description><![CDATA[


你我曾经深爱过的某人，无非也就是芸芸众生中的一个，只是爱由心生，自以为他/她会是今生最爱，当你感觉你爱他，你用心去爱就觉的他/她最珍贵，当万物归原，生命仍然继续，他/她无非也就是我们生命中的一个过客。 我们根本无法确定哪一个才是今生最爱，如果不懂得去珍惜，你身边这个爱你的/你爱的人，在某一天，也会成为你身边的过客。 找一个你爱的人不容易，找一个爱你的人也不容易。如果无法确定哪一个才是你最爱的人，何不在自己成为别人的爱人的时候珍惜这份感情？爱由心生，你告诉自己是爱他/她的，自然就可以爱

]]></description>
			<content:encoded><![CDATA[


你我曾经深爱过的某人，无非也就是芸芸众生中的一个，只是爱由心生，自以为他/她会是今生最爱，当你感觉你爱他，你用心去爱就觉的他/她最珍贵，当万物归原，生命仍然继续，他/她无非也就是我们生命中的一个过客。 我们根本无法确定哪一个才是今生最爱，如果不懂得去珍惜，你身边这个爱你的/你爱的人，在某一天，也会成为你身边的过客。 找一个你爱的人不容易，找一个爱你的人也不容易。如果无法确定哪一个才是你最爱的人，何不在自己成为别人的爱人的时候珍惜这份感情？爱由心生，你告诉自己是爱他/她的，自然就可以爱

]]></content:encoded>
			<wfw:commentRss>/liuzhantao/blog/20110711-1118590129081.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>linux c多线程示例</title>
		<link>http://blog.chinaacc.com/liuzhantao/blog/20110707-0715223729081.html</link>
		<comments>http://blog.chinaacc.com/liuzhantao/blog/20110707-0715223729081.html#comments</comments>
		<pubDate>Thu, 07 Jul 2011 15:22:37 +0000</pubDate>
		<author>liuzhantao@chinaacc.com</author>
		<dc:creator>liuzhantao@chinaacc.com</dc:creator>
		
		<category><![CDATA[c]]></category>

		<guid isPermaLink="false">http://blog.chinaacc.com/liuzhantao/blog/20110707-0715223729081.html</guid>
		<description><![CDATA[


#include <pthread.h>#include <stdio.h>#include <stdlib.h>//gcc -o p p.c -lpthreadvoid *thr_fn1(void *arg){    printf("thread 1 returning\n");    return((void *)221);}void *thr_fn2(void *arg){    printf("thread 2 exiting\n");    pthread_exit((void *)112);}int main(void){    int         err;    pthread_t   tid1, tid2; ]]></description>
			<content:encoded><![CDATA[


#include <pthread.h>#include <stdio.h>#include <stdlib.h>//gcc -o p p.c -lpthreadvoid *thr_fn1(void *arg){    printf("thread 1 returning\n");    return((void *)221);}void *thr_fn2(void *arg){    printf("thread 2 exiting\n");    pthread_exit((void *)112);}int main(void){    int         err;    pthread_t   tid1, tid2; ]]></content:encoded>
			<wfw:commentRss>/liuzhantao/blog/20110707-0715223729081.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>c++模拟post</title>
		<link>http://blog.chinaacc.com/liuzhantao/blog/20110707-0713531829081.html</link>
		<comments>http://blog.chinaacc.com/liuzhantao/blog/20110707-0713531829081.html#comments</comments>
		<pubDate>Thu, 07 Jul 2011 13:53:18 +0000</pubDate>
		<author>liuzhantao@chinaacc.com</author>
		<dc:creator>liuzhantao@chinaacc.com</dc:creator>
		
		<category><![CDATA[c]]></category>

		<guid isPermaLink="false">http://blog.chinaacc.com/liuzhantao/blog/20110707-0713531829081.html</guid>
		<description><![CDATA[


#include <curl/curl.h>#include <string>#include <iostream>using namespace std;#define HTTP_RESULT_LEN 10240static size_t get_ret( char *ptr, size_t size, size_t nmemb, void *stream){        int iLen = size*nmemb;        iLen = iLen > (HTTP_RESULT_LEN-1)?(HTTP_RESULT_LEN-1):iLen;        strncpy((char*)stream, (char*)ptr, iLen);        ((char*)stream)[iLen] = 0;        return 0;}int main(){        string data = "aa=bb&#038;cc=dd";        string URL = "http://lzt.operation.chinapen.com/test.php";        char buffer[HTTP_RESULT_LEN] = {0};        CURL *curl = curl_easy_init();        if (curl)        {                curl_easy_setopt(curl, CURLOPT_URL,URL.c_str());                curl_easy_setopt(curl, CURLOPT_POST, 1);                curl_easy_setopt(curl, CURLOPT_POSTFIELDS,data.c_str());                curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE,data.length());                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,get_ret);                curl_easy_setopt(curl, CURLOPT_WRITEDATA,buffer);                curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10);                curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10);                curl_easy_perform(curl);                CURLcode retcode;                int code = curl_easy_getinfo(curl,CURLINFO_RESPONSE_CODE,&#038;retcode);                if (200 != retcode &#124;&#124; code!= CURLE_OK)                {                        cout<<"failed"<<endl;                }                //int iRet = atoi(buffer);                cout<<buffer<<endl;                curl_easy_cleanup(curl);        }        return 0;}

]]></description>
			<content:encoded><![CDATA[


#include <curl/curl.h>#include <string>#include <iostream>using namespace std;#define HTTP_RESULT_LEN 10240static size_t get_ret( char *ptr, size_t size, size_t nmemb, void *stream){        int iLen = size*nmemb;        iLen = iLen > (HTTP_RESULT_LEN-1)?(HTTP_RESULT_LEN-1):iLen;        strncpy((char*)stream, (char*)ptr, iLen);        ((char*)stream)[iLen] = 0;        return 0;}int main(){        string data = "aa=bb&#038;cc=dd";        string URL = "http://lzt.operation.chinapen.com/test.php";        char buffer[HTTP_RESULT_LEN] = {0};        CURL *curl = curl_easy_init();        if (curl)        {                curl_easy_setopt(curl, CURLOPT_URL,URL.c_str());                curl_easy_setopt(curl, CURLOPT_POST, 1);                curl_easy_setopt(curl, CURLOPT_POSTFIELDS,data.c_str());                curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE,data.length());                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,get_ret);                curl_easy_setopt(curl, CURLOPT_WRITEDATA,buffer);                curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10);                curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10);                curl_easy_perform(curl);                CURLcode retcode;                int code = curl_easy_getinfo(curl,CURLINFO_RESPONSE_CODE,&#038;retcode);                if (200 != retcode &#124;&#124; code!= CURLE_OK)                {                        cout<<"failed"<<endl;                }                //int iRet = atoi(buffer);                cout<<buffer<<endl;                curl_easy_cleanup(curl);        }        return 0;}

]]></content:encoded>
			<wfw:commentRss>/liuzhantao/blog/20110707-0713531829081.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>如果我给你带来的只是灾难，你还愿意牵着我的手么……</title>
		<link>http://blog.chinaacc.com/liuzhantao/blog/20110707-0712452429081.html</link>
		<comments>http://blog.chinaacc.com/liuzhantao/blog/20110707-0712452429081.html#comments</comments>
		<pubDate>Thu, 07 Jul 2011 12:45:24 +0000</pubDate>
		<author>liuzhantao@chinaacc.com</author>
		<dc:creator>liuzhantao@chinaacc.com</dc:creator>
		
		<category><![CDATA[默认分类]]></category>

		<guid isPermaLink="false">http://blog.chinaacc.com/liuzhantao/blog/20110707-0712452429081.html</guid>
		<description><![CDATA[




]]></description>
			<content:encoded><![CDATA[




]]></content:encoded>
			<wfw:commentRss>/liuzhantao/blog/20110707-0712452429081.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>谁来忘记，谁来感激，谁来相视一笑便转过身去，谁来把名字留下而后再见无期……</title>
		<link>http://blog.chinaacc.com/liuzhantao/blog/20110706-0610332429081.html</link>
		<comments>http://blog.chinaacc.com/liuzhantao/blog/20110706-0610332429081.html#comments</comments>
		<pubDate>Wed, 06 Jul 2011 10:33:24 +0000</pubDate>
		<author>liuzhantao@chinaacc.com</author>
		<dc:creator>liuzhantao@chinaacc.com</dc:creator>
		
		<category><![CDATA[默认分类]]></category>

		<guid isPermaLink="false">http://blog.chinaacc.com/liuzhantao/blog/20110706-0610332429081.html</guid>
		<description><![CDATA[





谁来忘记，谁来感激，谁来相视一笑便转过身去，谁来把名字留下而后再见无期……

]]></description>
			<content:encoded><![CDATA[





谁来忘记，谁来感激，谁来相视一笑便转过身去，谁来把名字留下而后再见无期……

]]></content:encoded>
			<wfw:commentRss>/liuzhantao/blog/20110706-0610332429081.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>所谓缘分</title>
		<link>http://blog.chinaacc.com/liuzhantao/blog/20110629-2915305629081.html</link>
		<comments>http://blog.chinaacc.com/liuzhantao/blog/20110629-2915305629081.html#comments</comments>
		<pubDate>Wed, 29 Jun 2011 15:30:56 +0000</pubDate>
		<author>liuzhantao@chinaacc.com</author>
		<dc:creator>liuzhantao@chinaacc.com</dc:creator>
		
		<category><![CDATA[默认分类]]></category>

		<guid isPermaLink="false">http://blog.chinaacc.com/liuzhantao/blog/20110629-2915305629081.html</guid>
		<description><![CDATA[


一个太注重缘分的人，不能指望其能有多高的审美眼光！

]]></description>
			<content:encoded><![CDATA[


一个太注重缘分的人，不能指望其能有多高的审美眼光！

]]></content:encoded>
			<wfw:commentRss>/liuzhantao/blog/20110629-2915305629081.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>array(0) {
}
here
