上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页
摘要: $s = microtime(true); echo "a-".sprintf("%.3f",((microtime(true)-$s)*1000)).'ms'.PHP_EOL; 阅读全文
posted @ 2021-04-21 20:05 许伟强 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 实例: 下面PHP代码我们以GBK的格式进行保存: <?php $string = "妳係我的老友"; // $string = iconv('gbk', 'utf-8', $string); var_dump($string); 然后我们访问 localhost/a.php 输出: string( 阅读全文
posted @ 2021-04-19 18:02 许伟强 阅读(110) 评论(0) 推荐(0) 编辑
摘要: []byte 和 string 的区别 这两个都经常用于初始化字符串,而且经常互相转换,很疑惑 []byte 究竟是什么 声明的方式有2种:[]byte("hello world") 或者 []byte{97,98} 注意这里是ASCII码其实等价于 []byte("ab") 打印看看: packa 阅读全文
posted @ 2021-04-15 15:58 许伟强 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 一直用strtotime校验,总觉得不太准确: <?php /** * 校验时间格式必须为Ymd格式或者Y-m-d格式 * * @param string $data 20200101|202-01-01 * @return bool */ function checkSimpleDateForma 阅读全文
posted @ 2021-03-25 16:01 许伟强 阅读(53) 评论(0) 推荐(0) 编辑
摘要: golang的数据类型 - 分为基本数据类型 ini float string bool ... 和 派生数据类型 map slice struct ... // 可比较:Integer,Floating-point,String,Boolean,Complex(复数型),Pointer,Chann 阅读全文
posted @ 2021-03-10 15:01 许伟强 阅读(259) 评论(0) 推荐(0) 编辑
摘要: A. new new 和 make 都是实例化一个 类型,开辟一片内存,生成一个具有物理内存的变量 new (type) *type new 返回的是一个指针 - 并且实例化的变量默认给予零值,比如int 类型初始值为 0 string的类型初始值为“” 如果 new 一个结构体的话,结构体的成员变 阅读全文
posted @ 2021-03-10 14:08 许伟强 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 问题描述: dom结构有 <el-row v-if='aComplete && bComplete'> <el-row ref="myRef"></el-row> </el-row> 你在aComplete的事件后增加了 this.$nextTick(() => { // DOM 更新了 conso 阅读全文
posted @ 2021-01-11 11:43 许伟强 阅读(2715) 评论(0) 推荐(0) 编辑
摘要: 表单页面每次没有点击提交按钮就触发了,每次进入页面就有一个红色框框标满错误提示: 原因: data数据加载以后 - dom加载好 - ajax从后台api接口拉取数据回来,更新了data.form触发了表单校验 处理方式; 在ajax数据加载以后:(不要在mounted里面,因为执行顺序很大概率是: 阅读全文
posted @ 2021-01-11 11:11 许伟强 阅读(10302) 评论(0) 推荐(0) 编辑
摘要: 如下所示: select * from FD_DictionaryItem where DictionaryID=72 order by DictionaryItemID=-1 ASC,DictionaryItemID; 转载地址: https://blog.csdn.net/imphp/artic 阅读全文
posted @ 2021-01-09 16:59 许伟强 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 非贪婪模式格式化员工姓名 // FormatStaffName 格式化员工ID为英文ID func FormatStaffName(names string) string{ // 格式化 reg, _ := regexp.Compile(`(?U)\(\S+\);*`) // 非贪婪模式去除所有括 阅读全文
posted @ 2021-01-06 10:11 许伟强 阅读(328) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页