ACM試題An Easy Problem Description As we known, data stored in the computers is in binary form. The problem we discuss now is about the positive integers and its binary form. Given a positive integer I, you task is to find out an integer J, which is the minimum integer greater than I, and the number of 1 s in whose binary form is the same as that in the binary form of I. For example, if "78" is given, we can write out its binary form, "1001110". This binary form has 4 1 s. The minimum integer, which is greater than "1001110" and also contains 4 1 s, is "1010011", i.e. "83", so you should output "83".
標(biāo)簽: Description computers Problem binary
上傳時(shí)間: 2013-12-11
上傳用戶:libenshu01
本文簡(jiǎn)要介紹了集成電路MAX038的性能,并給出了以MAX038波形產(chǎn)生器為核心具有四種輸出波形的函數(shù) 信號(hào)發(fā)生器的設(shè)計(jì)方案。用這種方法設(shè)計(jì)的信號(hào)發(fā)生器具有結(jié)構(gòu)簡(jiǎn)單、成本低、體積小等特點(diǎn),很好地滿足 了一般的實(shí)驗(yàn)要求。 關(guān)鍵詞:集成電路 信號(hào)發(fā)生器 頻率 Abstract:The performance ofIC_MAX038 was introduced briefly in this paper.At the sa/ne time,a signal generator design making with integrated circuit MAX038 is provided,which can produce four kinds of waveforms output.The signal generator was of characters such as simple structur,cheap expense,small volume and SO on.The signal generator contents the demand of general experiments very wel1. Key words:Integrated circuit Signal generator Frequency
上傳時(shí)間: 2013-12-12
上傳用戶:四只眼
王小平《遺傳算法——理論、應(yīng)用與軟件實(shí)現(xiàn)》隨書光盤,內(nèi)容有: \GA 本書中所附源程序C或C++代碼文件及其可執(zhí)行文件 Scs.cpp 基本分類算法源程序,輸入數(shù)據(jù)文件cfile.txt,efile.txt,gfile.txt,pfile.txt,rfile.txt,tfile.txt Sga.c 基本遺傳算法源程序, 輸入數(shù)據(jù)文件input,輸出文件output A_life.c 基于遺傳算法的人工生命模擬源程序, 輸入數(shù)據(jù)文件world GA_nn.c 基于遺傳算法優(yōu)化神經(jīng)網(wǎng)絡(luò)結(jié)構(gòu)源程序,輸入數(shù)據(jù)文件sample Patmat.c 基于遺傳算法提取基元圖形源程序 \Sources 遺傳算法相關(guān)自由軟件及代碼
標(biāo)簽: 算法 光盤 軟件實(shí)現(xiàn)
上傳時(shí)間: 2013-12-14
上傳用戶:sz_hjbf
This project attempts to implement a Database using B+Tree. The project has developed a DATABASE SYSTEM with lesser memory consumption. Its API includes simple SQL Statements and the output is displayed on the screen. Certain applications for which several features of existing databases like concurrency control, transaction management, security features are not enabled. B+Trees can be used as an index for factor access to the data. Help facility is provided to know the syntax of SQL Statements.
標(biāo)簽: project implement developed Database
上傳時(shí)間: 2013-12-25
上傳用戶:semi1981
帶進(jìn)度條的文件上傳(java+ajax源碼) 在寫代碼的時(shí)候,還要用到關(guān)于servlet的包servlet-api.jar。 寫完后調(diào)試的過(guò)程中,老報(bào)錯(cuò):java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileoutputStream,后來(lái)一查才知道少了commons-io-1.2.jar,加上后,就ok了。 關(guān)于獲取及顯示進(jìn)度部分,用了我原來(lái)自己寫的一個(gè)ajax的應(yīng)用架構(gòu),從中抽取了部分代碼出來(lái),注意,js文件只適用于UTF-8編碼的頁(yè)面,因?yàn)楝F(xiàn)在我只寫UTF-8編碼的頁(yè)面了,國(guó)際化方便。 progressUpload.jar中,包含了commons-fileupload-1.1.1.jar,servlet-api.jar,commons-io-1.2.jar,在progressUpload.jar中,還包含一個(gè)屬性文件,里面是一些默認(rèn)配置,可根據(jù)自己的需要修改。 由于有源碼,怎么用可以自己看源碼,此外,那個(gè)例子中也寫了,在此不再贅述。例子中只取到了FileItem,再將item保存一下就ok了,示例代碼: File upFile = new File(remoteFilePath) try \{ item.write(upFile) fileInfo.put("infotip", "上傳成功.") } catch (java.lang.Exception e) \{ fileInfo.put("infotip", "上傳失敗.") }
上傳時(shí)間: 2015-09-01
上傳用戶:ccclll
這是Small RTOS 51 在DP-51下載仿真實(shí)驗(yàn)儀上使用CAT24WC02驅(qū)動(dòng)程序的例子。本例程序按照相應(yīng)的的通訊協(xié)議接收一個(gè)數(shù)據(jù),并將接收到的數(shù)據(jù)顯示到LED數(shù)碼顯示器上。然后將接收到的數(shù)據(jù)寫入Cat24Wc02中,再在同一位置將數(shù)據(jù)讀出,并將讀出的數(shù)據(jù)通過(guò)串口發(fā)送回來(lái)。通訊協(xié)議參考rtos隨想曲和test.ini。 注意:(1)在KEIL C51 工程中,我已經(jīng)把輸出文件目錄設(shè)在e:\temp中,您可以在Project->Options for Target "Target 1"的output頁(yè)點(diǎn)擊Select Folder for Objects...和Listing頁(yè)點(diǎn)擊Select Folder for Listing...改變. (2)編譯時(shí)會(huì)有4個(gè)警告,可以忽略. (3)DP-51下載仿真實(shí)驗(yàn)儀的所有跳線選取默認(rèn)值。
上傳時(shí)間: 2015-09-03
上傳用戶:wweqas
這是Small RTOS 51 DP-51下載仿真實(shí)驗(yàn)儀上實(shí)現(xiàn)一個(gè)鬧鐘的源代碼。它可以使用k1~k4調(diào)整時(shí)間,使用串口設(shè)置一個(gè)報(bào)警時(shí)間。由于僅僅是一個(gè)例子而非產(chǎn)品,有一些細(xì)節(jié)沒有完善。如調(diào)整完時(shí)間后第一次顯示的時(shí)間是錯(cuò)誤的(由于共享TimeData引起);沒有使用串行eeprom存儲(chǔ)多個(gè)報(bào)警時(shí)間等;刪除報(bào)警代碼沒有編寫。不過(guò),程序已經(jīng)可以使用,讀者可以自行完善它。通訊協(xié)議參考rtos隨想曲和test.ini。 注意:(1)在KEIL C51 工程中,我已經(jīng)把輸出文件目錄設(shè)在e:\temp中,您可以在Project->Options for Target "Target 1"的output頁(yè)點(diǎn)擊Select Folder for Objects...和Listing頁(yè)點(diǎn)擊Select Folder for Listing...改變. (2)編譯時(shí)會(huì)有6個(gè)警告,可以忽略. (3)除與pcf8563相關(guān)的跳線和蜂鳴器的跳線外,DP-51下載仿真實(shí)驗(yàn)儀的所有跳線選取默認(rèn)值。
上傳時(shí)間: 2015-09-03
上傳用戶:jyycc
這是Small RTOS 51 DP-51下載仿真實(shí)驗(yàn)儀上編寫的一個(gè)鍵盤驅(qū)動(dòng)例子。在DP-51下載仿真實(shí)驗(yàn)儀上運(yùn)行本程序后,有兩個(gè)發(fā)光二極管每秒閃動(dòng)一次。當(dāng)按下某個(gè)按鍵時(shí),LED數(shù)碼顯示器會(huì)顯示相應(yīng)的鍵值。 注意:(1)在KEIL C51 工程中,我已經(jīng)把輸出文件目錄設(shè)在e:\temp中,您可以在Project->Options for Target "Target 1"的output頁(yè)點(diǎn)擊Select Folder for Objects...和Listing頁(yè)點(diǎn)擊Select Folder for Listing...改變. (2)編譯時(shí)會(huì)有4個(gè)警告,可以忽略. (3)DP-51下載仿真實(shí)驗(yàn)儀的所有跳線選取默認(rèn)值。
上傳時(shí)間: 2014-11-30
上傳用戶:561596
This paper addresses the issues relating to the enforcement of robust stability when implementing the Adaptive Inverse Control (AIC) scheme. In this scheme, an adaptive FIR filter is added to a closed-loop system in order to reduce the output error caused by external disturbances, enhancing the performance achieved by linear time-invariant controllers alone.
標(biāo)簽: implementing enforcement addresses the
上傳時(shí)間: 2013-12-23
上傳用戶:佳期如夢(mèng)
本程序分為界面和控制器核心兩部分 一、界面部分功能主要有: (1)顯示控制器核心數(shù)據(jù)和參數(shù) (2)與用戶交互,可以調(diào)節(jié)初始輸入溫度值,并將溫度變化率清零以便進(jìn)行新一輪的模擬。 界面使用了定時(shí)器。開啟模擬時(shí)候,每隔一秒,觸發(fā)一次計(jì)時(shí)器消息,完成下列工作: 1. 將界面上的當(dāng)前溫度映射為模糊控制器的輸入溫度 2. 輸出當(dāng)前溫度,當(dāng)前溫度變化率 3. 調(diào)用模糊控制,得到控制器輸出值,將其乘以m_fFuelEffect (燃料輸出對(duì)溫度變化率的影響率,目前設(shè)置為0.3),得到變化率的變化,加到當(dāng)前溫度變化率上,得到新的變化率。 4. 更新變化率,更新溫度。將結(jié)果映射到界面上。 5. 記錄相關(guān)數(shù)據(jù)并以圖形、數(shù)字方式輸出。 二、控制器核心用到的類有 (1)Rule_Func_Single 將簡(jiǎn)單的函數(shù)包裝成類,方便后面使用。實(shí)現(xiàn)了 NB, NS, ZO, PS, PB 等梯形函數(shù),以及常值函數(shù)。 (2)Grading_Func 繼承自Rule_Func_Single類,比基類增加一個(gè)輸入?yún)?shù),指明梯形函數(shù)屬于Input, Delta或者output 。 (3)Rule_Function 將兩個(gè)Grading_Func結(jié)合在一起,進(jìn)行模糊與或模糊或等模糊邏輯操作,并輸出結(jié)果。
上傳時(shí)間: 2014-11-01
上傳用戶:Yukiseop
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1