1 工程所需jar包如下:
commons-codec-1.5.jar
commons-logging-1.1.jar
log4j-1.2.13.jar
junit-3.8.1.jar
poi-3.9-20121203.jar

2 Code:

  1. /**
  2. * 导出设备信息Excel
  3. * @param form 和 HTTP 请求相关的表格对象
  4. * @param resources 信息资源对象
  5. * @param locale 本地化对象
  6. * @param session HTTP 会话对象
  7. * @param request HTTP 请求对象
  8. * @param response HTTP 响应对象
  9. * @return
  10. */
  11. public String exportExcel(DynaBean form, MessageResources resources,
  12. Locale locale, HttpSession session, HttpServletRequest request,
  13. HttpServletResponse response) throws Exception{
  14. int iLanguage = (locale.getLanguage().indexOf("en")>=0)?0:1;
  15. response.reset();
  16. response.setContentType("application/vnd.ms-excel");
  17. response.setHeader("Content-Disposition","attachment;filename="+java.net.URLEncoder.encode(resources.getMessage(locale, "device.details")+".xls","UTF-8"));
  18. OutputStream sos = response.getOutputStream();
  19. List<DeviceVO> deviceList = dao.getAllDevice();
  20. HSSFWorkbook wb = new HSSFWorkbook();
  21. Map<String, CellStyle> styles = createStyles(wb);
  22. // 创建sheet页
  23. Sheet sheet = wb.createSheet("Sheet");
  24. PrintSetup printSetup = sheet.getPrintSetup();
  25. printSetup.setLandscape(true);
  26. sheet.setFitToPage(true);
  27. sheet.setHorizontallyCenter(true);
  28. /**
  29. *合并单元格的行或者列
  30. */
  31. sheet.addMergedRegion(CellRangeAddress.valueOf("$F$1:$H$1"));
  32. sheet.addMergedRegion(CellRangeAddress.valueOf("$M$1:$P$1"));
  33. sheet.addMergedRegion(CellRangeAddress.valueOf("$Q$1:$S$1"));
  34. sheet.addMergedRegion(CellRangeAddress.valueOf("$A$1:$A$2"));
  35. sheet.addMergedRegion(CellRangeAddress.valueOf("$B$1:$B$2"));
  36. sheet.addMergedRegion(CellRangeAddress.valueOf("$C$1:$C$2"));
  37. sheet.addMergedRegion(CellRangeAddress.valueOf("$D$1:$D$2"));
  38. sheet.addMergedRegion(CellRangeAddress.valueOf("$E$1:$E$2"));
  39. sheet.addMergedRegion(CellRangeAddress.valueOf("$I$1:$I$2"));
  40. sheet.addMergedRegion(CellRangeAddress.valueOf("$J$1:$J$2"));
  41. sheet.addMergedRegion(CellRangeAddress.valueOf("$K$1:$K$2"));
  42. sheet.addMergedRegion(CellRangeAddress.valueOf("$L$1:$L$2"));
  43. sheet.addMergedRegion(CellRangeAddress.valueOf("$T$1:$T$2"));
  44. sheet.addMergedRegion(CellRangeAddress.valueOf("$U$1:$U$2"));
  45. sheet.addMergedRegion(CellRangeAddress.valueOf("$V$1:$V$2"));
  46. sheet.addMergedRegion(CellRangeAddress.valueOf("$W$1:$W$2"));
  47. sheet.addMergedRegion(CellRangeAddress.valueOf("$X$1:$X$2"));
  48. sheet.addMergedRegion(CellRangeAddress.valueOf("$Y$1:$Y$2"));
  49. sheet.addMergedRegion(CellRangeAddress.valueOf("$Z$1:$Z$2"));
  50. sheet.addMergedRegion(CellRangeAddress.valueOf("$AA$1:$AA$2"));
  51. sheet.addMergedRegion(CellRangeAddress.valueOf("$AB$1:$AB$2"));
  52.  
  53. // 创建表头
  54. Row headerRow = sheet.createRow(0);
  55. headerRow.setHeightInPoints(30);
  56. Cell headerCell;
  57.  
  58. headerCell = headerRow.createCell(0);
  59. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.number")); //设备编号
  60. headerCell.setCellStyle(styles.get("header"));
  61.  
  62. headerCell = headerRow.createCell(1);
  63. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.qrcode")); //设备二维码
  64. headerCell.setCellStyle(styles.get("header"));
  65.  
  66. headerCell = headerRow.createCell(2);
  67. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.customerbase")); //客户群
  68. headerCell.setCellStyle(styles.get("header"));
  69.  
  70. headerCell = headerRow.createCell(3);
  71. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.customertype")); //客户类别
  72. headerCell.setCellStyle(styles.get("header"));
  73.  
  74. headerCell = headerRow.createCell(4);
  75. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.customername")); //客户名称
  76. headerCell.setCellStyle(styles.get("header"));
  77.  
  78. headerCell = headerRow.createCell(5);
  79. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.area")); //设备区域
  80. headerCell.setCellStyle(styles.get("header"));
  81.  
  82. headerCell = headerRow.createCell(8);
  83. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.itemname")); //所属项目名称
  84. headerCell.setCellStyle(styles.get("header"));
  85.  
  86. headerCell = headerRow.createCell(9);
  87. headerCell.setCellValue(resources.getMessage(locale, "device.category")); //设备类别
  88. headerCell.setCellStyle(styles.get("header"));
  89.  
  90. headerCell = headerRow.createCell(10);
  91. headerCell.setCellValue(resources.getMessage(locale, "device.name")); //设备名称
  92. headerCell.setCellStyle(styles.get("header"));
  93.  
  94. headerCell = headerRow.createCell(11);
  95. headerCell.setCellValue(resources.getMessage(locale, "device.no")); //设备信息编号
  96. headerCell.setCellStyle(styles.get("header"));
  97.  
  98. headerCell = headerRow.createCell(12);
  99. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.baseinfomation")); //设备基本信息
  100. headerCell.setCellStyle(styles.get("header"));
  101.  
  102. headerCell = headerRow.createCell(16);
  103. headerCell.setCellValue(resources.getMessage(locale, "device.location")); //设备位置
  104. headerCell.setCellStyle(styles.get("header"));
  105.  
  106. headerCell = headerRow.createCell(19);
  107. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.enabledate")); //设备启用日期
  108. headerCell.setCellStyle(styles.get("header"));
  109.  
  110. headerCell = headerRow.createCell(20);
  111. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.backendload")); //后端负载
  112. headerCell.setCellStyle(styles.get("header"));
  113.  
  114. headerCell = headerRow.createCell(21);
  115. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.operationtips")); //操作提示
  116. headerCell.setCellStyle(styles.get("header"));
  117.  
  118. headerCell = headerRow.createCell(22);
  119. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.maintenancepeople")); //维护责任人
  120. headerCell.setCellStyle(styles.get("header"));
  121.  
  122. headerCell = headerRow.createCell(23);
  123. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.usetime")); //巡检时间
  124. headerCell.setCellStyle(styles.get("header"));
  125.  
  126. headerCell = headerRow.createCell(24);
  127. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.intervaltime")); //巡检下台设备时间间隔
  128. headerCell.setCellStyle(styles.get("header"));
  129.  
  130. headerCell = headerRow.createCell(25);
  131. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.patrolpath")); //巡检路径
  132. headerCell.setCellStyle(styles.get("header"));
  133.  
  134. headerCell = headerRow.createCell(26);
  135. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.enable")); //是否启用巡检路径
  136. headerCell.setCellStyle(styles.get("header"));
  137.  
  138. headerCell = headerRow.createCell(27);
  139. headerCell.setCellValue(resources.getMessage(locale, "device.export.excel.other")); //其他信息
  140. headerCell.setCellStyle(styles.get("header"));
  141.  
  142. Row headerRowRegion = sheet.createRow(1);
  143. headerRowRegion.setHeightInPoints(15);
  144. Cell headerCellRegion;
  145. headerCellRegion = headerRowRegion.createCell(5);
  146. headerCellRegion.setCellValue(resources.getMessage(locale, "device.export.excel.province")); //省份
  147. headerCellRegion.setCellStyle(styles.get("header"));
  148.  
  149. headerCellRegion = headerRowRegion.createCell(6);
  150. headerCellRegion.setCellValue(resources.getMessage(locale, "device.export.excel.region")); //市
  151. headerCellRegion.setCellStyle(styles.get("header"));
  152.  
  153. headerCellRegion = headerRowRegion.createCell(7);
  154. headerCellRegion.setCellValue(resources.getMessage(locale, "device.export.excel.county")); //县/区
  155. headerCellRegion.setCellStyle(styles.get("header"));
  156.  
  157. headerCellRegion = headerRowRegion.createCell(12);
  158. headerCellRegion.setCellValue(resources.getMessage(locale, "device.export.excel.brand")); //品牌
  159. headerCellRegion.setCellStyle(styles.get("header"));
  160.  
  161. headerCellRegion = headerRowRegion.createCell(13);
  162. headerCellRegion.setCellValue(resources.getMessage(locale, "device.export.excel.model")); //型号
  163. headerCellRegion.setCellStyle(styles.get("header"));
  164.  
  165. headerCellRegion = headerRowRegion.createCell(14);
  166. headerCellRegion.setCellValue(resources.getMessage(locale, "device.export.excel.capacity")); //容量
  167. headerCellRegion.setCellStyle(styles.get("header"));
  168.  
  169. headerCellRegion = headerRowRegion.createCell(15);
  170. headerCellRegion.setCellValue(resources.getMessage(locale, "device.export.excel.systemtype")); //系统类型
  171. headerCellRegion.setCellStyle(styles.get("header"));
  172.  
  173. headerCellRegion = headerRowRegion.createCell(16);
  174. headerCellRegion.setCellValue(resources.getMessage(locale, "device.build")); //楼号
  175. headerCellRegion.setCellStyle(styles.get("header"));
  176.  
  177. headerCellRegion = headerRowRegion.createCell(17);
  178. headerCellRegion.setCellValue(resources.getMessage(locale, "device.floor")); //楼层
  179. headerCellRegion.setCellStyle(styles.get("header"));
  180.  
  181. headerCellRegion = headerRowRegion.createCell(18);
  182. headerCellRegion.setCellValue(resources.getMessage(locale, "device.room")); //房间号
  183. headerCellRegion.setCellStyle(styles.get("header"));
  184.  
  185. for(int i=0;i<deviceList.size();i++){
  186. DeviceVO device = deviceList.get(i);
  187. Cell rowCell;
  188. Row cellRow = sheet.createRow(i + 2);
  189.  
  190. rowCell = cellRow.createCell(0);
  191. rowCell.setCellValue(device.getDeviceId());
  192. rowCell.setCellStyle(styles.get("cell"));
  193.  
  194. rowCell = cellRow.createCell(1);
  195. rowCell.setCellValue(device.getQrcode());
  196. rowCell.setCellStyle(styles.get("cell"));
  197.  
  198. rowCell = cellRow.createCell(2);
  199. //判断是否是中文
  200. if(iLanguage==1){
  201. rowCell.setCellValue(device.getItemId().getCustomerBase().substring(device.getItemId().getCustomerBase().indexOf(":")+1,device.getItemId().getCustomerBase().length()));
  202. }else if(iLanguage==0){ //判断是否是英文
  203. rowCell.setCellValue(device.getItemId().getCustomerBase().substring(0,device.getItemId().getCustomerBase().indexOf(":")));
  204. }
  205. rowCell.setCellStyle(styles.get("cell"));
  206.  
  207. rowCell = cellRow.createCell(3);
  208. //判断是否是中文
  209. if(iLanguage==1){
  210. rowCell.setCellValue(device.getItemId().getCustomerType().substring(device.getItemId().getCustomerType().indexOf(":")+1,device.getItemId().getCustomerType().length()));
  211. }else if(iLanguage==0){ //判断是否是英文
  212. rowCell.setCellValue(device.getItemId().getCustomerType().substring(0,device.getItemId().getCustomerType().indexOf(":")));
  213. }
  214. rowCell.setCellStyle(styles.get("cell"));
  215.  
  216. rowCell = cellRow.createCell(4);
  217. rowCell.setCellValue(device.getItemId().getCustomerName());
  218. rowCell.setCellStyle(styles.get("cell"));
  219.  
  220. rowCell = cellRow.createCell(5);
  221. rowCell.setCellValue(device.getItemId().getProvince());
  222. rowCell.setCellStyle(styles.get("cell"));
  223.  
  224. rowCell = cellRow.createCell(6);
  225. rowCell.setCellValue(device.getItemId().getCity());
  226. rowCell.setCellStyle(styles.get("cell"));
  227.  
  228. rowCell = cellRow.createCell(7);
  229. rowCell.setCellValue(device.getItemId().getCounty());
  230. rowCell.setCellStyle(styles.get("cell"));
  231.  
  232. rowCell = cellRow.createCell(8);
  233. //判断是否是中文
  234. if(iLanguage==1){
  235. rowCell.setCellValue(device.getItemId().getItemName());
  236. }else if(iLanguage==0){ //判断是否是英文
  237. rowCell.setCellValue(device.getItemId().getForShort());
  238. }
  239. rowCell.setCellStyle(styles.get("cell"));
  240.  
  241. rowCell = cellRow.createCell(9);
  242. //判断是否是中文
  243. if(iLanguage==1){
  244. rowCell.setCellValue(device.getZequipId().getZequipGroup().getNameLoc());
  245. }else if(iLanguage==0){ //判断是否是英文
  246. rowCell.setCellValue(device.getZequipId().getZequipGroup().getNameEn());
  247. }
  248. rowCell.setCellStyle(styles.get("cell"));
  249.  
  250. rowCell = cellRow.createCell(10);
  251. rowCell.setCellValue(device.getDeviceName());
  252. rowCell.setCellStyle(styles.get("cell"));
  253.  
  254. rowCell = cellRow.createCell(11);
  255. rowCell.setCellValue(device.getDeviceNo());
  256. rowCell.setCellStyle(styles.get("cell"));
  257.  
  258. rowCell = cellRow.createCell(12);
  259. rowCell.setCellValue(device.getDeviceBrand());
  260. rowCell.setCellStyle(styles.get("cell"));
  261.  
  262. rowCell = cellRow.createCell(13);
  263. rowCell.setCellValue(device.getEquipDriveId().getModel());
  264. rowCell.setCellStyle(styles.get("cell"));
  265.  
  266. rowCell = cellRow.createCell(14);
  267. rowCell.setCellValue(device.getDeviceCapacity());
  268. rowCell.setCellStyle(styles.get("cell"));
  269.  
  270. rowCell = cellRow.createCell(15);
  271. rowCell.setCellValue(device.getSystemType());
  272. rowCell.setCellStyle(styles.get("cell"));
  273.  
  274. rowCell = cellRow.createCell(16);
  275. rowCell.setCellValue(device.getStairsNo());
  276. rowCell.setCellStyle(styles.get("cell"));
  277.  
  278. rowCell = cellRow.createCell(17);
  279. rowCell.setCellValue(device.getFloor());
  280. rowCell.setCellStyle(styles.get("cell"));
  281.  
  282. rowCell = cellRow.createCell(18);
  283. rowCell.setCellValue(device.getRoomNo());
  284. rowCell.setCellStyle(styles.get("cell"));
  285.  
  286. rowCell = cellRow.createCell(19);
  287. rowCell.setCellValue(device.getEnableDate()!=null ? new SimpleDateFormat("yyyy-MM-dd").format(device.getEnableDate()) : "");
  288. rowCell.setCellStyle(styles.get("cell"));
  289.  
  290. rowCell = cellRow.createCell(20);
  291. rowCell.setCellValue(device.getBackendLoad());
  292. rowCell.setCellStyle(styles.get("cell"));
  293.  
  294. rowCell = cellRow.createCell(21);
  295. rowCell.setCellValue(device.getOperationTips());
  296. rowCell.setCellStyle(styles.get("cell"));
  297.  
  298. rowCell = cellRow.createCell(22);
  299. rowCell.setCellValue(device.getPersonId().getUserName());
  300. rowCell.setCellStyle(styles.get("cell"));
  301.  
  302. rowCell = cellRow.createCell(23);
  303. rowCell.setCellValue(device.getInspecTime()+resources.getMessage(locale, "device.export.excel.minute"));
  304. rowCell.setCellStyle(styles.get("cell"));
  305.  
  306. rowCell = cellRow.createCell(24);
  307. rowCell.setCellValue(device.getIntervalTime()+resources.getMessage(locale, "device.export.excel.minute"));
  308. rowCell.setCellStyle(styles.get("cell"));
  309.  
  310. rowCell = cellRow.createCell(25);
  311. rowCell.setCellValue(device.getDevicePath());
  312. rowCell.setCellStyle(styles.get("cell"));
  313.  
  314. rowCell = cellRow.createCell(26);
  315. rowCell.setCellValue(device.getValidityNr() == 0 ? resources.getMessage(locale, "mmc.soft.person.disabled") : resources.getMessage(locale, "mmc.soft.person.enable"));
  316. rowCell.setCellStyle(styles.get("cell"));
  317.  
  318. rowCell = cellRow.createCell(27);
  319. rowCell.setCellValue(device.getOtherInfo() != null ? device.getOtherInfo() : "");
  320. rowCell.setCellStyle(styles.get("cell"));
  321. }
  322. wb.write(sos);
  323. sos.flush();
  324. sos.close();
  325. return null;
  326. }
  327.  
  328. //excel样式
  329. private Map<String, CellStyle> createStyles(Workbook wb)
  330. {
  331. Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
  332. CellStyle style;
  333. Font titleFont = wb.createFont();
  334. titleFont.setFontHeightInPoints((short) 18);
  335. titleFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
  336. style = wb.createCellStyle();
  337. style.setAlignment(CellStyle.ALIGN_CENTER);
  338. style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
  339. style.setFont(titleFont);
  340. styles.put("title", style);
  341.  
  342. style = wb.createCellStyle();
  343. style.setAlignment(CellStyle.ALIGN_CENTER);
  344. style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
  345. style.setWrapText(true);
  346. styles.put("header", style);
  347.  
  348. style = wb.createCellStyle();
  349. style.setAlignment(CellStyle.ALIGN_CENTER);
  350. style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
  351. style.setWrapText(true);
  352. styles.put("cell", style);
  353.  
  354. style = wb.createCellStyle();
  355. style.setAlignment(CellStyle.ALIGN_CENTER);
  356. style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
  357. style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
  358. style.setFillPattern(CellStyle.SOLID_FOREGROUND);
  359. style.setDataFormat(wb.createDataFormat().getFormat("0.00"));
  360. styles.put("formula", style);
  361.  
  362. style = wb.createCellStyle();
  363. style.setAlignment(CellStyle.ALIGN_CENTER);
  364. style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
  365. style.setFillForegroundColor(IndexedColors.GREY_40_PERCENT.getIndex());
  366. style.setFillPattern(CellStyle.SOLID_FOREGROUND);
  367. style.setDataFormat(wb.createDataFormat().getFormat("0.00"));
  368. styles.put("formula_2", style);
  369.  
  370. return styles;
  371. }

  

