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() 这样的几个方法来定义类文件。
Save it in your own personal computer file if you like.
如果你愿意的话,可以把它保存在你的个人电脑文件里。
I like it at the top of my file.
我喜欢它放到我文件的顶端。
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.
选择两张表组合在一起后的内容,然后可以生成如下所示的图形和坐标文件。
So what does an XML version of the configuration file look like?
所以配置文件的XML版本会是什么样的呢?
Then, create the JAR file like this.
然后,像这样创建JAR文件。
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文件中,如下所示。
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启动文件中,如下所示。
Now run hpmcount to get PMC data again and get the output file like caesar2_cpi_0000.311458.
现在再次运行hpmcount收集pmc数据,产生caesar2_cpi_0000 . 311458这样的输出文件。
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.
您可以将帮助作为一个整体文件来构建,像书一样,并且只有一个指向该文件的主要标题。
Your final file should look like Listing 6.
最终的文件应该像清单6 这样。
The file should look like Listing 4.
这个文件类似于清单4。
Tap the file you'd like to play to begin playback on your computer.
点选你想要播放的文件可以开始在电脑上播放。
The file might look like Listing 2.
文件可能形入清单2所示。
应用推荐