稍后我们浏览一下代码,现在试着拷贝代码到你的项目中,编译、运行它。
We'll look through the code later, now just try to copy it to your project, compile and run it.
最主要的是,人们通过拷贝和粘贴来获得“重用”,你决不会对代码这样做。
Mostly, people achieve "reuse" by copy and pasting, which you never do in code.
然后它用含有对经过重命名的原方法的调用的计时代码替换拷贝方法的正文。
It then replaces the body of the copied method with timing code wrapping a call to the renamed original method.
清单2显示了产生编译时错误的代码部分,因为该拷贝构造函数是私有的。
Listing 2 shows a piece of code that results in a compile-time error because the copy constructor is private.
对开发者来说,这意味着可以始终使用最新的代码拷贝。
For developers, this means the ability to always be working with the latest copy of the code.
黑客拷贝和移走的主要是知识产权,包括硬件设计和软件代码。
The hackers copied and removed mainly intellectual property, including hardware designs and software code.
一个完全的自定义代码代码模块,您可以从中进行拷贝和粘帖。
GetTestData.java: a completed custom code module from which you can copy and paste.
一个完全的自定义代码代码模块,您可以从中进行拷贝和粘帖。
SetupTestDataArea.java: a completed custom code module from which you can copy and paste.
接下来就让我们实际应用一下零拷贝,在客户机和服务器间传输文件(参见下载,查找示例代码)。
Now let's put zero copy into practice, using the same example of transferring a file between a client and a server (see Download for the sample code).
注意“发布到主干”并不是说我们仅把某个故事的代码直接拷贝到主干中,而是意味着所有的工作拷贝到主干中,做一次完整的同步。
Note that "release to trunk" doesn't mean that we are copying the code for one specific story to trunk. It means we are copying everything from work to trunk, i.e. doing a complete synchronization.
如果你没有为拷贝构造函数写正确的代码,就有可能造成list中对象的某些数据成员没有初始化。
If you do not write a correct code for the copy constructor, object within a list will have some data members uninitialized.
更新:读者JonOberheide给我们电邮说他搞到了一个木马的拷贝并解读了它的代码。
UPDATE: Reader Jon Oberheide emailed us to say he’d gotten a copy of the trojan and dissected its code.
代码也不应该拷贝到Web项目中。
如果我四处拷贝和粘贴这个代码,然后修改了book表的字段结构,那么我可能就麻烦了。
If I were to copy and paste this code all around, then change the field structure of the book table, I would be in a bad way.
最后两行代码是这样的,原字符串是s1,那个字符串的拷贝是,但是如果我没有忘记,当我们打印的时候,我们将看到什么?
So the very last two lines of code I'm saying this, s2 the original string is s1, the copy of the string is s2, but if I haven't lost you, what are we really going to see when we print this?
但是这个方案最大的缺憾就是由于需要您手动修改生成的代码,任何时候您在设计器中对强类型DataSet进行了更改,您就不得不再次拷贝类型声明部分的代码,很是繁琐。
Since you are manually modifying generated code, anytime you make a change to Typed Dataset via Dataset Designer, you have to remember to copy and paste code. That was painful.
但是这个代码尚未达到我们的零拷贝要求。
然后这个源代码被编译成可执行的对象或者程序,并被拷贝或者移动到测试库中。
This source code could then be compiled into executable objects or programs and copied or moved into test libraries.
她存取了所有与资产相关联的文件和代码,并下载了一份拷贝便于日后学习。
She has immediate access to all of the files and code associated with the asset and downloads a copy for further study.
因为每个JVM仍然拥有AOT代码的拷贝,所以这种实现方式对于内存使用量没有直接的好处。但是,由于能够重用 AOT 代码并避免重复编译,可以节省内存和CPU。
There is no direct footprint benefit because each JVM still has a copy of the AOT executable but there are memory and CPU savings from being able to reuse this code rather than repeat the compilation.
开发人员使用客户机/服务器模型与集中式VCS系统交互,对本地源代码拷贝的更改只能推回到中心存储库中。
Developers interact with centralized VCS systems using a client/server model, where changes to your local copy of the source code can only be pushed back to the central repository.
当前,此工具并不对比例程的服务器和本地拷贝的源代码。
Currently, the tool does not compare the source between the server and local copies of the routine.
由于已经找到PPE需要拷贝多少项数据,SPE程序现在可以分配本地存储空间,将项目读入这段存储空间(使用与前面相同的代码),然后执行算法(如上所示)。
Having found out how many items the PPE needs copied, the SPE program can allocate local storage, read the items in (using the same code as before), and then perform its algorithm, reviewed above.
拷贝粘贴编程(Copy and paste programming):拷贝(然后修改)现有的代码而不是假。
Copy and paste programming: Copying (and modifying) existing code rather than creating generic solutions.
escape指的是对象引用没有保存到堆中,或者传递给可能保留一份拷贝的未知代码。
By escape, we mean that a reference to it is not stored into the heap or passed to unknown code that might retain a copy.
该源代码显示了MySQL单元是分明的类型,并不仅仅是编辑器中其他单元的拷贝。
This source code shows that the MySQL units are distinct types and not merely copies of other units in the editor.
然后你创造更多的工作,你的拷贝和粘贴代码。
Then you create a little more work in that you copy and paste code.
使用下面的命令制作内核源代码树的一个备份拷贝。
Make a back-up copy of this kernel source tree using the command.
要在每个页面上显示当前的购物车,我们可以将下面的HTML代码放到主模板文件中,而不用将其拷贝并粘贴到每个页面上。
To display the current shopping cart on each page, you can place the HTML in the master template file, rather than copying and pasting it to each page.
要在每个页面上显示当前的购物车,我们可以将下面的HTML代码放到主模板文件中,而不用将其拷贝并粘贴到每个页面上。
To display the current shopping cart on each page, you can place the HTML in the master template file, rather than copying and pasting it to each page.
应用推荐