public void queryTaskResult2() throws Exception {
HttpServletRequest request = ServletActionContext.getRequest();
HttpServletResponse response = ServletActionContext.getResponse();
PrintWriter out = response.getWriter();
String newsIdselect = request.getParameter("newsIdselect");
String taskname = request.getParameter("taskname");
String result = "{success:true,totalProperty: " + + ",root:[{";
String mmsAccessResult=null;
if (newsIdselect != null && !"".equals(newsIdselect)) {
List<AssessBeforeResult> abrList = assessBeforeResultService.findAssessResultByTaskId(Integer.valueOf(newsIdselect));
if(abrList!=null&&abrList.size()>)
{ for (int i = ; i < abrList.size(); i++) {
AssessBeforeResult abr = abrList.get(i);
if(abr.getSampleType()==)
{ System.out.println(abr.getMmsLeakage());
mmsAccessResult = "mmsTaskId:'" + newsIdselect
+ "',mmsResultId:'"+ abr.getId()
+ "',mmsTaskName:'" + taskname
+ "',mmsPrecision:'" + abr.getMmsPrecision()+ "%'"
+ " ,mmsRecall:'" + abr.getMmsRecall()+ "%'"
+ " ,mmsErrorrate:'" + abr.getMmsErrorrate()+ "%'"
//+ " ,mmsLeakage:'" + abr.getMmsLeakage()+ "%'";
+ " ,mmsLeakage:'11'"; }
}
}
}
System.out.println(mmsAccessResult);
if(mmsAccessResult!=null)
{
result+=mmsAccessResult;
} result+=",textPrecision:'"+ ""
+ "',textRecall:'"+ ""
+ "',textErrorrate:'"+ ""
+ "',textLeakage:'"+ ""; result+="'}]}"; String updateString = "{success:true,totalProperty: 1,root: [{"
+ "mmsTaskId:'"+""
+ "',mmsResultId:'"+ ""
+ "',mmsTaskName:'"+ ""
+ "',mmsPrecision:'"+ ""
+ "',mmsRecall:'"+ ""
+ "',mmsErrorrate:'"+ ""
+ "',mmsLeakage:'"+ "" + "',textPrecision:'"+ ""
+ "',textRecall:'"+ ""
+ "',textErrorrate:'"+ ""
+ "',textLeakage:'"+ ""
+ "'}]}"; System.out.println(result);
System.out.println(updateString); //out.println(updateString);
out.println(result);
out.flush();
out.close();
}

这个问题我调试了好几个小时,就因为前面多了一个“  ’ ”这个符号,输出样例如下

{
success: true,
totalProperty: ,
root: [
{
mmsTaskId: '',
mmsResultId: '',
mmsTaskName: '???é?????è???????????è???¨?é??è????°',
mmsPrecision: '25.0%',
mmsRecall: '16.67%',
mmsErrorrate: '0.0%',
mmsLeakage: '83.33%'',
textPrecision: '',
textRecall: '',
textErrorrate: '',
textLeakage: ''
}
]
}{
success: true,
totalProperty: ,
root: [
{
mmsTaskId: '',
mmsResultId: '',
mmsTaskName: '',
mmsPrecision: '',
mmsRecall: '',
mmsErrorrate: '',
mmsLeakage: '',
textPrecision: '',
textRecall: '',
textErrorrate: '',
textLeakage: ''
}
]
}

