As the name implies, a memory-mapped file maps a file-like construct to an address in memory.
顾名思义,一个内存映射文件将一个类似文件的结构映射到内存的地址中。
Would your own programming benefit from more uniformity in the way it accesses file-like resources?
您自己的编程能从更为一致的访问类文件资源的方式中获益吗?
Next we'll look at some examples using dump and load , which work with files and file-like objects.
接下来,我们看一些示例,这些示例用到了dump和load,它们使用文件和类似文件的对象。
Feedinfo is the main function, and takes a URL and an optional output stream (file-like object), defaulting to system output (the console).
feedinfo是主函数,负责接收url和可选的输出流(类似文件的对象),默认输出流为系统输出(控制台)。
You'd write logic that appends to a list of strings or writes to a file-like object. For instance, the following code generates the E-mail described above.
还要编写附加到字符串列表的逻辑或为类文件对象编写的逻辑。
But at the boundaries — for objects that belong to custom classes — it is difficult to state definitively what constitutes "dictionary-like" or "file-like" behavior.
但是,在边界——对于属于自定义类的对象来说——难以声明最终是什么构成了“类-dictionary”或“类- file”的行为。
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().
例如,有许多函数都是对“类文件”对象进行操作,其中只是通过支持类似 .read() 、 .readlines()也许还有 .seek() 这样的几个方法来定义类文件。
While your personal computer only keeps one copy of a file, large-scale services like Facebook rely on what are called content delivery networks to manage data and distribution.
虽然你的个人电脑只能保存一个文件的一个副本,但像Facebook 这样的大型服务项目,则会依赖于所谓的内容分发网络来管理数据和分发。
When implemented, this scheme produces a hosts file like the example you can access under Downloads.
在实现的时候,这个方案生成与下载中能访问的示例类似的主机文件。
Running it on a valid database file, like the penultimate command in Listing 4, gives a count of the records in the file.
在有效的数据库文件上运行它,类似清单4中的倒数第二个命令,则会提供文件中的记录数。
For example, you might globally configure the framework with a line in a properties file like the one in Listing 10.
例如,可以在一个属性文件中用一行全局地配置框架,如清单 10 所示。
Select the contents of both tables with a join and you can produce a shape and coordinate file like that shown below.
选择两张表组合在一起后的内容,然后可以生成如下所示的图形和坐标文件。
I like graphical file managers.
我喜欢图形化的文件管理器。
So what does an XML version of the configuration file look like?
所以配置文件的XML版本会是什么样的呢?
This policy defines the rule to determine the pool where the new files created by users are to be placed depending on various file attributes like file name, path, owner, and so on.
该策略定义了用于确定池的规则,可根据文件名、路径、所有者等文件属性将用户新建的文件放置于相应池中。
The complete XSD file looks like the code in Listing 5.
复杂XSD文件如代码清单5所示。
It reads a Prolog data file like the sample, then creates Python objects to model the Prolog declarations.
它读取像样本那样的Prolog数据文件,然后创建Python对象来对Prolog声明建模。
At this point the WSDL file looks like Listing 1.
此时,WSDL文件看上去象清单1。
The results of running these two steps is a file like the n2.tar.gz file you downloaded in the Getting started with Mahout section.
运行这两个步骤的结果是生成一个文件,该文件类似于与您从Gettingstarted with Mahout入门部分下载的n2 . tar . gz文件。
Finally the biggest ‘flawback’ of them all: occasionally when saving a large file (like a video or folder full of music) is that ext2read will ‘copy’ nothing.
最后,Ex2Explorer最大的缺点:偶尔在保存大文件的时候(例如电影或者装满了mp3音乐的文件夹)什么都保存不出来。
You expose the service in an XML file, like this.
将该服务暴露在XML文件中,如下所示。
Create a label when you create a file system, like the root, swap, or other file systems.
在创建诸如root、swap之类的文件系统或其他文件系统时,创建一个标签。
This technique is useful to give yourself a reminder based on a coming date, perhaps in a script or shell startup file, like so.
这个技巧非常有用,它可以根据将来的日期为自己设置提醒,可能是在脚本或Shell启动文件中,如下所示。
If you started off by importing WSDL, the MXSD is a file like my_InlineSchema.mxsd under the appropriate namespace.
如果您从导入WSDL开始,则mxsd是适当命名空间中类似于my _ InlineSchema . mxsd的文件。
For key_output_file chose a file name which indicates that this is a key for an encrypted file like "ldappasskey.dat".
对于 key_output_file,选择一个文件名,它应该表明这是加密文件的密钥,比如 “ldappasskey.dat”。
You can build the help as one monolithic file, like a book, and have only one main topic that points to that file.
您可以将帮助作为一个整体文件来构建,像书一样,并且只有一个指向该文件的主要标题。
The updated file now looks like Listing 4.
现在,更新后的文件与清单4相似。
The contents of that file should look like Listing 12.
该文件的内容应该类似于清单12。
Because ZIP archives can have multiple files, they have their own file structures, much like your local computer's file system.
由于ZIP归档可以有多个文件,因此ZIP归档都有自己的文件结构,就像您的本地计算机的文件系统一样。
You cannot easily scribble comments on the margins, and annotating a text file like you would a submission to an edited journal is just too much.
你不能在空白处轻易地写下评语,或者当你想标注文档时,发现它已经被修改得太多了。
应用推荐