复制代码是软件项目当中一个常见的问题。
复制代码时经常会发现预料之外的依赖性。
Frequently, when copying code, I unearth unexpected dependencies.
当你像那样复制代码的时候,你其实是借用。
“复制代码”将代码文件复制到剪贴板。
这里的想法就是要避免复制代码以及硬编码。
该方法会分割到不同的方法以避免复制代码。
This code is separated into a different method to avoid duplicating the code.
HTML复制——以HTML的格式复制代码。
我总是看到加法,我一直复制我的代码,复制代码。
I keep seeing addition and I keep just copying my code, copying my code.
要查看区别,请用向导生成、复制代码,并与这个示例进行比较。
To see the differences, go to the wizard to generate, copy, and compare it with this example.
当您避免了复制代码时,调试和维护就变得更加容易了。
When you avoid duplicating code, you make debugging and maintenance easier.
使用这个类,不需要复制代码就可以实现任意类单例化。
So with this class we can makeany class singleton, without duplicating the code.
在大多数情况下,使用优秀设计后,您将会发现完全没有必要复制代码。
You will find that in most cases, with good design, copying code is completely unnecessary.
代码复制令软件程序更难于维护,同理,构建脚本中的复制代码也存在这样的问题。
And just as code duplication can make a software program more difficult to maintain, so too does duplicate code in build scripts.
实际上,甚至很多流行的开放源码项目都存在20%到30%的复制代码。
In fact, even many popular open source projects have duplication percentages in the 20-30 percent range.
当在缺少预先OO设计的情况下使用时,没有任何操作会像在类之间复制代码那样具有破坏性。
When used in the absence of an up-front OO design, nothing creates more havoc than copying code from one file to the next.
这些任务描述如何通过在开发环境中工作,向项目中添加项以及复制代码段来创建应用程序的各个部分。
These tasks describe how to create parts of the application by working in the development environment, adding items to the project, and copying code snippets.
你可以在每一个测试程序中通过复制代码来为注册用户编号,或者你可以使它成为一个单一的,可调用的例行程序。
You could copy the code to handle the login into every test program, or you can make it into a single, callable routine.
不是特别的组合。我相信Bryce胶皮与我们所有的炭板球拍配合的非常完美,只要目标是“不妥协的攻击”。复制代码。
No, I believe the BRYCE-rubbers and the blades with our Carbon-technology match perfectly, when the aim is un-compromised offence.
复制这些代码,粘贴到一个文件中,在您的项目中使用。
Copy this code and paste it into a file to use in your own projects.
有时,复制粘贴某些代码要比将该行为泛化到另一个类更简单。
Sometimes, it's easier to copy and paste some code than to generalize the behavior into another class.
转移或复制现有的代码。
是否需要针对特定公司或特定货币代码复制历史汇率。
Whether you want to copy historical rates for specific companies or specific currency codes.
然后,可以多次调用该模板,从而避免复制和粘贴代码。
You can then call the template multiple times, to avoid having to copy and paste code.
代码复制使设计变得更加模糊,因为您无法找到惯用模式。
Duplication in code obscures the design because you can't find idiomatic patterns.
清单10展示了修改后的代码,它将复制的代码放到一个方法中。
Listing 10 shows the code modified to put the copied code into one method.
这段代码可以复制并粘贴,并根据配置作适当的修改。
You can copy and paste the preceding block of code and modify it according to your own configuration.
复制函数的代码非常密集,如清单4所示。
The code for the replication functions is very dense, as shown in Listing 4.
第二个方法是研究现有协作代码,然后复制其现有代码。
The second way is to explore the existing collaboration code and then to copy existing code.
CPD:来自PMD小组的免费代码复制工具。
CPD: a freely available code duplication tool from the PMD team.
复制——获取代码最新副本的本地版本。
应用推荐