- 博客(21)
- 资源 (85)
- 收藏
- 关注
原创 lua coroutine 异步转同步
Global = {taskList = {}}Global.loadAsync = function(param, callback)Global.taskList[#Global.taskList + 1] = {param, callback}endGlobal.update = function()if #Global.taskList > 0 then
2016-06-08 20:54:36
2192
原创 python tornado coroutine 原理
import functoolsimport timeclass Loop: def __init__(self): self.queue = [] self.stoped = False def call_later(self, delay, callback): self.queue.append({"when": time
2015-11-27 18:28:27
914
原创 go TCP 测试
package mainimport ("fmt""net""os""time""encoding/binary""bytes""compress/zlib""io/ioutil""runtime"// "github.com/ugorji/go/codec")var ConnectionCount int = 0fu
2014-03-25 15:59:32
1239
原创 PyQt: layout widgets
# coding: gbkfrom PyQt4.QtCore import *from PyQt4.QtGui import *import sysapp = QApplication(sys.argv)window = QWidget()window.setWindowTitle("测试")layout = QVBoxLayout()window.
2012-09-10 23:39:23
1027
原创 PyQt: Hello world
# coding: gbkfrom PyQt4.QtCore import *from PyQt4.QtGui import *import sysapp = QApplication(sys.argv)#label = QLabel("Hello world!")label = QLabel("HelloQt!")label.show()sys.e
2012-09-10 23:31:02
1075
原创 Apk decode
# coding: gbkfrom struct import *import sysoutput = open("D:\\Trace.txt", "w", encoding = "gbk")#sys.stdout = output#sys.stderr = outputdef u32_rshift(value, count): """
2012-08-17 19:36:04
2461
1
原创 新浪微博
https://api.weibo.com/oauth2/default.html1. 引导需要授权的用户到如下地址:https://api.weibo.com/oauth2/authorize?client_id=xxx&response_type=code&redirect_uri=https://api.weibo.com/oauth2/default.html2. 如果
2012-07-05 21:10:29
2304
原创 腾讯微博
首先需要进行鉴权操作一.鉴权操作过程:第1步:请求code网址:https://open.t.qq.com/cgi-bin/oauth2/authorize方式:GET参数:应用ID, 回调网址返回:用户登录并跳转回调网址, code、openid、openkey实例:请求:https://open.t.qq.com/cgi-bin/oauth2/a
2012-07-05 17:30:47
2389
原创 Python + ctype 枚举windows设备树(加强版)
from ctypes import *cfg = windll.cfgmgr32adv = windll.Advapi32CRVALS = { 0x00000000:"CR_SUCCESS", 0x00000001:"CR_DEFAULT", 0x00000002:"CR_OUT_OF_MEMORY",
2011-12-16 17:12:52
2004
原创 python+ctypes枚举windows设备为XML树
from ctypes import *cfg = windll.cfgmgr32RERVALS = { 0x00000000:"CR_SUCCESS", 0x00000001:"CR_DEFAULT", 0x00000002:"CR_OUT_OF_MEMORY", 0x00000003:"CR_INVA
2011-12-13 14:51:23
1217
原创 Python多线程下载(2)
#encoding: gbkfrom urllib.request import *from threading import *import timeimport osPIECE_SIZE = 1024class Block:
2011-08-09 18:34:39
710
原创 Python 二叉树练习
<br /><br />class Node:<br /> def __init__(self, data = None, left = None, right = None):<br /> self.data = data<br /> self.left = left<br /> self.right = right<br />class BTree:<br /> def __init__(self, root = None):<br />
2011-04-12 22:30:00
672
原创 C语言函数动态调用(参考UnderC实现)
<br /> <br /> <br />#include "stdafx.h"<br />#include <stdarg.h><br />#include <windows.h><br />#include <locale.h><br />#include <stdlib.h><br /> <br /> <br />const int DC_STADCALL = 0, DC_CDECL = 1, DC_QWORD = 2, DC_NOWORD = 4, DC_RET_OBJ = 8, DC_RET_VAL
2011-04-12 22:28:00
863
原创 C++直接调用外部函数
<br /><br /><br /> <br />#include "stdafx.h"<br />#include <stdarg.h><br />#include <windows.h><br />#include <locale.h><br />#include <stdlib.h><br /> <br /> <br />const int DC_STADCALL = 0, DC_CDECL = 1, DC_QWORD = 2, DC_NOWORD = 4, DC_RET_OBJ = 8, DC_RE
2010-12-03 13:04:00
3233
原创 直接调用函数的函数
调函数的一个通用函数。还没有看很明白,fn为函数地址,args为参数(func(int param, ...),直接传¶m就可以了),argc为参数个数,(32位机4字节为一个), optr为this指针(VC 的 __thiscall),flags为标志(下面有定义,__cdecl不用清堆栈,QWORD好像是返回8字节内容,其它的没有看明白,好像与GCC有关。buff是返回值保存的地方。从C++解释器underC源码中取出来的。这个用来调用DLL中的函数比较爽的,不用声明原型,直接调用。typed
2010-12-02 18:47:00
877
原创 python 多线程下载
#-------------------------------------------------------------------------------# Name: down# Purpose: ## Author: lqefn## Created: 15-09-2010# Copyright: (c) lqefn 2010# Licence: #--------------------------------------------------
2010-09-15 17:59:00
673
原创 iconv python
<br /><br />#encoding: gbk<br />from ctypes import *<br />iconv = cdll.libiconv2<br /> <br />print(iconv)<br />def lst(cnt, names, data):<br /> print("COUNT:", cnt)<br /> for i in range(cnt):<br /> print(names[i])<br /> <br />cb = CFUNCTYPE(No
2010-09-02 16:49:00
2883
原创 mysql 嵌入式 python实现
<br /><br />from ctypes import *<br /> <br />my = windll.libmysqld<br />NULL = 0<br /> <br />mysql = c_int(0)<br />results = c_int(0)<br />record = c_int(0)<br /> <br />s = "MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, MYSQL_INIT_CO
2010-08-16 19:05:00
1466
原创 枚举自动对象属性
<br /><br />#include <ole2.h><br />#include <comutil.h><br />#include <comdef.h><br />#include <string><br />#include <vector><br />#include <map><br /> <br />using namespace std;<br /> <br />const wstring vtname(int vt) <br />{<br />static map<int, wstrin
2010-08-16 18:47:00
946
原创 python com
<br /><br />from win32com.client import *<br /> <br />vt = {0: 'VT_EMPTY', 1: 'VT_NULL', 2: 'VT_I2', 3: 'VT_I4', 4: 'VT_R4', 5: 'VT_R8', 6: 'VT_CY', 7: 'VT_DATE',<br />8: 'VT_BSTR', 9: 'VT_DISPATCH', 10: 'VT_ERROR', 11: 'VT_BOOL', 12: 'VT_VARIANT', 13: 'VT
2010-08-13 18:31:00
676
Crack Tutorial.chm
2011-05-27
SVN Setup-Subversion-1.6.15.msi
2010-12-30
python-3.1.2-stackless.msi
2010-09-19
python-2.6.5-stackless.msi
2010-09-19
psycopg2-2.2.2.win32-py2.7-pg8.4.4-release.exe
2010-09-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人