随笔分类 -  Java

摘要:public static void main(String[] args) { int h = 5; int m = 45; int s = 2; int ms = 67; // 补零 System.out.println(String.format("%02d:%02d:%02d,%03d", 阅读全文
posted @ 2022-04-03 10:47 淡怀 阅读(468) 评论(0) 推荐(0) 编辑
摘要:一、删除ArrayList中重复元素,保持顺序 /** * 删除ArrayList中重复元素,保持顺序 * * @param list 有重复的list * @return 去重后的list */ public static List removeDuplicateWithOrder(List li 阅读全文
posted @ 2022-04-02 16:20 淡怀 阅读(520) 评论(0) 推荐(0) 编辑
摘要:一、需要多线程执行的任务 package thread; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; /** * @Author: * @Date: 2022/3/23 1 阅读全文
posted @ 2022-03-23 14:18 淡怀 阅读(299) 评论(0) 推荐(0) 编辑
摘要:一、需要多线程执行的任务 package thread; import java.text.SimpleDateFormat; import java.util.Date; /** * @Author: * @Date: 2022/3/23 10:53 * @Description: * @Vers 阅读全文
posted @ 2022-03-23 11:10 淡怀 阅读(212) 评论(0) 推荐(0) 编辑
摘要:官网:https://gatling.io/ Gatling简单测试SpringBoot工程: https://www.cnblogs.com/sanshengshui/p/9750478.html 阅读全文
posted @ 2022-03-10 14:08 淡怀 阅读(42) 评论(0) 推荐(0) 编辑
摘要:1、maven依赖 <!-- 下载文件 --> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>4.1.2</version> </dependency> <!-- 操作ex 阅读全文
posted @ 2022-01-07 00:00 淡怀 阅读(1159) 评论(0) 推荐(0) 编辑
摘要:maven依赖 <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>4.1.2</version> </dependency> 测试 import cn.hutool.http. 阅读全文
posted @ 2022-01-06 22:08 淡怀 阅读(388) 评论(0) 推荐(0) 编辑
摘要:一、maven依赖 <!-- 操作sqlite数据库 start--> <!-- https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc --> <dependency> <groupId>org.xerial</groupId> <art 阅读全文
posted @ 2020-06-29 01:27 淡怀 阅读(467) 评论(0) 推荐(0) 编辑
摘要:1、编译报错 Error:(16, 8) java: 无法将类 uiauto.web.common.OperationNewLabelPageImpl中的构造器 OperationNewLabelPageImpl应用到给定类型; 需要: org.openqa.selenium.chrome.Chro 阅读全文
posted @ 2020-06-23 23:13 淡怀 阅读(17078) 评论(0) 推荐(0) 编辑
摘要:一、效果 二、代码 2.1、maven依赖 <!-- lombok插件 start--> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.8</versio 阅读全文
posted @ 2020-06-17 12:56 淡怀 阅读(1081) 评论(0) 推荐(1) 编辑
摘要:1、安装Scene Builder以及IDEA配置Scene Builder:https://blog.csdn.net/u011781521/article/details/86632482 备注:Scene Builder的作用就是相当于QT的设计师(即解析生成界面的代码) 2、组件使用:htt 阅读全文
posted @ 2020-06-05 18:11 淡怀 阅读(9721) 评论(0) 推荐(0) 编辑
摘要:一、原理: http://www.ruanyifeng.com/blog/2011/07/principle_of_similar_image_search.html http://www.ruanyifeng.com/blog/2013/03/similar_image_search_part_i 阅读全文
posted @ 2020-06-01 18:11 淡怀 阅读(1210) 评论(0) 推荐(0) 编辑
摘要:yaml快速入门:https://www.jianshu.com/p/97222440cd08 Java读写yaml文件:https://blog.csdn.net/u013410747/article/details/51647535?utm_source=app 一、maven依赖 <!-- h 阅读全文
posted @ 2020-05-27 18:09 淡怀 阅读(2078) 评论(0) 推荐(0) 编辑
摘要:参考:Java 代码优化之细节是魔鬼 示例代码 public class test { public static void tryCatch(){ String a = null; try { System.out.println(a.equals("aa")); }catch (Exceptio 阅读全文
posted @ 2020-05-22 09:38 淡怀 阅读(699) 评论(0) 推荐(0) 编辑
摘要:修改json指定路径的值:https://blog.csdn.net/liupeifeng3514/article/details/79180154 代码: public static void main(String[] args) { String str = "{\"bussDatas\":[ 阅读全文
posted @ 2020-05-14 21:46 淡怀 阅读(3710) 评论(0) 推荐(0) 编辑
摘要:1、冻结首行 https://blog.csdn.net/qq_24076135/article/details/77449898 sheet.createFreezePane(0,1,0,1); 2、设置单元格背景色 单元格设置:https://blog.csdn.net/qq_27937043/ 阅读全文
posted @ 2020-05-13 23:26 淡怀 阅读(304) 评论(0) 推荐(0) 编辑
摘要:public static void main(String[] args) { String str = "[测试}"; if (str.startsWith("[")) { System.out.println(String.format("首位:[")); } if (str.endsWith 阅读全文
posted @ 2020-05-12 17:26 淡怀 阅读(1793) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/shoufeng/p/11196500.html JSONObject object = JSONObject.parseObject(jsonString); String pretty = JSON.toJSONString(object, Ser 阅读全文
posted @ 2020-05-04 23:00 淡怀 阅读(1798) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/xue632777974/article/details/80437452 阅读全文
posted @ 2020-05-04 13:31 淡怀 阅读(124) 评论(0) 推荐(0) 编辑
摘要:用toString 会遇到空指针的现象 直接用 String.valueOf 来替代 阅读全文
posted @ 2020-04-26 19:01 淡怀 阅读(588) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示