自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 nodejs提取网页内容

今天,在公司想用nodejs提取一下http://msdn.microsoft.com/zh-CN/library/windows/desktop/hh802935(v=vs.85).aspx 里面的API函数列表,做一个帮助文档。谁知道,公司电脑上安装的是vs2005,在安装jsdom进行编译的时候一直报错,node-jquery也是一样。晚上,回来了在自己电脑上又试了一遍,笔记本上装的

2014-12-30 00:25:27 6410

原创 windows下使用virtualenv进行多版本python共存

今天,想写个nodejs下载网页的脚本,打算用node-curl实现。运行npm install node-curl的时候,编译的时候报错,提示不能用python3.4,只能用2.5~3.0之间的python。网上说virtualenv能解决这种多版本python共存的问题,这么好的东西,赶紧下下来试试吧。cd /d C:\Python34\Scriptseasy_install v

2014-12-29 14:36:08 8126

原创 阅读nginx源码_win32

本打算周末好好看看nginx源码的,却玩了两天的游戏。还没有开始编译nginx,cygwin还没装好,mirror不给力啊。过了一遍http://blog.csdn.net/kenbinzhang/article/category/603177关于nginx系列的文章,对nginx工程结构有了个大致的印象。int ngx_cdecl main(int argc, char *const *

2014-12-28 23:47:13 1064

原创 coroutine协程

对协程还没有很深刻的认识,先贴上几个例子吧。lua编写的协程例子:yield的参数由resume返回了,resume的参数由yield返回。。function foo (a) print("foo", a) return coroutine.yield(2*a)end co = coroutine.create(function (a,b) print("co-bod

2014-12-26 23:22:48 486

原创 win32com调用ATL编写的COM组件

IDL文件import "oaidl.idl";import "ocidl.idl";[ object, uuid(B325C169-61FA-4513-9DB1-0CC231CCB633), dual, nonextensible, helpstring("IComTestClass Interface"), pointer_default(unique)]interf

2014-12-25 10:39:36 2421

原创 VBS调用ATL编写的COM组件

参考文章:http://blog.csdn.net/collin1211/article/details/1864624不使用连接点,而是使用属性来处理事件回调。IDL文件import "oaidl.idl";import "ocidl.idl";[ object, uuid(7E153966-BF67-4F02-BE64-80CB780A2EEF), dual, n

2014-12-24 21:19:59 3775

原创 vba调用vs2005使用atl开发的com组件

1、新建工程New -- Project -- ATL Project勾选Allow merging of proxy/stub code2、添加接口右键工程 --  Add  --  ATL Simple Object3、添加接口函数类视图中,右键接口 --  Add  --  Add Method4、添加事件类视图中,展开类型库,

2014-12-24 20:17:02 2839

原创 windows下使用vs2005编译libevent 2.0.21

使用makefile编译1、打开vs2005编译控制台。cd /d E:\an_ui\Demo\Projects\libevent-2.0.21nmake /F Makefile.nmake cleannmake /F Makefile.nmake使用工程编译两个工程都要加头文件目录:$(SolutionDir)$(SolutionDir)\include

2014-12-22 14:33:02 674

原创 evhttp实现的http服务器

/* A trivial static http webserver using Libevent's evhttp. This is not the best code in the world, and it does some fairly stupid stuff that you would never want to do in a production webserve

2014-12-22 14:14:19 12813

转载 libevent里的timer使用

/* * XXX This sample code was once meant to show how to use the basic Libevent * interfaces, but it never worked on non-Unix platforms, and some of the * interfaces have changed since it was first

2014-12-22 10:39:55 848

转载 bufferevent实现的echoserver

// echoserver.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include #include #include #include #include static void echo_rea

2014-12-22 10:23:35 514

转载 bufferevent实现的简易http client

工程链接库:libevent_core.lib Ws2_32.lib libevent_extras.lib

2014-12-22 10:10:32 1867

原创 win7下libevent实现的rot13服务器

// libev_rot13.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #define MAX_LINE 16384void do_read(evutil_socket_t fd, short events, void *arg)

2014-12-19 18:07:50 679

原创 win7+VS2005编译libevent-2.0.21-stable

编译方法还是很简单的。1、打开vs2005工具命令行。C:\Program Files (x86)\Microsoft Visual Studio 8\VC>cd /d E:\an_ui\Demo\Projects\libevent-2.0.21E:\an_ui\Demo\Projects\libevent-2.0.21>nmake Makefile.nmake2、编译输出l

2014-12-19 17:17:26 1061

原创 python用http.server实现的http服务器

import osimport shutilfrom io import StringIOfrom pymongo import MongoClient, ASCENDINGfrom urllib.parse import urlsplit, parse_qsfrom http.server import HTTPServer, BaseHTTPRequestHandlerclien

2014-12-19 16:47:22 2992

原创 PHP使用SyntaxHighlighter显示xml文件

<?phpheader("Content-Type: text/html; charset=gb2312");if(!isset($_GET["key"])) { header("Location: /skinhelp/index.php"); exit;}?> <?php echo "皮肤库帮助"?> <?php$filepath = $_SER

2014-12-19 15:53:09 1091

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除