上一页 1 ··· 9 10 11 12 13 14 15 下一页
摘要: Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... 阅读全文
posted @ 2015-12-11 16:24 ZHOU YANG 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1.添加依赖hadoop和mongodb的连接器 org.mongodb.mongo-hadoop mongo-hadoop-core 1.4.2java连接mongodb连接器 org.mongodb mongo-java-driver 2.13.02.使用示例import com.mongodb.hadoop.MongoOutputFormat;import... 阅读全文
posted @ 2015-12-08 17:50 ZHOU YANG 阅读(3020) 评论(0) 推荐(0) 编辑
摘要: 一、普通java项目(1)添加项目jar包File -> Project Structure Libarries 添加jar包jna-4.0.0.jar(2)将Data文件夹复制到ICTCLAS2015文件夹下(3)声明调用分词器的接口,如下://定义接口Clibrary,继承自com.sun.jna.Librarypublic interface CLibrary extends Libr... 阅读全文
posted @ 2015-12-07 21:31 ZHOU YANG 阅读(1895) 评论(7) 推荐(1) 编辑
摘要: 1.scala和maven如何整合 网上有一堆教程讲idea如何new module或new project一步一步来创建scala工程,在这里我不推荐这个。原因是现在主流的开发环境,大多数是采用maven来构建项目的,所以建议大家用maven+plugin的方式来构建scala应用,另外,就象VB... 阅读全文
posted @ 2015-12-07 20:09 ZHOU YANG 阅读(28698) 评论(1) 推荐(4) 编辑
摘要: 1.PairRDD介绍 Spark为包含键值对类型的RDD提供了一些专有的操作。这些RDD被称为PairRDD。PairRDD提供了并行操作各个键或跨节点重新进行数据分组的操作接口。例如,PairRDD提供了reduceByKey()方法,可以分别规约每个键对应的数据,还有join()方法,可以把两个RDD中键相同的元素组合在一起,合并为一个RDD。2.创建Pair RDD 程序示例:... 阅读全文
posted @ 2015-12-07 20:02 ZHOU YANG 阅读(23649) 评论(0) 推荐(1) 编辑
摘要: Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.Note: The input string may conta... 阅读全文
posted @ 2015-12-06 21:11 ZHOU YANG 阅读(822) 评论(0) 推荐(0) 编辑
摘要: Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi... 阅读全文
posted @ 2015-12-06 21:10 ZHOU YANG 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 1.RDD介绍: RDD,弹性分布式数据集,即分布式的元素集合。在spark中,对所有数据的操作不外乎是创建RDD、转化已有的RDD以及调用RDD操作进行求值。在这一切的背后,Spark会自动将RDD中的数据分发到集群中,并将操作并行化。 Spark中的RDD就是一个不可变的分布式对象集合。每个RDD都被分为多个分区,这些分区运行在集群中的不同节点上。RDD可以包含Python,Jav... 阅读全文
posted @ 2015-12-06 21:08 ZHOU YANG 阅读(2848) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle 障碍 and empty spac... 阅读全文
posted @ 2015-12-02 16:30 ZHOU YANG 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol... 阅读全文
posted @ 2015-12-02 15:45 ZHOU YANG 阅读(216) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 下一页