题目地址:https://edu.cnblogs.com/campus/fzu/FZUSoftwareEngineering1816W/homework/2160
PSP2.1 | Personal Software Process Stages | 预估耗时(分钟) | 实际耗时(分钟) |
---|---|---|---|
Planning | 计划 | ||
? Estimate | ? 估计这个任务需要多少时间 | 600 | 750 |
Development | 开发 | ||
? Analysis | ? 需求分析 (包括学习新技术) | 40 | 50 |
? Design Spec | ? 生成设计文档 | 10 | 20 |
? Design Review | ? 设计复审 | 10 | 20 |
? Coding Standard | ? 代码规范 (为目前的开发制定合适的规范) | 10 | 20 |
? Design | ? 具体设计 | 60 | 100 |
? Coding | ? 具体编码 | 400 | 550 |
? Code Review | ? 代码复审 | 10 | 20 |
? Test | ? 测试(自我测试,修改代码,提交修改) | 30 | 200 |
Reporting | 报告 | ||
? Test Repor | ? 测试报告 | 10 | 10 |
? Size Measurement | ? 计算工作量 | 20 | 20 |
? Postmortem & Process Improvement Plan | ? 事后总结,并提出过程改进计划 | 30 | 40 |
合计 | 630 | 1050 |
使用工具:Java
傅海涛:爬虫,词频统计
黄家雄:词频统计
//获取title和url
public static void getTitle(String content){
Pattern r = Pattern.compile("<dt [^>]*?>[\\w\\W]*?<\\/dt>");
Matcher m = r.matcher(content);
while ( true ) {
if (m.find()) {
Pattern r2 = Pattern.compile("<a [^>]*?>[\\w\\W]*?<\\/a>");
Matcher m2 = r2.matcher(m.group(0));
//输出标题
if (m2.find()) {
String url = GetContent.match(m2.group(0), "a", "href");
// System.out.println(url);
urls.add(url);
//筛除html标签
String title = outHtml(m2.group(0));
titles.add(title);
// System.out.println(title);
}
} else {
break;
}
}
}
//获取html标签里面的某个属性值
public static String match(String source, String element, String attr) {
String result = new String();
String reg = "<" + element + "[^<>]*?\\s" + attr + "=[‘\"]?(.*?)[‘\"].*?>";
Matcher m = Pattern.compile(reg).matcher(source);
while (m.find()) {
String r = m.group(1);
result = r;
}
return result;
}
//筛除html标签
public static String outHtml(String cont){
String con =cont.replaceAll("</?[^>]+>", "");
return con;
}
原文:https://www.cnblogs.com/fht2018/p/9774627.html