搜索资源列表
Dynamic_Array
- 动态数组实现, 包括了一个小例子.关键结构如下: typedef struct Nameval Nameval struct Nameval{ char *name int value } struct NVtab{ int nval /* current number of values */ int max /* allocated number of values */ Nameval *nameval /* arr
DESProcess
- DESProcess FILE *mfp,*cfp int ttch=0,xorRes,ttbitdiff=0 char mch,cch float bdiff=0 if((mfp=fopen(mfile,\"r\"))==NULL) {cout<<\"Cannot open the file to compare\"<<endl } if((cfp=fopen(cfile,\"r\"))==NULL) {cou
chengxuyuanma
- 用多线程同步方法解决读者阅览问题 1) 每个读者进入阅览室后,即时显示“Entered” 及其线程自定义标识,还同时显示阅览室共有几名顾客及其所坐的位置。 2) 至少有10个读者,每人阅览至少3秒钟。 3) 多个读者须共享操作函数代码。 2总的设计思想及系统平台、语言、工具: 设计思想:程序设定的是10个读者和5个座位,对读者进行编号,依次进入阅览室读书,为每一座位列一表目,包括座号和读者号等,读者离开时要登出,即消掉登记的信息。 系统平台:LINUX 语言:C语言
特殊磁道加密源代码
- 使用的是API编程,可格式化、校验和读写特殊扇区。可用作Windows下的磁盘加密。本函数还有以下两个缺点以待改进: 1.本函数还只能读能读 A: 和 B:,即只能对软盘操作 2.不能改变磁盘扇区大小,只能是标准的 512 个字节。 参数说明: command 操作: 0 重置磁盘 2 读扇区 3 写扇区 4 校验磁道 5 格式化磁道 8 得到设备参数 (int 1EH) drive 驱动器 A:=0 B:=1 head 磁头号,范围 0 - 1 track 磁道号,范围 0 - 84 ( 80
ebus.tar
- 程序主要功能:linux 下通过串口控制智能系统,zo-b8l5a 5a八通道双值输出模块。一、 对应文件:ebus_module.tar.gz(包含三个文件ebus.cc、ebus.h、ebus_test.cc) 其中ebus.h是包含class E_bus的定义和声明的头文件;ebus.cc主要是类里面的函数;ebus_test.cc主要是类的使用,完成了循环依次关闭8路输出,打开8路输出的功能。二、 E_bus类的接口说明:打开或者关闭输出口,只需要函数int E_bus::ebus_
framebuffer
- 帧缓冲#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <
zxc
- 小写字母变大写字母(汇编语言实现) (2008-05-14 21:57:52) 标签:杂谈 DATA SEGMENT PMT1 DB INPUT Small letter : ,0AH,0DH, $ STR1 DB 40H,0,40H DUP(0) PMT2 DB 0AH,0DH, Display capital letter : ,0AH,0DH STR2 DB 40H DUP(0), $ DATA ENDS STACK1 SEGMENT
page_class
- et框架由于拥有CLR提供的丰富库支持,只需很少的代码即可实现先前使用C等旧式语言很难实现的加密算法。本类实现一些常用机密算法,供参考。其中MD5算法返回Int的ToString字串。返回数字字母型结果的算法参见之前Blog文章-* This program is free software you can redistribute it and/or modify it * under the terms of the GNU General Public License as publ
cipanguanli
- 编写C语言程序,模拟UNIX磁盘空间管理中使用的分组链接法。 1.定义一个记录磁盘块号的堆栈S—free[10],以及记录栈中现有磁盘块数的变量S—nfree。 2.定义一个由40个元素构成的结构数组block[40]用作磁盘块存放。 struct size { int blocl[10] } struct blocd { struct size a[10] //用于在空闲磁盘块号链中存放磁盘块号 }block[40] 3. 假设系统中文件的最大
2
- public final class RC4 extends Cipher { int x int y byte[] state = new byte[256] -public final class RC4 extends Cipher { int x int y byte[] state = new byte[256]
UNIXCcode
- 用C语言编写的Unix代码实例 供大家参考 -#include <sys/sem.h> #include <sys/types.h> #include <sys/ipc.h> #include <stdio.h> #include <sys/stat.h> #define VERIFYERR(a, b) if (a) fprintf(stderr, " s failed.\n", b) else fp
teamgrade
- 学生学期成绩记录程序 2、 分析与设计 Clink: Public: char stuId[sizeOfId] char stuName[sizeOfName] double score_Maths double score_English double score_Chinese double score_SSD1 double score_Java CLink *next CLink (char
sh
- 2. 声明vehicle类,私有数据成员为 int MaxSpeed int Weight ,有public成员函数且为虚函数void run();void stop();bicycle 类motorcar类 均从vehicle类 虚拟派生得到。Motorcycle类从bicycle 类motorcar类公共派生得到。对虚函数调用,检测其晚期绑定。-2. Statement vehicle class, private data members int MaxSpeed int Weight
guard-2
- 个人编写的一个十分好用的函数,可以设置程序成为后台守护进程, 调用十分简单,在程序中调用函数deamon即可,以下是函数原型 int daemon(int nochdir, int noclose) 其中 nochdir 为是否修改当前目录-Individual written a very useful function, you can set the program to become a background daemon, called very sim
msg
- 消息队列是一个链表,链表的每一个结点是一个消息。消息队列存放在内核中并由消息队列标示符标识。 对消息队列的操作有下面三种类型: a. 打开或创建消息队列 int msgget(key_t key, int flag) 参数key是一个键值,由ftok函数获得, flg参数是一些标志位。函数返回与健值key相对对应的消息队列描述字。 b. 读写操作 int msgsnd(int msqid, const void *ptr, size_t nbytes, int flag
sushu
- 自动判断输入的一个整数是否为素数 并输出 “是素数” “不是素数”-#include<stdio.h> int main() { int i,n,mark=0 printf("请输入一个整数:",n) scanf(" d",&n) for(i=2 i<n/2+1 i++) { if(n i==0) { printf(" d不是素数",n) mark=1 break }
dec
- 实现数字的因式分解,比如说 12=2*2*3的乘积,素数的乘积-implements int number depose to other number
HelloJni.tar
- 1、每个被加载的模块,无论是可执行程序还是共享库,均有自己独立的PLT和GOT表。所以拦截这个模块的对外调用的GOT,不影响其他模块。 2、本文只实现了拦截模块的调出到其他模块的动作,其他模块的调入没有涉及到(可能还涉及到比较复杂的重定位操作)。 3、system_server是system用户,不是有权限写所有名字的Property,这里用了persist.sys.开头的属性名,而persist.sys.开头的属性会保存至磁盘,因此性能会差点儿。 4、ioctl虽然实质声明是
MsgPacket
- 项目中使用的2进制打包程序,消息封包类,支持byte,short,int longlong,string,double,bin等类型,编码支持gb2312,utf8,utf16-Used in the project binary package program, the message packet classes, support byte, short, int longlong, string, double, bin and other types of encoding suppor
BigDigits-2.4.0
- Big int libaray in c plus plus