介紹基于VHDL的微型打印機控制器的設計。論述了微型打印機的基本原理,以及實現控制器的VHDL語言設計。打印機的數據來自系統中的存儲模塊,根據需要控制打印。該微型打印機控制器可取代傳統的微型打印機,且抗干擾性好,可靠性高,具有較強的移植性,稍加改動就可應用于不同場合。
Abstract:
This paper introduced the design method of micro printer controller based on VHDL.The basic principles of microprinter is explained,as well as the realization of the controller by VHDL language.The printer data is from the system memory modules,can control printer.The design of microprinter controller has antigood and high reliability,it can Replace the traditional printer.The controller has very good portability,and need little modify that can use in different situation.
2^x mod n = 1 acm競賽題 Give a number n, find the minimum x that satisfies 2^x mod n = 1.
Input
One positive integer on each line, the value of n.
Output
If the minimum x exists, print a line with 2^x mod n = 1.
Print 2^? mod n = 1 otherwise.
You should Replace x and n with specific numbers.
Sample Input
2
5
Sample Output
2^? mod 2 = 1
2^4 mod 5 = 1
Many applications use connection/object pool. A program may require a IMAP connection pool and LDAP connection pool. One could easily implement a IMAP connection pool, then take the existing code and implement a LDAP connection pool. The program grows, and now there is a need for a pool of threads. So just take the IMAP connection pool and convert that to a pool of threads (Copy, paste, find, Replace????). Need to make some changes to the pool implementation? Not a very easy task, since the code has been duplicated in many places. Re-inventing source code is not an intelligent approach in an object oriented environment which encourages re-usability. It seems to make more sense to implement a pool that can contain any arbitrary type rather than duplicating code. How does one do that? The answer is to use type parameterization, more commonly referred to as templates.
The goal of this project is to explore the idea of point-based
radiosity, which is a shooting radiosity technique suggested by Mark
Harris at UNC. The primary idea is that features available in
graphics hardware can be utilized to perform radiosity calculations.
Facilities such as flat shading, diffuse lighting, projective
textures, and mipmapping can be used to Replace traditional numerical
solutions for radiosity.
The goal of this library is to make ODBC recordsets look just like an STL container. As a user, you can move through our containers using standard STL iterators and if you insert(), erase() or Replace() records in our containers changes can be automatically committed to the database for you. The library s compliance with the STL iterator and container standards means you can plug our abstractions into a wide variety of STL algorithms for data storage, searching and manipulation. In addition, the C++ reflection mechanism used by our library to bind to database tables allows us to add generic indexing and lookup properties to our containers with no special code required from the end-user. Because our code takes full advantage of the template mechanism, it adds minimal overhead compared with using raw ODBC calls to access a database.