2012年9月12日

编程练习7

摘要: 字符的下一个字符//将字符串中的所有字母都替换成该字母的下一个字母#include <iostream>using namespace std;void invert(char* str){ int i; int len=strlen(str); for(i=0;i<len;++i) { if(isalpha(str[i])&&(str[i]!='z')&&(str[i]!='Z')) str[i]=str[i]+1; else if(str[i]=='z') str[i]='a' 阅读全文

posted @ 2012-09-12 10:07 lyncre 阅读(126) 评论(0) 推荐(0)

编程练习6

摘要: 循环数组 1 //数组中的数按步长向右移动,补充到数组头部,简称循环数组 2 #include <iostream> 3 using namespace std; 4 5 void print(int* dig,int n) 6 { 7 for(int i=0;i<n;++i) 8 cout<<dig[i]<<" "; 9 cout<<endl;10 }11 void move(int* dig,int n,int step)12 {13 if (step>=n) return;14 int* tmp=(int*) 阅读全文

posted @ 2012-09-12 10:06 lyncre 阅读(121) 评论(0) 推荐(0)

编程练习5

摘要: 单链表的逆转和排序练习排序还有些问题 1 //链表逆置 指针的指针 2 #include <iostream> 3 using namespace std; 4 5 typedef struct node 6 { 7 int data; 8 node* next; 9 }node; 10 11 node* create() 12 { 13 node *h=(node*)malloc(sizeof(node)),*p; 14 h->data=0; 15 h->next=NULL; 16 p=h; 17 18 int ... 阅读全文

posted @ 2012-09-12 08:47 lyncre 阅读(144) 评论(0) 推荐(0)

编程练习4

摘要: 1 //查找字符串主串中的子串的个数 2 #include <iostream> 3 using namespace std; 4 5 int Findstr(char* str1,char* str2) 6 { 7 int count=0; 8 int len1=strlen(str1); 9 int len2=strlen(str2);10 char *str;11 char tmp[20]={0};12 13 for(int i=0;i<len1-len2+1;++i)14 { 15 strncpy(tmp... 阅读全文

posted @ 2012-09-12 08:46 lyncre 阅读(122) 评论(0) 推荐(0)

2012年9月11日

编程练习3

摘要: View Code 1 //将一个十进制的数转化为二进制,并输出二进制数中0的个数,第一个有效字符前的零不算 2 #include <iostream> 3 using namespace std; 4 5 void invert(int num) 6 { 7 int arr[20]; 8 int i=0,count=0,k=0; 9 10 while(num)11 {12 arr[i++]=num%2;13 num=num/2;14 }15 i--;16 do17 {18 if... 阅读全文

posted @ 2012-09-11 15:44 lyncre 阅读(123) 评论(0) 推荐(0)

编程练习2

摘要: 约瑟夫环问题,从某个人开始报数,到某个数,该人出列,继续从下一个开始,直到全部人员出列 1 #include <iostream> 2 using namespace std; 3 4 void Joseph(int n,int m,int s) 5 { 6 int i,j=n; 7 int k=s-1,tmp; 8 int a[20]={0}; 9 for(i=0;i<n;++i)10 a[i]=i+1;11 12 while(n>=2)13 {14 k=(k+m-1)%n;15 tmp=a[k... 阅读全文

posted @ 2012-09-11 13:26 lyncre 阅读(129) 评论(0) 推荐(0)

2012年9月10日

编程练习1

摘要: 题目:找出一个字符串中是否包含相同的子字符串,要求子字符串的长度大于等于2 1 #include <iostream> 2 using namespace std; 3 4 #define MAXSIZE 100 5 6 void invert(int dig,char *str) 7 { 8 char tmp[MAXSIZE]={0}; 9 int i=0;10 while(dig)11 {12 tmp[i++]=dig%10+'0';13 dig=dig/10;14 }15 tmp[i]='\0';16 1... 阅读全文

posted @ 2012-09-10 17:41 lyncre 阅读(187) 评论(0) 推荐(0)

2011年11月29日

东大校歌歌词

摘要: 东揽钟山紫气北拥扬子银涛六朝松下听箫韶齐梁遗韵在太学令名标百载文枢江左东南辈出英豪海涵地负展宏韬日新臻化境四海领风骚 阅读全文

posted @ 2011-11-29 21:37 lyncre 阅读(378) 评论(0) 推荐(0)

网络安全工具

摘要: 在线MD5破解站点:http://www.xmd5.org(16位不收费,32位收费)SQL注入自动攻击工具: ASP环境的注入扫描器:WIS+WED,NBSI 2, HDSI和pangolin_bin PHP环境的注入工具:“二娃”和CASIWeb脚本攻击 ♥ SQL注入攻击♥ 文件上传攻击 ♥ 数据库攻击 ♥ XSS跨站脚本攻击 ♥ Cookies欺骗 ♥ 远程包含攻击渗透测试/攻击的分类: 1.按信息获取方式分类 1)黑盒(Black Box)渗透:模拟来自网络外部的攻击行为 2)白盒(White Box)渗透:模拟网络内部人员的越权操作 3)灰盒(Gray Box) 渗透:介于以上两者 阅读全文

posted @ 2011-11-29 20:42 lyncre 阅读(278) 评论(0) 推荐(1)

2011年8月10日

机器学习推荐书目

摘要: http://liulixiang.info/wiki/index.php?title=%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E6%8E%A8%E8%8D%90%E4%B9%A6%E7%9B%AE&diff=420&oldid=prev 阅读全文

posted @ 2011-08-10 13:17 lyncre 阅读(168) 评论(0) 推荐(0)

导航