摘要: // 舍去小数三位后的数,四舍五入 BigDecimal a = new BigDecimal("9"); BigDecimal b = new BigDecimal("15"); //舍去小数三位后的数 BigDecimal c = b.divide(a, 3, RoundingMode.HALF 阅读全文
posted @ 2023-04-18 17:26 丶XianGang 阅读(1154) 评论(0) 推荐(0) 编辑
摘要: String json = "[{"id": "1","name": "zhangsan"}, {"id": "2","name": "lisi"}, {"id": "3","name": "wangwu"}]"; //json字符串 转 json 数组 JSONArray jsonarrr = J 阅读全文
posted @ 2023-04-03 10:43 丶XianGang 阅读(137) 评论(0) 推荐(0) 编辑
摘要: /** * 将时间戳转换为时间 * @param s 时间戳 * @param t 时间 * @return */ public static String stampToDate(int s,String t){ String res; SimpleDateFormat simpleDateFor 阅读全文
posted @ 2023-03-08 15:16 丶XianGang 阅读(272) 评论(0) 推荐(0) 编辑
摘要: /** * AES 加密 * @param sSrc * @return * @throws Exception */ public static String Encrypt(String sSrc) throws Exception { if (sSrc == null) { return nu 阅读全文
posted @ 2023-03-08 15:10 丶XianGang 阅读(388) 评论(0) 推荐(0) 编辑
摘要: <?php header("Content-type:text/html; charset=UTF-8"); /** * Class SendApi */ class SendApi { const API_SEND_URL='http://112.35.1.155:1992/sms/norsubm 阅读全文
posted @ 2023-03-08 14:58 丶XianGang 阅读(107) 评论(0) 推荐(0) 编辑
摘要: /** * [excelTime description] * @Author:XuXianGang * @Method:excel 转换时间 * @DateTime:2022-06-06T09:36:37+0800 * @param [type] $days [description] * @pa 阅读全文
posted @ 2023-02-24 09:21 丶XianGang 阅读(118) 评论(0) 推荐(0) 编辑
摘要: #数字转字符串 String.valueOf(Object) #字符串截取第一位和最后一位 String str = ,1,2,3,; String str1 = str.substring(1); //截取第一个, String str2 = str.substring(1,str1.length 阅读全文
posted @ 2023-02-24 09:10 丶XianGang 阅读(164) 评论(0) 推荐(0) 编辑
摘要: /** * [getLoLa description] * @Author:XuXianGang * @Method: 根据地址获取经纬度 * @DateTime:2023-02-06T16:01:45+0800 * @param [type] $address [description] * @r 阅读全文
posted @ 2023-02-06 16:11 丶XianGang 阅读(274) 评论(0) 推荐(0) 编辑
摘要: tp5.0 1.加密类库路径 \extend\aes\Aes.php2.公共调用方法路径 \application\common.php; 加密方法encrypt;解密方法decrypt3.控制器调用使用方法: 加密:encryp('字段'); 解密 decrypt('加密后字段'); 类库文件AE 阅读全文
posted @ 2022-08-23 09:05 丶XianGang 阅读(85) 评论(0) 推荐(0) 编辑
摘要: /** * 对用户的密码进行加密 * @param $password * @param $encrypt //传入加密串,在修改密码时做认证 * @return array/password */ function encrypt_password($password, $encrypt = '' 阅读全文
posted @ 2022-08-05 18:07 丶XianGang 阅读(10) 评论(0) 推荐(0) 编辑