现在位置: 首页 > deluge发表的所有文章
  • 09月
  • 24日
综合 ⁄ 共 89字 评论关闭
MIT Face DataBase MIT提供的人脸数据库,用于人脸识别. 链接地址:http://web.mit.edu/emeyers/www/face_databases.html
阅读全文
  • 08月
  • 15日
综合 ⁄ 共 805字 评论关闭
#include<stdio.h> #include<stdlib.h> main() {       int k,m,n,t,i;       int dig[100];       while(scanf("%d%d",&k,&m)!=EOF)       {           for(i=0;i<100;i++)                dig[i]=0;           t=1;dig[0]=1;           for(n=1;n<100;n++)           {             for(i=0;i<t;i++)               dig[i]*=m;             for(i=0;i<t;i++)//t作限制,避免做无用的运算             if(dig[i]>9)             {                dig[i+1]+=dig[i]/10;                 dig[......
阅读全文
  • 08月
  • 11日
综合 ⁄ 共 7606字 评论关闭
这篇文章介绍下libevent在socket异步编程中的应用。在一些对性能要求较高的网络应用程序中,为了防止程序阻塞在socket I/O操作上造成程序性能的下降,需要使用异步编程,即程序准备好读写的函数(或接口)并向系统注册,然后在需要的时候只向系统提交读写的请求之后就继续做自己的事情,实际的读写操作由系统在合适的时候调用我们程序注册的接口进行。异步编程会给一些程序猿带来一些理解和编写上的困难,因为我们通常写的一些简单的程序都是顺序执行的,而异步编程将程序的执行顺序打乱了,有些代码什么情况下执行往往不是太清晰,......
阅读全文
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef long long LL; const int maxn =305; int m,n; int g[maxn][maxn]; int gcd(int a,int b){ return b==0 ? a : gcd(b,a%b); } void init(){ int lim = 300; for(int i=1;i<=lim;i++) for(int j=1;j<=lim;j++) g[i][j] = gcd(i,j); } int main() { init(); while(scanf("%d %d",&m,&n)==2){ if(!n&&!m) break; LL......
阅读全文
  • 10月
  • 19日
综合 ⁄ 共 800字 评论关闭
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: Elements in a triplet (a,b,c) must be in non-descending order. (ie, a ≤ b ≤ c) The solution set must not contain duplicate triplets. For example, given array S = {-1 0 1 2 -1 -4}, A solution set is: (-1, 0, 1) (-1, -1, 2) class Solution { public: vector<vector<int> > threeSum(vector<int&g......
阅读全文
  • 05月
  • 23日
综合 ⁄ 共 3251字 评论关闭
  spring 、zookeeper(dubbo)整合 1.maven pom jar包 <properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><springframework.version>3.1.0.RELEASE</springframework.version><!-- Logging --><slf4j.version>1.7.5</slf4j.version><slf4j-log4j12.version>1.7.2</slf4j-log4j12.version><log4j.version>1.2.17</log4j.version> </properties> <dependencies> <!-- Logging with SLF4J --><de......
阅读全文
  • 05月
  • 09日
综合 ⁄ 共 216字 评论关闭
svn服务器死机重启之后,锁定文件的时候出下面的提示: Malformed file svn: Can't parse lock/entries hashfile '/data/svn/svnroot/platform/db/locks/550/550529f7a3d790f5f7adeee3d408826e' svn: Malformed file 搜索解决办法,没有找到中文资料,后来在英文网站搜到解决办法: 在svn服务器上把提示的对应文件删除就行了
阅读全文
  • 04月
  • 08日
综合 ⁄ 共 1552字 评论关闭
反正每一个岛都要有雷达覆盖,放雷达的时候尽可能多覆盖岛...... #include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<cstring> using namespace std; struct node { double x,y; }; bool cmp(node a,node b) { return a.x<b.x; } int main() { // freopen("in","r",stdin); int T,i,n,ans,jishu=0; double d,pr,l,r,t; node box[1010]; while(cin>>n>>d) { if(n==0&&......
阅读全文
  • 02月
  • 24日
综合 ⁄ 共 3352字 评论关闭
   引子:老王果园中的果树要施肥了,需要去供销社买肥料。恰巧他又很忙,而且资金也周转不过来,于是他只好指派一位员工去供销社佘。两个小时过后,那位员工垂头丧气的跑回来告诉老王人家只人老王不认他。呵呵,够悲催的。老王只好与供销社协议,由于供销社也认识老王的儿子,最后供销社同意让他儿子过来佘。 呵呵,很现实的问题。由于老王和儿子是父子关系,人家认为以后不管老王是有钱没钱都得归小王,欠债自然也可以找小王讨。今天要讲的内核对象继承也是同样的道理,子进程可以访问父进程的的可继承对象。 下面给出代码: 父......
阅读全文
  • 01月
  • 27日
综合 ⁄ 共 1999字 评论关闭
利用JS实现两个组合框(或者叫下拉框)的联动   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title></title> <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"> <meta name="ProgId" content="VisualStudio.HTML"> <meta name="Originator" content="Microsoft Visual Studio .NET 7.1"> </head> <body> <form name="dou......
阅读全文
  • 12月
  • 21日
综合 ⁄ 共 277字 评论关闭
1、添加图表控件和之前一样,引入命名空间 using System.Windows.Forms.DataVisualization.Charting; 2、在Form的Load事件里加入下列代码控制图表形式和数据 private void Form3_Load(object sender, EventArgs e) { chart1.Series[0].ChartType = SeriesChartType.Line; for (int i = 0; i < 4; i++) { chart1.Series[0].Points.Add(new DataPoint(i, i + 1)); } } 3、运行效果如下
阅读全文
  • 12月
  • 18日
综合 ⁄ 共 336字 评论关闭
Windows使用两种字符集ANSI和UNICODE,前者就是通常使用的单字节方式,但这种方式处理象中文这样的双字节字符不方便,容易出现半个汉字的情况。而后者是双字节方式,方便处理双字节字符。Windows NT的所有与字符有关的函数都提供两种方式的版本,而Windows 9x只支持ANSI方式。_T一般同字常数相关,如_T("Hello")。如果你编译一个程序为ANSI方式,_T实际不起任何作用。而如果编译一个程序为UNICODE方式,则编译器会把"Hello"字符串以UNICODE方式保存。_T和_L的区别在于,_L不管你是以什么方式编译,一律以以UNICODE方式保存 Messa......
阅读全文