2017年9月26日
摘要: 偶尔需要我们比较两个数组,在一个数组中删除另一个数组存在的值。我们常常用的方法是循环比较判断并删除,最近看到另一个好方法巧妙删除的例子: var arr1 = ["i", "b", "c", "d", "e", "f","x"]; //数组A var arr2 = ["a", "b",&# 阅读全文
posted @ 2017-09-26 21:45 陌生街中吹起褪色故梦 阅读(3439) 评论(0) 推荐(0) 编辑
  2017年3月18日
摘要: 在Java Collections Framework中,不同类型的集合使用不同类型的数据结构以不同的方式存储它们的元素。 集合框架提供了遍历集合的以下方法: 使用迭代器 使用for-each循环 使用forEach()方法 使用迭代器 迭代器可以对集合执行以下三个操作: 检查是否有尚未访问的元素。 阅读全文
posted @ 2017-03-18 22:24 陌生街中吹起褪色故梦 阅读(209) 评论(0) 推荐(0) 编辑
  2016年7月27日
摘要: ajax基本用法: $.ajax({ url: ctx + "controller/test", type: "post", data : { A:"a", B:"b" }, dataType:"json", success: function (data) { //后台返回success ... 阅读全文
posted @ 2016-07-27 09:59 陌生街中吹起褪色故梦 阅读(253) 评论(0) 推荐(0) 编辑
  2016年7月26日
摘要: http://www.cnblogs.com/nerxious/archive/2012/12/17/2821545.html 阅读全文
posted @ 2016-07-26 10:42 陌生街中吹起褪色故梦 阅读(99) 评论(0) 推荐(0) 编辑
  2016年7月19日
摘要: 中文排序 public static void main(String[] args) { ArrayList list = new ArrayList(); list.add("一鸣惊人-Y"); list.add("人山人海-R"); list.add("海阔天空-H"); list.add("空前绝后-K"); list.add("后来居上-... 阅读全文
posted @ 2016-07-19 10:09 陌生街中吹起褪色故梦 阅读(171) 评论(0) 推荐(0) 编辑
摘要: public static void main(String args[]){ List list = new ArrayList(); list.add("luojiahui"); list.add("luojiafeng"); //方法1 Iterator it1 = list.iterator(); ... 阅读全文
posted @ 2016-07-19 09:41 陌生街中吹起褪色故梦 阅读(18183) 评论(0) 推荐(1) 编辑
摘要: List> list = new ArrayList>(); Map map = new HashMap(); map.put("key1", "value1"); map.put("key2", "value2"); list.add(map); for (Map m : list) { for (String k : m.keySet()) { System.ou... 阅读全文
posted @ 2016-07-19 09:27 陌生街中吹起褪色故梦 阅读(244) 评论(0) 推荐(0) 编辑
  2016年7月12日
摘要: Oracle: create table load( id char(200) not null, title varchar2(100) not null, time varchar2(100) not null, def1 varchar2(100), def2 varchar2(200), d 阅读全文
posted @ 2016-07-12 11:07 陌生街中吹起褪色故梦 阅读(805) 评论(0) 推荐(0) 编辑
  2016年7月8日
摘要: 方法一:利用ResultSet的getRow方法来获得ResultSet的总行数 ResultSet rs = ps.executeQuery(sql); rs.last(); //移到最后一行 int rowCount = rs.getRow();//得到当前行号,也就是记录数 rs.before 阅读全文
posted @ 2016-07-08 18:36 陌生街中吹起褪色故梦 阅读(17728) 评论(0) 推荐(1) 编辑
  2016年7月7日
摘要: public static void main(String[] args) { Map<String, String> map = new HashMap<String, String>(); map.put("1", "value1"); map.put("2", "value2"); map. 阅读全文
posted @ 2016-07-07 18:31 陌生街中吹起褪色故梦 阅读(165) 评论(0) 推荐(0) 编辑