我当然不会违背每一个实例中的应用程序代码和设计,在本系列的第3部分中,我将展示监控数据库以进行性能统计的方法。
I would certainly not side against application code and design in every instance, and in Part 3 of this series, I present methods of monitoring databases for performance statistics.
当头文件和实现文件准备好之后,您可以用清单7中的代码创建一个实例。
When the header file and the implementation file are ready, you can create an instance with the code in Listing 7.
实例代码将演示如何向您自己的应用程序中添加跟踪和记录功能。
The sample code illustrates how you can add trace and log to your own applications.
这个代码位将SOAP信封的对象和方法进行解码,实例化本地对象,并返回将会在返回 SOAP 信封中被包装起来的结果。
This bit of code decoded the object and method from a SOAPenvelope, instantiated the local object, and returned the result to be wrapped up in a return SOAP envelope.
由于不能pickle类实例代码,因此可以添加、更改和除去方法,而不会影响现有的经过pickle的实例。
Because a class instance's code is not pickled, you can add, change, and remove methods without impacting existing pickled instances.
因此我们使用Factory类(又名对象工厂),以根据需要为客户机代码提供Db2AttendeeDAO和 DefaultDAO实例。
So, we use a Factory class (a.k.a. an object factory) to provide the client code with instances of Db2AttendeeDAO and DefaultDAO as needed.
JiBX读取绑定定义文件以控制它添加到您类中的代码如何在实例和XML之间进行相互转换。
JiBX reads a binding definition file to control how the code it adds to your classes converts instances to and from XML.
这些都是针对IEntry和IRequestContext实例的非常简单的操作,所以本文不提供相关的代码片段。
These are fairly straightforward operations against the IEntry and IRequestContext instances, so the relevant code snippet is not included in this article.
您需要根据您安装ServiceRegistry实例的主机名称和端口号调整代码中使用的URL。
You need to adjust the URL used in the code for the hostname and port number of your installed Service Registry instance.
该实例包含状态代码,而且也可能包含Header和正文。
The instance contains the status code, and may also contain headers and a body.
首先,您将来自LotusWidgetFactory的小部件的代码和资源导出为标准的WAR文件,并将其部署到WebSphere实例。
First, you export the code and resources of the widget from Lotus widget Factory as a standard WAR file and deploy it to a WebSphere instance.
用continuation进行调用使您获得一个代码块和指派给变量的continuation(或已保存的调用堆栈,其中有实例变量)。
Call with continuation gives you a code block, and the continuation (or a saved call stack, with instance variables), which you assign to a variable.
对于此后端类型,UDPDMI的每个方法均包含查找目标EJB Home、获得实例和调用指定方法的代码。
With this backend type, each method of the UDPDMI contains code to lookup the home of the target EJB, obtain an instance, and to invoke the specified method.
下列代码片段中显示的帮助器类(RecipientResolver)使用SametimeLookupService和resolver类将收件人名称转换为Sametime目录条目(STObject实例)。
A helper class (RecipientResolver), shown in the following code snippet, USES Sametime LookupService and Resolver classes to convert recipient names to Sametime directory entries (STObject instances).
这主要由于Python会pickle实例数据(通常是_ dict _属性)和类的名称,而不会pickle类的代码。
This is primarily due to the fact that Python pickles the instance data (usually the _dict_ attribute) and the name of the class, but not the code for the class.
清单2中的代码获得构造函数并使用它来创建使用String s “a ”和“b ”的twostring类的一个实例。
The code shown in Listing 2 gets the constructor and USES it to create an instance of the TwoString class using Strings "a" and "b".
服务器上的remoting框架代码获取这个请求,对这个XML进行解除编排处理,提取出组件名、方法和实参,然后再在服务器端组件实例上调用此方法。
The remoting framework code on the server picks up this request, unmarshals the XML, extracts the component name, method, and arguments, then invokes the method on the server-side component instance.
比较PlaceanOrder对话框的代码(在此部分的开头)和在下面实例中使用FindAppObjects和FindBasicAppObjects的同样的行为。
Compare the code for the Place an Order dialog (at the beginning of this section) with the same behavior using FindAppObjects and FindBasicAppObjects in the following example.
在主函数中输入下列几行代码,创建Quad实例,并通过Assert断言,当长宽各为3和2时,返回的结果应该是6。
Type into the member function Main a few lines of code to create an instance of Quad and then assert that when the object Area method is given a length of 3 and width of 2, it returns the value 6.
要运行代码,您需要使用WebsphereApplicationServerConsole执行多个管理任务(如创建WorkManager和Distributedmap缓存实例)。
To run the code, you need to perform several administrative tasks using the Websphere Application Server Console (such as creating a WorkManager and a Distributed Map cache instance).
以下步骤介绍了如何在安装和运行后执行测试代码(本示例假设两个应用程序均在相同的应用服务器实例上运行。)
The following steps describe how to execute the test code once installed and running. (This example assumes that both applications are running on the same application server instance.)
清单2显示了这个继承树(为了清晰起见,删除了实例计数器和构造函数代码)。
Listing 2 shows the inheritance tree (with the instance counter and constructor code removed for clarity).
它能用于访问类实例中的字段和方法,从而提供了不需要类之间的任何源代码链接就能在运行时将类动态地挂钩在一起的方法。
It can be used to access fields and methods in instances of a class, providing a way of dynamically hooking together classes at runtime without the need for any source code links between the classes.
可用它来访问类实例中的字段和方法,从而提供了一种在运行时将类动态地挂钩在一起,却无需类之间有任何源代码链接的方法。
It can be used to access fields and methods in instances of a class, giving a way of dynamically hooking together classes at runtime without the need for any source code links between the classes.
在计费和计量方面存在实例层功能局限的高级平台,会选择提供通用计费模式,这种模式在运行应用程序代码时会产生固定费用。
Advanced platforms that have a limited instance-level ability to provide metering and billing often opt to provide generalized billing models in which there is a flat fee to run application code.
以下描述的斜体词就是源代码实例化变量的名字(也见于代码清单5、6、7和8)。
The words in italics in the following descriptions are the names of instantiated variables in the source code (also see Listings 5, 6, 7, and 8, which follow).
清单1中的代码显示了如何为AmazonSQS创建HTTP客户端、实例化CreateQueueRequest对象和调用队列创建请求。
The code in Listing 1 shows how to create the HTTP client for Amazon SQS, instantiate the CreateQueueRequest object, and invoke the queue creation request.
清单2中提供了用于MainFrame构造函数、实例和显示画面所使用的代码。
The code for the MainFrame constructor function and for the instantiation and display of the frame is provided in Listing 2.
比如,return、break和this在某一代码块中的语义与其在Runnable(或其他内部类实例)中同一代码块中的语义是不同的。
For example, the semantics of return, break, and this are different in a block of code than they are in a Runnable (or other inner class instance) that represents the same block of code.
清单4中的代码展示了从PurchaseOrder对象的实例化和设置一直到此对象在数据库中的持久化这个完整的过程。
The code in Listing 4 illustrates the journey from PurchaseOrder object instantiation and setup all the way through to persistence of this object in the database.
应用推荐