摘要: MEMORYSTATUSEX statex;statex.dwLength = sizeof (statex);GlobalMemoryStatusEx (&statex); _tprintf (TEXT("There is %*ld percent of memory in use.\n"), ... 阅读全文
posted @ 2015-06-09 16:08 snker_tan 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 问题 在工作中经常会用到socket传输数据,例如客户端给服务器发送数据(双方约定了数据格式),在交测之前,自己用python写个接受数据的server,解析下拼成的数据格式是否正确。用python写比C语言简单很多。PS:实际上我是不会python的,工作中是C/C++开发,使用python纯... 阅读全文
posted @ 2015-06-04 11:08 snker_tan 阅读(6614) 评论(0) 推荐(1) 编辑
摘要: 全面介绍Windows内存管理机制及C++内存分配实例十分感谢MS社区的帖子,讲得很好~http://social.technet.microsoft.com/Forums/zh-CN/2219/thread/afc1269f-fe08-4dc7-bb94-c395d607e536(一):进程空间在... 阅读全文
posted @ 2015-06-03 14:02 snker_tan 阅读(809) 评论(0) 推荐(0) 编辑
摘要: 在写代码的过程中,打log肯定是少不了的,毕竟不能总靠调试来发现问题。log库的选用就很纠结了,成熟的log库非常多,log4cpp、log4cxx、poco.log、boost.log、glog等等,以前我用过log4cxx,觉得配置巨麻烦,一大段看着好纠结,不过用起来很舒服。这次我决定使用比较轻... 阅读全文
posted @ 2015-05-29 08:52 snker_tan 阅读(1756) 评论(0) 推荐(0) 编辑
摘要: 这里归纳了C API可使用的函数,并在下一节详细介绍了它们。函数 描述mysql_affected_rows() 返 回上次UPDATE、DELETE或INSERT查询更改/删除/插入的行数。mysql_autocommit() 切换 autocommit模式,ON/OFFmysql_change_... 阅读全文
posted @ 2015-05-20 11:02 snker_tan 阅读(255) 评论(0) 推荐(0) 编辑
摘要: Sunday, September 30th, 2007Twisted的WEB开发作者:gashero 目录1简介2Twisted技术体系3一个简单的例子4Twisted WEB Request参考4.1请求4.2响应4.3常量4.4HTTPChannel4.5HTTPFactory5比较完善的开发... 阅读全文
posted @ 2015-05-14 09:15 snker_tan 阅读(952) 评论(0) 推荐(0) 编辑
摘要: // IOCP.cpp : Defines the entry point for the console application.////#include "stdafx.h"#include #include #include #pragma comment(lib, "WS2_32.lib")... 阅读全文
posted @ 2015-04-17 14:23 snker_tan 阅读(180) 评论(0) 推荐(0) 编辑
摘要: // IOCP2.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include #pragma comment(lib, "WS2_... 阅读全文
posted @ 2015-04-17 14:21 snker_tan 阅读(423) 评论(0) 推荐(0) 编辑
摘要: [转]常用的python模块及安装方法 winhttp://chen-gengjia.iteye.com/admin/blogs/new?adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheetahcherrypy:一... 阅读全文
posted @ 2015-04-14 20:26 snker_tan 阅读(573) 评论(0) 推荐(0) 编辑
摘要: Python Twisted 框架中 socket通信转载:http://blog.csdn.net/jackyyen/archive/2009/04/13/4069887.aspx// 部分一Twisted使用了更多的基于事件的方式。要写一个基本的服务器,你要实现事件处理器,它处理诸如一个新的客户... 阅读全文
posted @ 2015-04-14 18:46 snker_tan 阅读(740) 评论(0) 推荐(0) 编辑