vmKISSY:KISSY.add('bops/js/forced-closure',function(S, TipUitl){ //停业原因 S.one('#reason').on('change',function(){ if(S.one(this).val() == ...
分类:
其他好文 时间:
2015-07-13 11:57:03
阅读次数:
116
scala> val file = sc.textFile("hdfs://9.125.73.217:9000/user/hadoop/logs") scala> val count = file.flatMap(line => line.split(" ")).map(word => (word,...
分类:
Web程序 时间:
2015-07-12 23:08:03
阅读次数:
274
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x...
分类:
其他好文 时间:
2015-07-12 17:09:37
阅读次数:
95
设置描述符非阻塞的两种方法:1,调用 open 时,设置,O_NONBLOCK;2,调用 fcntl设置;具体如下:1,open("/xxx/file1",O_RDWR|O_NONBLOCK);2,val=fcntl(fd,F_GETFL,0); F_GETFL获取文件状态标识 val |...
分类:
其他好文 时间:
2015-07-12 17:07:22
阅读次数:
98
Remove all elements from a linked list of integers that have value val.
Example
Given: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6
Return: 1 --> 2 --> 3 --> 4 --> 5
/**
* Definit...
分类:
其他好文 时间:
2015-07-12 15:50:47
阅读次数:
121
1. 二分查找//递归版int binarySearch(const int arr[], int low, int high, int val){ if (low arr[mid]) return binarySearch(arr, mid+1, high, val)...
分类:
编程语言 时间:
2015-07-12 15:31:36
阅读次数:
222
这里接着上篇stl非变易算法(一)进行总结。主要解析算法函数count、count_if、mismatch、equal、search、search_n以及find_end,给出算法函数的实现及测试用例。下面直接进入正题。统计等于某值的容器元素个数countcount函数用于计算容器中某个给定值的出现次数。计算迭代区间[first,last)上等于val值的元素个数ret,返回计数。//count算法...
分类:
编程语言 时间:
2015-07-12 12:45:49
阅读次数:
192
背景: 在分页功能中,记录需分页显示,需要row_number()函数标记行号。数据表:排序之前数据表显示:sql语句:1 select ROW_NUMBER() over(order by id) as RowNum,Name,Val from T1检索结果:注意:Leslie的ID为Nul...
分类:
数据库 时间:
2015-07-12 10:55:02
阅读次数:
237
基于spark1.3.1的源码进行分析
spark master启动源码分析
1、在start-master.sh调用master的main方法,main方法调用
def main(argStrings: Array[String]) {
SignalLogger.register(log)
val conf = new SparkConf
val args =...
分类:
其他好文 时间:
2015-07-11 22:55:30
阅读次数:
489
002-Scala函数定义、流程控制、异常处理入门实战Scala函数定义语句结束无分号定义无参函数def 函数名称(参数名称:参数类型)[:Unit=]{ 函数体}老师的代码我的实际代码原因是集成开发环境自带的版本为2.11.0变量常量(不可变)声明val变量声明var无参函数的调用也无需加括号()...
分类:
其他好文 时间:
2015-07-11 21:28:37
阅读次数:
226