|
Panda3D
|
A file that contains a set of files. More...
Public Member Functions | |
| __init__ () | |
| bool | addSignature (const Filename certificate, const Filename chain, const Filename pkey, str password) |
| Adds a new signature to the Multifile. More... | |
| bool | addSignature (const Filename composite, str password) |
| Adds a new signature to the Multifile. More... | |
| str | addSubfile (str subfile_name, const Filename filename, int compression_level) |
| Adds a file on disk as a subfile to the Multifile. More... | |
| str | addSubfile (str subfile_name, Istream subfile_data, int compression_level) |
| Adds a file from a stream as a subfile to the Multifile. More... | |
| close () | |
| Closes the Multifile if it is open. More... | |
| bool | compareSubfile (int index, const Filename filename) |
| Performs a byte-for-byte comparison of the indicated file on disk with the nth subfile. More... | |
| bool | extractSubfile (int index, const Filename filename) |
| Extracts the nth subfile into a file with the given name. More... | |
| bool | extractSubfileTo (int index, Ostream out) |
| Extracts the nth subfile to the indicated ostream. More... | |
| int | findSubfile (str subfile_name) |
| Returns the index of the subfile with the indicated name, or -1 if the named subfile is not within the Multifile. More... | |
| bool | flush () |
| Writes all contents of the Multifile to disk. More... | |
| str | getEncryptionAlgorithm () |
| Returns the encryption algorithm that was specified by set_encryption_algorithm(). More... | |
| bool | getEncryptionFlag () |
| Returns the flag indicating whether subsequently-added subfiles should be encrypted before writing them to the multifile. More... | |
| int | getEncryptionIterationCount () |
| Returns the value that was specified by set_encryption_iteration_count(). More... | |
| int | getEncryptionKeyLength () |
| Returns the encryption key length, in bits, that was specified by set_encryption_key_length(). More... | |
| str | getEncryptionPassword () |
| Returns the password that will be used to encrypt subfiles subsequently added to the multifile. More... | |
| str | getHeaderPrefix () |
| Returns the string that preceded the Multifile header on the file, if any. More... | |
| Streamoff | getIndexEnd () |
| Returns the first byte that is guaranteed to follow any index byte already written to disk in the Multifile. More... | |
| const Filename | getMultifileName () |
| Returns the filename of the Multifile, if it is available. More... | |
| int | getNumSignatures () |
| Returns the number of matching signatures found on the Multifile. More... | |
| int | getNumSubfiles () |
| Returns the number of subfiles within the Multifile. More... | |
| bool | getRecordTimestamp () |
| Returns the flag indicating whether timestamps should be recorded within the Multifile or not. More... | |
| int | getScaleFactor () |
| Returns the internal scale factor for this Multifile. More... | |
| str | getSignatureFriendlyName (int n) |
| Returns a "friendly name" for the nth signature found on the Multifile. More... | |
| str | getSignaturePublicKey (int n) |
| Returns the public key used for the nth signature found on the Multifile. More... | |
| str | getSignatureSubjectName (int n) |
| Returns the "subject name" for the nth signature found on the Multifile. More... | |
| int | getSubfileInternalLength (int index) |
| Returns the number of bytes the indicated subfile consumes within the archive. More... | |
| Streamoff | getSubfileInternalStart (int index) |
| Returns the starting byte position within the Multifile at which the indicated subfile begins. More... | |
| int | getSubfileLength (int index) |
| Returns the uncompressed data length of the nth subfile. More... | |
| str | getSubfileName (int index) |
| Returns the name of the nth subfile. More... | |
| list | getSubfileNames () |
| time_t | getSubfileTimestamp (int index) |
| Returns the modification time of the nth subfile. More... | |
| time_t | getTimestamp () |
| Returns the modification timestamp of the overall Multifile. More... | |
| bool | hasDirectory (str subfile_name) |
| Returns true if the indicated subfile name is the directory prefix to one or more files within the Multifile. More... | |
| bool | isReadValid () |
| Returns true if the Multifile has been opened for read mode and there have been no errors, and individual Subfile contents may be extracted. More... | |
| bool | isSubfileCompressed (int index) |
| Returns true if the indicated subfile has been compressed when stored within the archive, false otherwise. More... | |
| bool | isSubfileEncrypted (int index) |
| Returns true if the indicated subfile has been encrypted when stored within the archive, false otherwise. More... | |
| bool | isSubfileText (int index) |
| Returns true if the indicated subfile represents text data, or false if it represents binary data. More... | |
| bool | isWriteValid () |
| Returns true if the Multifile has been opened for write mode and there have been no errors, and Subfiles may be added or removed from the Multifile. More... | |
| ls (Ostream out) | |
| Shows a list of all subfiles within the Multifile. More... | |
| bool | needsRepack () |
| Returns true if the Multifile index is suboptimal and should be repacked. More... | |
| bool | openRead (const Filename multifile_name, Streamoff offset) |
| Opens the named Multifile on disk for reading. More... | |
| bool | openRead (IStreamWrapper multifile_stream, bool owns_pointer, Streamoff offset) |
| Opens an anonymous Multifile for reading using an istream. More... | |
| Istream | openReadSubfile (int index) |
| Returns an istream that may be used to read the indicated subfile. More... | |
| bool | openReadWrite (const Filename multifile_name) |
| Opens the named Multifile on disk for reading and writing. More... | |
| bool | openReadWrite (Iostream multifile_stream, bool owns_pointer) |
| Opens an anonymous Multifile for reading and writing using an iostream. More... | |
| bool | openWrite (const Filename multifile_name) |
| Opens the named Multifile on disk for writing. More... | |
| bool | openWrite (Ostream multifile_stream, bool owns_pointer) |
| Opens an anonymous Multifile for writing using an ostream. More... | |
| output (Ostream out) | |
| printSignatureCertificate (int n, Ostream out) | |
| Writes the certificate for the nth signature, in user-readable verbose form, to the indicated stream. More... | |
| VectorUchar | readSubfile (int index) |
| Returns a vector_uchar that contains the entire contents of the indicated subfile. More... | |
| removeSubfile (int index) | |
| Removes the nth subfile from the Multifile. More... | |
| bool | removeSubfile (str subfile_name) |
| Removes the named subfile from the Multifile, if it exists; returns true if successfully removed, or false if it did not exist in the first place. More... | |
| bool | repack () |
| Forces a complete rewrite of the Multifile and all of its contents, so that its index will appear at the beginning of the file with all of the subfiles listed in alphabetical order. More... | |
| bool | scanDirectory (VectorString contents, str subfile_name) |
| Considers subfile_name to be the name of a subdirectory within the Multifile, but not a file itself; fills the given vector up with the sorted list of subdirectories or files within the named directory. More... | |
| setEncryptionAlgorithm (str encryption_algorithm) | |
| Specifies the encryption algorithm that should be used for future calls to add_subfile(). More... | |
| setEncryptionFlag (bool flag) | |
| Sets the flag indicating whether subsequently-added subfiles should be encrypted before writing them to the multifile. More... | |
| setEncryptionIterationCount (int encryption_iteration_count) | |
| Specifies the number of times to repeatedly hash the key before writing it to the stream in future calls to add_subfile(). More... | |
| setEncryptionKeyLength (int encryption_key_length) | |
| Specifies the length of the key, in bits, that should be used to encrypt the stream in future calls to add_subfile(). More... | |
| setEncryptionPassword (str encryption_password) | |
| Specifies the password that will be used to encrypt subfiles subsequently added to the multifile, if the encryption flag is also set true (see set_encryption_flag()). More... | |
| setHeaderPrefix (str header_prefix) | |
| Sets the string which is written to the Multifile before the Multifile header. More... | |
| setMultifileName (const Filename multifile_name) | |
| Replaces the filename of the Multifile. More... | |
| setRecordTimestamp (bool record_timestamp) | |
| Sets the flag indicating whether timestamps should be recorded within the Multifile or not. More... | |
| setScaleFactor (int scale_factor) | |
| Changes the internal scale factor for this Multifile. More... | |
| str | updateSubfile (str subfile_name, const Filename filename, int compression_level) |
| Adds a file on disk to the subfile. More... | |
| int | validateSignatureCertificate (int n) |
| Checks that the certificate used for the nth signature is a valid, authorized certificate with some known certificate authority. More... | |
| writeSignatureCertificate (int n, Ostream out) | |
| Writes the certificate for the nth signature, in PEM form, to the indicated stream. More... | |
| Public Member Functions inherited from ReferenceCount | |
| int | getRefCount () |
| Returns the current reference count. More... | |
| ref () | |
| Explicitly increments the reference count. More... | |
| bool | testRefCountIntegrity () |
| Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
| bool | testRefCountNonzero () |
| Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
| bool | unref () |
| Explicitly decrements the reference count. More... | |
Static Public Member Functions | |
| static | closeReadSubfile (Istream stream) |
| Closes a file opened by a previous call to open_read_subfile(). More... | |
| static str | getMagicNumber () |
| Returns a string with the first n bytes written to a Multifile, to identify it as a Multifile. More... | |
| Static Public Member Functions inherited from ReferenceCount | |
| static TypeHandle | getClassType () |
Public Attributes | |
| String | magic_number |
| Returns a string with the first n bytes written to a Multifile, to identify it as a Multifile. More... | |
| Public Attributes inherited from ReferenceCount | |
| int | ref_count |
| The current reference count. More... | |
A file that contains a set of files.
| __init__ | ( | ) |
| bool addSignature | ( | const Filename | certificate, |
| const Filename | chain, | ||
| const Filename | pkey, | ||
| str | password | ||
| ) |
Adds a new signature to the Multifile.
This signature associates the indicated certificate with the current contents of the Multifile. When the Multifile is read later, the signature will still be present only if the Multifile is unchanged; any subsequent changes to the Multifile will automatically invalidate and remove the signature.
The chain filename may be empty if the certificate does not require an authenticating certificate chain (e.g. because it is self-signed).
The specified private key must match the certificate, and the Multifile must be open in read-write mode. The private key is only used for generating the signature; it is not written to the Multifile and cannot be retrieved from the Multifile later. (However, the certificate can be retrieved from the Multifile later, to identify the entity that created the signature.)
This implicitly causes a repack() operation if one is needed. Returns true on success, false on failure.
This flavor of add_signature() reads the certificate and private key from a PEM-formatted file, for instance as generated by the openssl command. If the private key file is password-encrypted, the third parameter will be used as the password to decrypt it.
| bool addSignature | ( | const Filename | composite, |
| str | password | ||
| ) |
Adds a new signature to the Multifile.
This signature associates the indicated certificate with the current contents of the Multifile. When the Multifile is read later, the signature will still be present only if the Multifile is unchanged; any subsequent changes to the Multifile will automatically invalidate and remove the signature.
This flavor of add_signature() reads the certificate, private key, and certificate chain from the same PEM-formatted file. It takes the first private key found as the intended key, and then uses the first certificate found that matches that key as the signing certificate. Any other certificates in the file are taken to be part of the chain.
| str addSubfile | ( | str | subfile_name, |
| const Filename | filename, | ||
| int | compression_level | ||
| ) |
Adds a file on disk as a subfile to the Multifile.
The file named by filename will be read and added to the Multifile at the next call to flush(). If there already exists a subfile with the indicated name, it is replaced without examining its contents (but see also update_subfile).
Either Filename:::set_binary() or set_text() must have been called previously to specify the nature of the source file. If set_text() was called, the text flag will be set on the subfile.
Returns the subfile name on success (it might have been modified slightly), or empty string on failure.
| str addSubfile | ( | str | subfile_name, |
| Istream | subfile_data, | ||
| int | compression_level | ||
| ) |
Adds a file from a stream as a subfile to the Multifile.
The indicated istream will be read and its contents added to the Multifile at the next call to flush(). The file will be added as a binary subfile.
Note that the istream must remain untouched and unused by any other code until flush() is called. At that time, the Multifile will read the entire contents of the istream from the current file position to the end of the file. Subsequently, the Multifile will not close or delete the istream. It is the caller's responsibility to ensure that the istream pointer does not destruct during the lifetime of the Multifile.
Returns the subfile name on success (it might have been modified slightly), or empty string on failure.
| close | ( | ) |
Closes the Multifile if it is open.
All changes are flushed to disk, and the file becomes invalid for further operations until the next call to open().
|
static |
Closes a file opened by a previous call to open_read_subfile().
This really just deletes the istream pointer, but it is recommended to use this interface instead of deleting it explicitly, to help work around compiler issues.
| bool compareSubfile | ( | int | index, |
| const Filename | filename | ||
| ) |
Performs a byte-for-byte comparison of the indicated file on disk with the nth subfile.
Returns true if the files are equivalent, or false if they are different (or the file is missing).
If Filename::set_binary() or set_text() has already been called, it specifies the nature of the source file. If this is different from the text flag of the subfile, the comparison will always return false. If this has not been specified, it will be set from the text flag of the subfile.
| bool extractSubfile | ( | int | index, |
| const Filename | filename | ||
| ) |
Extracts the nth subfile into a file with the given name.
| bool extractSubfileTo | ( | int | index, |
| Ostream | out | ||
| ) |
Extracts the nth subfile to the indicated ostream.
| int findSubfile | ( | str | subfile_name | ) |
Returns the index of the subfile with the indicated name, or -1 if the named subfile is not within the Multifile.
| bool flush | ( | ) |
Writes all contents of the Multifile to disk.
Until flush() is called, add_subfile() and remove_subfile() do not actually do anything to disk. At this point, all of the recently-added subfiles are read and their contents are added to the end of the Multifile, and the recently-removed subfiles are marked gone from the Multifile.
This may result in a suboptimal index. To guarantee that the index is written at the beginning of the file, call repack() instead of flush().
It is not necessary to call flush() explicitly unless you are concerned about reading the recently-added subfiles immediately.
Returns true on success, false on failure.
| str getEncryptionAlgorithm | ( | ) |
Returns the encryption algorithm that was specified by set_encryption_algorithm().
| bool getEncryptionFlag | ( | ) |
Returns the flag indicating whether subsequently-added subfiles should be encrypted before writing them to the multifile.
See set_encryption_flag().
| int getEncryptionIterationCount | ( | ) |
Returns the value that was specified by set_encryption_iteration_count().
| int getEncryptionKeyLength | ( | ) |
Returns the encryption key length, in bits, that was specified by set_encryption_key_length().
| str getEncryptionPassword | ( | ) |
Returns the password that will be used to encrypt subfiles subsequently added to the multifile.
See set_encryption_password().
| str getHeaderPrefix | ( | ) |
Returns the string that preceded the Multifile header on the file, if any.
See set_header_prefix().
| Streamoff getIndexEnd | ( | ) |
Returns the first byte that is guaranteed to follow any index byte already written to disk in the Multifile.
This number is largely meaningless in many cases, but if needs_repack() is false, and the file is flushed, this will indicate the number of bytes in the header + index. Everything at this byte position and later will be actual data.
|
static |
| int getNumSignatures | ( | ) |
Returns the number of matching signatures found on the Multifile.
These signatures may be iterated via get_signature() and related methods.
A signature on this list is guaranteed to match the Multifile contents, proving that the Multifile has been unmodified since the signature was applied. However, this does not guarantee that the certificate itself is actually from who it says it is from; only that it matches the Multifile contents. See validate_signature_certificate() to authenticate a particular certificate.
| int getNumSubfiles | ( | ) |
Returns the number of subfiles within the Multifile.
The subfiles may be accessed in alphabetical order by iterating through [0 .. get_num_subfiles()).
| bool getRecordTimestamp | ( | ) |
Returns the flag indicating whether timestamps should be recorded within the Multifile or not.
See set_record_timestamp().
| int getScaleFactor | ( | ) |
Returns the internal scale factor for this Multifile.
See set_scale_factor().
| str getSignatureFriendlyName | ( | int | n | ) |
Returns a "friendly name" for the nth signature found on the Multifile.
This attempts to extract out the most meaningful part of the subject name. It returns the emailAddress, if it is defined; otherwise, it returns the commonName.
See the comments in get_num_signatures().
| str getSignaturePublicKey | ( | int | n | ) |
Returns the public key used for the nth signature found on the Multifile.
This is encoded in DER form and returned as a string of hex digits.
This can be used, in conjunction with the subject name (see get_signature_subject_name()), to uniquely identify a particular certificate and its subsequent reissues. See the comments in get_num_signatures().
| str getSignatureSubjectName | ( | int | n | ) |
Returns the "subject name" for the nth signature found on the Multifile.
This is a string formatted according to RFC2253 that should more-or-less identify a particular certificate; when paired with the public key (see get_signature_public_key()), it can uniquely identify a certificate. See the comments in get_num_signatures().
| int getSubfileInternalLength | ( | int | index | ) |
Returns the number of bytes the indicated subfile consumes within the archive.
For compressed subfiles, this will generally be smaller than get_subfile_length(); for encrypted (but noncompressed) subfiles, it may be slightly different, for noncompressed and nonencrypted subfiles, it will be equal.
| Streamoff getSubfileInternalStart | ( | int | index | ) |
Returns the starting byte position within the Multifile at which the indicated subfile begins.
This may be used, with get_subfile_internal_length(), for low-level access to the subfile, but usually it is better to use open_read_subfile() instead (which automatically decrypts and/or uncompresses the subfile data).
| int getSubfileLength | ( | int | index | ) |
Returns the uncompressed data length of the nth subfile.
This might return 0 if the subfile has recently been added and flush() has not yet been called.
| str getSubfileName | ( | int | index | ) |
Returns the name of the nth subfile.
| list getSubfileNames | ( | ) |
| time_t getSubfileTimestamp | ( | int | index | ) |
Returns the modification time of the nth subfile.
If this is called on an older .mf file, which did not store individual timestamps in the file (or if get_record_timestamp() is false), this will return the modification time of the overall multifile.
| time_t getTimestamp | ( | ) |
| bool hasDirectory | ( | str | subfile_name | ) |
| bool isReadValid | ( | ) |
Returns true if the Multifile has been opened for read mode and there have been no errors, and individual Subfile contents may be extracted.
| bool isSubfileCompressed | ( | int | index | ) |
Returns true if the indicated subfile has been compressed when stored within the archive, false otherwise.
| bool isSubfileEncrypted | ( | int | index | ) |
Returns true if the indicated subfile has been encrypted when stored within the archive, false otherwise.
| bool isSubfileText | ( | int | index | ) |
Returns true if the indicated subfile represents text data, or false if it represents binary data.
If the file is text data, it may have been processed by end-of-line conversion when it was added. (But the actual bits in the multifile will represent the standard Unix end-of-line convention, e.g.
instead of \r
.)
| bool isWriteValid | ( | ) |
| bool needsRepack | ( | ) |
| bool openRead | ( | const Filename | multifile_name, |
| Streamoff | offset | ||
| ) |
Opens the named Multifile on disk for reading.
The Multifile index is read in, and the list of subfiles becomes available; individual subfiles may then be extracted or read, but the list of subfiles may not be modified.
Also see the version of open_read() which accepts an istream. Returns true on success, false on failure.
| bool openRead | ( | IStreamWrapper | multifile_stream, |
| bool | owns_pointer, | ||
| Streamoff | offset | ||
| ) |
Opens an anonymous Multifile for reading using an istream.
There must be seek functionality via seekg() and tellg() on the istream.
If owns_pointer is true, then the Multifile assumes ownership of the stream pointer and will delete it when the multifile is closed, including if this function returns false.
| Istream openReadSubfile | ( | int | index | ) |
Returns an istream that may be used to read the indicated subfile.
You may seek() within this istream to your heart's content; even though it will be a reference to the already-opened pfstream of the Multifile itself, byte 0 appears to be the beginning of the subfile and EOF appears to be the end of the subfile.
The returned istream will have been allocated via new; you should pass the pointer to close_read_subfile() when you are finished with it to delete it and release its resources.
Any future calls to repack() or close() (or the Multifile destructor) will invalidate all currently open subfile pointers.
The return value will be NULL if the stream cannot be opened for some reason.
| bool openReadWrite | ( | const Filename | multifile_name | ) |
Opens the named Multifile on disk for reading and writing.
If there already exists a file by that name, its index is read. Subfiles may be added or removed, and the resulting changes will be written to the named file.
Also see the version of open_read_write() which accepts an iostream. Returns true on success, false on failure.
| bool openReadWrite | ( | Iostream | multifile_stream, |
| bool | owns_pointer | ||
| ) |
Opens an anonymous Multifile for reading and writing using an iostream.
There must be seek functionality via seekg()/seekp() and tellg()/tellp() on the iostream.
If owns_pointer is true, then the Multifile assumes ownership of the stream pointer and will delete it when the multifile is closed, including if this function returns false.
| bool openWrite | ( | const Filename | multifile_name | ) |
Opens the named Multifile on disk for writing.
If there already exists a file by that name, it is truncated. The Multifile is then prepared for accepting a brand new set of subfiles, which will be written to the indicated filename. Individual subfiles may not be extracted or read.
Also see the version of open_write() which accepts an ostream. Returns true on success, false on failure.
| bool openWrite | ( | Ostream | multifile_stream, |
| bool | owns_pointer | ||
| ) |
Opens an anonymous Multifile for writing using an ostream.
There must be seek functionality via seekp() and tellp() on the pstream.
If owns_pointer is true, then the Multifile assumes ownership of the stream pointer and will delete it when the multifile is closed, including if this function returns false.
| output | ( | Ostream | out | ) |
| printSignatureCertificate | ( | int | n, |
| Ostream | out | ||
| ) |
Writes the certificate for the nth signature, in user-readable verbose form, to the indicated stream.
See the comments in get_num_signatures().
| VectorUchar readSubfile | ( | int | index | ) |
Returns a vector_uchar that contains the entire contents of the indicated subfile.
| removeSubfile | ( | int | index | ) |
Removes the nth subfile from the Multifile.
This will cause all subsequent index numbers to decrease by one. The file will not actually be removed from the disk until the next call to flush().
Note that this does not actually remove the data from the indicated subfile; it simply removes it from the index. The Multifile will not be reduced in size after this operation, until the next call to repack().
| bool removeSubfile | ( | str | subfile_name | ) |
Removes the named subfile from the Multifile, if it exists; returns true if successfully removed, or false if it did not exist in the first place.
The file will not actually be removed from the disk until the next call to flush().
Note that this does not actually remove the data from the indicated subfile; it simply removes it from the index. The Multifile will not be reduced in size after this operation, until the next call to repack().
| bool repack | ( | ) |
Forces a complete rewrite of the Multifile and all of its contents, so that its index will appear at the beginning of the file with all of the subfiles listed in alphabetical order.
This is considered optimal for reading, and is the standard configuration; but it is not essential to do this.
It is only valid to call this if the Multifile was opened using open_read_write() and an explicit filename, rather than an iostream. Also, we must have write permission to the directory containing the Multifile.
Returns true on success, false on failure.
| bool scanDirectory | ( | VectorString | contents, |
| str | subfile_name | ||
| ) |
Considers subfile_name to be the name of a subdirectory within the Multifile, but not a file itself; fills the given vector up with the sorted list of subdirectories or files within the named directory.
Note that directories do not exist explicitly within a Multifile; this just checks for the existence of files with the given initial prefix.
Returns true if successful, false otherwise.
| setEncryptionAlgorithm | ( | str | encryption_algorithm | ) |
Specifies the encryption algorithm that should be used for future calls to add_subfile().
The default is whatever is specified by the encryption- algorithm config variable. The complete set of available algorithms is defined by the current version of OpenSSL.
If an invalid algorithm is specified, there is no immediate error return code, but flush() will fail and the file will be invalid.
It is possible to apply a different encryption algorithm to different files, and unlike the password, this does not interfere with mounting the multifile via VFS. Changing this value may cause an implicit call to flush().
| setEncryptionFlag | ( | bool | flag | ) |
Sets the flag indicating whether subsequently-added subfiles should be encrypted before writing them to the multifile.
If true, subfiles will be encrypted; if false (the default), they will be written without encryption.
When true, subfiles will be encrypted with the password specified by set_encryption_password(). It is possible to apply a different password to different files, but the resulting file can't be mounted via VFS.
| setEncryptionIterationCount | ( | int | encryption_iteration_count | ) |
Specifies the number of times to repeatedly hash the key before writing it to the stream in future calls to add_subfile().
Its purpose is to make it computationally more expensive for an attacker to search the key space exhaustively. This should be a multiple of 1,000 and should not exceed about 65 million; the value 0 indicates just one application of the hashing algorithm.
The default is whatever is specified by the multifile-encryption-iteration- count config variable.
It is possible to apply a different iteration count to different files, and unlike the password, this does not interfere with mounting the multifile via VFS. Changing this value causes an implicit call to flush().
| setEncryptionKeyLength | ( | int | encryption_key_length | ) |
Specifies the length of the key, in bits, that should be used to encrypt the stream in future calls to add_subfile().
The default is whatever is specified by the encryption-key-length config variable.
If an invalid key_length for the chosen algorithm is specified, there is no immediate error return code, but flush() will fail and the file will be invalid.
It is possible to apply a different key length to different files, and unlike the password, this does not interfere with mounting the multifile via VFS. Changing this value may cause an implicit call to flush().
| setEncryptionPassword | ( | str | encryption_password | ) |
Specifies the password that will be used to encrypt subfiles subsequently added to the multifile, if the encryption flag is also set true (see set_encryption_flag()).
It is possible to apply a different password to different files, but the resulting file can't be mounted via VFS. Changing this value may cause an implicit call to flush().
| setHeaderPrefix | ( | str | header_prefix | ) |
Sets the string which is written to the Multifile before the Multifile header.
This string must begin with a hash mark and end with a newline character; and if it includes embedded newline characters, each one must be followed by a hash mark. If these conditions are not initially true, the string will be modified as necessary to make it so.
This is primarily useful as a simple hack to allow p3d applications to be run directly from the command line on Unix-like systems.
The return value is true if successful, or false on failure (for instance, because the header prefix violates the above rules).
| setMultifileName | ( | const Filename | multifile_name | ) |
Replaces the filename of the Multifile.
This is primarily used for documentation purposes only; changing this name does not open the indicated file. See open_read() or open_write() for that.
| setRecordTimestamp | ( | bool | record_timestamp | ) |
Sets the flag indicating whether timestamps should be recorded within the Multifile or not.
The default is true, indicating the Multifile will record timestamps for the overall file and also for each subfile.
If this is false, the Multifile will not record timestamps internally. In this case, the return value from get_timestamp() or get_subfile_timestamp() will be estimations.
You may want to set this false to minimize the bitwise difference between independently-generated Multifiles.
| setScaleFactor | ( | int | scale_factor | ) |
Changes the internal scale factor for this Multifile.
This is normally 1, but it may be set to any arbitrary value (greater than zero) to support Multifile archives that exceed 4GB, if necessary. (Individual subfiles may still not exceed 4GB.)
All addresses within the file are rounded up to the next multiple of _scale_factor, and zeros are written to the file to fill the resulting gaps. Then the address is divided by _scale_factor and written out as a 32-bit integer. Thus, setting a scale factor of 2 supports up to 8GB files, 3 supports 12GB files, etc.
Calling this function on an already-existing Multifile will have no immediate effect until a future call to repack() or close() (or until the Multifile is destructed).
| str updateSubfile | ( | str | subfile_name, |
| const Filename | filename, | ||
| int | compression_level | ||
| ) |
Adds a file on disk to the subfile.
If a subfile already exists with the same name, its contents are compared byte-for-byte to the disk file, and it is replaced only if it is different; otherwise, the multifile is left unchanged.
Either Filename:::set_binary() or set_text() must have been called previously to specify the nature of the source file. If set_text() was called, the text flag will be set on the subfile.
| int validateSignatureCertificate | ( | int | n | ) |
Checks that the certificate used for the nth signature is a valid, authorized certificate with some known certificate authority.
Returns 0 if it is valid, -1 if there is some error, or the corresponding OpenSSL error code if it is invalid, out-of-date, or self-signed.
| writeSignatureCertificate | ( | int | n, |
| Ostream | out | ||
| ) |
Writes the certificate for the nth signature, in PEM form, to the indicated stream.
See the comments in get_num_signatures().