bug 调试了一个下午外加半个晚上的bug的更多相关文章

  1. 论 BUG调试与(程序猿)初学者

    作为一枚程序猿,BUG调试是最基本的技能,对于初学者更是重中之重.个人而言,要想为自己的程序猿生涯更上一层楼,就得知道什么是BUG调试,而且还必须知道怎么调好BUG.那么BUG究竟是什么呢?在我之前的 ...

  2. geotrellis使用(七)记录一次惨痛的bug调试经历以及求DEM坡度实践

    眼看就要端午节了,屌丝还在写代码,话说过节也不给轻松,折腾了一天终于解决了一个BUG,并完成了老板安排的求DEM坡度的任务,那么就分两段来表. 一.BUG调试 首先记录一天的BUG调试,简单copy了 ...

  3. geotrellis使用(十二)再记录一次惨痛的伪BUG调试经历(数据导入以及读取瓦片)

    Geotrellis系列文章链接地址http://www.cnblogs.com/shoufengwei/p/5619419.html 目录 前言 BUG还原 查找BUG 解决方案 总结 后记 一.前 ...

  4. 13 年的 Bug 调试经验总结

    在<Learning From Your Bugs>一文中,我写了关于我是如何追踪我所遇到的一些最有趣的bug.最近,我回顾了我所有的194个条目(从13岁开始),看看有什么经验教训是我可 ...

  5. 最难忘的Bug调试经历

    摘要:目前,著名的社区问答网站Quora上出现一个很火的讨论:你调试过最难的Bug是什么?大家纷纷留言,把自己最痛苦的一次调试经验写下来. 相信每位程序员都有过一段不堪回首地Bug调试经历,程序员一听 ...

  6. 13 年的 Bug 调试经验总结(来自蜗牛学院)

    在<Learning From Your Bugs>一文中,我写了关于我是如何追踪我所遇到的一些最有趣的bug. 最近,我回顾了我所有的194个条目,看看有什么经验教训是我可以学习的.下面 ...

  7. 嵌入式码农的10年Bug调试经验,值得一看

    下面这些都是我经历过的会导致难点bug的问题: 1.事件顺序.在处理事件时,提出下列问题会很有成效:事件可以以不同的顺序到达吗?如果我们没有接收到此事件会怎么样?如果此事件接连发生两次会怎么样?哪怕通 ...

  8. Bug调试(lldb)

    原文网址:http://www.cnblogs.com/Twisted-Fate/p/4760156.html 今天博主有一些Bug调试的需求,遇到了一些困难点,在此和大家分享,希望能够共同进步. X ...

  9. bug调试宝典

    bug调试技巧 宝典之一 : 坚信一个原则,程序不会说谎,一定是有原因的 多数的错误表现看起来莫明奇妙,甚至不可思议 但当我们找到问题后会发现:其实问题的根源是如此简单.如此的合乎道理. 这就要求我们 ...

随机推荐

  1. 虚拟机里面安装Openfiler 2.99

    简介 Openfiler 由rPath Linux驱动,它是一个基于浏览器的免费网络存储管理实用程序,可以在单一框架中提供基于文件的网络连接存储 (NAS) 和基于块的存储区域网 (SAN).Open ...

  2. 开发jquery tab 插件

    开发最简单的效果- -,基本构架 html,可以换更有意义的结构,这里demo,就简单写,不考虑SEO <div id="tab-hd"> <div class= ...

  3. 【OpenStack】OpenStack系列1之Python虚拟环境搭建

    安装virtualenv相关软件包 安装:yum install python-virtualenv* -y 简介,安装包主要包括, python-virtualenv:virtualenv用于创建独 ...

  4. static_cast dynamic_cast const_cast reinterpret_cast总结对比

    [本文链接] http://www.cnblogs.com/hellogiser/p/static_cast-dynamic_cast-const_cast-reinterpret_cast.html ...

  5. debian下mysql主从配置

    1.确保master/slave只有一份/etc/mysql/my.cnf , 不要在其他地方再有my.cnf (如/etc/my.cnf  /usr/local之类) 2.master配置: 在[m ...

  6. iOS7 status bar 样式问题

    在ios7中,有如下status bar 样式 typedef NS_ENUM(NSInteger, UIStatusBarStyle) { UIStatusBarStyleDefault = , / ...

  7. Android 中SimpleDateFormat的使用注意

    以前在程序中总这样使用  SimpleDateFormat sdf=new SimpleDateFormat("hh:mma");   date1=sdf.parse(alertT ...

  8. excel复制+粘贴,怎样让公式里的参数不自动变化?

    例如,某一单元格内容为:=A1+A2 我把它复制+粘贴到其他地方,就自动变成了:=B1+B2 怎样让它不变化,仍保持=A1+A2 ?? 答: Excel一般使用相对地址来引用单元格的位置,当把一个含有 ...

  9. Ubuntu 14.04的vim编辑器配置Python开发环境

    #1 $ sudo apt-get install exuberant-ctags vim-scripts $ vim-addons install taglist #2 到:http://www.v ...

  10. Bootstrap分页插件:bootstrap-paginator

    今天和大家分享一个Bootstrap的分页插件:bootstrap-paginator. 插件地址: https://github.com/lyonlai/bootstrap-paginator 先看 ...