This a very simple Yee algorithm 3D FDTD code in C implementing the free space form of Maxwell s equations on a Cartesian grid. There are no internal materials or geometry. The code as delivered simulates an idealized rectangular waveguide by treating the interior of the mesh as free space/air and enforcing PEC (Perfect Electric Conductor) conditions on the faces of the mesh.
標簽: implementing algorithm Maxwell simple
上傳時間: 2015-05-14
上傳用戶:水中浮云
ARM下 Implement matrix multiplication of 2 square matrices, with data read from an input file and printed both to the console and to an output file. • Assume a file with correct data (no garbage, characters, etc.). • you must check and provide appropriate execution for 2 extra cases, namely when the matrix size given is either “0” , or when the size is greater than the maximum handled of “5” . In these 2 cases you must implement the following behaviour: o If size = 0, then print a message “Size = 0 is unacceptable” and continue by reading the next size for the next 2 matrices (if not end of file). o If size >5, then print two messages: “Size is too big - unacceptable”. Then read and discard the next (size2 ) integers and continue by reading the next size for the next 2 matrices (if not end of file).
標簽: multiplication Implement matrices matrix
上傳時間: 2014-08-30
上傳用戶:dsgkjgkjg
數字運算,判斷一個數是否接近素數 A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no
上傳時間: 2015-05-21
上傳用戶:daguda
* Function: * 1. Replace the first oldstr with newstr in srcstr * Arguments: * IN : * srcstr * oldstr * newstr * OUT : * srcstr * Return: * 1. If find and replace one oldstr with newstr in srcstr , return 1 * 2. If find no oldstr in srcstr , return 0 * 3. If error (malloc return NULL) return -1 * notes: * 1. srcstr should be large size enough.
標簽: Arguments Function Replace oldstr
上傳時間: 2014-12-20
上傳用戶:Yukiseop
程序接收鍵入的一個關鍵字和一個句子,若句子中不包含關鍵字,則顯示‘no MATCH’;若句子包含關鍵字則顯示‘MATCH’,并把該關鍵字在句子中的位置用十六進制數顯示出來。程序以輸入CTRL+C退出
上傳時間: 2015-06-09
上傳用戶:qazxsw
一個游戲 the hardware for the game includes a number of displays, each with a button and -- a light, that each represent a bin that can store marbles (beans). -- -- The display indicates the number of marbles in each bin at any given time. -- The light indecates that the present bin is not empty and that pushing the -- button is a valid move in the game. -- -- The button for each display indicates that a player takes the marbles from -- the selected bin, and takes them in his hand. The hand is represented by a -- diplay itself (no button). -- -- Each player has a home bin, located on opposite sides of the game.
標簽: the hardware displays includes
上傳時間: 2015-06-10
上傳用戶:cc1015285075
Due to an increase in demand for and questions about direct disk access for Micrososft platforms, and due to the fact that Microsoft has no API for direct disk access, I am releasing this library much earlier than I intended at that start. I am still working on this code.
標簽: Micrososft for questions platforms
上傳時間: 2014-01-26
上傳用戶:xaijhqx
此軟件包包含了模擬I2C C51程序軟件包和ZLG7290的C51程序然后包。 軟件包的接口界面: (1) bit ISendByte(uchar sla,uchar c) (無子地址)寫單字節數據 (現行地址寫) (2) bit IRcvByte(uchar sla,uchar *c) (無子地址)讀單字節數據 (現行地址讀) (3) bit ISendStr(uchar sla,uchar suba,uchar *s,uchar no)(有子地址)讀N字節數據 (4) bit IRcvStr(uchar sla,uchar suba,uchar *s,uchar no) (有子地址)寫N字節數據 (5) bit ISendStr(uchar sla,uchar *s,uchar no) (無子地址)寫多字節數據 (6) bit IRcvStr(uchar sla,uchar *s,uchar no) (無子地址)讀單字節數據 (7) unsigned char ZLG7290_SendData(unsigned char SubAdd,unsigned char Data) (8) void ZLG7290_SendBuf(unsigned char * disp_buf,unsigned char num) (9) unsigned char ZLG7290_SendCmd(unsigned char Data1,unsigned char Data2) (10)unsigned char ZLG7290_GetKey()
上傳時間: 2013-12-05
上傳用戶:hongmo
紅外線遙控器讀碼軟件,顯示紅外線波型,讀取并保存碼 IR Remote Control Unit Code Read System 產品詳細描述: 能夠像顯示器一樣顯示紅外線碼的波型 可以讀多達150種格式的紅外線碼 顯示紅外線碼的時間非常準確,誤差只有幾個微秒。 具有錯誤檢測功能 保存紅外線碼功能 自動識別碼的格式 比較樣機與所寫的新軟件的遙控器碼的異同 具體情況請訪問本網站:http://www.crzman.com/IR_Reader.htm Display the Infrared wave on the software like oscillograph. Can read more than 150 kinds of infrared code format Display the Infrared time and the tolerance no more than many us. Have error detect function Save Infrared code function Auto identify code s format Compare the code from sample and new Remote Control Unit code) Detail instance please visit address: http://www.crzman.com/IR_Reader.htm
上傳時間: 2015-07-03
上傳用戶:ccclll
加密算法 Test Driver for Crypto++, a C++ Class Library of Cryptographic Primitives: - To generate an RSA key cryptest g - To encrypt and decrypt a string using RSA cryptest r - To calculate MD5, SHS, and RIPEMD-160 message digests: cryptest m file - To encrypt and decrypt a string using DES-EDE in CBC mode: cryptest t - To encrypt or decrypt a file cryptest e|d input output - To share a file into shadows: cryptest s <pieces> <pieces-needed> file (make sure file has no extension, if you re running this under DOS) - To reconstruct a file from shadows: cryptest j output file1 file2 [....] - To gzip a file: cryptest z <compression-level> input output - To gunzip a file: cryptest u input output - To run validation tests: cryptest v - To run benchmarks: cryptest b [time for each benchmark in seconds]
標簽: Cryptographic Primitives generate Library
上傳時間: 2015-07-16
上傳用戶:wqxstar