清单1显示了测试View模式所用方法的代码片段。
Listing 1 shows a code snippet of the method to test the View mode.
清单1 中显示了onLoad方法的代码片段,它指定该方法初始化和加载 iWidget 操作所需的所有依赖项。
The code snippet shown in Listing 1 for the onLoad method specifies that this method initializes and loads all dependencies that are required for the operation of the iWidget.
我们利用重构技术、设计模式和其他计算方法从我们的应用程序中去掉发臭的代码片段。
We use refactoring techniques, design patterns, and other computational methods to remove the smelly code segments from our applications.
下面两个代码片段展示了测试这些条件的帮助器方法。
The following two code snippets show helper methods to test for such conditions.
下面是OSGi特定的代码片段,在bundle启动时被调用,有点像是bundle的main方法。
This is an OSGi-specific piece of code which is invoked when the bundle is started, like a per-bundle main method.
将分析方法的内容替换为如代码清单6所示的代码片段。
Replace the contents of the analyze method with the code snippet in Listing 6.
代码片段类似于可在其中传递参数的方法调用。
Snippets are like method calls, in which you are passing in parameters.
表1中的代码片段演示了内联方法风格的简单性和易用性。
Table 1 provides a snippet of code to demonstrate the simplicity and usability of inline methods.
清单4中的代码片段是一些方法,它们允许在属性提供器视图或插件类中添加或删除属性改变监听器。
The code snippet in Listing 4 shows the methods to allow property change listeners to be added to or removed from a property provider view or plug-in class.
同时还按顺序回顾了最有意思的代码片段,并论述了两种不同的表达式求值方法。
We reviewed the most interesting code snippets along the way and discussed two different approaches to expression evaluation.
该代码片段实际上是一个350多行的方法的一部分,该方法展示了41条不同的路径。
The snippet is actually part of a 350-plus-line method that was shown to have 41 distinct paths.
根据上面的分析,合理的方法应该是修改代码片段的部分逻辑,把IF语句的结构由顺序改为嵌套。
With that being stated it becomes reasonable to change part of the logic of that code snippet and change the structure of the IF statements from sequence to nested.
本文中包含的方法和XSL代码片段可以帮助您快速地处理WSDL文档,并避免最常见的错误。
The approaches and XSL snippets contained in this article can give you a jump start processing WSDL documents and help you avoid the most common pitfalls.
在清单7所示的代码中,控制器的回调方法首先使用XSLProcessor模块生成HTML片段,然后将其注入到目标节点中。
In the code in Listing 7, the callback method of the controller first generates the HTML fragment using the XSLProcessor module and then injects it into the targeted node.
清单2中的代码片段显示一个视图的createPartControl()方法,这个方法创建一个JFaceTableViewer并将它作为选择提供器添加到工作台站点。
The code snippet in Listing 2 shows the createPartControl() method of a view that creates a JFace TableViewer and adds it as a selection provider to the workbench site.
这些建议可以是针对某个特定对象的方法列表,也可以是基于不同的关键字(比如for或while)来展开的代码片段。
The Suggestions can be a list of methods specific to a particular object or a code snippet to expand, based on various keywords such as for or while.
该实现中比较重要的其他代码片段是DBController.createOrder()方法(如清单4 所示)。
The remaining section of code that is of significance in this implementation is DBController.createOrder() method (shown in listing 4).
如果创建的是Servlet,则将光标放置在需要包含代码片段的方法内。
If you are creating a servlet, place the cursor within the method where you want to include the snippet.
清单2中显示的代码片段规定:要呈现的任何元素(Dojowidget)都在此方法中创建,并且添加到容器div的DOM节点上。
The code snippet shown in Listing 2 specifies that any element (Dojo widget) that needs to be rendered is created in this method and added to the DOM node of the container div.
清单15展示了一个来自清单8的代码片段,即如何实现request方法调用。
Listing 15 shows a snippet from Listing 8 on how to make the request method call.
清单15展示了一个来自清单8的代码片段,即如何实现request方法调用。
Listing 15 shows a snippet from Listing 8 on how to make the request method call.
应用推荐