摘要: import re'''method1============================================================'''def matchx(noun): return re.search('[szx]$', noun)def matchy(noun... 阅读全文
posted @ 2015-12-28 20:09 xfei.zhang 阅读(137) 评论(0) 推荐(0) 编辑
摘要: '''help----re'''import restring1='100 NORTH BROAD MAIN ROAD. 100'print(string1.replace('ROAD.', 'RD.'))print(re.sub('ROAD$', 'RD.', string1))print(re.... 阅读全文
posted @ 2015-12-28 20:08 xfei.zhang 阅读(138) 评论(0) 推荐(0) 编辑
摘要: '''help--string'''import sysimport util_mlist_1=[1,43,161,12]i=0for item in list_1: if item%2!=0: print(item) i=i+1 else: b... 阅读全文
posted @ 2015-12-28 20:07 xfei.zhang 阅读(164) 评论(0) 推荐(0) 编辑
摘要: '''help---tuple1. can not change 2. only can access'''my_tuple=('data1',222,222,'data3',333,444,'jang')print(my_tuple)print(my_tuple[0])print(my_tuple... 阅读全文
posted @ 2015-12-28 20:06 xfei.zhang 阅读(137) 评论(0) 推荐(0) 编辑
摘要: '''help---set, 1. no sequencial, random2. no repeated value'''my_set={1,'data1',2,'value'}print(my_set)a_list = [1,2,3]tt_set=set(a_list)print(tt_set)... 阅读全文
posted @ 2015-12-28 20:05 xfei.zhang 阅读(131) 评论(0) 推荐(0) 编辑
摘要: '''help--list1.not special restrict'''a_list = ['xfei',22,'nanjing']print(a_list)print(a_list[2])print(a_list[-1])print(a_list[0])print(a_list[-3])pri... 阅读全文
posted @ 2015-12-28 20:05 xfei.zhang 阅读(105) 评论(0) 推荐(0) 编辑
摘要: '''help---dict1. key-value2. key is not repeated, later key value will cover old key value'''dict1={'name':'xfei','age':20, 'favorite':['swimming','si... 阅读全文
posted @ 2015-12-28 20:04 xfei.zhang 阅读(99) 评论(0) 推荐(0) 编辑
摘要: CMakeCache.txt可以将其想象成一个配置文件(在Unix环境下,我们可以认为它等价于传递给configure的参数)。CMakeLists.txt 中通过 set(... CACHE ...) 设置的变量 CMakeLists.txt 中的 option() 提供的选项 CMakeList... 阅读全文
posted @ 2015-12-28 19:59 xfei.zhang 阅读(1030) 评论(0) 推荐(0) 编辑
摘要: 学习一下cmake的 finder。finder是神马东西?当编译一个需要使用第三方库的软件时,我们需要知道:去哪儿找头文件 .h对比GCC的 -I 参数去哪儿找库文件 (.so/.dll/.lib/.dylib/...)对比GCC的 -L 参数需要链接的库文件的名字对比GCC的 -l 参数这也是一... 阅读全文
posted @ 2015-12-28 19:58 xfei.zhang 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 简单的语法•注释# 我是注释•命令语法COMMAND(参数1 参数2 ...)•字符串列表A;B;C # 分号分割或空格分隔的值•变量(字符串或字符串列表)set(Foo a b c)设置变量 Foocommand(${Foo})等价于 command(a b c)command("${Foo}")... 阅读全文
posted @ 2015-12-28 19:57 xfei.zhang 阅读(142) 评论(0) 推荐(0) 编辑