private string CmdPing(string strIp) { Process p = new Process(); //设定程序名 p.StartInfo.FileName = "cmd.exe"; //关闭Shell的使用 p... ...
test = 'abcdefghijklmnopqrstuvwxyz' print(test) print(test[1:5]) #可以切片 print(test.capitalize()) #首字母大写 print(test.count('a'))#计数 print(test.center(50,... ...
分类:
编程语言 时间:
2017-11-16 14:25:11
阅读次数:
155
本篇文章中的代码只是部分片段,完整代码存放于github上 "https://github.com/Q Zhan/simple vue" 。 进入正文~实现数据绑定主要是要实现两个方面的功能:数据变化导致视图变化,视图变化导致数据变化。后者比较容易实现,就是监听视图的事件,然后在回调函数中改变数据。 ...
分类:
其他好文 时间:
2017-11-15 17:10:27
阅读次数:
339
基本的数据类型 int n1=123 #根据int类,创建了一个对象 n2=int(123) #根据int类,创建了一个对象,相当于去int类里调用_init_方法 n3=str('123') #同理 Python内部优化 -5~~~257的数字只要重复出现都使用一个内存 查看内存地址:id(变量名 ...
分类:
编程语言 时间:
2017-11-14 19:32:20
阅读次数:
122
21、我喜欢培根 key: CTF{} 解题链接: http://ctf5.shiyanbar.com/crypto/enc1.txt 打开链接后: -- .-. ... . ..--.- .. ... ..--.- -.-. .-.. ..--.- -... ..- - ..--.- -... . ...
分类:
其他好文 时间:
2017-11-13 19:52:14
阅读次数:
445
format的用法 sort 用法 li. sort() 得到的是新的列表li 从小到大排列 li.sort(reverse=True)#这个是倒叙排列(从大到小) sorted ret=sorted(li) 的到的是一个可迭代对象,需要print(list(ret)) 强转列表在打印才能取出他的值 ...
分类:
编程语言 时间:
2017-11-13 11:28:07
阅读次数:
157
strip() 用于移除 字符串 首尾指定的字符, 默认是移除空格 用法 : s.strip('参数') 实例 1 str = "0000000this is string example....wow!!!0000000"; 2 print str.strip(‘0’) 执行之后的结果 this ...
分类:
编程语言 时间:
2017-11-11 21:30:16
阅读次数:
174
内置函数———filter和map filter filter() 函数用于过滤序列,过滤掉不符合条件的元素,返回由符合条件元素组成的新列表。 filter() 函数接收一个函数 f 和一个list,这个函数 f 的作用是对每个元素进行判断,返回 True或 False filter() 根据判断结 ...
分类:
其他好文 时间:
2017-11-11 17:48:20
阅读次数:
119
哈希(是一种算法)hash,返回的是一串数字应用:数据的存储和查找, def func(x): return x and x.strip() l = ['test',None,'','str',' ','END'] ret = filter(func,l) print(list(ret)) def ...
分类:
编程语言 时间:
2017-11-11 13:06:46
阅读次数:
254
#__author__:Administrator}#data: 2017/11/10menu = { '北京':{ '朝阳':{ '国贸':{ 'cicc':{}, 'HP': {}, '渣打银行': {}, 'cctv': {}, }, '望京':{ '默默':{}, '奔驰':{}, '360 ...
分类:
其他好文 时间:
2017-11-10 20:37:10
阅读次数:
239