At the top of this file there is an array containing the names, user IDs, and phone Numbers that are used in the sample as shown in listing 1.
在该文件的顶部,有一个数组中包含了样例所使用的名称、用户ID和电话号码,如清单1所示。
Note: The two-digit line numbers on the very left edge of the listing are for explanation purposes; they don't appear in the code.
注意:清单左端的两位数行号仅用于解释目的;它们不出现在代码中。
To make this code executable, I must add the gram and lb methods to numbers by opening the Numeric class, as shown in Listing 2
要使此代码可执行,我必须通过打开Numeric类以便将 gram和lb方法添加到数字中,如清单2 所示
The inode table contains a listing of all inode Numbers for the respective file system.
inode表包含一份清单,其中列出了对应文件系统的所有inode编号。
For a static HTML page, you should see something like Listing 3 (to make the Numbers more interesting, this example made the same request 100 times).
对于静态html页面,您应该看到如清单3所示的内容(为使这些数字变得更有趣,本示例进行了100次相同的请求)。
Predicate (which is the is-factor method I defined earlier in Listing 2 - note the heavy use of first-class functions), returning the Numbers that match.
谓词(我在之前的清单2中定义的is - factor方法—请注意一类函数的大量使用),返回匹配的数字。
The example in Listing 2 sums odd Numbers by returning the sum of both Numbers only if the second number is odd, otherwise returning only the first number.
清单2中的示例对奇数进行合计,如果第二个数是奇数,会返回两个数的总和,否则只返回第一个数字。
Type a few Numbers and math expressions, as in Listing 1.
输入一些数字和数学表达式,如清单1所示。
For example, you can get the same name and phone Numbers from a JSON data source that has been parsed into an object (see Listing 4).
比如说,您可以从已解析为对象的JSON数据源中获得相同的姓名和电话号码,如清单4所示。
Kidnap gangs ask for ransom to be paid by text messages listing a hundred or more Numbers of high-value phone CARDS.
绑架分子通过发送写有一百或者更多的高值电话卡的短信来索要赎金。
Notice that in Listing 7, the inner query specifically retrieves only the ISBN-10 Numbers of the books on the bestseller lists.
请注意在清单7中,内部查询只专门检索畅销书清单上图书的ISBN - 10号。
In addition, you'll need to add some XML API classes along with classes for working with Numbers, as in Listing 1.
此外,还需要添加一些XMLapi类以及用于处理数字的类,如清单1中所示。
Listing 3 shows the changes required to pick up just the letters and Numbers in our dictionary file.
清单3显示的更改可以只提取字典文件中的字母和数字。
Running the new report should result in the output found in Listing 3. Of course, Numbers will vary.
运行新的报告应当生成如图3所示的输出,数字会有变化。
To use trap, you specify the command or function to be executed when the signal is trapped, and the signal number or Numbers that you want to trap, as shown here in Listing 13.
要使用跟踪,可以指定跟踪到信号时执行的命令或函数、要跟踪的信号编号,如此处的清单13中所示。
A listing of lock Numbers, key Numbers, and their assigned users shall be maintained in the Maintenance Advisor's office.
锁具数量、钥匙数量和授权使用人的清单必须张贴在维修主管的办公室内。
Listing 7 provides an example query to list all the customer names and phone Numbers from state of New jersey.
清单7提供了一个示例查询,该查询用于列示新泽西州的所有客户姓名和电话号码。
For example, in the sample application, you can create different tests for Strings, Numbers, and booleans, and then run them selectively, configuring TestNG as illustrated in Listing 4.
例如,在示例应用程序中,您可以为String、Number以及boolean创建不同的测试,然后如清单4所示配置TestNG,有选择地运行它们。
You can incorporate phone Numbers and other forms of electronic contact information as part of the structure, as in Listing 5.
您可以在XML结构中包含电话号码和其他形式的电子联系信息,如清单5所示。
The heart of this code is the part that computes the necessary Numbers using core ParallelArray methods, shown in Listing 8.
该代码的核心是使用核心的ParallelArray方法计算所需数目的那一部分,如清单8所示。
Listing 5 shows some code that checks to see if the zip5 parameter consists of five Numbers.
清单5显示的代码可以检查zip5参数是否符合五位数的要求。
The example in Listing 4 creates a searchable span for every "thinkpad" annotation as well as a field that will hold all product Numbers that were located in a particular document.
清单4中的示例为每个“thinkpad”注释创建一个可搜索的span,并创建一个包含位于特定文档中的所有产品号的字段。
I'll demonstrate with a simple Web service that adds two float Numbers (Listing 7).
我将演示一个添加两个float数的简单Web服务(清单7)。
In Listing 1, a simple rule to match product Numbers of Thinkpad laptops is created from the URL rule definition.
在清单1中,以url规则定义为基础,创建一个匹配Thinkpad笔记本电脑产品号的简单规则。
Listing 5 depends on certain behaviors for substring in some edge cases, as well as the conversion of Boolean values to Numbers.
清单5依赖于substring在某些边界情况下的行为以及布尔值到数字的转换。
I need at least two tests: one to see if the perfect Numbers report correctly and another to check that I don't get false positives. The unit tests are in Listing 2.
我至少需要两个测试:一个测试用于查看是否正确报告了完全数,另一个测试用于检查我没有得到误判断(falsepositives)。
Listing 1 shows the alN.dict file as created with simple letters and Numbers as the sole part of the dictionary.
清单1显示了用简单字母和数字作为字典惟一内容创建的alN. dict文件。
These optimizations include trimming leading zeros in decimal Numbers, condensing zero values, and condensing hexadecimal values (see Listing 7).
这些优化包括减少十进制数的前置零,缩短0值和16进制值(见清单7)。
An iteration is built from this pattern as shown in Listing 4 (accumulating the Numbers from 10 to 1).
清单4显示了以这种模式构建的迭代(从10到1计数)。
Listing 11. SimpleJPA handles Numbers nicely!
清单11. SimpleJPA很好地处理数字!
应用推荐