列子: [{"id":342},{"id":343},{"id":344}] 代码: $arr = ['reminders_status' => 1]; array_walk($isOverdue, function (&$value, $key, $arr) { $value = array_me ...
分类:
编程语言 时间:
2021-04-26 14:01:49
阅读次数:
0
在js中,使用setTimeout函数来延时处理逻辑,参数格式不正确时,延时效果无效 ex:function delay(){// doing something} setTimeout(delay(),5000); // 这个时候delay函数会立即执行,延时效果无效 应该改为:setTimeou ...
分类:
其他好文 时间:
2021-04-26 13:57:51
阅读次数:
0
import Vue from "vue"; // vue自定义指令防抖 Vue.directive("antiShake", { bind: function(el, binding, vnode) { let { delay, fn } = binding.value; //参数:时间,执行函数 ...
分类:
其他好文 时间:
2021-04-26 13:57:03
阅读次数:
0
import Vue from "vue"; // vue自定义指令节流 Vue.directive("throttle", { bind: function(el, binding, vnode) { let { delay, fn } = binding.value; //参数:时间,执行函数 ...
分类:
其他好文 时间:
2021-04-26 13:55:45
阅读次数:
0
先说结论:遍历对象用for in 遍历数组用for of 不要用for in 遍历数组会出问题,实际中已经遇到了 function getAreaQueryGrid(res) { let features = new ol.format.GeoJSON().readFeatures(res); fo ...
分类:
Web程序 时间:
2021-04-26 13:46:30
阅读次数:
0
问题描述 当需要在应用中有大量的出站连接时候,就会涉及到SNAT(源地址网络转换)耗尽的问题。而通过Azure App Service/Function的默认监控指标图表中,却没有可以直接查看到SNAT是否耗尽的问题(可以间接参考App Service Plan级中Metrics的 Socket O ...
分类:
移动开发 时间:
2021-04-26 13:08:25
阅读次数:
0
__thread 线程局部存储 Thread Local Storage(tls),是一种机制,通过这一机制分配的变量,每个当前线程有一个该变量的实例。 在用户层,用一个新的存储类型关键字:__thread 表示这一扩展。 __thread 使用规则: 如果一个线程局部存储变量有一个初始化器,它必须 ...
分类:
其他好文 时间:
2021-04-26 12:57:45
阅读次数:
0
一、PubSubJS的使用 工具库: PubSubJS 下载: npm install pubsub-js --save 使用: 1) import PubSub from 'pubsub-js' //引入 2) PubSub.subscribe('delete', function(data){ ...
分类:
其他好文 时间:
2021-04-24 13:38:03
阅读次数:
0
事件捕获 事件捕获中,父级元素先触发,子集元素后触发 事件会从最外层开始,直到具体的元素,比如click的捕获过程document->html->body->div->p 事件冒泡 事件冒泡时,子元素先出发,父级元素后触发 元素自身事件被触发后,如果父元素有相同的事件,那么元素本身的触发状态就会传递 ...
分类:
编程语言 时间:
2021-04-24 13:29:34
阅读次数:
0
1 // 防抖 2 function debounce(func,delay){ 3 let timer = null 4 return function(){ 5 let context = this 6 let args = arguments 7 if(timer) clearTimeout( ...
分类:
Web程序 时间:
2021-04-24 11:51:25
阅读次数:
0