What we do is, in a loop, march down the argument list checking each one to see if it is an option.
我们所做的是,用一个循环遍历参数列表检查每个参数来看它是否为选项。
Since you do not have to wait for a list to be generated (stop and go) or allocate a thread to processing the loop (pipelining), this can be the most efficient method.
由于您无需等待一个列表生成完毕(停止并前进)或者分配一个线程用于处理循环(并行管道),这可能是最有效率的方法了。
Thus the garbage collector can reclaim most of the memory allocated on each loop, but it can't reclaim the arrays that are added to the list.
因此,垃圾收集器可以回收在每个循环上分配的大多数内存,但它不能回收添加到列表中的数组。
These scripts might execute a loop, or perhaps open a long list of files, forgetting to close the current file before opening a new one.
这些脚本可能执行循环,也可能打开一张长的文件列表,忘记在打开新文件之前先关闭当前文件。
If the condition evaluates to TRUE, the statement list is executed, then control resumes at the top of the loop.
如果条件的求值结果为TRUE,那么就将执行语句列表,在循环的顶部恢复控制。
The top loop in the algorithm iterates over the list of XML elements and attributes that may appear in the XML document.
该算法中的顶层循环对可能出现在XML文档中的xml元素和属性的列表进行迭代。
There are always things and unimportant-yet-urgent tasks we can add to the list to keep feeding into this loop of “insanity”.
我们总能够找到一些事情或紧急却不重要的任务,然后将他们填进自己的待办事项清单里,如此我们就陷入了一个“荒唐”的循环中。
After the loop is done, we push the length of the data at the end of the list.
循环完成后,我们将数据的长度压入到序列的尾部。
You can then use that list in a for each loop, referencing each one in turn and adding it to the appropriate span.
然后,可以在一个foreach循环中使用这个列表,引用每个元素并把它添加到适当的span 中。
The options of a form list are generated in a loop with {section}, as shown in Listing 13.
一个表单列表的选项是在一个循环的{section}中生成的,如清单13所示。
In the first example, the results of List.size could become invalid during the execution of the loop, because another thread could delete items from the list.
在第一个例子中,List .size的结果在循环的执行期间可能会变得无效,因为另一个线程可以从这个列表中删除条目。
To create the grid, loop through each row, and for each box, create a drop-down list by looping through each of the entry elements in the templates instance.
要创建表格,需要循环遍历每一个row元素,通过遍历templates实例中的每个entry元素为每个box元素创建一个下拉列表。
A variable in a loop or list comprehension ranges over the elements of a list, or a collection of objects.
循环或列表中的变量包括了列表或对象集合的所有元素。
When the loop is finished, the code will have a fully populated Channel object and a list of fully populated Item objects.
循环结束时,代码将拥有一个完全填充的Channel对象和一个完全填充的Item对象列表。
Each loop iterates over a list that contains the integers 1 to 10, inclusive.
每个循环都迭代包含整数1至10(包含10)的list。
To walk through the completions table, the function USES a special version of the for statement. The standard for loop in Vimscript walks through a one-dimensional list, one element at a time.
为了遍历补全列表,该函数使用一个特殊版本的for语句。
To refresh your memory, Listing 20 shows how a typical for loop might be used — note the usage of an index variable to not only move through the list, but also to indicate position.
为了提醒您,清单20显示了典型for循环的一个可能用法。
Therefore, it suffices to loop across a single level in the tag list (except when we look exactly one level lower for the specific markup production, such as "title").
因此,对于循环遍历标记列表中的单个级别,它已经足够了(除非我们正好寻找比特定标记产品级别低一级的级别,譬如“title”)。
I'm going to build a list. Right, you can see that little loop going through there.
我要创建一个列表,是的,你可以看到这里有一个小小的循环。
Finally, we loop through the tag list, and emit some new marked-up text.
最后,我们循环遍历标记列表,并且发出一些新的标记文本。
It is best to append these internal links to the document's base URL so that if you need to loop through the list again (as in the next task), you have a full URL.
最好将这些内部链接附加到文档的基url之后,这样如果您需要再次遍历该列表(比如在下一任务中),您可以拥有完整的URL。
One of the differences is trivial: You're now looping over a list rather than an array, which causes minor changes in the loop control.
其中有一点微不足道的差别:现在将在一张列表内而不是在数组中循环,这将导致需要在循环控制中执行一些小更改。
After all that comes the heart of the script: a simple for loop that processes each file in the files list.
完成所有这些定义之后,接下来就是脚本的核心了:一个简单的for循环,用于处理文件列表中的各文件。
I used one unsupported list comprehension in my code, which I had to unroll into a regular for loop.
在代码中,我使用了一个不支持的列表,将其放入一个普通的for循环。
Then the last for loop in that section iterates over that quasi-RSS list, sorts the items, and uses the rss-row() function to the format the information.
然后,这一部分中的最后一个for 循环将在这个准 RSS列表上进行迭代,对项进行排序,并使用 rss-row()函数对信息进行格式化。
The for loop iterates over the list of substrings, printing out each substring and its length.
for 循环迭代子字符串 list,打印每个子字符串及其长度。
Finally, the whole line is concatenated to the existing HTML so you have a complete list when the for loop is completed.
最后,所有行连接成现在的HTML,当for循环完成后,就有了完整列表。
The Python list is a mutable sequence, which creates an intriguing possibility: that the body of the for loop could modify the list it is being iterated over.
Pythonlist是一个可变序列,提供了一种令人好奇的可能性:for循环主体可以修改其正在迭代的list。
Substep 3-2 is to run a while loop for each item in the list.
子步骤3 - 2是为清单中的每一产品运行while循环。
Because you assign the output of the entire for loop to the variable, the effect is that you place a list of the quasi-RSS item XML into the variable for all feeds.
因为要将整个for循环的输出指定给变量,所以结果就变成您将准rss项x ML放置在用于所有提要的变量中。
应用推荐