Listing 11 shows some basic usage of the pattern matching expansions.
清单11给出了模式匹配扩展的一些基本用法。
The key is pattern matching, as in Figure 1. Instead of coding commands, you code patterns.
其中的关键就是模式匹配,如图1 所示。您不需要编写命令,需要编写的是模式。
On a personal note, I prefer not to use the LOCAL pattern matching on any hosts, as all the hosts in the network should belong to your or some domain.
就我个人而言,我不喜欢使用在任何主机上匹配的LOCAL模式,因为网络中所有主机应该属于您的或是某个域。
The built-in operators make text searching, replacing, and pattern matching effortless.
内置的操作符使得文本搜索、替换和模式匹配轻而易举。
The pattern matching operation is potentially expensive, so it is vital to focus the search intelligently.
模式匹配操作可能是非常昂贵的,因此智能地集中搜索是非常重要的。
This tutorial also assumes that you understand the value of developer testing and are familiar with basic pattern matching.
本教程也假设您理解开发人员测试的价值,并熟悉基本模式匹配。
Viewed in this context, the data cleansing pattern allows an enterprise to extend its capabilities for validation and matching to the point of creation.
从此上下文中来看,数据清理模式允许企业将其验证与匹配功能扩展到创建点。
Finally, we can use pattern matching to pull out the elements from a list or tuple using the construct notation mentioned earlier.
最后,可以按前面提到的构造表示方法,使用模式匹配从列表或元组中提取元素。
The categorization is achieved by employing pattern matching techniques on the data types of objects in the ownership context of each object in the dumps.
通过对转储中每个对象所属权上下文中的对象数据类型使用模式匹配技术来完成分类。
Instead, check to make sure the input matches a certain pattern that you know is safe, and reject anything not matching the pattern.
所以,应该检查并保证输入符合你认为是安全的特定模式,而拒绝不符合这个模式的所有输入。
The data cleansing pattern is defined as the standardization, clean-up, and ultimately, matching (or de-duplicating) records based on the content of freeform text fields.
数据清理模式定义为标准化、清理并最终基于自由格式文本字段的内容进行记录匹配(或消除重复项)。
The pattern they uncovered, of people matching up with their financial opposites, could be one reason money is the source of so much tension in so many marriages.
他们发现的这种在理财上寻找截然不同者结婚的模式可能是导致如此多婚姻关系紧张的根源。
An IP address matches a netmask based on precise bit pattern matching rules (beyond the scope of this article).
基于精确的位模式匹配规则(超出本文范围),IP地址与网络掩码相匹配。
The next two lines use pattern matching to pick off the values required to enforce this rule when the returned function is actually executed.
接下来两行用模式匹配摘出实施规则所必需的数据。
Given that both weigh in at about the same number of lines of code, where is the value of using pattern matching?
考虑到相同的代码量,使用模式匹配的价值体现在哪里?
The pattern matching chapter is sufficient for learning about this fascinating side of Perl.
模式匹配这章足以让您掌握Perl的这一令人心醉的特性。
The Zen of XSLT: pattern matching
XSLY 的秘诀:模式匹配
Parameter expansion also includes some pattern matching capabilities with the same wild card capabilities as used in filename expansion or globbing.
参数扩展还包括了一些模式匹配功能,该功能带有在文件名扩展或globbing中使用的通配符功能。
You learned about the basic Boost checks, pattern matching, floating point comparison, custom checks, test suite organization-both manual and automatic-and fixtures.
讨论了基本的Boost检查、模式匹配、浮点比较、定制检查、测试套件的组织(包括手工和自动)和装备。
You can use the pattern matching in Erlang so that a path on one side triggers a specific response.
您可以使用Erlang中的模式匹配,因此一端的路径可触发特定响应。
Once a bug is fixed developers can use the "find matching clones" to see other code that follows the same pattern.
某个bug修复后,开发人员就可使用“查找匹配克隆”功能来看看其他遵循同样模式的代码。
Pattern matching is used to evaluate the arguments to the function, so if you supply a tuple with three elements to the mathexp() function, the pattern matching will fail.
使用模式匹配评估函数的参数,所以如果把包含三个元素的元组提供给mathexp() 函数,模式匹配会失败。
The reaction methods are executed via pattern matching between the When clauses and the size of the queues.
执行相关的React方法则是通过对When子句与队列大小进行模式匹配。
Pattern matching is also useful for the design problem where you need to get at data inside an object, but only in special circumstances.
在你遇到需要从对象内部提取数据的设计问题时,模式匹配也有用,但是仅限一些特殊的情况。
The key to success with a socket wrench is pattern matching: The socket must match the nut.
成功使用套筒扳手的关键在于模式匹配:套筒扳手必须与螺母相匹配。
In that example, pattern matching was used to extract both the head and the tail of the list.
在这个示例中,使用模式匹配提取列表的开头和结尾部分。
The idea of active patterns is to enable you to use the pattern matching syntax with other data structures.
活动模式的思想就是让你能把模式匹配语法用于其他数据结构。
You can limit the categories that are searched, and you can use Boolean expressions and pattern matching to further refine the search.
您可以限制搜索的类别,还可以使用布尔表达式和模式匹配来进一步精化搜索。
If it's not, it won't — one of the tricky things about performing pattern matching.
如果格式不好,则不会正确匹配——这是执行模式匹配任务的一件棘手之事。
Matching modes, which describe the different types of pattern matching that can be specified through the function's parameter mode.
匹配模式,描述了可以通过函数的参数MODE指定的模式匹配的不同类型。
应用推荐