Listing 5 USES both Ruby code and expressions. Notice the text in the body of the do loop.
清单5使用了Ruby代码和表达式。
What we do is, in a loop, march down the argument list checking each one to see if it is an option.
我们所做的是,用一个循环遍历参数列表检查每个参数来看它是否为选项。
The loop simply iterates through the array and prints each line as it would do on the command line, but enforcing an XHTML break-line element after each print.
此循环迭代这个数组并打印每一行,与它在命令行上所做的无异,只不过在每次打印后均强制使用一个xhtml断行元素。
The only thing that you cannot do is to create a cycle, meaning the source activity links to the target activity which links back to the source (similar to an endless loop).
您唯一不能做的是创建循环,即将源活动链接到目标活动,而目标活动又链接回源活动(类似于无限循环)。
Since we do network transmission on every core and since we poll for network IO from the scheduler’s idle loop, we distribute network processing evenly across all cores.
由于我们在每个核心上进行网络传输,同时由于在调度器的空闲循环中对网络IO进行轮询,我们将网络处理均匀地分散到每个核心上。
So now all you need to do is change the loop so that it will utilize this.
现在您所需要做的就是更改循环以利用这种方法。
Well I ought to be able to do that by simply generalizing the loop. And that's what the next piece of code on your a hand out shows you.
好的通过生成这个循环,我应该能够达到目的,这也是你们的讲义中下一段代码。
Note that the extension is easy to understand and modify, and that it can do the job just as well as the previous, non-parsing example (see the Event loop with command-line switches).
请注意,很容易理解和修改这个扩展,而且该扩展可以与前面的非解析示例一样出色地完成工作(请参阅带命令行开关的事件循环)。
If, on the other hand, you do a for-each loop against the query a completely different model is used.
另一方面,如果您对于一个查询使用for -each循环,那么执行模型将会完全不同。
You could simply wrap the whole thing in a loop, and keep moving data a piece at a time until the whole string has been processed. Here's the revised code to do this.
可以简单地将所有的事情全部封装到一个循环中,并一次移动数据的一部分,直到整个字符串全部处理完成为止。
Launch into Optim Query Tuner (if installed) directly from SQL-related dashboards to do immediate tuning of problematic SQL, closing the loop on performance problem resolution.
直接从SQL相关的面板启动OptimQueryTuner(如果已安装)来快速调整有问题的SQL,结束性能问题解决循环。
This way, container classes that do not build on the core collections framework can still take advantage of the new for-each loop.
这样,不是在核心集合框架上构建的容器类也能利用新的for - each循环。
Next, set up your test to loop through all of the data. The easiest way to do this is by adding a loop.
下一步,设置您的测试循环测试所有数据。
What we have to do is loop until we have less than ten results or until there is an error. The loop looks like this!
我们需要使用一个循环进行遍历,直到所返回的结果少于10个或出现错误为止。
The template uses a Template Toolkit FOR loop to iterate over the images, unsorted (if you need sorting, it's better to have the Perl code do it outside the Template Toolkit environment).
模板使用了TemplateToolkitFOR 循环来遍历(未分类的)照片(如果需要进行分类,最好在 Template Toolkit 环境之外使用 Perl代码完成这个操作)。
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.
由于您无需等待一个列表生成完毕(停止并前进)或者分配一个线程用于处理循环(并行管道),这可能是最有效率的方法了。
You do this so as to not bombard the cloud manager with requests, and also to not have the flow run a continuous loop unnecessarily.
这样做的目的有两个:一是避免过多的请求“轰炸”云管理器;二是避免流不必要地持续运行循环。
The last thing we need to do is activate our POA to start queuing client requests and force the server to enter its event loop to receive those incoming requests.
最后要做的一件事,就是激活poa,使客户机请求开始排队,并强制服务器输入其事件循环,以接收这些传入的请求。
All that's left to do now is to loop over the collection, printing the content, author, and publication date of each.
现在所有剩下要做的就是迭代通过集合,打印出每个帖子的内容、作者和发布日期。
The above example shows that sequential scan and indexes are used to do the data retrieval, and the nested-loop join method is used to join all tables.
以上示例展示了如何使用连续扫描和索引来进行数据检索,以及如何使用嵌套循环连接方法来连接所有表。
When interest rates are low, consumers and businesses do not just borrow money; they borrow money to buy assets, setting up a feedback loop that can eventually lead to a bubble.
当利息较低时,消费者与商人并非仅仅借贷资金,他们将借来的钱购买资产,形成反馈循环,最终导致泡沫。
The two users will simultaneously do the two actions in a loop.
两个用户同时循环进行两个活动。
Tools and applications sometimes hang (do not respond to any mouse or keyboard input) because of an infinite loop, deadlock, or other problem.
由于死循环、死锁或其他的问题,工具和应用程序有时会挂起(不会响应任何鼠标和键盘输入)。
To do that, loop through the workspace elements in the document.
为此,遍历文档中的工作空间元素。
The for loop essentially says "for each item element, do the following."
for循环实际是说“对每个item元素,做以下事情。”
Notice how this method accounts for possible weak references in the queue with the do-while loop.
请注意该方法如何用do -while循环来处理队列中可能存在的弱引用。
You can do this with a very simple for loop, as demonstrated in Listing 7 below.
您可以使用一个非常简单的for循环来完成这项任务,如下面的清单7所示。
But notice unlike a for loop, if you want to declare a variable or increment or decrement to variable, you've got to do that yourself.
但请注意不像for循环,如果你想声明一个变量,或者变大或变小一个变量,你需要自己完成。
Of course, you can run loops backward instead of forward, or increment the loop counter by something other than 1, or even eliminate the loop counter completely as you do in a while statement.
当然,也可以反向而不是正向运行循环,或者使用1之外的循环计数器增量,甚至像while语句那样完全取消循环计数器。
Of course, you can run loops backward instead of forward, or increment the loop counter by something other than 1, or even eliminate the loop counter completely as you do in a while statement.
当然,也可以反向而不是正向运行循环,或者使用1之外的循环计数器增量,甚至像while语句那样完全取消循环计数器。
应用推荐