10 2023 档案

摘要:日语文字转音频 https://ondoku3.com/ja/ 阅读全文
posted @ 2023-10-31 15:33 爱新觉罗LQ 阅读(45) 评论(0) 推荐(0) 编辑
摘要:给视频添加字幕 加字幕 Arctime https://arctime.org/ 调轴工具,修改文本 https://subplayer.js.org/ 阅读全文
posted @ 2023-10-31 11:03 爱新觉罗LQ 阅读(32) 评论(0) 推荐(0) 编辑
摘要:整型数组按照字典序排序 输入 ... 0,1,2,3,5,7,8,1001,10 9 ... 输出 ... 0,1,10,1001,2,3,5,7,8 Collections.sort(list, new Comparator<Integer>() { @Override public int co 阅读全文
posted @ 2023-10-30 10:02 爱新觉罗LQ 阅读(12) 评论(0) 推荐(0) 编辑
摘要:二维数组根据其下标,判断它是第几个元素 3 3 0 2 2 1 2 1 2 2 1 public class qqqq { static int row; static int col; public static void main(String[] args) { Scanner in = ne 阅读全文
posted @ 2023-10-27 16:44 爱新觉罗LQ 阅读(43) 评论(0) 推荐(0) 编辑
摘要:判断周围8个方向的位置 static int[][] offsets = {{0, 1}, {1, 1}, {1, 0}, {1, -1}, {0, -1}, {-1, -1}, {-1, 0}, {-1, 1}}; for (int i = 0; i < row; i++) { for (int 阅读全文
posted @ 2023-10-26 23:04 爱新觉罗LQ 阅读(11) 评论(0) 推荐(0) 编辑
摘要:常用在线画图工具 https://www.geogebra.org/graphing https://www.cnblogs.com/henry-1202/p/10258867.html 阅读全文
posted @ 2023-10-26 10:22 爱新觉罗LQ 阅读(20) 评论(0) 推荐(0) 编辑
摘要:从二维数组中截取连续行 int[][] temp = Arrays.copyOfRange(arr, 1, 2); // 截取第二行 阅读全文
posted @ 2023-10-25 23:55 爱新觉罗LQ 阅读(10) 评论(0) 推荐(0) 编辑
摘要:组合公式 从m 个箱子中选出 n 个箱子 公式:Cmn=m!n!(mn)!) 每种方式两两相邻球之间都有一个磁力,假设: 放置方式1的两两相邻球之间的磁力的最小值为a 放置方式2的两两相邻球之间的磁力的最小值为b ... 放置方式X的两两相邻球之间的磁力的最小 阅读全文
posted @ 2023-10-25 12:41 爱新觉罗LQ 阅读(33) 评论(0) 推荐(0) 编辑
摘要:KMP算法 1. 算法核心 利用匹配失败后的信息 尽量减少模式串(B)与主串(A)的匹配次数 以达到快速匹配的目的 通过一个 next 数组,保存模式串(B)中 前后最长公共子序列的长度,每次回溯时,通过 next 数组找到,前面匹配过的位置,省去了大量的计算时间 2. 如何减少匹配次数 2.1. 阅读全文
posted @ 2023-10-24 20:21 爱新觉罗LQ 阅读(8) 评论(0) 推荐(0) 编辑
摘要:已知BST的前序遍历,还原BST arr数组:前序遍历 list:排序后的 arr 数组【BST的 中序遍历】 public static TreeNode getRoot(int[] arr, List<Integer> list){ int index = -1; for (int i = 0; 阅读全文
posted @ 2023-10-23 11:00 爱新觉罗LQ 阅读(10) 评论(0) 推荐(0) 编辑
摘要:给定二叉树的前序遍历,遍历是否是 BST public static boolean isValid(int[] arr, int start, int end, int min, int max){ if (start > end){ // start > end:当前子树为空,返回 true,因 阅读全文
posted @ 2023-10-23 10:58 爱新觉罗LQ 阅读(8) 评论(0) 推荐(0) 编辑
摘要:判断一个数是质数 public class PrimeNumberChecker { public static boolean isPrime(int number) { if (number <= 1) { return false; // 1和负数不是质数 } if (number <= 3) 阅读全文
posted @ 2023-10-20 16:48 爱新觉罗LQ 阅读(8) 评论(0) 推荐(0) 编辑
摘要:互质数判断【空杯心态】 1 和任何其它都是互质数 相邻2个一定互质 2个不同的质数一定互质 欧几里德算法 通过递归计算两个数的最大公约数(GCD) 如果最大公约数为1,则说明两个数互质。 public static int gcd(int a, int b){ if (a == 0){ return 阅读全文
posted @ 2023-10-20 13:27 爱新觉罗LQ 阅读(18) 评论(0) 推荐(0) 编辑
摘要:利用 Stream 流将 TreeSet 转成数组 Integer[] arr = set.stream().toArray(Integer[]::new); 阅读全文
posted @ 2023-10-20 11:23 爱新觉罗LQ 阅读(54) 评论(0) 推荐(0) 编辑
摘要:整型数组逆序 由于 int型数组没有实现 comparator 接口,所以不支持逆序排序,所以我们建数组的时候就建成 Integer型就好了 Scanner in = new Scanner(System.in); int target = Integer.parseInt(in.nextLine( 阅读全文
posted @ 2023-10-18 11:49 爱新觉罗LQ 阅读(7) 评论(0) 推荐(0) 编辑
摘要:List list 删除指定元素 List<Integer> list1 = new ArrayList<>(); list1.add(1); list1.add(2); list1.add(4); list1.add(3); list1.remove((Integer)4); System.out 阅读全文
posted @ 2023-10-17 23:34 爱新觉罗LQ 阅读(69) 评论(0) 推荐(0) 编辑
摘要:无脑 检查是否存在满足条件的数字组合 import java.util.Scanner; import java.util.*; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(Str 阅读全文
posted @ 2023-10-17 20:06 爱新觉罗LQ 阅读(33) 评论(0) 推荐(0) 编辑
摘要:贪心 1个维度【生活常识】 135. 分发糖果 class Solution { public boolean lemonadeChange(int[] bills) { int[] arr = new int[2]; for (int bill : bills) { if (bill == 5){ 阅读全文
posted @ 2023-10-17 12:55 爱新觉罗LQ 阅读(2) 评论(0) 推荐(0) 编辑
摘要:mybatis项目启动报错:reader entry: ���� = v https://blog.51cto.com/lianghecai/7702720 解决方式: <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-vfs</ 阅读全文
posted @ 2023-10-16 16:10 爱新觉罗LQ 阅读(17) 评论(0) 推荐(0) 编辑
摘要:SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation 解决方式 <dependency> <grou 阅读全文
posted @ 2023-10-16 16:08 爱新觉罗LQ 阅读(28) 评论(0) 推荐(0) 编辑
摘要:Mybatis 虚假爆红 代码正常运行,但是报错:cannot resolve symbol "XXX" 解决方式:重启插件 阅读全文
posted @ 2023-10-16 15:38 爱新觉罗LQ 阅读(12) 评论(0) 推荐(0) 编辑
摘要:测试类中的 init() 方法【前有 @Before 注解】 package com.llq.mapper; public class MonsterMapperTest { // 属性 private SqlSession sqlSession; private MonsterMapper mon 阅读全文
posted @ 2023-10-16 13:20 爱新觉罗LQ 阅读(31) 评论(0) 推荐(0) 编辑
摘要:清空StringBuilder sb.setLength(0); 阅读全文
posted @ 2023-10-16 13:19 爱新觉罗LQ 阅读(1) 评论(0) 推荐(0) 编辑
摘要:栈 329. 仿 LISP 运算 import java.util.Scanner; import java.util.*; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(Strin 阅读全文
posted @ 2023-10-14 12:09 爱新觉罗LQ 阅读(18) 评论(0) 推荐(0) 编辑
摘要:复制一个字符串多次 String repeat = temp.toString().repeat(count); 394. 字符串解码 核心思路: 加入最后一个 ],在弹出时候 先收集括号内所有的字母 弹出 [ 收集数字 class Solution { public String decodeSt 阅读全文
posted @ 2023-10-14 00:09 爱新觉罗LQ 阅读(20) 评论(0) 推荐(0) 编辑
摘要:无法加载 DLL“steam_api64”: 动态链接库(DLL)初始化例程失败。 (异常来自 HRESU 解决方式:将文件夹拷贝到 Steam --> steamapps 文件夹下面 还好是忍者神龟抛了个异常,才找到了问题所在,论抛异常的重要性!!! 忍者神龟 如龙 阅读全文
posted @ 2023-10-13 17:31 爱新觉罗LQ 阅读(940) 评论(0) 推荐(0) 编辑
摘要:DP习题 243. 快递运输【买手办问题!!!】 import java.util.Scanner; import java.util.*; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void ma 阅读全文
posted @ 2023-10-12 12:30 爱新觉罗LQ 阅读(46) 评论(0) 推荐(0) 编辑
摘要:单源最短路径问题 无向图【可以转化为BFS:无权(或者边界权相等)图的最短路径】 首先先构造邻接表 特殊情况如下: # 由于是无向图:我们最后要从 2 出发开始扩散 如果不考虑2次的话,就得不到下面的邻接表了,因为是无向图,那么 5 2 也是 2 5,所以我们利用 hashSet来进行操作 5 5 阅读全文
posted @ 2023-10-09 11:57 爱新觉罗LQ 阅读(27) 评论(0) 推荐(0) 编辑
摘要:PicGo 报错:reason: read ECONNRESETf 1. 完全退出PicGo后,再重启 短时间内传入多个照片就容易出现这个问题 2. 修改 PicGo的端口和代理 https://www.xiapilu.com/web/web-tutorial/picgo-github-fail.h 阅读全文
posted @ 2023-10-04 15:31 爱新觉罗LQ 阅读(131) 评论(0) 推荐(0) 编辑
摘要:判断图中是否有环 1. 有向图【BFS】 207. 课程表 用例: [[1,4],[2,4],[3,1],[3,2]] 弹出1的时候,4的入度由 2 变成 1 当再弹出2的时候,4的入度由 1 变成0,此时可以入队!!! class Solution { Deque<Integer> deque = 阅读全文
posted @ 2023-10-03 17:00 爱新觉罗LQ 阅读(18) 评论(0) 推荐(0) 编辑

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