本文将展示这两种类型的函数示例。
You'll see examples of both types of functions in this article.
让我们来看一些基于链表的递归函数示例。
Let's look at a few examples of recursive functions on linked lists.
给出的函数示例有时会使用字段引用以显示函数计算的原理。
Function examples presented sometimes use field references to show how the function works.
在本例中,函数示例一点也不比第一个示例简短,而且一点也不比第一个示例简单。
The functional example in this case is not any shorter than the first example, and it is not really any simpler.
您看到了四个函数示例,您可以扩展、修改并添加新的函数以便帮助您更好地满足您自己的要求。
You saw four examples of functions, to which you can extend, modify, and add new functions to help you better match your own requirements.
在教程的末尾,您将拥有自己的XQuery函数示例,它能够正常工作并且可以满足业务需求。
At the end of this tutorial, you will have a working example of an XQuery function and its applicability to a business requirement.
表1展示了这些函数的一些示例。
将其添加到所有的标记创建函数中,如清单12中的示例所示。
Add it to all tag creation functions, as shown by a few examples in Listing 12.
先使用度量的聚合列表中的第一个聚合函数(在这个示例中是SUM)对表达式模板进行聚合,产生一个查询。
Start by generating the query using the first aggregation function (SUM in the example) in the measure's list of aggregations to aggregate the template expression.
这里有个略微复杂些的示例,它使用定制函数来生成该完成。
There is one slightly more complicated example which uses a custom function to generate the completions.
例如,可以在概述中描述函数调用,稍后在章节的编程示例中再次出现。
For example, a function call might be described in an overview and then later in the chapter in a programming example.
本文提供了一些有关函数索引的示例。
This article provides several samples of functional indexes.
清单8提供了实现的函数用法和函数骨架示例。
Listing 8 provides an example of the function use and skeleton functions for implementation.
通过进一步调整清单3中的示例,可以查明调用每个函数的次数。
You can tune the example in Listing 3 further to find the number of times each function is called.
在这个示例中,使用XMLQUERY函数修改给定的XML文档。
In this example, the XMLQUERY function is used to modify the given XML document.
确定一块代码如何工作的最容易方法之一就是看一下示例,所以包括如何调用成员函数的一个或两个示例是十分有用的。
One of the easiest ways to determine how a piece of code works is to look at an example, so including an example or two of how to invoke a member function is quite helpful.
注意,在上面的示例中,使用表函数提取感兴趣的表的数据比搜索快照输出中的数据简单得多。
Notice in the above example how much simpler it is to extract just the data for the table of interest using the table function rather than having to search for the data in the snapshot output.
我们将考察使用这些函数解析和检查输入而不进行手动编码的原因,并介绍一些如何使用这些新函数的基本示例。
We will look at reasons for why you would use these functions for parsing and checking input, instead of hand-coding, and we cover some basic examples of how to use these new functions.
这个查询示例调用rec2xml函数。
现在您已熟悉了所有小部件通用的函数,下一节将介绍小部件示例特定的函数。
Now that you are familiar with the functions common to all widgets, the next section takes you through the functions that are specific to the sample widget.
在这个示例中,XFormsinstance函数指出命名的实例中的所有数据都受到约束。
In the example, the XForms instance function indicates that all data in the named instance is constrained.
清单3中的代码片段显示了onreadystatechange回调函数的典型实例化示例。
The snippet in Listing 3 shows an example of a typical incarnation of the onreadystatechange callback function.
在我们的示例中,选择更改时将调用updatechart函数。
In our sample, the updateChart function will be invoked when the selection changes.
清单1显示了我们的示例中函数选择器的代码段。
Listing 1 shows an extract of the function selector code that comes with our example.
本文中的示例类还包括main函数,但这不是必需的。
The example class in this article also includes the main function, but that is not a requirement.
fitness函数与最初示例中的相似,但“奖赏”的结构有所不同,而且循环实际上也进行了简化。
The fitness function is similar to the one from the original example, but the reward structure is different and the loop is actually simplified.
要构造示例概要清单,从事件处理函数中调用queryandupdate函数。
To build the example overview list, the queryAndUpdate function is called from the event handler functions.
最后,为Formatdate函数提供了一个示例字段来展示输出中应该提供的信息。
Finally, an example field is provided for the format date function to show what to expect as the output with the information provided.
使用regex函数的sql语句示例。
清单4显示了使用preg_函数读取图书文件的示例。
Listing 4 shows an example of using the preg_ functions to read the books file.
应用推荐