实例代码将演示如何向您自己的应用程序中添加跟踪和记录功能。
The sample code illustrates how you can add trace and log to your own applications.
本文附带的下载实例代码可以使您安装并测试一个运行样本。
The example code available for download with this article will enable you to install and test a working sample. The example was built and tested using the following software and hardware.
接下来的部分将描述他们是如何运行的,并通过实例代码演示了一些特殊的设计点。
Their operation is described in the next sections followed by example code to illustrate particular design points.
当工具包向导生长一个工程时,向导会为三个关键方法提供部分代码或实例代码,如表1 所示。
When the toolkit wizard creates a project, it provides stubs or sample code for three key methods, as shown in Table 1.
我建议您可以在移植向导中尝试实例代码以确保其是否正常工作,并且查看您的应用程序以减少潜在的问题。
I would ask you to try some sample code in the migration wizard to ensure that it is working properly, and take an additional look at your application to eliminate any potential issues.
由于不能pickle类实例代码,因此可以添加、更改和除去方法,而不会影响现有的经过pickle的实例。
Because a class instance's code is not pickled, you can add, change, and remove methods without impacting existing pickled instances.
使用该实例代码的最佳途径是获取一个名为read_and _ write的空脚本,复制实例脚本来替代它。
The best way to use the example code is to capture an empty script with the name read_and_write, then copy and replace it with the example script.
如果你已经下载了本书的实例代码,它们中的许多小程序可以用scala命令来运行,比如scala filename.scala。
If you've downloaded the example code for the book, many of the smaller examples can be run using the scala command, e.g., scala filename.scala.
这里再次涉及到了复杂实例的代码样本。
要检索流程输入消息的空实例,请使用下面的代码。
To retrieve an empty instance of a process input message use this code.
您可以使用此函数轻松地在PHP代码中创建实例声明。
This function allows you to easily create instance declarations from within your PHP code.
如图6所示,这些视图提供了关于类,实例,包以及代码区域等等的详细信息。
Illustrated in Figure 6, these views provide details on classes, instances, packages, code coverage, and so on.
清单2中展示的代码片段使用实例值加载表单字段。
The code snippet shown in listing 2 loads the form fields with instance values.
更有可能是其他用于创建类实例的代码导致了过度的内存占用。
Most likely, other code is responsible for creating instances of the classes that have caused the extensive memory usage.
以上代码首先检查是否存在实例。
类型有两种“用户”:继承类型,以及使用类型实例的代码。
There are two kinds of “users” of a type: derived types and code that works with instances of the type.
在一个理想的小敏捷项目之中,您有小的交接,因为团队成员要扮演所有的项目角色(编写实例,开发代码,测试,等等)。
In an ideal small agile project, you would have minimal hand-offs, because team members tend to take on all project roles (write stories, develop code, test, and so on).
清单4给出安装s3fs实例的代码。
不用惊讶,run方法包含我编写的、用来创建这些对象的新实例的代码,而main方法则调用run方法。
Not surprisingly, the run method contains the code I wrote to create new instances of those objects and the main method calls the run method.
参见每一章节代码实例中的README. txt可以获取更多细节。
See the README.txt files in each chapter's code examples for more details.
实例:从数据图开始构建代码。
清单6显示了将XML消息反系列化到Product实例的代码。
Listing 6 shows the code to deserialize the XML message into a Product instance.
该实例包含状态代码,而且也可能包含Header和正文。
The instance contains the status code, and may also contain headers and a body.
对于代码实例,您应该熟悉。
特别是,VisualStudio提供创建ComponentResourceManager实例的代码,这会加载正确的资源集,并分配所有必要的控件值。
In particular, Visual Studio supplies the code to create an instance of the ComponentResourceManager, which loads the proper set of resources and assigns all the necessary control values.
清单2显示的是使用BusinessFlowManagerAPI获取流程实例ID的代码片段。
Listing 2 shows the code snippet to get the process instance ID using the Business Flow Manager API.
清单3显示了创建WSRelationalPushDownHelper的代码实例。
Listing 3 shows a code example that creates a WSRelationalPushDownHelper.
实际上,它与清单8非常类似,不过增加了一行创建pers1实例的代码。
In fact, it looks just like Listing 8, but with an added line creating the pers1 instance.
为了设定代码执行的上下文,self变量要设置为执行代码时所在的对象实例,以使得代码可以访问对象实例的变量。
In order to set the context, the variable self is set to the instance while the code is executing, giving the code access to the instance's variables.
为了设定代码执行的上下文,self变量要设置为执行代码时所在的对象实例,以使得代码可以访问对象实例的变量。
In order to set the context, the variable self is set to the instance while the code is executing, giving the code access to the instance's variables.
应用推荐