This pattern encapsulates code for accessing components through directory services, such as JNDI client code, so that a client can simply pass in the name of a resource and get back that resource.
这个模式通过目录服务封装访问组件的代码,如JNDI客户端代码之类,因此客户端可以简单的以资源名通过验证并返回这个资源。
First you create a new directory, into which you extract the code file supplied with this article.
首先创建一个新目录,将本文提供的代码文件提取到这个目录中。
You can take a local directory of existing code and make a repository from it, or you can mirror a repository that someone else publishes.
我们可以使用现有代码的一个本地目录,然后从中生成一个仓库;也可以映射其他人发布的仓库。
As you can see, the first step is to create a new work directory and then decompress the sample code file into this new directory.
如您所见,第一步是创建一个新的工作目录,然后把样例代码文件解压缩到这个新目录中。
Business logic code that USES a service locator avoids becoming cluttered with directory lookup code, and so is easier to understand.
业务逻辑代码使用服务定位器避免目录查找代码变得混乱,因此它很容易理解。
For example, if you want to perform a specific action in a different directory, you could use the code in Listing 8.
例如,如果希望在另一个目录中执行某一操作,可以使用清单8中的代码。
It isn't enough for the root of the directory to return a 404 status code, because it's possible for a directory to return a 404 but still serve out files underneath it.
对于根目录,只返回404状态代码是不够的,因为尽管目录返回404状态代码,但有可能在目录之下还有文件。
For example, the charting widget has a tests directory that contains code to get you started.
例如,图表小部件的测试目录包含入门代码。
I would also create an Mr Directory to house PHP code that implements the input, logic, and output methods for multiple regression analysis.
我还将创建一个mr目录,以容纳实现多次回归分析输入方法、逻辑和输出方法的php代码。
To build the sample application using the supplied ant build.xml, open a console to the root directory of the download code and type ant.
为了使用提供的antbuild . xml构建示例应用程序,打开一个控制台,进入下载代码的根目录,然后输入ant。
This consists of the dxldoc agent that runs on the Domino Directory and the Python code for the application itself.
其中包括在DominoDirectory上运行的dxldoc代理和应用程序自身的Python代码。
To test the code, create the log directory for Sphinx, start searchd, then run the PHP application, as shown below.
要测试代码,需要为Sphinx创建log目录,启动searchd,然后运行PHP应用程序,如下所示
This produces an executable called client, which assumes that the library resides in the same directory as the code (this is indicated by -l. -lprint).
这生成一个称之为client的可执行程序,这其中假定库与代码在同一个目录(由- l. - lprint决定)。
The first version of the example is archived in an EAR file named reallybigpet.ear, found in the dist directory of the code distribution.
本例的第一个版本存档在EAR文件reallybigpet.ear中,该文件位于代码发行版的dist目录中。
The contents of this directory relate directly to the way XDoclet code generation is performed.
该目录的内容与XDoclet代码生成的执行方式直接相关。
Code should be arranged so that there are no architecture-specific subdirectories within the Linux-specific directory in the code layout.
代码的安排应该使得在代码规划中特定于Linux的目录内不存在特定于体系结构的子目录。
We placed them in the config directory of our sample code package (which you can download from Resources).
我们把它们放在示例代码包的config目录中(您可以从参考资料下载)。
With ant installed, you can just run ant from a console open to the example code directory to build both client and server code.
安装ant后,可以从打开了示例代码目录的控制台运行ant,以构建客户机和服务器代码。
Create a file called dwr.xml in the WEB-INF directory using the code in Listing 2.
用清单2中的代码在WEB - INF目录创建一个名为dwr . xml的文件。
Click on the Browse button next to Project contents then navigate to the directory where the sample code was unzipped (Figure 3).
点击Browse按钮至Projectcontents,然后进入样本代码被打开的目录(图3)。
This last point is important: When you're using Apache Derby as an embedded database, the default location for the database files is in the directory where your code resides.
最后一点很重要:在将ApacheDerby用作嵌入式数据库时,数据库文件的默认位置是在代码所在的目录中。
To do so, you need the Mahout Job JAR, which is located in the hadoop directory in the sample code.
为此,您需要Mahout JobJAR,它位于示例代码的hadoop目录中。
Create and open OrdersView.jsp (in the interportletmessagingusingajax/jsp/html directory) and add the code in Listing 7 to it
创建并打开OrdersView.jsp(在interportletmessagingusingajax/jsp/html目录),并把清单7中的代码添加到它
The bold lines in Listing 4 show the web.xml code (in the dd directory of the code distribution), that protects the application.
清单4中的粗体行显示了保护应用程序的web. xml代码(在代码分发包的dd目录中)。
The first version of the example is archived in reallybigpet.war, which you can find in the war_only\dist directory of the code distribution.
这个例子的第一个版本打包在reallybigpet.war 中,该文件位于发布代码的 war_only\dist目录中。
To configure Samba, first change to the source3 subdirectory of the main Samba source code directory.
要配置Samba,首先更改 Samba源代码主目录的source3 子目录。
At this point, you should see the familiar Linux source code directory structure in your current working directory, and you can begin making modifications to the source.
现在在当前工作目录中,我们应该就可以看到熟悉的Linu x源代码目录结构了,然后我们可以对这些源代码任意进行修改。
Note: Other subdirectories off of the main Samba source code directory hold the source code for ancillary programs, support programs, documentation, and so on.
注意:Samba源代码主目录的其他子目录保存辅助程序、支持程序、文档等等的源代码。
If you want to completely remove an old version of Samba that was installed from source code, you should change into that version's source code directory and type make uninstall.
如果您想完全删除通过源代码安装的旧版samba,应当改成该版本的的源代码目录并输入makeuninstall。
These files generally require a particular internal directory structure, one that usually does not match the directory structure of your source code and build environment.
这些文件通常都要求有一个特定的内部目录结构,但其往往与你的源代码和编译环境的目录结构不匹配。
应用推荐