|
From |
To |
Subject |
Date |
|
|
<EMAIL_ADDRESS>|
Booking confirmation #389629244 |
May 25, 2011 |
|
|
<EMAIL_ADDRESS>|
FW: Associate advice |
May 7, 2011 |
|
|
<EMAIL_ADDRESS>|
RE: Phone call tomorrow 5 o'clock |
May 19, 2011 |
|
<EMAIL_ADDRESS>|
<EMAIL_ADDRESS>|
Completing basketball project |
May 22, 2011 |
|
<EMAIL_ADDRESS>|
<EMAIL_ADDRESS>|
FW: Can you get DE to resubmit accounts? |
Apr 26, 2011 |
|
<EMAIL_ADDRESS>|
<EMAIL_ADDRESS>|
RE: Catch up at 9:00 to finalise rain spec |
May 22, 2011 |
|
Madison Lalinesson<EMAIL_ADDRESS>|
<EMAIL_ADDRESS>|
RE: Pencil scenarios |
May 19, 2011 |
|
<EMAIL_ADDRESS>|
<EMAIL_ADDRESS>|
Flavor benefit gig |
Apr 28, 2011 |
|
Sandra Juanhison<EMAIL_ADDRESS>|
<EMAIL_ADDRESS>|
RE: Apparel5 network is back up |
May 8, 2011 |
|
Sylvester<EMAIL_ADDRESS>|
<EMAIL_ADDRESS>|
Feedback requested by Ayanna Nuyo |
May 1, 2011 |
|
<EMAIL_ADDRESS>|
<EMAIL_ADDRESS>|
Project Book starting 6pm |
May 4, 2011 |
|
XLN<EMAIL_ADDRESS>|
<EMAIL_ADDRESS>|
RE: Remember Whoopi's joke |
May 8, 2011 |


