摘要:
全选(高亮显示):按esc后,然后ggvG或者ggVG 全部复制:按esc后,然后ggyG 全部删除:按esc后,然后dG 解析: gg:是让光标移到首行,在vim才有效,vi中无效 v : 是进入Visual(可视)模式 G :光标移到最后一行 选中内容以后就可以其他的操作了,比如: d 删除选中 阅读全文
摘要:
例子: 每5秒检查一次test.txt文件,如果出现“hello”,则打开计算器, 阅读全文
摘要:
# coding:utf-8 import re def validateEmail(email): if re.match("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$", email) != None: # if re.match("/^\w+@[a-z0-9]+\.[a-z]{2,4}$/", emai 阅读全文
摘要:
1、set()方法 输出 [1, 2, 3, 4, 5, 6, 7] 特点:不保证原有顺序 2、原始方法 特点:直观,原有顺序不变 3、set()方法,保持原有顺序 特点:将列表转化为集合再转化为列表,利用集合的自动去重功能。简单快速。缺点是:使用set方法无法保证去重后的顺序。但是,可以通过列表中 阅读全文
摘要:
背景: 需要每天定时去检测crontab进程是否启动,所以不能用crontab来启动检测脚本了,直接使用while 循环和sleep方式实现定时检测 阅读全文
摘要:
输出为 阅读全文
摘要:
https://blog.csdn.net/liumiaocn/article/details/83550309 https://note.youdao.com/ynoteshare1/index.html?id=3c1e6a08a21ada4dfe0123281637e299&type=note 阅读全文
摘要:
该方法可解决robot报错:'ascii' codec can't encode character u'\xf1' in position 16: ordinal not in range(128) 在下面目录中新增文件:sitecustomize.py 内容为 各个发行版放置位置: RedHat 阅读全文