摘要: //数组去重 //优化遍历数组法 function uniqueArr(array) { var r = []; for (var i = 0, l = array.length; i < l; i++) { for (var j = i + 1; j < l; j++) if (array[i]. 阅读全文
posted @ 2024-04-26 15:44 一隅桥畔 阅读(3) 评论(0) 推荐(0) 编辑
摘要: Map<String, List<OperationNodeVo>> listMap = nodeVoList.stream().collect(Collectors.groupingBy(OperationNodeVo::getNodeCode)); 阅读全文
posted @ 2024-04-26 15:03 一隅桥畔 阅读(5) 评论(0) 推荐(0) 编辑
摘要: List<Map<String, Object>> list = new ArrayList<>(); Map<String, Object> map1 = new HashMap<>(); map1.put("name", "苹果"); map1.put("code", "apple"); lis 阅读全文
posted @ 2024-04-15 14:29 一隅桥畔 阅读(22) 评论(0) 推荐(0) 编辑
摘要: -- extract只能从date类型中提取年、月、日 -- 年 select extract(year from sysdate) from dual; -- 月 select extract(month from sysdate) from dual; -- 日 select extract(d 阅读全文
posted @ 2024-04-15 14:19 一隅桥畔 阅读(36) 评论(0) 推荐(0) 编辑
摘要: -- mysql生成uuid select uuid(); -- 替换- select replace(uuid(),'-',''); 阅读全文
posted @ 2024-04-01 17:19 一隅桥畔 阅读(2) 评论(0) 推荐(0) 编辑
摘要: -- sql server生成uuid select newid(); -- 替换- select replace(newid(),'-',''); 阅读全文
posted @ 2024-04-01 17:17 一隅桥畔 阅读(18) 评论(0) 推荐(0) 编辑
摘要: -- oracle生成uuid select sys_guid() from dual; -- 解决乱码 select rawtohex(sys_guid()) from dual; 阅读全文
posted @ 2024-04-01 17:16 一隅桥畔 阅读(7) 评论(0) 推荐(0) 编辑
摘要: //获取前一天的日期 var date = new Date(); date.setDate(date.getDate()-1);//设置为前一天 console.log("前一天的日期:" + date.toLocaleString()); //获取上个月的日期 var date = new Da 阅读全文
posted @ 2024-03-13 17:12 一隅桥畔 阅读(132) 评论(0) 推荐(0) 编辑
摘要: //获取当月的第一天 var date = new Date(); date.setMonth(date.getMonth(), 1);//将日期设置为本月的第一天 console.log("当月的第一天:" + date); //获取当月的最后一天 var date = new Date(); d 阅读全文
posted @ 2024-03-13 14:22 一隅桥畔 阅读(97) 评论(0) 推荐(0) 编辑
摘要: /** * 返回中文的首字母 */ public static String getPinYinHeadChar(String str) { String sb = ""; for (int j = 0; j < str.length(); j++) { char word = str.charAt 阅读全文
posted @ 2024-01-31 22:36 一隅桥畔 阅读(4) 评论(0) 推荐(0) 编辑