You implemented your state table as a common handler for all events, plus a function array for all actions and transitions.
将状态表实现为适用于所有事件的通用处理函数,并为所有操作和转换提供一个函数数组。
It takes a single parameter, a function, and applies the function to each element in the array.
它接受单个参数:一个函数,并将此函数应用于数组内的每个元素。
The function takes two parameters: "array of rows" and "array of columns".
这个函数接受两个参数:“行数组”和 “列数组”。
The STORE function creates an entry in both the primary and the secondary array (normal and reverse mapping).
STORE函数同时在主数组和辅数组(常规和反向映射)中创建一个项。
The input in this example is a simple string, so you populate the argument array with a string and pass it to the invoke function.
此示例中的输入是一个简单的字符串,因此将使用字符串填充参数,并将其传递给调用函数。
The example in Listing 1 illustrates variable creation of a variety of types (int, float, string, array, and function).
清单1中的示例说明了如何创建多种类型的变量(整型、浮点、字符串、数组和函数)。
For example, consider a function that accepts an array and returns a Task.
例如,假设一个函数会接受一个数组作为参数,并返回Task。
The previous parameter is replaced by the result of the function, and this process is repeated with the next element in the array until all of the elements are used.
而previous参数之后会被此函数的结果替代,并且这个过程还会针对数组的下一个元素重复,直到所有元素都用完为止。
The Perl subroutine checksize traverses over the whole file (as part of the @_ implicit array in Perl) and keeps checking for function lengths.
Perl子例程 checksize 处理整个文件(作为 Perl数组 @_ implicit的一部分)并检查函数长度。
In this case, the function may be called with as many arguments as you wish, and those values are collected into a single variable: an array named a: 000.
在本例中,函数可以使用任意数量的参数调用,并且这些值被收集到一个单一变量中:一个名为a: 000的数组。
Notice that the index function creates an array called data that contains three named indices: title, headline, and include.
注意,index函数创建了一个名为data的数组,该数组包含三个已命名的索引:title、headline和include。
In each of the top five indices of the result array, this function stores the provider name, total number of feed items received, title array, URL array, and the description array, respectively.
在结果数组的前5个索引中,此函数分别存储了提供者名称、收到的提要条目的总数、标题数组、UR l数组和描述数组。
It USES an array of functions (cellfuncs in the code) where each function is used to extract and transform the data so it can be put into a table cell.
它使用了一个函数(此段代码中的cellfuncs)数组,其中的每个函数都用来压缩或转换数据,以便将数据放入表的单元格内。
The method does select a function to call from the actionTransitionFunctions table using the current state and event type as associative array indexes.
这个方法使用当前状态和事件类型作为关联数组的索引,从actionTransitionFunctions表中选择要调用的函数。
After the events have been chewed up and returned as an array from the get_events function, I need another function that exports that array of events as XML.
事件完成并作为来自get _ events函数的数组返回后,我还需要另外一个函数,将这个事件数组导出为XML。
Calling the function in Listing 2 from the reporting application creates a multidimensional array—some sample values are $ccaarr[2][0]=2005 and $ccaarr[2][6]=0.1.
从报表应用程序调用清单2中的函数会创建一个多维数组 —一些样例值是 $ccaarr[2][0]=2005和 $ccaarr[2][6]=0.1。
The end_tab function stops the output buffering and stores the resulting HTML in the html value in the current_tab of the tabs array.
end_tab函数终止输出缓存,并将作为结果的HTML存储在tabs数组的 current_tab 的 html值中。
The array concat function takes an array of strings as an input and returns a concatenation of the strings into a single string output.
arrayconcat函数获取一个字符串数组作为输入并在字符串输出中返回联接后的这些字符串。
Each function is called in turn with an Item from the array and should return the content with which to populate the corresponding cell.
按照顺序使用来自数组的Item逐个调用每个函数,并用返回的内容填充对应的单元格。
If there are multiple requests, loop through the array of requests and call the doRpc function for each one.
如果有多个响应,通过请求数组循环,为每一个调用dorpc函数。
They take in a function as a parameter to use when a match is found. This function receives the match array as a parameter and returns a modified string that is used as a replacement.
你可以为preg_replace_callback指定某个函数为参数,此函数能接收匹配结果数组为参数,并将数组修改后返回,作为替换的结果。
In that case, a better solution is to pass setMeta() a two-dimensional array with name-value pairs and have the function loop through it -- performing all the activities simultaneously.
在这种情况下,更佳的解决方案是将带有名称-值对的两维数组传递给setMeta() ,并且让函数循环执行该数组 — 同时执行所有操作。
You can now run this function on users.php and check to see if a particular user ID is in the array.
现在可以在users.php 上运行这个函数,检查某个用户ID是否在该数组中。
The associated values array is generated inside the hash function and is indexed using keysig characters.
关联值数组在hash函数内部生成,并使用keysig字符进行索引。
It takes a function as its parameter and applies the function sequentially to each object in the Array.
它使用一个函数作为它的参数,然后依次将这个函数应用到Array中的每个对象中。
Node content is now stored in a structured array in the same way the form elements are stored in the form API structured array and is rendered using the drupal_render function.
节点内容现在存储在一个结构化数组中,存储方式与在FormAPI结构化数组中存储表单元素的方式相同,可以使用drupal_render函数显示节点内容。
The capacity of a slice s is the size of the array from s [0] to the end of the array, and is returned by the cap built-in function.
切片s的容量是数组从s[0]到数组尾端的大小,并由内建的cap函数返回。
And the use of the filter function on the Array type to apply the "greater-than," "equals," and "less-than" functions to each element therein.
可以对Array类型使用filter函数,从而对其中的每个元素应用“greater - than”、“equals”和“less -than”函数。
The above example is a good use case for closures: It USES one of the 18 standard PHP array functions that take a function as a parameter (such as array_walk, usort, and array_app).
以上示例是closures很好的使用例子:它采用18个标准php阵列函数之一,它将函数作为参数(比如array_walk、usort、和array_app)。
The above example is a good use case for closures: It USES one of the 18 standard PHP array functions that take a function as a parameter (such as array_walk, usort, and array_app).
以上示例是closures很好的使用例子:它采用18个标准php阵列函数之一,它将函数作为参数(比如array_walk、usort、和array_app)。
应用推荐