上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页
摘要: Map类提供了一个称为entrySet()的方法,这个方法返回一个Map.Entry实例化后的对象集。接着,Map.Entry类提供了一个getKey()方法和一个getValue()方法,Map.Entry同时也提供了一个setValue()方法增强循环的方式:Map map = new Hash... 阅读全文
posted @ 2015-10-13 10:46 zhanggl 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 去map里面的数据scala> val map = Map("a"->1, "b"->2, "c"->3)map: scala.collection.immutable.Map[String,Int] = Map(a -> 1, b -> 2, c -> 3)scala> map("b")res4:... 阅读全文
posted @ 2015-10-10 20:29 zhanggl 阅读(153) 评论(0) 推荐(0) 编辑
摘要: ArrayBuffer 相当于ArrayList 是有序的。val a = ArrayBuffer[Int]()a: scala.collection.mutable.ArrayBuffer[Int] = ArrayBuffer()scala> a+= 1res4: a.type = ArrayB... 阅读全文
posted @ 2015-10-10 07:40 zhanggl 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 进入zk客户端./bin/zkCli.sh -server ip:2181显示所有的内容: ls /删除数据: rmr /filename path 阅读全文
posted @ 2015-10-09 17:10 zhanggl 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 正则表达式实现去掉数据中中指定的内容:实现去掉文本数据中: img_width=="640" img_height="360" 的全部内容String replace = contentresults.replaceAll("img_width=\"\\d+\"", " ");String repl... 阅读全文
posted @ 2015-10-09 14:12 zhanggl 阅读(105) 评论(0) 推荐(0) 编辑
摘要: svn更新的时候断电,下次在更新出现svn: sqlite: database disk image is malformed 这种悲催的事情竟然发生了解决办法: 阅读全文
posted @ 2015-09-25 18:01 zhanggl 阅读(1036) 评论(0) 推荐(0) 编辑
摘要: 第一条和第三条不应该出现的。解决办法 阅读全文
posted @ 2015-09-23 16:19 zhanggl 阅读(2781) 评论(0) 推荐(0) 编辑
摘要: 读取.properties 文件 配置文件的一种,内容以键值对的形式存在,且每个键值对独占一行。#号作为行注释的起始标志,中文注释会自动进行unicode编码。示例:# ip and port of server socketip=127.0.0.1port=9999# error messagem... 阅读全文
posted @ 2015-09-20 22:19 zhanggl 阅读(303) 评论(0) 推荐(0) 编辑
摘要: Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.For example, givenn... 阅读全文
posted @ 2015-09-19 20:36 zhanggl 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 实现思路: 实现Java读取TXT文件中的内容并存到内存,将内存中的数据和mysql 数据库里面某张表数据的字段做一个比较,如果比较内存中的数据在mysql 里存在则不做处理,如果不存在则将该数据插入mysql数据库中步骤1、读取文本数据 给一个string 返回值步骤2、查询mysql 表中数据 ... 阅读全文
posted @ 2015-09-17 12:34 zhanggl 阅读(785) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页