代码改变世界

阅读排行榜

优雅数据结构-BloomFilter

2012-07-31 20:14 by coodoing, 360 阅读, 收藏,
摘要: Bloom Filter是由Bloom在1970年提出的一种多哈希函数映射的快速查找算法。通常应用在一些需要快速判断某个元素是否属于集合,但是并不严格要求100%正确的场合。一. 实例为了说明Bloom Filter存在的重要意义,举一个实例:假设要你写一个网络蜘蛛(web crawler)。由于网络间的链接错综复杂,蜘蛛在网络间爬行很可能会形成“环”。为了避免形成“环”,就需要知道蜘蛛已经访问过那些URL。给一个URL,怎样知道蜘蛛是否已经访问过呢?稍微想想,就会有如下几种方案:1. 将访问过的URL保存到数据库。2. 用HashSet将访问过的URL保存起来。那只需接近O(1)的代价就可以 阅读全文

预览文章: 局部刷新验证码

2010-10-15 23:30 by coodoing, 360 阅读, 收藏,
摘要: 其实我一开始的想法也是用updatepanel进行局部刷新,不过后面想了一下动态更改src就OK 了。。。两种解决方法::<div> <p> <span>请计算 </span><span class="redcolor"> <img src="<%= MixApplication.Instance.RelativePath %>/User/Register/MVerCode.aspx" align="middle" style="position: 阅读全文

二叉树的基本遍历方法

2012-07-09 17:16 by coodoing, 325 阅读, 收藏,
摘要: View Code 1 package Tree; 2 3 import java.util.Stack; 4 public class BinaryTreeTraversal { 5 protected Node root; 6 7 public BinaryTreeTraversal(Node root) { 8 this.root = root; 9 } 10 11 public Node getRoot() { 12 return root; 13 } 14 15 /** 构造树... 阅读全文

【转】Exposing a WCF Service With Multiple Bindings and Endpoints

2011-11-27 01:22 by coodoing, 318 阅读, 收藏,
摘要: Windows Communication Foundation (henceforth abbreviated as WCF) supports multiple bindings that allows developers to expose their services in a variety of ways. What this means is a developer can create a service once and then expose it to support net.tcp:// or http:// and various versions of http: 阅读全文

【转】高效利用GitHub

2012-08-13 10:19 by coodoing, 311 阅读, 收藏,
摘要: 转帖:http://www.yangzhiping.com/tech/github.html正是Github,让社会化编程成为现实。本文尝试谈谈GitHub的文化、技巧与影响。Q1:GitHub是什么Q2:GitHub风格Q3: 在GitHub,如何跟牛人学习Q4: 享受纯粹的写作与演讲Q5: 代码帮你找工作Q6: GitHub还在影响一些什么Q7: 除了GitHub,还可以选择什么?Q1:GitHub是什么A1:一家公司位于旧金山,由Chris Wanstrath,PJ Hyett与Tom Preston-Werner三位开发者在2008年4月创办。迄今拥有59名全职员工,主要提供基于git 阅读全文