Methods can have associated code blocks.
方法可以有相关联的代码块。
Only methods or code blocks can be marked "synchronized".
只有方法和代码块能被同步标记。
Minimize the number and length of synchronized code blocks.
尽可能减少同步代码块的数量和长度。
It allows inspecting project code and finding similar code blocks.
它对项目代码进行检查并且寻找相似的代码块。
Note that both code blocks above are valid under specs, but one is better than the other.
虽然以上两种代码块都是有效的,但前者优于后者。
This makes visually identifying code blocks much easier.
这就大大方便了从视觉上识别代码块。
Rational Robot VU scripts are made up of repetitive code blocks that represent these steps.
RationalRobotvu脚本是由代表这些步骤的重复代码块组合起来的。
To use performance profiling, we need to identify which code blocks need to be profiled.
要使用性能分析日志,我们需要确定哪些代码块需要分析。
Normally, when an application makes a read call, the code blocks until there is data to be read.
一般情况下,当应用程序调用read时,代码会阻塞,直到有数据可读。
Note that the first two code blocks within the new function are almost identical to those in the original.
注意,新函数中的前两个代码块与原来函数几乎相同。
Using Groovy's built-in curry method, I use product as the building block for two new code blocks: quadrate and octate.
通过使用Groovy的内置curry方法,我使用product作为两个新代码块的构建块:quadrate和octate。
One of the advantages of using code blocks over a similar mechanism like anonymous inner classes lies in its conciseness.
在类似匿名内部类的机制中使用代码块的一个优势是其简洁性。
With synchronous Web services application messaging, the application code blocks while waiting for the response message to be received.
使用同步Web服务应用程序消息传递,应用程序代码在等待接收响应消息时阻塞。
Code block: it allows you to format text as code blocks. Simple select the text and format it by clicking the "code block" ToolBar button.
代码块:这个编辑器允许你把文本格式化为代码块,只要简单地选中文本,然后点击“代码块”按钮来进行格式化即可。
Now, consider the same example written in Groovy, shown in Listing 7, which takes advantage of the more concise syntax offered with code blocks.
现在看一下用Groovy编写的同样的示例,如清单7所示,它利用了代码块提供的更简洁的语法。
Performance profiling can be used to measure the time needed for the specified code blocks and find out what the performance bottleneck is.
性能分析可用于测量指定代码块所需的时间,并找出性能瓶颈是什么。
As usual, the Groovy version is much more straightforward, as shown in Listing 6, because flexible types and code blocks are first-class citizens.
Groovy版本通常比较简单,如清单6所示,因为其灵活的类型和代码块都是一等公民。
From your studies so far, you know that Groovy closures are code blocks that can be referenced, parameterized, passed as a method parameter, and delivered as the return value from a method call.
学习至今,您知道了Groovy闭包是代码块,可以被引用、带参数、作为方法参数传递、作为返回值从方法调用返回。
In general, using embedded code blocks for complex programming logic is not a best practice, because when the code is mixed on the page with markup, it can be difficult to debug and maintain.
一般情况下,将嵌入式代码块用于复杂的编程逻辑并不是最佳做法,因为当页中的代码与标记混合时,很难进行调试和维护。
Timing Code Blocks with a stopwatch.
利用StopWatch类开发计时代码。
Code blocks, expressiveness, and idiomatic patterns.
代码块、表达性和惯用模式。
Code blocks, expressiveness, and idiomatic patterns.
代码块、表达性和惯用模式。
应用推荐