Arbitrary precision real balls using Arb#
This is a binding to the Arb library for ball arithmetic. It may be useful to refer to its documentation for more details.
Parts of the documentation for this module are copied or adapted from Arb’s own documentation, licenced under the GNU General Public License version 2, or later.
Data Structure#
Ball arithmetic, also known as mid-rad interval arithmetic, is an extension of floating-point arithmetic in which an error bound is attached to each variable. This allows doing rigorous computations over the real numbers, while avoiding the overhead of traditional (inf-sup) interval arithmetic at high precision, and eliminating much of the need for time-consuming and bug-prone manual error analysis associated with standard floating-point arithmetic.
Sage RealBall
objects wrap Arb objects of type arb_t
. A real
ball represents a ball over the real numbers, that is, an interval \([m-r,m+r]\)
where the midpoint \(m\) and the radius \(r\) are (extended) real numbers:
sage: RBF(pi)
[3.141592653589793 +/- ...e-16]
sage: RBF(pi).mid(), RBF(pi).rad()
(3.14159265358979, ...e-16)
The midpoint is represented as an arbitrary-precision floating-point number with arbitrary-precision exponent. The radius is a floating-point number with fixed-precision mantissa and arbitrary-precision exponent.
sage: RBF(2)^(2^100)
[2.285367694229514e+381600854690147056244358827360 +/- ...e+381600854690147056244358827344]
RealBallField
objects (the parents of real balls) model the field of
real numbers represented by balls on which computations are carried out with a
certain precision:
sage: RBF
Real ball field with 53 bits of precision
It is possible to construct a ball whose parent is the real ball field with precision \(p\) but whose midpoint does not fit on \(p\) bits. However, the results of operations involving such a ball will (usually) be rounded to its parent’s precision:
sage: RBF(factorial(50)).mid(), RBF(factorial(50)).rad()
(3.0414093201713378043612608166064768844377641568961e64, 0.00000000)
sage: (RBF(factorial(50)) + 0).mid()
3.04140932017134e64
Comparison#
Warning
In accordance with the semantics of Arb, identical RealBall
objects are understood to give permission for algebraic simplification.
This assumption is made to improve performance. For example, setting z =
x*x
may set \(z\) to a ball enclosing the set \(\{t^2 : t \in x\}\) and not
the (generally larger) set \(\{tu : t \in x, u \in x\}\).
Two elements are equal if and only if they are exact and equal (in spite of the above warning, inexact balls are not considered equal to themselves):
sage: a = RBF(1)
sage: b = RBF(1)
sage: a is b
False
sage: a == a
True
sage: a == b
True
sage: a = RBF(1/3)
sage: b = RBF(1/3)
sage: a.is_exact()
False
sage: b.is_exact()
False
sage: a is b
False
sage: a == a
False
sage: a == b
False
A ball is non-zero in the sense of comparison if and only if it does not contain zero.
sage: a = RBF(RIF(-0.5, 0.5))
sage: a != 0
False
sage: b = RBF(1/3)
sage: b != 0
True
However, bool(b)
returns False
for a ball b
only if b
is exactly
zero:
sage: bool(a)
True
sage: bool(b)
True
sage: bool(RBF.zero())
False
A ball left
is less than a ball right
if all elements of
left
are less than all elements of right
.
sage: a = RBF(RIF(1, 2))
sage: b = RBF(RIF(3, 4))
sage: a < b
True
sage: a <= b
True
sage: a > b
False
sage: a >= b
False
sage: a = RBF(RIF(1, 3))
sage: b = RBF(RIF(2, 4))
sage: a < b
False
sage: a <= b
False
sage: a > b
False
sage: a >= b
False
Comparisons with Sage symbolic infinities work with some limitations:
sage: -infinity < RBF(1) < +infinity
True
sage: -infinity < RBF(infinity)
True
sage: RBF(infinity) < infinity
False
sage: RBF(NaN) < infinity
Traceback (most recent call last):
...
ValueError: infinite but not with +/- phase
sage: 1/RBF(0) <= infinity
Traceback (most recent call last):
...
ValueError: infinite but not with +/- phase
Comparisons between elements of real ball fields, however, support special values and should be preferred:
sage: RBF(NaN) < RBF(infinity)
False
sage: RBF(0).add_error(infinity) <= RBF(infinity)
True
Classes and Methods#
- class sage.rings.real_arb.RealBall#
Bases:
RingElement
Hold one
arb_t
of the Arb libraryEXAMPLES:
sage: a = RealBallField()(RIF(1)) # indirect doctest sage: b = a.psi() sage: b # abs tol 1e-15 [-0.5772156649015329 +/- 4.84e-17] sage: RIF(b) -0.577215664901533?
- Chi()#
Hyperbolic cosine integral
EXAMPLES:
sage: RBF(1).Chi() # abs tol 1e-17 [0.837866940980208 +/- 4.72e-16]
- Ci()#
Cosine integral
EXAMPLES:
sage: RBF(1).Ci() # abs tol 5e-16 [0.337403922900968 +/- 3.25e-16]
- Ei()#
Exponential integral
EXAMPLES:
sage: RBF(1).Ei() # abs tol 5e-16 [1.89511781635594 +/- 4.94e-15]
- Li()#
Offset logarithmic integral
EXAMPLES:
sage: RBF(3).Li() # abs tol 1e-15 [1.11842481454970 +/- 7.61e-15]
- Shi()#
Hyperbolic sine integral
EXAMPLES:
sage: RBF(1).Shi() [1.05725087537573 +/- 2.77e-15]
- Si()#
Sine integral
EXAMPLES:
sage: RBF(1).Si() # abs tol 1e-15 [0.946083070367183 +/- 9.22e-16]
- above_abs()#
Return an upper bound for the absolute value of this ball.
OUTPUT:
A ball with zero radius
EXAMPLES:
sage: b = RealBallField(8)(1/3).above_abs() sage: b [0.33 +/- ...e-3] sage: b.is_exact() True sage: QQ(b) 171/512
See also
- accuracy()#
Return the effective relative accuracy of this ball measured in bits.
The accuracy is defined as the difference between the position of the top bit in the midpoint and the top bit in the radius, minus one. The result is clamped between plus/minus
maximal_accuracy()
.EXAMPLES:
sage: RBF(pi).accuracy() 52 sage: RBF(1).accuracy() == RBF.maximal_accuracy() True sage: RBF(NaN).accuracy() == -RBF.maximal_accuracy() True
See also
- add_error(ampl)#
Increase the radius of this ball by (an upper bound on)
ampl
.If
ampl
is negative, the radius is unchanged.INPUT:
ampl
– A real ball (or an object that can be coerced to a real ball).
OUTPUT:
A new real ball.
EXAMPLES:
sage: err = RBF(10^-16) sage: RBF(1).add_error(err) [1.000000000000000 +/- ...e-16]
- agm(other)#
Return the arithmetic-geometric mean of
self
andother
.EXAMPLES:
sage: RBF(1).agm(1) 1.000000000000000 sage: RBF(sqrt(2)).agm(1)^(-1) [0.8346268416740...]
- arccos()#
Return the arccosine of this ball.
EXAMPLES:
sage: RBF(1).arccos() 0 sage: RBF(1, rad=.125r).arccos() nan
- arccosh()#
Return the inverse hyperbolic cosine of this ball.
EXAMPLES:
sage: RBF(2).arccosh() [1.316957896924817 +/- ...e-16] sage: RBF(1).arccosh() 0 sage: RBF(0).arccosh() nan
- arcsin()#
Return the arcsine of this ball.
EXAMPLES:
sage: RBF(1).arcsin() [1.570796326794897 +/- ...e-16] sage: RBF(1, rad=.125r).arcsin() nan
- arcsinh()#
Return the inverse hyperbolic sine of this ball.
EXAMPLES:
sage: RBF(1).arcsinh() [0.881373587019543 +/- ...e-16] sage: RBF(0).arcsinh() 0
- arctan()#
Return the arctangent of this ball.
EXAMPLES:
sage: RBF(1).arctan() [0.7853981633974483 +/- ...e-17]
- arctanh()#
Return the inverse hyperbolic tangent of this ball.
EXAMPLES:
sage: RBF(0).arctanh() 0 sage: RBF(1/2).arctanh() [0.549306144334055 +/- ...e-16] sage: RBF(1).arctanh() nan
- below_abs(test_zero=False)#
Return a lower bound for the absolute value of this ball.
INPUT:
test_zero
(boolean, defaultFalse
) – ifTrue
, make sure that the returned lower bound is positive, raising an error if the ball contains zero.
OUTPUT:
A ball with zero radius
EXAMPLES:
sage: RealBallField(8)(1/3).below_abs() [0.33 +/- ...e-5] sage: b = RealBallField(8)(1/3).below_abs() sage: b [0.33 +/- ...e-5] sage: b.is_exact() True sage: QQ(b) 169/512 sage: RBF(0).below_abs() 0 sage: RBF(0).below_abs(test_zero=True) Traceback (most recent call last): ... ValueError: ball contains zero
See also
- beta(a, z=1)#
(Incomplete) beta function
INPUT:
a
,z
(optional) – real balls
OUTPUT:
The lower incomplete beta function \(B(self, a, z)\).
With the default value of
z
, the complete beta function \(B(self, a)\).EXAMPLES:
sage: RBF(sin(3)).beta(RBF(2/3).sqrt()) # abs tol 1e-13 [7.407661629415 +/- 1.07e-13] sage: RealBallField(100)(7/2).beta(1) # abs tol 1e-30 [0.28571428571428571428571428571 +/- 5.23e-30] sage: RealBallField(100)(7/2).beta(1, 1/2) [0.025253813613805268728601584361 +/- 2.53e-31]
Todo
At the moment RBF(beta(a,b)) does not work, one needs RBF(a).beta(b) for this to work. See github issue #32851 and github issue #24641.
- ceil()#
Return the ceil of this ball.
EXAMPLES:
sage: RBF(1000+1/3, rad=1.r).ceil() [1.00e+3 +/- 2.01]
- center()#
Return the center of this ball.
EXAMPLES:
sage: RealBallField(16)(1/3).mid() 0.3333 sage: RealBallField(16)(1/3).mid().parent() Real Field with 16 bits of precision sage: RealBallField(16)(RBF(1/3)).mid().parent() Real Field with 53 bits of precision sage: RBF('inf').mid() +infinity
sage: b = RBF(2)^(2^1000) sage: b.mid() # arb216 Traceback (most recent call last): ... RuntimeError: unable to convert to MPFR (exponent out of range?) sage: b.mid() # arb218 +infinity
- chebyshev_T(n)#
Evaluate the Chebyshev polynomial of the first kind
T_n
at this ball.EXAMPLES:
sage: RBF(pi).chebyshev_T(0) 1.000000000000000 sage: RBF(pi).chebyshev_T(1) [3.141592653589793 +/- ...e-16] sage: RBF(pi).chebyshev_T(10**20) Traceback (most recent call last): ... ValueError: index too large sage: RBF(pi).chebyshev_T(-1) Traceback (most recent call last): ... ValueError: expected a nonnegative index
- chebyshev_U(n)#
Evaluate the Chebyshev polynomial of the second kind
U_n
at this ball.EXAMPLES:
sage: RBF(pi).chebyshev_U(0) 1.000000000000000 sage: RBF(pi).chebyshev_U(1) [6.283185307179586 +/- ...e-16] sage: RBF(pi).chebyshev_U(10**20) Traceback (most recent call last): ... ValueError: index too large sage: RBF(pi).chebyshev_U(-1) Traceback (most recent call last): ... ValueError: expected a nonnegative index
- contains_exact(other)#
Return
True
iff the given number (or ball)other
is contained in the interval represented byself
.If
self
contains NaN, this function always returnsTrue
(as it could represent anything, and in particular could represent all the points included inother
). Ifother
contains NaN andself
does not, it always returnsFalse
.Use
other in self
for a test that works for a wider range of inputs but may return false negatives.EXAMPLES:
sage: b = RBF(1) sage: b.contains_exact(1) True sage: b.contains_exact(QQ(1)) True sage: b.contains_exact(1.) True sage: b.contains_exact(b) True
sage: RBF(1/3).contains_exact(1/3) True sage: RBF(sqrt(2)).contains_exact(sqrt(2)) Traceback (most recent call last): ... TypeError: unsupported type: <class 'sage.symbolic.expression.Expression'>
- contains_integer()#
Return
True
iff this ball contains any integer.EXAMPLES:
sage: RBF(3.1, 0.1).contains_integer() True sage: RBF(3.1, 0.05).contains_integer() False
- contains_zero()#
Return
True
iff this ball contains zero.EXAMPLES:
sage: RBF(0).contains_zero() True sage: RBF(RIF(-1, 1)).contains_zero() True sage: RBF(1/3).contains_zero() False
- cos()#
Return the cosine of this ball.
EXAMPLES:
sage: RBF(pi).cos() [-1.00000000000000 +/- ...e-16]
See also
- cos_integral()#
Cosine integral
EXAMPLES:
sage: RBF(1).Ci() # abs tol 5e-16 [0.337403922900968 +/- 3.25e-16]
- cosh()#
Return the hyperbolic cosine of this ball.
EXAMPLES:
sage: RBF(1).cosh() [1.543080634815244 +/- ...e-16]
- cosh_integral()#
Hyperbolic cosine integral
EXAMPLES:
sage: RBF(1).Chi() # abs tol 1e-17 [0.837866940980208 +/- 4.72e-16]
- cot()#
Return the cotangent of this ball.
EXAMPLES:
sage: RBF(1).cot() [0.642092615934331 +/- ...e-16] sage: RBF(pi).cot() nan
- coth()#
Return the hyperbolic cotangent of this ball.
EXAMPLES:
sage: RBF(1).coth() [1.313035285499331 +/- ...e-16] sage: RBF(0).coth() nan
- csc()#
Return the cosecant of this ball.
EXAMPLES:
sage: RBF(1).csc() [1.188395105778121 +/- ...e-16]
- csch()#
Return the hyperbolic cosecant of this ball.
EXAMPLES:
sage: RBF(1).csch() [0.850918128239321 +/- ...e-16]
- diameter()#
Return the diameter of this ball.
EXAMPLES:
sage: RBF(1/3).diameter() 1.1102230e-16 sage: RBF(1/3).diameter().parent() Real Field with 30 bits of precision sage: RBF(RIF(1.02, 1.04)).diameter() 0.020000000
See also
- endpoints(rnd=None)#
Return the endpoints of this ball, rounded outwards.
INPUT:
rnd
(string) – rounding mode for the parent of the resulting floating-point numbers (does not affect their values!), seesage.rings.real_mpfi.RealIntervalFieldElement.upper()
OUTPUT:
A pair of real numbers.
EXAMPLES:
sage: RBF(-1/3).endpoints() (-0.333333333333334, -0.333333333333333)
- erf()#
Error function.
EXAMPLES:
sage: RBF(1/2).erf() # abs tol 1e-16 [0.520499877813047 +/- 6.10e-16]
- erfi()#
Imaginary error function
EXAMPLES:
sage: RBF(1/2).erfi() [0.614952094696511 +/- 2.22e-16]
- exp()#
Return the exponential of this ball.
EXAMPLES:
sage: RBF(1).exp() [2.718281828459045 +/- ...e-16]
- expm1()#
Return
exp(self) - 1
, computed accurately whenself
is close to zero.EXAMPLES:
sage: eps = RBF(1e-30) sage: exp(eps) - 1 [+/- ...e-30] sage: eps.expm1() [1.000000000000000e-30 +/- ...e-47]
- floor()#
Return the floor of this ball.
EXAMPLES:
sage: RBF(1000+1/3, rad=1.r).floor() [1.00e+3 +/- 1.01]
- gamma(a=None)#
Image of this ball by the (upper incomplete) Euler Gamma function
For \(a\) real, return the upper incomplete Gamma function \(\Gamma(self,a)\).
For integer and rational arguments,
gamma()
may be faster.EXAMPLES:
sage: RBF(1/2).gamma() [1.772453850905516 +/- ...e-16] sage: RBF(gamma(3/2, RBF(2).sqrt())) # abs tol 2e-17 [0.37118875695353 +/- 3.00e-15] sage: RBF(3/2).gamma_inc(RBF(2).sqrt()) # abs tol 2e-17 [0.37118875695353 +/- 3.00e-15]
See also
- gamma_inc(a=None)#
Image of this ball by the (upper incomplete) Euler Gamma function
For \(a\) real, return the upper incomplete Gamma function \(\Gamma(self,a)\).
For integer and rational arguments,
gamma()
may be faster.EXAMPLES:
sage: RBF(1/2).gamma() [1.772453850905516 +/- ...e-16] sage: RBF(gamma(3/2, RBF(2).sqrt())) # abs tol 2e-17 [0.37118875695353 +/- 3.00e-15] sage: RBF(3/2).gamma_inc(RBF(2).sqrt()) # abs tol 2e-17 [0.37118875695353 +/- 3.00e-15]
See also
- gamma_inc_lower(a)#
Image of this ball by the lower incomplete Euler Gamma function
For \(a\) real, return the lower incomplete Gamma function of \(\Gamma(self,a)\).
EXAMPLES:
sage: RBF(gamma_inc_lower(1/2, RBF(2).sqrt())) [1.608308637729248 +/- 8.14e-16] sage: RealBallField(100)(7/2).gamma_inc_lower(5) [2.6966551541863035516887949614 +/- 8.91e-29]
- identical(other)#
Return
True
iffself
andother
are equal as balls, i.e. have both the same midpoint and radius.Note that this is not the same thing as testing whether both
self
andother
certainly represent the same real number, unless eitherself
orother
is exact (and neither contains NaN). To test whether both operands might represent the same mathematical quantity, useoverlaps()
orcontains()
, depending on the circumstance.EXAMPLES:
sage: RBF(1).identical(RBF(3)-RBF(2)) True sage: RBF(1, rad=0.25r).identical(RBF(1, rad=0.25r)) True sage: RBF(1).identical(RBF(1, rad=0.25r)) False
- imag()#
Return the imaginary part of this ball.
EXAMPLES:
sage: RBF(1/3).imag() 0
- is_NaN()#
Return
True
if this ball is not-a-number.EXAMPLES:
sage: RBF(NaN).is_NaN() True sage: RBF(-5).gamma().is_NaN() True sage: RBF(infinity).is_NaN() False sage: RBF(42, rad=1.r).is_NaN() False
- is_exact()#
Return
True
iff the radius of this ball is zero.EXAMPLES:
sage: RBF = RealBallField() sage: RBF(1).is_exact() True sage: RBF(RIF(0.1, 0.2)).is_exact() False
- is_finite()#
Return
True
iff the midpoint and radius of this ball are both finite floating-point numbers, i.e. not infinities or NaN.EXAMPLES:
sage: (RBF(2)^(2^1000)).is_finite() True sage: RBF(oo).is_finite() False
- is_infinity()#
Return
True
if this ball contains or may represent a point at infinity.This is the exact negation of
is_finite()
, used in comparisons with Sage symbolic infinities.Warning
Contrary to the usual convention, a return value of True does not imply that all points of the ball satisfy the predicate. This is due to the way comparisons with symbolic infinities work in sage.
EXAMPLES:
sage: RBF(infinity).is_infinity() True sage: RBF(-infinity).is_infinity() True sage: RBF(NaN).is_infinity() True sage: (~RBF(0)).is_infinity() True sage: RBF(42, rad=1.r).is_infinity() False
- is_negative_infinity()#
Return
True
if this ball is the point -∞.EXAMPLES:
sage: RBF(-infinity).is_negative_infinity() True
- is_nonzero()#
Return
True
iff zero is not contained in the interval represented by this ball.Note
This method is not the negation of
is_zero()
: it only returnsTrue
if zero is known not to be contained in the ball.Use
bool(b)
(or, equivalently,not b.is_zero()
) to check if a ballb
may represent a nonzero number (for instance, to determine the “degree” of a polynomial with ball coefficients).EXAMPLES:
sage: RBF = RealBallField() sage: RBF(pi).is_nonzero() True sage: RBF(RIF(-0.5, 0.5)).is_nonzero() False
See also
- is_positive_infinity()#
Return
True
if this ball is the point +∞.EXAMPLES:
sage: RBF(infinity).is_positive_infinity() True
- is_zero()#
Return
True
iff the midpoint and radius of this ball are both zero.EXAMPLES:
sage: RBF = RealBallField() sage: RBF(0).is_zero() True sage: RBF(RIF(-0.5, 0.5)).is_zero() False
See also
- lambert_w()#
Return the image of this ball by the Lambert W function.
EXAMPLES:
sage: RBF(1).lambert_w() [0.5671432904097...]
- li()#
Logarithmic integral
EXAMPLES:
sage: RBF(3).li() # abs tol 1e-15 [2.16358859466719 +/- 4.72e-15]
- log(base=None)#
Return the logarithm of this ball.
INPUT:
base
(optional, positive real ball or number) – ifNone
, return the natural logarithmln(self)
, otherwise, return the general logarithmln(self)/ln(base)
EXAMPLES:
sage: RBF(3).log() [1.098612288668110 +/- ...e-16] sage: RBF(3).log(2) [1.58496250072116 +/- ...e-15] sage: log(RBF(5), 2) [2.32192809488736 +/- ...e-15] sage: RBF(-1/3).log() nan sage: RBF(3).log(-1) nan sage: RBF(2).log(0) nan
- log1p()#
Return
log(1 + self)
, computed accurately whenself
is close to zero.EXAMPLES:
sage: eps = RBF(1e-30) sage: (1 + eps).log() [+/- ...e-16] sage: eps.log1p() [1.00000000000000e-30 +/- ...e-46]
- log_gamma()#
Return the image of this ball by the logarithmic Gamma function.
The complex branch structure is assumed, so if
self
<= 0, the result is an indeterminate interval.EXAMPLES:
sage: RBF(1/2).log_gamma() [0.572364942924700 +/- ...e-16]
- log_integral()#
Logarithmic integral
EXAMPLES:
sage: RBF(3).li() # abs tol 1e-15 [2.16358859466719 +/- 4.72e-15]
- log_integral_offset()#
Offset logarithmic integral
EXAMPLES:
sage: RBF(3).Li() # abs tol 1e-15 [1.11842481454970 +/- 7.61e-15]
- lower(rnd=None)#
Return the right endpoint of this ball, rounded downwards.
INPUT:
rnd
(string) – rounding mode for the parent of the result (does not affect its value!), seesage.rings.real_mpfi.RealIntervalFieldElement.lower()
OUTPUT:
A real number.
EXAMPLES:
sage: RBF(-1/3).lower() -0.333333333333334 sage: RBF(-1/3).lower().parent() Real Field with 53 bits of precision and rounding RNDD
See also
- max(*others)#
Return a ball containing the maximum of this ball and the remaining arguments.
EXAMPLES:
sage: RBF(-1, rad=.5).max(0) 0 sage: RBF(0, rad=2.).max(RBF(0, rad=1.)).endpoints() (-1.00000000465662, 2.00000000651926) sage: RBF(-infinity).max(-3, 1/3) [0.3333333333333333 +/- ...e-17] sage: RBF('nan').max(0) nan
See also
- mid()#
Return the center of this ball.
EXAMPLES:
sage: RealBallField(16)(1/3).mid() 0.3333 sage: RealBallField(16)(1/3).mid().parent() Real Field with 16 bits of precision sage: RealBallField(16)(RBF(1/3)).mid().parent() Real Field with 53 bits of precision sage: RBF('inf').mid() +infinity
sage: b = RBF(2)^(2^1000) sage: b.mid() # arb216 Traceback (most recent call last): ... RuntimeError: unable to convert to MPFR (exponent out of range?) sage: b.mid() # arb218 +infinity
- min(*others)#
Return a ball containing the minimum of this ball and the remaining arguments.
EXAMPLES:
sage: RBF(1, rad=.5).min(0) 0 sage: RBF(0, rad=2.).min(RBF(0, rad=1.)).endpoints() (-2.00000000651926, 1.00000000465662) sage: RBF(infinity).min(3, 1/3) [0.3333333333333333 +/- ...e-17] sage: RBF('nan').min(0) nan
See also
- nbits()#
Return the minimum precision sufficient to represent this ball exactly.
In other words, return the number of bits needed to represent the absolute value of the mantissa of the midpoint of this ball. The result is 0 if the midpoint is a special value.
EXAMPLES:
sage: RBF(1/3).nbits() 53 sage: RBF(1023, .1).nbits() 10 sage: RBF(1024, .1).nbits() 1 sage: RBF(0).nbits() 0 sage: RBF(infinity).nbits() 0
- overlaps(other)#
Return
True
iffself
andother
have some point in common.If either
self
orother
contains NaN, this method always returns nonzero (as a NaN could be anything, it could in particular contain any number that is included in the other operand).EXAMPLES:
sage: RBF(pi).overlaps(RBF(pi) + 2**(-100)) True sage: RBF(pi).overlaps(RBF(3)) False
- polylog(s)#
Return the polylogarithm \(\operatorname{Li}_s(\mathrm{self})\).
EXAMPLES:
sage: polylog(0, -1) -1/2 sage: RBF(-1).polylog(0) [-0.50000000000000 +/- ...e-16] sage: polylog(1, 1/2) -log(1/2) sage: RBF(1/2).polylog(1) [0.69314718055995 +/- ...e-15] sage: RBF(1/3).polylog(1/2) [0.44210883528067 +/- 6.7...e-15] sage: RBF(1/3).polylog(RLF(pi)) [0.34728895057225 +/- ...e-15]
- psi()#
Compute the digamma function with argument self.
EXAMPLES:
sage: RBF(1).psi() # abs tol 1e-15 [-0.5772156649015329 +/- 4.84e-17]
- rad()#
Return the radius of this ball.
EXAMPLES:
sage: RBF(1/3).rad() 5.5511151e-17 sage: RBF(1/3).rad().parent() Real Field with 30 bits of precision
See also
- rad_as_ball()#
Return an exact ball with center equal to the radius of this ball.
EXAMPLES:
sage: rad = RBF(1/3).rad_as_ball() sage: rad [5.55111512e-17 +/- ...e-26] sage: rad.is_exact() True sage: rad.parent() Real ball field with 30 bits of precision
- real()#
Return the real part of this ball.
EXAMPLES:
sage: RBF(1/3).real() [0.3333333333333333 +/- 7.04e-17]
- rgamma()#
Return the image of this ball by the function 1/Γ, avoiding division by zero at the poles of the gamma function.
EXAMPLES:
sage: RBF(-1).rgamma() 0 sage: RBF(3).rgamma() 0.5000000000000000
- rising_factorial(n)#
Return the
n
-th rising factorial of this ball.The \(n\)-th rising factorial of \(x\) is equal to \(x (x+1) \cdots (x+n-1)\).
For real \(n\), it is a quotient of gamma functions.
EXAMPLES:
sage: RBF(1).rising_factorial(5)<PHONE_NUMBER>000000 sage: RBF(1/2).rising_factorial(1/3) # abs tol 1e-14 [0.636849884317974 +/- 8.98e-16]
- round()#
Return a copy of this ball with center rounded to the precision of the parent.
EXAMPLES:
It is possible to create balls whose midpoint is more precise than their parent’s nominal precision (see
real_arb
for more information):sage: b = RBF(pi.n(100)) sage: b.mid() 3.141592653589793238462643383
The
round()
method rounds such a ball to its parent’s precision:sage: b.round().mid() 3.14159265358979
See also
- rsqrt()#
Return the reciprocal square root of
self
.At high precision, this is faster than computing a square root.
EXAMPLES:
sage: RBF(2).rsqrt() [0.707106781186547 +/- ...e-16] sage: RBF(0).rsqrt() nan
- sec()#
Return the secant of this ball.
EXAMPLES:
sage: RBF(1).sec() [1.850815717680925 +/- ...e-16]
- sech()#
Return the hyperbolic secant of this ball.
EXAMPLES:
sage: RBF(1).sech() [0.648054273663885 +/- ...e-16]
- sin_integral()#
Sine integral
EXAMPLES:
sage: RBF(1).Si() # abs tol 1e-15 [0.946083070367183 +/- 9.22e-16]
- sinh()#
Return the hyperbolic sine of this ball.
EXAMPLES:
sage: RBF(1).sinh() [1.175201193643801 +/- ...e-16]
- sinh_integral()#
Hyperbolic sine integral
EXAMPLES:
sage: RBF(1).Shi() [1.05725087537573 +/- 2.77e-15]
- sqrt()#
Return the square root of this ball.
EXAMPLES:
sage: RBF(2).sqrt() [1.414213562373095 +/- ...e-16] sage: RBF(-1/3).sqrt() nan
- sqrt1pm1()#
Return \(\sqrt{1+\mathrm{self}}-1\), computed accurately when
self
is close to zero.EXAMPLES:
sage: eps = RBF(10^(-20)) sage: (1 + eps).sqrt() - 1 [+/- ...e-16] sage: eps.sqrt1pm1() [5.00000000000000e-21 +/- ...e-36]
- sqrtpos()#
Return the square root of this ball, assuming that it represents a nonnegative number.
Any negative numbers in the input interval are discarded.
EXAMPLES:
sage: RBF(2).sqrtpos() [1.414213562373095 +/- ...e-16] sage: RBF(-1/3).sqrtpos() 0 sage: RBF(0, rad=2.r).sqrtpos() [+/- 1.42]
- squash()#
Return an exact ball with the same center as this ball.
EXAMPLES:
sage: mid = RealBallField(16)(1/3).squash() sage: mid [0.3333 +/- ...e-5] sage: mid.is_exact() True sage: mid.parent() Real ball field with 16 bits of precision
See also
- tan()#
Return the tangent of this ball.
EXAMPLES:
sage: RBF(1).tan() [1.557407724654902 +/- ...e-16] sage: RBF(pi/2).tan() nan
- tanh()#
Return the hyperbolic tangent of this ball.
EXAMPLES:
sage: RBF(1).tanh() [0.761594155955765 +/- ...e-16]
- trim()#
Return a trimmed copy of this ball.
Round
self
to a number of bits equal to theaccuracy()
ofself
(as indicated by its radius), plus a few guard bits. The resulting ball is guaranteed to containself
, but is more economical ifself
has less than full accuracy.EXAMPLES:
sage: b = RBF(0.11111111111111, rad=.001) sage: b.mid() 0.111111111111110 sage: b.trim().mid() 0.111111104488373
See also
- union(other)#
Return a ball containing the convex hull of
self
andother
.EXAMPLES:
sage: RBF(0).union(1).endpoints() (-9.31322574615479e-10, 1.00000000093133)
- upper(rnd=None)#
Return the right endpoint of this ball, rounded upwards.
INPUT:
rnd
(string) – rounding mode for the parent of the result (does not affect its value!), seesage.rings.real_mpfi.RealIntervalFieldElement.upper()
OUTPUT:
A real number.
EXAMPLES:
sage: RBF(-1/3).upper() -0.333333333333333 sage: RBF(-1/3).upper().parent() Real Field with 53 bits of precision and rounding RNDU
See also
- zeta(a=None)#
Return the image of this ball by the Hurwitz zeta function.
For
a = 1
(ora = None
), this computes the Riemann zeta function.Otherwise, it computes the Hurwitz zeta function.
Use
RealBallField.zeta()
to compute the Riemann zeta function of a small integer without first converting it to a real ball.EXAMPLES:
sage: RBF(-1).zeta() [-0.0833333333333333 +/- ...e-17] sage: RBF(-1).zeta(1) [-0.0833333333333333 +/- ...e-17] sage: RBF(-1).zeta(2) [-1.083333333333333 +/- ...e-16]
- zetaderiv(k)#
Return the image of this ball by the k-th derivative of the Riemann zeta function.
For a more flexible interface, see the low-level method
_zeta_series
of polynomials with complex ball coefficients.EXAMPLES:
sage: RBF(1/2).zetaderiv(1) [-3.92264613920915...] sage: RBF(2).zetaderiv(3) [-6.0001458028430...]
- class sage.rings.real_arb.RealBallField(precision=53)#
Bases:
UniqueRepresentation
,RealBallField
An approximation of the field of real numbers using mid-rad intervals, also known as balls.
INPUT:
precision
– an integer \(\ge 2\).
EXAMPLES:
sage: RBF = RealBallField() # indirect doctest sage: RBF(1) 1.000000000000000
sage: (1/2*RBF(1)) + AA(sqrt(2)) - 1 + polygen(QQ, 'x') # optional - sage.symbolic x + [0.914213562373095 +/- ...e-16]
- algebraic_closure()#
Return the complex ball field with the same precision.
EXAMPLES:
sage: from sage.rings.complex_arb import ComplexBallField sage: RBF.complex_field() Complex ball field with 53 bits of precision sage: RealBallField(3).algebraic_closure() Complex ball field with 3 bits of precision
- bell_number(n)#
Return a ball enclosing the
n
-th Bell number.EXAMPLES:
sage: [RBF.bell_number(n) for n in range(7)] [1.000000000000000, 1.000000000000000, 2.000000000000000, 5.000000000000000, 15.00000000000000, 52.00000000000000,<PHONE_NUMBER>000000] sage: RBF.bell_number(-1) Traceback (most recent call last): ... ValueError: expected a nonnegative index sage: RBF.bell_number(10**20) [5.38270113176282e+1794956117137290721328 +/- ...e+1794956117137290721313]
- bernoulli(n)#
Return a ball enclosing the
n
-th Bernoulli number.EXAMPLES:
sage: [RBF.bernoulli(n) for n in range(4)] [1.000000000000000, -0.5000000000000000, [0.1666666666666667 +/- ...e-17], 0] sage: RBF.bernoulli(2**20) [-1.823002872104961e+5020717 +/- ...e+5020701] sage: RBF.bernoulli(2**1000) Traceback (most recent call last): ... ValueError: argument too large
- catalan_constant()#
Return a ball enclosing the Catalan constant.
EXAMPLES:
sage: RBF.catalan_constant() [0.915965594177219 +/- ...e-16] sage: RealBallField(128).catalan_constant() [0.91596559417721901505460351493238411077 +/- ...e-39]
- characteristic()#
Real ball fields have characteristic zero.
EXAMPLES:
sage: RealBallField().characteristic() 0
- complex_field()#
Return the complex ball field with the same precision.
EXAMPLES:
sage: from sage.rings.complex_arb import ComplexBallField sage: RBF.complex_field() Complex ball field with 53 bits of precision sage: RealBallField(3).algebraic_closure() Complex ball field with 3 bits of precision
- construction()#
Return the construction of a real ball field as a completion of the rationals.
EXAMPLES:
sage: RBF = RealBallField(42) sage: functor, base = RBF.construction() sage: functor, base (Completion[+Infinity, prec=42], Rational Field) sage: functor(base) is RBF True
- cospi(x)#
Return a ball enclosing \(\cos(\pi x)\).
This works even if
x
itself is not a ball, and may be faster or more accurate wherex
is a rational number.EXAMPLES:
sage: RBF.cospi(1) -1.000000000000000 sage: RBF.cospi(1/3) 0.5000000000000000
See also
- double_factorial(n)#
Return a ball enclosing the
n
-th double factorial.EXAMPLES:
sage: [RBF.double_factorial(n) for n in range(7)] [1.000000000000000, 1.000000000000000, 2.000000000000000, 3.000000000000000, 8.000000000000000, 15.00000000000000, 48.00000000000000] sage: RBF.double_factorial(2**20) [1.4483729903e+2928836 +/- ...e+2928825] sage: RBF.double_factorial(2**1000) Traceback (most recent call last): ... ValueError: argument too large sage: RBF.double_factorial(-1) Traceback (most recent call last): ... ValueError: expected a nonnegative index
- euler_constant()#
Return a ball enclosing the Euler constant.
EXAMPLES:
sage: RBF.euler_constant() # abs tol 1e-15 [0.5772156649015329 +/- 9.00e-17] sage: RealBallField(128).euler_constant() [0.57721566490153286060651209008240243104 +/- ...e-39]
- fibonacci(n)#
Return a ball enclosing the
n
-th Fibonacci number.EXAMPLES:
sage: [RBF.fibonacci(n) for n in range(7)] [0, 1.000000000000000, 1.000000000000000, 2.000000000000000, 3.000000000000000, 5.000000000000000, 8.000000000000000] sage: RBF.fibonacci(-2) -1.000000000000000 sage: RBF.fibonacci(10**20) [3.78202087472056e+20898764024997873376 +/- ...e+20898764024997873361]
- gamma(x)#
Return a ball enclosing the gamma function of
x
.This works even if
x
itself is not a ball, and may be more efficient in the case wherex
is an integer or a rational number.EXAMPLES:
sage: RBF.gamma(5) 24.00000000000000 sage: RBF.gamma(10**20) [+/- ...e+1956570552410610660600] sage: RBF.gamma(1/3) [2.678938534707747 +/- ...e-16] sage: RBF.gamma(-5) nan
See also
- gens()#
EXAMPLES:
sage: RBF.gens() (1.000000000000000,) sage: RBF.gens_dict() {'1.000000000000000': 1.000000000000000}
- is_exact()#
Real ball fields are not exact.
EXAMPLES:
sage: RealBallField().is_exact() False
- log2()#
Return a ball enclosing \(\log(2)\).
EXAMPLES:
sage: RBF.log2() [0.6931471805599453 +/- ...e-17] sage: RealBallField(128).log2() [0.69314718055994530941723212145817656807 +/- ...e-39]
- maximal_accuracy()#
Return the relative accuracy of exact elements measured in bits.
OUTPUT:
An integer.
EXAMPLES:
sage: RBF.maximal_accuracy()<PHONE_NUMBER>854775807 # 64-bit<PHONE_NUMBER> # 32-bit
See also
- pi()#
Return a ball enclosing \(\pi\).
EXAMPLES:
sage: RBF.pi() [3.141592653589793 +/- ...e-16] sage: RealBallField(128).pi() [3.1415926535897932384626433832795028842 +/- ...e-38]
- prec()#
Return the bit precision used for operations on elements of this field.
EXAMPLES:
sage: RealBallField().precision() 53
- precision()#
Return the bit precision used for operations on elements of this field.
EXAMPLES:
sage: RealBallField().precision() 53
- sinpi(x)#
Return a ball enclosing \(\sin(\pi x)\).
This works even if
x
itself is not a ball, and may be faster or more accurate wherex
is a rational number.EXAMPLES:
sage: RBF.sinpi(1) 0 sage: RBF.sinpi(1/3) [0.866025403784439 +/- ...e-16] sage: RBF.sinpi(1 + 2^(-100)) [-2.478279624546525e-30 +/- ...e-46]
See also
- some_elements()#
Real ball fields contain exact balls, inexact balls, infinities, and more.
EXAMPLES:
sage: RBF.some_elements() [0, 1.000000000000000, [0.3333333333333333 +/- ...e-17], [-4.733045976388941e+363922934236666733021124 +/- ...e+363922934236666733021108], [+/- inf], [+/- inf], [+/- inf], nan]
- zeta(s)#
Return a ball enclosing the Riemann zeta function of
s
.This works even if
s
itself is not a ball, and may be more efficient in the case wheres
is an integer.EXAMPLES:
sage: RBF.zeta(3) [1.202056903159594 +/- ...e-16] sage: RBF.zeta(1) nan sage: RBF.zeta(1/2) [-1.460354508809587 +/- ...e-16]
See also
- sage.rings.real_arb.create_RealBall(parent, serialized)#
Create a RealBall from a serialized representation.


