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".
标签: Description computers Problem binary
上传时间: 2013-12-11
上传用户:libenshu01
本文简要介绍了集成电路MAX038的性能,并给出了以MAX038波形产生器为核心具有四种输出波形的函数 信号发生器的设计方案。用这种方法设计的信号发生器具有结构简单、成本低、体积小等特点,很好地满足 了一般的实验要求。 关键词:集成电路 信号发生器 频率 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
上传时间: 2013-12-12
上传用户:四只眼
王小平《遗传算法——理论、应用与软件实现》随书光盘,内容有: \GA 本书中所附源程序C或C++代码文件及其可执行文件 Scs.cpp 基本分类算法源程序,输入数据文件cfile.txt,efile.txt,gfile.txt,pfile.txt,rfile.txt,tfile.txt Sga.c 基本遗传算法源程序, 输入数据文件input,输出文件OUTPUT A_life.c 基于遗传算法的人工生命模拟源程序, 输入数据文件world GA_nn.c 基于遗传算法优化神经网络结构源程序,输入数据文件sample Patmat.c 基于遗传算法提取基元图形源程序 \Sources 遗传算法相关自由软件及代码
上传时间: 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.
标签: project implement developed Database
上传时间: 2013-12-25
上传用户:semi1981
带进度条的文件上传(java+ajax源码) 在写代码的时候,还要用到关于servlet的包servlet-api.jar。 写完后调试的过程中,老报错:java.lang.NoClassDefFoundError: org/apache/commons/io/OUTPUT/DeferredFileOUTPUTStream,后来一查才知道少了commons-io-1.2.jar,加上后,就ok了。 关于获取及显示进度部分,用了我原来自己写的一个ajax的应用架构,从中抽取了部分代码出来,注意,js文件只适用于UTF-8编码的页面,因为现在我只写UTF-8编码的页面了,国际化方便。 progressUpload.jar中,包含了commons-fileupload-1.1.1.jar,servlet-api.jar,commons-io-1.2.jar,在progressUpload.jar中,还包含一个属性文件,里面是一些默认配置,可根据自己的需要修改。 由于有源码,怎么用可以自己看源码,此外,那个例子中也写了,在此不再赘述。例子中只取到了FileItem,再将item保存一下就ok了,示例代码: File upFile = new File(remoteFilePath) try \{ item.write(upFile) fileInfo.put("infotip", "上传成功.") } catch (java.lang.Exception e) \{ fileInfo.put("infotip", "上传失败.") }
上传时间: 2015-09-01
上传用户:ccclll
这是Small RTOS 51 在DP-51下载仿真实验仪上使用CAT24WC02驱动程序的例子。本例程序按照相应的的通讯协议接收一个数据,并将接收到的数据显示到LED数码显示器上。然后将接收到的数据写入Cat24Wc02中,再在同一位置将数据读出,并将读出的数据通过串口发送回来。通讯协议参考rtos随想曲和test.ini。 注意:(1)在KEIL C51 工程中,我已经把输出文件目录设在e:\temp中,您可以在Project->Options for Target "Target 1"的OUTPUT页点击Select Folder for Objects...和Listing页点击Select Folder for Listing...改变. (2)编译时会有4个警告,可以忽略. (3)DP-51下载仿真实验仪的所有跳线选取默认值。
上传时间: 2015-09-03
上传用户:wweqas
这是Small RTOS 51 DP-51下载仿真实验仪上实现一个闹钟的源代码。它可以使用k1~k4调整时间,使用串口设置一个报警时间。由于仅仅是一个例子而非产品,有一些细节没有完善。如调整完时间后第一次显示的时间是错误的(由于共享TimeData引起);没有使用串行eeprom存储多个报警时间等;删除报警代码没有编写。不过,程序已经可以使用,读者可以自行完善它。通讯协议参考rtos随想曲和test.ini。 注意:(1)在KEIL C51 工程中,我已经把输出文件目录设在e:\temp中,您可以在Project->Options for Target "Target 1"的OUTPUT页点击Select Folder for Objects...和Listing页点击Select Folder for Listing...改变. (2)编译时会有6个警告,可以忽略. (3)除与pcf8563相关的跳线和蜂鸣器的跳线外,DP-51下载仿真实验仪的所有跳线选取默认值。
上传时间: 2015-09-03
上传用户:jyycc
这是Small RTOS 51 DP-51下载仿真实验仪上编写的一个键盘驱动例子。在DP-51下载仿真实验仪上运行本程序后,有两个发光二极管每秒闪动一次。当按下某个按键时,LED数码显示器会显示相应的键值。 注意:(1)在KEIL C51 工程中,我已经把输出文件目录设在e:\temp中,您可以在Project->Options for Target "Target 1"的OUTPUT页点击Select Folder for Objects...和Listing页点击Select Folder for Listing...改变. (2)编译时会有4个警告,可以忽略. (3)DP-51下载仿真实验仪的所有跳线选取默认值。
上传时间: 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.
标签: implementing enforcement addresses the
上传时间: 2013-12-23
上传用户:佳期如梦
本程序分为界面和控制器核心两部分 一、界面部分功能主要有: (1)显示控制器核心数据和参数 (2)与用户交互,可以调节初始输入温度值,并将温度变化率清零以便进行新一轮的模拟。 界面使用了定时器。开启模拟时候,每隔一秒,触发一次计时器消息,完成下列工作: 1. 将界面上的当前温度映射为模糊控制器的输入温度 2. 输出当前温度,当前温度变化率 3. 调用模糊控制,得到控制器输出值,将其乘以m_fFuelEffect (燃料输出对温度变化率的影响率,目前设置为0.3),得到变化率的变化,加到当前温度变化率上,得到新的变化率。 4. 更新变化率,更新温度。将结果映射到界面上。 5. 记录相关数据并以图形、数字方式输出。 二、控制器核心用到的类有 (1)Rule_Func_Single 将简单的函数包装成类,方便后面使用。实现了 NB, NS, ZO, PS, PB 等梯形函数,以及常值函数。 (2)Grading_Func 继承自Rule_Func_Single类,比基类增加一个输入参数,指明梯形函数属于Input, Delta或者OUTPUT 。 (3)Rule_Function 将两个Grading_Func结合在一起,进行模糊与或模糊或等模糊逻辑操作,并输出结果。
上传时间: 2014-11-01
上传用户:Yukiseop