摘要: public int binarySearch(int[] nums, int target) { int l = 0; int r = nums.length-1; while(l<=r) { int mid = (l+r)/2; if(nums[mid]==target) return mid; 阅读全文
posted @ 2016-02-24 22:41 自朗活 阅读(112) 评论(0) 推荐(0) 编辑
摘要: @Resource public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) { super.setSqlSessionFactory(sqlSessionFactory); } //全部数据集 public List 阅读全文
posted @ 2016-02-23 17:56 自朗活 阅读(206) 评论(0) 推荐(0) 编辑
摘要: /** * * @ClassName: numberOff420 * @Description: * 报数指的是,按照其中的整数的顺序进行报数,然后得到下一个数。如下所示: 1, 11, 21, 1211, 111221, ... 1 读作 "one 1" -> 11. 11 读作 "two 1s" 阅读全文
posted @ 2016-02-19 17:09 自朗活 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 当一个项目启动时,要统计当前在线人数,那么我们可以统计一个当前有几个session登录,增加一个session,表明已经有新浏览器访问该网站。实现 阅读全文
posted @ 2016-02-19 16:05 自朗活 阅读(1205) 评论(0) 推荐(0) 编辑