The Tale of Tommy Fox
by Arthur Scott Bailey
Chapter 8: “Something Makes Tommy Very Proud”
Additional Information
- Year Published: 1917
- Language: English
- Country of Origin: United States of America
- Source: Bailey, A. S. (1917). The Tale of Tommy Fox. New York: Grosset and Dunlap.
-
Readability:
- Flesch–Kincaid Level: 4.0
- Word Count: 701
- Genre: Fantasy
- Keywords: 20th century literature, american literature, children's stories, sleepy-time tales
- ✎ Cite This
Downloads
Tommy Fox could think of nothing but Mr. Woodchuck. He thought there could be no use in going back to the hole beneath the big oak in the pasture until the next day, because Mr. Woodchuck would probably be afraid that Tommy was waiting for him to come out. Yes—Tommy decided that Mr. Woodchuck would stay in his house down among the roots of the big tree and not show himself again until he felt quite sure that his enemy had grown tired of watching and had given up the idea of catching him.
But Tommy guessed that by another day old Mr. Woodchuck would be so hungry that he would have to go out of doors again to get something to eat. And Tommy Fox could hardly wait for the night to pass. But another day came at last; and it found Tommy up and hurrying to Farmer Green’s back-pasture, where Mr. Woodchuck lived. It was just growing light; and there was a heavy dew upon the grass, which Tommy didn’t like at all, because he just hated to get his feet wet.
Tommy did not go near Mr. Woodchuck’s hole. Although he was just a young fox, he was too wise to do that. He knew that if he went nosing around Mr. Woodchuck’s dooryard the old gentleman would smell his tracks as soon as he poked his head out. So Tommy was careful to keep away from the hole where he had dug so hard the day before. He sneaked around until he had passed Mr. Woodchuck’s house; and then he crept up behind the big oak close by. And there he waited.
Tommy kept smiling. He was so pleased, because his plan was working out very well. The wind blew towards him, and Tommy saw that Mr. Woodchuck wouldn’t be able to smell him when the old fellow came up into the open air.
For a long time Tommy waited there. He kept very still. And he stayed hidden behind the tree, with only one eye peeping round the tree-trunk, so that he could watch for Mr. Woodchuck. He was very patient—was Tommy. You have to be patient, you know, when you are hunting. He crouched behind the tree for at least an hour, and never once took his eye off that hole. And at last he saw Mr. Woodchuck’s nose come popping out.
If Tommy hadn’t been watching very closely he wouldn’t have seen it at all; for Mr. Woodchuck just stuck his head up for a second, took one quick look all around, and jumped back again. He hadn’t seen anything to frighten him. But he thought it best to be very careful.
Tommy waited. And pretty soon that small nose came sticking out again. This time it stayed longer. And to Tommy’s great delight, in another minute he saw Mr. Woodchuck climb up and take a good look all about.
Tommy Fox hardly breathed. He didn’t see how the old gentleman could help spying him. But he didn’t. And then Mr. Woodchuck started off across the pasture, to find something for breakfast. He was very hungry, for he hadn’t had any supper the night before.
Tommy Fox waited until Mr. Woodchuck had gone just a few steps away from his doorway. And then Tommy stole after him. This time Tommy was between Mr. Woodchuck and his house. And Mr. Woodchuck couldn’t escape.
It was all over in a second. And Tommy Fox felt very proud of himself when he reached home and showed his mother what he had brought.
“I can hunt—can’t I, Mother?” he said. “Tomorrow I’m going up on the mountain and catch a bear.”
“Don’t be silly,” Mrs. Fox said. “You know you couldn’t catch a bear.” But she was much pleased, in spite of what she said. For she saw that Tommy was really beginning to learn something.


