上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页

2010年4月9日

摘要: TrustRank is a biased PageRank method, which starts from some good seeds to propagate trust. It is very easy to implement based on PageRank. I implement it in Java using the WebGraph and LAW jar packa... 阅读全文
posted @ 2010-04-09 08:46 小橋流水 阅读(580) 评论(0) 推荐(0) 编辑

2010年4月7日

摘要: 首先添加com引用CDO for windows 2000 library,然后下面的函数就可以完成下载的功能:代码 static void downloadMht(string url, string path) { CDO.Message msg = new CDO.Message(); CDO.Configuration... 阅读全文
posted @ 2010-04-07 16:24 小橋流水 阅读(272) 评论(0) 推荐(0) 编辑

2010年4月6日

摘要: package cn.edu.dlut.wisdom;import java.io.*;import java.util.*;public class FileAccess { public static String readAllText(String fileName) throws IOException { StringBuffer sb = new StringBu... 阅读全文
posted @ 2010-04-06 16:41 小橋流水 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 有的时候当我们的程序,递归调用太深的时候,可能我们的栈就溢出了。 这个问题很好解决,只要加上JVM参数-Xss2m,基本就能解决这个问题。 阅读全文
posted @ 2010-04-06 14:55 小橋流水 阅读(611) 评论(0) 推荐(0) 编辑
摘要: WebGraph中的图,基本都会在删除结点后,进行向前移动的操作,其实在很多是侯,这是没有必要的,甚至是有副作用的。SetNoneScaleMutableGraph就是我实现的一个没有进行前移操作的类,还没有做深入的测试,理论上来说,基本没有什么问题。 废话少说,直接上码:package cn.edu.dlut.wisdom;/* * Copyright (C) 2006-2007 Se... 阅读全文
posted @ 2010-04-06 06:20 小橋流水 阅读(253) 评论(0) 推荐(0) 编辑
摘要: Tarjan算法也是用来发现强连通子图的算法,是Kosaraju算法的改进,算法复杂度是,算法比较简单,位代码和java实现代码如下:package cn.edu.dlut.wisdom;import it.unimi.dsi.fastutil.ints.*;import it.unimi.dsi.fastutil.objects.*;import it.unimi.dsi.webgraph.*;... 阅读全文
posted @ 2010-04-06 06:13 小橋流水 阅读(281) 评论(0) 推荐(0) 编辑

2010年4月4日

摘要: 看论文的时候,看到Kosaraju算法。Kosaraju是一个强连通分图的发现算法,如有代码中有详细的注释,所以就不赘述了。直接上码(使用webgraph库实现,在我之前的文章中,对webgraph有相关的介绍):package cn.edu.dlut.wisdom;import it.unimi.dsi.fastutil.ints.*;import it.unimi.dsi.fa... 阅读全文
posted @ 2010-04-04 13:59 小橋流水 阅读(363) 评论(0) 推荐(0) 编辑

2010年4月3日

摘要: Time Limit: 1000MS Memory Limit: 65536KBTotal Submissions: 15 Accepted: 8 Description: Badming看看上周的题目,觉得太难了,就想把题目出简单一些。求一个整数的开方√x。比如求 √99 =9 √100=10但这样也太简单了吧,为了增加些许难度,x的范围是0-10^26 Input: 给定一个自然数x.当x... 阅读全文
posted @ 2010-04-03 13:09 小橋流水 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 看了论文《Deeply Exploiting Link Structure: Setting a Tougher Life for Spammers》,用Java和webgraph库实现了一下其中的算法CPV,即计算AVRank和HVRank。最终的结果没有做归一化处理,我用数据集试了一下,发现效果还不错。 代码实现如下:package cn.edu.dlut.wisdom;import it.u... 阅读全文
posted @ 2010-04-03 12:54 小橋流水 阅读(327) 评论(0) 推荐(0) 编辑

2010年4月2日

摘要: 有关SimRank请参看文章http://www.cnblogs.com/youwang/archive/2010/02/06/1665105.html,或者去看相关论文。下面是Java代码实现,用到的是webgraph库。/* * To change this template, choose Tools | Templates * and open the template in the ed... 阅读全文
posted @ 2010-04-02 04:08 小橋流水 阅读(588) 评论(0) 推荐(0) 编辑

2010年4月1日

摘要: 计算组合数最大的困难在于数据的溢出,对于大于150的整数n求阶乘很容易超出double类型的范围,那么当C(n,m)中的n=200时,直接用组合公式计算基本就无望了。另外一个难点就是效率。 对于第一个数据溢出的问题,可以这样解决。因为组合数公式为:C(n,m) = n!/(m!(n-m)!) 为了避免直接计算n的阶乘,对公式两边取对数,于是得到:ln(C(n,m)) = ln(n!)-ln(m!)... 阅读全文
posted @ 2010-04-01 17:36 小橋流水 阅读(551) 评论(0) 推荐(0) 编辑

2010年3月28日

摘要: Time Limit: 1000MS Memory Limit: 65535KBTotal Submissions: 143 Accepted: 28 Description: One of the fundamental problems of computer science is ordering a list of items. There're a plethora of soluti... 阅读全文
posted @ 2010-03-28 15:05 小橋流水 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 7000MS Memory Limit: 65536KBTotal Submissions: 20 Accepted: 7 Description: In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n dis... 阅读全文
posted @ 2010-03-28 14:57 小橋流水 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 1000MS Memory Limit: 65536KBTotal Submissions: 81 Accepted: 9 Description:Fermat's theorem states that for any prime number p and for any integer a > 1, a^p == a (mod p). That is, if we ra... 阅读全文
posted @ 2010-03-28 14:28 小橋流水 阅读(312) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 1000MS Memory Limit: 65535KBTotal Submissions: 539 Accepted: 52 Description:歌手Pancakes到幼儿园跟小朋友玩,她到达的时候小朋友们正在争积木,小朋友都想要更多的积木砌一个自己喜欢的图形,砌完就可以和Pancakes合照。同时,Pancakes手上还有一些积木,她可以把手上的这些积木全部给一个小... 阅读全文
posted @ 2010-03-28 14:12 小橋流水 阅读(324) 评论(0) 推荐(0) 编辑

2010年3月27日

摘要: 1 void extended_gcd(int a,int b,int *x,int *y) 2 { 3 int t; 4 if(b==0) 5 { 6 *x = 1; 7 *y = 0; 8 return ; 9 }10 extended_gcd(b,a%b,x,y);11 t = *x;12 ... 阅读全文
posted @ 2010-03-27 07:42 小橋流水 阅读(345) 评论(0) 推荐(0) 编辑

2010年3月26日

摘要: 时间复杂度O(n) #include #include void merge_sort_inner(int A[], int p, int r){ int q, i, j, k, n1, n2; int temp, *L, *R; if(p < r) { q = (p + r) / 2; merge_sort_inner(A, p, q); ... 阅读全文
posted @ 2010-03-26 07:02 小橋流水 阅读(203) 评论(0) 推荐(0) 编辑

2010年3月23日

摘要: #include #include #include typedef TYPE T; void quicksort(T* data, int N) { int i, j; T v, t; if( N v) { } if( i >= j ) break; t = data[i]; data[i] = data[j]; data[j] = t; } t = data[i-1]; data... 阅读全文
posted @ 2010-03-23 04:08 小橋流水 阅读(109) 评论(0) 推荐(0) 编辑

2010年3月11日

摘要: 易语言程序破解小技巧 易语言程序在查壳的时候会被认为是c++程序,这点是需要注意的。 一般下断在MessageBoxA处,也可下在GetWindowTextA。OD载入,直到断点,然后很快应该能到达程序的领空,然后用查找字符串插件可以查找到很多字符串,然后就可以轻松地利用常用的方法破解该软件。 阅读全文
posted @ 2010-03-11 10:57 小橋流水 阅读(137) 评论(0) 推荐(0) 编辑

2010年2月28日

摘要: 1 至少发一篇上档次的文章。 2 过掉雅思(7分以上)。 3 读10本左右的经典专业书籍。 4 适当参加一些活动,锻炼身体,活跃人脉。 5 阅读10本以上的非本专业书籍,丰富知识面,提高综合能力。 阅读全文
posted @ 2010-02-28 04:38 小橋流水 阅读(133) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页

导航