上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页

2016年5月21日

map函数

摘要: list是一个函数,将参数强制转换成列表list((1,4,7)) 对元组(1,4,7)使用list函数就返回列表[1,4,7]map(list,zip(*a))表示对zip(*a)的每一个单位都执行list函数而且这在python 2.6.6中执行正常,执行效果如下>>> a=[[1,2,3],[ 阅读全文

posted @ 2016-05-21 21:57 与非朋仔 阅读(171) 评论(0) 推荐(0)

python命令行上下 退格,左右键不能用

摘要: easy_install readline 阅读全文

posted @ 2016-05-21 20:57 与非朋仔 阅读(1000) 评论(0) 推荐(0)

postgresql 在linux上的源码安装

摘要: http://my.oschina.net/hippora/blog/375292 下载源码并解压 开始编译安装 按照错误提示依次安装依赖包 继续 添加用户 建立好database cluster目标文件夹 环境变量设置 创建database cluster 启动数据库实例 设置好PGDATA环境变 阅读全文

posted @ 2016-05-21 14:40 与非朋仔 阅读(228) 评论(0) 推荐(0)

2016年5月19日

python字典操作

摘要: 输出结果: {"sub_dic": {"sub_str": "this is sub str", "sub_list": [1, 2, 3]}, "end": "end", "list": [1, 2, "a", "b"], "str": "this is a string"} 将两列list组成一 阅读全文

posted @ 2016-05-19 17:09 与非朋仔 阅读(129) 评论(0) 推荐(0)

2016年5月17日

根据key存不存在查询json

摘要: select * from table where value->'key' != 'null'; 阅读全文

posted @ 2016-05-17 16:20 与非朋仔 阅读(228) 评论(0) 推荐(0)

2016年5月11日

精典博文

摘要: http://osdir.com/ml/linux.drivers.e1000.devel/2007-01/msg00082.htmlhttp://blog.chinaunix.net/uid-21505072-id-3078625.html朋 18:42:12http://blog.csdn.ne 阅读全文

posted @ 2016-05-11 18:44 与非朋仔 阅读(134) 评论(0) 推荐(0)

python解析XML之ElementTree

摘要: #coding=utf-8 from xml.etree import ElementTree as ET tree=ET.parse('test.xml') root = tree.getroot() #p=per.findall('caption') #for oneper in p: # for child in oneper.getchildren(): # print... 阅读全文

posted @ 2016-05-11 00:09 与非朋仔 阅读(1741) 评论(0) 推荐(0)

2016年4月30日

linux通用邻居基础架构

摘要: 1、为每一个协议提供一个缓存来存放L3到L2的转换结果。 2、提供在缓存中添加、删除、改变和查找一个特定映射项的函数。查找函数必须要快,因为它会影响整个系统的性能。 3、为每一个协议缓存的数据项提供一种老化机制。 4、当缓存已满时并且正好要创建新的映射项时,提供选择替换策略。 5、为每一个邻居提供一 阅读全文

posted @ 2016-04-30 00:06 与非朋仔 阅读(443) 评论(0) 推荐(0)

2016年4月27日

isinstance使用方法

摘要: #!/usr/bin/python2.7 def displayNumType(num): print num, 'is', if isinstance(num,(int, long, float, complex)): print 'a num of type:', type(num).__nam 阅读全文

posted @ 2016-04-27 23:44 与非朋仔 阅读(464) 评论(0) 推荐(0)

2016年4月21日

centos yum源问题

摘要: 在配置CentOS-6.0-x86_64-bin-DVD2.iso作为本地yum源的时候,碰到相当多的问题: 问题一 将CentOS-6.0-x86_64-bin-DVD2.iso挂载在/mnt上,并配置本地yum源: 然后就报错了-_-!,错误的信息差不多就是: file:///mnt/repod 阅读全文

posted @ 2016-04-21 11:55 与非朋仔 阅读(521) 评论(0) 推荐(0)

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页

导航