摘要: 浅拷贝(克隆)与深拷贝(克隆) 先来看一个简单的例子,我们希望复制一个set对象,在修改这个复制对象的时候,原有的set对象不应该改变 接下来举两种复制方法,我们应该选择哪一个呢? Set<String> copiedSet = originalSet; Set<String> copiedSet 阅读全文
posted @ 2025-05-28 18:36 IPJRI 阅读(109) 评论(0) 推荐(0)
摘要: 举一个简单的例子,我们希望给一个长字符串出现的每个字符的数量进行打表 这里给出部分代码 String p; HashMap<Character,Integer> map =new HashMap<>();//使用hashmap存键值对 for(int i =0;i<stringLong;i++){ 阅读全文
posted @ 2025-05-28 17:01 IPJRI 阅读(365) 评论(2) 推荐(0)
摘要: 来源网络,作为个人记录使用 手动在excel中添加勾选框不复杂,但是添加多个的时候会很麻烦,特别是在做数据分析时,选择框属性应该绑定在对应单元格下,使用普通的填充方式无法到达要求,因此使用VBA宏命令批量添加. 1 Sub 添加复选框() 2 '标题' 3 Application.ScreenUpd 阅读全文
posted @ 2024-02-29 16:18 IPJRI 阅读(521) 评论(0) 推荐(0)
摘要: String fileName = new String(fileNameTemp.getBytes("UTF-8"), "UTF-8"); 阅读全文
posted @ 2022-10-24 15:17 IPJRI 阅读(258) 评论(0) 推荐(0)
摘要: if ($object$.contains("\\") || $object$.contains("/") || $object$.contains(":") || $object$.contains(">") || $object$.contains("<") || $object$.contai 阅读全文
posted @ 2022-10-24 15:16 IPJRI 阅读(40) 评论(0) 推荐(0)
摘要: Alert alert = new Alert(Alert.AlertType.ERROR);alert.setTitle("错误");alert.setHeaderText("报错信息,请联系技术服务人员");alert.setContentText(e.toString()+"\n"+e.get 阅读全文
posted @ 2022-10-24 15:11 IPJRI 阅读(22) 评论(0) 推荐(0)
摘要: FileChooser fc = new FileChooser();fc.setTitle("请选择文件保存位置");fc.setInitialDirectory($原始文件位置$); //桌面位置 private final static File homeDirectory = FileSys 阅读全文
posted @ 2022-10-21 09:45 IPJRI 阅读(63) 评论(0) 推荐(0)