phoenix13

导航

 
上一页 1 ··· 8 9 10 11 12 13 14 15 下一页

2012年12月3日

摘要: http://blog.csdn.net/huzhyi21/article/details/4543944 阅读全文
posted @ 2012-12-03 23:28 phoenix13 阅读(326) 评论(0) 推荐(0) 编辑
 

2012年12月2日

摘要: 1. 循环 http://woodpecker.org.cn/abyteofpython_cn/chinese/ch06s04.html 第6章 控制流 for循环 http://www.cainiao8.com/python/basic/python_11_for.html for循环控制语句—— 阅读全文
posted @ 2012-12-02 23:04 phoenix13 阅读(119) 评论(0) 推荐(0) 编辑
 
摘要: 1.创建字典http://skyfen.iteye.com/blog/567571Python字典的应用详解方法①:>>> dict1 = {}>>> dict2 = {'name': 'earth', 'port': 80}>>> dict1, dict2({}, {'port': 80, 'na... 阅读全文
posted @ 2012-12-02 18:55 phoenix13 阅读(240) 评论(0) 推荐(1) 编辑
 
摘要: http://www.17jo.com/program/python/base/ClassUse.html Python 类的定义、继承及使用对象http://blog.csdn.net/wklken/article/details/6313265Python笔记——类定义# 例:类定义及使用class CAnimal: name = 'unname' # 成员变量 def __init__(self,voice='hello'): # 重载构造函数 self.voice = voice # 创建成员变量并赋初始值 def __de... 阅读全文
posted @ 2012-12-02 15:47 phoenix13 阅读(223) 评论(0) 推荐(0) 编辑
 
摘要: 本文http://blog.csdn.net/whycadi/article/details/2011046http://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html1.Python正则式的基本用法1.1基本规则1.2重复1.2.1最小匹配与精确匹配1.3前向界定与后向界定1.4组的基本知识2.re模块的基本函数2.1使用compile加速2.2 match和search2.3 finditer2.4字符串的修改与替换3.更深入的了解re的组与对象3.1编译后的Pattern对象3.2组与Match对象3.2.1组的名字与序号3.2. 阅读全文
posted @ 2012-12-02 12:14 phoenix13 阅读(223) 评论(0) 推荐(0) 编辑
 
摘要: 1. list 去除重复http://python.u85.us/viewnews-6.htmll1 = ['b','c','d','b','c','a','a']l2 = [][l2.append(i) for i in l1 if not i in l2]print l22.中文gbk字符 正则匹配re.findall(r'<SO>[\x80-\xff]{0,10}</SO>',line)3. string int 互转str(a)int( 阅读全文
posted @ 2012-12-02 12:11 phoenix13 阅读(164) 评论(0) 推荐(0) 编辑
 
摘要: 1. show & change directory>>> import os>>> os.getcwd()'/home/user'>>> os.chdir("/tmp/")>>> os.getcwd()'/tmp'2. execute .py from shell>>>import sys>>>sys.argv = ['', 'arg1', 'arg2']>>> 阅读全文
posted @ 2012-12-02 12:10 phoenix13 阅读(151) 评论(0) 推荐(0) 编辑
 

2012年12月1日

摘要: 1.importmodule2.frommoduleimporthttp://woodpecker.org.cn/diveintopython/object_oriented_framework/importing_modules.htmlPython有两种导入模块的方法。两种都有用,你应该知道什么时候使用哪一种方法。一种方法,importmodule,你已经在第2.4节 “万物皆对象”看过了。另一种方法完成同样的事情,但是它与第一种有着细微但重要的区别。下面是frommoduleimport的基本语法:from UserDict import UserDict它与你所熟知的importmod 阅读全文
posted @ 2012-12-01 23:49 phoenix13 阅读(138) 评论(0) 推荐(0) 编辑
 

2012年8月5日

摘要: 1.一个只有一个lable的界面import javax.swing.JFrame;import javax.swing.JLabel;public class reading extends JFrame { public static void main(String[] args) { new reading(); } reading() { JLabel jlbHelloWorld = new JLabel("Hello World"); add(jlbHelloWorld); this.setSiz... 阅读全文
posted @ 2012-08-05 19:59 phoenix13 阅读(135) 评论(0) 推荐(0) 编辑
 

2012年6月13日

摘要: static inline int ip_finish_output2(struct sk_buff *skb){ struct dst_entry *dst = skb->dst; struct rtable *rt = (struct rtable *)dst; struct hh_cache *hh = dst->hh; struct net_device *dev = dst->dev; int hh_len = LL_RESERVED_SPACE(dev); if (rt->rt_type == RTN_MULTICAST) IP_I... 阅读全文
posted @ 2012-06-13 14:03 phoenix13 阅读(336) 评论(0) 推荐(0) 编辑
 
上一页 1 ··· 8 9 10 11 12 13 14 15 下一页