结论:优先采用改进for循环,但在性能要求苛刻的ArrayList迭代中,考虑采用手写计数循环。
To summarize: use the enhanced for loop by default, but consider a hand-written counted loop for performance-critical ArrayList iteration.
但是,如果有一个投票周期,计数循环不已,因为每个候选人至少有一个竞争对手谁得到暂停票超过50 %的选民。
But if there is a voting cycle, the tally loops endlessly because every candidate has at least one rival who gets suspended votes from more than 50% of voters.
在同时使用了垃圾收集和引用计数的混合系统中,将会发生泄漏,因为系统不能正确识别循环引用。
In a hybrid system, where both garbage collection and reference counting are being used, leaks occur because the system fails to identify a circular reference.
引用计数也难以处理发生循环引用的数据结构。
Reference counting also has difficulties with structures having circular references.
为了避免无限循环,IBM的jms类会检查消息的恢复计数以及输入队列的恢复阈值和恢复队列属性。
To prevent an infinite loop, IBM's JMS classes inspect the message's backout count, as well as the backout threshold and backout queue attributes of the input queue.
它可用于保存可以在执行Branch指令期间递减的循环计数。
It can be used to hold a loop count that can be decremented during execution of Branch instructions.
如果此程序在单处理器或卸载的多处理器上运行,则每个线程打印的for循环迭代计数大致相同。
If this program is run on a uniprocessor or unloaded multiprocessor system, each thread prints out close to the same for loop iteration count. In one run, the program printed.
当然,也可以反向而不是正向运行循环,或者使用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开始,每执行一次循环递增一次。
By default, this counter starts at 1 and is incremented each time the loop is taken.
但是由于首先执行优先级为4的线程,因此在五秒钟的执行时间间隔中,它分得的时间稍多一些并且打印的循环计数也稍大一些。
But, because the thread at priority 4 executes first, it should have a slightly larger share of the five-second execution interval and print out a higher loop count.
目前为止的示例(计数器和堆栈)都是非常简单的非阻塞算法,一旦掌握了在循环中使用CAS,就可以容易地模仿它们。
The examples so far -- counter and stack -- are very simple nonblocking algorithms and are easy to follow once you grasp the pattern of using CAS in a loop.
当两个对象互相引用时,就构成了循环引用,其中每个对象的引用计数值都被赋1。
A circular reference is formed when two objects reference each other, giving each object a reference count of 1.
此建议提供一个RUNSTATS作业,您也许会想要将其定期包含在您的维护循环中,以维护相关统计数据。
The recommendation provides a RUNSTATS job that you might want to include periodically in your maintenance cycle to maintain the health of the relevant statistics.
循环计数器应该是可变的吗?
然后再将寄存器127用作循环计数器,将寄存器126用作基指针,并在每个值上执行convert _ to_upper,直到到达缓冲区的底部为止。
You then use register 127 as your loop counter and register 126 as your base pointer, and perform convert_to_upper on each value until you get to the end of the buffer.
变量一般最好根据用途命名(如 firstName或rtitle),不过由于这个变量基本上是一个循环计数器,也可使用单个字母。
Normally, variables are best named by their use (like firstName or title), but as this variable is essentially a loop counter, using single letters is also fine.
噪声载荷是一种高频、宽带随机载荷,在低循环疲劳寿命预测中被广泛采用的时域计数法很难直接利用。
Sonic loading is a high frequency, broadband random process. Basic cycle counting methods, which are prevalently used in time domain, are difficult to be applied.
减小前一个示例中的循环计数值,在脚本的开头添加set - x和一个注释,见清单12。
Tone down the loop count on the previous example, add set -x to the beginning of the script as well as a comment, and execute it, as shown in Listing 12.
对于这种情况,通常需要3次循环才能执行一次更新(首次更新尝试失败;获取当前的计数器值;最后成功更新)。
In that case, it will usually cost three round-trips to do an update (the initial failed update attempt, the fetch of the current counter value, and the final successful update).
第三部分由0开始,循环进位,直到进位满了之后再清零,重新开始计数。
The third part begins with 0, does end-round carry, clears when the carry is full and restarts counting.
用于递增或递减循环计数器的一条或多条表达式语句。
Expression statement or statements to increment or decrement the loop counters.
主线程是一个基于对话框的控件,辅助线程是一个耗时很长的循环计数。
The main thread was a controls based on dialog, the worker thread was a circulation of counting lasting a long time.
通过设计实例表明,采用快速综合法设计循环码计数器具有一定的优点和实用意义。
Some design examples show that the adoption of the fast synthesis of the cyclic-code counter is of great advantage and practical significance.
此外,还提出了使用附加触发器时循环码计数器的快速综合法。
Furthermore, a fast synthesis for the cyclic-code counter using additional flip-flop is also proposed.
采用雨流法完成载荷循环计数过程,并使该过程实现可视化。
The counting process of load cycles is fulfilled to make use of "the raindrop flow method".
通过平皿计数法研究了不同类型木质素磺酸盐及其组分对循环冷却水中细菌繁殖速度的影响。
In this paper, the effect of lignosulfonates on bacteria reproduction rate in recirculated cooling (water) has been studied by plate counting method.
应用局部应力应变法估算构件疲劳寿命时,通常要采用循环计数法。
Counting the number of cycles is the common method of estimating the life of fatigue of a component.
应用局部应力应变法估算构件疲劳寿命时,通常要采用循环计数法。
Counting the number of cycles is the common method of estimating the life of fatigue of a component.
应用推荐