A.A
B.B
C.C
D.D
- · 有4位网友选择 A,占比21.05%
- · 有4位网友选择 C,占比21.05%
- · 有4位网友选择 C,占比21.05%
- · 有3位网友选择 B,占比15.79%
- · 有2位网友选择 B,占比10.53%
- · 有2位网友选择 A,占比10.53%
A.A
B.B
C.C
D.D
【说明】
在一公文处理系统中,开发者定义了一个公文结构OfficeDoc,其中定义了公文应该具有的属性。当公文的内容或状态发生变化时,与之相关联的DocExplorer结构的值都需要发生改变。一个OfficeDoc结构能够关联一组DocExplorer结构。当OfficeDoc结构的内容或状态发生变化时,所有与之相关联的DocExplorer结构都将被更新,这种应用被称为观察者模式。以下代码采用C语言实现,能够正确编译通过。
【代码13-4】
include<stdio.h>
define OBS_MAXNUM 20 /*一个OfficeDoc变量最多能够关联的DocExplorer变量的个数*/
typedef void((1) )(struc OffieeDoc*, struct DoeExplorer*)I;
struct DocExplorer{
func update;/*DocExplorer结构采用的更新函数*/
/*其它的结构字段省略*/
};
struet OffieeDoc{
(2) myObs[OBS_MAXNUM];
/*存储所有与OfficeDoc相关联的DocExplorer结构指针*/
int index;/*与OffieeDoc结构变量相关联的DoeExplorer结构变量的个数*/
};
void attaeh(struct OfficeDoc*doc, struct DocExplorer*ob){
/*关联Observer结构ob与OffieeDoe结构doe*/
int loop=0;
if(doc->index>=OBS_MAXNUM||ob==NULL)return;
for(loop=0, loop<doc->index; loop++)
if(doc->myObs[loop]==ob)return;
doc->myObs[doe->index]=ob;
doc->index++;
}
void detaeh(struct OfficeDoc*doc, struct DocExplorer*ob){
/*解除doc结构与ob结构间的关联*/
int loop;
if(ob==NULL)return;
for(loop=0;loop<doc->index; loop++){
if(doe->myObs[loop]==ob){
if(loop<=doc->index-2)
doc->myObs[loop]=doc->myObs[(3)];
doc->myObs[doc->index-1]=NULL;
doc->index——;
breack;
}
}
}
void updatel(struct OfficeDoe*doe, struct DoeExplorer *ob){
/*更新ob结构的值,更新代码省略*/
} void update2(struct OffieeDoc*doc,struet DocExplorer *ob){
/*更新ob结构的值,更新代码省略*/
}
void notifyObs(struct OfficeDoc* doc){
/*当doc结构的值发生变化时,通知与之关联的所有DocExplorer结构变量*/
int loop;
for(loop=0; loop<doc->index; loop++){
(doc->myObs[loop])->update((4));
}
}
void main(){
struct OfficeDoc doc; /*定义一了OfficeDoe变量*/
struct DocExplorer explorer1, explorer2; /*定义两个DocExplorer变量*/
/*初始化与OfficeDoc变量相关的DocExplorer变量个数为0*/
doc.index=0;
explorer1.update=update1; /*设置explorer1变量的更新函数*/
explorer2. update=update2; /*设置explorer2变量的更新函数*/
attach(&doc, &explorer1); /*关联explorer1与doc对象*/
attach(&doc, &explorer2); /*关联explorer2与doc对象*/
/*其它代码省略*/
(5); /*通知与OfficeDoe相关的所有DoeExploer变量*/
return;
}
A. Create a valid B. Set the passwordFormat attribute of the configured membership provider to Encrypted. C. Ensure that the enablePasswordRetrieval attribute of the configured membership provider is set to False. D. Ensure that the enablePasswordRetrieval attribute of the configured membership provider is set to True.
A.ReducetheRefreshintervalforthezone.
B.Enableagingandscavengingfortheserver.
C.ReducetheNo-Refreshintervalforthezone.
D.OpentheDNSsnap-in,right-clickDC1,andselectUpdateServerDataFiles.
A.InstallNetworkMonitorToolsandcreateanewcapture.
B.InstallConnectionManagerAdministrationKit(CMAK)andcreateanewprofile.
C.FromPerformanceLogsandAlerts,createatracelog.
D.FromRoutingandRemoteAccess,modifytheRemoteAccessLoggingsettings.
A. Configure an IPsec connection to use tunnel mode and preshared key authentication.
B. Configure a PPTP connection to use version 2 of the MS-CHAP v2 authentication.
C. Configure a L2TP/IPsec connection to use the EAP-TLS authentication.
D. Configure a L2TP/IPsec connection to use version 2 of the MS-CHAP v2 authentication.
YoudeployandpublishanapplicationnamedTimeReportonServer1.TheTerminalServicesWebAccessroleusesActiveDirectoryDomainServices(ADDS)andNetworkLevelAuthenticationisenabled.
YouneedtoensurethattheuserscanlaunchTimeReportonServer1fromtheTerminalServicesWebAccessWebpage.
Whatshouldyoudo?()
A. Run dnscmd by using the ZoneResetMasters option.
B. Run dnscmd by using the ZoneResetSecondaries option.
C. Add the new DNS server to the Zone Transfers tab on one of the DNS servers in the main office.
D. Add the new DNS server to the DNSUpdateProxy Global security group in Active Directory Users and Computers.
A. From the D volume properties, modify the Shadow Copies settings.
B. From the Sharing and Security settings of D:\data, modify the Caching settings.
C. From the %systemroot%\system32\clients\twclient\x86 folder, install twcli32.msi.
D. From the Services snap-in, modify the startup type of the Volume Shadow Copy Service (VSS).
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!