Markdown powered blogs!
Here is the cookbook introduced the how-to.
Here is sample code block with markdown
public class test {
public static void main(String[] args) {
String me = "";
}
}
Here is the cookbook introduced the how-to.
Here is sample code block with markdown
public class test {
public static void main(String[] args) {
String me = "";
}
}
array = [0,2,4,6,8]
var x = _.reduce(array, function(memo,val){
if(val>memo) {return val}
return memo
},0)
2. map, flatten, pluck
map:将目标映射入新的集合,可以附带function预操作
flatten: 去掉多维数组的维度 还原为1维, 如果附带第二个boolean参数false则只减掉一个维度
pluck: 将指定key的值从json格式的数据集合中拔出
groupA = [{"name":"a1","data":101},{"name":"a2","data":102},{"name":"a3","data":103},{"name":"a4","data":104},]
_.map(_.flatten(_.pluck(groupA,"data")),function(d){return d})
[yaoyao@linux236 yaoyao]$ ls -l total 0 lrwxrwxrwx 1 yaoyao yaoyao 5 Aug 6 17:39 1.txt ->; 3.txt lrwxrwxrwx 1 yaoyao yaoyao 5 Aug 6 17:38 2.txt ->; 1.txt lrwxrwxrwx 1 yaoyao yaoyao 5 Aug 6 17:39 3.txt ->; 2.txt上面的三个文件形成了一个递归,实质上没有任何作用。系统管理员应该避免系统出现断链或循环链接。 用ln -s 命令可以生成一个软连接,如下: [root@linux236 test]# ln -s source_file softlink_file 在对符号文件进行读或写操作的时候,系统会自动把该操作转换为对源文件的操作,但删除链接文件时,系统仅仅删除链接文件,而不删除源文件本身。 硬链接文件 info ln 命令告诉您,硬链接是已存在文件的另一个名字(A "hard link" is another name for an existing file),这多少有些令人困惑。硬连接的命令是 ln -d existfile newfile 硬链接文件有两个限制 1、不允许给目录创建硬链接; 2、只有在同一文件系统中的文件之间才能创建链接。 对硬链接文件进行读写和删除操作时候,结果和软链接相同。但如果我们删除硬链接文件的源文件,硬链接文件仍然存在,而且保留了愿有的内容。这时,系统就“忘记”了它曾经是硬链接文件。而把他当成一个普通文件。
var app = angular.module("myApp", [dependencies]);
2. app exists, create a controller, controlling a node and its children
app.controller("nameCtrl", function($scope){ //xxxCtrl is naming convention
//$scope can have function and attributes in json favor
$scope.content = {message:"I am content"}
$scope.foo=function(){...}
})
3. app, controler exist, directive is customised node/attribute
app.directive("name",function(){
return {
restrict: "E || A || M",
$scope{
element/attr : "@ || & || = ", // @attr, &attr, =attr
}, //isolated scope, used in multiple instances of the directive
template: 'Here is returned inner html, can do {{bindModule or value}}',
link:function(scope,element,attrs,[depended controller])
{...} //like the constructor
controller: function() {
foo1 = function(){}
} // an API controller that other directive will depend on
}
})
app.directive("anotherName", function(){
require : 'name'
link: function(scope,element,attrs, nameCtrl){...can invoke nameCtrl foo1} //nameCtrl - naming convention
})
$ npm config set proxy http://login:pass@host:portHttps connection simply use:
$ npm config set https-proxy http://login:pass@host:port
return "PROXY 10.65.32.100:8080";
Thus the Maven should be able to connect to its central repository and starting downloading dependencies.amp true http JNGJSQ Welcome1 10.65.32.100 8080 www.google.com|hub.amp.com.au