Listing 1. Protecting a block of code with ReentrantLock.
清单1.用ReentrantLock保护代码块。
To use this refactoring, select a block of code in the editor and press Alt+Shift+M.
要使用这个重构,请选择编辑器中的一个代码块,然后按下 Alt+Shift+M。
The code in braces is a closure and is simply a block of code that's passed to callcc.
花括号中的代码是一个闭包,它仅仅是传递给 callcc的代码块。
When a method is called only once by another method, and it makes more sense as a block of code.
当一个方法只被另一个方法调用一次,并且作为一个代码块更有意义时。
The Extract method refactoring allows you to select a block of code and convert it to a method.
ExtractMethod重构允许您选择一块代码并将其转换为一个方法。
As an example, consider any repetitive coding pattern, such as executing a block of code with a lock held.
以一个常见的编码模式为例,如执行带有Lock的代码块。
The next step is to create the actor itself, using the actor method, which takes a block of code as a parameter.
下一步是使用actor方法创建actor本身,这个方法通过参数接收一个代码块。
Every event has a handler which is a block of code that is executed in response to the occurrence of the event.
每个事件有一个处理函数,即在发生此事件时执行的代码块。
Because of the scoping rules for closures, one cannot use a goto to enter a block of code containing a closure.
因为闭包的范围规则,开发时不能使用goto语句进入包含闭包的代码块。
So all he has to do is copy a block of code over into an HTML file, change the contents of it and he is good to go!
因此,他要做的全部事情就是把一部分代码复制到一个HTML文件中,改变它的内容,然后他就可以继续前进了!
That is, a block of code (function) that now doesn't have to be represented via thread state and registers and such.
也就是说,现在并不通过线程状态和寄存器表示代码块(函数)。
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对象。
The team is currently considering adding the keyword dynamic to the language and using it to demarcate a block of code.
我们目前正在考虑添加一个名为dynamic的关键字来将动态代码块分隔开。
Finally, you can implement the traditional use case for exception handling over a block of code as shown in Listing 7.
最后如清单7所示,您能实现对代码块进行异常处理的传统用例。
In recursive code, a static object or variable is guaranteed to have the same state in different instances of a block of code.
在递归代码中,一个静态的对象或者变量将被确保在一个代码块的不同实例间保持相同的状态。
The arguments above specify an expression that yields a boolean value and a block of code that returns nothing (Unit), which is exactly what while expects.
上述语句指定了一个表达式,该表达式产生了一个布尔值和一个不返回任何结果的代码块(Unit),这正是while所期望的。
You can write a block of code and immediately validate it by running it in an accurate simulation of a production WebSphere Application Server installation.
您可以编写一段代码并且通过在生产WebSphereApplicationServer安装的正确仿真中立刻验证它。
Superficially the code changes are minor; rather than having a block of code following the "for" line, the code is passed as an argument to the "Parallel.For" function.
最直观的反应就是代码只需作细微的修改;在“for”语句内的代码块,可以作为参数传递到“Parallel.For”函数中。
For example, the semantics of return, break, and this are different in a block of code than they are in a Runnable (or other inner class instance) that represents the same block of code.
比如,return、break和this在某一代码块中的语义与其在Runnable(或其他内部类实例)中同一代码块中的语义是不同的。
A block of code that must be executed in sequence and without interruption to guarantee correct operation of the software.
一段必须按次序执行的代码,并且不能被中断,否则不能保证软件正确地操作。
A block of code that must be executed in sequence and without interruption to guarantee correct operation of the software. See also race condition.
一段必须按次序执行的代码,并且不能被中断,否则不能保证软件正确地操作。参照:竞争状况。
A block of code that must be executed in sequence and without interruption to guarantee correct operation of the software. See also race condition.
一段必须按次序执行的代码,并且不能被中断,否则不能保证软件正确地操作。参照:竞争状况。
应用推荐