在ES5中 对象属性名都是字符串,这容易造成属性名的冲突,比如,你使用了一个他人提供的对象,但又想为这个对象添加新的方法(mixin 模式),新方法的名字就有可能与现有方法产生冲突,于是 ES6 引入了Symbol。Symbol是一种新的原始数据类型,表示独一无二的值。它是继undefined、nu ...
分类:
其他好文 时间:
2018-12-05 01:54:15
阅读次数:
172
Given a non empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n ...
分类:
其他好文 时间:
2018-12-04 22:22:06
阅读次数:
198
Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Exa ...
分类:
其他好文 时间:
2018-12-04 13:23:24
阅读次数:
199
修改【public】-【index.html】meta标签 <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no ...
分类:
其他好文 时间:
2018-12-04 00:53:02
阅读次数:
205
早上起来占个坑,晚上整理。 依赖注入DI(dependency injection): 谁依赖谁?谁注入谁?注入什么? 调用类依赖功能类。 容器注入调用类。 注入了功能类的实例。 控制反转Ioc(inversion of control): 谁控制谁?反转了什么?正转是什么? ioc容器控制实例的创 ...
分类:
其他好文 时间:
2018-12-03 15:30:03
阅读次数:
203
一.理论知识部分 设计模式(Design pattern)是设计者一种流行的思考设计问题的方法,是一套被反复使用,多数人知晓的,经过分类编目的,代码设计经验的总结。使用设计模式是为了可重用代码、让代码更容易被他人理解、保证代码可靠性。每一个模式描述了一个不断重复发生的设计问题,以及该问题的核心解决方 ...
分类:
编程语言 时间:
2018-12-02 17:34:12
阅读次数:
173
虽然用了ELK很久了,但一直苦于没有自己尝试搭建过,所以想抽时间尝试尝试。原本打算按照教程 "《ELK集中式日志平台之二 — 部署》" (作者:樊浩柏科学院) 进行测试的,没想到一路出了很多坑,所以又按照自己成功搭建的流程写了本文。 《ELK集中式日志平台之二 — 部署》一文参考价值非常大,图文并茂 ...
分类:
其他好文 时间:
2018-12-02 14:23:51
阅读次数:
155
19. Remove Nth Node From End of List minimum-depth-of-binary-tree Given a binary tree, find its minimum depth.The minimum depth is the number of nodes ...
分类:
其他好文 时间:
2018-12-02 14:21:25
阅读次数:
137
int rangeMinQuery(int segTree[], int qlow, int qhigh, int low, int high, int pos) { if (qlow = high) return segTree[pos]; if (qlow > high || qhigh < l... ...
分类:
其他好文 时间:
2018-12-01 23:46:51
阅读次数:
301
Given a square array of integers A, we want the minimum sum of a falling path through A. A falling path starts at any element in the first row, and ch ...
分类:
其他好文 时间:
2018-12-01 16:57:22
阅读次数:
209