清单9显示了完整的操作类代码,不只是改变项目描述的片断,这样我们可以学习为第二版插件创建的一些实用方法。
Listing 9 shows the complete action class code, not just the segment that changes the project description, so we can learn about some utility methods created for the second revision of the plugin.
清单2中的代码旨在查询到列表中的所有交易(若没有指定过滤条件的话)或者单个交易以及相关的项目信息。
The code in Listing 2 is intended to pull from the list either all transactions if no filter is specified or a single transaction together with the related project information.
本例的下一步不仅包括回发更新的项目列表,还包括提供状态信息,以使客户机了解服务器进行了怎样的操作,如以下代码清单所示。
The next step in this example is not only to send back the updated item list, but also to provide status information letting the client know what the server did as shown in the following code listing.
清单8中的代码获取您想要添加新子级的项目。
The code in Listing 8 fetches the item where you want to add the new child.
例如,获取Eclipse(参见参考资料),打开一个新项目,将清单1中的代码复制并粘贴到一个新文档中,编辑,您将很快创建一个结构化简历数据文件。
For example, get Eclipse (see Resources), open a new project, copy and paste the code from Listing 1 into a new document, edit, and you are well on your way to a structured resume data file.
清单4中的代码使用IDE内置的“projectBuild”Ant任务构建存在于工作区中的项目之一。
The code in Listing 4 builds one of the projects that exist in the workspace using IDE built-in "projectBuild" Ant task.
用自己喜欢的文本编辑器,打开项目根内的文件url .py并参照清单5更改代码。
With your favorite text editor, open the file url.py in the root of your project and change the code to match Listing 5.
请注意,清单8中的代码要求将 <tuscany-install>/lib目录中的Tuscany库添加到项目的类路径。
Note that the code in Listing 8 requires Tuscany libraries from the <tuscany-install>/lib directories to be added to the class path of your project.
清单4显示为对一个用户的项目目录进行密码检查向httpd . conf增加的代码,而不是将其放入一个. htaccess文件并依赖于AllowOverrides。
Listing 4 shows the additions to httpd.conf to enable password checking for a user's project directory, rather than putting in a.htaccess file and relying on AllowOverrides.
对于此项目,这段代码与清单1相似。
下面是用来从云存储服务中获取项目清单的代码。
Following is the code to get the list of items from the cloud storage service.
使用以下代码清单中的代码,以构建您的方法,根据项目来做出需要的更改。
Use the following code listing to build your method, making required changes according to your project.
清单2中的代码片断展示了一个循环,该循环用于处理DOAP文件中的每个项目(通常只有一个项目),并输出XML文档中由元素括起来的数据。
The code snippet in Listing 2 shows a loop to process every project in a DOAP file (normally, there's only one) and output data inside a element in an XML document.
创建了这个插件项目后,编辑 ShiroWebXmlPlugin.groovy文件,并添加如 清单7 所示的代码。
Once you create the plug-in project, edit the ShiroWebXmlPlugin.groovy file, and add the code shown in Listing 7.
现在,我们将更改来自GWTstart项目的代码(如清单4 所示)。
Now, we will alter the following code from the GWT start project, shown in Listing 4.
您可以将手工代码(见以下的代码清单6到代码清单10)放到Web项目的 src文件夹中(查看图26.
You put our handmade code (see following listings 6 to 10) to the src folder of the Web project (see Figure 26.
您可以将手工代码(见以下的代码清单6到代码清单10)放到Web项目的 src文件夹中(查看图26.
You put our handmade code (see following listings 6 to 10) to the src folder of the Web project (see Figure 26.
应用推荐