从第一个正则表达式开始,创建一个来自数据文件的记录数组,然后循环执行其余的正则表达式以改进结果。
Starting with the first regular expression, create an array of records from the data file, then loop through the remaining regular expressions to refine the results.
对于音调文件中的每个音调,构建音调和时间数组以供匹配。
For each tone in the tone file, build the tonal and temporal arrays for matching.
完成时将返回匹配平面文件中的记录的最终数组。
Finish by returning the final array of matching records from the flat file.
与角色表一样,提示将被添加到数组中,经过序列化并存储到文本文件中。
As with the character sheet, the notes are added to an array, serialized, and stored in a text file.
一旦连接起来,你就能读写文件的任意部分,就像它已经不再是非托管内存数组了。
Once linked, you can read and write to any part of the file as if it were nothing more than just an array of unmanaged memory.
从文件中读取内容的操作是非常直截了当的:我们打开一个文件流对象,创建一个数组来放置数据,最后把所有数据都读到这个数组中。
The operation of reading from a file is very straight forward, we open a file stream, create an array to hold the data, and finally read all the data into the array.
在编程语言中,应该使用数组来表示与一个用户相关联的文件。
In a programming language, you would use an array to represent the files associated with a user.
解析器代码接收一个JSON对象作为输入并返回一个数据字典(或一个数组),包含JSON文件中介绍的所有对象。
The parser code receives a JSON file as input and returns a data dictionary (or an array) containing all the objects described inside the JSON file.
将文件转换成字节数组。
在该文件的顶部,有一个数组中包含了样例所使用的名称、用户ID和电话号码,如清单1所示。
At the top of this file there is an array containing the names, user IDs, and phone Numbers that are used in the sample as shown in listing 1.
如果在文本文件的每一行中存放一个名字,则可以轻松地用换行符分隔文件内容以构建源代码数组。
If we put one name per line in our text file, we can easily split the file contents on the newline character to build our source arrays.
下一步是把要发送的文件转换成字节数组。
The next step is to convert the file that I want to send into a byte array.
执行清单2的代码后,结果是转储整个XML文件,当然是在一个数组中。
When you execute the code in Listing 2, the result is a dump of the complete XML file, in an array, of course.
然后,此函数会遍历结果数组并会把结果数组中所有提要条目的rss提要条目细节都写入该文件。
Then it iterates over the result array and writes to the file with the RSS feed item details for all the feed items in the result array.
解析过程中,配置文件中的元素和数据转化成类似PHP关联数组的键-值对。
During this parsing process, the elements and data in the configuration file are converted into key-value pairs, similar to that found in a PHP associative array.
清单4中的代码首先定义一个数组,其中第一个元素是要执行的二进制文件的路径,其余元素充当命令行参数。
The code in Listing 4 first defines an array, with the first element being the path to the binary that is to be executed, and the remaining elements acting as the command-line parameters.
注意:lsxsd. lss库中包含的类允许您传递字符串数组、文件和日期。
NOTE: The lsxsd.lss is a library that contains classes that allow you to pass string arrays, files, and dates.
Perl子例程 checksize 处理整个文件(作为 Perl数组 @_ implicit的一部分)并检查函数长度。
The Perl subroutine checksize traverses over the whole file (as part of the @_ implicit array in Perl) and keeps checking for function lengths.
调用readlines方法将文件中的所有行读入一个名为lines的数组。
Call the readlines method to read all the lines in the file into an array called lines.
例如,FlatFileAdapter不知道其处理的文件的内容,因此将文件内容作为二进制数组进行处理。
For example, the Flat file Adapter is agnostic of the content of the files it processes, and thus, treats the contents of the file as a byte array.
当Database创建这个文件时,它将其大小设为16KB,并分配数组中的第一个Chunk来进行缓冲。
When the Database creates this file, it sets its size to 16 KB and allocates the first Chunk in the array to buffer.
注意定义文件中type属性的值:元素映射到一个数组,嵌套的映射为简单字符串值。
Notice the values of the type attribute in this definition file: the element is mapped to an array, while the nested s are mapped to simple string values.
我们可以认为userdata就是一个字节数组——字节可以表示指针、结构或宿主应用程序中的文件。
You can think of userdata as an array of bytes — bytes that might represent a pointer, a structure, or a file in the host application.
lss文件(可以在本地的Notes程序目录中找到)中的类是很有用的,允许传递字符串数组、文件和数据。
The classes in the lsxsd.lss file (which can be found in your local Notes program directory) are very useful and can allow you to pass string arrays, files, and dates.
Phar对象使用ArrayAccessSPL 对象,允许以数组的形式访问归档内容,因此提供了许多方法来向归档添加文件。
The Phar object uses the ArrayAccess SPL object to allow accessing the contents of the archive as an array, so it opens up many ways of adding files to the archive.
根本的缺陷在于,ReadAllLines会暂停程序的运行直到整个文件都被读到字符串数组中。
The fundamental flaw is that ReadAllLines does just that, it pauses the program until the entire file can be read into an array of strings.
稍后我们将考虑这是如何工作的;目前只是注明它返回KeyManager对象数组,已经利用必需的KeyStore文件和密码对其进行了设置。
We'll worry about how this works later; for the time being simply note that it returns an array of KeyManager objects which have been set up with the required KeyStore file and password.
这对x,y值被保存到textLocs数组中并且为数据文件中定义的相应的文本注释行提取它。
This x,y value is stored in the textLocs array and is extracted for the respective text annotation line as defined in the data file.
在文件顶端,为years和countries数组预先加载年份、国家列表及其扫盲值。
At the top of the file, preload the years and countries arrays with the years, and the list of countries and their literacy values.
注意:数组需要在lsxsd . lss文件内定义的ARRAY_HOLDER数据类型之一中返回(本系列的上一篇文章更详细地讨论了这种情况)。
NOTE: the array needs to be returned within one of the ARRAY_HOLDER data types defined in the lsxsd.lss file (the previous article in this series discusses this situation in more detail).
应用推荐