2022年5月10日

正则表达式笔记

摘要: 一些基本的符号: ^ 匹配输入字行首 $ 匹配输入行尾 [abc] 匹配集合,匹配所包含的任意一个字符。 [^abc] 反向匹配集合,匹配未包含的任意一个字符。 [a-z] 字符范围。匹配指定范围内的任意字符。 {n} n是一个非负整数。匹配确定的n次。 {n,} n是一个非负整数。至少匹配n次。 阅读全文

posted @ 2022-05-10 15:11 胜者为王东恺 阅读(34) 评论(0) 推荐(0)

2022年4月24日

Java将List<String>转换为,隔开的字符串的方法

摘要: List<String> list = new ArrayList<String>(); list.add("1");list.add("2");list.add(null);list.add("3");list.add("4"); 1. String.join()方法: String str = 阅读全文

posted @ 2022-04-24 14:21 胜者为王东恺 阅读(2508) 评论(0) 推荐(0)

2022年3月22日

js保留几位为小数并去掉小数末尾的0

摘要: var a = 3.1415926;a.toFixed(2); //3.14var b = 3.0001;b.toFixed(2); //3.00如果想去掉0可以用parseFloat方法:parseFloat(b.toFixed(2)); //3 阅读全文

posted @ 2022-03-22 11:04 胜者为王东恺 阅读(1399) 评论(0) 推荐(0)

2022年2月7日

vue-cli · Failed to download repo vuejs-templates/webpack: connect ETIMEDOUT 20.205.243.166:443

摘要: 在vscode中创建vue项目,跟着网上的教程走,到了vue init webpack name这一步就报了错误: vue-cli · Failed to download repo vuejs-templates/webpack: connect ETIMEDOUT 20.205.243.166: 阅读全文

posted @ 2022-02-07 15:43 胜者为王东恺 阅读(4683) 评论(0) 推荐(1)

2021年12月1日

poi导入excel解析为实体类集合

摘要: JSON用的 fastjson-1.2.70.jar poi用的3.17 import com.alibaba.fastjson.JSONObject; import org.apache.poi.hssf.usermodel.HSSFDateUtil; import org.apache.poi. 阅读全文

posted @ 2021-12-01 10:05 胜者为王东恺 阅读(486) 评论(0) 推荐(0)

2020年6月28日

poi导出excel根据列合并单元格

摘要: 业务需求是要求把一个树结构的数据导出成excel格式的文件,大概是这样的: 上代码: /** * 用于保存需要合并的单元格 */ public class MergeModel { private String content;//内容 private int rowIndex;//记录相同内容的开 阅读全文

posted @ 2020-06-28 23:23 胜者为王东恺 阅读(1674) 评论(0) 推荐(0)

2020年6月19日

Ztree中去掉节点前面的+-图标

摘要: 在css中添加:.ztree li span.button.switch.level0 {display:none;} 官方文档:http://www.treejs.cn/v3/api.php 阅读全文

posted @ 2020-06-19 15:14 胜者为王东恺 阅读(980) 评论(0) 推荐(0)

判断字符串是不是以某个字符串开头

摘要: String.startsWith(String prefix) 例: String str1 = "abcdefg"; str1.startsWith("a");//true 阅读全文

posted @ 2020-06-19 15:09 胜者为王东恺 阅读(380) 评论(0) 推荐(0)

jQuery 页面加载完成时执行

摘要: 1. $(document).ready(function (){ });2. $(function(){ });3. window.onload = function(){ }; 阅读全文

posted @ 2020-06-19 14:58 胜者为王东恺 阅读(166) 评论(0) 推荐(0)

导航