摘要: 大家好,我是一名ACMer,写一些博客主要记录心路历程, 如果有想要联系我的,请发送邮箱qidong120@hotmail.com 新博客地址为https://kiudou.github.io/ 阅读全文
posted @ 2017-04-04 09:34 启动 阅读(170) 评论(0) 推荐(0) 编辑
摘要: re是python里的正则表达式模块。findall是其中一个方法,用来按照提供的正则表达式,去匹配文本中的所有符合条件的字符串。返回结果是一个包含所有匹配的list。 “\b”在正则表达式中表示单词的开头或结尾,空格、标点、换行都算是单词的分割 []表示满足括号中任一字符。比如“[hi]”,它就不 阅读全文
posted @ 2017-10-05 20:24 启动 阅读(166) 评论(0) 推荐(0) 编辑
摘要: web.py运行代码时出现 Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 239, in process return self.ha 阅读全文
posted @ 2017-10-04 14:34 启动 阅读(2108) 评论(0) 推荐(0) 编辑
摘要: 运行文件Python code.py 文件里用到import web出现 Traceback (most recent call last): File "code.py", line 14, in <module> app.run() File "/usr/local/lib/python2.7/ 阅读全文
posted @ 2017-10-04 11:29 启动 阅读(1723) 评论(0) 推荐(1) 编辑
摘要: github commit时出现 Please tell me who you are..... 第一种设置全局的, 直接在命令行输入 git config --global user.email "you@example.com" git config --global user.name "Yo 阅读全文
posted @ 2017-10-03 21:49 启动 阅读(630) 评论(0) 推荐(0) 编辑
摘要: 首先安装python和pygame的环境 sudo apt-get install python sudo apt-get install python-pygame github项目地址:https://github.com/kiudou/fight_plane 代码中有好几个图,自己找 阅读全文
posted @ 2017-10-03 16:31 启动 阅读(1203) 评论(0) 推荐(0) 编辑
摘要: 此代码用于显示一张图片 1 # -*- coding: utf-8 -*- 2 import pygame #导入pygame库 3 from sys import exit #向sys模块借用exit函数来退出程序 4 pygame.init() #初始化pygame 5 6 screen = pygame.display.set_mode((600,170),0,32) 7 #... 阅读全文
posted @ 2017-10-01 20:38 启动 阅读(246) 评论(0) 推荐(0) 编辑
摘要: ubuntu启动时,出现waiting for network configuration,waiting up to 60 more seconds for network configuration等,进入桌面后网络图标也不见了 解决方法,首先在 /etc/network/interfaces 阅读全文
posted @ 2017-09-20 16:51 启动 阅读(1553) 评论(0) 推荐(0) 编辑
摘要: 给出模板串S和串T,长度分别为Slen和Tlen,在线性时间内,对于每个S[i](0<=i<Slen),求出S[i..Slen-1]与T的 最长公共前缀长度,记为extend[i],extend[i]存放s[i]开始与T的最长公共前缀长度。 例子 a a a a a a a b b b a a a 阅读全文
posted @ 2017-09-13 13:52 启动 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 查看进程 ps top(任务管理器) 杀死进程 kill PID(PID号需要自己输入,可用查看进程查看) 删除lock文件 sudo rm /var/lib/apt/lists/lock 删除文件 sudo rm -r filename(-r向下递归,不管多少级,都删除, -f强行删除,不提示) 阅读全文
posted @ 2017-09-10 13:11 启动 阅读(2162) 评论(0) 推荐(0) 编辑
摘要: 状态压缩DP:本生有很多状态,然后压缩成一种状态。 很多时候都会使用位运算 Doing Homework Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission( 阅读全文
posted @ 2017-09-09 16:35 启动 阅读(232) 评论(0) 推荐(0) 编辑