上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 27 下一页
import java.util.Date; /** @ClassName: DateDurationUtils @Description: 时长计算工具类 @Author: lizg @Date: 2023/11/10 14:39 */ public class DateDurationUtils Read More
posted @ 2023-11-14 18:07 人在京城 Views(124) Comments(0) Diggs(0)
该文被密码保护。 Read More
posted @ 2023-05-18 18:02 人在京城 Views(0) Comments(0) Diggs(0)
1、直接上代码 public static boolean isPalindrome(String s) { //1、判断字符串是否是null或者是空字符,如果是就返回true if (s == null && "".equals(s.trim())) { return true; } //2、移除 Read More
posted @ 2022-11-26 22:46 人在京城 Views(45) Comments(0) Diggs(0)
public class ThreadTest { public static volatile int count = 0; public static AtomicInteger atomicCount = new AtomicInteger(0); public static void mai Read More
posted @ 2022-06-23 23:02 人在京城 Views(40) Comments(0) Diggs(0)
1、获取CPU核数 Runtime.getRuntime().availableProcessors(); 执行结果:8 Read More
posted @ 2022-06-23 22:52 人在京城 Views(117) Comments(0) Diggs(0)
1、左右碰撞指针,类似于二分法查找 1 /** 2 * 查找是否存在目标值 时间复杂度 O(logN) 3 * 有序的数组,查可以这样用 4 * @param array 5 * @param target 6 * @return 7 */ 8 public static boolean findT Read More
posted @ 2021-12-28 14:02 人在京城 Views(49) Comments(0) Diggs(0)
1、栈,LIFO-后进先出数据结构。 /** * 给定一个只包括 '(',')','{','}','[',']'的字符串 s ,判断字符串是否有效。 * 有效字符串需满足: * 左括号必须用相同类型的右括号闭合。 * 左括号必须以正确的顺序闭合。 * * 示例 1: * 输入:s = "()" * Read More
posted @ 2021-12-28 13:52 人在京城 Views(29) Comments(0) Diggs(0)
该文被密码保护。 Read More
posted @ 2021-12-03 14:47 人在京城 Views(0) Comments(0) Diggs(0)
1、定时任务-相关代码 @Component @EnableScheduling public class PrintTask { @Value("${task.switch}") private String taskSwitch; //统计器 private volatile int count Read More
posted @ 2021-09-20 22:25 人在京城 Views(826) Comments(0) Diggs(0)
public static boolean isLooped(int num) { StringBuilder strBuilder = new StringBuilder(String.valueOf(num)); int l = 0; //左指针 int r = strBuilder.lengt Read More
posted @ 2021-07-09 13:38 人在京城 Views(54) Comments(0) Diggs(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 27 下一页