$template{name="sample-readme-html-header" title="Embedded Grid demo"}$
The demo produces an output put that looks like this, where messages from the demo itself are prefixed with `>>>`:
>>> starting 2 drivers >>> starting driver 1 driver process id: 8104, uuid: d1 ClientClassServer initialized NodeClassServer initialized ClientJobServer initialized NodeJobServer initialized management initialized and listening on port 11111 Acceptor initialized JPPF Driver initialization complete >>> starting driver 2 driver process id: 8104, uuid: d2 ClientClassServer initialized NodeClassServer initialized ClientJobServer initialized NodeJobServer initialized management initialized and listening on port 11112 JPPF Driver initialization complete >>> starting 2 nodes >>> starting the JPPF node 1 >>> starting the JPPF node 2 >>> starting the JPPF client Attempting connection to remote peer peer-d1-1@localhost:11111 Reconnected to remote peer peer-d1-1@localhost:11111 client process id: 8104, uuid: C81D5441-D7E3-4DB8-A397-C26C87B68907 node process id: 8104, uuid: 6137686B-A94E-44FB-A571-96D0B12AE08D node process id: 8104, uuid: 1EA8343C-B7EC-4630-9B9D-004C90F6CAEF Attempting connection to the class server at localhost:11112 RemoteClassLoaderConnection: Reconnected to the class server Attempting connection to the class server at localhost:11111 RemoteClassLoaderConnection: Reconnected to the class server [client: driver-1-1 - ClassServer] Attempting connection to the class server at localhost:11111 [client: driver-2-1 - ClassServer] Attempting connection to the class server at localhost:11112 [client: driver-1-1 - ClassServer] Reconnected to the class server [client: driver-2-1 - ClassServer] Reconnected to the class server [client: driver-1-1 - TasksServer] Attempting connection to the task server at localhost:11111 [client: driver-2-1 - TasksServer] Attempting connection to the task server at localhost:11112 JPPF Node management initialized on port 11198 JPPF Node management initialized on port 11199 [client: driver-1-1 - TasksServer] Reconnected to the JPPF task server Attempting connection to the node server at localhost:11112 Reconnected to the node server Attempting connection to the node server at localhost:11111 Reconnected to the node server node successfully initialized node successfully initialized [client: driver-2-1 - TasksServer] Reconnected to the JPPF task server Attempting connection to remote peer peer-d2-1@localhost:11112 Reconnected to remote peer peer-d2-1@localhost:11112 >>> There are now 2 drivers and 2 nodes active in the embedded grid >>> client connected, now submitting a job with 20 tasks >>> task-10 says Hello! from Node-1 <<< >>> task-4 says Hello! from Node-2 <<< ..... >>> task-6 says Hello! from Node-2 <<< >>> execution result for job 'embedded grid': 20 successful tasks, 0 in error >>> shutting down node 1 >>> shutting down node 2 >>> shutting down driver 1 >>> shutting down driver 2 >>> done, exiting program
There are 2 privileged places you can go to:
$template{name="sample-readme-html-footer"}$


