摘要: 解决方法: 把下面代码添加到index.html文件中 <style> html,body{ margin:0; padding:0; } </style> 阅读全文
posted @ 2022-02-20 14:35 盐排骨 阅读(603) 评论(0) 推荐(0)
摘要: 类似于Java的Stream流的操作。 studentList为List对象 let a = studentList.map(x => x.name);//获取List对象的某一列的值 console.log(a.join(','));//打印出来,用逗号分隔 删除list中的某个指定的元素: re 阅读全文
posted @ 2022-02-17 17:20 盐排骨 阅读(186) 评论(0) 推荐(0)
摘要: 1.日期的转换 hh ==> 12小时制; HH ==> 24小时制 Date time = new Date(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); simpleDate 阅读全文
posted @ 2022-02-17 17:08 盐排骨 阅读(91) 评论(0) 推荐(0)
摘要: 比如说提供一个数字25,想输出它的四位数形式,0025,那么代码这样写: DecimalFormat df = new DecimalFormat("0000"); String res = df.format(25);//输出 0025 阅读全文
posted @ 2022-02-17 16:11 盐排骨 阅读(237) 评论(0) 推荐(0)
摘要: Stream修改List的某一项的属性,遍历通过foreach修改list中的值。 List<ABC> list = new ArrayList<>(); list.stream().forEach(p -> p.setABCD(p.getABCD().substring(0,10))); anyM 阅读全文
posted @ 2022-01-07 16:24 盐排骨 阅读(2429) 评论(0) 推荐(0)
摘要: 解决方法是 加上headers axios({ method: "POST", url: this.serverUrl + "Article/findById", data: this.articleId, headers: { "Content-Type": "text/plain" }, }). 阅读全文
posted @ 2021-12-15 21:24 盐排骨 阅读(122) 评论(0) 推荐(0)
摘要: 一、VS 1.代码格式化:Ctrl K + F 二、VS Code 1.代码格式化:Shift + Alt + F 三、IDEA 1.代码格式化:Ctrl + Alt + L 2.全局替換+查找:Ctrl + Shift + R 注:输入法变成繁体字是因为使用了 Ctrl + Shift + F 阅读全文
posted @ 2021-11-23 14:18 盐排骨 阅读(15) 评论(0) 推荐(0)
摘要: 读取resources目录下的文件: InputStream in = this.getClass().getResourceAsStream("/cert/xxx.pem"); 阅读全文
posted @ 2021-11-05 14:29 盐排骨 阅读(181) 评论(0) 推荐(0)
摘要: 报错:npm ERR! cb() never called! 解决方式:拷别人的依赖 阅读全文
posted @ 2021-08-24 11:03 盐排骨 阅读(127) 评论(0) 推荐(0)
摘要: 数据库是Oracle,可以用的: select * from person where name like '%'||#{name}||'%' select * from person where name like '%${name}%' 这种写法没有用: name like CONCAT('%' 阅读全文
posted @ 2021-08-13 09:41 盐排骨 阅读(159) 评论(0) 推荐(0)