您将看到的许多奇怪的、不可思议的东西都可以归功于Scala的函数特性,因此,简单介绍一下函数语言开发和演变的背景可能非常有用。
Much of the strange magic you're about to see is due to Scala's functional nature, so a little background on the development and evolution of functional languages is probably in order.
论文借鉴免疫反应机理,提出一种用于求解动态环境下函数优化问题的免疫算法。
In this paper, an optimization algorithm for time-varied functions optimization referring to immune optimization mechanism is presented.
手工验证一下该函数,可知其工作正常。
A manual verification shows that the functions are indeed working as desired.
顺便说一下,初始化函数必须是文件中唯一未被声明为static 的全局标识符。
The init function, by the way, should be the only global identifier in the file that isn't declared static.
通常情况下,由于 make_parser()函数已经能获得expat提供的性能,因此纯速度的差异很小。
The raw speed differences are likely to be minimal since the make_parser() function already manages to get the performance expat offers for general cases.
这种情况下需要强制类型转换函数(如 $elem castas xs:integer)来保持查询的有效性。
In this case, casting functions (like $elem cast as xs:integer) are needed to keep the queries working.
在指定了SQL_HANDLE_DESC选项的情况下,通过调用SQLAllocHandle函数可以显式地分配一个或多个描述符句柄,以及一个有效的连接句柄和语句句柄。
One or more descriptor handles can be explicitly allocated by calling the SQLAllocHandle function with the SQL_HANDLE_DESC option and a valid connection and statement handle.
换句话说,如果我得到了Q的表达式,知道了配分函数,我可以计算它在任意温度下的数值。
In other words, if I have an expression for Q, I know the partition function, and I can calculate it at any temperature.
该输出中的信息包括进程、线程、节点号,以及跟踪点号、函数名、跟踪记录类型,在某些情况下还包括探测号。
Information contained in this output includes process, thread, and node number, as well as trace point Numbers, function names, trace record types and, in some cases, probe Numbers.
理想情况下,我们最好能为两种情况重用同一个完成此任务的函数。
Ideally, we would like to reuse a function that does this for both cases.
在我们继续之前,有必要注意一下带有三个字符串参数的XSLTtranslate函数。
Before we go on, it's worth noting that the XSLT translate function takes three strings.
shell模式:在Python交互式shell中,您可以导入pydoc的help函数,这样就能够在不离开交互式会话的情况下获得任何对象的帮助。
Shell mode: Inside the Python interactive shell, you may import pydoc's help function, and get assistance on any object without leaving the interactive session.
在一种情况下,nose不考虑setup和teardown函数的名称:使用 @with_setup 修饰符为某一函数显式地指定它们。
There is one case in which nose does not care about the name of setup and teardown functions: when you specify them explicitly for a particular function using the @with_setup decorator.
顺便说一下,如果新增的众多2.0函数有一个能够完成这项工作,可能就不需要使用扩展函数了。
Incidentally, you might no longer need the extension function if one of the many new 2.0 functions can do the job.
在常规情况下,函数只有当在调用空间中的结果机器码比原始版本要小时,才能被内联。
Under normal circumstances a function will only be inlined if the resulting machine code is smaller than the original version at the call site.
在导出的绑定属性中,在Connection选项卡的高级设置下,对函数选择器进行了定义,如图1 所示。
The function selector is defined in the binding properties of the export, under the Advanced settings of the Connection tab, as shown in Figure 1.
但通常情况下你要考虑的问题中,函数会含有多个自变量。
But typically the function that you will have to strive to minimize or maximize will depend on several variables.
不过,在windows下,提供了一个解决此问题的函数。
Under Windows, however, there is a workaround function provided.
此函数接受源节点,并将其作为子节点复制到目标节点下。
This function takes the source node and copies it over as a child under the destination node.
xmlrow输出是一个表示为xml的行值的序列,xmlgroup函数将所有值集合到一个根节点下。
While the xmlrow output is the sequence of the row values represented as XML, the xmlgroup function groups all the values under a root node.
第二章主要研究人力资本对经济增长的贡献率,给出了不同生产函数条件下测定人力资本贡献份额的算法。
Chapter 2 is mainly about the contribution rate of human resource to economy growth, and offers the algorithms of determining the contribution share under different conditions of production function.
通常情况下,局部作用域引用当前函数的局部名字。
Usually the local scope references the local names of the (textually) current function.
但在聚合体存在的情形下,函数参数的数值不同于在均场近似下由经典朗道理论所得到的数值。
However, the values of the parameters of the function are different from those derived using the classical Landau theory based on the mean field approximation.
在不使用词根化那样的高级搜索功能的情况下,解决方案可能是使用前面介绍过的containsXQuery内置函数。
In cases where no advanced search functionality, like stemming, is used, it is possible to use a workaround using the contains XQuery built-in function that was previously introduced.
在这种情况下,通常最好将代码重构为一个用户定义的函数,键映射随后就可以调用该函数。
In such cases, it's usually a good idea to refactor the code out into a user-defined function, which the key-mapping can then call.
如果您需要这些函数,最好先去检查一下您的目标平台上有没有这些函数。
If you need these functions, it is best to check on the exact platform you're targeting.
成功时该函数返回0,一般情况下,get_user和put_user函数比它们的块复制副本要快一些,如果是小类型被移动的话,应该用它们。
This function returns zero on success. In general, the get_user and put_user functions are faster than their block copy counterparts and should be used if small types are moved.
在这种情况下,在使用之处声明此函数会有助于提高代码的可读性。
In such a case, declaring the function at its place of use lets you improve the readability of your code.
但是,这些函数在特定情况下是非常方便的,如果正确地使用它们,可以显著提高应用程序的性能。
Well, it turns out that these functions come in handy in certain situations, and when used correctly they can drastically increase the performance of your application.
在大多数情况下,简单的测试函数对测试代码来说已经足够了。
In most cases, simple test functions are more than adequate for testing code.
应用推荐