VB 图书管理系统 毕业设计 外文翻译

时间:2019-05-14 03:27:07下载本文作者:会员上传
简介:写写帮文库小编为你整理了多篇相关的《VB 图书管理系统 毕业设计 外文翻译》,但愿对你工作学习有帮助,当然你在写写帮文库还可以找到更多《VB 图书管理系统 毕业设计 外文翻译》。

第一篇:VB 图书管理系统 毕业设计 外文翻译

学院毕业设计(论文)译文专用纸 第 1 页

现在送(毕业设计论文、文献综述、外文翻译、开题报告、答辩PPT)

都可以直接下载

源程序因为无法上传百度,需要者去空间留言

学院毕业设计(论文)译文专用纸 第 2 页

译文:

Visual Basic 语言与算法

1991年,美国微软公司推出了Visual Basic(可简称VB),目前的最新版本是VB 2008 Beta2(VB9)中文版。

Visual 意即可视的、可见的,指的是开发像windows操作系统的图形用户界面(Graphic User Interface,GUI)的方法,它不需要编写大量代码去描述界面元素的外观和位置,只要把预先建立好的对象拖放到屏幕上相应的位置即可。

Basic 实际上是一个短语的缩写,这个短语就是 Beginners all_purpose symbolic instruction code,其中文意思为“初始者通用符号指令代码语言”。Visual Basic有学习版、专业版和企业版三种版本,以满足不同的开发需要。学习版适用于普通学习者及大多数使用Visual Basic开发一般Windows应用程序的人员,但是;专业版适用于计算机专业开发人员,包括了学习版的全部内容功能以及Internet控件开发工具之类的高级特性;企业版除包含专业版全部的内容外,还有自动化构件管理器等工具,使得专业编程人员能够开发功能强大的组骨子里分布式应用程序。

Visual Basic

第1节Visual Basic的概述

Microsoft Visual Basic(简称VB)是在Windows操作平台下设计应用程序的最速度、最简捷的工具之一。不论是初学者还是专业开发人员,VB都为他们提供了一整套的工具,可以轻松方便的开发应用程序。因此,VB一直被作为大多数电脑初学者的首选入门编程语言。

“Visual”指的是采用可视化的开发图形用户界面(GUI)的方法,一般不需要编写大量代码去描述界面元素的外观和位置,而只要把需要的控件拖放到屏幕上的相应位置即可方便图形设计图形用户界面;“Basic”指的是 BASIC语言,因为VB是在原有的BAISC语言的基础上发展起来的。

VB是 Microsoft的一种通用程序设计语言,它包括在 Microsoft Excel、Microsoft Access等众多Windows应用软件中的VBA都使用VB语言,以供用户进行二次开发;目前制作网页使用较多的VBScript脚本语言也是VB的子集。

学院毕业设计(论文)译文专用纸 第 3 页

利用VB的数据访问特性用户可以对包括 Microsoft SQL Server和其他企业数据库在内的大部分数据库格式创建数据库和前端应用程序,以及可调整的服务端部件。利用ActiveX(TM)技术,VB可使用 Microsoft Word字处理器、Microsoft Excel电子数据表极其他Windows应用程序提供的功能,甚至可直接使用由VB专业版或企业版创建的应用程序和对象。

用户最终创建的程序是一个真正的.EXE文件,可以自由发布。

VB提供了学习版,专业版和企业版,用以满足不同的开发需求。学习版使编程人员很容易地开发Windows和Windows NT的应用程序。专业版为专业编程人员提供了功能完备的开发工具,专业版中包含了学习版的所有功能。企业版允许专业人员以小组的形式来创建强大的分布式应用程序。它包括专业版的所有的特性。所以可以根据不同的需要来选择不同的版本。

第2节集成开发环境

VB的集成环境或称IDE,由多个部分组成,包含了标题栏、菜单栏、工具栏、控件箱,以及窗体设计器窗口、工程管理器窗口、属性窗口、代码窗口和窗体布局窗体布局等。覆盖了开发应用程序的设计、编辑、编译和调试等所有功能。

在VB中,应用程序也称工程。当第一次启动VB并打开一个新工程时,可以看到如图所示的集成开发环境界面。

Visual Basic 集成开发环境

VB通过工程来组织应用程序的开发,使用工程来管理构成应用程序的所有文件。一个工程一般由若干个窗体、标准模块以及应用环境组成。系统通过工程菜单来对工程进行管理,如添加窗体、引用等。系统允许同时打开和管理多个工程。

第3节Visual Basic语言简介

Basic是最常被用来做入门使用的高级语言。它的全名是 Beginner’s All-purpose Sumbolic Instruction Code,简称为 BASIC。顾名思义,Basic就是一种专为初学者设计的语言,因其易学易懂,所以身受欢迎。早期的Basic语言都是属于解译式的,因此可以一行一行地执行,所以它可以立刻看到执行的结果,对初学者来说这是很方便的设计。不过它也因此没有结构化的概念,在程序的维护及管理上比起其他语言困难许多。不过在后期的Basic则改正了以上的缺点(如 学院毕业设计(论文)译文专用纸 第 4 页

Quick Basic),使得它也可以用来开发较大型的程序。

语言是构成VB程序的基本成分。VB规定了语句格式和功能。

语法:

语句定义符[语句体]

语句定义符用于规定语句的功能,语句体指定语句的具体内容或要执行的具体操作。所有语句的集合就是VB语言,用VB语句进行有机组合完成某个特定功能就是程序。界面+程序就能解决某个应用问题。

VB应用程序代码一般在“代码编辑器”窗口编写。“代码编辑器”像是一个高度专门化的字处理软件,有很多便于编写VB代码的功能,图所示为[例Ex-Hello]在“代码编辑器”窗口编写的代码。

“代码编辑器”窗口

第4节用Visual Basic开发应用程序

使用VB编程,一般先设计应用程序的外观,然后再分别编写各对象事件的程序代码或其他处理程序,编程的工作要轻松多。

创建应用程序的步骤如下:

1. 创建应用程序界面

界面是用户和程序交互的桥梁,用VB创建的标准的WINDOWS应用程序的界面一般由窗体和按钮、菜单、文本框的图象框等构成。根据程序的功能要求和用户与程序之间的信息交流的需要,来确定需要那些对象,规划界面的布局。

2. 设计界面上各个对象的属性

根据规划的界面要求设置各个对象的属性,比如对象的外貌、名称、颜色、大小等。

大多数属性取值既可以在设计时通过属性窗口来设置,也可以在程序代码中通过编程在程序运行时设置修改。

3. 编程对象响应的程序代码

界面仅仅决定了程序的外观,设计完界面后就要通过“代码编辑器” 窗口来添加代码,实现一些在接受外界信息后作出响应、信息处理等任务,添加代码,实现一些在接受外界信息后作出的响应、信息处理等任务,添加代码如图的代码编辑窗口所示

学院毕业设计(论文)译文专用纸 第 5 页

“代码编辑器”窗口

4. 保存工程

一个VB程序就是一个工程,在设计一个应用程序时,系统会建立一个扩展名为.vbp的工程文件,工程文件包含了该工程所建立的所有文件的相关信息,保存工程就同时保存了该工程的所有相关文件。比如当设计界面时产生的窗体保存在扩展名为.frm和.frx的窗体文件中。在打开一个工程(文件)时,该工程有关的所有文件同时被装载。

5. 行和调试程序

通过“运行”菜单中的选项来运行程序,当出现错误时,VB系统可以提供信息提示也可通过“调试”和“运行”菜单来查找和排除错误。

6.生成可执行程序

为了使程序可以脱离VB环境,通过“文件”菜单中的“生成工程1.exe”命令来生成可执行程序(.exe文件),此后即可直接执行该文件。在生成可+执行程序后,再通过安装向导将所有相关文件打包,就可以作为一个软件产品在windows 9x/2000 环境下安装后独立运行

VB的数据库编程方面按其难易程度可分为三类(由易到难);●使用数据库控制项和绑定控制项 ●使用数据库对象变量进行编程 ●直接调用ODBC2.0API 在使用VB进行数据库编程时,通常,会首先选择三种基本方法之一来进行数据库应用程序的方案设计, 现在就将以上三种设计方法的适应范围及其优缺点进行一个比较。使用数据库控制项和绑定控制项 1.1优点

它是三种方法中编码量最小的 不必了解CDBC2.0API的细节

允许使用标准的和第三方厂商制订的控制项 简化了错误处理

支持所有的动态集方法及属性

学院毕业设计(论文)译文专用纸 第 6 页

1.2缺点

不能存取快照对象(snapshop)对象或表格对象(都属于记录集对象)不能存取数据库集合,比如表定义(TableDefs)字段(Fieds),索引(Indexes)及查询定义(QueryDefs)只能存取部分ODBC2.0管理函数 不能进行真正的事务处理 有限的错误诊断功能 1.3应用

