#include
void colorReduce(cv::Mat &image, int div=64)
{
int nr= image.rows; // number of rows
int nc= image.cols * image.channels(); // total number of elements per line
for (int j=0; j<nr;...
分类:
移动开发 时间:
2015-03-09 20:58:51
阅读次数:
307
Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number of distinct common numbers shared by the two sets,
and Nt is the total number of distinct n...
分类:
其他好文 时间:
2015-03-07 17:13:09
阅读次数:
156
先查看11211端口占用情况 命令:netstat -an|more 显示 ?0 ?0.0.0.0:11211 ?即没有做IP限制 执行命令:nc -vv x.x.x.x 11211 提示连接成功 执行命令:vim /etc/sysconfig/memcached,修改配置文件 增加限制 ?...
分类:
数据库 时间:
2015-03-05 19:41:37
阅读次数:
157
作者:Hawstein出处:http://hawstein.com/posts/dp-novice-to-advanced.html声明:本文采用以下协议进行授权:自由转载-非商用-非衍生-保持署名|Creative Commons BY-NC-ND 3.0,转载请注明作者及出处。前言本文翻译自To...
分类:
其他好文 时间:
2015-03-04 18:27:08
阅读次数:
159
Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Ncis the number of distinct common numbers shared by the two...
分类:
其他好文 时间:
2015-03-01 18:21:51
阅读次数:
181
动态规划:从新手到专家March 26, 2013作者:Hawstein出处:http://hawstein.com/posts/dp-novice-to-advanced.html声明:本文采用以下协议进行授权:自由转载-非商用-非衍生-保持署名|Creative Commons BY-NC-ND...
分类:
编程语言 时间:
2015-02-23 13:07:53
阅读次数:
248
传送门:Power Network题意:在一个网络图中有n个点,其中有np个发电站,nc个用户,m条电线;每个发电站,用户,和电线都对应有一个最大的电流;让求出该网络中最大的电流。分析:最大流裸题,增加一个源点0和汇点n+1后直接跑最大流即可。#pragma comment(linker,"/STA...
分类:
其他好文 时间:
2015-02-16 15:34:29
阅读次数:
163
January 20, 2014 作者:Hawstein 出处:http://hawstein.com/posts/google-java-style.html 声明:本文采用以下协议进行授权: 自由转载-非商用-非衍生-保持署名|Creative Commons BY-NC-ND 3.0 ,转.....
分类:
编程语言 时间:
2015-02-14 13:44:16
阅读次数:
271
题目链接:click here
题意:一个电力网络有n个点,有np个发电站,nc个消耗点,其余的为中转站。m条电缆,中转站既不发电也不耗电。每条电缆都有一个最大容量。
思路:设置一个超级源点和一个超级汇点,将所有的源点和汇点分别放进去,Dinic 算法实现。
注意括号的处理。
代码:
#include
#include
#include
#include
#include...
分类:
Web程序 时间:
2015-02-11 20:41:10
阅读次数:
173
发送端:cattest.txt | nc -l -p 6666或者nc -l-p 6666 test1.txt如上面的操作,即可将文件test.txt从发送端传送到接收端,保存为test1.txt
分类:
系统相关 时间:
2015-02-11 18:00:21
阅读次数:
123