上一页 1 2 3 4 5 6 7 ··· 12 下一页
摘要: mysql too many connections -- 最大连接数 show variables like 'max_connections'; -- 最大返回数 Max_used_connections/max_connections * 100% 应该要大于10% show global s 阅读全文
posted @ 2022-09-26 10:12 java架构师1 阅读(25) 评论(0) 推荐(0)
摘要: leetcode 每日一题 1470. 重新排列数组 class Solution { public int[] shuffle(int[] nums, int n) { int[] arr = new int[nums.length]; for (int i = 0; i < nums.lengt 阅读全文
posted @ 2022-08-29 16:55 java架构师1 阅读(21) 评论(0) 推荐(0)
摘要: leetcode 每日一题 1302. 层数最深叶子节点的和 //给你一棵二叉树的根节点 root ,请你返回 层数最深的叶子节点的和 。 // // // // 示例 1: // // // // //输入:root = [1,2,3,4,5,null,6,7,null,null,null,nul 阅读全文
posted @ 2022-08-17 14:41 java架构师1 阅读(27) 评论(0) 推荐(0)
摘要: 创建一维数组 以甲为主 当乙拿完书之后剩余书 有 1本 2本 3本 4本的时候 甲必胜 建立数组分析 有5本书的时候 无论怎么拿 都会把 1到4 留给对方,所以拿完对方是必胜局,所以5本书对于自己来说是必输局 true true true true false true true true true 阅读全文
posted @ 2022-08-15 09:37 java架构师1 阅读(101) 评论(0) 推荐(0)
摘要: 多线程读取文件,map或list存储出现次数,并创建对象封装,最小根堆找出前10个商品 public class Demo { private static final String regex = ","; public static void main(String[] args) throws 阅读全文
posted @ 2022-08-15 09:29 java架构师1 阅读(111) 评论(0) 推荐(0)
摘要: 结论:开启压缩指针和不开启压缩指针都是16个字节 开启压缩指针的时候会占用12个字节 为了防止缓存伪共享 会有4个字节的Padding 不开启压缩指针的时候就是16个字节 JVM内存分配 OOP 对象头: 1.MakeOop :存储hashcode 垃圾回收时候的分代年龄 synchronized锁 阅读全文
posted @ 2022-08-06 14:16 java架构师1 阅读(199) 评论(0) 推荐(0)
摘要: 最小堆 PriorityQueue 实现 public static void main(String[] args) { long l = System.currentTimeMillis(); int num = 100000000; PriorityQueue<Integer> priorit 阅读全文
posted @ 2022-08-02 10:58 java架构师1 阅读(54) 评论(0) 推荐(0)
摘要: 1.进入容器 docker ps -a docker exec -it {id} bash 2.下载阿里arthas curl -O https://arthas.aliyun.com/arthas-boot.jar java -jar arthas-boot.jar 阅读全文
posted @ 2022-07-28 08:55 java架构师1 阅读(31) 评论(0) 推荐(0)
摘要: java8 Collectors.toMap value 不能为nulll private static void convert(Class<?> aClass, List<Field> fields, List<Map<String, Object>> list, Object obj) { i 阅读全文
posted @ 2022-07-26 14:04 java架构师1 阅读(1041) 评论(0) 推荐(0)
摘要: 获取方法泛型 public class Demo { public static void main(String[] args) throws NoSuchMethodException, NoSuchFieldException { // 获取成员方法返回值的泛型类型信息 getMethodRe 阅读全文
posted @ 2022-07-26 10:29 java架构师1 阅读(365) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 12 下一页