打飛碟小游戲,射擊類,/*自己改游戲的速度*/ int speed /*飛碟移動速度*/ int col /*中心坐標*/ int score=0 /*得分*/
上傳時間: 2013-12-22
上傳用戶:sardinescn
附件為:LCD12864顯示漢字和數字的程序與電路 /* 自定義延時子函數 */ void delayms(uchar z) { int x,y; for(x=z;x>0;x--) for(y=110;y>0;y--); } /* 判斷LCD忙信號狀態 */ void buys() { int dat; RW=1; RS=0; do { P0=0x00; E=1; dat=P0; E=0; dat=0x80 & dat; } while(!(dat==0x00)); } /* LCD寫指令函數 */ void w_com(uchar com) { //buys(); RW=0; RS=0; E=1; P0=com; E=0; } /* LCD寫數據函數 */ void w_date(uchar date) { //buys(); RW=0; RS=1; E=1; P0=date; E=0; } /* LCD選屏函數 */ void select_screen(uchar screen) { switch(screen) { case 0: //選擇全屏 CS1=0; CS2=0; break; case 1: //選擇左屏 CS1=0; CS2=1; break; case 2: //選擇右屏 CS1=1; CS2=0; break; /* case 3: //選擇右屏 CS1=1; CS2=1; break; */ } } /* LCDx向上滾屏顯示 */ void lcd_rol() { int x; for(x=0;x<64;x++) { select_screen(0); w_com(0xc0+x); delayms(500); } } /* LCD清屏函數:清屏從第一頁的第一列開始,總共8頁,64列 */ void clear_screen(screen) { int x,y; select_screen(screen); //screen:0-選擇全屏,1-選擇左半屏,2-選擇右半屏 for(x=0xb8;x<0xc0;x++) //從0xb8-0xbf,共8頁 { w_com(x); w_com(0x40); //列的初始地址是0x40 for(y=0;y<64;y++) { w_date(0x00); } } } /* LCD顯示漢字字庫函數 */ void lcd_display_hanzi(uchar screen,uchar page,uchar col,uint mun) { //screen:選擇屏幕參數,page:選擇頁參數0-3,col:選擇列參數0-3,mun:顯示第幾個漢字的參數 int a; mun=mun*32; select_screen(screen); w_com(0xb8+(page*2)); w_com(0x40+(col*16)); for ( a=0;a<16;a++) { w_date(hanzi[mun++]); } w_com(0xb8+(page*2)+1); w_com(0x40+(col*16)); for ( a=0;a<16;a++) { w_date(hanzi[mun++]); } } /* LCD顯示字符字庫函數 */ void lcd_display_zifuk(uchar screen,uchar page,uchar col,uchar mun) { //screen:選擇屏幕參數,page:選擇頁參數0-3,col:選擇列參數0-7,mun:顯示第幾個漢字的參數 int a; mun=mun*16; select_screen(screen); w_com(0xb8+(page*2)); w_com(0x40+(col*8)); for ( a=0;a<8;a++) { w_date(zifu[mun++]); } w_com(0xb8+(page*2)+1); w_com(0x40+(col*8)); for ( a=0;a<8;a++) { w_date(zifu[mun++]); } } /* LCD顯示數字字庫函數 */ void lcd_display_shuzi(uchar screen,uchar page,uchar col,uchar mun) { //screen:選擇屏幕參數,page:選擇頁參數0-3,col:選擇列參數0-7,mun:顯示第幾個漢字的參數 int a; mun=mun*16; select_screen(screen); w_com(0xb8+(page*2)); w_com(0x40+(col*8)); for ( a=0;a<8;a++) { w_date(shuzi[mun++]); } w_com(0xb8+(page*2)+1); w_com(0x40+(col*8)); for ( a=0;a<8;a++) { w_date(shuzi[mun++]); } } /* LCD初始化函數 */ void lcd_init() { w_com(0x3f); //LCD開顯示 w_com(0xc0); //LCD行初始地址,共64行 w_com(0xb8); //LCD頁初始地址,共8頁 w_com(0x40); //LCD列初始地址,共64列 } /* LCD顯示主函數 */ void main() { //第一行 int x; lcd_init(); //LCD初始化 clear_screen(0); //LCD清屏幕 lcd_display_shuzi(1,0,4,5); //LCD顯示數字 lcd_display_shuzi(1,0,5,1); //LCD顯示數字 lcd_display_hanzi(1,0,3,0); //LCD顯示漢字 lcd_display_hanzi(2,0,0,1); //LCD顯示漢字 //LCD字符漢字 lcd_display_hanzi(2,0,1,2); //LCD顯示漢字 //第二行 lcd_display_zifuk(1,1,2,0); //LCD顯示字符 lcd_display_zifuk(1,1,3,0); //LCD顯示字符 lcd_display_zifuk(1,1,4,0); //LCD顯示字符 lcd_display_zifuk(1,1,5,4); //LCD顯示字符 lcd_display_shuzi(1,1,6,8); //LCD顯示字符 lcd_display_shuzi(1,1,7,9); //LCD顯示字符 lcd_display_shuzi(2,1,0,5); //LCD顯示字符 lcd_display_shuzi(2,1,1,1); //LCD顯示字符 lcd_display_zifuk(2,1,2,4); lcd_display_zifuk(2,1,3,1); lcd_display_zifuk(2,1,4,2); lcd_display_zifuk(2,1,5,3); //第三行 for(x=0;x<4;x++) { lcd_display_hanzi(1,2,x,3+x); //LCD顯示漢字 } for(x=0;x<4;x++) { lcd_display_hanzi(2,2,x,7+x); //LCD顯示漢字 } //第四行 for(x=0;x<4;x++) { lcd_display_zifuk(1,3,x,5+x); //LCD顯示漢字 } lcd_display_shuzi(1,3,4,7); lcd_display_shuzi(1,3,5,5); lcd_display_shuzi(1,3,6,5); lcd_display_zifuk(1,3,7,9); lcd_display_shuzi(2,3,0,8); lcd_display_shuzi(2,3,1,9); lcd_display_shuzi(2,3,2,9); lcd_display_shuzi(2,3,3,5); lcd_display_shuzi(2,3,4,6); lcd_display_shuzi(2,3,5,8); lcd_display_shuzi(2,3,6,9); lcd_display_shuzi(2,3,7,2); while(1); /* while(1) { // LCD向上滾屏顯示 lcd_rol(); } */ }
上傳時間: 2013-11-08
上傳用戶:aeiouetla
% 文件名:randlsbget.m % 程序員:余波 % 編寫時間:2007.6.25 % 函數功能: 本函數將完成提取隱秘于上的秘密信息 % 輸入格式舉例:result=( scover.jpg ,56, secret.txt ,2001) % 參數說明: % output是信息隱藏后的圖象 % len_total是秘密信息的長度 % goalfile是提取出的秘密信息文件 % key是隨機間隔函數的密鑰 % result是提取的信息 function result=randlsbget(output,len_total,goalfile,key) ste_cover=imread(output) ste_cover=double(ste_cover) % 判斷嵌入信息量是否過大 [m,n]=size(ste_cover) frr=fopen(goalfile, a ) % p作為信息嵌入位計數器將信息序列寫回文本文件 p=1 % 調用隨機間隔函數選取像素點 [row,col]=randinterval(ste_cover,len_toal,key) for i=:len_toal if bitand(ste_cover(row(i),col(i)),1)==1 fwrite(frr,1, bit1 ) result(p,1) else fwrite(frr,0, bit1 ) result(p,1)=0 end if p==len_total break end p=p+1 end fclose(frr)
標簽: randlsbget result scover 2007
上傳時間: 2015-11-10
上傳用戶:yzhl1988
delphi表格控件源碼,修改垂直方向滾動表格時, 可以滾動得只剩下一行的問題. - 修改了打印預覽頁眉行之間間距過大的問題 - 修改了3.25版本后多行文本單元格打印不顯示的問題 - 修改了3.25.3后某些版本會出現內存泄漏導致程序崩潰的問題 + 為TEjunDataGrid的columns對象添加了CellItems屬性,該屬性是TStrings類型,當該列的單元格 是cellComboBox類型時,下拉列表的內容將從columns[col].CellItems屬性中獲取。
上傳時間: 2016-03-22
上傳用戶:lx9076
(1) 設計和編寫代表矩陣的Matrix類。該類包括矩陣行列數變量int rows和int cols,矩陣數據數組double data[][],構造方法Matrix()、Matrix(int rows,int cols)、Matrix(int rows,int cols,double data[][]),獲取某元素值的方法getData(int row,int col),設置某元素值的方法setData(int row,int col,double value),計算兩個矩陣的乘積的方法multiply(Matrix m)以及toString()等內容。
上傳時間: 2016-08-19
上傳用戶:qiao8960
int show_char(int n, const char *name, chtype code) { const int height = 16 int row = 4 + (n height) int col = (n / height) * colS / 2 mvprintw(row, col, " *s : ", colS/4, name) addch(code) return n + 1 }
標簽: int const show_char chtype
上傳時間: 2017-06-12
上傳用戶:3到15
This thesis is about wireless communication in shared radio spectrum. Its origin and motivation is ideally represented by the two quotations from above. In this thesis, the support of Quality-of-Service (QoS) in cognitive radio networks is analyzed. New approaches to distributed coordination of cognitive radios are developed in different spectrum sharing scenarios. The Wireless Local Area Network (WLAN) 802.11 proto- col of the Institute of Electrical and Electronics Engineers (IEEE) (IEEE, 2003) with its enhancement for QoS support (IEEE, 2005d) is taken as basis. The Medium Access Control (MAC) of 801.11(e) is modified to realize flexible and dynamic spectrum assignment within a liberalized regulation framework.
標簽: Quality-of-Service Distributed Support
上傳時間: 2020-05-27
上傳用戶:shancjb
In case you haven’t noticed, multimedia communication over IP and wireless net- works is exploding. Applications such as BitTorrent, used primarily for video downloads, now take up the lion’s share of all traffic on the Internet. Music file sharing, once on the legal cutting edge of massive copyright infringement on col- lege campuses around the world, has moved into the mainstream with signifi- cant legal downloads of music and video to devices such as the iPod and nu- merous other portable media players.
標簽: Multimedia Over IP
上傳時間: 2020-05-31
上傳用戶:shancjb