摘要: The Python ProfilersCopyright © 1994, by InfoSeek Corporation, all rights reserved.Written by James Roskind. [1]Permission to use, copy, modify, and distribute this Python software and its associated documentation for any purpose (subject to the restriction in the following sentence) without fe 阅读全文
posted @ 2008-04-27 18:43 dainiao01 阅读(279) 评论(0) 推荐(0) 编辑
摘要: #!-*- coding: cp936 -*-"#Teraservertestimport threading, time, socket, random,sysimport base64,zipfilethread_count =500TEST_COUNT = 1SPTIME=0.02ISLOG=0MAX_PAGE = 10000HOST = "192.168.6.12"PORT=5534h={}b={}h[1] =[ "POST /httpEntry HTTP/1.1/r/n" ,/ "X-Online-Host: 192.168 阅读全文
posted @ 2008-04-27 16:58 dainiao01 阅读(603) 评论(0) 推荐(0) 编辑
摘要: # -*- encoding: utf-8 -*-from ctypes import *import os,timeclass MEMORYSTATUS (Structure): _fields_ = [('dwLength', c_ulong),#sizeof(MEMORYSTATUS) ('dwMemoryLoad',c_ulong), # percent of memory in use ('dwTotalPhys', c_ulong),#; // bytes of physical memory ('dwAvailPhys 阅读全文
posted @ 2008-04-27 16:56 dainiao01 阅读(327) 评论(0) 推荐(0) 编辑
摘要: #!python"""Bootstrap setuptools installationIf you want to use setuptools in your package's setup.py, just include thisfile in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools()If you want to require a specif 阅读全文
posted @ 2008-04-27 16:47 dainiao01 阅读(356) 评论(0) 推荐(0) 编辑
摘要: #!python"""Bootstrap setuptools installationIf you want to use setuptools in your package's setup.py, just include thisfile in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools()If you want to require a specif 阅读全文
posted @ 2008-04-27 16:45 dainiao01 阅读(876) 评论(0) 推荐(0) 编辑
摘要: 1.在Oracle中实现SELECT TOP N :由于ORACLE不支持SELECT TOP语句,所以在ORACLE中经常是用ORDER BY跟ROWNUM的组合来实现SELECT TOP N的查询。简单地说,实现方法如下所示: SELECT 列名1...列名n FROM (SELECT 列名1...列名n FROM 表名 ORDER BY 列名1...列名n) WHERE ROWNUM <= N(抽出记录数) ORDER BY ROWNUM ASC 下面... 阅读全文
posted @ 2008-04-27 12:44 dainiao01 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1.择善人而交,择善书而读,择善言而听,择善行而从。2.一个人的快乐,不是因为他拥有的多,而是因为他计较的少。3.生气,就是拿别人的过错来惩罚自己。原谅别人,就是善待自己。4.未必钱多乐便多,财多累己招烦恼。清贫乐道真自在,无牵无挂乐逍遥。5.静坐常思己过,闲谈莫论人非,能受苦乃为志士,肯吃亏不是痴人,敬君子方显有德,怕小人不算无能,退一步天高地阔,让三分心平气和,欲进步需思退步,若着手先虑放手,如得意不宜重往,凡做事应有余步。持黄金为珍贵,知安乐方值千金,事临头三思为妙,怒上心忍让最高。切勿贪意外之财,知足者人心常乐。若能以此去处事,一生安乐任逍遥。6.处事不必求功,无过便是功。为人不必感德 阅读全文
posted @ 2008-04-27 10:46 dainiao01 阅读(139) 评论(0) 推荐(0) 编辑