Windows XP 下安装Perl cpan模块

1、从 www.cpan.org 搜索你所需要的模块,下载下来,一般是gz,或者tgz格式 2、用winRAR之类解压缩软件接压缩 3、进入COMMAN模式,进入到刚才解压缩的文件夹下,含有“Makefile.PL”文件的目录下: 依次运行: perl Makefile.PL nmake nmake test nmake install 安装就完成了. 我的系统是Windows XP, 安装的是ActivePerl-5.8.8.817-MSWin32-x86-257965.msi 具体的平台安装方...
2012-01-27 14:15 | 阅读 1523 次 | 评论 0 条

一天无聊看到了一个亮点

TEA加密算法   TEA算法由剑桥大学计算机实验室的David Wheeler和Roger Needham于1994年发明[3]。它是一种分组密码算法,其明文密文块为64比特,密钥长度为128比特。TEA算法利用不断增加的Delta(黄金分割率)值作为变化,使得每轮的加密是不同,该加密算法的迭代次数可以改变,建议的迭代次数为32轮。   代码如下:   void qq_encipher(unsigned long *const plain, const unsigned long *const key, unsigned long *const crypt)   /...
2011-11-09 15:31 | 阅读 1666 次 | 评论 0 条

JAVASCRIPT:onfocus事件

JAVASCRIPT:onfocus事件 2008-04-28 00:37:09| 分类: JavaScript |字号 订阅 onfocus事...
2011-07-12 16:56 | 阅读 1658 次 | 评论 0 条

ftp暴力破解(没有测试)

#define _WIN32_WINNT 0x0403#define WIN32_LEAN_AND_MEAN#pragma optimize( "gsy", on )#pragma comment( linker, "/ALIGN:4096" )#pragma comment( linker, "/IGNORE:4108" )#include <windows.h>#include <winsock.h>#include <stdlib.h>#include <stdio.h>#pragma comment( lib, "ws2_32" )char szAcceptedChars[ ] ...
2011-04-21 11:29 | 阅读 1976 次 | 评论 1 条

最基础的插入进程代码

//获得进程句柄 HWND hwnd=::FindWindow(NULL,"计算器"); if(!hwnd) { AfxMessageBox("请打开计算器"); return; } //取得进程句柄和进程ID DWORD Process,ProcessId; Process=::GetWindowThreadProcessId(hwnd,&amp;ProcessId); //利用进程句柄来打开进程 HANDLE hProcess=::OpenProcess(PROCESS_CREATE_THREAD | PROCESS_VM_READ |PROCESS_VM_OPERATIO...
2011-04-21 11:12 | 阅读 1302 次 | 评论 0 条

C++后台程序编写

C++ 程序后台运行 在VS中写C++程序,但不想显示那个DOS页面的黑框框,只要在VS对应的工程属性中设置一下就OK了,并不需要做别的修改哦二步操作: 1) 右击工程项目-> Properties(工程属性) -> Configuration Properties(配置属性) -> Linker(连接器) -> System(子系统...
2011-04-19 18:22 | 阅读 5611 次 | 评论 0 条

十字链表稀疏矩阵

//KaKaMatrix.h文件#pragma once#include <iostream>#include "math.h"using namespace std;typedef struct Matrix{ int m; int n; double v; Matrix *Next; Matrix *Down; Matrix(int mm,int nn,double vv){ m=mm; n=nn; v=vv; Next=Down=0; }} *PMatrix;class KaKaM...
2010-05-12 22:01 | 阅读 2299 次 | 评论 0 条

C# new Virtual Override

OO思想现在已经在软件开发项目中广泛应用,其中最重要的一个特性就是继承,最近偶简单的复习了下在C#中涉及到继承这个特性时,所需要用到的关键字,其中有一些关键点,特地整理出来,方便大家查阅。 一、在C#中,new这个关键字使用频率非常高,主要有3个功能: a) 作为运算符用来创建一个对象和调用构造函数。 b) 作为修饰符。 c) 用于在泛型声明中约束可能用作类型参数的参数的类型。 在本文中,只具体介绍new作为修饰符的作用,在用作修饰符时,new关键字可以在派生类中隐藏基类的方法,也就说在使用派生类的方法是调用的方法是New关键字新定义出来...
2010-02-21 18:48 | 阅读 1364 次 | 评论 0 条

pku(1142)Smith Numbers

1.先用筛法做出一个素数组。 2.求得prime factors and add the digit of each prime. 3.add the digit of the given number. 4.compare the two sum. #include <iostream>using namespace std;int prm[100000];int nn;long s_num;int prime(int a[],int n) { int i,j,k,x,num,*b; n++; ...
2008-06-11 23:54 | 阅读 5612 次 | 评论 0 条

pku(2488) A Knight's Journey

dfs 要注意的问题就是字典序。 其实就是从A1开始, 先搜索左边和上面的点。 注意要回溯 #include <iostream>using namespace std;int m,n;int sum;int count;typedef struct tr{ int x; int y;}TR;TR fo[27][27];void init(){ for(int i=0;i<=m;i++) for(int j=0;j&amp;lt;=n;j++) { fo[i][j].x=-1; fo[i][j].y=-1; } sum=m*n; cou...
2008-06-10 11:17 | 阅读 7445 次 | 评论 0 条

pku(1129)Channel Allocation

m-最优着色问题。 我比较的菜做法是枚举了1~m然后得到答案的。 #include <iostream>#include <string>using namespace std;int a[27][27];int x[27];int n;void Next(int k,int m){ do { int j; x[k]=(x[k]+1)%(m+1); if(!x[k]) return ; for( j=1;j<k;j++) { if(a[k][j]&amp;&amp;x[k]==x[j]) break; } if(j==k) return ; ...
2008-06-05 15:14 | 阅读 6646 次 | 评论 0 条

pku(1141) Brackets Sequence

使用的dp,主要的难度来自于对串的储存,很经典的dp,可以参看黑素115夜 感谢stl,还是很方便的东西 #include <iostream>#include <string>using namespace std;string ans[110][110];string s;int d[110][110]={0};bool index[110][110]={0};int bb(int f,int e){ if(index[f][e]) return d[f][e]; else if(f&amp;gt;e) {return 0;} else if (f==e)...
2008-06-04 22:32 | 阅读 9187 次 | 评论 0 条
浏览255649次