意图 将一个类的接口转换成客户希望的另外一个接口。A d a p t e r 模式使得原本由于接口不兼容而不能一起工作的那些类可以一起工作。 适用性 · 你想使用一个已经存在的类,而它的接口不符合你的需求。 · 你想创建一个可以复用的类,该类可以与其他不相关的类或不可预见的类(即那些接口可能不一定兼容的类)协同工作。 · (仅适用于对象A d a p t e r )你想使用一些已经存在的子类,但是不可能对每一个都进行子类化以匹配它们的接口。对象适配器可以适配它的父类接口。
上传时间: 2014-07-30
上传用户:270189020
功能强大的时钟中断,单片机和FIFO的接口和操作,单片机串口编程问题,纯软件单片机串口,串口通信的单片机程序,程序的多任务和资源复用举例,采用软件定时的计算方法
标签: 时钟中断
上传时间: 2014-01-26
上传用户:zgu489
最高优先级编码器 8位相等比较器 三人表决器(三种不同的描述方式) 加法器描述 8位总线收发器:74245 (注2) 地址译码(for m68008) 多路选择器(使用select语句) LED七段译码 多路选择器(使用if-else语句) 双2-4译码器:74139 多路选择器(使用when-else语句) 二进制到BCD码转换 多路选择器 (使用case语句) 二进制到格雷码转换 双向总线(注2) 汉明纠错吗译码器 三态总线(注2) 汉明纠错吗编码器 解复用器
上传时间: 2015-04-11
上传用户:tianyi223
一个功能完全的串口读写程序,里面实现的串口读写类可以方便的复用。
上传时间: 2014-01-19
上传用户:lijianyu172
它描述了在面向对象软件设计过程中针对特定问题的简洁而优雅的解决方案。设计模式捕获了随时间进化与发展的问题的求解方法,因此它们并不是人们从一开始就采用的设计方案。它们反映了不为人知的重新设计和重新编码的成果,而这些都来自软件开发者为了设计出灵活可复用的软件而长时间进行的艰苦努力。设计模式捕获了这些解决方案,并用简洁易用的方式表达出来。
上传时间: 2014-06-18
上传用户:bruce5996
说明: 1、这是一个让人眼前一亮的设计,通过java swing能设计出如此漂亮的界面实属不易; 2、该代码的一个优势,能够复用!! 3、能够创建简单的表,插入表,查询表的功能,尤其是查询部分可以在空白处输入SQL语句就可以直接查询了; 4、插入部分执行成功后重置界面还可以再次执行插入功能; 5、如果多个文件插入,也可以通过输入不同表名来进行更改; 6、这是一个桥连数据库,需要配置ODBC; 7、不足之处,由于本次设计中数据库设计成自动增加的功能,所以有时比较别扭,可能插不进去,不过如果能看懂代码的可以进行局部更改,不失为一个好的代码;
标签:
上传时间: 2013-12-13
上传用户:zhaiye
直接放在eclipse环境下,就可以运行,里面各项文件都是可以修改一下,就可以复用在其它的项目中
上传时间: 2015-05-14
上传用户:sunjet
数字运算,判断一个数是否接近素数 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
《程序员修炼之道》由一系列独立的部分组成,涵盖的主题从个人责任、职业发展,直以用于使代码保持灵活、并且易于改编和复用的各种架构技术,利用许多富有娱乐性的奇闻轶事、有思想性的例子以及有趣的类比,全面阐释了软件开发的许多不同方面的最佳实践和重大陷阱。无论你是初学者,是有经验的程序员,还是软件项目经理,本书都适合你阅读。
上传时间: 2014-06-18
上传用户:wuyuying
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
标签: government streamline important alphabet
上传时间: 2015-06-09
上传用户:weixiao99