会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
年少有为
三十载如朝夕,望君多珍惜。
CnBlogs
Home
New Post
Contact
Admin
Subscription
上一页
1
2
3
4
5
6
7
8
9
10
···
26
下一页
2023年12月21日
mysql语句中的反引号
该文被密码保护。
Read More
posted @ 2023-12-21 09:44 活出自己范儿
Views(0)
Comments(0)
Diggs(0)
2023年12月20日
分布式锁lua脚本
该文被密码保护。
Read More
posted @ 2023-12-20 19:11 活出自己范儿
Views(0)
Comments(0)
Diggs(0)
列表页删除最后一页的最后一条数据,定位前一页数据
1、调用后端接口时,返回最大页码数,这样就可以避免 // 最后一页就剩一条,删除或者取消关注,默认展示前一页 if (tableData?.length == 0 && currentPage > 1) { const beforePageNum = result?.maxPage == 0 ? 1
Read More
posted @ 2023-12-20 14:35 活出自己范儿
Views(83)
Comments(0)
Diggs(0)
2023年11月14日
计算开始与结束时间的时长:x天x时x分x秒
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(115)
Comments(0)
Diggs(0)
2023年5月18日
字符串解密工具
该文被密码保护。
Read More
posted @ 2023-05-18 18:02 活出自己范儿
Views(0)
Comments(0)
Diggs(0)
2022年11月26日
回文串判断
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(34)
Comments(0)
Diggs(0)
2022年6月23日
volatile失效了么?
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(37)
Comments(0)
Diggs(0)
获取服务器的CPU核数
1、获取CPU核数 Runtime.getRuntime().availableProcessors(); 执行结果:8
Read More
posted @ 2022-06-23 22:52 活出自己范儿
Views(108)
Comments(0)
Diggs(0)
2021年12月28日
有效数组判断两位元素相加是否等于目标值-左右碰撞指针
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(46)
Comments(0)
Diggs(0)
有效括号-栈
1、栈,LIFO-后进先出数据结构。 /** * 给定一个只包括 '(',')','{','}','[',']'的字符串 s ,判断字符串是否有效。 * 有效字符串需满足: * 左括号必须用相同类型的右括号闭合。 * 左括号必须以正确的顺序闭合。 * * 示例 1: * 输入:s = "()" *
Read More
posted @ 2021-12-28 13:52 活出自己范儿
Views(19)
Comments(0)
Diggs(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
26
下一页
公告