上一页 1 2 3 4 5 6 ··· 32 下一页
摘要: 输入321,需要输出123 public static int reverse(int x) { int res = 0; while (x != 0) { // 下一步要res*10,所以这一步要保证res*10不大于 Integer.MAX_VALUE if (Math.abs(res) > I 阅读全文
posted @ 2024-01-04 17:29 MarkLeeBYR 阅读(22) 评论(0) 推荐(0)
摘要: 和题目108类似:108是数组 https://www.cnblogs.com/MarkLeeBYR/p/16906818.html public TreeNode sortedListToBST(ListNode head) { if (head == null) { return null; } 阅读全文
posted @ 2024-01-04 16:25 MarkLeeBYR 阅读(22) 评论(0) 推荐(0)
摘要: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文
posted @ 2023-10-16 14:25 MarkLeeBYR 阅读(24) 评论(0) 推荐(0)
摘要: Given a sorted linked list, delete all duplicates such that each element appear onlyonce. For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, 阅读全文
posted @ 2023-10-09 22:43 MarkLeeBYR 阅读(22) 评论(0) 推荐(0)
摘要: GC日志分析,不同版本jdk和垃圾收集器的日志格式相差很多,以G1收集器,jdk8举例,参考:https://blog.csdn.net/weixin_42340670/article/details/121743655 gc日志中大部分都是young gc日志,即使有混合gc,在混合gc周期中也至 阅读全文
posted @ 2023-09-06 14:18 MarkLeeBYR 阅读(272) 评论(0) 推荐(0)
摘要: LoadingCache参数含义:1、maximumSize:设定缓存项的数目的最大值,当数目空间不足时,会使用LRU策略进行回收2、expireAfterxxx:过期逐出,例如expireAfterWrite设置为10分钟,则在10分钟时间内没有被更新就会过期4、refreshAfterWrite 阅读全文
posted @ 2023-06-29 14:28 MarkLeeBYR 阅读(1323) 评论(0) 推荐(0)
摘要: 1、根据枚举的name获取枚举类: private static SmsProviderType fromName(String spName) { return Stream.of(SmsProviderType.values()).filter(sp -> StringUtils.equals( 阅读全文
posted @ 2023-06-25 17:28 MarkLeeBYR 阅读(88) 评论(0) 推荐(0)
摘要: idea的tomcat deployment中如果application context是dev-bootcamp,则请求url是:http://localhost:8080/dev-bootcamp/login idea的tomcat deployment中如果application contex 阅读全文
posted @ 2023-06-17 22:55 MarkLeeBYR 阅读(51) 评论(0) 推荐(0)
摘要: POST _bulk 批量插入的时候,index的id和返回结果中index的id保持一致 _search 复合查询 Bool Query (must, must_not, should) 查询结果_shards是分片信息,hits中的hits是返回的源数据 只显示部分字段: 除了query,要加入 阅读全文
posted @ 2023-06-16 23:52 MarkLeeBYR 阅读(29) 评论(0) 推荐(0)
摘要: 在控制台查看linux历史命令:history 可以使用git stash暂存 不需git add等切回本分支后,git stash pop即可 看之前的提交记录:git log --author=jiboyu git log --reverse 可以查询距离当前时间最远的提交,即倒序排,在命令行冒 阅读全文
posted @ 2023-06-08 17:49 MarkLeeBYR 阅读(112) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 32 下一页