仔细检查函数中所有使用的变量,如果有一个变量不是当前作用域定义的,而且使用了不止一次,那么我们就应该把这个变量保存在局部变量中,而使用这个局部变量来进行读写操作。
Watch the variables being used in a function. If you notice a function using an out-of-scope variable more than once, store it in a local variable and use that instead.
那么,只有带“survived”域的数组元素(在前面由survive()函数设定的)通过grep。
Then, only elements of the array with the "survived" field (set earlier by the survive() function) get through the grep.
首先将函数对象[[scope]]内部属性中的对象,按顺序复制到作用域链中。
The objects in the function object's [[scope]] property are copied into the scope chain in the same order.
API实现大量针对域的函数。
The API implements a large number of functions targeted toward domains.
Guru转过身去,边走边说道:“呃,关键问题是,如果一个类里面有多个域,编写这个类的比较函数时要保持警惕。”
The Guru turned and continued as she walked away, "The, er, key, my apprentice, is to keep your wits about you when writing comparison functions that deal with multiple fields."
本文运用赝势函数变域变分有限元方法进行了跨音速翼型设计。
The variational of finite element method(FEM) using the pseudo-potential function is presented to design the airfoil shape of transonic rotational flows.
该方法通过建立CTCSHNN能量函数与移动域控制指标间的等价关系,可在线构建CTCSHNN。
The CTCSHNN can be constructed online by establishing the equivalent relation between the energy function of CTCSHNN and the performance index of receding horizon control.
本文在复连域上引进势函数的概念,并给出其计算方法,以此来解决一些复杂的曲线积分计算问题。
This paper introduces the concept of potential function into the multiply-connected region and provides its method of computation in order to solve some complex problems concerning line integrals.
这个函数返回一个对象静态域的值。
This function returns the value of a static field of anobject.
这个函数返回一个对象实例(非静态)域的值。
This function returns the value of an instance (nonstatic) field of an object.
本文给出多层媒质中水平和垂直电、磁偶极子的谱域标量位和矢量位格林函数的一般表达式,并验证了其正确性。
The spectral domain Green's functions of scalar and vector potentials for vertical and horizontal electric as well as magnetic dipoles in multi-layered medium are presented and verified.
利用该模型对冲压件截面形状进行了分析,确定了截面转角的公共可行域,并建立了一组目标函数作为优化对象。
With the model, the cross sectional shape of a pressing is analyzed, and the public feasible zone of sectional angle is determined, and a group of target functions are created as optimization objects.
这个函数设置一个对象实例(非静态)域的值。
This function sets the value of an instance (nonstatic) field of an object.
这个函数返回一个对象静态域的值。
This function returns the value of a static field of an object.
在极大值函数的有效域为非空凸集的条件下研究了次微分,并给出它的结构表达式。
And the expression of its subdifferential is developed in the case that the effective domain of the sup-type function is a non-empty convex set.
保存这个函数中使用的所有非易失性寄存器(包括条件寄存器,如果使用了该寄存器的任何非易失性域的话)。
Save all non-volatile registers that will be used during this function (including the condition register, if any of its non-volatile fields will be used).
这个函数接受一个字符串参数(该域的原始值),并返回该值的一个屏蔽版本。
This function accepts a string as an argument (the original value of the field), and returns a masked version of the value.
最后,我们讨论了整型问题的可行域的可视化问题,以及整型和相关放松限制问题的目标函数的处理方法。
Finally, I discussed feasible region visualization for an integer problem and the way it relates to the objective function for an integer and for the corresponding relaxed problem.
但为了解释作用域与重载的相互作用,我们将违反上述规则而使用局部函数声明。
To explain how scope interacts with overloading we will violate this practice and use a local function declaration.
运用复变函数及积分方程方法,求解了半平面域多圆孔多裂纹反平面问题。
By using of complex variable function and integral equation method, the antiplane multiple holes and cracks problem of half plane region is considered in this paper.
一个闭包封闭了这些引用,所以函数调用可以安全的引用这些变量,即使它们已经超出了函数的作用域。
A closure "closes around" these references, so the function invocation can safely refer to the variables even when the variables have gone out of scope!
闭包是具有闭合作用域的匿名函数。
人们也可以预先自定义一些迭代器,在函数的整个作用域内创建并使用。
One could also foresee custom iterators being created and used entirely within the scope of a function.
静态函数与静态属性一样,作用域也是类而非该类的对象实例。
Static functions, like static properties, are scoped to the class rather than to object instances of that class.
这个闭合的作用域是将闭包同调用函数和定义它的代码联系起来的纽带。
This closed scope is the communication that ties the closure to the calling function and the code that defines it.
通常情况下,局部作用域引用当前函数的局部名字。
Usually the local scope references the local names of the (textually) current function.
如果不涉及到内嵌函数,这个作用域链是唯一引用到调用对象的。
When no nested functions are involved, the scope chain is the only reference to the call object.
如果不涉及到内嵌函数,这个作用域链是唯一引用到调用对象的。
When no nested functions are involved, the scope chain is the only reference to the call object.
应用推荐