I define adaptor as a code block (delimited by in Groovy).
我将adaptor定义为一个代码块(使用Groovy中的界定)。
The ampersand identifies the parameter as the holder of a code block.
该符号将参数识别为代码块的持有者。
Ruby calls the code block in braces, passing in a continuation object.
Ruby调用花括号中的代码块,同时传递一个延续对象。
The method takes a string parameter, enclosed in quotes, and a code block.
该方法具有一个使用引号括起来的字符串参数和一个代码块。
In Listing 6, I create a composite code block that composes two functions.
在清单6中,我创建了一个由两个函数组成的composite代码块。
The controller can specify a code block for each type the controller expects.
控制器可以为控制器期望的每个类型指定一个代码块。
The next line starts a code block that dictates what happens when each client connects.
下一行开始一个代码块,规定当每个客户端连接时要做的事情。
Consult the next section for the code block that sets each frame when the mouse is down.
参考下一节中的代码块,它会在鼠标按下时设置各帧。
At some point, you're going to have to face that massive code block and call it your own.
随后的某一时刻,您必须面对大量代码块并将它们搞定。
That code block does nothing but increment the value of the local variable and return it.
代码段做的事就是增加本地变量的值并返回。
Comments in the code block above indicate the points at which these actions are performed.
代码块上的注释指明了在哪里这些操作会被执行。
In this example, the code block is iterated until the loop is broken through the condition.
在此示例中,代码块迭代,直至循环根据条件而中断。
In cases where synchronization is necessary, the synchronized code block should be minimized.
在有必要进行同步的场合下,应该尽量缩小同步代码块。
The open and close brackets ([and]) mark the beginning and end of the code block, respectively.
开方括号和闭方括号([和])分别标志代码块的开始和结束。
Think of a closure as a code block that you can use as an argument, with special scoping rules.
闭包可被视作一个遵循特别作用域规则且可以用作参数的代码块。
The method executes the code block using the instance_eval method, one of the built-in methods in Ruby.
使用instance_eval方法可使该方法执行代码块,这是Ruby中的内置方法之一。
The Groovy version of filter() is findAll(), which accepts a code block specifying your filter criteria.
Groovy版本的filter()是findAll(),它可接受一个指明过滤条件的代码块。
Within the code block, the delegate keyword refers to the instance of the class you are adding methods to.
在代码块中,delegate关键字指向您将要向其中添加方法的类的实例。
This synchronized code block acquires the lock associated with the customer class object before it executes.
同步的代码块在执行之前需要与客户类对象相关的锁。
The first, closest match results in said code block being executed. So, for example, in Scala you could have.
首先,将执行代码块中最接近的匹配结果。
The longer a synchronized code block requires for execution, the longer other threads wait to enter that block.
同步代码块所需的执行时间越长,其他线程等待进入该代码块的时间就越长。
When I pass the code block created by passing my target number as a parameter, Scala curries up a new function.
当我传递代码块(将目标数字作为参数传递)时,Scala创建了一个新的函数。
The volume code block in Listing 5 computes the cubic volume of a rectangular solid using the well-known formula.
清单5中的volume代码块使用常用公式计算长方体的体积。
A wants method executes the corresponding code block if the method name matches the type in the HTTP Accept header.
如果方法名称与HTTPAccept头中的类型匹配,wants方法执行对应的代码块。
The respond_to method accepts a single code block and passes one instance variable (labeled wants) into the code block.
respond _ to方法接受单个代码块,并传递一个实例变量(标为wants)到代码块。
A code block is simply a block of code that returns a value, and if no value is returned then a NULL object is returned.
代码块就是将返回一个值的一组代码,如果没有返回值,那么会返回一个NULL对象。
I emit an error message and replace the return value with 0, instead (remember: every inline code block returns an object).
我发出错误信息,将返回值替换为0(请记住:每个内联代码块都返回一个对象)。
I then create an area code block (which computes a rectangle's area) by fixing volume's first dimension (h, for height) as 1.
我创建了一个area代码块(计算矩形的面积),将volume的第一个维度(h用于表示高度)确定为1。
Note that I used the general phrase code block, which can refer not only to entire methods, but even to blocks within a method.
注意,我在这里使用了一个一般性短语 “代码块(code block)”,这不仅仅可以指完整的方法,还可以指一个方法中的块。
It is crucial to accurately identify which code block truly needs to be synchronized and to synchronize as little as possible.
准确地识别哪些代码真正需要同步并尽可能少地进行同步,这非常重要。
应用推荐