DesignPattern_Java:Factory Method Pattern
摘要:工厂方法模式 Factory Method :(虚拟构造函数模式 Virtual Constructor,多态性工厂模式 Ploymorphic Facoty) Define an interface for creating an object,but let subclasses decid...
阅读全文
posted @
2015-08-21 21:28
_noname
阅读(136)
推荐(0)
eclipse导出可执行的jar包
摘要:1.右击选择要导出的Java Project 2.选择Export,选择JarFile 3.选择要导出的位置 4.点击next,默认,单击next 5.选择程序入口 单击Finish! 6.执行jar文件。java -jar name.jar
阅读全文
posted @
2015-08-21 19:38
_noname
阅读(170)
推荐(0)
DesignPattern_Java:SingletonPattern
摘要:单例模式 SingletonPattern Ensure a class has only one instance,and provide a global point of access to it. 单例模式的主要作用是确保一个类只有一个实例存在。 懒汉式单例类:第一次引用类时,才进行对象...
阅读全文
posted @
2015-08-20 21:28
_noname
阅读(183)
推荐(0)
DesignPattern_Java:设计模式分类和设计原则
摘要:设计模式分类: 创建型: 单例模式(Singleton Pattern) 工厂方法模式(Factory Pattern) 抽象工厂模式(Abstract Factory) 建造者模式(Builder Pattern) 原型模式(Prototype Pattern) 结构型: 代理模式(Proxy...
阅读全文
posted @
2015-08-20 00:20
_noname
阅读(228)
推荐(0)
_DataStructure_C_Impl:基数排序
摘要:#include#include#include#include#define MaxNumKey 6 /*关键字项数的最大值*/#define Radix 10 /*关键字基数,此时是十进制整数的基数*/#define MaxSize 1000#define N 6typedef int Ke...
阅读全文
posted @
2015-08-14 00:58
_noname
阅读(146)
推荐(0)
_DataStructure_C_Impl:LinkListBasedSort
摘要:#include#include#include"LinkList.h"//创建单链表void CreateList(LinkList L,DataType a[],int n){ int i; for(i=1;inext->next!=NULL){ //用q指针进行遍历链表 for(s=p...
阅读全文
posted @
2015-08-14 00:57
_noname
阅读(111)
推荐(0)
_DataStructure_C_Impl:SeqListBasedSort
摘要:// _DataStructure_C_Impl:Sort#include#include#define MaxSize 50typedef int KeyType;//数据元素类型定义typedef struct{ KeyType key; //关键字}DataType;//顺序表类型定义ty...
阅读全文
posted @
2015-08-14 00:55
_noname
阅读(121)
推荐(0)
_DataStructure_C_Impl:哈希表
摘要:#include#includetypedef int KeyType;//元素类型定义typedef struct{ KeyType key; //关键字 int hi; //冲突次数}DataType;//哈希表类型定义typedef struct{ DataType *data; in...
阅读全文
posted @
2015-08-13 01:25
_noname
阅读(150)
推荐(0)
_DataStructure_C_Impl:广义表的扩展线性链表存储
摘要:#include#include#include#include"SeqString.h"typedef char AtomType;typedef enum{ATOM,LIST} ElemTag;//ATOM=0,表示原子,LIST=1,表示子表typedef struct GLNode{ E...
阅读全文
posted @
2015-08-08 17:37
_noname
阅读(306)
推荐(0)
_DataStructure_C_Impl:广义表头尾链表存储
摘要:#include#include#include#include"SeqString.h"typedef char AtomType;typedef enum{ATOM,LIST} ElemTag;//ATOM=0,表示原子,LIST=1,表示子表typedef struct Node{ Ele...
阅读全文
posted @
2015-08-08 17:35
_noname
阅读(200)
推荐(0)
_DataStructure_C_Impl:稀疏矩阵十字链表存储
摘要:#include#includetypedef int DataType;typedef struct OLNode{ int i,j; DataType e; struct OLNode *right,*down;}OLNode,*OLink;typedef struct{ OLink *ro...
阅读全文
posted @
2015-08-08 17:32
_noname
阅读(128)
推荐(0)
_DataStructure_C_Impl:稀疏矩阵三元组
摘要:#include#include#define MaxSize 200typedef int DataType;typedef struct{ //三元组类型定义 int i,j; DataType e;}Triple;typedef struct{ //矩阵类型定义 Triple d...
阅读全文
posted @
2015-08-08 01:10
_noname
阅读(108)
推荐(0)
_DataStructure_C_Impl:Array
摘要:#include#include#include#define MaxArraySize 2typedef int DataType;typedef struct{ DataType *base; //数组元素的基地址 int dim; //数组的维数 int *bounds; //数组的每一...
阅读全文
posted @
2015-08-08 01:05
_noname
阅读(87)
推荐(0)
_DataStructure_C_Impl:KMP模式匹配
摘要:#include#include#include#include"SeqString.h"/*函数的声明*/int B_FIndex(SeqString S,int pos,SeqString T,int *count);int KMP_Index(SeqString S,int pos,Seq...
阅读全文
posted @
2015-08-07 00:23
_noname
阅读(118)
推荐(0)
_DataStructure_C_Impl:链串
摘要://_DataStructure_C_Impl:链串#include#include#include#define ChunkSize 4#define stuff '#'//串的结点类型定义typedef struct Chunk{ char ch[ChunkSize]; struct Chu...
阅读全文
posted @
2015-08-07 00:22
_noname
阅读(96)
推荐(0)
_DataStructure_C_Impl:堆串
摘要:#include#includetypedef struct{ char *str; int length;}HeapString;//串的赋值操作void StrAssign(HeapString *S,char cstr[]){ int i=0,len; if(S->str) free(S...
阅读全文
posted @
2015-08-06 02:42
_noname
阅读(107)
推荐(0)
_DataStructure_C_Impl:顺序串
摘要:#include#include#define MaxLength 60typedef struct{ char str[MaxLength]; int length;}SeqString;//串的赋值操作void StrAssign(SeqString *S,char cstr[]){ int...
阅读全文
posted @
2015-08-06 02:40
_noname
阅读(150)
推荐(0)
_DataStructure_C_Impl:双端队列
摘要://_DataStructure_C_Impl:双端队列#include#include#define QueueSize 8 //定义双端队列的大小typedef char DataType;typedef struct DQueue{ //双端队列的类型定义 DataType queue[...
阅读全文
posted @
2015-08-06 02:39
_noname
阅读(114)
推荐(0)
_DataStructure_C_Impl:链式队列
摘要://_DataStructure_C_Impl:链式队列#include#include#define MaxSize 100typedef int DataType;typedef struct QNode{ DataType data; struct QNode *next;}LQNode,...
阅读全文
posted @
2015-08-06 02:38
_noname
阅读(107)
推荐(0)
_DataStructure_C_Impl:只有队尾指针的链式循环队列
摘要://_DataStructure_C_Impl:#include#include#includetypedef char DataType;typedef struct snode{ //链式堆栈结点类型定义 DataType data; struct snode *next;}LSNode;t...
阅读全文
posted @
2015-08-05 02:53
_noname
阅读(167)
推荐(0)
_DataStructure_C_Impl:顺序循环队列
摘要://_DataStructure_C_Impl:顺序循环队列#include#include#define QueueSize 10 //定义顺序循环队列的最大容量typedef char DataType;typedef struct Squeue{ //顺序循环队列的类型定义 DataT...
阅读全文
posted @
2015-08-05 02:52
_noname
阅读(110)
推荐(0)
_DataStructure_C_Impl:顺序队列
摘要://_DataStructure_C_Impl:顺序队列#include#include#define QueueSize 50typedef char DataType;typedef struct Squeue{ //顺序队列类型定义 DataType queue[QueueSize]; i...
阅读全文
posted @
2015-08-05 02:51
_noname
阅读(106)
推荐(0)
_DataStructure_C_Impl:后缀表达式
摘要://_DataStructure_C_Impl:#include#include#define StackSize 100typedef char DataType;typedef struct{ DataType stack[StackSize]; int top;}SeqStack;//将栈...
阅读全文
posted @
2015-08-05 02:49
_noname
阅读(120)
推荐(0)
_DataStructure_C_Impl:链栈
摘要://_DataStructure_C_Impl:链栈#include#includetypedef char DataType;typedef struct node{ DataType data; struct node *next;}LStackNode,*LinkStack;//将链栈初始...
阅读全文
posted @
2015-08-03 23:47
_noname
阅读(127)
推荐(0)
_DataStructure_C_Impl:共享栈
摘要:// _DataStructure_C_Impl:共享栈#include#include#define StackSize 100typedef char DataType;//两个共享栈的数据结构类型定义typedef struct { DataType stack[StackSize]; ...
阅读全文
posted @
2015-08-03 23:46
_noname
阅读(105)
推荐(0)
_DataStructure_C_Impl:顺序栈
摘要:// _DataStructure_C_Impl:顺序栈#include#include#define StackSize 100typedef char DataType;typedef struct{ DataType stack[StackSize]; int top;}SeqStack;...
阅读全文
posted @
2015-08-03 23:45
_noname
阅读(119)
推荐(0)
_DataStructure_C_Impl:一元多项式
摘要://一元多项式#include#includetypedef struct ployn{ float coef; //存放一元多项式的系数 int expn; //存放一元多项式的指数 struct ployn *next;}PolyNode,*PolyNomial;//创建一元多项式PolyN...
阅读全文
posted @
2015-08-02 22:57
_noname
阅读(135)
推荐(0)
_DataStructure_C_Impl:静态链表
摘要://静态链表#include#include#define ListSize 10typedef char DataType;//静态链表结点类型定义typedef struct{ DataType data;//数据域 int cur;// 游标,类似指针域}SListNode;//静态链表类...
阅读全文
posted @
2015-08-02 22:55
_noname
阅读(81)
推荐(0)
_DataStructure_C_Impl:双向链表
摘要://双向链表#include#includetypedef char DataType;typedef struct Node{ DataType data; struct Node *prior; struct Node *next;}DListNode,*DLinkList;//初始化双向循...
阅读全文
posted @
2015-08-02 22:55
_noname
阅读(108)
推荐(0)