摘要: 写文件时遇到错误: UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-7: ordinal not in range(128) 解决办法:import sys reload(sys) sys.setdefa 阅读全文
posted @ 2016-08-07 21:31 zyf1 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 正则表达式:我要匹配字符串中两个引号中的内容 例如 str = ' map.put("abdicate","v.正式放弃(权力、责任):throne"); ' 匹配后要获得 abdicate 以及 v.正式放弃(权力、责任):throne 即引号中的红色内容 正则表达式为\"([^\"]*)\" : 阅读全文
posted @ 2016-07-30 22:47 zyf1 阅读(655) 评论(0) 推荐(0) 编辑
摘要: p63 7 (a) (b)array bound can be detected more easily with n increasing (c)n=1 (d)node coverage{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19} edge c 阅读全文
posted @ 2016-03-28 19:29 zyf1 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Description of triangle problem: Function triangle takes three integers a,b,c which are length of triangle sides; calculates whether the triangle is e 阅读全文
posted @ 2016-03-18 11:22 zyf1 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Program1: The fault is : for(int i=x.length-1;i>0;i--) We should change i>0 into i>=0 identify a test case that does not execute the fault:x=null iden 阅读全文
posted @ 2016-03-06 15:35 zyf1 阅读(119) 评论(0) 推荐(0) 编辑
摘要: There was once a project about establishing a website providing some basic functions such as showing data from a database, searching for some certain 阅读全文
posted @ 2016-03-03 22:10 zyf1 阅读(146) 评论(0) 推荐(0) 编辑
摘要: We've all made mistakes in our work especially when there is something about coding in it. An error from the website project in last semester virtuall 阅读全文
posted @ 2016-03-03 11:07 zyf1 阅读(136) 评论(0) 推荐(0) 编辑