摘要: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
posted @ 2017-02-17 12:06 细雨落花 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example,Given nums = [0, 1, 阅读全文
posted @ 2017-02-17 11:21 细雨落花 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at lea 阅读全文
posted @ 2017-02-15 16:24 细雨落花 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
posted @ 2017-02-10 18:01 细雨落花 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return 例 i = 5的生成过程: i = 0 row = [1]; 内层循环不执行; allrows 阅读全文
posted @ 2017-02-10 12:13 细雨落花 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 今天用location.href跳转页面的时候遇到了一个问题。 给一个按钮添加点击事件,在js里实现跳转页面,并传递一个参数。 但是到后台getPara("id")的时候却得到null,调试找不出原因,网上也搜不到类似的问题,最后发现是前端人员没看到js里的跳转事件以为不能跳转,于是在a标签里添加了 阅读全文
posted @ 2016-10-26 12:51 细雨落花 阅读(2562) 评论(0) 推荐(0) 编辑
摘要: String[] string = "".split(","); 结果是string = []; String[] string = " ".split(","); 结果是sring = [ ]; 阅读全文
posted @ 2016-10-25 14:56 细雨落花 阅读(116) 评论(0) 推荐(0) 编辑
摘要: for (var i in checkedBoxIds) { var $td = $("#" + checkedBoxIds[i]).parent().parent().detach(); $('#table-selected').append($td); } 阅读全文
posted @ 2016-10-25 09:44 细雨落花 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 最近跟着部门做一个项目,经理分工明确,每个人都有自己的任务,我的却迟迟没有进展,今天下午终于找到了原因:因为我在做这个模块之前没有想清楚要做什么,以及怎么做。换言之,就是对自己要做的事情没有一个总体的了解。这就直接导致在做的过程中不断的走岔路,代码总是删了重写删了重写,浪费了时间,还没有输出。直到今 阅读全文
posted @ 2016-10-24 16:05 细雨落花 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 上一篇中说道了列式存储中新增表单时后台接收数据问题,在存入数据库时一次插入多条数据,就要用到事务。 JFinal中有个封装好的事务应用,用起来非常方便简单。 写法1: result值为true则操作成功,为false则回滚。 事务DB.tx()本身也返回一个boolean值,表示最终操作结果是否成功 阅读全文
posted @ 2016-10-18 13:51 细雨落花 阅读(3653) 评论(0) 推荐(0) 编辑