今天刷LeetCode的时候看题析,看到一个未曾使用过的方法String.join() /** * Creates a new String by putting each element together joined by the delimiter. If an element is null ...
分类:
其他好文 时间:
2020-04-29 12:48:31
阅读次数:
58
ES5利用arguments // ES5 function sum () { let num = 0 Array.prototype.forEach.call(arguments, function (v) { num += v * 1 }) return num } console.log(su ...
分类:
其他好文 时间:
2020-04-28 22:48:33
阅读次数:
55
1、核心逻辑(为了测试方便,路径直接写死了): public static void TemplateWrite<T>(List<T> datas, int startRow = 2, string targetPath = @"D:\导出excel测试.xlsx", string template ...
分类:
其他好文 时间:
2020-04-28 14:52:09
阅读次数:
246
typedef pair<string,Student>pair_t; int main() { map<string,Student> mapstu; mapstu.insert(pair_t("2",Student("delaiwen",23))); mapstu.insert(pair_t(" ...
分类:
编程语言 时间:
2020-04-28 13:24:51
阅读次数:
57
This time your job is to fill a sequence of N positive integers into a spiral matrix in non-increasing order. A spiral matrix is filled in from the fi ...
分类:
其他好文 时间:
2020-04-28 00:48:51
阅读次数:
67
In a gold mine grid of size m * n, each cell in this mine has an integer representing the amount of gold in that cell, 0 if it is empty. Return the ma ...
分类:
其他好文 时间:
2020-04-28 00:42:36
阅读次数:
52
视频审核中 观察者模式是23种设计模式种较常用的设计模式之一。数据源发生变化时(比如状态转变),如果一个对象(通常我们称之为主题subject)需要自动地通知其他多个对象(称为观察者observer),就可以采用这种设计模式。 观察者模式类图 使用场景案例 比如某新闻平台,当新闻数据更新时,就会推送 ...
分类:
其他好文 时间:
2020-04-27 22:24:38
阅读次数:
89
首先for_each的时候要加入头文件 我在写一个让vector中数据都加2的函数 开始是这样写的 结果是这样的: 这里并不会改变vector中的数据,其实想想就明白,这里应该用引用或指针 如果想改变任意加的值可以这样写 ...
分类:
其他好文 时间:
2020-04-27 22:22:03
阅读次数:
44
今天带来的知识点既简单又使用,是不是感觉非常的棒啊,OK,不多说了,咱们开始往下看. for...of 是什么 for...of 一种用于遍历数据结构的方法。它可遍历的对象包括数组,对象,字符串,set和map结构等具有iterator 接口的数据结构。 (上面这句话如果有看不懂的地方,自动忽略即可 ...
分类:
其他好文 时间:
2020-04-27 19:51:17
阅读次数:
62
MVC 在整个 GUI 编程领域,MVC 已经拥有将近 50 年的历史了。早在几十年前,Smalltalk-76 就对 MVC 架构模式进行了实现,在随后的几十年历史中,MVC 产生了很多的变种,例如:HMVC、MVA、MVP、MVVM 和其它将 MVC 运用于其它不同领域的模式。 早期的 MVC ...
分类:
Web程序 时间:
2020-04-27 09:16:31
阅读次数:
64