通过这种技巧,您可以支持新的数据类型,而不用更改任何代码。
With this technique, you can support new data types without changing your code at all.
这样就在没有更改任何代码的情况下添加了对新数据类型的支持。
That adds support for a new data type without changing a line of code.
从本质上说,用于进行这种数据组织的代码应该是可移植的。
The code for such data organization, by its very nature, should be portable.
如果数据访问代码捕获了一个异常,不要忽略它。
If your data access code catches an exception, do not ignore it.
取出数据的代码与此类似,见清单3。
The code for popping data out is similar, as Listing 3 shows.
当然,我们必须以适当的数据访问代码来表达这种业务请求。
Of course, we had to express this business request in appropriate data access code.
清单6. stateInfo数据结构代码示例
额外的数据类型检查代码是不必要的。
XML被定义为数据而不是代码是有原因的。
There's a good reason XML is defined as data rather than code.
也不会破坏和数据交互的已有代码。
It also should not break existing code that interacts with the data.
从问题视图中收集数据的范例代码。
pureQuery可以帮助您以有助于优化性能的方式编写数据访问代码。
PureQuery can help you code data access in a way that helps optimize performance.
清单2:从日志文件中获取数据的范例代码。
清单1:从问题视图中收集数据的范例代码。
Listing 1: Sample code to collect data from the Problems view.
客户端代码调用数据逻辑方法可以捕获用户定义的异常。
Client code calling the data logic method can catch the user-defined exception.
附录c中提供了自定义数据绑定的示例代码。
The sample code for a custom Data Binding is provided in Appendix c.
这个系统调用向指定设备发送控制代码和其他数据。
This system call sends control code and other data to a specified device.
将这当作JSON数据,即使您也可以调用代码。
Think of this as JSON data, even though you can invoke code as well.
基于这一信任关系,应用程序可以安全地共享代码和数据。
Based on this trust relationship, applications can share code and data in a secure manner.
无疑,对于简单的数据表来说,需要的代码更多。
It's certainly more code than that for a simple table of data.
代码只是为占位符提供数据。
后来,该协议或数据类型还将存储在代码中。
Later on, this protocol or data type will also be stored in the code.
清单1给出了这个数据结构根类的代码。
Listing 1 gives the code for the root class of this data structure.
列表7的代码片段将数据装入第一个表。
The Listing 7 code snippet pushes data into the first table.
清单5中所示的代码将设置该数据。
Ksplice可以替换程序代码和数据结构。
业务用户可以在一个他们熟悉的工具中更新和管理代码清单数据。
Business users can update and manage code list data in a tool they know well.
在不同的代码页中移动数据。
与数据值变更相关的用户代码
这导致业务实现经常和数据存取以及转换的代码纠缠在一起。
As a result business implementations are often intertwined with data access and transformation code.
应用推荐