- 博客(1)
- 资源 (18)
- 收藏
- 关注
原创 redis介绍
Redis是一个开源的使用ANSI C语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API。从2010年3月15日起,Redis的开发工作由VMware主持。从2013年5月开始,Redis的开发由Pivotal赞助。 Redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)
2017-03-29 20:22:08 343
基金优化 投资模型
某校基金会得到一笔数额为M元的基金,打算将这笔钱存入银行或用于购买国库券,在n年内每年用其利息奖励优秀教师,要求各年的奖金额相同。现行银行存款及各期国库券的利率见表10.1(假设国库券每年至少发一次,但发放时间不定)。
2008-12-15
linux 实验5 设备管理
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
main()
{
int testdev;
int i ;
char buf[50]="pear to dev! ";
printf("the program tt is running!!\n");
testdev = open("/dev/test",O_RDWR);
if(testdev==-1)
{
printf("can't open file!\n ");
exit(0);
}
write(testdev,buf,50);
printf("write \"%s\"\n",buf,50);
strcpy(buf,"apple to dev! ");
printf("the buffer is changed to \"%s\"\n",buf,50);
read(testdev,buf,50);
printf("read from dev is \"%s\"\n",buf);
close(testdev);
}
2008-12-12
linux 实验四 文件系统
/
#include <unistd.h>
#define COLLISIONFACTOR 0.5
struct HashFileHeader
{
int sig;//file signature
int reclen;//record length
int total_rec_num;//total record num;
int current_rec_num;//current record num,if current_record_num<total_rec_num,there are free record
};
struct CFTag
{
char collision;//collision count
char free;//free tag,0 is free,1 is occupied
};
int hashfile_creat(const char *filename,mode_t mode,int reclen,int recnum);
//int hashfile_open(const char *filename,int flags);
int hashfile_open(const char *filename,int flags, mode_t mode);
int hashfile_close(int fd);
int hashfile_read(int fd,int keyoffset,int keylen,void *buf);
int hashfile_write(int fd,int keyoffset,int keylen,void *buf);
int hashfile_delrec(int fd,int keyoffset,int keylen,void *buf);
int hashfile_findrec(int fd,int keyoffset,int keylen,void *buf);
int hashfile_saverec(int fd,int keyoffset,int keylen,void *buf);
int hash(int keyoffset,int keylen,void *buf,int recnum);
int checkHashFileFull(int fd);
int readHashFileHeader(int fd,struct HashFileHeader *hfh );
2008-12-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人