2013年8月23日

摘要: 需求是类A中包含类B,而类B又需要访问类A的public属性的成员。首先类B中要访问类A的属性,那么对于类B而言,我们必须要知道有类A这个类,所以在类B的具体实现之前我们需要前向声明类A。对于类A包含一个类B的对象,那么对于类A而言,需要知道类B的构造函数,所以类B的构造函数的声明需要在类A的具体实... 阅读全文
posted @ 2013-08-23 12:00 NoSoul.Love 阅读(354) 评论(0) 推荐(0)

2013年4月23日

摘要: 1.管理员将自己机器的RSA公钥送上服务器> scp ~/.ssh/id_rsa.pub root@192.168.1.101:/root/.ssh/admin.pub2.服务器先从github上clone下来最新的gitolite,并安装,初始化> git clone http://github.com/sitaramc/gitolite> ./gitolite/install -ln> gitolite setup -pk ~/.ssh/admin.pub3.管理员从服务器上clone下来gitolite-admin.git> git clone root@1 阅读全文
posted @ 2013-04-23 10:33 NoSoul.Love 阅读(258) 评论(0) 推荐(0)

2013年4月10日

摘要: #include #include #define MAXCMDLEN 200#define MAXLINELEN 10000int LastDiv,NewDiv,MaxPage;int Div,IndexCnt;char Cmd[MAXCMDLEN],Line[MAXLINELEN],Name[5],Png[MAXCMDLEN];int i,j,k,l,p,Len;FILE *fIndex,*fTemp,*fExist,*fWrite;void AddToIndex(FILE *file,int i,char *str){ fprintf(file,"\t\t%d%s... 阅读全文
posted @ 2013-04-10 20:28 NoSoul.Love 阅读(219) 评论(0) 推荐(0)

2013年4月8日

摘要: logs.h#ifndef _LOGS_H_#define _LOHS_H_#include <stdio.h>#define DEBUG 1#define _LTS_AM 1#define _LTF_AM 0#if DEBUG#define DSPRINTF(cope,mesg,arg...) if(cope)printf(mesg,##arg);else #define DFOPEN(cope,file,filename,arg) if(cope)file=fopen(filename,arg);else #define DFPRINTF(cope,file,... 阅读全文
posted @ 2013-04-08 17:09 NoSoul.Love 阅读(308) 评论(0) 推荐(0)

2013年3月13日

摘要: vimrc:set hlsearch "选中高亮colorscheme desert "颜色主题set guifont=Source\ Code\ Pro\ 10 "设置字体set number "显示行号"set nowrap "不自动换行set tabstop=4 "制表符set expandt... 阅读全文
posted @ 2013-03-13 17:45 NoSoul.Love 阅读(268) 评论(0) 推荐(0)

2012年11月6日

摘要: 函数入口参数void RSA(LL data,int mode,LL d,LL e,LL n) data为要加密或解密的数,mode为模式(1加密,0解密),{e,n}为公钥,完成加密,{d,n}为私钥,完成解密。算法流程 1.任取两个素数p,q; 2.计算n=p*q; 3.计算N=(p-1)*(q-1); 4.选取一奇数e,使得GCD(e,N)=1; 5.计算d,使得(e*d)%N=1,d的计算方法如下: 1)n1= N,n2=e,b1=0,b2=1 2)求 s 和 r,使 n1 = s×n2 + r 3)如果r≠0 则n1 =n2,n2=r,t=b2,b2=b... 阅读全文
posted @ 2012-11-06 16:59 NoSoul.Love 阅读(277) 评论(2) 推荐(0)
 
摘要: 函数入口参数void MD5(UC *data) 输入为一个任意长度的字符串,加密结果是32位的16进制数,如:MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72算法流程 1.对于输入的字符串,按位填补一个1以及若干个0使得填补后的位数为 N*512+448(按字节的话就是N*64+56),N>=0 2.再添加一个64位(8个字节)的数,该数字为原始长度,使得最后的字符串变为(N+1)*512位(既(N+1)*64字节)。 3.初始化四个32位的数,A=0x67452301;B=0xefcdab89;C=0x98badcfe; 阅读全文
posted @ 2012-11-06 13:25 NoSoul.Love 阅读(264) 评论(0) 推荐(0)

2012年11月4日

摘要: 函数入口参数void DES(ElemType StrText[64],ElemType KeyText[64],ElemType Mode) StrText为需要处理的二进制串,KeyText为密钥二进制串,Mode为工作模式(1为加密,0为解密)算法流程 1.将要处理的二进制串进行IP置换 2.将密钥进行PC1置换(64位转为56位), 3.进行16轮操作,对于第i轮操作: 1)将上一次得到的PC1密钥(级除去第一次外,其他的都经过移位处理)的结果左右部分(各28位)分别循环左移1位或2位,然后将移位后的密钥进行PC2[i]置换. 2)将处理串均等分为左右两串Li,Ri... 阅读全文
posted @ 2012-11-04 15:54 NoSoul.Love 阅读(470) 评论(0) 推荐(0)

2012年9月16日

摘要: SQL:create database ckkc;create table users(name char(35) not null primary key,psw char(50) not null)create table op(id int not null primary key auto_increment,flag int not null,pname char(15) not null,num int not null)create table st(pname char(15) not null primary key,num int not null)insert into 阅读全文
posted @ 2012-09-16 11:26 NoSoul.Love 阅读(2220) 评论(1) 推荐(1)

2012年7月18日

摘要: #include <stdio.h>#include <windows.h>int main(){ int nok; char strsrc[]="D:\\A\0"; char strdst[]="D:\\B\0"; char strtitle[]="File Copying"; DWORD ret; SHFILEOPSTRUCT fileop; fileop.hwnd=NULL; fileop.wFunc=FO_COPY; fileop.pFrom=strsrc; fileop.pTo=strdst; fil 阅读全文
posted @ 2012-07-18 11:03 NoSoul.Love 阅读(226) 评论(0) 推荐(0)