function watermark(settings) { //默认设置 var defaultSettings={ watermarl_element:"body", watermark_txt:"", watermark_x:20,//水印起始位置x轴坐标 watermark_y:20,//水 ...
分类:
Web程序 时间:
2020-12-08 12:20:47
阅读次数:
7
定义:A property of an execution context (global, function or eval) that, in non–strict mode, is always a reference to an object and in strict mode can b ...
分类:
其他好文 时间:
2020-12-07 12:36:53
阅读次数:
6
// 第一种:闭包存储,遍历执行 function compose1 (arr) { return (param) => { for (let fn of arr) { param = fn(param); } return param; } } // 第二种:递归嵌套,依次执行 function ...
分类:
Web程序 时间:
2020-12-07 12:23:08
阅读次数:
8
VB调用VC dll的返回方式 第一种类型:数值传递注意:在VB中,默认变量传递方式为ByRef为地址,而传递值就是用ByVal,还要注意在C++中,int类型的变量是32位的,在VB中要用long型变量来配合。VC++部分: [cpp] view plaincopy extern "C" _dec ...
分类:
其他好文 时间:
2020-12-07 11:58:08
阅读次数:
4
js千分位分隔,数字货币化—4种方法(含正则) 方法1-整数货币化 // 整数货币化 function intCurrency(num) { var reg = new RegExp("^[\\d]+[\\d|.]+$", 'g') if (!reg.test(num)) { return "只能为 ...
分类:
Web程序 时间:
2020-12-07 11:49:34
阅读次数:
10
先说一下async的用法,它作为一个关键字放到函数前面,用于表示函数是一个异步函数,因为async就是异步的意思, 异步函数也就意味着该函数的执行不会阻塞后面代码的执行。 写一个async 函数 async function timeout() { return 'hello world'; } 语 ...
分类:
其他好文 时间:
2020-12-04 11:45:18
阅读次数:
15
bootstarp加载两个table时onLoadSuccess只调用一次 onLoadSuccess: function (datas) { alert(3); rows = $('#bootstrap-table').bootstrapTable('getData', true); initgz ...
分类:
其他好文 时间:
2020-12-04 11:42:35
阅读次数:
23
clone linux 创建线程(pthread_create)和进程(fork)的过程非常类似,都是主要依赖 clone 函数,只不过传入的参数不同而已。 如此一来,内核只需要实现一个 clone函数,就既能创建进程,又能创建线程了,例如; 创建进程: clone(SIGCHLD) 创建线程: c ...
分类:
编程语言 时间:
2020-12-04 11:36:29
阅读次数:
13
终极版~深拷贝 人工分割线 浅拷贝这里不做介绍了,深拷贝的实现要点,除了一定要深!还要能兼容各种类型,如函数,正则、Date等等。 其实日常业务开发中,Json.parse(Json.stringfy(obj))已经能够解决90%左右的克隆需求。还有Object.assign() Object.cr ...
分类:
编程语言 时间:
2020-12-04 11:30:47
阅读次数:
8
经常在代码中使用this,但是没有总结过this指向的问题。 var name = "Jake"; function testThis() { this.name = 'jakezhang'; this.sayName = function () { return this.name; } } co ...
分类:
其他好文 时间:
2020-12-04 11:30:19
阅读次数:
6