freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于中間件的圖書管理系統(tǒng)unix課程設(shè)計-預覽頁

2024-07-22 18:48 上一頁面

下一頁面
 

【正文】 p[…], password[=…]: 指定密碼 客戶端命令行 命令行提示符下輸入:mysql 或 mysql –u root進入mysql系統(tǒng)。create table tbl。mysql)。mysql,SELECT * FROM person)。 }mysql_free_result(result)。① 數(shù)據(jù)庫library,:圖 ② 數(shù)據(jù)庫library中的相關(guān)表,:圖 ③ 數(shù)據(jù)庫library中部分表的內(nèi)容,:圖 2)::圖 3),:圖 4),:圖 5)實現(xiàn)查詢圖書功能,:6)實現(xiàn)用戶登錄功能,且實現(xiàn)了密碼不回顯功能,:圖 7)實現(xiàn)用戶查詢圖書功能,: 圖 8)實現(xiàn)用戶借書功能,:9)實現(xiàn)用戶還書功能,:圖 10)實現(xiàn)用戶續(xù)借功能,:圖 11)實現(xiàn)用戶注銷,:12)實現(xiàn)管理員登錄,且實現(xiàn)了密碼不回顯功能功能,:圖 13)實現(xiàn)管理員查詢圖書功能,:圖 14)實現(xiàn)管理員增加圖書功能,:圖 15)實現(xiàn)管理員刪除圖書功能,:圖 刪除圖書book10后再查詢改圖書,提示“未找到該圖書”,說明確實刪除成功,:16)實現(xiàn)管理員注銷功能,:圖 17)退出系統(tǒng),:六、設(shè)計中遇到的問題及解決方法這是我們第一次學習關(guān)于中間件的知識,對它的具體運行只是有一定程度的了解,不是很深刻,在設(shè)計中由于對UNIX知識的掌握不好,導致初期進度是相當?shù)穆陂_始的幾天里差不多就沒有什么進度,后來通過我們小組成員的討論、不斷查閱資料及向老師請教,我們開始有了一點點的設(shè)計思路,設(shè)計過程中用到的知識不單單是課本上有的,還有的是課本上沒介紹過的,因此這就需要我們多方的查閱資料和向老師請教。在仔細研究代碼后,我在管理員增加圖書的代碼后添加了break語句,成功的解決了錯誤。七、源程序清單,并在腳本中編寫如下內(nèi)容:create database library。create table admi(id char(10) not null primary key,name char(50) not null,password char(15))。insert into books values (3,book3,c,6)。insert into books values (7,book7,g,7)。 int i=0,j=0,n=0。 strtok_r(temp,。,amp。 p=NULL。 } free(temp)。 int i,j,n=0。 return 1。 mysql_close(amp。 printf(cmd=%s\n,cmd)。mysql)。mysql))==NULL) { mysql_free_result(result)。 } n=mysql_num_rows(result)。 while((row=mysql_fetch_row(result))) { strcat(buf,。imysql_num_fields(result)。 } if(flag==1) { printf(aaaaaaaaaaaaaaaaaaaaa\n)。 printf(opdb successfully!\n)。 sprintf(cmd1,select * from borrow where to_days(now())to_days(b_date)30amp。 if((opdb(cmd1,NULL,1)==0)amp。 } else { sprintf(cmd,update reader set enable=\0\ where id=\%s\,id)。 struct servent *sp。 if(argc!=1) service=argv[1]。 exit(1)。 exit(6)。 if(bind(s,(struct sockaddr *)amp。 } if(listen(s,5)==1){ fprintf(stderr,Error: listen)。 if((ns=accept(s,0,0))==1) { // wait a connection */ fprintf(stderr,error: accept)。 exit(1)。 } if(pid==0){ // entered child proccedure close(s)。 MYSQL_ROW row。 char id[50],password[50]。 char tmp[10][10][50]。 bzero(password,sizeof(password))。 printf(******************************************************************\n)。\039。 } if(buf[1]==39。: //update user info getm(buf,rec)。 printf(userinfo=%s\n,buf)。 case 39。 sprintf(cmd,select * from books where name like\%s%\,rec[0][0])。 break。: getm(buf,rec)。password=\%s\,rec[0][0],rec[0][1])。 break。L39。password=\%s\,rec[0][0],rec[0][1])。 break。b39。b_id=\%s\,rec[0][0],rec[0][1])。buf[1]=39。 } break。 if(opdb(cmd,NULL,1)!=0) { buf[0]=39。 } break。 sprintf(cmd,insert into borrow values (\%s\,\%s\,now(),\1\),rec[0][0],rec[0][1])。 opdb(cmd,writer,0)。\039。 break。 printf(One return request!\n)。 opdb(cmd,buf,1)。 break。R39。b_id=\%s\,rec[0][0],rec[0][1])。 checkstat(rec[0][0])。 exit(1)。: getm(buf,rec)。=\%s\,rec[0][0])。 if(n=0){ printf(write error!\n)。 case 39。amp。amp。 buf[0]=39。 } break。 sprintf(cmd,select * from books where id=\%s\,rec[0][0])。 } sprintf(cmd,insert into books values (\%s\,\%s\,\%s\,\%s\),rec[0][0],rec[0][1],rec[0][2],rec[0][3])。 if(write(ns,buf,strlen(buf))=0) { printf(Write wrong!\n)。d39。 opdb(cmd,buf,1)。 } printf(buf=%s\n,buf)。D39。 buf[0]=39。 } break。 } }}include include include include sys/include sys/include netinet/include define rec_length 20main(int argc, char **argv ){// structure defined for request as a client struct hostent *hp1。 int ss,spid。 int s,ns,pid,n。 sservice=argv[2]。 fprintf(stderr,Note: server_name is defined in file /etc/hosts\n)。 exit(5)。sin,sizeof(sin))。 close(s)。 exit(6)。 } if((pid=fork())==1){ // conneted, and then create child proc fprintf(stderr,server: fork error!)。wait(0)。 exit(5)。sin1,sizeof(sin1))。 =sp1s_port。sin1,sizeof(sin1))==1){ fprintf(stderr,Error: connect s1)。 while(1) { bzero(buf,sizeof(buf))。 } printf(data from client:%s\n,buf)。 exit(1)。 close(ss)。 if(write(ns,buf,strlen(buf))!=strlen(buf)){ fprintf(stderr,Write socket ns error!\n)。 close(ns)。//通用地址結(jié)構(gòu)sockaddr struct servent *sp。 //1 檢查命令行參數(shù)個數(shù) if(argc!=1){ service=argv[1
點擊復制文檔內(nèi)容
語文相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1