但是,它也不包含明显的可重用代码。
本文介绍了如何在Python中编写可重用代码。
This article explained how to write reusable code in Python.
编写能够被特定的元素和属性调用的可重用代码模块。
Write reusable code modules that can be invoked for specific elements and attributes.
它是与Web浏览器中显示的内容相关的一个可重用代码段。
It's a reusable piece of code related to what gets displayed in the Web browser.
如果分析数百个大型程序来寻找可重用代码块,这将完全是另一回事。
It's a completely different task to analyze several hundred large programs in search of a few reusable blocks of code.
这种语言具有一种经过良好设计的可扩展机制,并且其声明式处理模型支持可维护和可重用代码。
It has a well-designed extensibility mechanism, and its declarative processing model allows for maintainable and reusable code.
在“利用可重用代码,第2部分”一文中,我展示了火车车厢的一个api定义,如清单3所示。
In the article "Leveraging reusable code, Part 2," I showed an API definition for a train car, as shown in Listing 3.
新的目录只包含符合ALv2 的代码,这样用户可以非常方便地在OpenNTF 上查找可重用代码。
The new catalog contains only code under ALv2 to allow consumers to find reusable code on OpenNTF as easily as possible.
新目录(参见下一节)仅包含符合ALv2的代码,以尽可能简化使用者在OpenNTF上查找可重用代码的工作。
The new catalog (see the next section) contains only code under ALv2, to allow consumers to find reusable code on OpenNTF as easily as possible.
这些可重用代码可能是Google提供的一些服务(比如其数据存储或Google帐户服务)或被移植到Google基础设施上的开源库。
That reusable code could be the services that Google provides (such as its data-store or Google account services) or open source libraries that have been ported to work on Google's infrastructure.
函数式程序员也需要可重用的代码,但是他们会使用不同的构建块。
Functional programmers also want reusable code, but they use different building blocks.
这些重构工作真正重要的益处是得到了可重用的代码。
The really important benefit of this exercise is the ability to harvest reusable code.
这个原型甚至能够产生一些可重用的代码。
可重用性,允许设计人员在其他应用程序中重用为某个应用程序编写的代码。
Reusability features that allow designers to take code written for one application and to reuse it in another.
在早期开发中的设计评审允许架构师们发现潜在的可重用的机会,并且利用这个机会为接下来的迭代开发成熟的公用代码。
Design reviews in early iterations allow architects to spot potential opportunities for reuse, and then develop and mature common code for these opportunities in subsequent iterations.
它没有引入可重用的验证代码。
这个方法有助于提高代码的可重用性和灵活性。
本文的目的与上一篇相同,即要演示清晰且可重用的代码,而这些代码未必是某个程序的最简短或最有效的版本。
The goal of this article, as with its predecessor, is to show legible and reusable code, not necessarily the shortest or most efficient version of a program.
将isValidEmail()方法分离到可重用的代码中似乎是当然的选择,但我曾见过直接嵌入网页中的 isValidEmail() 代码。
(Separating the isValidEmail() method into reusable code might seem like an obvious thing to do, but I have seen the code for isValidEmail() embedded directly into the page.)
此api可以对多种消息类型进行公共访问这一事实可促进代码重用,即使在消息类型完全不同的环境中也是如此。
The fact that the API remains common across message types encourages code reuse even in environments where the message types are completely different.
另一方面,对于创建抽象从而创建可重用的代码来说,面向对象的编程可能是非常有用的方法。
On the other hand, object-oriented programming can be a very useful way to create abstraction, and thus resuable code.
通过本系列的前几期,您已经知道,我的观点是软件的每个部分都包括可重用的代码块。
As you know from the previous installments in this series, my contention is that every piece of software includes reusable chunks of code.
几乎本文的所有代码都是可重用的。
MartinFowler:不,不是的。但问题是,为了使代码可重用,你必须使它灵活。
Martin Fowler: No, but the problem is that in order to get code that's reusable you need to make it very flexible.
可重用的服务和程序库代码。
如何在陈旧的代码库中找出可重用的资产和隐藏的设计?
How do you find the reusable assets and designs hiding in an aging code base?
而且,面向对象的体系结构使代码结构化、可重用并且运行快速。
Also the object-oriented architecture makes the code structured, reusable, and fast.
如果想要构建额外的Web组件,最好把公共的代码片段放到可重用的标记文件中。
If you want to build additional Web components, it is a good idea to place the common code fragments into reusable tag files.
在这里我要讲一下在发掘出代码中的可重用设计之后应该做些什么,介绍获取这些模式所用的方法。
Here I'll talk about what to do once you've unearthed reusable design in code, covering techniques for harvesting those patterns.
在清单1中,看不到可重用的资产;只看到一大堆代码。
When you look at the code in Listing 1, you don't see reusable assets; you just see a pile of code.
应用推荐