|
Mary Careyaka Mary Cook"I started out as thinking, 'This would be funny, why don't I run?' But then I discovered I really wanted to do it.  It's good to show women that they can do these things, that running for governor isn't just for high-class, older men." Porn actress Mary Carey has been quite successful in distinguishing herself from all the high-class, older men you normally see running for office. But that doesn't mean she has no competition for low-class votes. Carey is competing with other such luminaries as Gary Coleman, Larry Flynt, Gallagher, Arnold Schwarzenegger, as well as 100+ no-name schmoes. It can reasonably be assumed that her political campaign was conceived as a publicity stunt to increase her name recognition and move merchandise. This is not the same as someone with political ambitions capitalizing on her fame as an adult video performer, like Cicciolina in her successful run for a seat in Italy's parliament. Cicciolina was famous before she ran for office. Mary Carey, in contrast, has become famous primarily as a result of her political campaign. But with media attention comes scrutiny, and no one is immune from charges of hypocrisy. Not even joke candidates with big hooters. After all, the woman's name is genuinely on the ballot in California. On Mary Carey's website, she lists an eight-point plan for rescuing California. The centerpiece of her campaign platform (point number two) says:
Tax breast implants. From Beverly Hills alone, we should bring in millions in tax revenue. (Note: I am all-natural and I personally discourage the use of implants!) She justified the proposal to Entertainment Tonight as being a progressive tax. "People don't necessarily need breast implants or plastic surgery. It's more like a luxury tax. So by doing this, we would be taking money from people who have extra money lying around instead of people who need that." (No word as yet whether this tax would apply to mastectomy patients.)
the problemFor any other candidate for the office of governor of California, 116 minutes of graphic video depicting them in acts of sexual congress would pose a serious problem. Not so for Mary Carey, since she is, after all, a porn actress. Nevertheless, one of her films has gotten her into trouble.When Mary Carey Rules! was released in July 2003, it was a milestone of sorts for the libertine. Up until then, her adult film scenes were of strictly lesbian sex. Now fans could watch documentary footage of her making contact with actual penises. In a tone not unlike that of a carnival barker, the sunburst on the front of the box breathlessly announces: "You've seen her on Howard Stern.  And just in case that pitch sounds too good to be true, the back of the package features a slew of vidcaps depicting Carey con carne, as well as this testimonial from the novice schlong-wrangler herself:
Hey guys, welcome to my world! In case you forgot, I'm the 5-foot-9 blonde with natural double-D tits that everybody LOVES!  Well, your wish has been granted!    And remember -- I love you! All well and good. Except that the film's packaging revived a credibility issue for the adult film actress, which has become especially problematic now that she is a California gubernatorial candidate. The problem is contained in the second sentence, where Mary claims to possess "natural double-D tits." You see, Mary had already admitted to Tod Hunter from AVN Insider in 2001 that her breasts were fake:
Boob Job: "Do I have to answer honestly? Yes." She had also said the same thing on the Howard Stern show, and reportedly to several of her costars. This caused a minor scandal in the adult video world, where Mary now sells herself as implant-free. In fact, the Mary Carey Rules! packaging contains a "Guarantee" promising "All-Natural Girls." It was enough of a problem that Carey's manager arranged for a panel of adult industry folk to touch and squeeze Mary's breasts to determine firsthand (as it were) whether they contain any foreign objects.
Kick Ass Pictures owner Mark Kulkis, has issued an open letter, via email, to the media in which he insists that Carey's breast are real. Along with the email, he included photos that Kulkis suggests prove that her breasts are natural, because they "show a little natural sag." Which is exactly what they did. Mary had her melons squozen by a panel of jurists from the adult video industry. Their consensus: the boobs were all meat, no filler. But you could hardly call the process authoritative. Let's face it: breast implants can be difficult to detect, especially underneath skin and tissue, as long as they are underinflated. The most obvious tit jobs are always the ones where the implants and/or surrounding tissues have been stretched tight. And the scars can be hidden inside the navel nowadays -- no more smiley-face crescents under each nipple. Anyway, what's suspicious here is the chosen methodology. If the starlet really wanted to establish beyond a shadow of a doubt whether there was anything man-made inside those breasts, all she's have to do is submit to a mammogram or a breast MRI. But no. They intentionally went with the most subjective, error-prone scheme. As a result, Carey's trustworthiness remains in doubt. And until she submits to a definitive examination, her integrity will continue to be a question mark in any future political campaigns. And she swears there will be a next time:
"I may not win this election, but even if I don't, I believe some of my views would be very helpful. They're good ideas. I want to get them out there. And even if I don't win this time around, I'll be better prepared for the next election. If I don't win this one, I'll try again next time. Come next election, I'll be prepared."
timeline
|


