摘要: return (- low - 1 as isize) as isize; cannot apply unary operator - Rust编写程序时候 usize 类型 进行-1 运算时报的错误 写了下BinarySearch, 对于if 判断修正为平衡版本,同时解决了 取得的midVal 已 阅读全文
posted @ 2023-12-27 20:29 lartimes 阅读(85) 评论(0) 推荐(0)
摘要: package com.ls.utils; import jakarta.servlet.http.HttpServletRequest; import java.io.BufferedReader; import java.io.IOException; import java.io.InputS 阅读全文
posted @ 2023-12-05 23:12 lartimes 阅读(22) 评论(1) 推荐(0)
摘要: 1 package com.ls.utils; 2 3 import java.lang.reflect.Array; 4 import java.lang.reflect.Field; 5 import java.util.Arrays; 6 7 /** 8 * @author Lartimes 阅读全文
posted @ 2023-12-05 20:22 lartimes 阅读(398) 评论(0) 推荐(0)
摘要: Optional static methods: Optional.ofNullable(); Optional.empty(); Optional.of(); ​ empty(): public static<T> Optional<T> empty() { @SuppressWarnings(" 阅读全文
posted @ 2023-12-05 18:16 lartimes 阅读(223) 评论(0) 推荐(0)
摘要: 1. 莫衷一是——i+++j该如何计算? 三个加号 ​ 在java中默认 前面结合 也就是 (i++) + j int i = 25; int j = 2; int result = i++ + j; System.out.println(i); System.out.println(j); /*2 阅读全文
posted @ 2023-11-26 22:38 lartimes 阅读(53) 评论(0) 推荐(0)
摘要: 开门见山 IEEE 754 算数标准 关于IEEE 754标准下的浮点数 (全文以64位为例,规定64位中包括1位符号位,11位阶码和52位尾数) 1.符号位 2.阶码 阶码由于偏移量的存在,其值会被加上1023(在IEEE754中特殊规定的,纯粹为了方便计算)。 (类似于整形 +- 进行运算,进行 阅读全文
posted @ 2023-11-26 22:38 lartimes 阅读(32) 评论(0) 推荐(0)
摘要: 1.来龙去脉- “+” 是怎么连接字符串的? “+” 号对String对象的连接 Oracle JDK1.7的实现: 当使用+ 字符串拼接,会创建一个临时的StringBuilder对象,该对象调用append连接操作。 类似于 StringBuilder.append(s1).append(s2) 阅读全文
posted @ 2023-11-26 22:27 lartimes 阅读(27) 评论(0) 推荐(0)