自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(88)
  • 资源 (3)
  • 收藏
  • 关注

原创 深入剖析tomcat第一章

深入剖析tomcat第一章中的代码运行有问题,静态文本发送有问题,具体代码如下:try {      File file = new File(HttpServer.WEB_ROOT, request.getUri());      if (file.exists()) {        fis = new FileInputStream(file);        int c

2017-01-15 10:56:32 384

转载 Ubuntu下Sublime Text 2的安装

Sublime Text 2是一款共享软件,收费但可以永久免费试用的编辑器,价格是59个美刀,相信开发者一定不了解中国人,也不面对中国市场,。言归正传,ST2编辑功能强大,好评如潮,在Windows/Linux/Mac系统下都有对应的版本。    Linux下的安装流程如下:    1. 官网下载安装包    官网地址:http://www.sublimetext.com/2  

2014-10-10 16:03:12 399

转载 linux内核编译 驱动测试

最近在入门linux的设备驱动,开始时连一个最简单的helloworld的驱动都编译失败,开始时走了很多弯路,最后经过几天反复的研究上网查询,算是有点点的经验吧。        1.驱动的编写         驱动的编写通常是模式化的,这里首先就用最简单的一个设备驱动来说明一下。   #include    #include    #include static int _

2014-09-10 10:54:12 553

转载 Ubuntu12.04下交叉编译Qt4.8.2步骤

1.安装支持库#sudo apt-get install build-essential#sudo apt-get install libxrender-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev libxt-dev libglib2.0-dev libxtst-dev2.切换到su用户#sudo passw

2014-09-09 16:49:45 2143

转载 30天自制操作系统——用U盘启动自制系统

最近试读了《30天自制操作系统》的前两章,感觉很有意思。但是发现里面写的系统都是用软盘启动的,现在在大多数电脑上已经看不见软驱了,所以如果想运行书中的操作系统只能通过qemu(随书光盘中已经附带)模拟运行。这样的话成就感就会少很多,感觉像是在做一个简单的控制台程序,相信大多数童鞋都希望能做出一个能在真机上运行,能秀出来的作品。那有没有方法通过U盘去启动书中“自制”的操作系统呢?我的思路就是

2014-02-28 14:52:18 8825 6

转载 Installing OpenCV 2.4.1 in Ubuntu 12.04 LTS

The latest Long Term Support version of Ubuntu(12.04 LTS) is out and a new version of OpenCV was released as well. This means that now is a great opportunity to update my OpenCV installation guide to

2013-11-29 22:42:34 528

转载 ubuntu12.04的NFS配置

#sudo apt-get install nfs-kernel-serverubuntu12.04中的已经是最新版本了,无需安装打开/etc/exports文件,在末尾加入:/home/kevin *(rw,sync,no_root_squash)注:nfs允许挂载的目录及权限,在文件/etc/exports中进行定义,各字段含义如下:/home/kevi

2013-04-28 15:50:23 428

转载 ubuntu下minicom的安装及使用

安装:sudo apt-get install minicom配置:1 . 在终端中输入minicom以启动minicom;2. 先按下Ctrl + a, 放开, 再按o, 出现配置菜单.3. 选择 Serial port setup, 此时所示图标在“Change which setting”中,键入“A”,此时光标移到第A项对应处:串口COM1对应ttyS0, COM2

2013-04-28 15:49:32 500

转载 Ubuntu10.04下安装Qt4和创建第一个Qt程序

1.首先安装Qt4并采用Qt Creator进行开发演示(1)在Terminal中输入: sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig qt4-demos qt4-designer 其中:   qt4-dev-tools 中包括了Qt Assistant,Qt Linguist,Qt

2013-04-21 20:26:37 383

转载 虚拟机安装redhat 9.0后,解决屏幕不能全屏以及避免鼠标来回切换的方法

这个问题我看了网上好多解决的方法都是修改什么XFree86文件。然后让你注销并重新启动。但是在不安装 Vmware Tolls,这是不可行的。所以我最后的解决办法是就是:安装Vmware Tolls虚拟机安装REDHAT9.0时,在状态栏中一直提醒你安装VMware Tools.因为虚拟机是默认使用自带的虚拟显卡,只有正确安装了VMware Tools后,才能在虚拟机中正确启动RE

2013-03-25 18:39:42 817

翻译 二叉排序树的实现

#include #include typedef struct BiTNode{int data;struct BiTNode *lchild,*rchild;}BiTNode,*BiTree;bool SearchBST(BiTree T,int key,BiTree f,BiTree &p){if(!T) {p=f;return false;

2012-12-15 16:21:25 398

翻译 堆排序

#include #include typedef struct{int length;int *elem;}HeapType;void Create(HeapType &H){int i;coutcin>>H.length;H.elem=(int *)malloc((H.length+1)*sizeof(int));coutfor(i=1;

2012-12-15 15:00:30 195

翻译 排序

#include #include #define MAX 30typedef int ElemType;typedef struct {int length;ElemType r[MAX+1];}SqList;void Create(SqList &S){int i;coutcin>>S.length;coutfor(i=1;i

2012-11-21 17:00:24 204

翻译 动态查找

#include #include typedef int ElemType;typedef struct BiTNode{ElemType data;struct BiTNode *lchild,*rchild;}BiTNode,*BiTree;bool SearchBST(BiTree T,ElemType key,BiTree f,BiTree &p){

2012-11-21 16:05:14 291

翻译 静态查找

#include #include typedef int ElemType;typedef struct{ElemType *elem;int length;}SSTable;bool Create(SSTable &ST){int n,i;coutcin>>n;ST.elem=(ElemType *)malloc((n+1)*sizeof(E

2012-11-21 12:23:58 217

翻译 关键路径

#include #include #define MAX 30#define STACK_INIT_SIZE 30#define STACKINCREASE 10typedef struct{char *base;char *top;int stacksize;}SqStack;typedef struct {int vexnum,arcnum

2012-11-16 18:52:56 236

翻译 拓扑排序

#include #include #define MAX 30#define STACK_INIT_SIZE 30#define STACKINCREASE 10typedef struct{char *base;char *top;int stacksize;}SqStack;typedef struct {int vexnum,arcnum

2012-11-16 17:12:55 228

翻译 最小生成树

#include #define MAX 30typedef char VertexType;typedef int vertex;typedef struct{vertex adj;}Arcell,AdjMatrix[MAX][MAX];typedef struct{int vexnum,arcnum;VertexType vexs[MAX];Ad

2012-11-15 21:22:15 224

翻译 图的深度遍历

#include using namespace std;#define MAX_NUM 100typedef struct{int n,adj;char a[MAX_NUM];int vex[MAX_NUM][MAX_NUM];}MGraph;bool visited[MAX_NUM];void Create(MGraph &G){int i,j,

2012-08-29 19:48:23 333

转载 uCOS编译练习+BC45+TASM

uCOS编译练习+BC45+TASM1、安装BORLAND C++4.5 到 C:/BC45 (运行INSTALL.EXE安装。安装路径最好为C:/BC45。由于BC45中不包含TASM因此需要另外安装TASM)2、安装BORLAND TASM5.0 到 C:/TASM (运行INSTALL.EXE安装,首先会让你输入安装分区;而后是安装路径,最好为C:/TAS

2012-08-08 10:12:49 621

转载 作业调度

#include "stdio.h"#define getjcb(type) (type*)malloc(sizeof(type))#define NULL 0int n=0,time=0,resource=100;float eti,ewi;struct jcb{         char uname[10];          /* 用户名 */

2012-08-04 08:48:37 659

转载 文件结构

#ifndef _FILE #define _FILE #include #include #include const int FILENAMELEN=20;//文件名最大长度 const int DISC=32;//存储空间(FAT表长度) const int FILENUM=32;//文件个数 const int FDF=-2; const int

2012-08-04 08:47:09 260

转载 主存储器空间的分配和回收

#include #include using namespace std;#define TOTLE_LEFT 108      //除系统占用内存外的剩余内存#define frist_free 14    //第一块空闲区的起至地址#define first_size  12    //第一块空闲区的大小#define sec_free   32     //第二块空

2012-08-04 08:46:05 2047

转载 生产者-消费者问题实现

#include #include #include #include #include #include #define NEED_P 2       //生产者进程数#define NEED_C 2       //消费者进程数#define WORKS_P 10    //每个生产者进程执行的次数#define WORKS_C 10    //每个消费

2012-08-04 08:43:42 383

转载 银行家算法

#include #include #include#define PROCESS_NUMBER 5 /*进程数*/#define RESOURCE_NUMBER 3 /*资源数*/#define true 1#define false 0typedef int bool;//系统可用资源向量int Available[RESOURCE_NUMBER

2012-08-04 08:42:45 379

转载 内存页面置换算法的设计

# include # include    # include # include # define Bsize 3    //分配给该进程的页块数为3# define Psize 20  //页面访问序列长度struct pageInfor{  int content;//页面号  int timer;//被访问标记};class LRU

2012-08-04 08:41:50 469

转载 进程调度算法的设计

#include #include   #define MAX 5using namespace std;enum Status{running,ready,blocked};enum Policy{spf,rr};typedef class PCB{//定义PCB类。//data structurepublic:    int id,cputime,all

2012-08-04 08:40:45 1393

转载 中断处理

下面是我转载的几篇关于操作系统概念的一些代码,对于操作系统不太熟悉的可以看看,了解的童鞋可以跳过这个部分,这个部分为接下来的嵌入式操作系统做准备#include   #include   #includevoid main(){     double p;int a,m,r,n,e,o,u;   struct tm *local;      char *

2012-08-04 08:39:49 249

原创 将树转化为二叉树

通过前面的学习,现在我们应该有能力写一些比较简单的程序了,这里的树转化为二叉树的程序就是本人自己动手写的,相信各位童鞋在学习了前面的知识之后也能够写出这个程序了,具体的实现很简单,只是将二叉树和树的初始化放到一起就可以得到结果了,这里,我选择的建立树的输入为:1 2 5 0 6 0 0 3 7 0 0 4 8 0 0 0 0 得到的结果为1 2 5 6 3 7 4 8,所有的遍历都是基于前序遍历实

2012-08-02 15:28:37 1345 1

翻译 huffman编码

#include  #include  #include  #include  #include  //typedef int TElemType; const int UINT_MAX=1000; char str[50]; typedef struct { int weight; int parent,lchild,rchild;

2012-08-02 15:08:12 353

翻译 线索二叉树

#include #include typedef enum PointerTag {Link,Thread};typedef int TelemType;typedef struct BiThrNode{TelemType data;struct BiThrNode *lchild,*rchild;PointerTag LTag,RTag;}BiThrNode

2012-07-31 20:49:46 338

翻译 遍历二叉树

二叉树是数据结构里面一个比较重要的内容,通过学习这一章,我们需要用心思考,加强锻炼,为后面的内容打下坚实的基础,这里我需要说明的是,首先在初始化的时候,我们需要输入一些数据来初始化二叉树,先初始化根节点,然后再分别初始化左右子树,访问的时候我们也是通过根节点的指针来对二叉树进行访问,但是是否对数据进行输出则具体的进行对待,通过前序遍历,中序遍历和后续遍历的不同,我们可以分别写出不同的函数对二叉树进

2012-07-31 19:22:50 399

转载 数组的顺序表示和实现

这个就不必纠结了,我个人觉得使用这个数据类型还不如直接使用多维数组方便,有兴趣的童鞋可以看看下面的代码#include "stdio.h"  #include "stdarg.h"//标准的都文件,提供va_start,va_arg,va_end,用于存储变长的参数  #define MAX_LENGH 8//规定数组的最大的维数  #include "stdlib.h"

2012-07-31 15:24:18 385

翻译 串的实现

由于串的实现比较简单,这里就只给出函数,有兴趣的童鞋可以深究一下;还是那句话,重点放到后面的二叉树和图的实现,这里就带过;#include using namespace std;#define MAXSIZE 100typedef unsigned char SString[MAXSIZE+1]; //第一位存储串的长度bool StrAssign(SString &T,ch

2012-07-30 15:00:33 383

翻译 循环队列实现杨辉三角

经过前面的介绍,如果自己动手写过代码,会发现下面的代码是比较容易实现的,这里我就不做解释,把精力留到后面二叉树、图的实现再细谈#include using namespace std;#define MAXQSIZE 100typedef int QElemType;typedef struct{QElemType *base;int front;int rea

2012-07-29 16:29:15 891

翻译 队列的实现

#include using namespace std;typedef int QElemType;typedef struct QNode{QElemType data;struct QNode *next;}QNode,*QueuePtr;typedef struct{QueuePtr front;QueuePtr rear;}LinkQueu

2012-07-29 15:39:35 340

转载 ucos的51单片机移植

【uCOS_51的移植概述】uCOS_51是uCOS-II v2.52在MCS-51系列单片机上的移植实例,采用大模式,须外部扩展64KB的SRAM,内核的移植简单地归纳为如下几条:(1)声明11个数据类型(OS_CPU.H);(2)用#define声明4个宏(OS_CPU.H);(3)用C语言编写10个简单的函数(OS_CPU_C.C);(4)编写4个汇编语言函数(OS_CP

2012-07-29 08:25:16 3770

翻译 用栈转换数制

有了前面的基础,这个就变得比较简单了,这里就不做细说#include using namespace std;#define STACK_INIT_SIZE 100#define STACKINCREMENT 10typedef int ElemType;typedef struct{ElemType *base;ElemType *top;int stac

2012-07-28 20:45:25 336

翻译 多项式的实现

在实现上述链表之后,我们自己动手完成一个习题,就是利用链表实现多项式的相加,这个就比较简单,这里可要自己动手写,我也是完全自己写的。#include using namespace std;typedef struct LNode{float coef;//系数int expn;//指数struct LNode *next;}LNode,*LinkList;vo

2012-07-28 16:07:42 276

翻译 链表的实现

#include using namespace std;typedef int ElemType;typedef struct LNode{ElemType data;struct LNode *next;}LNode,*LinkList;bool InitList(LinkList &L,int n)//这个函数是从表尾构建链表的方式{//下面我自己写了一个

2012-07-28 15:00:47 237

M0硬件设计

cortex M0 要学习的可以下载下来看看啦

2013-01-07

ucos2的LPC1788移植

ucos2 LPC1788 移植

2012-08-11

ucosII的pc移植方法和软件

ucosII的pc移植,需要的同学可以下载下来看看,里面包含ucosII的源代码和broland C++编译器

2012-08-08

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除