上一页 1 2 3 4 5 6 7 8 ··· 23 下一页
摘要: 1. I/O是用字节流或字符流操作文件用的,连接本地磁盘和网络。 2. InputStream(File.., Buffer..) , OutputStream (File.., Buffer..), Reader(File.., Buffer..), Writter (File.., Buffer 阅读全文
posted @ 2020-02-07 15:10 Coca-code 阅读(94) 评论(0) 推荐(0)
摘要: 1. 集合:分单列(Collection)和双列(Map); 2. 集合中只能存引用类型数据(若存基本类型,则装箱),长度随意;集合区别于数组,数组:可存引用类型 + 基本类型,通吃!长度固定; 3. max(); sort(); reverse(); shuffle();.. 3.1单例(List 阅读全文
posted @ 2020-02-07 13:44 Coca-code 阅读(97) 评论(0) 推荐(0)
摘要: //1. String常用构造方法 String(byte[] byte, int offset, int length); String(char[] char, int offset, int count); String(char[] value); //2. 常用方法 char charAt 阅读全文
posted @ 2020-02-06 20:48 Coca-code 阅读(73) 评论(0) 推荐(0)
摘要: m + (new Random().nextInt(n - (m + 1))); 阅读全文
posted @ 2020-02-01 13:07 Coca-code 阅读(156) 评论(0) 推荐(0)
摘要: String t; t = String.valueOf(new Date().getTime()); //String t1; //t1 = String.valueOf(System.currentTimeMillis()); 阅读全文
posted @ 2020-01-28 18:55 Coca-code 阅读(133) 评论(0) 推荐(0)
摘要: --------------------------- -------------------------------------------- ----------------------------------------- ---------------------------------------------- -----------------------... 阅读全文
posted @ 2020-01-21 13:38 Coca-code 阅读(149) 评论(0) 推荐(0)
摘要: 1. servlet是服务器一个有着发/收请求和回应的java模块。servlet可以抽象提取,比如抽取成baseServlet, 然后,让每个领域模块继承它 userServlet extends baseServlet。。。 2. getContextPath()是获取系统路劲,文件的服务器路劲 阅读全文
posted @ 2020-01-14 21:19 Coca-code 阅读(123) 评论(0) 推荐(0)
摘要: ... 1. 相比fs.readFile(); fs.createReadStream();分段读取更利于读文件, 可以读取4G文件, 前者方法的话buffer溢出 2. stream的end和close有区别, 前者是资源没了,后者是破坏资源流(文件pipe)的“管子” 3. A.pipe(B); 阅读全文
posted @ 2019-02-16 11:26 Coca-code 阅读(139) 评论(0) 推荐(0)
摘要: ... 1. var fs = require("fs"); // 文件系统, js写不出来,底层C或C++语言实现,也是Node.js魅力所在 2. fs.existsSync("文件.后缀"); //直接判断是否存在 fs.exists("文件.后缀", ifExists => {console 阅读全文
posted @ 2019-02-14 23:47 Coca-code 阅读(112) 评论(0) 推荐(0)
摘要: ... 1. process.cwd(); //当前shell进程所在的目录; 2. process.chdir("/"); //即切换至根目录 3. process.execPath() ; //bin目录 4. var path = require("path"); path.seq(); // 阅读全文
posted @ 2019-02-14 22:52 Coca-code 阅读(101) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 23 下一页