对中小规模的数据库表(通常少于一千条记录)只进行简章的浏览操作 基本SQL查询所对应的结果集长度有限(通常结果集的记录数小于一百, 这些记录从一个或两个长度有限的表中检索出来)应用程序的数据输入/输出项较少(通常只涉及一个或两个长度有限的表、并且表中的字段数在10个左右且不具有关系完整性限制 使用数据库对象变量进行编程 2.1 优点

可以在程序中存取ODBC2.0的管理函数

可以控制多种记录集类型:Dynaset、Snapshop及Table记录集合对象 可以存取存储过程和查询动作

可以存取数据库集合对象,例如TableDefs、Fields、Indexes及QueryDefs 具有真正的事务处理能力 , 包括启动事务(Begintrans)、提交事务(CommitTrans)及回滚事务(Rollback)2.2 缺点

比使用数据控制项的方法编码量较大 只能进行间接的错误处理和错误恢复 对每个数据库操作没有细粒度的控制

对结果集和包含结果集的内丰资源的操作受到限制 同直接使用ODBC2.0API函数的方法相比性能较低 2.3 应用

应用程序需要在执行期间动态地建立表、字段及索引.学院毕业设计(论文)译文专用纸 第 7 页

应用程序涉及同步更新几张表(但在逻辑上保持一致性)的复杂事务 应用程序使用结果集而不是Dynaset的窗体(FORMS),例如Snapshots或Tables,这里是设计要考虑的关键

应用程序的表非常大,多于1000条记录

应用程序具有复杂的数据输入/输出项,它涉及许多内部相关的字段并且包括数据库参照完整性或一致性规则

应用程序需要执行一些额外的操作和对结果集的查询后处理, 尤其是需要很高的数据格式化显示

应用程序需要利用复杂的ODBC管理功能以选择、配置、校验及建立各种数据源

应用程序需要在执行期间“显示”数据库的基本结构 应用程序需要使用复杂的多码索引方式来检索或更新记录 3 直接调用ODBC2.0API 3.1 优点

可以直接参与结果集的开发、管理及规范化

对结果集游标提供了更多的控制,并且提供了更多的游标类型和执行动作 能够确定ODBC驱动程序及SQL的一致性级别 可以更好地控制Windows的执行调度及资源利用

其他方面同其他方法差不多,因此这种方法很可能具有最好的性能 3.2 缺点

较其他两种方法需要大量的代码

代码复杂并且要求程序员具有编制API调用的经验

在网络上Visual Basic运行期间库的错误处理缺乏安全性,因此代码运行期间出现的错误所造成的后果会非常严重

3.3 应用

如果系统环境为客户机/服务器模式下的大规模多用户环境,那么应用程序必须都能够准确地解决可能出现的系统错误和失败

应用程序强调资源使用,这里如何对内存、网络服务器资源进行直接控制是首要的考虑因素

学院毕业设计(论文)译文专用纸 第 8 页

应用程序使用超大规模数据库,例如数据库表可能包含几万或几十万条记录 计算机系统中的任何软件,都是由大大小小的各种软件组成部分构成,各自按照特定的算法来实现,算法的好坏直接决定所实现软件性能的优劣。用什么方法来设计算法,所设计算法需要什么样的资源,需要多少运行时间、多少存储空间,如何判定一个算法的好坏,在实现一个软件时,都是必须予以解决的。计算机系统中的操作系统、语言编译系统、数据库管理系统以及各种各样的计算机应用系统中的软件,都必须用一个个具体的算法来实现。因此,算法设计与分析是计算机科学与技术的一个核心问题。

算法是解题的步骤,我们可以把算法定义成解一确定类问题的任意一种特殊的方法。在计算机科学中,算法要用计算机算法语言描述,算法代表用计算机解一类问题的精确、有效的方法。算法+数据结构=程序,求解一个给定的可计算或可解的问题,不同的人可以编写出不同的程序,来解决同一个问题,这里存在两个问题:一是与计算方法密切相关的算法问题;二是程序设计的技术问题。算法和程序之间存在密切的关系。算法是一组有穷的规则,它们规定了解决某一特定类型问题的一系列运算,是对解题方案的准确与完整的描述。制定一个算法,一般要经过设计、确认、分析、编码、测试、调试、计时等阶段。对算法的学习包括五个方面的内容:

① 设计算法。算法设计工作是不可能完全自动化的,应学习了解已经被实践证明是有用的一些基本的算法设计方法,这些基本的设计方法不仅适用于计算机科学,而且适用于电气工程、运筹学等领域。

② 表示算法。描述算法的方法有多种形式,例如自然语言和算法语言,各自有适用的环境和特点。

③确认算法。算法确认的目的是使人们确信这一算法能够正确无误地工作,即该算法具有可计算性。正确的算法用计算机算法语言描述,构成计算机程序,计算机程序在计算机上运行,得到算法运算的结果。

④ 分析算法。算法分析是对一个算法需要多少计算时间和存储空间作定量的分析。分析算法可以预测这一算法适合在什么样的环境中有效地运行,对解决同一问题的不同算法的有效性作出比较。

学院毕业设计(论文)译文专用纸 第 9 页

⑤ 验证算法。用计算机语言描述的算法是否可计算、有效合理,须对程序进行测试,测试程序的工作由调试和作时空分布图组成。

而算法具有一定的特性,它包括:

① 确定性。算法的每一种运算必须有确定的意义,该种运算应执行何种动作应无二义性,目的明确。

② 能行性。要求算法中有待实现的运算都是基本的,每种运算至少在原理上能由人用纸和笔在有限的时间内完成。

③ 输入。一个算法有0个或多个输入,在算法运算开始之前给出算法所需数据的初值,这些输入取自特定的对象集合。

④ 输出。作为算法运算的结果,一个算法产生一个或多个输出,输出是同输入有某种特定关系的量。

⑤ 有穷性。一个算法总是在执行了有穷步的运算后终止,即该算法是可达的。满足前四个特性的一组规则不能称为算法,只能称为计算过程,操作系统是计算过程的一个例子,操作系统用来管理计算机资源,控制作业的运行,没有作业运行时,计算过程并不停止,而是处于等待状态。

算法的复杂性是算法效率的度量,在评价算法性能时,复杂性是一个重要的依据。算法的复杂性的程度与运行该算法所需要的计算机资源的多少有关,所需要的资源越多,表明该算法的复杂性越高;所需要的资源越少,表明该算法的复杂性越低。计算机的资源,最重要的是运算所需的时间和存储程序和数据所需的空间资源,算法的复杂性有时间复杂性和空间复杂性之分。

算法在计算机上执行运算,需要一定的存储空间存放描述算法的程序和算法所需的数据,计算机完成运算任务需要一定的时间。根据不同的算法写出的程序放在计算机上运算时,所需要的时间和空间是不同的,算法的复杂性是对算法运算所需时间和空间的一种度量。不同的计算机其运算速度相差很大,在衡量一个算法的复杂性要注意到这一点。

对于任意给定的问题,设计出复杂性尽可能低的算法是在设计算法时考虑的一个重要目标。另外,当给定的问题已有多种算法时,选择其中复杂性最低者,是在选用算法时应遵循的一个重要准则。因此,算法的复杂性分析对算法的设计或选用有着重要的指导意义和实用价值。

学院毕业设计(论文)译文专用纸 第 10 页

原文: 出处:

Visual Basic language and arithmetic The United States launched the Microsoft Visual Basic(may be referred to VB), is the latest version of the current VB 2008 Beta2(VB9)Chinese version.Visual meaning the visual, visible, referring to the development of operating systems like windows graphical user interface(Graphic User Interface, GUI)method, it does not need to prepare a large number code to describe the appearance of the interface elements and location, as long as the pre-The establishment of good drag and drop objects on the screen corresponding to the location.Basic is actually an abbreviation of the phrase;this phrase is Beginners all-purpose symbolic instruction code, the Chinese meaning “to the initial directive GM symbol code language.”

Visual Basic learning, Professional Edition and Enterprise Edition versions to meet the different needs of the development.Study and apply to the ordinary version of the majority of learners and the use of Visual Basic development of the general staff of Windows applications, but;professional version for computer professional development of staff, including the study of functional version of the full content control and Internet development tools such as advanced features ,Enterprise contain not only all the professional version of the content, there are automated tools such as Component Manager, professional programmers to make the development of a powerful group essence of distributed applications.Visual Basic

Section 1 the summary of Visual Basic

Microsoft Visual Basic,(abbreviate VB)as tool the most of application program one of under Windows operating platform.No matter beginner or professional developer, VB has all offered a whole set of tools to them, Development application program that it can be relaxed and convenient.So VB as most computer first-selected the ABC of programming language of beginner.学院毕业设计(论文)译文专用纸 第 11 页

“ Visual” mean method to adopt visual user of development figure interface(GUI), need and write a large number of code go and describe interface appearance and position of element seldom, Tow and show controlling part that need corresponding position to get screen can help figure design interface, user of figure,;“ Basic” means BASIC language, because VB is developed on the basis of already existing BAISC language.VB is a kind of programming language in common use of Microsoft, It, including VBA of the numerous Windows application software use VB language in Microsoft Excel, Microsoft Accessed., For users to carry on the secondary development;Make web page use more VBScript script language sub collection of VB too at present.Utilize data of VB visit characteristic user can establish the data base to most data base forms including Microsoft SQL Server and other enterprises data base With the application program of front, and adjustable service end part.Utilize ActiveX(TM)technology, VB can use word processor, electronic data list he Windows function that application program offers extremely, Excel of Microsoft, Word of Microsoft, Even can use by VB specialty edition or enterprise application program and target that edition establish directly.The procedure that users established finally is a real.EXE file , can issue freely.VB offer study edition, the specialty edition and enterprise edition, use to satisfied with different development demands.Study edition make programming personnel develop Windows and Windows application program of NT very easily.The specialty edition has offered the developing instrument with complete function to programming personnel of the specialty, Include studying all functions of edition in the specialty edition.Enterprise edition allow the professional personnel to establish strong distributed application program in the form of group.It includes all characteristics of the specialty edition.So can choose different editions according to different needs.Section 2 integrated development environments

Integrated environment of VB call IDE, made up of a lot of parts , include title board, menu fence, tool fence, controlling part case, And window body window, 学院毕业设计(论文)译文专用纸 第 12 页

engineering management device window, attribute window, code window and window body overall arrangement window body overall arrangement, etc.of designing etc..Have covered all functions, such as design which develops the application program, editting, compiling and debugging, etc..In VB, the application program calls the project too.When start VB and open a new project for the first time, can see and pursue integrated development environment interface that show.Visual Basic Integrated development environment

VB come and organize development of application program through project, use project come and manage and form files of application program.One project uses the environment to make up by several window bodies, standard module generally.The system manages project through the project menu, for instance add the window body, quote.System allow turn on and manage a lot of projects besides.Section 3 Visual Basic language brief introductions

Basic use and do the elementary high-level language that used often most.Its full name is Beginner' s All-purpose Symbolic Instruction Code, abbreviate as BASIC.As its name suggests, Basic one specially for language that beginner design, because it easy to learn easy to know, So the body is popular.Early Basic language to belong to and solve translating type, so can carry out line by line , So it can see the result carried out at once , this is a very convenient design for beginner.But it have concept of structure either, one that is in procedure maintain and management have as much as other language problems.But back-end Basic correct shortcoming of the above(such as Quick Basic), make it may used for and develop the large-scaler procedure too.The language is the basic composition, which forms VB procedure.VB has stipulated the form of sentences and function.Grammar:

The sentence defines incantations [Sentence body]

Sentence define agree with and used in fixed function of sentence, sentence body appoint concrete content or want concrete operation that carry out of sentence.All set of sentence VB language, carry on with VB sentence organic association finish a 学院毕业设计(论文)译文专用纸 第 13 页

certain specific function the procedure.Interface + procedure can solve a certain application problem.VB application program code window write in“ code editing machine” generally.“ editing machine of code” is like the word processing software of a piece of height specialization, there are many easies function of writing VB code, Pursue to show [Example Ex-Hello ]In“ code editing machine” code that window written.“Editing machine of code” window

Section 4 develop the application program with Visual Basic

Use VB programming, design appearance of application program first generally, write every target procedure code or other treatment procedure of incident respectively, Work of programming should be light more.The procedure of establishing the application program is as follows: Establish application program interface

The interface is the mutual bridge of user and procedure, Generally formed of window body and vision frame of the button, menu, text frameset.with standard WINDOWS interface of application program that VB establish.Require according to function of procedure and user and need of information interchange of procedure, Come to confirm that need those targets , plan the overall arrangement of the interface.2.Design by each attributes of target in interface

Demand and set up each attribute of target such as appearance, name, size of targeted.according to interface of planning.Most attribute person who fetch can set up through the attribute window when design already, Too can set up revising when operating in procedure through programming in procedure code.Have the targets respond programming by procedure code

3.Respond procedure code of programming target

Interface determine appearance of procedure only, design window add codes through“ code editing machine” soon after the interface, Realize some make the tasks, such as responding, information processing,etc.after accepting external message, Add 学院毕业设计(论文)译文专用纸 第 14 页

code , realize some response, information processing that make after accepting external information task, As editor's window of code pursued shows add codes

“code editing machine” window

4.Keep project

One VB procedure one project, at the time of designing a application program, system will set up one be expanded and called.Project file of vbp, project file include all relevant information of file that project set up this, Keep project keep associated documents of project this at the same time.For example the window body produced when design interfaces is kept and being expanded and being called.Frm sum.In the window body of foxfire.At the time of opening a project(file), this project relevant files load at the same time.5.Operate and debugged by procedure

Operate the procedure thoroughpin operate“ selecting in the menu, when the mistake appears, VB system can offer information prompt can looked for and get rid of the mistake thoroughpin debug” within operate“ menus too.6.Can produce by executive program

For make procedure can break away from VB environment, order to become next life through” file“" producing project 1.exe” of menu but executive program(eyeful), Can carry out this file directly after this.In produce, + executive program, and then through install guide bale all associated documents, Can run independently after installation under the environment of windows 9 x/2000 as a software product.In computer system's any software, is by the every large or small each kind of software constituent constitution, defers to the specific algorithm to realize respectively, the algorithm quality direct decision realizes the software performance fit and unfit quality.Designs the algorithm with any method, what resources designs the algorithm to need, requires how many running time, how many storage space, how to determine an algorithm the quality, when realizes a software, is must give to solve.In computer system's operating system, the language compiling system, the database management system as well as in various computer application system's software, must use each one concrete algorithm to realize.Therefore, the algorithm design and 学院毕业设计(论文)译文专用纸 第 15 页

the analysis are the computer science and a technical core question.The algorithm is the problem-solving step, we may define the algorithm Cheng Jie a determination class question the random one special method.In the computer science, the algorithm needs to use the computer algorithmic language to describe, the algorithm represents with the computer solves a kind of question precisely, the effective method.The algorithm construction of data = procedure, solves one to assign may calculate or the solvable question, the different person may compile the different procedure, solves the identical problem, here has two problems: First, with computational method close related algorithm question;Second, programming technical question.Between the algorithm and the procedure has the close relationship.The algorithm is a group has the poor rule, they had stipulated solves some specific type question a series of operations, is to the problem solving plan accurate and the complete description.Formulates an algorithm, generally must pass through stages and so on design, confirmation, analysis, code, test, debugging, time.To algorithm study including five aspect contents: ① Design algorithm.The algorithm design work is impossible completely the automation, should study the understanding already by the practice to prove that was the useful some basic algorithm design method, these basic design method was not only suitable for the computer science, moreover was suitable for domains and so on electrical engineering, operations research;② Expresses the algorithm.The description algorithm's method has many kinds of forms, for example the natural language and the algorithmic language, have the suitable environment and the characteristic respectively;③Confirms the algorithm.The algorithm confirmed the goal is causes the people to believe firmly that this algorithm can work unmistakably correctly, namely this algorithm has the circularity.The correct algorithm describes with the computer algorithmic language, constitutes the computer program, the computer program moves on the computer, obtains the algorithm operation result;④ Parsing algorithm.The algorithmic analysis is requires how many computing time and the storage space to an algorithm makes the quota the analysis.The parsing 学院毕业设计(论文)译文专用纸 第 16 页

algorithm may forecast that what environment this algorithm does suit in moves effectively, to solves the identical question different algorithm validity to make the comparison;⑤ Confirmation algorithm.With machine language description algorithm whether can calculate effectively, reasonable, must carry on the test to the procedure, the test order work and makes the space and time distribution map by the debugging to be composed.But the algorithm has certain characteristic, it includes: ① Determinism.Algorithm each kind of operation must have the determination significance, this kind of operation should carry out what kind of movement should not to have the ambiguity, the goal is clear;② Effectiveness.Requests the operation which in the algorithm waits for realizing is basic, each kind of operation can at least completes in the principle by the human with the paper and the pen in the limited time;③ Input.An algorithm has 0 or the many inputs, before the algorithm operation starts gives the algorithm to need the data the starting value, these inputs are from the specific object set;④ Output.Does for the algorithm operation result, an algorithm has or many outputs, the output has some kind of specific relational quantity with the input;⑤ Has poor.An algorithm always after carrying out had the poor step operation has terminated, namely this algorithm was may reach.Satisfies a first four characteristic group of rule not to be able to be called the algorithm, can only be called the computational process, the operating system is a computational process example, the operating system uses for to manage the computer resources, controls the manufacture industry movement, when has not made industry the movement, the computational process does not stop, but is at the waiting status.The algorithm complexity is the algorithm efficiency measure, when appraises the algorithm performance, the complexity is an important basis.The algorithm complex degree with moves computer resources how many which this algorithm 学院毕业设计(论文)译文专用纸 第 17 页

needs related, needs the resources are more, indicated that this algorithm the complexity is higher;Needs the resources are less, indicated that this algorithm the complexity is lower.The spatial resources, which computer’s resources, operate most importantly, needs the time which and the stored routine and the data need, the algorithm complexity has division time complexity and the spatial complexity.The algorithm carries out the operation on the computer, needs the data which certain storage space depositing description algorithm the procedure and the algorithm need, the computer completes the operation task to require certain time.The procedure which writes according to the different algorithm places when on the computer operates, needs the time and the space are different, the algorithm complexity is needs the time and the spatial one kind of measure to the algorithm operation.The different computer its operating speed difference is very big, is weighing an algorithm the complexity to note this point.Regarding question, which assigns willfully, a profitable target which designs, the complex low algorithm is as far as possible when designs algorithm considered.Moreover, when the question, which assigns already when has many kinds of algorithms, an important criterion which choice complexity low, is when selects algorithm should follow.Therefore, the algorithm complex analysis or selects to the algorithm design has the important guiding sense and the use value.

第二篇:VB图书管理系统

图书管理系统的设计与实现

目录

一、序言······················································································································4

二、需求分析说明书 ····································································································4 2.1系统介绍..................................................................................................................................................4 2.2系统面向的用户群体..............................................................................................................................4 2.3系统的功能性需求..................................................................................................................................4 2.4系统的非功能性需求..............................................................................................................................5 2.4.1用户界面需求...................................................................................................................................5 2.4.2软硬件环境需求...............................................................................................................................5 2.4.3软件质量需求...................................................................................................................................5

三、可行性分析报告 ····································································································5 3.1技术可行性..............................................................................................................................................5 3.2人员可能性..............................................................................................................................................5 3.3时间、设备可能性..................................................................................................................................5 3.4系统工作量..............................................................................................................................................5 3.5代码工作量..............................................................................................................................................5 3.6文档要求..................................................................................................................................................5

四、开发环境与项目规划 ·····························································································5 4.1开发环境..................................................................................................................................................5 4.2项目规划与管理......................................................................................................................................5 4.2.1开发人员安排...................................................................................................................................5 4.2.2开发进度安排...................................................................................................................................6

五、软件界面设计标准与规范 ······················································································6 5.1编写目的..................................................................................................................................................6 5.2界面设计思想..........................................................................................................................................6 5.3界面设计原则..........................................................................................................................................6 5.4界面设计样式..........................................................................................................................................6 5.5常见提示信息样式..................................................................................................................................6 5.6常见错误信息样式..................................................................................................................................7 5.7其他界面约定..........................................................................................................................................7

六、软件编码设计标准与规范 ······················································································7 6.1对象命名约定..........................................................................................................................................7 6.2常量和变量命名约定..............................................................................................................................8 6.3结构化编码约定......................................................................................................................................8 6.4数据源的约定..........................................................................................................................................9 6.5数据库访问约定......................................................................................................................................9 6.6其他约定..................................................................................................................................................9

七、数据库分析与设计·································································································10 7.1数据库环境说明.......................................................................................................................................10 7.2数据库命名标准与规范...........................................................................................................................10 7.3数据库逻辑设计.......................................................................................................................................10 7.4数据库物理设计.......................................................................................................................................10 7.4.1表、视图汇总...................................................................................................................................10 7.4.2各表、视图设计详解.......................................................................................................................11

八、软件体系结构设计说明书 ······················································································15 8.1系统概述..................................................................................................................................................15 8.2设计约束..................................................................................................................................................15 8.3设计策略..................................................................................................................................................15 8.4系统概要设计说明书..............................................................................................................................16 8.4.1图例说明...........................................................................................................................................16 8.4.2系统总体结构图...............................................................................................................................16 8.5系统详细设计说明书..............................................................................................................................17 8.5.1系统模块汇总...................................................................................................................................17 8.5.2系统核心模块详解...........................................................................................................................18 8.5.3系统模块详解...................................................................................................................................28

九、用户界面设计报告·································································································42 9.1界面设计规范..........................................................................................................................................42 9.2系统窗体汇总..........................................................................................................................................42 9.3主界面设计..............................................................................................................................................43 9.4子界面设计..............................................................................................................................................43 9.5界面资源设计..........................................................................................................................................44

十、软件测试分析报告·································································································44 10.1测试范围与主要内容............................................................................................................................44 10.2测试方法................................................................................................................................................44 10.3测试报告................................................................................................................................................44 10.4改进建议与措施....................................................................................................................................45

十一、软件使用说明书·································································································45 11.1软件概述.................................................................................................................................................45 11.2使用说明.................................................................................................................................................45 11.2.1系统登陆..........................................................................................................................................45 11.2.2系统退出..........................................................................................................................................46 11.2.3图书类别管理..................................................................................................................................46 11.2.4图书信息管理..................................................................................................................................48 11.2.5查询图书信息..................................................................................................................................48 11.2.6读者类别管理..................................................................................................................................49 11.2.7读者信息管理..................................................................................................................................49 11.2.8查询读者信息..................................................................................................................................50 11.2.9借书管理..........................................................................................................................................50 11.2.10还书管理........................................................................................................................................50 参考资料······················································································································51

一、序言

图书管理系统的设计与推出是多方面原因促成的,比如学校的图书管理,日常管理工作 1 都是人工操作,历史数据很难保存和利用。而其他的小型图书馆大多如此。针对这种状况,我计划开发一个面向小型图书馆的图书管理系统,实现对人员、物流的全面管理,以帮助这些图书馆早日实现书店管理信息化。

为了系统的顺利开发和维护,特编制如下技术文档:

想要全部 请加QQ:76536415 专业设计 毕业论文

第三篇:毕业设计外文翻译

外文原文

Overview of JSp Technology

Benefits of JSp

JSp pages are translated into servlets.So, fundamentally, any task JSp pages can perform could also be accomplished by servlets.However, this underlying equivalence does not mean that servlets and JSp pages are equally appropriate in all scenarios.The issue is not the power of the technology, it is the convenience, productivity, and maintainability of one or the other.After all, anything you can do on a particular computer platform in the Java programming language you could also do in assembly language.But it still matters which you choose.JSp provides the following benefits over servlets alone:

•It is easier to write and maintain the HTML.Your static code is ordinary HTML: no extra backslashes, no double quotes, and no lurking Java syntax.•You can use standard Web-site development tools.Even HTML tools that know nothing about JSp can be used because they simply ignore the JSp tags.•You can divide up your development team.The Java programmers can work on the dynamic code.The Web developers can concentrate on the presentation layer.On large projects, this division is very important.Depending on the size of your team and the complexity of your project, you can enforce a weaker or stronger separation between the static HTML and the dynamic content.Now, this discussion is not to say that you should stop using servlets and use only JSp instead.By no means.Almost all projects will use both.For some requests in your project, you will use servlets.For others, you will use JSp.For still others, you will combine them with the MVC architecture.You want the appropriate tool for the job, and servlets, by themselves, do not complete your toolkit.Advantages of JSp Over Competing Technologies

A number of years ago, Marty was invited to attend a small 20-person industry roundtable discussion on software technology.Sitting in the seat next to Marty was James Gosling, inventor of the Java programming language.Sitting several seats away was a high-level manager from a very large software company in Redmond, Washington.During the discussion, the moderator brought up the subject of Jini, which at that time was a new Java technology.The moderator asked the manager what he thought of it, and the manager responded that it was too early to tell, but that it seemed to be an excellent idea.He went on to say that they would keep an eye on it, and if it seemed to be catching on, they would follow his company's usual “embrace and extend” strategy.At this point, Gosling lightheartedly interjected “You mean disgrace and distend.”

Now, the grievance that Gosling was airing was that he felt that this company would take technology from other companies and suborn it for their own purposes.But guess what? The shoe is on the other foot here.The Java community did not invent the idea of designing pages as a mixture of static HTML and dynamic code marked with special tags.For example, ColdFusion did it years earlier.Even ASp(a product from the very software company of the aforementioned manager)popularized this approach before JSp came along and decided to jump on the bandwagon.In fact, JSp not only adopted the general idea, it even used many of the same special tags as ASp did.So, the question becomes: why use JSp instead of one of these other technologies? Our first response is that we are not arguing that everyone should.Several of those other technologies are quite good and are reasonable options in some situations.In other situations, however, JSp is clearly better.Here are a few of the reasons.Versus.NET and Active Server pages(ASp)

.NET is well-designed technology from Microsoft.ASp.NET is the part that directly competes with servlets and JSp.The advantages of JSp are twofold.First, JSp is portable to multiple operating systems and Web servers;you aren't locked into deploying on Windows and IIS.Although the core.NET platform runs on a few non-Windows platforms, the ASp part does not.You cannot expect to deploy serious ASp.NET applications on multiple servers and operating systems.For some applications, this difference does not matter.For others, it matters greatly.Second, for some applications the choice of the underlying language matters greatly.For example, although.NET's C# language is very well designed and is similar to Java, fewer programmers are familiar with either the core C# syntax or the many auxiliary libraries.In addition, many developers still use the original version of ASp.With this version, JSp has a clear advantage for the dynamic code.With JSp, the dynamic part is written in Java, not VBScript or another ASp-specific language, so JSp is more powerful and better suited to complex applications that require reusable components.You could make the same argument when comparing JSp to the previous version of ColdFusion;with JSp you can use Java for the “real code” and are not tied to a particular server product.However, the current release of ColdFusion is within the context of a J2EE server, allowing developers to easily mix ColdFusion and servlet/JSp code.Versus pHp

pHp(a recursive acronym for “pHp: Hypertext preprocessor”)is a free, open-source, HTML-embedded scripting language that is somewhat similar to both ASp and JSp.One advantage of JSp is that the dynamic part is written in Java, which already has an extensive ApI for networking, database access, distributed objects, and the like, whereas pHp requires learning an entirely new, less widely used language.A second advantage is that JSp is much more widely supported by tool and server vendors than is pHp.Versus pure Servlets

JSp doesn't provide any capabilities that couldn't, in principle, be accomplished with servlets.In fact, JSp documents are automatically translated into servlets behind the scenes.But it is more convenient to write(and to modify!)regular HTML than to use a zillion println statements to generate the HTML.plus, by separating the presentation from the content, you can put different people on different tasks: your Web page design experts can build the HTML by using familiar tools and either leave places for your servlet programmers to insert the dynamic content or invoke the dynamic content indirectly by means of XML tags.Does this mean that you can just learn JSp and forget about servlets? Absolutely not!JSp developers need to know servlets for four reasons:

1.JSp pages get translated into servlets.You can't understand how JSp works without understanding servlets.2.JSp consists of static HTML, special-purpose JSp tags, and Java code.What kind of Java code? Servlet code!You can't write that code if you don't understand servlet programming.3.Some tasks are better accomplished by servlets than by JSp.JSp is good at generating pages that consist of large sections of fairly well structured HTML or other character data.Servlets are better for generating binary data, building pages with highly variable structure, and performing tasks(such as redirection)that involve little or no output.4.Some tasks are better accomplished by a combination of servlets and JSp than by either servlets or JSp alone.Versus JavaScript

JavaScript, which is completely distinct from the Java programming language, is normally used to dynamically generate HTML on the client, building parts of the Web page as the browser loads the document.This is a useful capability and does not normally overlap with the capabilities of JSp(which runs only on the server).JSp pages still include SCRIpT tags for JavaScript, just as normal HTML pages do.In fact, JSp can even be used to dynamically generate the JavaScript that will be sent to the client.So, JavaScript is not a competing technology;it is a complementary one.It is also possible to use JavaScript on the server, most notably on Sun ONE(formerly iplanet), IIS, and BroadVision servers.However, Java is more powerful, flexible, reliable, and portable.Versus WebMacro or Velocity

JSp is by no means perfect.Many people have pointed out features that could be improved.This is a good thing, and one of the advantages of JSp is that the specification is controlled by a community that draws from many different companies.So, the technology can incorporate improvements in successive releases.However, some groups have developed alternative Java-based technologies to try to address these deficiencies.This, in our judgment, is a mistake.Using a third-party tool like Apache Struts that augments JSp and servlet technology is a good idea when that tool adds sufficient benefit to compensate for the additional complexity.But using a nonstandard tool that tries to replace JSp is a bad idea.When choosing a technology, you need to weigh many factors: standardization, portability, integration, industry support, and technical features.The arguments for JSp alternatives have focused almost exclusively on the technical features part.But portability, standardization, and integration are also very important.For example, the servlet and JSp specifications define a standard directory structure for Web applications and provide standard files(.war files)for deploying Web applications.All JSp-compatible servers must support these standards.Filters can be set up to apply to any number of servlets or JSp pages, but not to nonstandard resources.The same goes for Web application security settings.Besides, the tremendous industry support for JSp and servlet technology results in improvements that mitigate many of the criticisms of JSp.For example, the JSp Standard Tag Library and the JSp 2.0 expression language address two of the most well-founded criticisms: the lack of good iteration constructs and the difficulty of accessing dynamic results without using either explicit Java code or verbose jsp:useBean elements.10.4 Misconceptions About JSp

Forgetting JSp Is Server-Side Technology

Here are some typical questions Marty has received(most of them repeatedly).•Our server is running JDK 1.4.So, how do I put a Swing component in a JSp page?

•How do I put an image into a JSp page? I do not know the proper Java I/O commands to read image files.•Since Tomcat does not support JavaScript, how do I make images that are highlighted when the user moves the mouse over them?

•Our clients use older browsers that do not understand JSp.What should we do?

•When our clients use “View Source” in a browser, how can I prevent them from seeing the JSp tags?

All of these questions are based upon the assumption that browsers know something about the server-side process.But they do not.Thus:

•For putting applets with Swing components into Web pages, what matters is the browser's Java version—the server's version is irrelevant.If the browser supports the Java 2 platform, you use the normal AppLET(or Java plug-in)tag and would do so even if you were using non-Java technology on the server.•You do not need Java I/O to read image files;you just put the image in the directory for Web resources(i.e., two levels up from WEB-INF/classes)and output a normal IMG tag.•You create images that change under the mouse by using client-side JavaScript, referenced with the SCRIpT tag;this does not change just because the server is using JSp.•Browsers do not “support” JSp at all—they merely see the output of the JSp page.So, make sure your JSp outputs HTML compatible with the browser, just as you would do with static HTML pages.•And, of course you need not do anything to prevent clients from seeing JSp tags;those tags are processed on the server and are not part of the output that is sent to the client.Confusing Translation Time with Request Time

A JSp page is converted into a servlet.The servlet is compiled, loaded into the server's memory, initialized, and executed.But which step happens when? To answer that question, remember two points:

•The JSp page is translated into a servlet and compiled only the first time it is accessed after having been modified.•Loading into memory, initialization, and execution follow the normal rules for servlets.Table 1 gives some common scenarios and tells whether or not each step occurs in that scenario.The most frequently misunderstood entries are highlighted.When referring to the table, note that servlets resulting from JSp pages use the _jspService method(called for both GET and pOST requests), not doGet or dopost.Also, for initialization, they use the jspInit method, not the init method.Table 1.JSp Operations in Various Scenarios

JSp page translated into servletServlet compiledServlet loaded into server's memoryjspInit called_jspService called

page first written

Request 1YesYesYesYesYes

Request 2NoNoNoNoYes

Server restarted

Request 3NoNoYesYesYes

Request 4NoNoNoNoYes

page modified

Request 5YesYesYesYesYes

Request 6NoNoNoNoYes

中文翻译

JSp技术概述

一、JSp的好处

JSp页面最终会转换成servler。因而,从根本上,JSp页面能够执行的任何任务都可以用servler来完成。然而,这种底层的等同性并不意味着servler和JSp页面对于所有的情况都等同适用。问题不在于技术的能力,而是二者在便利性、生产率和可维护性上的不同。毕竟,在特定平台上能够用Java编程语言完成的事情,同样可以用汇编语言来完成,但是选择哪种语言依旧十分重要。

和单独使用servler相比,JSp提供下述好处:

JSp中HTML的编写与维护更为简单。JSp中可以使用常规的HTML:没有额外的反斜杠,没有额外的双引号,也没有暗含的Java语法。

能够使用标准的网站开发工具。即使对那些对JSp一无所知的HTML工具,我们也可以使用,因为它们会忽略JSp标签(JSp tags)。

可以对开发团队进行划分。Java程序员可以致力于动态代码。Web开发人员可以将经理集中在表示层(presentation layer)上。对于大型的项目,这种划分极为重要。依据开发团队的大小,及项目的复杂程度,可以对静态HTML和动态内容进行弱分离(weaker separation)和强分离(stronger separation)。

在此,这个讨论并不是让您停止使用servlets,只使用JSp。几乎所有的项目都会同时用到这两种技术。针对项目中的某些请求,您可能会在MVC构架下组合使用这两项技术。我们总是希望用适当的工具完成相对应的工作,仅仅是servlet并不能填满您的工具箱。

二、JSp相对于竞争技术的优势

许多年前,Marty受到邀请,参加一个有关软件技术的小型(20个人)研讨会.做在Marty旁边的人是James Gosling---Java编程语言的发明者。隔几个位置,是来自华盛顿一家大型软件公司的高级经理。在讨论过程中,研讨会的主席提出了Jini的议题,这在当时是一项新的Java技术.主席向该经理询问他的想法.他继续说,他们会持续关注这项技术,如果这项技术变得流行起来,他们会遵循公司的“接受并扩充(embrace and extend)”的策略.此时, Gosling随意地插话说“你的意思其实就是不接受且不扩充(disgrace and distend)。”

在此, Gosling的抱怨显示出,他感到这个公司会从其他公司那里拿走技术,用于他们自己的目的.但你猜这次怎么样?这次鞋子穿在了另一只脚上。Java社团没有发明这一思想----将页面设计成由静态HTML和用特殊标签标记的动态代码混合组成.。ColdFusion多年前就已经这样做了。甚至ASp(来自于前述经理所在公司的一项产品)都在JSp出现之前推广了这种方式。实际上,JSp不只采用了这种通用概念,它甚至使用许多和ASp相同的特殊标签。

因此,问题变成:为什么使用JSp,而不使用其他技术呢?我们的第一反应是我们不是在争论所有的人应该做什么。其他这些技术中,有一些也很不错,在某些情况下也的确是合情合理的选择.然而,在其他情形中,JSp明显要更好一些。下面给出几个理由。

与.NET和Active Server pages(ASp)相比

.NET是Microsoft精心设计的一项技术。ASp.NET是与servlets和JSp直接竞争的技术。JSp的优势体现在两个方面。

首先,JSp可以移植到多种操作系统和Web服务器,您不必仅仅局限于部署在Windows 和IIS上尽管核心.NET平台可以在好几种非Windows平台上运行,但ASp这一部分不可以。您不能期望可以将重要的ASp.NET应用部署到多种服务器和操作系统。对于某些应用,这种差异没有什么影响。但有些应用,这种差异却非常重要。

其次,对于某些应用,底层语言的选择至关重要。例如,尽管.NET的C#语言设计优良,且和Java类似,但熟悉核心C#语法和众多工具库的程序员很少。此外,许多开发者依旧使用最初版本的ASp。相对于这个版本,JSp在动态代码方面拥有明显的优势。使用JSp,动态部分是用Java编写的,而非VBScript过其他ASp专有的语言,因此JSp更为强劲,更适合于要求组件重用的复杂应用。

当将JSp与之前版本的ColdFusion对比时,您可能会得到相同的结论。应用JSp,您可以使用Java编写“真正的代码”,不必依赖于特定的服务器产品。然而,当前版本的ColdFusion满足J2EE服务器的环境,允许开发者容易的混合使用ColdFusion和Servlet/JSp代码。

与pHp相比

pHp(“pHp:Hypertext preprocessor”的递归字母缩写词)是免费的、开放源代码的、HTML嵌入其中的脚本语言,与ASp和JSp都有某种程度的类似。JSp的一项优势是动态部分用Java编写,而Java已经在联网、数据库访问、分布式对象等方面拥有广泛的ApI,而pHp需要学习全新的、应用相对广泛的语言。JSp的第二项优势是,和pHp相比,JSp拥有极为广泛的工具和服务器提供商的支持。

与纯Servlet相比

原则上,JSp并没有提供Servlet不能完成的功能。实际上,JSp文档在后台被自动转换成Servlet。但是编写(和修改)常规的HTML,要比无数println语句生成HTML要方便得多。另外,通过将表示与内容分离,可以为不同的人分配不同的任务:网页设计人员使用熟悉的工具构建HTML,要么为Servlet程序员留出空间插入动态内容,要么通过XML标签间接调用动态内容。

这是否表示您只可以学习JSp,将Servlet丢到一边呢?当然不是!由于以下4种原因,JSp开发人员需要了解Servlet:

(1)JSp页面会转换成Servlet。不了解Servlet就无法知道JSp如何工作。

(2)JSp由静态HTML、专用的JSp标签和Java代码组成。哪种类型的Java代码呢?当然是Servlet代码!如果不了解Servlet编程,那么就无法编写这种代码。

(3)一些任务用Servlet完成比用JSp来完成要好。JSp擅长生成由大量组织有序的结构化HTML或其他字符数据组成的页面。Servlet擅长生成二进制数据,构建结构多样的页面,以及执行输出很少或者没有输出的任务(比如重定向)。

(4)有些任务更适合于组合使用Servlet和JSp来完成,而非单独使用Servlet或JSp。

与JavaScript相比

JavaScript和Java编程语言完全是两码事,前者一般用于在客户端动态生成HTML,在浏览器载入文档时构建网页的部分内容。这是一项有用的功能,一般与JSp的功能(只在服务器端运行)并不发生重叠。和常规HTML页面一样,JSp页面依旧可以包括用于JavaScript的SCRIpT标签。实际上,JSp甚至能够用来动态生成发送到客户端的JavaScript。因此,JavaScript不是一项竞争技术,它是一项补充技术。

JavaScript也可以用在服务器端,最因人注意的是SUN ONE(以前的iplanet)、IIS和BroadVision服务器。然而,Java更为强大灵活、可靠且可移植。

与WebMacro和Velocity相比

JSp决非完美。许多人都曾指出过JSp中能够改进的功能。这是一件好事,JSp的优势之一是该规范由许多不同公司组成的社团控制。因此,在后续版本中,这项技术能够得到协调的改进。

但是,一些组织已经开发出了基于Java的替代技术,试图弥补这些不足。据我们的判断,这样做是错误的。使用扩充JSp和Servlet技术的第三方工具,如Apache Structs,是一种很好的思路,只要该工具带来的好处能够补偿工具带来的额外复杂性。但是,试图使用非标准的工具代替JSp则不理想。在选择一项技术时,需要权衡许多方面的因素:标准化、可移植性、集成性、行业支持和技术特性。对于JSp替代技术的争论几乎只是集中在技术特性上,而可移植性、标准化和集成性也十分重要。例如,Servlet和JSp规范为Web应用定义了一个标准的目录结构,并提供用于部署Web应用的标准文件(.war文件)。所有JSp兼容的服务器必须支持这些标准。我们可以建立过滤器作用到任意树木的Servlet和JSp页面上,但不能用于非标准资源。Web应用安全设置也同样如此。

此外,业界对JSp和Servlet技术的巨大支持使得这两项技术都有了巨大的进步,从而减轻了对JSp的许多批评。例如,JSp标准标签库和JSp 2.0表达式语言解决了两种最广泛的批评:缺乏良好的迭代结构;不使用显式的Java代码或冗长的jsp:useBean元素难以访问动态结果。

三、对JSp的误解

忘记JSp技术是服务器端技术

下面是Marty收到的一些典型问题(大部分问题不止一次的出现)。

我们的服务器正在运行JDK1.4。我如何将Swing组件用到JSp页面中呢?

我如何将图像放到JSp页面中?我不知道读取图像文件应该使用哪些Java I/O命令。

Tomcat不支持JavaScript,当用户在图像上移动鼠标时,我如何使图像突出显示呢?

我们的客户使用不理解JSp的旧浏览器。我应该怎么做?

当我们的客户在浏览器中使用“View Source”(查看源代码)时,如何阻止他们看到JSp标签?

所有这些问题都基于浏览器对服务器端的过程在有所了解的假定之上。但事实上浏览器并不了解服务器端的过程。因此:

如果要将使用Swing组件的applet放到网页中,重要的是浏览器的Java版本,和服务器的Java版本无关。如果浏览器支持Java 2平台,您可以使用正常的AppLET(或Java插件)标签,即使在服务器上使用了非Java技术也须如此。

您不需要Java I/O来读取图像文件,您只需将图像放在存储Web资源的目录中(即WEB-INF/classes向上两级的目录),并输出一个正常的IMG标签。

您应该用SCRIpT标签,使用客户端JavaScript创建在鼠标下会更改的图像,这不会由于服务器使用JSp而改变。

浏览器根本不“支持”JSp----它们看到的只是JSp页面的输出。因此,如同对待静态HTML页面一样,只需确保JSp输出的HTML与浏览器兼容。

当然,您不需要采取什么措施来阻止客户看到JSp标签,这些标签在服务器上进行处理,发送给客户的输出中并不出现。

混淆转换期间和请求期间

JSp页面需要转换成servlet。Servlet在编译后,载入到服务器的内容中,初始化并执行。但是每一步发生在什么时候呢?要回答这个问题,要记住以下两点:

JSp页面仅在修改后第一次被访问时,才会被转换成servlet并进行编译;

载入到内存中、初始化和执行遵循servlet的一般规则。

表1列出一些常见的情形,讲述在该种情况下每一步是否发生。最常被误解的项已经突出标示出来。在参考该表时,要注意,由JSp页面生成的servlet使用_jspService方法(GET和pOST请求都调用该函数),不是doGet或dopost方法。同样,对于初始化,它们使用jspInit方法,而非init方法。

表1 各种情况下的JSp操作

将JSp 页面转换成servlet编译Servlet 将Servlet 载入到服务器内存中调用jspInit 调用_jspService

页面初次创建

请求 1有有有有有

请求 2无无无无有

服务器重启后

请求3无无有有有

请求 4无无无无有

页面修改后

请求 5有有有有有

请求 6无无无无有

第四篇:vb图书管理系统源代码

Borbook:

Public sqltxt As String Public rno As String

'保存读者借书证号 Public bno As String

'保存读者图书编号 Public xm As String

'保存读者姓名 Public dw As String

'保存读者单位 Public rs As ADODB.Recordset

Private Sub Comm1_Click()

rno = Trim(Text1(0).Text)

If rno = “" Then

MsgBox ”借书证号不能为空,请输入“, vbOKOnly, ”信息提示“

Comm2.Enabled = False

Else

sqltxt = ”select * from reader where 借书证号='“ + rno + ”'“

Set rs = exesql(sqltxt)

If rs.RecordCount = 0 Then

MsgBox ”该读者未登记,不能借书“, vbOKOnly, ”信息提示“

Comm2.Enabled = False

Else

Text2(0).Text = rs.Fields(”姓名“)

Text2(1).Text = str(rs.Fields(”借书总数“))

Text2(2).Text = str(rs.Fields(”借书总数“)rs.Fields(”已借书数“))

End If

End If

End If End Sub

Private Sub retCom_Click()

Unload Me End Sub

Private Sub Form_Load()

Comm2.Enabled = False End Sub

Edbook:

Private Sub DataGrid1_Click()

End Sub

Private Sub Form_Load()

'说明:为什么使用recs,而不直接使用adodc1.recordset.recordcount?在调用edbook1窗体添加一个记录(确定)后,再

'返回到本表单,若不在Form_Activate()事件过程中调用adodc1.refresh进行刷新,adodc1.recordset.recordcount值

'仍未增1,这样调用encomm过程时出错;若在Form_Activate()事件过程中调用adodc1.refresh进行刷新,'adodc1.recordset.recordcount值增1了,调用encomm过程时也正确,但返回本窗体时,当前行总是第一行,显然也不行,'因为用户在添加或修改后希望在datagrid1中显示当前操作的那条记录.recs = Adodc1.Recordset.RecordCount End Sub

Private Sub Form_Activate()

DataGrid1.SetFocus

Call encomm End Sub

Private Sub Comm1_Click()

flag = 1

edbook1.Show vbModal End Sub

Private Sub Comm2_Click()

flag = 2

edbook1.Show vbModal End Sub

Private Sub Comm3_Click()

If MsgBox(”真的要删除[“ + Trim(Adodc1.Recordset.Fields(”书名“))+ ”]吗?“, vbYesNo, ”信息提示“)= vbYes Then

Adodc1.Recordset.Delete

recs = recs1

Call encomm

End If End Sub

Private Sub Comm4_Click()

Unload Me End Sub

Private Sub encomm()

If recs = 0 Then

Comm2.Enabled = False

Comm3.Enabled = False

Else

Comm2.Enabled = True

Comm3.Enabled = True

End If End Sub

Edlev1:

Dim cond As String

Private Sub Form_Load()

If flag = 2 Then

Text1(0).Text = edlev.Adodc1.Recordset.Fields(”级别“)

Text1(1).Text = edlev.Adodc1.Recordset.Fields(”过期罚款“)

Text1(2).Text = edlev.Adodc1.Recordset.Fields(”借书总数“)

Text1(3).Text = edlev.Adodc1.Recordset.Fields(”借书天数“)

End If End Sub

Private Sub Comm1_Click()

If Trim(Text1(0).Text)= ”“ Or Trim(Text1(1).Text)= ”“ Or Trim(Text1(2).Text)= ”“ Or _

Trim(Text1(3).Text)= ”“ Then

MsgBox ”数据项不全,请重新设置“, vbOKOnly, ”信息提示“

Text1(0).SetFocus

Exit Sub

End If

If flag = 1 Then '添加操作

If edlev.Adodc1.Recordset.RecordCount > 0 Then '原记录个数大于0

cond = ”级别='“ + Trim(Text1(0).Text)+ ”'“

edlev.Adodc1.Recordset.MoveFirst

'每次从头开始查找

edlev.Adodc1.Recordset.Find(cond)

If Not edlev.Adodc1.Recordset.EOF()Then

MsgBox ”存在完全相同的记录“, vbOKOnly, ”信息提示“

Text1(0).SetFocus

Exit Sub

End If

End If

edlev.Adodc1.Recordset.AddNew

edlev.Adodc1.Recordset.Fields(”级别“)= Trim(Text1(0).Text)

edlev.Adodc1.Recordset.Fields(”过期罚款“)= Val(Trim(Text1(1).Text))

edlev.Adodc1.Recordset.Fields(”借书总数“)= Val(Trim(Text1(2).Text))

edlev.Adodc1.Recordset.Fields(”借书天数“)= Val(Trim(Text1(3).Text))

edlev.Adodc1.Recordset.Update

recs = recs + 1

Else

'修改操作

n = edlev.Adodc1.Recordset.AbsolutePosition

cond = ”级别='“ + Trim(Text1(0).Text)+ ”'“

edlev.Adodc1.Recordset.MoveFirst '每次从头开始查找

edlev.Adodc1.Recordset.Find(cond)

If Not edlev.Adodc1.Recordset.EOF()And edlev.Adodc1.Recordset.AbsolutePosition <> n Then

MsgBox ”存在完全相同的记录“, vbOKOnly, ”信息提示“

edlev.Adodc1.Recordset.MoveFirst

'这两个语句恢复原记录位置

edlev.Adodc1.Recordset.Move(n1)

edlev.Adodc1.Recordset.Fields(”级别“)= Trim(Text1(0).Text)

edlev.Adodc1.Recordset.Fields(”过期罚款“)= Val(Trim(Text1(1).Text))

edlev.Adodc1.Recordset.Fields(”借书总数“)= Val(Trim(Text1(2).Text))

edlev.Adodc1.Recordset.Fields(”借书天数“)= Val(Trim(Text1(3).Text))

edlev.Adodc1.Recordset.Update

End If

Unload Me End Sub

Private Sub Comm2_Click()

Unload Me End Sub

Edreader:

Private Sub DataGrid1_Click()

End Sub

Private Sub Form_Load()

recs = Adodc1.Recordset.RecordCount End Sub

Private Sub Form_Activate()

DataGrid1.SetFocus

Call encomm End Sub

Private Sub Comm1_Click()

flag = 1

edreader1.Show vbModal End Sub

Private Sub Comm2_Click()

flag = 2

edreader1.Show vbModal End Sub

Private Sub Comm3_Click()

If MsgBox(”真的要删除[“ + Trim(Adodc1.Recordset.Fields(”姓名“))+ ”]吗?“, vbYesNo, ”信息提示“)= vbYes Then

Adodc1.Recordset.Delete

recs = recs1

Call encomm

End If End Sub Private Sub Comm4_Click()

Adodc1.Recordset.UpdateBatch

Adodc1.Recordset.Close

Unload Me End Sub Private Sub encomm()

If recs = 0 Then

Comm2.Enabled = False

Comm3.Enabled = False

Else

Comm2.Enabled = True

Comm3.Enabled = True

End If End Sub

Edrec1:

Dim cond As String

Private Sub Form_Load()

Label1.Caption = cap

If flag = 1 Then

Text1.Text = ”“

Else

Text1.Text = edrec.Adodc1.Recordset.Fields(”fn“)

End If End Sub

Private Sub Comm1_Click()

If Trim(Text1.Text)= ”“ Then

MsgBox ”数据项不能为空,请重新设置“, vbOKOnly, ”信息提示“

Text1.SetFocus

Exit Sub

End If

If flag = 1 Then '添加操作

If edrec.Adodc1.Recordset.RecordCount > 0 Then '原记录个数大于0

cond = ”fn='“ + Trim(Text1.Text)+ ”'“

edrec.Adodc1.Recordset.MoveFirst

'每次从头开始查找

edrec.Adodc1.Recordset.Find(cond)

If Not edrec.Adodc1.Recordset.EOF()Then

MsgBox ”存在完全相同的记录“, vbOKOnly, ”信息提示“

Text1.SetFocus

Exit Sub

End If

End If

edrec.Adodc1.Recordset.AddNew

edrec.Adodc1.Recordset.Fields(”fn“)= Trim(Text1.Text)

edrec.Adodc1.Recordset.Update

recs = recs + 1

Else

'修改操作

n = edrec.Adodc1.Recordset.AbsolutePosition

cond = ”fn='“ + Trim(Text1.Text)+ ”'“

edrec.Adodc1.Recordset.MoveFirst '每次从头开始查找

edrec.Adodc1.Recordset.Find(cond)

If Not edrec.Adodc1.Recordset.EOF()And edrec.Adodc1.Recordset.AbsolutePosition <> n Then

MsgBox ”存在完全相同的记录“, vbOKOnly, ”信息提示“

edrec.Adodc1.Recordset.MoveFirst

'这两个语句恢复原记录位置

edrec.Adodc1.Recordset.Move(n1)

edrec.Adodc1.Recordset.Fields(”fn“)= Trim(Text1.Text)

edrec.Adodc1.Recordset.Update

End If

Unload Me End Sub

Private Sub Comm2_Click()

Unload Me End Sub

Menu:

Private Sub MDIForm_Load()

If Not userlevel = ”系统管理员“ Then

menu21.Enabled = False

menu31.Enabled = False

menu41.Enabled = False

menu42.Enabled = False

End If End Sub

Private Sub menu11_Click()

borbook.Show vbModal End Sub

Private Sub menu12_Click()

retbook.Show vbModal End Sub

Private Sub menu13_Click()

End End Sub

Private Sub menu21_Click()

edbook.Show vbModal End Sub

Private Sub menu22_Click()

qubook.Show vbModal End Sub

Private Sub menu31_Click()

edreader.Show vbModal End Sub

Private Sub menu32_Click()

qureader.Show vbModal End Sub

Private Sub menu41_Click()

setuser.Show vbModal End Sub

Private Sub menu42_Click()

If MsgBox(”本功能要清除系统中所有数据,真的初始化吗?“, vbYesNo, ”确认初始化操作“)

= vbYes Then

Call deldata(”book“)Call deldata(”reader“)Call deldata(”borrow“)Call deldata(”rlevel“)

Call deldata(”depart“)

Call deldata(”press“)

Call deldata(”oper“)

MsgBox ”系统初始化完毕,下次只能以1234/1234(用户名/口令)进入本系统“, vbOKOnly, ”信息提示“

End If End Sub

Pass:

Public n As Integer

Private Sub Command1_Click()

Dim mrc As ADODB.Recordset

txtsql = ”select * from oper where 用户名='“ & _

Trim$(Text1(0).Text)& ”'“ & ” And 口令 = '“ & Trim$(Text1(1).Text)+ ”'“

Set mrc = exesql(txtsql)

If mrc.RecordCount = 0 Then '未找到用户记录

n = n + 1

If n < 3 Then

MsgBox ”没有这个用户,继续登录“, vbOKOnly + vbExclamation, ”信息提示“

Text1(0).Text = ”“

Text1(1).Text = ”“

Text1(0).SetFocus

Else

MsgBox ”已登录失败三次,退出系统“, vbOKOnly + vbExclamation, ”信息提示“

mrc.Close

Unload Me

End If

Else

'找到合法用户记录

userlevel = Trim(mrc.Fields(”级别“))

mrc.Close

Unload Me

menu.Show '调用menu窗体

End If End Sub

Private Sub Command2_Click()

Unload Me End Sub

Private Sub Form_Load()

n = 0

'n保存登录的次数 End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

Call endata(KeyAscii)End Sub

Qubook:

Private Sub Comm1_Click()

Dim sqltxt As String

If Adodc1.Recordset.Fields(”借否“)= ”借“ Then

no = Trim(Adodc1.Recordset.Fields(”图书编号“))

sqltxt = ”select * from borrow where 图书编号='“ + no + ”'“

Set rs = exesql(sqltxt)

If rs.RecordCount = 0 Then

MsgBox ”该图书没有借书记录“, vbOKOnly, ”信息提示“

Else

MsgBox ”图书编号:“ + no + Chr(10)+ Chr(13)+ _

”书

名:“ + Trim(rs.Fields(”书名“))+ Chr(10)+ Chr(13)+ _

”借 书 人:“ + Trim(rs.Fields(”姓名“))+ Chr(10)+ Chr(13)+ _

”单

位:“ + Trim(rs.Fields(”单位“))+ Chr(10)+ Chr(13)+ _

”借书日期:“ + Format(rs.Fields(”借书日期“), ”yyyy.mm.dd“), vbOKOnly, ”查找结果“

End If

rs.Close

Else

MsgBox ”该书没有外借,不能显示借书人“, vbOKOnly, ”信息提示“

End If End Sub

Private Sub Comm2_Click()

Unload Me End Sub

Private Sub Form_Activate()

Adodc1.Refresh

DataGrid1.Refresh

DataGrid1.SetFocus

Call encomm End Sub

Private Sub selcmd1_Click()'设置条件确定

Dim str As String

str = ”“

'条件表达式

If Trim(Text1(0).Text)<> ”“ Then

If str = ”“ Then

str = ”图书编号='“ + Trim(Text1(0).Text)+ ”'“

Else

str = str + ” and 图书编号='“ + Trim(Text1(0).Text)+ ”'“

End If

End If

If Trim(Text1(1).Text)<> ”“ Then

If str = ”“ Then

str = ”书名='“ + Trim(Text1(1).Text)+ ”'“

Else

str = str + ” and 书名='“ + Trim(Text1(1).Text)+ ”'“

End If

End If

If Trim(Text1(2).Text)<> ”“ Then

If str = ”“ Then

str = ”作者='“ + Trim(Text1(2).Text)+ ”'“

Else

str = str + ” and 作者='“ + Trim(Text1(2).Text)+ ”'“

End If

End If

If Trim(Text1(3).Text)<> ”“ Then

If str = ”“ Then

str = ”出版社='“ + Trim(Text1(3).Text)+ ”'“

Else

str = str + ” and 出版社='“ + Trim(Text1(3).Text)+ ”'“

End If

End If

If Trim(Text1(4).Text)<> ”“ Then

If str = ”“ Then

str = ”借否='“ + Trim(Text1(4).Text)+ ”'“

Else

str = str + ” and 借否='“ + Trim(Text1(4).Text)+ ”'“

End If

End If

If Trim(Text1(5).Text)<> ”“ Then

If str = ”“ Then

str = ”定价=“ + Trim(Text1(5).Text)

Else

str = str + ” and 定价=“ + Trim(Text1(5).Text)

End If

End If

If str <> ”“ Then

Adodc1.RecordSource = ”select * from book where “ + str

Adodc1.Refresh

Else

Adodc1.RecordSource = ”select * from book“

Adodc1.Refresh

End If

If Adodc1.Recordset.RecordCount = 0 Then

MsgBox ”没有任何满足条件的记录“, vbOKOnly, ”信息提示“

End If

Call encomm End Sub

Private Sub selcmd2_Click()'设置条件重置

Text1(0).Text = ”“

Text1(1).Text = ”“

Text1(2).Text = ”“

Text1(3).Text = ”“

Text1(4).Text = ”“

Text1(5).Text = ”“ End Sub

Private Sub encomm()'自定义子过程:判断Adodc1中是否存在记录

If Adodc1.Recordset.RecordCount = 0 Then

Comm1.Enabled = False

Else

Comm1.Enabled = True

End If End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

Call endata(KeyAscii)End Sub

Qureader:

Private Sub Comm1_Click()

Dim strn As String

Dim sqltxt As String

no = Trim(Adodc1.Recordset.Fields(”借书证号“))

sqltxt = ”select * from borrow where 借书证号='“ + no + ”'“

Set rs = exesql(sqltxt)

If rs.RecordCount = 0 Then

MsgBox ”该读者没有借任何图书“, vbOKOnly, ”信息提示“

Else

rs.MoveFirst

strn = ”书

名(借书日期)“ + Chr(10)+ Chr(13)

Do While Not rs.EOF()

strn = strn & Trim(rs.Fields(”书名“))& ”(“ & Format(rs.Fields(”借书日期“), ”yyyy.mm.dd“)& ”)“ + Chr(10)+ Chr(13)

rs.MoveNext

Loop

MsgBox strn, vbOKOnly, ”列所借图书清单“

rs.Close

End If End Sub

Private Sub Comm2_Click()

Unload Me End Sub

Private Sub Form_Activate()

Adodc1.Refresh

DataGrid1.Refresh

DataGrid1.SetFocus

Call encomm End Sub

Private Sub selcmd1_Click()'设置条件确定

Dim str As String

str = ”“

'条件表达式

If Trim(Text1(0).Text)<> ”“ Then

If str = ”“ Then

str = ”借书证号='“ + Trim(Text1(0).Text)+ ”'“

Else

str = str + ” and 借书证号='“ + Trim(Text1(0).Text)+ ”'“

End If

End If

If Trim(Text1(1).Text)<> ”“ Then

If str = ”“ Then

str = ”姓名='“ + Trim(Text1(1).Text)+ ”'“

Else

str = str + ” and 姓名='“ + Trim(Text1(1).Text)+ ”'“

End If

End If

If Trim(Text1(2).Text)<> ”“ Then

If str = ”“ Then

str = ”单位='“ + Trim(Text1(2).Text)+ ”'“

Else

str = str + ” and 单位='“ + Trim(Text1(2).Text)+ ”'“

End If

End If

If Trim(Text1(3).Text)<> ”“ Then

If str = ”“ Then

str = ”级别='“ + Trim(Text1(3).Text)+ ”'“

Else

str = str + ” and 级别='“ + Trim(Text1(3).Text)+ ”'“

End If

End If

If Trim(Text1(4).Text)<> ”“ Then

If str = ”“ Then

str = ”性别='“ + Trim(Text1(4).Text)+ ”'“

Else

str = str + ” and 性别='“ + Trim(Text1(4).Text)+ ”'“

End If

End If

If str <> ”“ Then

Adodc1.RecordSource = ”select * from reader where “ + str

Adodc1.Refresh

Else

Adodc1.RecordSource = ”select * from reader“

Adodc1.Refresh

End If

If Adodc1.Recordset.RecordCount = 0 Then

MsgBox ”没有任何满足条件的记录“, vbOKOnly, ”信息提示“

End If

Call encomm End Sub

Private Sub selcmd2_Click()'设置条件重置

Text1(0).Text = ”“

Text1(1).Text = ”“

Text1(2).Text = ”“

Text1(3).Text = ”“

Text1(4).Text = ”“ End Sub

Private Sub encomm()'自定义子过程:判断Adodc1中是否存在记录

If Adodc1.Recordset.RecordCount = 0 Then

Comm1.Enabled = False

Else

Comm1.Enabled = True

End If End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

Call endata(KeyAscii)End Sub

Retbook:

Public rno As String Public bno As String

Private Sub Comm1_Click()

bno = Trim(Text1.Text)

If bno <> ”“ Then

Dim sqltxt As String

sqltxt = ”select * from borrow where 图书编号='“ + bno + ”'“

Set brs = exesql(sqltxt)

If brs.RecordCount = 0 Then

MsgBox ”该书不是从本图书馆所借的,不能归还!“, vbOKOnly, ”信息提示“

Else

If Trim(brs.Fields(”借书证号“))<> rno Then

If rno <> ”“ Then

'另一读者还书,自动列出上一个还书人的罚款单

dstr = ”罚款单“ + Chr(10)+ Chr(13)

dstr = dstr & ”姓名:“ & Trim(Text2(1).Text)+ ”(“ + rno + ”)罚款总额:“ & str(Text2(4).Text)& ”元“

MsgBox dstr, vbOKOnly, ”列罚款单“

End If

rno = Trim(brs.Fields(”借书证号“))

sqltxt = ”select * from book where 图书编号='“ + bno + ”'“ '处理图书记录

Set bs = exesql(sqltxt)

bs.Fields(”借否“)= ”否“

bs.Update

sqltxt = ”select * from reader where 借书证号='“ + rno + ”'“ '处理读者记录

Set rs = exesql(sqltxt)

rs.Fields(”已借书数“)= rs.Fields(”已借书数“)rs.Fields(”已借书数“)

If(Datebrs.Fields(”借书日期“)1

rs.Update

If(Datebrs.Fields(”借书日期“)1

Call encomm

End If End Sub

Private Sub Comm4_Click()

Unload Me End Sub

Private Sub encomm()

If recs = 0 Then

Comm2.Enabled = False

Comm3.Enabled = False

Else

Comm2.Enabled = True

Comm3.Enabled = True

End If End Sub

Setuser1:

Dim cond As String

Private Sub Form_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

SendKeys ”{TAB}“

End If End Sub

Private Sub Form_Load()

If flag = 2 Then

Text1(0).Text = setuser.Adodc1.Recordset.Fields(”用户名“)

Text1(1).Text = setuser.Adodc1.Recordset.Fields(”口令“)

Combo1.Text = setuser.Adodc1.Recordset.Fields(”级别“)

End If End Sub

Private Sub Comm1_Click()

If Trim(Text1(0).Text)= ”“ Or Trim(Text1(1).Text)= ”“ Or Trim(Combo1.Text)= ”“ Then

MsgBox ”数据项不全,请重新设置“, vbOKOnly, ”信息提示“

Text1(0).SetFocus

Exit Sub

End If

If flag = 1 Then '添加操作

If setuser.Adodc1.Recordset.RecordCount > 0 Then '原记录个数大于0

cond = ”级别='“ + Trim(Text1(0).Text)+ ”'“

setuser.Adodc1.Recordset.MoveFirst

'每次从头开始查找

setuser.Adodc1.Recordset.Find(cond)

If Not setuser.Adodc1.Recordset.EOF()Then

MsgBox ”存在完全相同的记录“, vbOKOnly, ”信息提示“

Text1(0).SetFocus

Exit Sub

End If

End If

setuser.Adodc1.Recordset.AddNew

setuser.Adodc1.Recordset.Fields(”用户名“)= Trim(Text1(0).Text)

setuser.Adodc1.Recordset.Fields(”口令“)= Val(Trim(Text1(1).Text))

setuser.Adodc1.Recordset.Fields(”级别“)= Trim(Combo1.Text)

setuser.Adodc1.Recordset.Update

recs = recs + 1

Else

'修改操作

n = setuser.Adodc1.Recordset.AbsolutePosition

cond = ”级别='“ + Trim(Text1(0).Text)+ ”'“

setuser.Adodc1.Recordset.MoveFirst '每次从头开始查找

setuser.Adodc1.Recordset.Find(cond)

If Not setuser.Adodc1.Recordset.EOF()And setuser.Adodc1.Recordset.AbsolutePosition <> n Then

MsgBox ”存在完全相同的记录“, vbOKOnly, ”信息提示“

setuser.Adodc1.Recordset.MoveFirst

'这两个语句恢复原记录位置

setuser.Adodc1.Recordset.Move(n1)

setuser.Adodc1.Recordset.Fields(”用户名“)= Trim(Text1(0).Text)

setuser.Adodc1.Recordset.Fields(”口令“)= Val(Trim(Text1(1).Text))

setuser.Adodc1.Recordset.Fields(”级别“)= Trim(Combo1.Text)

setuser.Adodc1.Recordset.Update

End If

Unload Me End Sub

Private Sub Comm2_Click()

Unload Me End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

Call endata(KeyAscii)End Sub

模块:

Public userlevel As String '保存用户级别

Public flag As Integer

'用作记录操作标记

Public tna As String

'保存表名:用于调用edrec1窗体 Public cap As String

'保存标题名:用于调用edrec1窗体 Public recs As Integer

'保存记录集中记录个数

Sub main()

pass.Show vbModal End Sub

Public Function exesql(ByVal sql As String)As ADODB.Recordset

sql = Trim$(sql)

Set conn = New ADODB.Connection

Set rst = New ADODB.Recordset

conn.ConnectionString = ”DSN=Library;UID=sa;PWD=;“

conn.Open

Set rst.ActiveConnection = conn

rst.LockType = adLockOptimistic

rst.CursorType = adOpenKeyset

rst.Open sql

Set exesql = rst

Set rst = Nothing

Set conn = Nothing End Function

Public Sub deldata(ByVal tn As String)删除指定表中所有记录,对于oper表添加一个系统用户

Dim sql As String

sql = ”delete “ & Trim$(tn)

Set conn = New ADODB.Connection

conn.ConnectionString = ”DSN=Library;UID=sa;PWD=;“

conn.Open

conn.Execute sql

If Trim(tn)= ”oper“ Then

sql = ”insert oper values('1234','1234','系统管理员')“

conn.Execute sql

End If

conn.Close End Sub Public Sub endata(Keyasc As Integer)

If Keyasc = 13 Then

SendKeys ”{TAB}" '将回车键转换成Tab键

End If End Sub

第五篇:毕业设计冷凝器外文翻译

吉林化工学院本科毕业设计(论文)外文翻译

氨制冷系统的节能设计,改造和蒸发式冷凝器的控制

阿卜杜勒穆罕默德和凯利,工业评估中心,代顿大学

摘要

氨制冷系统通常提供了许多节能商机,因为他们的大动力消耗,运行时间长的和动态的操作。氨制冷系统的能源使用高度依赖于冷凝头的压力,而这是一个函数的蒸发式冷凝器容量和控制功能。本文研究系统能源利用中聚光能力和冷凝器的控制之间的关系。它首先开发方法来确定冷凝器的性能,然后以仿真模型模拟压缩机和冷凝器风扇的能源利用。,它使用工程基本面和经验两个数据,准确地捕捉压缩机,冷凝器和环境湿球温度之间的协同效应。节约能源是三种情况:安装在冷凝器风机变频驱动器,采用湿球控制方法战略和提高聚光性能。以说明气候的影响,这些模拟是两个不同的ASHRAE气候区,迈阿密,佛罗里达州和执行明尼阿波利斯,明尼苏达州,这是炎热和寒冷的气候分别。结果表明,提高表现不佳的冷凝器的性能是最经济有效的节能测量。但是节约能源从冷凝器安装变频驱动器球迷和利用湿球的方法策略取决于环境气候条件,与位置无关。接下来,内部收益率的计算方法来安装额外的聚光能力超越在为相同的两个ASHRAE气候区新建筑应用的标准做法。结果表明,安装两次基线聚光能力,内部收益率超过20 %。综上所述,本文提出的设计,改造的综合方法在氨制冷系统蒸发式冷凝器的控制权。节约能源衍生通过使用这种方法可以显著提高氨的能量效率制冷系统。

介绍

约7.5 %的总生产能耗用于食品加工行业,其中约21%的能量是电能(二零零六年环评)。在这些设备中,氨制冷系统是最大的能源消耗部分。制冷与冷却工艺所用电量是食品加工行业(二零零六年EIA)的用电量的27%。制冷系统使用的能量是高度依赖于冷凝压力,而这又是冷凝器容量和控制性能。因此,提高聚光能力和控制可导致显著的节能效果。

本文首先确定使用的数据从实际的聚光性能制冷控制系统。然后是开发仿真模型来计算每年的能源使用所研究的压缩机和冷凝器风扇。该仿真模型,用来计算节能三

吉林化工学院本科毕业设计(论文)外文翻译

个节能措施(ECMS):在冷凝器风扇安装变频器,采用湿球的方法策略,提高聚光性能。以说明气候的影响,这些仿真用于执行迈阿密,佛罗里达州和明尼苏达州明尼阿波利斯,这是炎热和寒冷的气候分别。文章最后决定回报的安装额外的容量超出标准规范的内部收益率在新的建筑应用。

系统说明

分析系统是一个两阶段的氨制冷系统具有两个低压侧压缩机和两个高级压缩机。所有的压缩机是螺杆式与滑阀控制和热虹吸油冷却。一种蒸发式冷凝器以恒定的速度从系统散发热量。对于本文的其余部分,术语系统将参考冷凝器风扇和压缩机。从冷凝器泵的能源使用小,并且不评价了本文。关键系统参数,包括电动机电流,氨的压力和温度从制冷控制系统获得。氨性数据的计算使用参考流体热力学和输运性质数据(NIST,2010)也被称为REFPROP。图中显示了制冷系统的替补的示意图。

图1。电路图制冷系统的pH值图上

计算排热到冷凝器

冷凝压力是决定系统能源利用的一个关键变量。为了准确地计算冷凝压力,冷凝器性能必须确定。在第一步骤中确定冷凝器性能是计算从压缩机排出到总热量冷凝器。在系统中的能量平衡显示了总的热拒绝了冷凝器是由低和高级压缩机加两个设置在制冷(QREF0)低和高级压缩机两者的压缩或轴功率(WS)的热量。

QCond.actual = Σ QrefLS +Σ QrefHS +Σ WSLS +Σ WsHS(1)

吉林化工学院本科毕业设计(论文)外文翻译

所有的热拒绝从低温压缩机减去热虹吸拒绝的低级压缩机油冷却(TSOC,LS)将被转移到高压侧制度。因此,由高温压缩机提供(TRprovided,HS)的制冷是:

ΣTRprovided,HS = Σ QrefLS +Σ QrefHS +Σ WLS

吉林化工学院本科毕业设计(论文)外文翻译

量可以使用等式4和来自控制系统的百分之制冷容量,计算如下:

QREF = Qrrated • %容量

(5)

压缩热由高温级压缩机(WsHS)生产

来自控制系统的数据而获得的每个压缩机的电机电流。至相关电机电流轴功率(WS),电机电流和输入之间的关系权力必须得到发展。这种关系中,可以从点测量开发电机电流和输入功率在整个压缩机的工作范围。通过使用的压缩机(ὴm)的两个铭牌效率和f(A),轴功率或等价每个压缩机的压缩热量可以计算为:

WsHS = F(A)* ὴm

(6)

热虹吸油冷却(TSOC)

考虑了两阶段的低温循环在图1中表示的氨制冷系统。在状态1LS,氨进入压缩机作为饱和蒸汽和离开压缩机的过热蒸汽在状态2LS。路径1LSmref.LS •(h2a.LSh4.LS)(8)

通常,制造商报告的体积流量的空气速率,标称容量,并且热抑制因子(HRF)。体积流量是用于使用计算的质量流率空气的密度在标准条件。该HRF,这既是外部空气湿球温度计的功能温度(TWB)和饱和冷凝温度(Tcond),用于确定在额定容量冷凝器对于一个给定TWB和Tcond为(Manske,Reindl和2001年克莱因):

额定电容容量=标称容量/ HRF(TWB,Tcond)(10)

等式9b和10可以适用于制造商的规格为蒸发冷凝器,以确定对于一个给定的湿球Tcond和效力之间的关系范围。有效性被发现是线性相关的Tcond为: effM = E0

吉林化工学院本科毕业设计(论文)外文翻译

由于蒸发式冷凝器的运行期间的实际容量已计算的,实际效果可以适合于在等式11的形式的线。测量效力与从所研究的系统Tcond数据被绘制时,无论是蒸发式冷凝器,风机和水泵是在图3满负荷生产。额定制造商从式(11)效果也绘制在同一张图来比较的有效性上一个新的蒸发式冷凝器,以其中一个已经服役了几年。图3表示该蒸发式冷凝器性能已劣化随着时间的推移。实际容量比制造商的额定容量少约40%。此信息可以被用作用于模拟程序的校准参数。例如,在图3中,冷凝器容量为一个新的冷凝器将约为1.69倍,目前的实际能力。

图3。实际和制造商有效性的蒸发式冷凝器

模拟年能源消耗

每年的能量使用的制冷系统的是压缩机和冷凝器的总和风机能耗。冷凝压力是必须正确地计算一个关键的变量正确模拟压缩机和冷凝器风扇的能源使用。以下步骤概述一方法计算压缩机功率,冷凝压力和冷凝器风扇电源。

计算压缩机输入功率

一个给定的压缩机在一定范围抽吸的额定轴功率(bhprated)和冷凝温度可以从制造商处获得。此数据可以被嵌入到一个二阶多项式方程的交互项来确定额定满载

吉林化工学院本科毕业设计(论文)外文翻译

轴功率在给定的吸气和冷凝温度(Manske 2000),如:

bhprated = P0 + P1 • Tcond + P2 • TSUC + P11 • Tcond ² + P22 • TSUC ² + P12 • Tcond • TSUC(12)

在该制冷系统中的压缩机,像许多制冷系统中,在操作碱/修剪方式,表示过去压缩机接通的每个阶段是修剪压缩机。式(4),它类似于公式12中,示出的满负荷容量压缩机吸入的函数和冷凝温度下,该压缩机运行。知道制冷负荷(参考负载)和碱的量被操作(Σ TRBase),则该部分的容量修剪压缩机的压缩机定阶段(FCTrim)可以计算如下:

FCTrim =(参考负载6789

吉林化工学院本科毕业设计(论文)外文翻译

红色=压缩机的能耗,蓝=冷凝器风扇能源,绿色=节能,广场=投资回报率,VFD =常数变速冷凝器风扇,所需时间约=利用湿球的方法和策略PERFOR =提高聚光性能。

在新建筑应用安装额外的电容容量

冷凝器是因为结构支撑,管道和控制成本来安装。因此,这是很少的成本效益来安装额外的冷凝器为唯一目的能量效率。然而,在新建筑中安装额外的冷凝器容量可以成本效益。近似的安装成本与变频驱动和湿球的做法冷凝器控制是指在公式23。增量成本(元)= 17 ·增容(MBH)+ 12,000(23)

在添加额外的冷凝器时收益率(IRR)内部收益率图9显示容量时,冷凝器的寿命是20年,能源涨价率是3 %。内部收益率计算用于安装的50 %的额外容量,100%,150 %和200 %,比7000 MBH基线能力。在这两个位置,内部收益率超过20%加倍聚光能力。因此,增加聚光能力似乎是一个非常有吸引力的选项的新建筑。

图9。返回的安装额外的电容容量内部收益率

红色=增量成本,绿色=每年节约能源成本,回报广场=内部收益率

小结与讨论

本文开发了一种方法,利用数据来校准聚光性能制冷控制系统。此校准冷凝器性能的仿真中使用模型计算所研究的能源使用的系统。该仿真模型是然后用来计算节能三的ECM :在冷凝器风扇安装变频器,采用湿球的方法策略,提高聚光性能的两个不同的ASHRAE气候区。

重要的结果是:

1.制冷系统的总功耗是强烈依赖于冷凝器大小,性能和控制。

2.对于现有系统,提高了蒸发式冷凝器性能可能是最成本效益的节能措施。目视检

吉林化工学院本科毕业设计(论文)外文翻译

[4] Manske,K.A.,Reindl酒店,D.T.和克莱因2001年S.A.公司。在工业“蒸发式冷凝器的控制制冷系统制冷24 “国际杂志: 676-691。

[5]米切尔,J.W.博朗,J.E.,1998。“设计,分析和空间调节设备的控制和

系统”。威斯康星大学麦迪逊分校。

[6] 标准与技术,2010年全国学院,参考流体热力学和运输属性数(REFPROP)8.0版 [7] 国家可再生能源实验室,2005年,“用户手册TMY3s ”,http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/tmy3/ [8] Stoecker,威尔伯特,1998年,工业制冷手册。麦格劳13-

下载VB 图书管理系统 毕业设计 外文翻译word格式文档
下载VB 图书管理系统 毕业设计 外文翻译.doc
将本文档下载到自己电脑,方便修改和收藏,请勿使用迅雷等下载。
点此处下载文档

文档为doc格式


声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:645879355@qq.com 进行举报,并提供相关证据,工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。

相关范文推荐

    毕业设计网上选课系统ASP外文翻译

    论文题目姓名学号班级年级专业学院指导教师完成时间 外文翻译(一) 网上选课系统 软件工程 软件学院 2014年 5 月13日 : : : : : : : : : 东华理工大学毕业设计(外文翻译) 英文原文......

    毕业设计三相异步电动机外文翻译

    中文翻译 异步电动机具有结构简单、运行可靠、价格低、维护方便等一系列的优点,因此,异步电动机被广泛应用在电力拖动系统中。尤其是随着电力电子技术的发展和交流调速技术......

    交通毕业设计外文及翻译(最终五篇)

    Synchro在交通控制与设计中的应用 在城市的较小的区域内,可以对区域内的所有交叉口进行控制;在城市较大的区域,可以对区域进行分区分级控制。分区的结果往往使面控制成为一个......

    建筑学本科毕业设计外文翻译

    本科毕业设计外文翻译 题目: 德黑兰城市发展 学 院: 专 业: 学 号: 学生姓名: 指导教师: 城市建设学院 建筑学 日 期: 二零一一年六月 First Chapter:Development of the ci......

    毕业设计(论文)外文翻译(原文)

    毕业设计(论文)——外文翻译(原文) NEWAPPLICATIONOFDATABASE Relational databases have been in use for over two decades. A large portion of the applications of relatio......

    VB_图书管理系统_毕业设计论文

    VB_图书管理系统_毕业设计论文.txt19“明”可理解成两个月亮坐在天空,相互关怀,相互照亮,缺一不可,那源源不断的光芒是连接彼此的纽带和桥梁!人间的长旅充满了多少凄冷 孤苦,没有......

    图书管理系统_毕业设计论文_摘要

    毕业设计论文图书管理系统 学生姓名:班级:学号:指导教师: 指导单位: [摘要] 随着管理系统的不断发展,计算机在管理系统中起着举足轻重的作用。为了减轻人工操作管理图书的负担,提高......

    毕业设计-小型超市销售管理系统(VB)DOC

    姓名班号 专业 计算机科学与技术同组姓名 独自一组 指导教师 小 型 超 市 销 售 管 理 系 统 摘 要 本文介绍了小型超市销售管理系统开发全过程。系统的开发采用Visual Bas......