Chap2(1020)
- 格式:ppt
- 大小:964.50 KB
- 文档页数:52
第二十章开发Delphi对象式数据管理功能面向对象技术是九十年代的主流技术,各类应用软件如果以面向对象的方法构造并且渗透面向对象的风格将使软件具有更高的品质。
在面向对象程序设计中,对象式数据管理占有很重要的地位。
在Delphi中,对对象式数据管理的支持方式是其一大特色。
Delphi是一个面向对象的可视化设计与面向对象的语言相结合的集成开发环境。
Delphi 的核心是部件。
部件是对象的一种。
Delphi应用程序完全是由部件来构造的,因此开发高性能的Delphi应用程序必然会涉及对象式数据管理技术。
对象式数据管理包括两方面的内容:●用对象来管理数据●对各类数据对象(包括对象和部件)的管理Delphi在这两方面都做的相当出色。
在Delphi的早期版本Turbo Pascal 中就曾有流(Stream)、群(Collection)和资源(Resource)等专门用于对象式数据管理的类。
在Delphi中,这些功能得到了大大的加强。
Delphi将对象式数据管理类归结为Stream对象(Stream)和Filer对象(Filer),并将它们应用于可视部件类库(VCL)的方方面面。
它们不仅提供了在内存、外存和Windows资源中管理对象的功能,还提供了在数据库BLOB字段中对象的功能。
在本章中将介绍Stream对象和Filer对象的实现原理、应用方法以及在超媒体系统中的应用。
这对于运用Delphi 开发高级应用是很重要的。
20.1 流式对象的实现原理和应用Stream对象,又称流式对象,是TStream、THandleStream、TFileStream、TMemoryStream、TResourceStream和TBlobStream等的统称。
它们分别代表了在各种媒介上存储数据的能力,它们将各种数据类型(包括对象和部件) 在内存、外存和数据库字段中的管理操作抽象为对象方法,并且充分利用了面向对象技术的优点,应用程序可以相当容易地在各种Stream对象中拷贝数据。
第二章计算机指令集结构设计名词解释1.堆栈型机器——CPU中存储操作数的单元是堆栈的机器。
2.累加型机器——CPU中存储操作数的单元是累加器的机器。
3.通用寄存器型机器——CPU中存储操作数的单元是通用寄存器的机器。
4.CISC——复杂指令集计算机。
5.RISC——精简指令集计算机。
@2.2堆栈型机器、累加器型机器和通用寄存器型机器各有什么优缺点2.3常见的三种通用寄存器型机器的优缺点各有哪些指令集结构设计所涉及的内容有哪些(1)指令集功能设计:主要有RISC和CISC两种技术发展方向;(2)寻址方式的设计:设置寻址方式可以通过对基准程序进行测试统计,察看各种寻址方式的使用频度,根据适用频度设置相应必要的寻址方式;(3)操作数表示和操作数类型:主要的操作数类型和操作数表示的选择有,浮点数据类型(可以采用IEEE 754标准)、整型数据类型(8位、16位、32位的表示方法)、字符型(8位)、十进制数据类型(压缩十进制和非压缩十进制数据表示)等等。
(4)寻址方式的表示:可以将寻址方式编码与操作码中,也可将寻址方式作为一个单独的域来表示。
(5)((6)指令集格式的设计:有固定长度编码方式、可变长编码方式和混合编码方式三种选择。
简述CISC计算机结构指令集功能设计的主要目标。
从当前的计算机技术观点来看,CISC结构有什么缺点CISC结构追求的目标是强化指令功能,减少程序的指令条数,以达到提高性能的目的。
从目前的计算机技术观点来看,CISC结构存在以下几个缺点:(1)在CISC结构的指令系统中,各种指令的使用频率相差悬殊。
(2)CISC结构的指令系统的复杂性带来了计算机体系结构的复杂性,这不仅增加了研制时间和成本,而且还容易造成设计错误。
(3)CISC结构的指令系统的复杂性给VLSI设计带来了很大负担,不利于单片集成。
(4)CISC结构的指令系统中,许多复杂指令需要很复杂的操作,因而运行速度慢。
(5)^(6)在结构的指令系统中,由于各条指令的功能不均衡性,不利于采用先进的计算机体系结构技术(如流水技术)来提高系统的性能。
第二章 对偶问题与灵敏度分析一、写出下列线性规划的对偶问题1、P89,(a)321422m in x x x Z ++=⎪⎪⎩⎪⎪⎨⎧≥=++≤++≥++.,0,;534;332;243321321321321无约束x x x x x x x x x x x x解:原模型可化为321422m in x x x Z ++=⎪⎪⎩⎪⎪⎨⎧≥=++≥≥++.,0,;534;3-3--2-;243321321321321321无约束x x x y y y x x x x x x x x x 于是对偶模型为321532m ax y y y W +-=⎪⎪⎩⎪⎪⎨⎧≥≤+-≤+-≤+-.,0,;4334;243;22321321321321无约束y y y y y y y y y y y y2、P89,(b)321365m ax x x x Z ++=⎪⎪⎩⎪⎪⎨⎧≤≥≤++≥-+-=++.0,0,;8374;35;522321321321321x x x x x x x x x x x x 无约束解:令033≥-='x x 原模型可化为321365m ax x x x Z '-+=⎪⎪⎩⎪⎪⎨⎧≥'≥≤'+≤'='+.0,0,;83-74;3--5-;52-2321321321321321x x x y y y x x x x x x x x x 无约束于是对偶模型为321835m in y y y W +-=⎪⎪⎩⎪⎪⎨⎧≥-≥---≥+-=++.0,,;332;6752;54321321321321y y y y y y y y y y y y 无约束 或⎪⎪⎩⎪⎪⎨⎧≥≤++≥+-=++.0,,;332;6752;54321321321321y y y y y y y y y y y y 无约束二、灵敏度分析1、P92, 线性规划问题213m ax x x Z += ⎪⎩⎪⎨⎧≥≤+≤+0,1025;74212121x x x x x x最优单纯形表如下试用灵敏度分析的方法,分析:(1) 目标函数中的系数21,c c 分别在什么范围内变化,最优解不变(2) 约束条件右端常数项21,b b 分别在什么范围内变化,最优基保持不变解:(1) 1c 的分析:要使得最优解不变,则需⎪⎪⎩⎪⎪⎨⎧≤⨯-⨯+=≤⨯+⨯-=034131003513201413c c σσ 即 ⎪⎩⎪⎨⎧≤≥42511c c 所以:4251≤≤c 时可保持最优解不变。
Which three services on a router does Cisco SDM One-Step Lockdown enable? (Choose three.)SNMPTCP interceptsSSH access to the routerCisco Discovery Protocolpassword encryption servicefirewall on all outside interfacesWhich statement describes the operation of the Cisco SDM Security Audit wizard?The wizard configures a router to prevent unauthorized access.The wizard compares a router configuration against recommended settings.The wizard monitors network data and logs possible unauthorized or malicious traffic.The wizard logs the effectiveness of network security measures for baselinecomparisons.Which service is enabled on a Cisco router by default that can reveal significant information about the router and potentially make it more vulnerable to attack?HTTPCDPFTPNTPTFTPRefer to the exhibit. What two facts can be determined from the output? (Choose two.)The Cisco IOS image and configuration files have been properly secured.ROMmon mode will be inaccessible upon entering the privileged EXEC reloadcommand.The Cisco IOS Resilient Configuration feature is enabled.The Cisco IOS Resilient Configuration feature has detected an image versionmismatch.The Cisco IOS configuration files have been erased.An administrator needs to create a user account with custom access to most privileged EXEC commands. Which privilege command is used to create this custom account?privilege exec level 0privilege exec level 1privilege exec level 2privilege exec level 15What is the minimum recommended modulus key length for keys generated to use with SSH?25651276810242048Which three options can be configured by Cisco AutoSecure? (Choose three.)CBACSNMPsyslogsecurity bannerinterface IP addressenable secret passwordWhich three commands are required to restore a primary bootset from a secure archive on a router on which Cisco IOS resilience is enabled? (Choose three.)Restart the router in ROM monitor mode and display the secure bootset Cisco IOS image name using the dir command.Restart the router, enter privileged EXEC mode, and display the secure bootset Cisco IOS image name using the show flash command.Boot the secure bootset Cisco IOS image using the boot command with the filename.Copy the secure bootset Cisco IOS image to flash using the copy IOS-backup-image flash command.Restore the secure configuration file using the copy config-backup flash command.Restore the secure configuration file using the secure boot-config restore filename command.Refer to the exhibit. Routers R1 and R2 are connected via a serial link. One router is configured as the NTP master, and the other is an NTP client. Which two pieces of information can be obtained from the partial output of the show ntp associations detail command on R2? (Choose two.)Both routers are configured to use NTPv2.Router R1 is the master, and R2 is the client.Router R2 is the master, and R1 is the client.The IP address of R1 is 192.168.1.2.The IP address of R2 is 192.168.1.2.What are two characteristics of SNMP community strings? (Choose two.)A vulnerability of SNMPv1, SNMPv2, and SNMPv3 is that they send the communitystrings in plaintext.Commonly known community strings should be used when configuring secure SNMP.If the manager sends one of the correct read-only community strings, it can getinformation and set information in an agent.SNMP read-only community strings can be used to get information from anSNMP-enabled device.SNMP read-write community strings can be used to set information on anSNMP-enabled device.What are three requirements that must be met if an administrator wants to maintain device configurations via secure in-band management? (Choose three.)network devices configured to accommodate SSHa separate network segment connecting all management devicesat least one router acting as a terminal serverencryption of all remote access management trafficconnection to network devices through a production network or the Internetdirect access to the console ports of all network devicesIf AAA is already enabled, which three CLI steps are required to configure a router with a specific view? (Choose three.)assign a secret password to the viewassign commands to the viewassign users who can use the viewassociate the view with the root viewcreate a superview using the parser view view-name commandcreate a view using the parser view view-name commandWhich two characteristics apply to Role-Based CLI Access superviews? (Choose two.)CLI views have passwords, but superviews do not have passwords.Users logged in to a superview can access all commands specified within the associatedCLI views.A single superview can be shared among multiple CLI views.Commands cannot be configured for a specific superview.Deleting a superview deletes all associated CLI views.Refer to the exhibit. Based on the output of the show running-config command, which type of view is SUPPORT?secret view, with a level 5 encrypted passwordroot view, with a level 5 encrypted secret passwordsuperview, containing SHOWVIEW and VERIFYVIEW viewsCLI view, containing SHOWVIEW and VERIFYVIEW commandsRefer to the exhibit. Which statement regarding the JR-Admin account is true?JR-Admin can issue show, ping, and reload commands.JR-Admin can issue ping and reload commands.JR-Admin can issue only ping commands.JR-Admin can issue debug and reload commands.JR-Admin cannot issue any command because the privilege level does not match one ofthose defined.Which recommended security practice prevents attackers from performing password recovery on a Cisco IOS router for the purpose of gaining access to the privileged EXEC mode?Keep a secure copy of the router Cisco IOS image and router configuration file as abackup.Disable all unused ports and interfaces to reduce the number of ways that the router canbe accessed.Configure secure administrative control to ensure that only authorized personnel canaccess the router.Locate the router in a secure locked room that is accessible only to authorized personnel.Provision the router with the maximum amount of memory possible.An administrator defined a local user account with a secret password on router R1 for use with SSH. Which three additional steps are required to configure R1 to accept only encrypted SSH connections? (Choose three.)configure the IP domain name on the routerenable inbound vty Telnet sessionsgenerate the SSH keysconfigure DNS on the routerenable inbound vty SSH sessionsgenerate two-way pre-shared keysBy default, how many seconds of delay between virtual login attempts is invoked when the loginblock-for command is configured?onetwothreefourfiveWhich set of commands are required to create a username of admin, hash the password using MD5, and force the router to access the internal username database when a user attempts to access the console?R1(config)# username admin password Admin01pa55R1(config)# line con 0R1(config-line)# login localR1(config)# username admin password Admin01pa55R1(config)# line con 0R1(config-line)# login internalR1(config)# username admin Admin01pa55 encr md5R1(config)# line con 0R1(config-line)# login localR1(config)# username admin secret Admin01pa55R1(config)# line con 0R1(config-line)# login localR1(config)# username admin secret Admin01pa55R1(config)# line con 0R1(config-line)# login internalWhich three areas of router security must be maintained to secure an edge router at the network perimeter? (Choose three.)physical securityflash securityoperating system securityremote access securityrouter hardeningzone isolationRefer to the exhibit. What two pieces of information can be gathered from the generated message? (Choose two.)This message is a level five notification message.This message appeared because a minor error occurred requiring further investigation.This message appeared because a major error occurred requiring immediate action.This message indicates that service timestamps have been globally enabled.This message indicates that enhanced security was configured on the vty ports.Refer to the exhibit. Which two statements describe the current SDM logging setup? (Choose two.)Buffered logging will be enabled on the router for Logging Level 7 messages.Buffered logging will be enabled on the syslog server for Logging Level 7 messages.All messages with a trap level of 4 and higher (less critical) will be logged.All messages with a trap level of 4 and lower (more critical) will be logged.The router interface IP address that is connected to the syslog server is 192.168.1.3.The syslog server IP address is 192.168.1.3.Refer to the exhibit. What is the significance of secret 5 in the generated output?The ADMIN password is encrypted using DH group 5.The ADMIN password is encrypted via the service password-encryption command.The ADMIN password is hashed using MD5.The ADMIN password is hashed using SHA.Which two operations are required to implement Cisco SDM One-Step Lockdown? (Choosetwo.)Choose the One-Step Lockdown feature.Apply the documented network policies.Deliver the configuration changes to the router.Compare the router configuration against recommended settings.Select the Firewall and ACL task on the SDM Configuration screen.Which statement matches the CLI commands to the SDM wizard that performs similar configuration functions?aaa configuration commands and the SDM Basic Firewall wizardauto secure privileged EXEC command and the SDM One-Step Lockdown wizardclass-maps, policy-maps, and service-policy configuration commands and the SDM IPSwizardsetup privileged EXEC command and the SDM Security Audit wizardWhat are two characteristics of the SDM Security Audit wizard? (Choose two.)It uses interactive dialogs and prompts to implement AAA.It automatically enables Cisco IOS firewall and implements Cisco IOS IPS security configurations to secure the router.It displays a screen with Fix-it check boxes to let you choose which potential security-related configuration changes to implement.It requires users to first identify which router interfaces connect to the inside network and which connect to the outside network.It is initiated from CLI and executes a script in which the managment plane functions and forwarding plane services are tested against known vulnerabilities.。