poi导出excel合并单元格(包括列合并、行合并)的更多相关文章

  1. Html Table用JS导出excel格式问题 导出EXCEL后单元格里的000412341234会变成412341234 7-14 会变成 2018-7-14(7月14) 自定义格式 web利用table表格生成excel格式问题 js导出excel增加表头、mso-number-format定义数据格式 数字输出格式转换 mso-number-format:"\@"

    Html Table用JS导出excel格式问题 我在网上找的JS把HTML Tabel导出成EXCEL.但是如果Table里的数字内容为0开的的导成Excel后会自动删除0,我想以text的格式写入 ...

  2. Java导出Excel表,POI 实现合并单元格以及列自适应宽度(转载)

    POI是apache提供的一个读写Excel文档的开源组件,在操作excel时常要合并单元格,合并单元格的方法是: sheet.addMergedRegion(new CellRangeAddress ...

  3. poi获取合并单元格内的第一行第一列的值

    当读取如图所示的excel时,显示为第1行 第1列 的内容是:合并单元格 其它在合并单元格区域内的单元格不显示 示例代码如下: import java.io.FileInputStream; impo ...

  4. POI 实现合并单元格以及列自适应宽度

    POI是apache提供的一个读写Excel文档的开源组件,在操作excel时常要合并单元格,合并单元格的方法是: sheet.addMergedRegion(new CellRangeAddress ...

  5. POI导出Excel--合并单元格

    package com.test.util; import java.io.FileNotFoundException; import java.io.FileOutputStream; import ...

  6. DataGridView合并单元格(一列或一行)

    #region"合并单元格的测试(一列或一行)" // int?是搜索一种类型(可空类型),普通的int不能为null,而用int?,其值可以为null //private int ...

  7. C#.Net 导出Excel 之单元格 相关设置

    range.NumberFormatLocal = "@";     //设置单元格格式为文本range = (Range)worksheet.get_Range("A1 ...

  8. 导出EXCEL设置单元格格式

    怎么设置导出的EXCEL文件的列格式 如何设置导出的EXCEL文件的列格式在office的EXCEL中我们可以在一个EXCEL文件中,选中一列再点击鼠标右键,选择设置单元格格式,可以将这一列设为文本格 ...

  9. Excel根据单元格内容设置整行颜色

    1. 选择需要设置的区域,条件格式中找到“新建规则” 2. 弹出窗口中选择“使用公式确定要设置格式的单元格”一项.填写公式如下: =IF(OR($D1="已完成",$D1=&quo ...

随机推荐

  1. Java反编译工具CFR,Procyon简介

    Java反编译工具有很多,个人觉得使用最方便的是jd-gui,当然jad也不错,jd-gui主要提供了图形界面,操作起来很方便,但是jd-gui很久没有更新了,java 7出来很久了,jd-gui在反 ...

  2. 可重入读写锁ReentrantReadWriteLock基本原理分析

    前言 本篇适用于了解ReentrantLock或ReentrantReadWriteLock的使用,但想要进一步了解原理的读者.见于之前的分析都是借鉴大量的JDK源码,这次以流程图的形式代替源码,希望 ...

  3. PHP读写INI文件

    读INI文件 public function readini($name) { if (file_exists(SEM_PATH.'init/'.$name)){ $data = parse_ini_ ...

  4. 数据库实例: STOREBOOK > 数据文件/退回字段/重做日志组|管理员

    ylbtech-Oracle:数据库实例: STOREBOOK  > 数据文件/退回字段/重做日志组|管理员 数据文件/退回字段/重做日志组|管理员 1. 数据库实例: STOREBOOK  & ...

  5. verilog语法实例学习(9)

    常用的时序电路介绍 寄存器 一个触发器可以存储一位数据,由n个触发器组成的电路可以存储n位数据,我们把这一组触发器叫做寄存器.寄存器中每个触发器共用同一个时钟. 下面是n位寄存器的代码,我们通过一个参 ...

  6. source insight 4.0.086破解

     source insight 4.0.093 破解: 1. 安装原版软件:Source Insight Version 4.0.0093 - March 20, 2018 2. 替换原主程序:sou ...

  7. iOS开发-Certificates、Identifiers和Profiles详解

    如果是才进入公司进行开发的iOS程序猿来说人难免会对苹果的证书.配置文件,尤其有的需要重头开始的公司来说,最简单的来说真机调试是免不了和这些东西打交道的,有的时候赶时间做完了可能心里也犯嘀咕,本文根据 ...

  8. Path Sum leetcode java

    题目: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up ...

  9. Android -- onMeasure

    onMeasure调用次数 当Activity获取焦点的时候,它就需要绘制布局.Android框架会处理绘制过程,但这个Activity必须提供它布局树的根节点. 绘制过程是从布局的根节点开始的.这个 ...

  10. 深度学习(Deep Learning)算法简介

    http://www.cnblogs.com/ysjxw/archive/2011/10/08/2201782.html Comments from Xinwei: 最近的一个课题发展到与深度学习有联 ...