![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
windows
文章平均质量分 50
redeyerabbit
这个作者很懒,什么都没留下…
展开
-
线程池之预提交work item
#include "stdafx.h"#include #include #include #include using namespace std;VOID NTAPI SimpleCallback(PTP_CALLBACK_INSTANCE pInstance, PVOID pvContext){ cout << "[ " << GetCurrentThreadId() <<原创 2012-09-27 21:47:35 · 571 阅读 · 0 评论 -
lock free 之 stack
第二个例子(和第一个一样,没加注释,均是消费者需要判断生产者还在生产 吗),在实际中,可以考虑使用这个模型,比起我前面写的数据队列来说,用boost::lockfree可以大大减轻工作,这也是今年要努力掌握boost的一个理由#include #include #include #include boost::atomic_int producer_count(0);boost::a原创 2013-02-12 23:24:56 · 1334 阅读 · 0 评论 -
河南网通在线算号器
http://cnc.linuxso.com/index.php原创 2013-03-02 20:18:02 · 2548 阅读 · 0 评论 -
QT4相关
按configure -debug-and-release -fast -static -platform win32-msvc2010 -no-qt3support -script -scripttools -qt-zlib -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -qt-sql-sqlite -plugin-sql-sqlite -qt-原创 2013-04-06 14:16:51 · 1123 阅读 · 0 评论 -
Why does a statically built Qt use the dynamic Visual Studio runtime libraries ? Do I need to deploy
http://qt-project.org/faq/answer/why_does_a_statically_built_qt_use_the_dynamic_visual_studio_runtime_librar Qt is built using the -MD(d) switch, which links against the dynamic C/C++ runtime libr转载 2013-04-11 21:20:21 · 786 阅读 · 0 评论 -
MD5
摘自QT:qtbase\src\3rdparty\md5\md5.h及cpp/* * This is the header file for the MD5 message-digest algorithm. * The algorithm is due to Ron Rivest. This code was * written by Colin Plumb in 1993, no转载 2013-04-14 18:29:46 · 711 阅读 · 0 评论 -
qt5静态下需要链接的库
sicuucd.lib原创 2013-04-15 02:59:24 · 857 阅读 · 0 评论 -
记录Qt学习的一些经典
设置背景:a)用CSS的方法: QWidget w; //w.setText("abcdefg"); w.setStyleSheet("background-image:url(d:/main.jpg);"); w.setStyleSheet("background-image:url(这里也可以是资源中);"); w.show();b)用代码: //原创 2013-04-16 15:19:04 · 751 阅读 · 0 评论 -
编译Zlib注意
原文地址:http://www.cppblog.com/huyutian/archive/2010/07/24/121190.aspx,摘录于此,感觉很重要,给自己mark下。今年4月zlib发布了1.2.5版,修正了几个bug,增加了新功能(目前我还用不上).最近准备在自己的程序中用这个版本。结果怎么也编译通不过。折腾了我一整天才搞定,发现是两个小的设置没有弄好。哎。。。新的1.2.转载 2013-06-09 21:17:54 · 1418 阅读 · 0 评论 -
动态加载CListUI
CListUI* pList = new CListUI; pList->SetTextCallback(this); CListHeaderUI* pHeader = pList->GetHeader(); CListHeaderItemUI* pHeaderItem = new CListHeaderItemUI; pHeaderItem->SetText(L"原创 2013-06-14 17:20:13 · 2922 阅读 · 0 评论 -
MFC实现无标题栏的相对完美简易的方法
1、 修改窗口风格,去掉WM_SYSMENU风格。(MFC主窗口默认WS_OVERLAPPEDNWINDW风格,带有WS_THICKFRAME,这个风格很重要,如果没有,系统不会为你实现可以改变窗口大小的功能,需要自己实现,所以如果没有这个风格要设置。) ModifyStyle(/*WS_BORDER | WS_THICKFRAME*/WS_SYSMENU, 0)原创 2013-06-07 08:30:35 · 1926 阅读 · 0 评论 -
网址
http://www.libpng.org/pub/png/libpng.htmlhttp://bbs.csdn.net/topics/330037056http://daixinghe.blog.163.com/blog/static/1843615920112123187345/http://code.google.com/p/protobuf/QTextEdit中插入gif原创 2012-12-10 19:56:41 · 419 阅读 · 0 评论 -
boost look free
第一个例子,应该很简单,生产者和消费者模型// LockFree.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include #include boost::atomic_int producer_count(0);boost::atomic_int consumer_count(0);bo原创 2013-02-12 23:20:54 · 1885 阅读 · 2 评论 -
编译boost zlib
1下载zlib(http://www.zlib.net/)2,设置 zlib的路径(进入 dos 界面)set ZLIB_SOURCE=" E:/zlib-1.2.7"3编译bjam --toolset=msvc-9.0 --with-iostreams --build-type=complete注:zlib不需要提前编译原创 2012-12-01 14:46:56 · 5100 阅读 · 1 评论 -
线程池的计时器
#include "stdafx.h"#include #include #include #include using namespace std;void CALLBACK TimeoutCallback(PTP_CALLBACK_INSTANCE, PVOID pvContext, PTP_TIMER pTimer){ long* count = (long*原创 2012-09-27 22:17:28 · 615 阅读 · 0 评论 -
异步读写文件
// ConsoleApplication1.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include #include using namespace std;enum class FileIo{ FI_NONE, FI_READ, FI_WRITE,};const int buffer原创 2012-09-28 16:54:12 · 3559 阅读 · 2 评论 -
visual studio 2012发现的小bug
1、在xp上无法运行2、生成的OnCreate事件,预生成代码是乱码。3、Ribbon中自动生成的ID,泥马怎么会N个ID的数值一样(都泥马是32761)?害得我一遍又一遍的检查代码,找为什么不响应消息。原创 2012-10-19 14:59:49 · 517 阅读 · 0 评论 -
一个简易的线性队列
原来的判断算法有点问题,内存很快就耗尽,修改后如下: #include "stdafx.h"#include #include "DataQueue.h"#ifdef _DEBUG#include CRITICAL_SECTION g_cs;int g_forDebug = 0;#endif#ifndef __max#define __max(a,b) (((a) > (b原创 2012-10-17 08:22:21 · 483 阅读 · 0 评论 -
boost::streambuf简易测试
#include "stdafx.h"#define BOOST_ENABLE_ASSERT_HANDLER#include #include #include int _tmain(int argc, _TCHAR* argv[]){ boost::asio::streambuf sb; char buffer[] = "Hello,World!"; size_t len =原创 2012-11-15 14:47:43 · 3684 阅读 · 0 评论 -
命令转发(准备用到异步变同步模式)
#include "stdafx.h"#include #include #include #include #include #include #include #include using namespace std;using namespace boost;class ICommand{public: virtual void E原创 2012-11-17 19:22:29 · 693 阅读 · 0 评论 -
准备 使用 的 文件 格式
// testZlib.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"//#define BOOST_IOSTREAMS_SOURCE#include #include #include #include #include #include #include //#include #include #i原创 2012-12-01 19:07:00 · 526 阅读 · 0 评论 -
boost::智能指针奇怪的析构顺序。
// MyServer.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include #include #include #include #include #include #include #include "cell.h"using namespace std;原创 2012-11-17 21:51:39 · 1266 阅读 · 0 评论 -
zip文档中的例子
/* Compress from file source to file dest until EOF on source. def() returns Z_OK on success, Z_MEM_ERROR if memory could not be allocated for processing, Z_STREAM_ERROR if an invalid compressio转载 2012-12-10 15:10:17 · 468 阅读 · 0 评论 -
boost log的前端和后端
Sink由两部分组成:前端(frontend)和后端(backend)。以boost::log的教程为例:typedef boost::log::sinks::synchronous_sink text_sink;boost::shared_ptr sink = boost::make_shared();前端(例如原创 2014-07-02 11:52:31 · 3032 阅读 · 0 评论