在清单9中,定义了一个没有参数的简单函数。
In Listing 9, I define a simple function that takes no parameters.
为何?简单函数促进代码重用。
为何?简单函数更易于维护。
简单函数更易于维护。
简单函数更易于阅读。
在经典的聚类分析中,度量差异性的指标是距离的简单函数。
In classical clustering analysis, the dissimilarity is only simple function of distance.
表达式闭包是定义简单函数的一种便捷方式,用来模仿lambda符号。
Expression closures are a shorthand method of defining simple functions that mimics lambda notation.
函数matrix 、array和dim是用于设置向量的维的简单函数。
The functions matrix , array , and dim are simply convenience functions for setting the dimensions of a vector.
简单函数更易于测试,特别是当它们只做一件事,只为一个目的服务时。
Small functions are easier to test, especially when they do one thing and serve one purpose.
方法包括一些基本类型的简单函数(例如get_user或put_user)。
Options include simple functions for basic types (such as get_user or put_user).
为何?简单函数更易于测试,特别是当它们只做一件事,只为一个目的服务时。
Why? Small functions are easier to test, especially when they do one thing and serve one purpose.
现在,您可以定义一个简单函数,其用途只是告诉您它所拥有的参数数量并显示这些参数,如清单1所示。
Now you can define a simple function to do nothing more than tell you how many parameters it has and display them as shown in Listing 1.
业务事务很像是调用应用程序的简单函数,但是它们可能是作为自己的事务的上下文所包含的复合函数来实现的。
Business transactions might seem like a simple function to the invoking application, but they might be implemented as composite functions covered by their own transactional context.
这个简单函数创建了一个表格节点,然后循环访问书的列表并为每本书创建一行,为每个数据元素分配一个单元格。
This simple function creates a table node, then iterates through the book list and creates a row for each book, with a cell for each data element.
当解析器读写大型文件(特别是文本格式的大型文件)时,并不能达到其读取较小的文件或计算简单函数时的性能。
They don't work as well with reading large files, particularly in text format, as they do with reading much smaller files or calculating simple functions.
只需使用exit_msg这样的简单函数和几个逻辑操作符,这个脚本就可以简化成更漂亮更容易理解的程序,见清单14。
By using a simple function like exit_msg and a few logical operators, the script could be condensed into the better-looking and easier-to-understand program shown in Listing 14.
正如在第一篇文章中看到的,py . test和nose都支持编写为简单函数的测试,这会大大简化python测试的编写。
As you saw in the first article, both py.test and nose have made tests in Python vastly easier to write by supporting tests that are written as simple functions, like.
在这个例子中的屏蔽使用Optim内部的一个简单函数(substring),但是仅当这些文件带有关系表时才可以使用完整的屏蔽功能。
The masking in this case is using one of the simpler functions within Optim (substring), but the entire set of masking functionality is available for these files just as it is with relational tables.
本例只存储字符串数据,所以您可以简单地将之附加到一个较长的字符串后面,并调用Calculator Handler中的一个简单函数,然后该函数可以将之解析出来。
This example is only storing string data, so arguably you can simply append it to a longer string and call a simple function in the CalculatorHandler, which in turn can parse it out.
这个简单的函数接受任何变量,并将它显示在屏幕上。
This simple function takes in any variable and displays it to the screen.
不过,虽然我认为预定的索引很酷,但这个简单的函数并没有费心去实现它。
However, even though I recognize the coolness of predictive indexing, my simple function does not bother implementing it.
不幸的是,没有按名称排列的简单的函数清单,文档是按主题排列的。
Unfortunately, there is no simple listing of functions by name; instead the document is arranged by topic.
接下来,创建一个简单的函数来阻止搜索表单表现得像典型的表单那样。
Next, create a simple function that prevents your search form from acting like a typical form.
这意味着一个很简单的函数形式。
所有这些都使得简单的函数调用是不可能的。
这是最后一个函数,也是最简单的。
该函数简单检查地址可能是在用户空间,而不是内核。
This function simply checks that the address is likely in user space, not in the kernel.
这些简单的匿名函数还执行另一个重要而微妙的任务。
Those simple anonymous functions also perform another important but subtle task.
为了测试这个简单的函数,还需要添加另外两个PHP文件。
To test this simple function, you need to add two more PHP files to the mix.
如果使用JSON,只需调用一个简单的函数,就可以获得经过格式化的数据,可以直接使用了。
With JSON, you call a simple function and get your data, formatted and ready for use.
应用推荐