文章分类 -  Erlang-二进制

erlang轻松实现memcached binary协议
摘要:简单实现了下memcached binary protocol的 get和 set command,体验了下erlang binary语法的强大和方便 代码:-module(binary_server).-export([start/0]).start()->{ok,Listen}=gen_tcp:listen(7777,[binary,{packet,0},{reuseaddr,true},{active,true}]),register(kvs,spawn(fun()->dict()end)),accept(Listen).accept(Listen)->{ok,Sock 阅读全文

posted @ 2013-06-02 11:20 应无所住而生其心 阅读(254) 评论(0) 推荐(0)

Simhashing in Erlang–beauty with binary comprehension
摘要:Simhashing is popular technique to detect near duplicates in content. Given two files the similarity in their simhashes gives a mathematical way to compute the similarity of the documents. The algorithm works like thissplit the content into a set of featuresfor each of the feature compute a hash of 阅读全文

posted @ 2013-06-02 10:25 应无所住而生其心 阅读(218) 评论(0) 推荐(0)

导航