On the first row, we write a 0. Now in every subsequent row, we look at the previous row and replace each occurrence of 0 with 01, and each occurrence ...
分类:
其他好文 时间:
2018-05-12 03:02:35
阅读次数:
218
一.两个日期大小比较 1.格式:(yyyy-mm-dd) function duibi(a, b,flag) { var arr = a.split("-"); var starttime = new Date(arr[0], arr[1], arr[2]); var starttimes = st ...
分类:
Web程序 时间:
2018-05-12 00:08:03
阅读次数:
241
function thousandBitSeparator(num){ var re=/\d{1,3}(?=(\d{3})+$)/g; var n1=num.toString().replace(/^(\d+)((\.\d+)?)$/,function(s,s1,s2){return s1.repl... ...
分类:
Web程序 时间:
2018-05-11 23:29:39
阅读次数:
197
?1/ Preparing: SELECT FROM tb_user WHERE id = ? AND user_name = ? <br> 目标是打印:SELECT FROM tb_user WHERE id = 1000059081 A ...
分类:
数据库 时间:
2018-05-11 20:12:31
阅读次数:
1451
MySQL 对 SQL 有很多扩展,有些用起来很方便,但有一些被误用之后会有性能问题,还会有一些意料之外的副作用,比如 REPLACE INTO。 比如有这样一张表: 1 2 3 4 5 6 7 8 CREATE TABLE `auto` ( `id` int(10) unsigned NOT NU ...
分类:
数据库 时间:
2018-05-11 20:02:51
阅读次数:
142
可以使用percona-toolkit包中的pt-archiver工具来进行历史数据归档 1、清理线上过期数据。 2、清理过期数据,并把数据归档到本地归档表中,或者远端归档服务器。 3、两张表之间的数据不完全相同,希望合并。此时加上–ignore或–replace选项,可以轻松实现。 4、导出线上数 ...
分类:
其他好文 时间:
2018-05-11 17:16:38
阅读次数:
332
function startUnix($date) { return(new Date(Date.parse($date.replace(/-/g, "/")))).getTime() / 1000; } function endUnix($date) { return new Date().set... ...
分类:
Web程序 时间:
2018-05-11 16:13:03
阅读次数:
543
// 数字校验 2位小数 function floatNum(obj){ obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和"."以外的字符 obj.value = obj.value.replace(/^\./g,""); //验证第一个字... ...
分类:
Web程序 时间:
2018-05-10 19:34:52
阅读次数:
191
Chris Paul (with the help of James Harden) has lead the Houston Rockets to the Western Conference Finals. That means it’s about time to find out if Pa ...
分类:
其他好文 时间:
2018-05-10 18:09:07
阅读次数:
163
语法: 参数说明 function_name:指定函数的名称。 [OR REPLACE]:是可选的,它允许您修改/替换现有函数。 RETURN:它指定要从函数返回的数据类型。它可以是基础,复合或域类型,或者也可以引用表列的类型。 function_body:function_body包含可执行部分。 ...
分类:
数据库 时间:
2018-05-10 11:39:39
阅读次数:
203