你为什么会认为梳理打扮一类的置换活动常常是令人舒适的行为呢?
Why do you think displacement activities are so often comfort behaviors, such as grooming?
一项研究发现,教育类电视节目会额外给孩子们上一课,影响他们的行为。
A study has found that educational TV shows come with an added lesson that influences the child's behavior.
这些类是否存储了所有的数据信息且其中没有或者只有很少的行为信息?
Do these classes store all the data information and have none or little behavior information in them?
它自己本身并不提供本地化的行为;类必须自己提供本地化。
It does not, in and of itself, provide localized behavior; classes must provide localization themselves.
它们提供了一些方法来让测试控制这个虚构类的所有业务方法的行为。
They provide methods to let the tests control the behavior of all the business methods of the faked class.
事实上,您可以置换每种节点对象的基类,从而能够定制整个应用程序的行为。
In fact, you can substitute the base class for every node object, giving your whole application custom behaviors.
行为:关于驻留在类之内但并非必须如此的功能的模式。
Behavior: patterns concerned with functionality but not necessarily where they reside in classes.
有时,复制粘贴某些代码要比将该行为泛化到另一个类更简单。
Sometimes, it's easier to copy and paste some code than to generalize the behavior into another class.
横切数个类的行为给集成测试带来了一个特定问题。
Behavior that crosscuts a number of classes poses a particular problem for integration tests.
特征很奇特,因为一个类可以按照需要整合许多特征,这与接口相似,但它们还可包含行为,这又与类相似。
Traits are unusual in that a class can incorporate as many of them as desired, like interfaces, but they can also contain behavior, like classes.
我们大约需要编写50行代码来真正执行我们在模拟对象类中所需的行为。
We had to write approximately 50 lines of code that actually implemented the behavior we needed in our mock object classes.
第二个选择是模拟验证行为并将测试类保留在单元目录中。
The second option is to mock out the validation behavior and leave the test in the unit directory.
而且,生成的类变成哑数据容器,因为一般不能向它们添加行为。
Also, the generated classes become dumb data containers because you can't generally add behavior to them.
您可以通过它们精确地定义有较广影响而在目标类中有较少语法残留的行为。
They allow you to concisely define behavior that has wide-ranging impact with very little syntactic hangover in the target class.
在最糟糕的情况下,如果导入的是具体的类,并且它们的行为发生更改,那么执行导入的类可能会中断!
In the worst case, if the imports are concrete classes and their behavior changes, then the class doing the importing could break!
您了解了如何创建插件、插件扩展以及定义新扩展行为的类。
You learned how to create a plug-in, plug-in extensions, and the classes that define the behavior of these new extensions.
它还表明特征的行为如何“下放到”实现类。
It also demonstrates how the trait's behavior is "deferred" down into the implementing class.
功能可被分为行为类或人口统计类。
The features can be categorized as either behavioral or demographic.
类是按照它们的名称、属性(或者数据),以及行为(或者方法)来定义的。
Classes are defined in terms of their name, attributes (or data), and behaviors (or methods).
CSS类链接到HTC文件内的一个行为。
表2列出了virtualsystems类的行为。
定义菜单活动行为的类实现IActionDelegate接口。
The class that defines the behavior of the menu action implements the IActionDelegate interface.
如果这些类中的任何一个的子类需要覆盖默认行为,那么可以通过覆盖这个方法实现。
If a subclass of one of these classes needed to override the default behavior, it could do so by overriding the method.
我更喜欢在类的内部说明类的运行时行为,将有关类的所有信息集中保存在一个地方。
I prefer specification of the runtime behavior of a class within the class itself, keeping all the information about a class in one place.
所以,基于动态类型和高阶函数,您可以在任何时候向类中引入任意的行为。
So based on the dynamic typing and higher-order functions, you can introduce arbitrary behavior to your classes at any time.
为了能够对应用程序代码做推断,我们必须能够查看来自每个类的代码,以及能够影响这个类行为的任何一个方面的代码。
To be able to reason about an application's code, we must be able to look at the code from each class as well as the code for any aspects that might affect the class's behavior.
如果可以重写类的话,则可以重写它的方法的行为,因此您最安全的选择就是不允许将类子类化。
If the class can be overridden, its methods' behaviors can be overridden as well, so your safest bet is to disallow subclassing.
您希望编写并维护哪一个:一个庞大的类或是具有相同行为的很小的类?
Which would you rather have to write and maintain: a big class or a small one that does the same thing?
将定义通用行为(模板),并提供域特定的行为和域类提供的状态(提供挂钩)。
The generic pattern behavior is defined (the template), with domain-specific behavior and state provided by domain classes (which provide the hooks).
将定义通用行为(模板),并提供域特定的行为和域类提供的状态(提供挂钩)。
The generic pattern behavior is defined (the template), with domain-specific behavior and state provided by domain classes (which provide the hooks).
应用推荐