- 博客(20)
- 资源 (2)
- 收藏
- 关注
原创 Centos、Ubuntu玩转记录
1.Centos升级 yum update 2.Ubuntu升级 sudo apt-get update 3.Ubuntu以root登陆--> vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf 新增一行 greeter-show-manual-login=true 3.Ubuntu在修改完root权限自动登录后,发现开机出现以下
2015-11-04 20:19:58
199
原创 ClassCastException: $Proxy0 cannot be cast to ...
Spring AOP代理时 ClassCastException: $Proxy0 cannot be cast to (类型转换错误) spring的文档中这么写的:Spring AOP部分使用JDK动态代理或者CGLIB来为目标对象创建代理,如果被代理的目标对象实现了至少一个接口,则会使用JDK动态代理。所有该目标类型实现的接口都将被代理。若该目标对象没有实现任何接口,则创建一个CGL
2014-12-30 19:09:19
971
原创 java传引用笔记
class P { public String name = ""; } public class T { public void fn(P p) { p = new P(); //p是形参。传进来的实参(即一个P实例的首地址)会被放到形参p中,但是下面一new就会把new出的空间首地址放到形参p中 //这样p.name就是对新new的实例的name属性赋值 //而如果
2014-07-22 20:57:08
613
原创 求二叉树深度
# include # include typedef char ElemType; typedef struct BiTnode { ElemType data; struct BiTnode * lchild, * rchild; }BiTNode, * BiTree; int depth (BiTree &T) //求二叉树深度 { int depthval = 0; in
2014-06-03 11:19:25
695
原创 线性表写一元二次方程组
# include # include # include # define MAXLEN 40 typedef struct Node { int exp; float coe; }* PNODE, NODE; typedef struct { PNODE term; }* PLIST, LIST; void init (PLIST pL) { pL->term = (
2014-05-28 17:36:43
558
原创 模式匹配之首位匹配
# include # include # include # define MAXSTRLEN 255 typedef unsigned char Sstring [MAXSTRLEN + 1]; int index (Sstring S, Sstring T) //这个写法虽然效率也不怎么高,但是写法真是有点别致。我是参考自严蔚敏视频配套讲义写的 //主要结构if
2014-05-18 17:10:40
561
原创 串模式匹配简单实现
# include # include # include # define MAXSTRLEN 255 typedef unsigned char Sstring [MAXSTRLEN + 1]; int index (Sstring S, Sstring T) { int i = 1; int j = 1; while (i <= S[0] && j <= T[0]) //
2014-05-18 15:44:41
668
原创 表达式求值之求后缀式(亦即逆波兰式)
# include # include # include # define INIT_STACK_SIZE 10 typedef struct { int * top; int * base; int stacksize; }* PSTACK, STACK; void init (PSTACK pS) { pS->base = (int *)malloc(sizeof(int
2014-05-17 15:33:46
600
原创 栈实现行编辑器
睡觉前总算完成了!! # include # include # include # define STACK_INIT_SIZE 20 # define STACKINCREMENT 10 typedef struct Stack { char * base; char * top; int stacksize; }* PSTACK, STACK; void Init
2014-05-08 23:01:17
570
原创 栈实现括号匹配
# include # include # include # define INIT_STACK_SIZE 10 # define STACKINCREMENT 5 typedef struct { char * base; char * top; int stacksize; }* PSTACK, STACK; void Init (PSTACK pS) { pS->bas
2014-05-08 20:36:08
461
原创 按照严版伪代码写线性表的顺序实现
# include # include # include # define INIT_LIST_SIZE 10 # define LISTINCREMENT 5 typedef struct Node { int data; char ch; }* PNODE, NODE; typedef struct List { PNODE elem; int length; int
2014-04-30 13:47:14
658
原创 顺序栈存储实现
# include # include typedef struct Node { int data; char ch; }* PNODE, NODE; typedef struct Stack { PNODE pTop; PNODE pBottom; }* PSTACK, STACK; void init(PSTACK pS, int len) { pS->pBottom =
2014-04-25 20:36:55
554
原创 链式队列存储实现及操作
# include # include # include typedef struct Node { int data; struct Node * pNext; }* PNODE, NODE; typedef struct Queue { PNODE pFront; PNODE pRare; }* PQUEUE, QUEUE; //初始化 void init(PQUEUE
2014-04-25 08:54:09
534
原创 链式栈存储实现及操作
/* 栈的构造与操作 初始化 压栈 出栈 遍历 清空 */ # include # include # include typedef struct Node { int data; struct Node * pNext; }* PNODE, NODE; typedef struct STACK { PNODE pTop; PNODE pBottom; }
2014-04-24 19:52:19
550
原创 链表程序改良
# include # include struct Node { int data; struct Node * pNext; }; struct Node * create_list() { int len; struct Node * pHead = (struct Node *)malloc(sizeof(struct Node)); struct Node * p =
2014-04-16 20:10:51
668
原创 自己写的第一个链表程序
# include # include struct Node { int data; struct Node * next; }; struct Node * create_list() { int len; printf("请输入节点个数:"); scanf("%d", &len); struct Node * pHead =
2014-04-16 09:49:26
632
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人