上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 23 下一页
摘要: okHttp 发送表单请求 需要添加依赖 compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.9.0' import okhttp3.FormBody; import okhttp3.OkHttpClient; imp 阅读全文
posted @ 2023-09-19 09:07 Eiffelzero 阅读(72) 评论(0) 推荐(0)
摘要: Mockito 官网 注解 阅读全文
posted @ 2023-03-15 20:45 Eiffelzero 阅读(42) 评论(0) 推荐(0)
摘要: 2331. 计算布尔二叉树的值 题解: DFS 深搜 class Solution { public boolean evaluateTree(TreeNode root) { switch (root.val) { case 0 : return false; case 1 : return tr 阅读全文
posted @ 2023-02-06 19:49 Eiffelzero 阅读(22) 评论(0) 推荐(0)
摘要: 1129. 颜色交替的最短路径 题解: BFS 宽搜 用宽搜求最短路 public int[] shortestAlternatingPaths(int n, int[][] redEdges, int[][] blueEdges) { int[] res = new int[n]; res[0] 阅读全文
posted @ 2023-02-02 18:31 Eiffelzero 阅读(23) 评论(0) 推荐(0)
摘要: 2325. 解密消息 题解 模拟 public String decodeMessage(String key, String message) { // 存映射 Map<Character, Character> map = new HashMap<>(); int i = 0; for (cha 阅读全文
posted @ 2023-02-01 16:30 Eiffelzero 阅读(25) 评论(0) 推荐(0)
摘要: 2319. 判断矩阵是否是一个 X 矩阵 题解: 模拟 class Solution { public boolean checkXMatrix(int[][] grid) { int n = grid.length; for (int i = 0; i < n; i++) { for (int j 阅读全文
posted @ 2023-01-31 15:51 Eiffelzero 阅读(28) 评论(0) 推荐(0)
摘要: 1669. 合并两个链表 題解: 模拟链表操作 /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int 阅读全文
posted @ 2023-01-30 19:47 Eiffelzero 阅读(24) 评论(0) 推荐(0)
摘要: 2315. 统计星号 题解: 按题意模拟 class Solution { public int countAsterisks(String s) { int n = s.length(); int res = 0; // 是否不在竖线对之间 boolean flag = true; for (in 阅读全文
posted @ 2023-01-29 10:57 Eiffelzero 阅读(27) 评论(0) 推荐(0)
摘要: 1. Guava github google的开源本地缓存 堆内缓存 需要考虑GC问题 不用考虑序列化和反序列化问题 2. caffeine github Caffeine provides an in-memory cache using a Google Guava inspired API. 阅读全文
posted @ 2023-01-28 10:18 Eiffelzero 阅读(37) 评论(0) 推荐(0)
摘要: 1. BlockingCache 2. FifoCache 3. LruCache 4. SoftCache 5. WeakCache 6. LoggingCache 7. ScheduledCache 8. SynchronizedCache 9. PerpetualCache 10. Seria 阅读全文
posted @ 2023-01-28 10:13 Eiffelzero 阅读(31) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 23 下一页