数据绑定是一种从数据文件格式到业务对象属性的映射方法。
Data binding is a method of mapping from the format in the data files to the attributes of a business object.
开发者只需调用SWC文件中的值对象上的方法就行了,其他的代码都被生成好了。
The developer simply calls methods on the value objects within the SWC file and the rest is already programmed.
这种方法有很多问题:文件格式是任意的,只保存一个关键字集合,根本没有对象、数据值限制到一行文本等等。
This approach has many problems: the file format is arbitrary, only one set of keywords is saved, objects are not even on the horizon, data values are limited to one line of text, and so on.
进行缓冲之后,out put .write方法将文件数据写入到outputStream对象的套接字中。
Once buffered, the file data is written through the output.write method into the socket of the OutputStream object.
在这两种情况下,您都需要声明依赖项(例如使用Spring配置文件),并向依赖对象类添加对应的构造函数或mutator方法。
In both cases you need to declare the dependency (e.g. using the Spring configuration file) and add a corresponding constructor or mutator method to the dependent object class.
下面清单2中的代码说明了为最终用户打开一个文件对话框所必需的对象和方法。
The code below illustrates the objects and methods necessary to open a file dialog to the end user.
调用create的时候,Castor将使用映射文件(sql -mapping . xml)来确定如何将传递给该方法的对象存储为sql数据。
When you call create , Castor USES your mapping file (sql-mapping.xml) to figure out how to store the object you pass to that method as SQL data.
这个类提供了截图、将位图转换成各种格式、比较两个MonkeyImage对象以及写图像到文件的方法。
This class provides methods for capturing screens, converting bitmap images to various formats, comparing two MonkeyImage objects, and writing an image to a file.
writer方法从一个可迭代的对象生成一个CSV文件;cursor.fetchall() 功能强大,4 个代码行就足以生成 CSV输出。
The csv.writer method produces a CSV file from an iterable object; cursor.fetchall() is a bit of a beast, and four lines are enough to produce the CSV output.
最后,完成想要的工作簿对象之后,使用工作簿的write方法将它写入一个文件(参见清单21)。
Finally, after finishing the desired workbook object, write it to a file using the workbook's write method (Listing 21).
在该示例中,代码调用Image . FromStream方法将包含图像文件的流转换为可加载到PictureBox控件中的Image对象。
In the example, the code calls the Image.FromStream method to convert the stream containing the image file into an image object that can be loaded into a PictureBox control.
为了获取每个活动中的文件,使用TreeParent对象中的另一个方法获取活动(第一级节点)的URL,并对活动url执行一个GET请求,见清单3。
For retrieving the files in each activity, use another method in the TreeParent object to get the URL of the activity (first-level node) and do a get request on the activity URL as shown in listing 3.
在我看来,如果能从XML文件中攫取一组数据,然后让一个非常自然的Python对象使用其自身的方法将这些数据作为自己的属性操作,那就太棒了。
In my opinion, it is fabulously cool to be able to grab a bunch of data from an XML file, then have a perfectly natural Python object act on that data as its own attributes, using its own methods.
相反,在类中编写通用方法以模拟以上的操作就比较合适了,它继承了appobjects文件夹中的GUI对象类。
Instead, it's good to write a generic method in a class to simulate the above action, which inherits the GUI object class in the appobjects folder.
在这个示例中,我们将使用所有方法中最直截了当的一种—将对象引用写入一个文件,该文件将由客户机选取。
In this example, we will use the most straightforward method of all — writing our object reference to a file that will be picked up by our client.
在配置文件中定义方法调用的能力是很重要的,不应该将这种能力限制于返回对象引用的方法。
The capability of defining method invocations in the configuration file is very important and should not be restricted to methods that return an object reference.
编辑服务器概要文件或部署组的方法是,在相应的视图中双击这些对象的节点。
To edit a Server Profile or Deployment Group, double-click a node for one of these objects in its respective view.
此方法与将文件嵌入“OLE对象”字段中相似,但是它占用的存储空间较少。
This method is similar to embedding files in an OLE Object field, but it consumes less storage space.
要读取数据,首先要创建合适的file对象——在这个示例中,文件对象打开testit .txt文件,并用read方法读取内容。
To read the data, you first create an appropriate file object — in this case, one that opens the testit.txt file — and read the contents using the read method.
例如,有许多函数都是对“类文件”对象进行操作,其中只是通过支持类似 .read() 、 .readlines()也许还有 .seek() 这样的几个方法来定义类文件。
For example, there are many functions that operate on "file-like" objects, where file-like is defined simply by supporting a few methods like .read(), .readlines(), and maybe .seek().
一些较新的方法,如具象状态传输(ReST),使用URL指定位置、对象和方法,提供受控制的文件访问。
Newer methods such as Representational State Transfer (ReST) provide managed file access using URLs to specify the location, object, and method.
其他两个构造方法只是调用静态方法IndexReader . open把你的文件路径或Directory对象转换成一个IndexReader。
The other two constructors just turn your file path or Directory object into an IndexReader by calling the static method IndexReader.open .
当然,此文件的创建操作可以由从纯文本处理到XML文档对象模型(Document Object Model, DOM)处理的任意数目个方法出色地自动完成。
Creation of this file is, of course, eminently automatable by any number of methods ranging from pure text manipulation to XML Document Object Model (DOM) manipulation.
例如,配置文件可以指定辅助log对象的创建,代码中所有日志记录的方法将按名称引用。
For instance, the configuration file could specify the creation of an auxiliary log object, which all the logging methods in the code will refer to by name.
每个Web服务发布一个WSDL文件,该文件包含它可以处理哪些方法和自变量的信息,以及不同方法返回什么对象的信息。
Each Web service publishes a WSDL file containing information about which methods and arguments it can handle as well as which objects the different methods return.
对于清单5中的样例,日志文件中的一行(如清单2所示)将作为传递到map方法中的输入Text对象。
For the sample in Listing 5, a single line from the log file (as seen in Listing 2) will be the input Text object that is passed into the map method.
Phar对象使用ArrayAccessSPL 对象,允许以数组的形式访问归档内容,因此提供了许多方法来向归档添加文件。
The Phar object uses the ArrayAccess SPL object to allow accessing the contents of the archive as an array, so it opens up many ways of adding files to the archive.
第一种方法十分简单,它将返回与调试器可执行文件相对应的Process对象。
The first of these methods is straightforward and returns a Process object corresponding to the debugger executable.
在_ setstate _方法内,可以根据经过pickle的名称和位置信息来重建文件对象,并将该文件对象分配给这个实例的logfile属性。
Inside the _setstate_ method we are able to recreate the file object based on the name and position information we pickled, and assign the file object to the instance's logfile attribute.
LaunchApp方法接受应用程序可执行文件的路径和应用程序窗体的名称,并返回一个表示该窗体的对象。
The LaunchApp method accepts the path to the application executable and the name of the application form, and returns an object representing the form.
应用推荐