图的接口定义 Graph public class UnsupportedOperation extends RuntimeException {public UnsupportedOperation(String err) {super(err);} } public interface Graph {public static final int UndirectedGraph = 0;//无向图public static final int DirectedGraph = 1;//有向图
<?php /** * 获取用户真实 IP */ function getIP() { static $realip; if (isset($_SERVER)){ if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])){ $realip = $_SERVER["HTTP_X_FORWARDED_FOR"]; } else if (isset($_SERVER["HTTP_CLIENT_IP"])) { $r
链式哈希表的接口定义 关于哈希表与链式哈希表的描述可以参阅:http://www.cnblogs.com/idreamo/p/7990860.html 链式哈希表的操作与属性有:初始化.销毁.插入元素.删除元素.查找元素.获取哈希表中无数的个数. chtbl_init int cltbl_init(CHTbl *htbl, int buckts, int (*h)(const void *key), int (*match)(const void *key1,const void *key2),