Rather than entering a pattern code as in previous versions, users can opt to look into their camera.
用户可以选择查看他们的相机,而不是像以前的版本一样键入模式代码。
Metaprogramming offers a great way to differentiate pattern code from implementation code because you express your pattern by using code that is about code.
元程序设计提供一种不错的方式将模式代码与实现代码区分开来,因为您使用关于代码的代码来表达您的模式。
This is a class that can be used repeatedly to instantiate a class as a singleton without having to re-write the singleton pattern code for that specific class.
这是一个可用来创建单例类实例确不需要为每个特定的类重写单例模式代码的可重用的类。
This "composite" pattern then provides guidance to developers on how to code the components themselves.
然后这个“合成”模式提供向导来帮助开发者为组件编码。
This article provides a pattern of correlating a code smell to a measure that can be configured to be flagged from an automated static analysis tool.
本文提供了一种使代码味道与一种度量方法相关的模式,这种度量方法可以配置为通过自动静态分析工具标记。
The following code shows one way to implement this pattern in C#.
以下代码显示了在 C# 中实现该模式的一个方式。
In fact, the injection of code for crosscutting concerns is a pattern of sorts.
实际上,横切关注点代码的注入,就是一种类型的模式。
Unlike most of the following patterns, there was no actual code associated with the pattern; it formed the basic conceptual framework for all following implementation.
与下列的大多数模式不同,该模式实际上并没有与之相关的代码;它针对以后的实现形成了一个基本的概念化框架。
This pattern encapsulates code for accessing components through directory services, such as JNDI client code, so that a client can simply pass in the name of a resource and get back that resource.
这个模式通过目录服务封装访问组件的代码,如JNDI客户端代码之类,因此客户端可以简单的以资源名通过验证并返回这个资源。
As this article has shown, implementing the DAO pattern entails more than just writing low-level data access code.
正如本文所展示的,实现DAO模式需要做比编写低级别的数据访问代码更多的工作。
Smaller, more concise build files are much easier to maintain and understand; in fact, this pattern happens to hold true for code as well.
更小、更简洁的构建文件维护和理解起来要容易得多。实际上,这种模式对于代码而言同样适用。
By separating the responsibilities of displaying data, persisting data, and handling user interaction, the MVC pattern tends to create code that is easily understood.
通过分离显示数据、持久化数据和处理用户交互的职责,MVC模式有助于创建易于理解的代码。
Creating intermediate facts is a useful pattern to avoid duplication of rule code.
要避免规则代码的复制,创建中间事实是一个很有用的模式。
This is the code I ultimately refactor into its own idiomatic pattern in "Leveraging reusable code, Part 1."
这就是在“利用可重用代码,第1部分”中我最终重构到它的惯用模式中的代码。
The pattern service and pattern framework provide the basic functions to structure, design, code, search for, organize, and apply patterns.
模式服务和模式框架提供构建、设计、编码、搜索、组织,及应用模式的基本功能。
However, if you can make the idiomatic pattern stand out from other code, it's easier to see that it is in fact something different.
不过,如果您可以将惯用模式从其他代码中凸显出来,这样就可以更容易地看到它的不同。
Listing 9 shows a pattern that I introduced in "Leveraging reusable code, Part 2" under the guise of removing structural duplication.
清单9显示了我在“利用可重用代码,第2部分”中引入的一个模式,它以删除结构性重复为名义。
Problems discovered during unit testing are fixed in the corresponding pattern or code template, not in the generated code.
单元测试期间发现的问题在相应的模式或代码模板中就可以修改,而不是在生成的代码中修改。
Conditional and procedural elements in the pattern are expressed with code in special callouts.
有特别标注的代码能够表示模式中的条件性及程序性的单元。
Using the increasing size of the repeating pattern makes the code simple.
使用重复模式的递增的大小使代码简化。
Your quest is to create code that inputs a deviant pattern and outputs just one base pattern.
您寻求的是创建代码,以使得可以输入不正常的图案而输出应得的一个基本图案。
You might even say this pattern is a kind of code, a code that is hidden in the Scriptures and that, once revealed, unlocks the secret of God's changing moods.
你可以把这种模式看成一种编码,一种隐藏在各教派经书中的编码,一旦破解这种编码,也就破解了上帝摇摆不定情绪的秘密。
This type of approach to transformation leverages both a declarative and visual style of pattern definition with the underlying control of code.
该类型的转换方法利用了说明和图形式样的模式定义进行代码的优先控制。
Once you've objectively determined there's a problem in the code, you can use a handy refactoring pattern to improve it.
一旦客观地判断出代码中有问题,那么就可以用方便的重构模式改进它。
Traditional programming model requires writing a significant amount of code in order to support this pattern.
传统编程模型要求编写大量的代码来支持此模式。
By using the Decorator pattern, it is simple to separate the code that performs invocations from the code that provides caching itself.
通过使用装饰模式,实现执行调用的代码与提供缓存的代码相分离,将非常简单。
Binding a code template to an operation in a pattern will cause that code to be generated when the code and model are synchronized.
在模式中,当代码和模式同步时,把代码模板绑定到一个操作,便会生成相应代码。
The key is pattern matching, as in Figure 1. Instead of coding commands, you code patterns.
其中的关键就是模式匹配,如图1 所示。您不需要编写命令,需要编写的是模式。
The other developers then only need to apply the transformation to generate code for fulfilling the pattern; they don’t need to know the details of the implementation.
其他的开发人员只需要应用转换来生成满足模式的代码,而无需知道实现的细节。
The code in Listing 11 also shows another possible usage pattern.
清单11中的代码也带出了另一种可能的应用。
应用推荐