2018 - Surviving in a Hostile Environment and its Aftermath
Keynote: The Bulletproof Mind, Preparing for the Aftermath
Lt. Col. Dave Grossman: U.S. Army, retired, internationally recognized scholar, author, soldier, and speaker who is one of the world’s foremost experts on human aggression and the roots of violent crime (“former West Point psychology professor, professor of military science, and Army Ranger who has combined his experiences to train those who must defend others to act valiantly and wisely when violence is inevitable” www.grossmanacademy.com) –Warrior’s Path to Tactical and Emotional Survival/Using Scientific Principles to Safely Arrest and Control
Richard Morris retired as the Gang Intelligence Sergeant in 2014 after nearly 36 years with the Fort Worth Police Department; Richard is also a 10th Degree Black Belt in American Karate and Tae Kwon Do, and the founder of Shizen-Na Karate; International Speaker, Trainer, Zig Ziglar Certified Coach, Published Author and has been teaching Karate since 1971.
Dealing with a terrorist attack and its aftermath/PTSD
Lt. Col. Dave Grossman
Civil Rights Liability arising out of Fatal Incidents
Mark S. Jones, Attorney, former Chief Deputy Prosecutor, Head of the Homicide Unit, Major Crime Division, Head of the Criminal Division, former County Counselor, Chief Legal Advisor to Prosecuting Attorney, County Sheriff, Department of Corrections, Jackson County, Missouri; Assistant College Professor
Day Two
Gunfight Lessons from an ISIS Inspired Terrorist Attack
Greg Stevens, Police Officer, Garland Texas Police Department; 2016 Recipient of the Presidential Medal of Valor
Surviving an ISIS Threat – Counterterrorism Today
Jim Frawley, Colonel-Inspector General, United States Marine Corps retired, Commercial Aircraft pilot, Corporal city Police Officer, ISIS Survivor
Ending a Terror Rampage
Doug Schroeder, Hesston Police Chief, Hesston, Kansas; 2017 Recipient of the Presidential Medal of Valor; Awarded Wichita Crime Commission LEO Hero of the Year Award; Kansas Officer of the Year Kansas Rifle Association; Kansas Officer of the Year American Legion; National Law Enforcement Officer of the Year by the Forty and Eight Veterans Organization; Criminal Justice Instructor
Drug Cartel Threat/Transnational Gangs
Richard Valdemar, internationally known expert in traditional and non-traditional gangs, author, Los Angeles County Sheriff Office Detective retired; Vietnam veteran


