MongoDB自带了一个JavaScript Shell,所以在其中使用js语法是可以的。 Insert操作: 单条插入 循环插入 Find查询操作: 常用的: >, >=, <, <=, !=, = > 对应 $gt >= 对应 $gte < 对应 $lt <= 对应 $lte != 对应 $ne ...
分类:
数据库 时间:
2016-07-08 23:25:40
阅读次数:
460
并查集 并查集处理的是集合之间的关系,即‘union' , 'find' 。在这种数据类型中,N个不同元素被分成若干个组,每组是一个集合,这种集合叫做分离集合。并查集支持查找一个元素所属的集合和两个元素分别所属的集合的合并。 并查集支持以下操作: MAKE(X):建立一个仅有成员X的新集合。 UNI ...
分类:
编程语言 时间:
2016-07-08 21:38:40
阅读次数:
239
(function($) { Zepto.fn.clone = function() { var result = $.fn.clone.apply(this, arguments), oldTextareas = this.find('textarea').add(this.filter('tex ...
分类:
其他好文 时间:
2016-07-08 19:50:36
阅读次数:
108
Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two ...
分类:
其他好文 时间:
2016-07-08 17:53:21
阅读次数:
119
1.创建项目project django-admin.py startproject myblog 查看目录树 alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" 2.创建应用app 一个工程里可以创建很多个应用ap ...
分类:
其他好文 时间:
2016-07-08 14:58:29
阅读次数:
118
withopen(‘cisco1.txt‘)ascisco:foreach_lineincisco:ifnoteach_line.find(‘err-disabled‘)==-1:i=each_line.strip()print(i)
分类:
编程语言 时间:
2016-07-08 11:58:33
阅读次数:
239
1.find 命令的mtime参数的使用 有关find -mtime这个参数的使用: -mtime n 按照文件的更改时间来找文件,n为整数。 n表示文件更改时间距离为n天, -n表示文件更改时间距离在n天以内,+n表示文件更改时间距离在n天以前。 例如: -mtime 0 表示文件修改时间距离当前 ...
分类:
系统相关 时间:
2016-07-08 10:16:18
阅读次数:
219
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. ...
分类:
其他好文 时间:
2016-07-08 06:47:20
阅读次数:
116
Given the root and two nodes in a Binary Tree. Find the lowest common ancestor(LCA) of the two nodes. The lowest common ancestor is the node with larg ...
分类:
其他好文 时间:
2016-07-08 06:44:58
阅读次数:
133