码迷,mamicode.com
首页 >  
搜索关键字:for each    ( 14050个结果
String join()
今天刷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
使用Epplus以及Excel将模板导出excel
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
C++标准容器库STL:map
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
1105 Spiral Matrix
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
[LC] 1219. Path with Maximum Gold
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使用
首先for_each的时候要加入头文件 我在写一个让vector中数据都加2的函数 开始是这样写的 结果是这样的: 这里并不会改变vector中的数据,其实想想就明白,这里应该用引用或指针 如果想改变任意加的值可以这样写 ...
分类:其他好文   时间:2020-04-27 22:22:03    阅读次数:44
易学又实用的新特性:for...of
今天带来的知识点既简单又使用,是不是感觉非常的棒啊,OK,不多说了,咱们开始往下看. for...of 是什么 for...of 一种用于遍历数据结构的方法。它可遍历的对象包括数组,对象,字符串,set和map结构等具有iterator 接口的数据结构。 (上面这句话如果有看不懂的地方,自动忽略即可 ...
分类:其他好文   时间:2020-04-27 19:51:17    阅读次数:62
MVC
MVC 在整个 GUI 编程领域,MVC 已经拥有将近 50 年的历史了。早在几十年前,Smalltalk-76 就对 MVC 架构模式进行了实现,在随后的几十年历史中,MVC 产生了很多的变种,例如:HMVC、MVA、MVP、MVVM 和其它将 MVC 运用于其它不同领域的模式。 早期的 MVC ...
分类:Web程序   时间:2020-04-27 09:16:31    阅读次数:64
14050条   上一页 1 ... 48 49 50 51 52 ... 1405 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!