This is my popup!
Grammar Tool
English (GB)
English (GB)
English (US)
Loading...
Editor
Markup
Error List
Links
Dictionary
Testing
<
Page X of Y
>
editorTab
Text markup.
Results will be displayed here.
www.languagetool.org
www.danielnaber.de
LT on GitHub
LT Community (Text Analysis, Rule Editor, WikiCheck)
Example POS Tags
LT User Forum
Developing robust rules
Test Rule
Rule Competence
False Positives
Processing Time
Word Context


This form is rendered entirely on the client-side by Reformer and all form behavior is managed by Reformer.
I'm using twitter bootstrap to add some basic styles, but the only required HTML are the name/type/value attributes of the input variables.
A form field thing here
Some intro text


--- layout: ion_page title: Invitation to RCSEd/CSHK Conjoint Scientific Congress 2017 permalink: /scientificcongress17/ thumb-img: feature-img: /scientific-congress-2017/Poster.jpg categories: news excerpt: You are cordially invited to join the annual event of the College of Surgeons of Hong Kong - the RCSEd/CSHK Conjoint Scientific Congress 2017 (23-24/9/17) ---
You are cordially invited to join the annual event of the College of Surgeons of Hong Kong - the RCSEd/CSHK Conjoint Scientific Congress 2017. This Congress will broaden your horizon on the latest surgical knowledge and technology and provide you with an excellent opportunity to meet with surgical leaders.
This year, the theme of the Conjoint Scientific Congress is “Controversies in Surgery”. Distinguished speakers from various specialties would be invited to share with us their expertise and hundreds of delegates from local, mainland and overseas would be attracted to the Congress. Various surgical colleges and disciplines as well as prominent international figures will also gather to provide a multi-disciplinary Congress.
If you are interested, please send an email to<EMAIL_ADDRESS>with the following information:
1. Full name
2. University
3. Contact no.
4. Email address


Please pick a background:
Dark
Light
Surprise
A Dog's Life
Table of Contents
Top
Favorite Activities
A blog about 2 dogs; Luna and Bigfoot
Favorite Activities:
Eat
Sleep
Watching others eat
Barking at the doorbell
Favorite Toys:
Kong Chew Toy
Nyla Bone
Tennis Ball
Top of page


Marketing Week Explores: The trouble with Pornhub and the value of NPS
In the latest edition of the Marketing Week Explores podcast, we discuss the brand reputational woes for Unilever following Dollar Shave Club’s appearance on pornography site Pornhub and debate the true value of NPS.
By Marketing Week Reporters 25 Nov 2019 3:14 pm
In this edition of Marketing Week Explores, acting features editor Charlotte Rogers and senior reporter Ellen Hammett discuss the reputational damage for Unilever after its brand Dollar Shave Club was found to be advertising on pornography site Pornhub.
Admitting the direct-to-consumer brand, which Unilever bought in 2016 for $1bn, had previously enjoyed “operational independence”, Unilever has now vowed to stop its brands running adverts on porn sites.
Plus, is NPS a true measure of customer sentiment? Rogers discusses the pros and cons of using Net Promoter Score as a gauge of customer satisfaction and asks its founder Fred Reichheld why using NPS as a bonus metric is “asking for trouble”.
Join Charlotte, Ellen and host Molly Fleming for this and more on the latest edition of Marketing Week Explores.


Compactness in the Courts: Pennsylvania's 7th congressional district adopted in 2011 (shown below) has been widely cited as an example of a district that is far from compact as a result of gerrymandering. In 2018, the state's Supreme Court ruled this (and the rest of the district plan) to be an unconstitutional gerrymander, and required the state to create a new map. [1.12.5]


Dimitri Diomaiuta
BSc in Computer Science
Advisor: Victor van der Veen
13th July, 2017
Some features have not been ported due to bugs or unexpected behavior
| Feature | File | Status | Description |
|---|---|---|---|
| Compute string representation of Java object | Profile.cpp | NP | Originally implemented by objectToString(). It calls the toString() method of a Java object to retrieve the value of a parameter or returning value. |
| Filter calls executing bytecode from a system jar | Profile.cpp | NP | Originally implemented by dvmMethodTraceAdd(). It avoids to profile calls that are assured not to contain malicious code |
1499899388411990: public int com.android.org.bouncycastle.crypto.digests.OpenSSLDigest.doFinal((byte[]) "Object", (int) "-1780431280")
1499899388412099: private long com.android.org.bouncycastle.crypto.digests.OpenSSLDigest.getCtx()
1499899388412175: return (long) "3076265672"
1499899388412257: native public static int com.android.org.conscrypt.NativeCrypto.EVP_DigestFinal((long) "-5234283616350996176", (byte[]) "Object", (int) "-1780431280")
1499899388412443: return (int) "0"
1499899388412518: public void com.android.org.bouncycastle.crypto.digests.OpenSSLDigest.reset()
1499899388412593: private void com.android.org.bouncycastle.crypto.digests.OpenSSLDigest.free()
1499899388412667: return (void)
1499899388412733: return (void)
1499899388412798: return (int) "20"


DIStoryboard
public final class DIStoryboard : _DIStoryboardBase
The class provides the features to inject dependencies of view/window controllers in a storyboard. Needs to specify a container to inject dependencies in view/window controllers.
-
Creates new instance of
DIStoryboard
. When initializing itself, it finds a container and other information about the storyboard.Declaration
Swift
@objc public class func create(name: String, bundle: Bundle?) -> DIStoryboard
Parameters
name
The name of the storyboard resource file without the filename extension.
bundle
The bundle containing the storyboard file and its resources.
Return Value
The new instane of
DIStoryboard
. -
Creates new instance of
DIStoryboard
, with the specified container.Declaration
Swift
public class func create(name: String, bundle: Bundle?, container: DIContainer) -> DIStoryboard
Parameters
name
The name of the storyboard resource file without the filename extension.
container
The container with registrations of the view/window controllers in the storyboard ant their dependencies.
Return Value
The new instane of
DIStoryboard
. -
Creates new instance of
DIStoryboard
, with the specified container.Declaration
Swift
public class func create(name: String, bundle: Bundle?, framework: DIFramework.Type?, container: DIContainer) -> DIStoryboard
Parameters
name
The name of the storyboard resource file without the filename extension.
bundle
The bundle containing the storyboard file and its resources. Specify nil to use the main bundle.
framework
The framework containing the storyboard registration. Specify nil to find storyboard into all registrations.
container
The container with registrations of the view/window controllers in the storyboard ant their dependencies.
Return Value
The new instane of
DIStoryboard
. -
Instantiates the view controller with the specified identifier. The view controller and its child controllers have their dependencies injected as specified in the container passed to the initializer of the self.
Declaration
Swift
public override func instantiateViewController(withIdentifier identifier: String) -> UIViewController
Parameters
identifier
The identifier set in the storyboard file.
Return Value
The instantiated view controller with its dependencies injected.
-
Instantiates the view/window controler with the specified identifier. The view/window controller and tis child controllers hase their dependencies injected as specified in the container passed to the initializer of the self.


BACK TO CATEGORIES CART LOGOUT
Books in the education nonfiction genre can either be books about forms of education and how itís achieved or be educational itself, in the form of text books and educational materials.Books in the education genre can argue the different types and vehicles of learning and what everyone should know as a baseline. They also can be text books that impart the knowledge through schools and studies.


AGILE
Agile is an approach to management under which requirements and solutions evolve through the collaborative effort of self-organizing and cross-functional teams and their customer(s). It advocates adaptive planning, evolutionary development, early delivery, and continual improvement, and it encourages rapid and flexible response to change
SCRUM
Scrum is an agile framework for managing knowledge work. It is designed for teams of three to nine members, who break their work into actions that can be completed within timeboxed iterations, called "sprints", no longer than one month and most commonly two weeks, then track progress and re-plan in 15-minute stand-up meetings
CORNCOB
Cob of Corn, is the central core of an ear of maize. It is the part of the ear on which the kernels grow. When harvesting corn, the corncob may be collected as part of the ear (necessary for corn on the cob), or instead may be left as part of the corn stover in the field
Self Host King of the Cob
Lets get started.
- First make sure you run the following commands:
- git clone https://github.com/mgalde/King-of-the-Cob.git
- cd King-of-the-Cob
- cd Docs
- cd KingoftheCobApp
- python manage.py makemigrations
- python manage.py migrate
- python manage.py runserver
Try it!
See for yourself.
Visit AWS Deployment location for a demo version of the project. No signup required!
Add to the project.
Call your self a developer.
Feel free to contribute to the Github project located HERE and join the AGILE / SCRUM revolution


A problem has been detect and Windows has been shut down to prevent damage to your computer.
If this is the first time you've seen this Stop error screen, restart your computer. If this screen appears again, follow these steps:
Check for viruses on your computer. Remove any newly installed hard drives or hard drives controllers. Check your hard drive to make sure it is properly configured and terminate. Run CHKDSK /F to check for your hard drive corruption, and then restart your computer
Technical information:
*** STOP: 0x0000007B (0xF8975528, 0xc0000034, 0x00000000, 0x00000000)