标志确定RSpec执行代码块的频率。
The symbol determines how often RSpec should execute the code block.
首先,将执行代码块中最接近的匹配结果。
The first, closest match results in said code block being executed. So, for example, in Scala you could have.
在粗糙的层次上,您通常只想在开始或结束执行代码块时自动调用不太特定的规则。
At a rough level, you usually just want to automatically call a less specific rule at either the start or the end of execution of a code block.
使用instance_eval方法可使该方法执行代码块,这是Ruby中的内置方法之一。
The method executes the code block using the instance_eval method, one of the built-in methods in Ruby.
例如,Erlang包含一个非常简单的并发模型,允许在同一主机上相对轻松地多次执行代码块。
For example, Erlang includes a very simple concurrency model, allowing individual blocks of code to be executed multiple times on the same host with relative ease.
注意:如果您希望能够启动播放当你有你的第一块,你可以先做后通过执行代码块线程下载+编写完成。
NOTE: If you want to be able to start the playback when you have your first chunk, you may do it by executing that code after the first chunk thread download+write has finished.
它们做的基本上是同一件事:测试一个条件,如果该条件为真,则继续执行提供的代码块。
Fundamentally, each of these does exactly the same thing: it tests a condition, and if true, continues to execute the block of code provided.
每发现一个匹配对象,就会执行一个动作(代码块)。
Everywhere a match can be found, an action (code block) can be executed.
它使用这些信息来确保只对位于同一代码块中相同范围级别的赋值语句执行对齐。
It USES this information to ensure that it aligns only those assignment statements at the same scoping level in the same block of code.
同步的代码块在执行之前需要与客户类对象相关的锁。
This synchronized code block acquires the lock associated with the customer class object before it executes.
代码块上的注释指明了在哪里这些操作会被执行。
Comments in the code block above indicate the points at which these actions are performed.
对于那些具有明确编译阶段的处理程序,use -when筛选通常可以避免编译那些处理程序不能执行的代码块。
For those processors that have an explicit compile phase, use-when filtering is intended to avoid compiling blocks of code that the processor couldn't execute.
它还可以采取动作;当解析器达到表达式中的那个条件点时,封装在中的代码块将会被执行。
It can also take actions; blocks of code enclosed in pairs will be executed when the parser reaches that point in an expression. For instance, one might write.
它基本上就是调用restart时所执行的一些代码块。
It's basically pieces of code to execute when a restart is invoked.
通常,awk会针对每个输入行执行一次每个代码块。
Normally, awk executes each block of your script's code once for each input line.
如果方法名称与HTTPAccept头中的类型匹配,wants方法执行对应的代码块。
A wants method executes the corresponding code block if the method name matches the type in the HTTP Accept header.
以一个常见的编码模式为例,如执行带有Lock的代码块。
As an example, consider any repetitive coding pattern, such as executing a block of code with a lock held.
而在其他情况下,副作用可能造成严重的线程问题或争用情况(此时多个线程竞争执行一个代码块)。
In others, the side-effects can cause serious threading issues or race conditions (where multiple threads compete for the execution of a code block).
在查看了清单3的两个代码块之后,可以看出哪块代码执行得更好。
After examining the two code blocks in Listing 3, see if you can determine which one performs better.
根据我们的观察,我们似乎需要对一些锁的访问进行优化,比如线程执行的同步块代码在一个循环体中。
In light of our observation it seems as if we should be able to optimize access in the case where a thread is looping over a synchronized block of code.
同步代码块所需的执行时间越长,其他线程等待进入该代码块的时间就越长。
The longer a synchronized code block requires for execution, the longer other threads wait to enter that block.
在当前场面的上下文中,执行的最后一个代码块见清单11。
The final block of code occurs within the context of the active scene as shown in Listing 11.
清单2中的代码块实际上未执行任何操作,但是为您提供了快速修改过滤规则的基本方法。
The block shown in Listing 2 effectively does nothing at this point, but gives you a baseline for making quick changes to the filtering rules.
每个事件有一个处理函数,即在发生此事件时执行的代码块。
Every event has a handler which is a block of code that is executed in response to the occurrence of the event.
这个优点让匿名块在诊断问题、原型化和测试过程代码时发挥重要作用,因为这些任务通常需要多个更改-执行过程。
That makes the anonymous blocks very useful when troubleshooting, prototyping, and testing procedural code, because these are tasks that usually require multiple change-and-execute runs.
如果发出请求的代码块是在请求HTML,这段代码会执行第一个闭包;如果发出请求的代码块在请求XML,这段代码会执行第二个闭包。
If the request block is requesting HTML, it executes the first closure; if it's requesting XML, it executes the second.
在输入文件的所有行处理完毕之后,awk执行这个代码块。
Awk executes this block after all lines in the input file have been processed.
自动选择——在执行复制、剪切或粘贴之前,自动选中标识符或逻辑代码块。
Auto select - automatically selects identifiers or logical blocks before performing a copy, a cut or a paste.
在所有行都处理完毕之后,awk执行END代码块,并打印最终的汇总信息,以显示它找到的空白行数。
After all the lines have been processed, the END block will execute, and awk will print out a final summary, specifying the number of blank lines it found.
第二个代码块使用的是 Iterator,应该比第一块执行得快一些。
The second block, which uses an Iterator instead, should perform faster than the first.
应用推荐