js 驼峰与下划线互转
摘要: /** * 驼峰转下划线 */ function replaceUppercaseWithUnderscoresAndLowercase (str) { return str.replace(/[A-Z]/g, (match) => `_${match.toLowerCase()}`) } cons
23
0
0
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
224
0
0
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
1208
0
0
通过生日计算 年龄
摘要: /** * 计算 年龄 * * @param birthDate 生日 * @return 岁数 当 生日 大于 当前时间时,返回 -1 */ public static int getAge(Date birthDate) { // 当前日历 Calendar nowCalendar = Cale
20
0
0
判断指定时间是否在指定时间范围
摘要: /** * 判断指定时间是否在指定时间范围 * 指定时间为 null 时, 指定时间为 当前时间 * @param from 开始时间 * @param to 结束时间 * @return 结果 当 from ≥ 当前时间 ≤ to :true,否则 false */ public static b
9
0
0
获取月度第一天和最后一天
摘要: //获取月度第一天 public String getFirstMonthDay(int month) { Calendar calendar = Calendar.getInstance(); // 设置月份 calendar.set(Calendar.MONTH, month - 1); //
34
0
0
给数字加逗号 例如:¥123,247,164.00
摘要: public String formatTosepara(BigDecimal value) { Double data = Double.valueOf(String.valueOf(value)); DecimalFormat df = new DecimalFormat("#,###.00")
69
0
0
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
637
0
0
类型转换
摘要: byte,short,chart——>int——>long——>float——>double 低————————————————————————>高 类型转换分为: 强制类型转换(由高-->低时使用), 自动类型转换/ 隐式类型转换(由低-->高时使用), 例如: int t = 100; doub
22
0
0
js 修约
摘要: /** * 修约精度 * @param num 数值 * @param len 精度(1、0.5、10、0.1、0.01)等 * @returns 四舍五入 */ export function ROUND5(num, len) { return $ROUND(num, len, '5') } /*
74
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起