![]() |
|
||||||||||||||
| | 网站首页 | 数据库教程 | web编程 | 服务器 | 程序设计 | | ||
|
||
|
|||||
| 同一张图片实例 | |||||
作者:佚名 文章来源:不详 点击数: 更新时间:2007-9-12 ![]() |
|||||
|
正在装载数据……
刘若英在互联网上的相同图片转载 http://finance.ce.cn/money/200609/25/t20060925_8715973.shtml下面的 http://finance.ce.cn/money/200609/25/W020060925540909722371.jpg图片
和 http://www.pclady.com.cn/sense/xz/0502/33927.html下面的 http://www.pclady.com.cn/sense/xz/0502/pic/20050217liuruo_(10).jpg 是同一张图片(如下)
![]() /** *//** * 计算文件对应的 */ public static long calFingerPrint(String path)![]() ...{ String str=""; try![]() ...{ FileInputStream in = new FileInputStream(path); DataInputStream din = new DataInputStream(in); while(din.read()>=0)![]() ...{ char test = din.readChar(); str = str + String.valueOf(test); } } catch(Exception e)![]() ...{ e.getStackTrace(); } // 测试使用 //System.out.println(str); // 调用函数 System.out.println(APHash(str)); return (APHash(str)); } ![]() /** *//** * */ public static long APHash(String str)![]() ...{ long hash = 0xAAAAAAAA;![]() for(int i = 0; i < str.length(); i++)![]() ...{ if ((i & 1) == 0)![]() ...{ hash ^= ((hash << 7) ^ str.charAt(i) ^ (hash >> 3)); } else![]() ...{ hash ^= (~((hash << 11) ^ str.charAt(i) ^ (hash >> 5))); } }![]() return hash; }
d:\pic\3.jpg
本文来源:http://blog.csdn.net/longronglin/archive/2007/09/09/1778428.aspx
|
|||||
| 文章录入:admin 责任编辑:admin | |||||
| 【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 | |||||
| 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
| | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 网站公告 | 网站地图 | 管理登录 | | |||
|