易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 :

一些VB相关的东西~~


珍贵vb函数列表
Variant 变量的内部表示:
_______________________________________________________________
符号常量 值 内部表示 字节数
V_EMPTY 0 Empty
V_NULL 1 Null
V_INTEGER 2 Interger 2
V_LONG 3 Long 4
V_SINGLE 4 Single 4
V_DOUBLE 5 Double 8
V_CURRENCY 6 Currency 8
V_DATE 7 Date 8
V_STRING 8 String
V_OLE 9 OLE Automation Object
V_ERROR 10 Error
V_BOOLEAN 11 Boolean 2
V_VARIANT 12 Variant(仅用于变体数组) 16(22) 
V_OBJECT 13 Object(非OLE自动化对象) 4
V_BYTE 17 Byte 1
V_ARRAY 8192 Array
________________________________________________________________
__vbaVarMove ;变体变量赋值(一般用于数值变量)
lea edx,var1 ;变量1的地址放到edx
lea ecx,var2 ;变量2的地址放到ecx
call __vbaVarMove ;把变量1赋值给变量2
;-------------------------------------------------
__vbaVarCopy ;变体变量赋值(一般用于字符串变量)
lea edx,var1 ;变量1的地址放到edx
lea ecx,var2 ;变量2的地址放到ecx
call __vbaVarMove ;把变量1赋值给变量2
;-------------------------------------------------
__vbaVar ......

python比较操作的内幕

今天看了序列类型相关的比较操作.
在python核心编程(2nd)一书中6.13.1章节中, 给出了列表比较的一个准则..
个人感觉还是不很完善:
如果扫描到两个列表中当前比较元素是不可比较的, 那么返回什么??
我用的是python2.6....
对这个问题做了一些测试, 自己目前嘎绝当比较遇到上述情况时, 是使用两个列表的内存地址值来比较的..
以下代码是测试时候的i/o
>>> a = [1, 2, 3, 4]
>>> b = [1, 2, 4, "3"]
>>> a == b
False
>>> a < b
True
>>> a > b
False
>>> a, b = b, a
>>> a
[1, 2, 4, '3']
>>> b
[1, 2, 3, 4]
>>> id(a)
12643064
>>> id(b)
12752576
>>> a < b
False
>>> b < a
True
>>> a = [1, "4"]
>>> b = [2]
>>> a < b
True
>>> id(a)
12642104
>>> id(b)
12643064
>>> c = [0]
>>> a < c
False
>>> id(c)
12752576
>>> a = [1]
>>> b = ["1"]
>>> a < b
True
>>> id ......

Python 二进制文件读取显示

filename=raw_input('enter file name:')
f=open(filename,'rb')
f.seek(0,0)
index=0
for i in range(0,16):
print "%3s" % hex(i) ,
print
for i in range(0,16):
print "%-3s" % "#" ,
print
while True:
temp=f.read(1)
if len(temp) == 0:
break
else:
print "%3s" % temp.encode('hex'),
index=index+1
if index == 16:
index=0
print
f.close()
这里显示的是,读取一个BMP图像后的效果
 
从这里,可以看出,print语句和C的printf对格式要求是一致的,或者说,Python采用了C的格式规范。
 
print "%-3s" % "#" ,
逗号防止自动生成换行符,-3表示显示占3个字符并且从左显示(默认从右)。
 
f.read(1)
每次读一个字节。如果读出来的长度为0,则到了文件末尾。
 
Python语法有很多特殊的地方,以后还要慢慢学习 ......

Python Socket Server

今天做ftp的界面,做的相当郁闷,弄得心情及其不爽,在网上搜到死都不知道该怎么办,打算明天先看看C++
的是怎么弄的再说。不过,现在我想写一下关于socket的编程。
先写一个时间服务器吧,他监听端口,并且会返回 服务器的时间
server.py
#!/usr/bin/python
# Copyright (c) angelipin (angelipin@126.com)
import SocketServer
import time
import logging
__version__ = "1.0.0"
class ServerHandler(SocketServer.BaseRequestHandler):
def setup(self):
logging.info("start thread.")
self.request.settimeout(60)
def finish(self):
self.request.close()
logging.info("end thread.")
def handle(self):
while 1:
try:
dataReceived = self.request.recv(1024)
if not dataReceived:
break
logging.info('Receive data '+dataReceived)
dataSend = time.ctime(time.time())
self.request.send(dataSend)
except socket.timeout:
print "Time out"
logging.error("Time out")
logging.basicConfig(level=logging.DEBUG,format= ......

python笔记之正则表达式

 正则表达式
具体的参考手册,这里记下一些小问题:
1、re对象的方法
match    Match a regular expression pattern to the beginning of a string.
search   re.search(pattern, string, flags) flags:re.I re.M re.X re.S re.L re.U
sub      Substitute occurrences of a pattern found in a string.
subn     Same as sub, but also return the number of substitutions made.
split    Split a string by the occurrences of a pattern.
findall  Find all occurrences of a pattern in a string.
finditer Return an iterator yielding a match object for each match.
iter = re.finditer("23", "123423523")
for i in iter:
print i.span() 
compile  将一个pattern编译成一个RegexObject.
       re对象的使用方法,reobject = re.complie(pattern),从reobject获得pattern的方法,使用reobject.pattern属性
       如果一个reobject要多次使用,最好使用c ......

Best Replica Gucci Galaxy Python Hobo Bag

ZoundryDocument
Python skin is known for its color variations and for its elasticity; it is
the warmest leather of the season and ideal for the manufacture of many luxury
goods. Sometimes natural patterns can be hidden when they're done in black, but
the finish here has a bit of a shine to it, so it reflects enough light that the
scale differentiation is easy to see. Many famous brands have their python
handbags. In my opinion, Gucci Handbags do best.
Gucci Galaxy Large Hobo has a luxe quality with modern design that will be
timeless and glamorous for every season. Made of python skin with patent leather
trims it will make you feel more feminine. The divine and pristine python skin
is crafted into a classic shape with small chain that hangs on the bottom, which
gives a refined style and cutting-edge chic. The single handle is braided
leather interlocked within the chain. It also has zip top closure and spacious
interior. With cotton lining, the inside offers cel ......
总记录数:40319; 总页数:6720; 每页6 条; 首页 上一页 [6420] [6421] [6422] [6423] 6424 [6425] [6426] [6427] [6428] [6429]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号