```js// 关于Promise:可以直接使用promisePromise.resolve(123).then(v => { console.log(v)})// 循环中调用异步let arr = []new Promise((res, rej) => { for (let index = 0; ... ...
分类:
编程语言 时间:
2020-02-11 19:31:38
阅读次数:
79
文献名:Comparing Data-Independent Acquisition and Parallel Reaction Monitoring in Their Abilities To Differentiate High-Density Lipoprotein Subclasses(比较 ...
分类:
其他好文 时间:
2020-02-10 22:55:14
阅读次数:
150
一.前言 不知道大家还记不记得前几篇的文章:《面试官:能解释一下javascript中的this吗》 那今天这篇文章虽然是介绍javascript中bind、apply和call函数,但是多少也和this有点关联。 假如在前面那场面试末尾,面试官不依不饶继续问你javascript中的this,那看 ...
分类:
移动开发 时间:
2020-02-10 18:15:22
阅读次数:
68
贪心算法思想:不从整体最优上加以考虑,它所做出的选择只是在某种意义上的局部最优选择,当然希望贪心算法得到的最终结果也是整体最优的; 贪心算法性质:指所求问题的整体最优解可以通过一系列局部最优的选择,即贪心选择来达到; 最优装载问题 (1)问题描述:有一批集装箱要装上一艘载重量为 tatol 的轮船, ...
分类:
其他好文 时间:
2020-02-10 15:15:36
阅读次数:
66
在 Zuul中, 整个请求的过程是这样的,首先将请求给zuulservlet处理,zuulservlet中有一个zuulRunner对象,该对象中初始化了RequestContext:作为存储整个请求的一些数据,并被所有的zuulfilter共享。zuulRunner中还有 FilterProces ...
分类:
其他好文 时间:
2020-02-09 14:59:01
阅读次数:
95
例子:根据多个id查询用户 User.xml: 1 <!--多个id查询 通过queryvo --> 2 <select id="selectUserByIds" parameterType="QueryVo" 3 resultType="User"> 4 <include refid="selec ...
分类:
数据库 时间:
2020-02-08 22:07:47
阅读次数:
102
package stream; import java.util.*; import java.util.concurrent.CopyOnWriteArrayList; import java.util.stream.Collectors; import java.util.stream.IntS ...
分类:
编程语言 时间:
2020-02-08 13:28:01
阅读次数:
393
1.for循环 使用临时变量,将长度缓存起来,避免重复获取数组长度,当数组较大时优化效果才会比较明显。 1 2 3 for(j = 0,len=arr.length; j < len; j++) { } 2.foreach循环 遍历数组中的每一项,没有返回值,对原数组没有影响,不支持IE 1 2 3 ...
分类:
编程语言 时间:
2020-02-08 13:20:58
阅读次数:
83
<?php $files = array();foreach (glob("/www/wwwroot/5.com/*.jpg") as $file) { $files[] = $file;} $ss =str_replace('/www/wwwroot/5.com/','5.com.com/',$f ...
分类:
编程语言 时间:
2020-02-05 18:47:44
阅读次数:
130
C#Win Form界面有时候需要批量清空当前界面的TextBox Text属性,逐个清空耗时耗力,此时我们可以利用当前界面的Controls来操作,代码如下: //清空所有文本框 foreach (var item in this.Controls) { if (item is TextBox) ...