Skip to content

Commit

Permalink
mongodb
Browse files Browse the repository at this point in the history
  • Loading branch information
KunLiuDJI committed Jun 24, 2016
1 parent 1b896f0 commit f691f82
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
21 changes: 21 additions & 0 deletions mongodb/index_sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

mongodb创建索引时指定1或-1的作用(ascending and desending)
===============================================================

概要
------------------------------------------

- 对于单列索引,1和-1是等效的,没有影响。

- 对于复合索引,1和-1会决定,到底哪些排序会能用到索引。

举例说明
----------------------------------------------
http://stackoverflow.com/questions/10329104/why-does-direction-of-index-matter-in-mongodb

参考:
---------------------------------------------

http://stackoverflow.com/questions/10329104/why-does-direction-of-index-matter-in-mongodb

https://docs.mongodb.com/manual/core/index-compound/#index-ascending-and-descending
14 changes: 14 additions & 0 deletions scala/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,22 @@ Scala更像一个杂货铺而不是大教堂,因为它被设计为让用它编
### 培育新的类型 & 培育新的控制结构

### 什么使得Scala具有伸缩性?

- Scala 是面向对象的--纯粹的面向对象语言:每个值都是对象,每个操作都是方法调用。
- Scala 是函数式的。函数式编程有两种理念做指导:
* 第一种理念是函数是第一类值。函数也是值,与整数和字串之类的在同一个地位。
* 第二个主要理念是程序的操作符应该把书如织映射到熟出汁而不是就地修改数据。也就是说,方法不应该有任何副作用。它们唯一的雨所在环境交流的方式应该是获得参数和返回结果。

### 为什么选择 Scala ?

* 兼容性
* 简洁性
- Scala的语法避免了一些束缚Java程序的固定写法
- 类型推断
* 高层级性
* 静态类型
- 可检验属性
- 安全的重构
- 文档


4 changes: 4 additions & 0 deletions spark/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ $ YOUR_SPARK_HOME/bin/spark-submit \
target/scala-2.10/simple-project_2.10-1.0.jar
```

设置环境变量
--------------------------------------------

http://www.powerxing.com/linux-environment-variable/

0 comments on commit f691f82

Please sign in to comment.