会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
我是深水的猫
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
9
下一页
2023年2月27日
stream流分页方式
摘要: dataList.stream().sorted(Comparator.comparing()).skip(pageNum * pageSize).limit(pageSize).collect(Collectors.toList());
阅读全文
posted @ 2023-02-27 11:02 我是深水的猫
阅读(37)
评论(0)
推荐(0)
2023年2月22日
字符串转换时间戳,时间戳转换字符串!
摘要: #字符串转换时间戳 public static void main(String[] args) { // 字符串转换时间戳 SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM"); Date date = new Date(); try { da
阅读全文
posted @ 2023-02-22 15:22 我是深水的猫
阅读(47)
评论(0)
推荐(0)
获取本月第一天,获取本月最大的一天
摘要: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar calendar = new GregorianCalendar(); calendar.setTime(date); //获得本月第一天 calendar.add
阅读全文
posted @ 2023-02-22 14:24 我是深水的猫
阅读(87)
评论(0)
推荐(0)
2022年11月11日
java计算接口调用时长
摘要: 方法一: LocalDateTime beginTime = LocalDateTime.now(); Long opetime = Duration.between(between,LocalDateTime.now()).toMillis(); 方法二: Long beginTime = new
阅读全文
posted @ 2022-11-11 09:39 我是深水的猫
阅读(599)
评论(0)
推荐(0)
2022年11月2日
java获取当月日期和当月周末
摘要: 根据年月,获取当月所有日期 public static void main(String[] args) { System.err.println(getMonthDate("2022-07")); } public static List getMonthDate(String timeStamp
阅读全文
posted @ 2022-11-02 11:11 我是深水的猫
阅读(504)
评论(0)
推荐(0)
2022年10月20日
xml转义字符
摘要: < < 小于号 > > 大于号 & & 和 ' ’ 单引号 " " 双引号
阅读全文
posted @ 2022-10-20 17:55 我是深水的猫
阅读(18)
评论(0)
推荐(0)
2022年10月8日
正则判断
摘要: // 正则判断,只允许输入数字和小数点(输入其他的会被替换为"")onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" /** * 正则校验 * @param value * @returns {Boolean} */ function comp
阅读全文
posted @ 2022-10-08 18:09 我是深水的猫
阅读(30)
评论(0)
推荐(0)
2022年9月28日
前端下拉框样式
摘要: <tr> <td align="right"> <select id="sortOrder" name="sortOrder" style="width:340px;"> <option value="0">ios</option> <option value="1" selected>androi
阅读全文
posted @ 2022-09-28 16:02 我是深水的猫
阅读(72)
评论(0)
推荐(0)
java文件大小单位转换
摘要: private String formatSize(long fileS) { DecimalFormat df = new DecimalFormat("#.00"); String fileSizeString = ""; String wrongSize = "0B"; if (fileS =
阅读全文
posted @ 2022-09-28 11:10 我是深水的猫
阅读(339)
评论(0)
推荐(0)
2022年4月11日
shell脚本安装安装redis
摘要: shell脚本安装radis #!/bin/bash #下载文件 #wget -P /home/temp/ --no-check-certificate https://download.redis.io/releases/redis-6.2.5.tar.gz #解压文件 cd /home/temp
阅读全文
posted @ 2022-04-11 10:32 我是深水的猫
阅读(427)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
9
下一页
公告