2012年5月13日

利用安装光盘创建本地 yum 源补装 RPM 软件包

摘要: 简介: 为系统补装 RPM 软件包,对一部分 Linux 用户来讲,是一件繁琐的事。众所周知的 RPM 依赖问题困扰了众多用户,让他们在面临这个场合时懊悔当初没有选择完全系统安装。甚至盛传着“完全安装吧,不差这几 G 空间,省得麻烦”的流行说法。虽然 yum 已经很大程度上帮助我们解决了这个问题... 阅读全文

posted @ 2012-05-13 22:57 ruce.fan 阅读(278) 评论(0) 推荐(0)

寻找有向图的强连通分支

摘要: 求有向图G的强连通分支可以通过下面的步骤进行: (1)对G执行深度优先搜索,求出每个顶点的后序遍历顺序号postOrder。 (2)反转有向图G中的边,构造一个新的有向图G*。 (3)由最高的postOrder编号开始,对G*执行深度优先搜索。如果深度优先搜索未达到所有顶点,由未访问的最高pos... 阅读全文

posted @ 2012-05-13 22:46 ruce.fan 阅读(596) 评论(0) 推荐(0)

N个相同的元素分成M组(允许某些组为空),有多少种不同的分法?

摘要: 分组公式: 1 n=1,m=1 q(n,n) nm>1 阅读全文

posted @ 2012-05-13 22:42 ruce.fan 阅读(941) 评论(0) 推荐(0)

2012年5月9日

Laplacian of Gaussian (LoG)

摘要: As Laplace operator may detect edges as well as noise (isolated, out-of-range), it may be desirable to smooth the image first by convolution with a ... 阅读全文

posted @ 2012-05-09 15:43 ruce.fan 阅读(321) 评论(0) 推荐(0)

2012年5月5日

最大类间方差法(大津法OTSU)

摘要: public static byte OstuThreshold(Bitmap bitmap) { byte threshold = 128; if (bitmap.PixelFormat == PixelForm... 阅读全文

posted @ 2012-05-05 21:07 ruce.fan 阅读(225) 评论(0) 推荐(0)

Visual Studio中如何删除所有空行?

摘要: Enter: Ctrl+H Find what: ^:b*$\n Replace with: [Empty] Look in: Current Document Find Option: Use Regular Expressions Click: Replace All 在正则表达式^:b*$... 阅读全文

posted @ 2012-05-05 20:41 ruce.fan 阅读(133) 评论(0) 推荐(0)

2011年10月7日

贝茜的晨练计划

摘要: 时限:1000ms 内存限制:10000K 总时限:3000ms 描述: 奶牛们打算通过锻炼来培养自己的运动细胞,作为其中的一员,贝茜选择的 运动方式是每天进行N(1 #include using namespace std; int max_dis[10001], region_d... 阅读全文

posted @ 2011-10-07 15:43 ruce.fan 阅读(272) 评论(0) 推荐(0)

2011年10月6日

奶牛的午餐

摘要: 时限:1000ms 内存限制:10000K 总时限:3000ms 描述: Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume n... 阅读全文

posted @ 2011-10-06 19:48 ruce.fan 阅读(148) 评论(0) 推荐(0)

2011年6月21日

计算实对称矩阵特征值和特征向量

摘要: #define EPS 0.000001 #include #include int Jacobi(double matrix[][5], double vec[][5], int maxt, int n) { int it, p, q, i, j; // 函数返回值 double ... 阅读全文

posted @ 2011-06-21 22:54 ruce.fan 阅读(500) 评论(0) 推荐(0)

Humble Number

摘要: 时限:1000ms 内存限制:10000K 总时限:3000ms 描述: 如果一个数没有2,3,5,7以外的素数因子,那么这个数被称为“Humble Number”。前20个“Humble Number”是:1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,21,24... 阅读全文

posted @ 2011-06-21 22:49 ruce.fan 阅读(152) 评论(0) 推荐(0)

导航