会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
岁月记忆
博客园
首页
新随笔
联系
订阅
管理
2024年11月27日
js 驼峰与下划线互转
摘要: /** * 驼峰转下划线 */ function replaceUppercaseWithUnderscoresAndLowercase (str) { return str.replace(/[A-Z]/g, (match) => `_${match.toLowerCase()}`) } cons
阅读全文
posted @ 2024-11-27 10:17 岁月记忆
阅读(52)
评论(0)
推荐(0)
2024年5月30日
antdv 时间组件(RangePicker) 分钟只显示 00 和30
摘要: { label: '', field: 'trainingDate', component: 'RangePicker', componentProps: { format: 'YYYY-MM-DD HH:mm:00', valueFormat: 'YYYY-MM-DD HH:mm:00', min
阅读全文
posted @ 2024-05-30 17:16 岁月记忆
阅读(262)
评论(0)
推荐(0)
2024年3月5日
mysql根据父节点递归查询所有子节点
摘要: SELECT t3.* FROM(SELECT t1.*, IF (FIND_IN_SET(parent_id, @pids) > 0,@pids := CONCAT(@pids, ',', id),'0') AS ischild FROM(SELECT t.id,t.parent_id,t.NAM
阅读全文
posted @ 2024-03-05 14:51 岁月记忆
阅读(1351)
评论(0)
推荐(0)
2023年11月18日
通过生日计算 年龄
摘要: /** * 计算 年龄 * * @param birthDate 生日 * @return 岁数 当 生日 大于 当前时间时,返回 -1 */ public static int getAge(Date birthDate) { // 当前日历 Calendar nowCalendar = Cale
阅读全文
posted @ 2023-11-18 15:27 岁月记忆
阅读(38)
评论(0)
推荐(0)
判断指定时间是否在指定时间范围
摘要: /** * 判断指定时间是否在指定时间范围 * 指定时间为 null 时, 指定时间为 当前时间 * @param from 开始时间 * @param to 结束时间 * @return 结果 当 from ≥ 当前时间 ≤ to :true,否则 false */ public static b
阅读全文
posted @ 2023-11-18 15:26 岁月记忆
阅读(16)
评论(0)
推荐(0)
获取月度第一天和最后一天
摘要: //获取月度第一天 public String getFirstMonthDay(int month) { Calendar calendar = Calendar.getInstance(); // 设置月份 calendar.set(Calendar.MONTH, month - 1); //
阅读全文
posted @ 2023-11-18 15:24 岁月记忆
阅读(47)
评论(0)
推荐(0)
给数字加逗号 例如:¥123,247,164.00
摘要: public String formatTosepara(BigDecimal value) { Double data = Double.valueOf(String.valueOf(value)); DecimalFormat df = new DecimalFormat("#,###.00")
阅读全文
posted @ 2023-11-18 15:23 岁月记忆
阅读(201)
评论(0)
推荐(0)
2023年8月29日
Data source rejected establishment of connection,message from serverToo many connections错误解决办法
摘要: 1、临时修改生效,不需要重启数据库 show variables like "max_connections"; #显示最大连接数show processlist; #显示当前连接数 set global max_connections=1000; #设置最大连接数1000 show variabl
阅读全文
posted @ 2023-08-29 09:06 岁月记忆
阅读(757)
评论(0)
推荐(0)
类型转换
摘要: byte,short,chart——>int——>long——>float——>double 低————————————————————————>高 类型转换分为: 强制类型转换(由高-->低时使用), 自动类型转换/ 隐式类型转换(由低-->高时使用), 例如: int t = 100; doub
阅读全文
posted @ 2023-08-29 08:58 岁月记忆
阅读(27)
评论(0)
推荐(0)
2023年8月9日
js 修约
摘要: /** * 修约精度 * @param num 数值 * @param len 精度(1、0.5、10、0.1、0.01)等 * @returns 四舍五入 */ export function ROUND5(num, len) { return $ROUND(num, len, '5') } /*
阅读全文
posted @ 2023-08-09 10:17 岁月记忆
阅读(89)
评论(0)
推荐(0)
下一页
公告