2013年10月11日

摘要: 1,mongodb http://docs.mongodb.org/manual/core/geospatial-indexes/2,mysql 的 myisam 引擎也支持空间索引 阅读全文
posted @ 2013-10-11 16:23 Harveyaot 阅读(184) 评论(0) 推荐(0)
摘要: hadoop fs -conf 和hadoop --config fs 差的差别怎么这么大呢? 阅读全文
posted @ 2013-10-11 10:53 Harveyaot 阅读(126) 评论(0) 推荐(0)

2013年10月8日

摘要: N.arange(0,3) : effect:array([0, 1, 2])x =[[1,2,3,4],[2,3,4,5],[3,4,5,6]]N.column_stack((N.arange(0,m),x)) effect :array([[0, 1, 2, 3, 4],[1, 2, 3, 4, 5],[2, 3, 4, 5, 6]])matrix operation: def euclid(i, x): 9 """euclidean(i, x) -> euclidean distance between x and y""" 阅读全文
posted @ 2013-10-08 10:40 Harveyaot 阅读(347) 评论(0) 推荐(0)

2013年9月28日

摘要: 这三种方法,非常的巧妙,总结一下,可以很巧妙的用到以后的算法中去,这种考虑问题的方式,将给我们带来很多的启发。 1 void qsort(char *v[], int left, int right) 2 { 3 int i,last; 4 void swap(char *v[], int i, int j); 5 if (left >= right) 6 return 7 swap(v,left,(left + right)/2); 8 last = left; 9 for( i = left+1; i tgt... 阅读全文
posted @ 2013-09-28 23:12 Harveyaot 阅读(1328) 评论(0) 推荐(0)

2013年9月27日

摘要: A Useful Partitioner Class (secondary sort, the -partitioner org.apache.hadoop.mapred.lib.KeyFieldBasedPartitioner option)Hadoop has a library class,KeyFieldBasedPartitioner, that is useful for many applications. This class allows the Map/Reduce framework to partition the map outputs based on certai 阅读全文
posted @ 2013-09-27 15:34 Harveyaot 阅读(282) 评论(0) 推荐(0)

2013年9月24日

摘要: 1,取自 brian Kernighan的 C programming language中 逆波兰式一章的代码为例子。2,文件有calc.h getch.c getop.c main.c makefile stack.cmakefile 文件version 1: 1 calc: main.o getch.o getop.o stack.o 2 cc -o calc main.o getch.o getop.o stack.o 3 main.o: main.c calc.h 4 getch.o: getch.c 5 getop.o: getop.c calc.h 6 sta... 阅读全文
posted @ 2013-09-24 13:55 Harveyaot 阅读(315) 评论(0) 推荐(0)
摘要: 用git clone的 代码,本地修改之后无法 git push 上去,出现 403 拒绝错误。原因是 使用的老版本的git check下来,老版本提交时寻找的文件https://github.com/harveyaot/c_test.git/info/refs到一个refs文件,github提示 请更新 git client。于是从https://git-core.googlecode.com/files/中get 下最新的 git 安装文件config -- prefix = user/localmake & make install 之后,添加的新的path中去git --ver 阅读全文
posted @ 2013-09-24 10:49 Harveyaot 阅读(568) 评论(0) 推荐(0)

2013年9月22日

摘要: http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command-examples/ 阅读全文
posted @ 2013-09-22 16:17 Harveyaot 阅读(212) 评论(0) 推荐(1)
摘要: DBSCAN(D, eps, MinPts) C = 0 for each unvisited point P in dataset D //每个没有访问的节点 mark P as visited NeighborPts = regionQuery(P, eps) //查找该区域内的所有邻居节点 if sizeof(NeighborPts) = MinPts NeighborPts = NeighborPts joined with NeighborPts' //更新迭代过程,不停的增加新的neighbor进来 if P... 阅读全文
posted @ 2013-09-22 15:18 Harveyaot 阅读(590) 评论(0) 推荐(1)

2013年8月30日

摘要: 在linux平台下,设置core dump文件生成的方法:1) 在终端中输入ulimit -c 如果结果为0,说明当程序崩溃时,系统并不能生成core dump。2) 使用ulimit -c unlimited命令,开启core dump功能,并且不限制生成core dump文件的大小。如果需要限制,加数字限制即可。ulimit - c 10243) 默认情况下,core dump生成的文件名为core,而且就在程序当前目录下。新的core会覆盖已存在的core。通过修改/proc/sys/kernel/core_uses_pid文件,可以将进程的pid作为作为扩展名,生成的core文件格式为 阅读全文
posted @ 2013-08-30 17:22 Harveyaot 阅读(250) 评论(0) 推荐(0)

导航