上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 24 下一页
摘要: 二分 二分的关键并不是单调性,而是存在某个性质能使队列一分为二 模板 bool check(int x) {/* ... */} // 检查x是否满足某种性质 // 找左边界或左边界值 int bsearch_1(int l, int r) { while (l < r) { int mid = l 阅读全文
posted @ 2021-01-06 23:10 INnoVation-V2 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 简介 ConcurrentHashMap;//线程安全的HashMap CopyOnWriteArrayList;//在读多写少的场合性能很好,远优于vector ConcurrentLinkedQueue;//线程安全的LinkedList BlockingQueue;//阻塞队列,适合作数据共享 阅读全文
posted @ 2020-06-01 21:05 INnoVation-V2 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 一、JDK对线程池的支持 常用方法 newFixedThreadPool(int Threads); newSingleThreadExecutor(); newCachedThreadPool(); newSingleThreadScheduledExecutor(); newScheduledT 阅读全文
posted @ 2020-06-01 21:04 INnoVation-V2 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 一、重入锁ReentrantLock 1. 常用方法 public static ReentrantLock lock = new ReentrantLock(); lock.lock();//获得锁,如果锁已被占用,则等待 lock.lockInterruptibly();//获得锁,但优先响应中 阅读全文
posted @ 2020-05-31 20:09 INnoVation-V2 阅读(326) 评论(0) 推荐(0) 编辑
摘要: equals和hashcode 一. equals已经能实现对比的功能了,为什么还要hashCode呢? 因为重写的equals里一般比较的比较全面且复杂,效率较低,而利用hashCode进行对比,效率较高,而且哈希算法需要hashcode 二.hashCode既然效率这么高为什么还要equals呢 阅读全文
posted @ 2020-05-03 00:24 INnoVation-V2 阅读(295) 评论(0) 推荐(0) 编辑
摘要: http://mirrors.163.com/ubuntu releases/ 阅读全文
posted @ 2020-04-06 11:15 INnoVation-V2 阅读(720) 评论(0) 推荐(0) 编辑
摘要: 错误代码 错误原因 jdbc connector版本过老,mysql版本过新, 更换新版本jdbc或者更换老版本mysql 阅读全文
posted @ 2020-03-17 21:05 INnoVation-V2 阅读(3206) 评论(0) 推荐(0) 编辑
摘要: HashMap 1.为什么hashmap长度必须是2的幂 hashmap插入源码代码如下 p = tab[i = (n - 1) & hash] 数据的hash值一般都很长(各数据类型hashCode源码解读在这里),hashmap需要根据hash值将数据插入到对应的桶中, 例如某个数的hash值是 阅读全文
posted @ 2020-03-15 00:31 INnoVation-V2 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Java代理模式 基本概念 实现方式 实例 增强方式 实例 阅读全文
posted @ 2020-03-12 00:18 INnoVation-V2 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 原因jdbc connector版本过老,mysql版本过新, 更换新版本jdbc或者更换老版本mysql 阅读全文
posted @ 2020-02-26 17:21 INnoVation-V2 阅读(217) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 24 下一页