`
byytj
  • 浏览: 48565 次
  • 来自: ...
文章分类
社区版块
存档分类
最新评论
文章列表
zhang_jianhua-hz@vanceinfo.com和liu_xi-linda@vanceinfo.com   #pragma once#include <stdio.h>#include <string>#include <list>#include <iostream>#import "c:\Program Files\Common Files\System\ADO\msado15.dll"  no_namespace rename("EOF", "adoEOF")us ...
 //ConnObj *co = ConnPool::GetInstance()->GetConn(); //_ConnectionPtr m_pConnection = co->conn;   #pragma once#include <stdio.h>#include <string>#include <list>#include <iostream>#import "c:\Program Files\Common Files\System\ADO\msado15.dll"  no_namespace r ...
在使用curl做POST的时候, 当要POST的数据大于1024字节的时候, curl并不会直接就发起POST请求, 而是会分为俩步,   1. 发送一个请求, 包含一个Expect:100-continue, 询问Server使用愿意接受数据   2. 接收到Server返回的100-continue应答以后, 才把数据POST给Server  这是libcurl的行为. 具体的RFC相关描述: http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3 于是,这样就有了一个问题, 并不是所有的Server都会正 ...
#include <string>#include <iostream> #include <curl/curl.h>#include <sys/time.h>#include <unistd.h> using namespace std; size_t curl_writer(void *buffer, size_t size, size_t count, void * stream){    std::string * pStream = static_cast<std::string *>(stream);    ...
http://hi.baidu.com/ah__fu/item/fca037dd57c73b57d73aae49 http://technet.microsoft.com/zh-cn/magazine/bb385216(zh-tw,VS.90).aspx   http://download.csdn.net/download/guestcode/2394123
恼人的boost::asio::async_read_until 2012-12-04 10:09:51     我来说两句       收藏    我要投稿 最近为服务器添加XMLSocket与Flash进行通信, 这种协议其实是一种以\0结尾的字符串协议, 为了让asio兼容此协议, 我从文档找到了async_read_until异步读取系列, 这个函数的原理时, 给定一个streambuf, 和一个分隔符, asio碰到分隔符时返回, 你可以从streambuf中读取需要的数据. 看似很简单, 我很快写好一个demo与Flash进行通信, 结果发现在一个echo逻辑速度很快时 ...
http://blog.csdn.net/gamecreating/article/details/7698719   http://blog.csdn.net/zunceng/article/details/7742788    析构过程中内存相关错误的绝大多数原因 今天记录一下长久以来屡次犯的错,每次都是换一种方法编码来绕过这个问题实现功能的,因为这个问题太过隐蔽,导致今天才发现其中真正的原因...下面进行问题描述: 1std::map<std::string, Value> keyValue; // 在函数内部分配的堆栈对象(局部变量)2ReadData(k ...
char ConvertHexChar(char ch){ if((ch>='0')&&(ch <='9')) return ch-0x30; else if((ch>='A')&&(ch <='F')) return ch-'A'+10; else if((ch>='a')&&(ch <='f')) return ch-'a'+10; else return (-1);}int String2Hex(string str,char a[]) //返回的是a的长度{ int hexdata,lowhexdata; ...
// t4.cpp : Defines the entry point for the console application.    //       #include "stdafx.h"       #include <string>    #include <iostream>    #include <cctype>    #include <algorithm>       /*  入口参数:pSrc  源十六进制数据  出口参数:dest  存放运算结果     ...
///////////////////////////////// http://mingcn.cnblogs.com ////  xelz CopyRight (c) 2010  ///////////////////////////////// #include "stdafx.h"#include "string.h"#include "AES.h" AES::AES(unsigned char* key){ unsigned char sBox[] = { /*  0    1    2    3    4    5    ...
对于 I/O 操作较多的程序,这样的不一致就意味着需要进行大量的工程工作才能在平台间移植代码。正是因为这个原因,我们才引入了 Boost Filesystem Library。这个广泛使用的库提供了安全、可移植且易用的 C++ 接口,用于执行文件 ...
#include <boost/optional.hpp>   optional<path>   path dir;   typedef recursive_directory_iterator rd_iterator;   for(rd_iterator pos(dir);pos!=end;++pos) { if(!is_directory(*pos) && pos->path().filename()==filename) { ... } }
一.同步定时器,如下: #include <iostream> #include <boost/asio.hpp>#include <boost/date_time/posix_time/posix_time.hpp>int main(int argc,char** argv){    boost::asio::io_service ios;    boost::asio::deadline_timert(ios,boost::posix_time::seconds(2));    std::cout<<t.expires_at()<&l ...
#include "StdAfx.h"#include "ConnPool.h"#include <algorithm> #define MIN_COUNT 10#define MAX_COUNT 100HANDLE hMutex; ConnPool::ConnPool(void){ this->Init();} ConnPool::~ConnPool(void){} ConnPool* ConnPool::cpInst = NULL;ConnPool* ConnPool::GetInstance(){ if(NULL==cpIn ...
http://www.iteye.com/topic/477412   #include "StdAfx.h"#include "TaskQueue.h" #include <process.h>#include <boost/thread/shared_mutex.hpp>#include <boost/thread.hpp> using namespace std; typedef boost::shared_mutex rwmutex;typedef boost::shared_lock<rwmut ...
Global site tag (gtag.js) - Google Analytics