在本例中,我使用PHP代码创建了一系列标记—一个标记用于表格中的一个页面。
In this case, I use the PHP code to create a series of tags-one for each page in the table.
您也可以在第4步之前使用一个代码覆盖率工具,但是我宁愿您手动完成前面的步骤。
You could use a code coverage tool before step 4, but I prefer to do the preceding steps manually.
这里的区别是,在使用位置增加代码让我有了灵活性。
The difference here is that by adding the code at the point of use, I gain flexibility.
不幸的是,抽象是有漏洞的:例如,在我的ZIP代码验证器中,本想使用正则表达式执行检测。
Unfortunately, the abstraction is leaky: in my ZIP code validator, for example, I would have liked to use regular expressions to perform the check.
我在代码中加了很多注释,突出说明了使用EXSLT的位置,以及其他有用注释。
I've heavily commented the code, highlighting where I use EXSLT, as well as other useful notes.
在之前的讨论中,我论及了使用HTTP 303代码将URI赋予非计算性资源,比如人和抽象的属性。
In the earlier discussion I discussed using HTTP 303 codes to give URIs to non-computable resources such as people and abstract qualities.
在本例中,我使用一个php数据源,该数据源提供了分页表格的各个页面的HTML代码块。
In this case, I use a PHP data source that provides blocks of HTML code for the various pages of a paged table.
在页面代码中,我还可以使用XML响应,因为服务器返回的是有效的XML。
In the page code, I could have used the XML response, as the material returned from the server is valid XML.
只要最少的工作并遵循我在本文中所推荐的过程,您就可以使您的JMS客户机代码顺畅地运行,而丝毫觉察不到所使用的供应商实现的差异。
With minimal effort and by following the procedures I recommend in this article, you can make your JMS client code blissfully unaware of the vendor implementation you're using.
在清单3中所示的代码版本中,我已经更改了内部实现以使用名称部件的关联数组。
In the version of the code shown in Listing 3, I've changed the internal implementation to use an associative array for the name parts.
在我提供的代码中,数据库是MySQL,但是您可以使用DB 2或者您喜欢的任何其他数据库。
In the code that I provide, the database is MySQL, but you can use DB2 or any other database that you like.
在清单6中,我用了清单4中的重复代码,使用了PullUpMethod重构来降低重复度—将行为从较大方法提取到一个抽象类方法中。
In Listing 6, I take the duplicated code in Listing 4 and reduce the duplication by using the Pull up method refactoring - extracting behavior from a larger method into an abstract class method.
我没有强调许多代码,而是集中在使用Tapestry开发应用程序的过程以及如何做好上面。
Rather than focus on a lot of code, I decided to concentrate on the process of developing applications using Tapestry, and doing it well.
使用文件描述符读取在之前的功能函数中获得的字节,我使用以下代码。
To read the bytes using the file descriptor obtained in the previous function call, I use the following code. It reads the indicated number of bytes from the file parameter passed.
在本文中,我使用了一个金融比喻,设计债(Design Debt),以显示代码维护性的极端重要性。
In this article, I use a financial metaphor, design debt, to show the importance of code maintainability.
我在代码示例中使用EJB 3.0规范;同样的概念也适用于SpringFramework和JOTM。
I use the EJB 3.0 specification in my code examples; the concepts are the same for the Spring Framework and JOTM.
Joel:我的开发环境非常精简,使用vim(加上很多扩展)在Linux上编写代码。
Joel: My development environment is pretty minimal. I use vim (with lots of extensions) on Linux to edit code.
来自Mesiab实验室(Retweet.com的幕后公司)的TysonQuick在博客后边写道:“我可以保证Mesiab实验室没有使用任何来自Tweetmeme的代码。”
Tyson Quick of Mesiab Labs, the company behind Retweet.com, responded to the blog post angrily saying "I can assure you that Mesiab Labs isn't using any of tweetmeme's code."
在我所管理的一些网络上,我进行了流量限制:把. DOC排除在外,而赞成使用.RTF,以预防恶意代码。
On some of the networks I manage, I restrict traffic to exclude.doc in favor of.rtf as prophylaxis against malicious code.
我建议使用需求存储库,该存储库将与用例、设计和代码紧密结合,以在项目进行的整个过程中提供可跟踪性。
I recommend the use of a requirements repository that will tie into use cases, design, and code, to provide traceability through the project.
没有能够处理名称空间问题的现成方法,因此我将展示我的解决办法,您可以在自己的代码中使用我的办法,或通过了解问题创建更好的解决办法。
There is no one right way to deal with this namespace issue, so I'll present my solution, which you can use in your own code, or you can read about the problem and create your own better solution.
在第一篇文章中,我使用模板创建了SQL模型,然后从该模型构建SQL代码。
In the first article, I used templates to create an SQL model from which I built the SQL code.
在本文中,我将讨论如何使用重构技术来查找隐藏在代码库中的未得到充分设计的代码。
In this article, I talk about how to use refactoring to find underutilized design lurking hidden in your code.
实际的匹配代码与本文并不真正相关,不过如果您想要查看它或亲自使用它,我已将它包括在了下载文件中(请参阅参考资料)。
The actual matching code isn't really relevant to this article, but it's included in the download file (see Resources) if you'd like to look it over or use it yourself.
因为如果我不给这个输入定义一个名字,在随后的代码中,我就没有办法使用它。
Because if I don't specify a name for this input, I have no way of actually referring to it in subsequent lines of code.
在本文中,我将那些思想相结合,并提供一个扩展后的案例研究,在该案例研究中,使用一些工具和方法来发现代码库中被忽视但是同样重要的部分。
In this article, I tie those ideas together and present an extended case study, using tools and approaches to discover a neglected but important part of a code base.
在上个月的这一专栏中,我讲述了使用特定领域语言(dsl)的示例,在您的代码中定义为通用设计习惯。
In last month's installment, I showed examples of using domain-specific languages (DSLs) to harvest idiomatic patterns, defined as common design idioms in your code.
由于两个原因,我喜欢对名称空间使用别名:首先,如果以后要改变名称空间,在每个源代码文件中只有一行需要修改。
The use of aliases is my preferred method for using namespaces for two reasons: First, if I later rename the namespace, I only have one line of code to change per source file.
我认为,在我知道最终类的模样并实际使用过代码之前,我不想声明我的“客户们”可能需要什么。
I figure that until I know the final class shapes and have a little practical usage of the code, I don't want to declare what my clients might need.
我将使用另一个小部件解决本文的最后3个问题,并且在深入研究其代码之前展示和解释它。
I will use another widget to address the final 3 things in this article, and I want to show it off and explain it before I delve into the code behind it.
应用推荐