- 博客(21)
- 资源 (2)
- 收藏
- 关注
转载 见山只是山 见水只是水——提升对继承的认识
温 昱 封装、继承、多态是OO的三大特性,由此可见继承思想的重要性。但是,不少人对继承的理解过多地局限在OOP层面,从而限制了继承思想在OOD层面的巨大作用。笔者认为,软件工程师应该不断提升对OO思想的认识层面,加强实际开发能力。 本文站在OOD的角度,将继承看成实现OOD的强大手段,通过具体例子,说明针对接口编程(Program To An Interface)、混入类(Mix In Clas
2015-09-10 18:26:16
382
转载 Building a PyCommand from scratch
Start by creating a file in the Immunity Debugger PyCommands folder : .pyThis filename is important, because you will need to launch the PyCommand based on the filename.Launching a PyCommand
2013-05-16 13:48:12
506
转载 Immunity Debugger软件介绍
Immunity Debugger软件专门用于加速漏洞利用程序的开发,辅助漏洞挖掘以 及恶意软件分析。它具备一个完整的图形用户界面,同时还配备了迄今为止最为 强的python安全工具库。它巧妙的将动态调试功能与一个强大的静态分析引擎融 合于一体,它还附带了一套高度可定制的纯python图形算法,可用于帮助我们绘 制出直观的函数体控制
2013-05-16 13:35:06
1278
原创 POJ 1338
转载别人的一种解法,但是还是按自己的理解另写一种//给出整数N,输出第N个丑陋数(仅有素因子2、3和5的整数)//POJ 1338//使用离线算出来,在排序,在查找。#includeusing namespace std;void bubbleSort(unsigned int a[],int size){ int temp; bool fl
2013-02-23 10:23:15
259
转载 POJ 1338
//给出整数N,输出第N个丑陋数(仅有素因子2、3和5的整数)//POJ 1338//使用离线算出来,在排序,在查找。#include using namespace std;const int MAX_POS = 1500;/*返回三者的最小值*/int myMin(int a, int b, int c) { int min; m
2013-02-23 10:21:20
193
原创 POJ 2136
//POJ 2136//从输入文件读取四行大写字母组成的文本输入//并输出一个垂直柱状图显示//画统计图是自上而下,自左而右。//自上而下指的是按频率递减顺序处理每一行//自左而右指的是按序数递增处理当前行的每一个字母#include#include#includeusing namespace std;int main(){ int
2013-02-22 14:10:35
221
原创 递归
递归:调用堆栈上针对每一次迭代都有一个本地作用域的副本遍历任意形状的结构def sumtree(L): total=0 for x in L: if not isintance(x,list): total+=x else: total
2013-02-21 15:32:10
147
转载 各种排序算法
#include#includeusing namespace std;void print(int data[],int s, int n){ for(int i = s; i { printf("%d ",data[i]); } cout}void bubbleSort(int data
2013-02-21 15:15:36
139
原创 POJ 2739
//POJ 2739//一些正整数能够表示为一个或多个连续素数的和#includeusing namespace std;const int maxp=2000, n=10000;int prime[maxp], total=0;bool isprime(int k){ if(k return false; for(int i=
2013-02-21 15:13:33
282
原创 Ural 1068
//输入一个绝对值不大于1000的整数//输出1到N之间的所有整数的和//包含整数和负数#includeusing namespace std;int main(){ int n,sum; cin>>n; if(n>0) { sum=(1+n)*n/2; } else {
2013-02-21 15:11:04
226
原创 POJ 2196
//列出十进制的四位数:其4位数字的和等于这个数字以十六进制//表示时的4位数字的和,也等于这个数字以十二进制表示时//的4位数字的和//POJ 2196#includeusing namespace std;int calc(int k, int b) //转化进制并求和{ int x, sum=0; while(k) {
2013-02-21 15:09:08
235
转载 STL-1
//从字符串的末尾裁掉一定数量的字符#include#includevoid rtrim(std::string & s, char c){ if(s.empty()) return ; std::string::iterator p; for(p=s.end();p!=s.begin()&&*--p==c;)
2013-02-21 15:07:52
165
原创 POJ 3094
//校验是一个扫描数据包并返回一个数字的算法//要求在数据包中每一个字符的位置与字符的对应值得乘积的总和//POJ 3094#include#include#includeusing namespace std;int value(char * s, int len)//计算出一个字符串的值{ int sum=0; for(int i=0
2013-02-21 15:06:22
396
转载 STL-0
//把某些字符串反复填充成特定宽度#include#includeusing namespace std;templatevoid pad(basic_string& s, typename basic_string::size_type n, T c) { if(n>s.length())
2013-02-21 15:05:03
163
原创 POJ 1005
//计算出他的土地会因为河流的侵袭而丧失//POJ 1005#include#includeint num_props;float x, y;int i;double calce;int years;int main(){ scanf("%d",&num_props); for(i=1;i {
2013-02-21 15:02:08
169
原创 POJ 3299
//湿热指数用来反映温度和湿度的综合影响的度量衡//使用减半递推技术//POJ 3299#include#include#includechar a,b; //定义两个测试标志字符double A,B,temp,hum,dew;double dohum(double tt, double dd) //根据温度tt和露点dd计算湿热指数
2013-02-21 15:00:22
223
原创 POJ 1003
//第一张二分之一,第二张三分之一,依此类推//你能使一叠在桌子上的卡片向桌子外伸出多远//POJ 1003//使用二分法#includeusing namespace std;const int maxn=300;const double delta=1e-8; //设定精度,因为有实数比较int zero(double x) //若小于0的负数返回-
2013-02-21 14:58:41
326
转载 POJ 1004
//POJ 1004#include //printf函数出现在这个头文件中#includeusing namespace std;int main(){ double avg , sum=0, a[12]={0}; for(int i=0;i { cin>>a[i]; sum+=a[i]; }
2013-02-21 14:57:11
191
原创 POJ 1552 double
//给出2到15个不同的数据,计算在这些数据里面有多少数据对满足//一个数是另一个数的两倍#includeusing namespace std;int main(){ int i, j , n, count, a[20]; cin>>a[0]; while(a[0]!=-1) { n=1; for(;
2013-02-21 14:50:58
239
原创 POJ 3006
//如果a和d互素的正整数,从a开始增加d的算数序列包含无穷多的素数//给出正整数a、d和n,给出算数序列中第n个素数#includeusing namespace std;bool isprime(int k){ if(k return false; for(int i=2;i { if(0==k%
2013-02-21 14:48:23
140
原创 POJ 1581
//对ACM进行裁判,计算出胜出冠军//POJ 1581#include#includeusing namespace std;int main(){ string wname , name; //冠军名字 当前队名 int wsol=0, sol; //解题数 当前解题数 int wpt=0,pt;
2013-02-21 14:44:27
350
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人