ES6为对象带来的新特性。 对象传统的写法: let person={ 'name':'Lily', 'say':function(){ alert('hello!'); } } 1、ES6中写法更简便 对象属性: var name='Lily'; var age='13'; var person= ...
分类:
其他好文 时间:
2016-08-03 10:27:39
阅读次数:
136
ElasticSearch的ik分词插件开发 ElasticSearch的ik分词插件开发 摘要 本文主要介绍如何开发ElasticSearch的ik分词插件。很多时候,网上开源的分词插件不能满足业务需求,只能自己定义开发一套ik分词,let's go! 本文主要介绍如何开发ElasticSearc ...
分类:
其他好文 时间:
2016-08-03 01:23:45
阅读次数:
167
#!/bin/bash
memlist=`psauxf--width=1000|grep$1|grep-vgrep|awk‘{print$6}‘`;
totalMem=0
formemin$memlist;do
let"totalMem=$totalMem+mem"
done
echo$totalMem$1表示进程名字,是脚本给出的参数。也是zabbix上Item中要指定的。上面的脚本可以简化:#!/bin/bash
mem=`psaux..
分类:
系统相关 时间:
2016-08-02 17:20:03
阅读次数:
367
cat>f1<<EOF多行提交mail-stestuser1<<end>nicetomeetu>let‘sgo>endll/etc/|less翻页显示ls/tmp|tee/tmp/a.logtee命令存信息,-a追加tr[[:lower:]][[:upper:]]<f1将f1的标准输入进行转换Xechoasdfg|&tr‘a-z‘‘A-Z‘等价写法:Xechoasdfg2>&..
分类:
系统相关 时间:
2016-08-02 17:16:30
阅读次数:
354
代码讲解:(后面有额外代码讲解)
首页设计UIPickerView的样式设计:
leftArray = ["花朵","颜色","形状"];
let array1 = ["茉莉","玫瑰","郁金香","紫罗兰"];
let array2 = ["红色","黄色","黑色","白色","紫色"];
let array3...
分类:
编程语言 时间:
2016-08-02 11:43:03
阅读次数:
2387
1、Array.prototype.shuffle = function() { let m = this.length, i; while (m) { i = (Math.random() * m--) >>> 0; [this[m], this[i]] = [this[i], this[m]] ...
分类:
编程语言 时间:
2016-08-02 11:31:25
阅读次数:
151
Description Consider a positive integer X,and let S be the sum of all positive integer divisors of 2004^X. Your job is to determine S modulo 29 (the r ...
分类:
移动开发 时间:
2016-08-02 01:10:53
阅读次数:
225
可能有些童鞋并不知道,在Swift中缩写点符号对于任何类型的任何static成员都有效.我们实际写一个例子看一下:import UIKitclass CFoo{
static let sharedInstance = CFoo()
}struct SFoo{
static let sharedInstance = SFoo()
}let foo:CFoo = .sharedInsta...
分类:
编程语言 时间:
2016-08-01 21:24:45
阅读次数:
174
1、class……extends es6中的class与es5 中的function差不多; class Student extends People , student 继承了people父类; 2、let与var的区别 let声明块级变量,不知道下文变量的设置。 3、es6中的module导入与 ...
分类:
其他好文 时间:
2016-08-01 20:59:33
阅读次数:
169
身份证校验,绝对严格function checkIdCard(idcard) { let ereg; // const Errors = new Array( // '验证通过', // '身份证号码位数不对', // '身份证号码出生日期超出范围或含有非法字符', // '身份证号码校验错误', ...
分类:
其他好文 时间:
2016-08-01 17:43:16
阅读次数:
176