Far HTML 3.3.1 serial key or number

Far HTML 3.3.1 serial key or number

Far HTML 3.3.1 serial key or number

Far HTML 3.3.1 serial key or number

Changelog¶

()¶

  • Fixed a bug on Python 3 where a network error could cause to crash with the error . Patch by Vinay Sajip.
  • Fixed a bug where a test would fail on systems with glibc because the default value of SOMAXCONN changed.

()¶

  • When is run in the foreground, a new option suppresses the main log from being echoed to as it normally would. Patch by Trevor Foster.
  • Parsing now supports a new expansion, , that expands to the value of in the same section. Patch by Santjago Corkez.
  • Web UI buttons no longer use background images. Patch by Dmytro Karpovych.
  • The Web UI now has a link to view for a process in addition to the existing link. Based on a patch by OuroborosCoding.
  • The HTTP server will now send an header in logtail responses to fix Nginx proxy buffering. Patch by Weizhao Li.
  • When reaps an unknown PID, it will now log a description of the status. Patch by Andrey Zelenchuk.
  • Fixed a bug introduced in where would fail with the error . This only occurred on Python and only when piped. Patch by Slawa Pidgorny.

()¶

  • Fixed a bug on Python 3 only where logging to syslog did not work and would log the exception to the main log file. Patch by Vinay Sajip and Josh Staley.
  • Fixed a Python compatibility issue caused by the removal of . Patch by Mattia Procopio.
  • The package is no longer a dependency. A version of is now included within the package itself.

()¶

  • Fixed a bug where would actually tail . Note that without the explicit correctly tailed . The bug existed since a3 (released in ). Patch by Arseny Hofman.
  • Improved the warning message added in so it is now emitted for both and . Patch by Vinay Sajip.
  • CVE Documentation addition only, no code changes. This CVE states that does not use authentication by default (details). Note that is not enabled by default, and is also not enabled in the example configuration output by . The behavior of the options have been correctly documented, and have not changed, since the feature was introduced in A new warning message was added to the documentation.

()¶

  • Fixed an issue on Python 2 where running would fail with the message where it may have worked on Supervisor 3.x. The issue was introduced in Supervisor due to new bytes/strings conversions necessary to add Python 3 support. For to correctly display logs with Unicode characters, the terminal encoding specified by the environment must support it. If not, the may still occur on either Python 2 or 3. A new warning message is now printed if a problematic terminal encoding is detected. Patch by Vinay Sajip.

()¶

  • Fixed a bug where inline comments in the config file were not parsed correctly such that the comments were included as part of the values. This only occurred on Python 2, and only where the environment had an extra module installed. The bug was introduced in Supervisor because of Python 2/3 compatibility code that expected a Python 2 environment to only have a module.

()¶

  • Fixed an issue on Python 3 where an would occur if in the section was set to a special file like that was not seekable, even if was set to disable rotation. The issue only affected the main log and not child logs. Patch by Martin Falatic.

()¶

  • Support for Python 3 has been added. On Python 3, Supervisor requires Python or later. Many thanks to Vinay Sajip, Scott Maxwell, Palm Kevin, Tres Seaver, Marc Abramowitz, Son Nguyen, Shane Hathaway, Evan Andrews, and Ethan Hann who all made major contributions to the Python 3 porting effort. Thanks also to all contributors who submitted issue reports and patches towards this effort.
  • Support for Python , , and has been dropped. On Python 2, Supervisor now requires Python
  • The package is no longer a namespace package.
  • The behavior of the config file expansion has changed. In previous versions, a bug caused to always expand to the directory of the root config file. Now, when is used inside a file included via , it will expand to the directory of that file. Thanks to Alex Eftimie and Zoltan Toth-Czifra for the patches.
  • The default value for the config file setting , the expected exit codes of a program, has changed. In previous versions, it was . This caused issues with Golang programs where causes the exit code to be . The default value for is now .
  • An undocumented feature where multiple commands could be combined on a single line separated by semicolons has been removed.
  • will now set its exit code to a non-zero value when an error condition occurs. Previous versions did not set the exit code for most error conditions so it was almost always 0. Patch by Luke Weber.
  • Added new and options to the config file. These are boolean options that indicate whether process output will be sent to syslog. Supervisor can now log to both files and syslog at the same time. Specifying a log filename of is still supported but deprecated. Patch by Jason R. Coombs.

()¶

  • FastCGI programs ( sections) can now be used in groups (). Patch by Florian Apolloner.
  • Added a new option to the section to set the listen(2) socket backlog. Patch by Nenad Merdanovic.
  • Fixed a bug where (the XML-RPC transport used with Unix domain sockets) did not close the connection when was called on it. Patch by Jérome Perrin.
  • Fixed a bug where could hang for a long time if the system clock rolled back. Patch by Joe LeVeque.

()¶

  • Fixed a race condition where would cancel a shutdown already in progress if it received . Now, will ignore if shutdown is already in progress. Patch by Livanh.
  • Fixed a bug where searching for a relative command ignored changes to made in . Based on a patch by dongweiming.
  • now does an explicit after writing to .
  • A more descriptive error message is now emitted if a name in the config file contains a disallowed character. Patch by Rick van Hattem.

()¶

  • Fixed a bug where rereading the configuration would not detect changes to eventlisteners. Patch by Michael Ihde.
  • Fixed a bug where the warning may have been incorrectly shown by if its executable name was changed.
  • Fixed a bug where would continue starting up if the section of the config file specified but to that user failed. It will now exit immediately if it cannot drop privileges.
  • Fixed a bug in the web interface where redirect URLs did not have a slash between the host and query string, which caused issues when proxying with Nginx. Patch by Luke Weber.
  • When successfully drops privileges during startup, it is now logged at the level instead of .
  • The HTTP server now returns a Content-Type header specifying UTF-8 encoding. This may fix display issues in some browsers. Patch by Katenkka.

()¶

  • Fixed CVE A vulnerability was found where an authenticated client can send a malicious XML-RPC request to that will run arbitrary shell commands on the server. The commands will be run as the same user as . Depending on how has been configured, this may be root. See manicapital.com for details.

()¶

  • Fixed a bug introduced in where the command would crash with the error if the poller was used. Patch by Jared Suttles.
  • Fixed a bug introduced in where could get stuck in a polling loop after the web interface was used, causing high CPU usage. Patch by Jared Suttles.
  • Fixed a bug where if attempted to start but aborted due to another running instance of with the same config, the pidfile of the running instance would be deleted. Patch by coldnight.
  • Fixed a bug where would swallow most XML-RPC faults. now prints the fault and exits.
  • Parsing the config file will now fail with an error message if a process or group name contains a forward slash character () since it would break the URLs used by the web interface.
  • now shows an error message if an argument is given. Patch by Joel Krauska.
  • commands , , and now show an error message if an argument is given.

()¶

  • Fixed an issue where could hang when responding to HTTP requests (including commands) if the system time was set back after was started.
  • Zope , a debugging tool that was included in the directory but hadn&#;t been used for years, has been removed.

()¶

  • will now use , , or to monitor its file descriptors, in that order, depending on what is available on the system. Previous versions used only and would crash with the error when running a large number of subprocesses (whatever number resulted in enough file descriptors to exceed the fixed-size file descriptor table used by , which is typically ). Patch by Igor Sobreira.
  • has been added to the config file search paths. Many versions of Supervisor packaged for Debian and Ubuntu have included a patch that added this path. This difference was reported in a number of tickets as a source of confusion and upgrade difficulties, so the path has been added. Patch by Kelvin Wong.
  • Glob patterns in the section now support the expansion. Patch by Paul Lockaby.
  • Files included via the section are now logged at the level instead of . Patch by Daniel Hahler.

()¶

  • Backported from Supervisor Fixed CVE A vulnerability was found where an authenticated client can send a malicious XML-RPC request to that will run arbitrary shell commands on the server. The commands will be run as the same user as . Depending on how has been configured, this may be root. See manicapital.com for details.

()¶

  • Bad Request is now returned if an XML-RPC request is received with invalid body data. In previous versions, Internal Server Error was returned.

()¶

  • Parsing the config file will now fail with an error message if an or section contains a but no . In previous versions, would start with this invalid configuration but the HTTP server would always return a Internal Server Error. Thanks to Chris Ergatides for reporting this issue.

()¶

  • Fixed a server exception that made unusable if the system time was far into the future. The XML-RPC API returns timestamps as XML-RPC integers, but timestamps will exceed the maximum value of an XML-RPC integer in January (&#;Year Problem&#;). For now, timestamps exceeding the maximum integer will be capped at the maximum to avoid the exception and retain compatibility with existing API clients. In a future version of the API, the return type for timestamps will be changed.

()¶

  • Files included via the section are read in sorted order. In past versions, the order was undefined. Patch by Ionel Cristian Mărieș.
  • and now complete more quickly when handling many processes. Thanks to Chris McDonough for this patch. See: manicapital.com
  • Environment variables are now expanded for all config file options. Patch by Dexter Tad-y.
  • Added , , and XML-RPC methods to supervisor RPC interface. Thanks to Casey Callendrello, Marc Abramowitz, and Moriyoshi Koizumi for the patches.
  • Added command to supervisorctl. Thanks to Moriyoshi Koizumi and Marc Abramowitz for the patches.
  • Errors caused by bad values in a config file now show the config section to make debugging easier. Patch by Marc Abramowitz.
  • Setting in an section is now disallowed because any messages written to would interfere with the eventlistener protocol on .
  • Fixed a bug where spawning a process could cause to crash if an occurred while setting up logging. One way this could happen is if a log filename was accidentally set to a directory instead of a file. Thanks to Grzegorz Nosek for reporting this issue.
  • Fixed a bug introduced in where could crash when attempting to display a resource limit error.
  • Fixed a bug where could crash with the message if a time change caused the last start time of the process to be in the future. Thanks to Róbert Nagy, Sergey Leschenko, and samhair for the patches.
  • A warning is now logged if an eventlistener enters the UNKNOWN state, which usually indicates a bug in the eventlistener. Thanks to Steve Winton and detailyang for reporting issues that led to this change.
  • Errors from the web interface are now logged at the level. Previously, they were logged at the level and easily missed. Thanks to Thomas Güttler for reporting this issue.
  • Fixed on setuptools >=
  • If and , no stderr log file will be created. In previous versions, an empty stderr log file would be created. Thanks to Łukasz Kożuchowski for the initial patch.
  • Fixed an issue in Medusa that would cause to disconnect if many other commands were run in parallel. Patch by Stefan Friesel.

()¶

  • Backported from Supervisor Fixed CVE A vulnerability was found where an authenticated client can send a malicious XML-RPC request to that will run arbitrary shell commands on the server. The commands will be run as the same user as . Depending on how has been configured, this may be root. See manicapital.com for details.

()¶

  • Fixed an XML-RPC bug where the ElementTree-based parser handled strings like but not strings like , which are valid in the XML-RPC spec. This fixes compatibility with the Apache XML-RPC client for Java and possibly other clients.

()¶

  • Fixed a bug where in would show a Internal Server Error rather than a BAD_NAME fault.
  • Fixed a bug where the web interface would show a Internal Server Error instead of an error message for some process start faults.
  • Removed medusa files not used by Supervisor.

()¶

  • Fixed a bug where output would stop if log rotation occurred while tailing.
  • Prevent a crash when a greater number of file descriptors were attempted to be opened than permitted by the environment when starting a bunch of programs. Now, instead a spawn error is logged.
  • Compute &#;channel delay&#; properly, fixing symptoms where a supervisorctl start command would hang for a very long time when a process (or many processes) are spewing to their stdout or stderr. See comments attached to manicapital.com .
  • Added , , and to the release package.

()¶

  • The output of the , , , and commands in has been changed to be consistent with the command. Previously, the command would show a process like but starting that process would show (note the group prefix was missing). Now, starting the process will show . Suggested by Chris Wood.
  • The command in now supports group name syntax: .
  • The process column in the table output by the command in now expands to fit the widest name.
  • The command in now accepts optional group names. When group names are specified, only those groups will be updated. Patch by Gary M. Josack.
  • Tab completion in has been improved and now works for more cases. Thanks to Mathieu Longtin and Marc Abramowitz for the patches.
  • Attempting to start or stop a process group in with the syntax will now show the same error message as the syntax if the name does not exist. Previously, it would show a Python exception. Patch by George Ang.
  • Added new and events. These events are fired when process groups are added or removed from Supervisor&#;s runtime configuration when using the and commands in . Patch by Brent Tubbs.
  • Stopping a process in the backoff state now changes it to the stopped state. Previously, an attempt to stop a process in backoff would be ignored. Patch by Pascal Varet.
  • The option is now expanded separately for each process in a homogeneous process group. This allows each process to have its own working directory. Patch by Perttu Ranta-aho.
  • Removed from the list in because it caused installation issues on some systems.
  • Fixed a bug in Medusa where the HTTP Basic authorizer would cause an exception if the password contained a colon. Thanks to Thomas Güttler for reporting this issue.
  • Fixed an XML-RPC bug where calling manicapital.comrocessLogs() with a name like would cause a Internal Server Error rather than returning a BAD_NAME fault.
  • Fixed a hang that could occur in if log rotation is used and an outside program deletes an active log file. Patch by Magnus Lycka.
  • A warning is now logged if a glob pattern in an section does not match any files. Patch by Daniel Hahler.

()¶

  • Backported from Supervisor Fixed CVE A vulnerability was found where an authenticated client can send a malicious XML-RPC request to that will run arbitrary shell commands on the server. The commands will be run as the same user as . Depending on how has been configured, this may be root. See manicapital.com for details.

()¶

  • Parsing the config file will now fail with an error message if a process or group name contains characters that are not compatible with the eventlistener protocol.
  • Fixed a bug where the command in would fail if the combined length of the username and password was over 56 characters.
  • Reading the config file now gives a separate error message when the config file exists but can&#;t be read. Previously, any error reading the file would be reported as &#;could not find config file&#;. Patch by Jens Rantil.
  • Fixed an XML-RPC bug where array elements after the first would be ignored when using the ElementTree-based XML parser. Patch by Zev Benjamin.
  • Fixed the usage message output by to show the correct default config file path. Patch by Alek Storm.

b2 ()¶

  • The behavior of the program option has changed. In all previous versions, if failed to switch to the user, a warning would be sent to the stderr log but the child process would still be spawned. This means that a mistake in the config file could result in a child process being unintentionally spawned as root. Now, will not spawn the child unless it was able to successfully switch to the user. Thanks to Igor Partola for reporting this issue.
  • If a user specified in the config file does not exist on the system, will now print an error and refuse to start.
  • Reverted a change to logging introduced in b1 that was intended to allow multiple processes to log to the same file with the rotating log handler. The implementation caused supervisord to crash during reload and to leak file handles. Also, since log rotation options are given on a per-program basis, impossible configurations could be created (conflicting rotation options for the same file). Given this and that supervisord now has syslog support, it was decided to remove this feature. A warning was added to the documentation that two processes may not log to the same file.
  • Fixed a bug where parsing could cause supervisord to crash if manicapital.com() fails, such as a bad quoting. Patch by Scott Wilson.
  • It is now possible to use on a machine with no file by supplying the connection information in command line options. Patch by Jens Rantil.
  • Fixed a bug where supervisord would crash if the syslog handler was used and supervisord received SIGUSR2 (log reopen request).
  • Fixed an XML-RPC bug where calling manicapital.comcessInfo() with a bad name would cause a Internal Server Error rather than the returning a BAD_NAME fault.
  • Added a favicon to the web interface. Patch by Caio Ariede.
  • Fixed a test failure due to incorrect handling of daylight savings time in the childutils tests. Patch by Ildar Hizbulin.
  • Fixed a number of pyflakes warnings for unused variables, imports, and dead code. Patch by Philippe Ombredanne.

b1 ()¶

  • Fixed a bug where parsing did not verify that key/value pairs were correctly separated. Patch by Martijn Pieters.
  • Fixed a bug in the HTTP server code that could cause unnecessary delays when sending large responses. Patch by Philip Zeyliger.
  • When supervisord starts up as root, if the flag was not provided, a warning is now emitted to the console. Rationale: supervisord looks in the current working directory for a file; someone might trick the root user into starting supervisord while cd&#;ed into a directory that has a rogue .
  • A warning was added to the documentation about the security implications of starting supervisord without the flag.
  • Add a boolean program option , defaulting to false. When true, the flag causes supervisor to send the stop signal to the whole process group. This is useful for programs, such as Flask in debug mode, that do not propagate stop signals to their children, leaving them orphaned.
  • Python is no longer supported. The last version that supported Python is Supervisor a
  • Removed the unused &#;supervisor_rpc&#; entry point from manicapital.com
  • Fixed a bug in the rotating log handler that would cause unexpected results when two processes were set to log to the same file. Patch by Whit Morriss.
  • Fixed a bug in config file reloading where each reload could leak memory because a list of warning messages would be appended but never cleared. Patch by Philip Zeyliger.
  • Added a new Syslog log handler. Thanks to Denis Bilenko, Nathan L. Smith, and Jason R. Coombs, who each contributed to the patch.
  • Put all change history into a single file (manicapital.com).

a12 ()¶

  • Released to replace a broken a11 package where non-Python files were not included in the package.

a11 ()¶

  • Added a new file, , with a listing of third-party plugins for Supervisor. Contributed by Jens Rantil.
  • The command in supervisorctl can now be used to retrieve the PIDs of child processes. See . Patch by Gregory Wisniewski.
  • Added a new expansion that will be expanded to the value returned by Python&#;s (see manicapital.com#manicapital.com). Patch by Joseph Kondel.
  • Fixed a bug in the web interface where pages over 64K would be truncated. Thanks to Drew Perttula and Timothy Jones for reporting this.
  • Renamed to so GitHub renders the file as ReStructuredText.
  • The XML-RPC server is now compatible with clients that do not send empty <params> when there are no parameters for the method call. Thanks to Johannes Becker for reporting this.
  • Fixed output to show the correct program name.
  • The behavior of the configuration options and has changed. Previously, if a hard limit was less than or , supervisord would unconditionally abort with an error. Now, supervisord will attempt to raise the hard limit. This may succeed if supervisord is run as root, otherwise the error is printed as before. Patch by Benoit Sigoure.
  • Add a boolean program option , defaulting to false, if true when resorting to send SIGKILL to stop/terminate the process send it to its whole process group instead to take care of possible children as well and not leave them behind. Patch by Samuele Pedroni.
  • Environment variables may now be used in the configuration file for options that support string expansion. Patch by Aleksey Sivokon.
  • Fixed a race condition where supervisord might not act on a signal sent to it. Thanks to Adar Dembo for reporting the issue and supplying the initial patch.
  • Updated the output of to fix typos and improve comments. Thanks to Jens Rantil for noticing these.
  • Fixed a possible Server Error from the web interface. This was observed when using Supervisor on a domain socket behind Nginx, where Supervisor would raise an exception because REMOTE_ADDR was not set. Patch by David Bennett.

a10 ()¶

  • Fixed the stylesheet of the web interface so the footer line won&#;t overlap a long process list. Thanks to Derek DeVries for the patch.
  • Allow rpc interface plugins to register new events types.
  • Bug fix for FCGI sockets not getting cleaned up when the command is issued from supervisorctl. Also, the default behavior has changed for FCGI sockets. They are now closed whenever the number of running processes in a group hits zero. Previously, the sockets were kept open unless a group-level stop command was issued.
  • Better error message when HTTP server cannot reverse-resolve a hostname to an IP address. Previous behavior: show a socket error. Current behavior: spit out a suggestion to stdout.
  • Environment variables set via value within section had no effect. Thanks to Wyatt Baldwin for a patch.
  • Fix bug where stopping process would cause process output that happened after the stop request was issued to be lost. See manicapital.com
  • Moved 2.X change log entries into .
  • Converted and into proper ReStructuredText and included them in the in .
  • Added a manicapital.com to the package (run via in the package dir). Tests supervisor on multiple Python versions.

a9 ()¶

  • Use rich comparison methods rather than __cmp__ to sort process configs and process group configs to better straddle Python versions. (thanks to Jonathan Riboux for identifying the problem and supplying an initial patch).

  • Fixed test_manicapital.com_maintail_dashf test for Python (thanks to Jonathan Riboux for identifying the problem and supplying an initial patch).

  • Fixed the way that manicapital.com computes a &#;good&#; URL for compatibility with Python and Python >= URLs with bogus &#;schemes://&#; will now be accepted as a version-straddling compromise (before they were rejected before supervisor would start). (thanks to Jonathan Riboux for identifying the problem and supplying an initial patch).

  • Add a / option to supervisord: Print the supervisord version number out to stdout and exit. (Roger Hoover)

  • Import iterparse from manicapital.com when available (eg: Python ). Patch by Sidnei da Silva.

  • Fixed the url to the supervisor-users mailing list. Patch by Sidnei da Silva

  • When parsing &#;environment=&#; in the config file, changes introduced in a8 prevented Supervisor from parsing some characters commonly found in paths unless quoting was used as in this example:

    environment=HOME='/home/auser'

    Supervisor once again allows the above line to be written as:

    environment=HOME=/home/auser

    Alphanumeric characters, &#;_&#;, &#;/&#;, &#;.&#;, &#;+&#;, &#;-&#;, &#;(&#;, &#;)&#;, and &#;:&#; can all be used as a value without quoting. If any other characters are needed in the value, please quote it as in the first example above. Thanks to Paul Heideman for reporting this issue.

  • Supervisor will now look for its config file in locations relative to the executable path, allowing it to be used more easily in virtual environments. If manicapital.com[0] is , supervisor will now look for it&#;s config file in and in addition to the other standard locations. Patch by Chris Rossi.

a8 ()¶

  • Don&#;t cleanup file descriptors on first supervisord invocation: this is a lame workaround for Snow Leopard systems that use libdispatch and are receiving &#;Illegal instruction&#; messages at supervisord startup time. Restarting supervisord via &#;supervisorctl restart&#; may still cause a crash on these systems.
  • Got rid of Medusa hashbang headers in various files to ease RPM packaging.
  • Allow umask to be (patch contributed by Rowan Nairn).
  • Fixed a bug introduced in a7 where supervisorctl wouldn&#;t ask for a username/password combination properly from a password-protected supervisord if it wasn&#;t filled in within the &#;[supervisorctl]&#; section username/password values. It now properly asks for a username and password.
  • Fixed a bug introduced in a7 where manicapital.com would not detect the Python version correctly. Patch by Daniele Paolella.
  • Fixed a bug introduced in a7 where parsing a string of key/value pairs failed on Python due to use of regular expression syntax introduced in Python
  • Removed the test suite for the console script, which was moved to the Superlance package in a7.
  • Added release dates to manicapital.com
  • Reloading the config for an fcgi process group did not close the fcgi socket - now, the socket is closed whenever the group is stopped as a unit (including during config update). However, if you stop all the processes in a group individually, the socket will remain open to allow for graceful restarts of FCGI daemons. (Roger Hoover)
  • Rereading the config did not pick up changes to the socket parameter in a fcgi-program section. (Roger Hoover)
  • Made a more friendly exception message when a FCGI socket cannot be created. (Roger Hoover)
  • Fixed a bug where the &#;serverurl option of supervisorctl would not accept a URL with a &#;unix&#; scheme. (Jason Kirtland)
  • Running the tests now requires the &#;mock&#; package. This dependency has been added to &#;tests_require&#; in manicapital.com (Roger Hoover)
  • Added support for setting the ownership and permissions for an FCGI socket. This is done using new &#;socket_owner&#; and &#;socket_mode&#; options in an [fcgi-program:x] section. See the manual for details. (Roger Hoover)
  • Fixed a bug where the FCGI socket reference count was not getting decremented on spawn error. (Roger Hoover)
  • Fixed a Python deprecation warning on use of the &#;sha&#; module.
  • Updated ez_manicapital.com to one that knows about setuptools c
  • Running &#;supervisorctl shutdown&#; no longer dumps a Python backtrace when it can&#;t connect to supervisord on the expected socket. Thanks to Benjamin Smith for reporting this.
  • Removed use of manicapital.com in our bundled version of asynchat because it broke compatibility with Python
  • The sample configuration output by &#;echo_supervisord_conf&#; now correctly shows the default for &#;autorestart&#; as &#;unexpected&#;. Thanks to William Dode for noticing it showed the wrong value.

a7 ()¶

  • We now bundle our own patched version of Medusa contributed by Jason Kirtland to allow Supervisor to run on Python This was done because Python introduced backwards incompatible changes to asyncore and asynchat in the stdlib.

  • The console script , introduced in Supervisor a4, has been moved to Superlance (manicapital.com). The Superlance package contains other useful monitoring tools designed to run under Supervisor.

  • Supervisorctl now correctly interprets all of the error codes that can be returned when starting a process. Patch by Francesc Alted.

  • New and config options have been added to the , , and sections. These enable the emitting of new PROCESS_LOG events for a program. If unspecified, the default is False.

    If enabled for a subprocess, and data is received from the stdout or stderr of the subprocess while not in the special capture mode used by PROCESS_COMMUNICATION, an event will be emitted.

    Event listeners can subscribe to either PROCESS_LOG_STDOUT or PROCESS_LOG_STDERR individually, or PROCESS_LOG for both.

  • Values for subprocess environment variables specified with environment= in manicapital.com can now be optionally quoted, allowing them to contain commas. Patch by Tim Godfrey.

  • Added a new event type, REMOTE_COMMUNICATION, that is emitted by a new RPC method, manicapital.commoteCommEvent().

  • Patch for bug # (KeyError on expansion for stdout/stderr_logfile) from David E. Kindred.

  • Add , , and commands based on Anders Quist&#;s patch. This patch extends the &#;add&#; and &#;drop&#; commands with automagical behavior:

  • Fix bug with symptom &#;KeyError: &#;process_name&#;&#; when using a logfile name including documented``process_name`` Python string expansions.

  • Tab completions in the supervisorctl shell, and a foreground mode for Supervisor, implemented as a part of GSoC. The supervisorctl program now has a command, which makes it possible to supply inputs to a process, and see its output/error stream in real time.

  • Process config reloading implemented by Anders Quist. The supervisorctl program now has the commands &#;add&#; and &#;drop&#;. &#;add <programname>&#; adds the process group implied by <programname> in the config file. &#;drop <programname>&#; removes the process group from the running configuration (it must already be stopped). This makes it possible to add processes to and remove processes from a running supervisord without restarting the supervisord process.

  • Fixed a bug where opening the HTTP servers would fail silently for socket errors other than manicapital.comNUSE.

  • Thanks to Dave Peticolas, using &#;reload&#; against a supervisord that is running in the background no longer causes supervisord to crash.

  • Configuration options for logfiles now accept mixed case reserved words (e.g. &#;AUTO&#; or &#;auto&#;) for consistency with other options.

  • manicapital.comata was buggy, it could not deal with carriage returns in data. See manicapital.com Thanks to Ian Bicking.

  • Per-process exitcodes= configuration now will not accept exit codes that are not 8-bit unsigned integers (supervisord will not start when one of the exit codes is outside the range of 0 - ).

  • Per-process value can now contain expandable values like . (See manicapital.com).

  • Accepted patch from Roger Hoover to allow for a new sort of process group: &#;fcgi-program&#;. Adding one of these to your manicapital.com allows you to control fastcgi programs. FastCGI programs cannot belong to heterogenous groups.

    The configuration for FastCGI programs is the same as regular programs except an additional &#;socket&#; parameter. Substitution happens on the socket parameter with the and variables:

    [fcgi-program:fcgi_test] ;socket=tcp://localhost socket=unix:///path/to/fcgi/socket
  • Supervisorctl now supports a plugin model for supervisorctl commands.

  • Added the ability to retrieve supervisord&#;s own pid through manicapital.com() on the XML-RPC interface or a new &#;pid&#; command on supervisorctl.

a6 ()¶

  • The RotatingFileLogger had a race condition in its doRollover method whereby a file might not actually exist despite a call to manicapital.com on the line above a place where we try to remove it. We catch the exception now and ignore the missing file.

a5 ()¶

  • Supervisorctl now supports persistent readline history. To enable, add &#;history_file = <pathname>&#; to the section in your manicapital.com file.
  • Multiple commands may now be issued on one supervisorctl command line, e.g. &#;restart prog; tail -f prog&#;. Separate commands with a single semicolon; they will be executed in order as you would expect.

a4 ()¶

  • a3 broke Python backwards compatibility.

  • On Debian Sarge, one user reported that a call to manicapital.comfile would fail with an &#;[Errno 9] Bad file descriptor&#; at supervisord startup time. I was unable to reproduce this, but we found a workaround that seemed to work for him and it&#;s included in this release. See manicapital.com for more information. Thanks to William Dode.

  • The fault has been removed. It was only raised by manicapital.comocessStdin(). That method now returns for parity with the other methods. (Mike Naberezny)

  • The fault TIMED_OUT has been removed. It was not used.

  • Supervisor now depends on meld3 , which does not compile its C extensions by default, so there is no more need to faff around with NO_MELD3_EXTENSION_MODULES during installation if you don&#;t have a C compiler or the Python development libraries on your system.

  • Instead of making a user root around for the manicapital.com file, provide a convenience command &#;echo_supervisord_conf&#;, which he can use to echo the manicapital.com to his terminal (and redirect to a file appropriately). This is a new user convenience (especially one who has no Python experience).

  • Added config option to and sections. This is an offset used to compute the first integer that will begin to start from. Contributed by Antonio Beamud Montero.

  • Added capability for config section to config format. This section must contain a single key &#;files&#;, which must name a space-separated list of file globs that will be included in supervisor&#;s configuration. Contributed by Ian Bicking.

  • Invoking the supervisorctl command could trigger a bug in supervisord which caused it to crash. See manicapital.com . Thanks to William Dode for a bug report.

  • The script was made into a console script.

  • The value in both the and sections can now optionally be specified as a SHA hexdigest instead of as cleartext. Values prefixed with will be considered SHA hex digests. To encrypt a password to a form suitable for pasting into the configuration file using Python, do, e.g.:

    >>> importsha>>> '{SHA}'+manicapital.com('thepassword').hexdigest()'{SHA}82abdbfafe46cc1c8a2efeae50cb1d'
  • The subtypes of the events PROCESS_STATE_CHANGE (and PROCESS_STATE_CHANGE itself) have been removed, replaced with a simpler set of PROCESS_STATE subscribable event types.

    The new event types are:

    PROCESS_STATE_STOPPED PROCESS_STATE_EXITED PROCESS_STATE_STARTING PROCESS_STATE_STOPPING PROCESS_STATE_BACKOFF PROCESS_STATE_FATAL PROCESS_STATE_RUNNING PROCESS_STATE_UNKNOWN PROCESS_STATE # abstract

    PROCESS_STATE_STARTING replaces:

    PROCESS_STATE_CHANGE_STARTING_FROM_STOPPED PROCESS_STATE_CHANGE_STARTING_FROM_BACKOFF PROCESS_STATE_CHANGE_STARTING_FROM_EXITED PROCESS_STATE_CHANGE_STARTING_FROM_FATAL

    PROCESS_STATE_RUNNING replaces PROCESS_STATE_CHANGE_RUNNING_FROM_STARTED

    PROCESS_STATE_BACKOFF replaces PROCESS_STATE_CHANGE_BACKOFF_FROM_STARTING

    PROCESS_STATE_STOPPING replaces:

    PROCESS_STATE_CHANGE_STOPPING_FROM_RUNNING PROCESS_STATE_CHANGE_STOPPING_FROM_STARTING

    PROCESS_STATE_EXITED replaces PROCESS_STATE_CHANGE_EXITED_FROM_RUNNING

    PROCESS_STATE_STOPPED replaces PROCESS_STATE_CHANGE_STOPPED_FROM_STOPPING

    PROCESS_STATE_FATAL replaces PROCESS_STATE_CHANGE_FATAL_FROM_BACKOFF

    PROCESS_STATE_UNKNOWN replaces PROCESS_STATE_CHANGE_TO_UNKNOWN

    PROCESS_STATE replaces PROCESS_STATE_CHANGE

    The PROCESS_STATE_CHANGE_EXITED_OR_STOPPED abstract event is gone.

    All process state changes have at least &#;processname&#;, &#;groupname&#;, and &#;from_state&#; (the name of the previous state) in their serializations.

    PROCESS_STATE_EXITED additionally has &#;expected&#; (1 or 0) and &#;pid&#; (the process id) in its serialization.

    PROCESS_STATE_RUNNING, PROCESS_STATE_STOPPING, PROCESS_STATE_STOPPED additionally have &#;pid&#; in their serializations.

    PROCESS_STATE_STARTING and PROCESS_STATE_BACKOFF have &#;tries&#; in their serialization (initially &#;0&#;, bumped +1 each time a start retry happens).

  • Remove documentation from manicapital.com, point people to manicapital.com .

  • The eventlistener request/response protocol has changed. OK/FAIL must now be wrapped in a RESULT envelope so we can use it for more specialized communications.

    Previously, to signify success, an event listener would write the string to its stdout. To signify that the event was seen but couldn&#;t be handled by the listener and should be rebuffered, an event listener would write the string to its stdout.

    In the new protocol, the listener must write the string:

    RESULT {resultlen}\n{result}

    For example, to signify OK:

    To signify FAIL:

    See the scripts/sample_manicapital.com script for an example.

  • To provide a hook point for custom results returned from event handlers (see above) the [eventlistener:x] configuration sections now accept a &#;result_handler=&#; parameter, e.g. &#;result_handler=manicapital.comchers:default_handler&#; (the default) or &#;handler=mypackage:myhandler&#;. The keys are pkgutil &#;entry point&#; specifications (importable Python function names). Result handlers must be callables which accept two arguments: one named &#;event&#; which represents the event, and the other named &#;result&#;, which represents the listener&#;s result. A result handler either executes successfully or raises an exception. If it raises a manicapital.comEvent exception, the event will be rebuffered, and the eventhandler will be placed back into the ACKNOWLEDGED state. If it raises any other exception, the event handler will be placed in the UNKNOWN state. If it does not raise any exception, the event is considered successfully processed. A result handler&#;s return value is ignored. Writing a result handler is a &#;in case of emergency break glass&#; sort of thing, it is not something to be used for arbitrary business code. In particular, handlers must not block for any appreciable amount of time.

    The standard eventlistener result handler (manicapital.comchers:default_handler) does nothing if it receives an &#;OK&#; and will raise a manicapital.comEvent exception if it receives any other value.

  • Supervisord now emits TICK events, which happen every N seconds. Three types of TICK events are available: TICK_5 (every five seconds), TICK_60 (every minute), TICK_ (every hour). Event listeners may subscribe to one of these types of events to perform every-so-often processing. TICK events are subtypes of the EVENT type.

  • Get rid of OSX platform-specific memory monitor and replace with manicapital.com, which works on both Linux and Mac OS. This script is now a console script named &#;memmon&#;.

  • Allow &#;web handler&#; (the handler which receives http requests from browsers visiting the web UI of supervisor) to deal with POST requests.

  • RPC interface methods stopProcess(), stopProcessGroup(), and stopAllProcesses() now take an optional &#;wait&#; argument that defaults to True for parity with the start methods.

a3 ()¶

  • Supervisorctl now reports a better error message when the main supervisor XML-RPC namespace is not registered. Thanks to Mike Orr for reporting this. (Mike Naberezny)

  • Create directory within supervisor package, move there, and place sample event listener and comm event programs within the directory.

  • When an event notification is buffered (either because a listener rejected it or because all listeners were busy when we attempted to send it originally), we now rebuffer it in a way that will result in it being retried earlier than it used to be.

  • When a listener process exits (unexpectedly) before transitioning from the BUSY state, rebuffer the event that was being processed.

  • supervisorctl command now accepts a trailing specifier: or , which respectively, allow a user to tail the stderr or stdout of the named process. When this specifier is not provided, tail defaults to stdout.

  • supervisor command now clears both stderr and stdout logs for the given process.

  • When a process encounters a spawn error as a result of a failed execve or when it cannot setuid to a given uid, it now puts this info into the process&#; stderr log rather than its stdout log.

  • The event listener protocol header now contains the identifier, the that the event emanated from, and the as well as the values it previously contained (version, event name, serial, and length). The server identifier is taken from the config file options value , the value is the name of the listener pool that this event emanates from, and the is a serial number assigned to the event local to the pool that is processing it.

  • The event listener protocol header is now a sequence of key-value pairs rather than a list of positional values. Previously, a representative header looked like:

    SUPERVISOR PROCESS_COMMUNICATION_STDOUT 30 22\n

    Now it looks like:

    ver server:supervisor serial
  • Specific event payload serializations have changed. All event types that deal with processes now include the pid of the process that the event is describing. In event serialization &#;header&#; values, we&#;ve removed the space between the header name and the value and headers are now separated by a space instead of a line feed. The names of keys in all event types have had underscores removed.

  • Abandon the use of the Python stdlib module for speed and cleanliness purposes. We&#;ve rolled our own.

  • Fix crash on start if AUTO logging is used with a max_bytes of zero for a process.

  • Improve process communication event performance.

  • The process config parameters and are no longer valid. They have been replaced with the and parameters, which are meant to be suffix-multiplied integers. They both default to zero. When they are zero, process communication event capturing is not performed. When either is nonzero, the value represents the maximum number of bytes that will be captured between process event start and end tags. This change was to support the fact that we no longer keep capture data in a separate file, we just use a FIFO in RAM to maintain capture info. For users whom don&#;t care about process communication events, or whom haven&#;t changed the defaults for or , they needn&#;t do anything to their configurations to deal with this change.

  • Log message levels have been normalized. In particular, process stdin/stdout is now logged at level rather than at level ( level is now reserved for output useful typically for debugging supervisor itself). See &#;Supervisor Log Levels&#; in the documentation for more info.

  • When an event is rebuffered (because all listeners are busy or a listener rejected the event), the rebuffered event is now inserted in the head of the listener event queue. This doesn&#;t guarantee event emission in natural ordering, because if a listener rejects an event or dies while it&#;s processing an event, it can take an arbitrary amount of time for the event to be rebuffered, and other events may be processed in the meantime. But if pool listeners never reject an event or don&#;t die while processing an event, this guarantees that events will be emitted in the order that they were received because if all listeners are busy, the rebuffered event will be tried again &#;first&#; on the next go-around.

  • Removed EVENT_BUFFER_OVERFLOW event type.

  • The supervisorctl xmlrpc proxy can now communicate with supervisord using a persistent HTTP connection.

  • A new module &#;manicapital.comtils&#; was added. This module provides utilities for Python scripts which act as children of supervisord. Most notably, it contains an API method &#;getRPCInterface&#; allows you to obtain an xmlrpclib ServerProxy that is willing to communicate with the parent supervisor. It also contains utility functions that allow for parsing of supervisor event listener protocol headers. A pair of scripts (loop_manicapital.com and loop_manicapital.com) were added to the script directory that serve as examples about how to use the childutils module.

  • A new envvar is added to child process environments: SUPERVISOR_SERVER_URL. This contains the server URL for the supervisord running the child.

  • An URL was added at which just returns the string (can be used for up checks or speed checks via plain-old-HTTP).

  • An additional command-line option is accepted by the supervisord script for developer use:

    supervisord -n -c manicapital.com --profile_options=cumulative,calls

    The values are sort_stats options that can be passed to the standard Python profiler&#;s PStats sort_stats method.

    When you exit supervisor, it will print Python profiling output to stdout.

  • If cElementTree is installed in the Python used to invoke supervisor, an alternate (faster, by about 2X) XML parser will be used to parse XML-RPC request bodies. cElementTree was added as an &#;extras_require&#; option in manicapital.com

  • Added the ability to start, stop, and restart process groups to supervisorctl. To start a group, use . To start multiple groups, use . Equivalent commands work for &#;stop&#; and &#;restart&#;. You can mix and match short processnames, fullly-specified group:process names, and groupsplats on the same line for any of these commands.

  • Added option to process config. If you set this option, supervisor will chdir to this directory before executing the child program (and thus it will be the child&#;s cwd).

  • Added option to process config. If you set this option, supervisor will set the umask of the child program. (Thanks to Ian Bicking for the suggestion).

  • A pair of scripts and osx_memmon_manicapital.com` have been added to the scripts directory. If they are used together as described in their comments, processes which are consuming &#;too much&#; memory will be restarted. The script only works on OSX (my main development platform) but it should be trivially generalizable to other operating systems.

  • The long form (-c) command line option for supervisord was broken. Reported by Mike Orr. (Mike Naberezny)

  • New log level: BLAT (blather). We log all supervisor-internal-related debugging info here. Thanks to Mike Orr for the suggestion.

  • We now allow supervisor to listen on both a UNIX domain socket and an inet socket instead of making them mutually exclusive. As a result, the options &#;http_port&#;, &#;http_username&#;, &#;http_password&#;, &#;sockchmod&#; and &#;sockchown&#; are no longer part of the section configuration. These have been supplanted by two other sections: and . You&#;ll need to insert one or the other (depending on whether you want to listen on a UNIX domain socket or a TCP socket respectively) or both into your manicapital.com file. These sections have their own options (where applicable) for port, username, password, chmod, and chown. See manicapital.com for more information about these sections.

  • All supervisord command-line options related to &#;http_port&#;, &#;http_username&#;, &#;http_password&#;, &#;sockchmod&#; and &#;sockchown&#; have been removed (see above point for rationale).

  • The option that used to be within the section (and is now named within the section) used to accept a dot-separated manicapital.com value. The separator now must be a colon &#;:&#;, e.g. &#;user:group&#;. Unices allow for dots in usernames, so this change is a bugfix. Thanks to Ian Bicking for the bug report.

  • If a &#;-c&#; option is not specified on the command line, both supervisord and supervisorctl will search for one in the paths , (relative to the current working dir when supervisord or supervisorctl is invoked) or in (the old default path). These paths are searched in order, and supervisord and supervisorctl will use the first one found. If none are found, supervisor will fail to start.

  • The Python string expression (referring to the directory in which the the configuration file was found) can be used within the following sections/options within the config file:

    unix_http_server:file supervisor:directory supervisor:logfile supervisor:pidfile supervisor:childlogdir supervisor:environment program:environment program:stdout_logfile program:stderr_logfile program:process_name program:command
  • The aka

Источник: [manicapital.com]
, Far HTML 3.3.1 serial key or number

Fractions and Decimals

This page is about converting a fraction (i.e. a ratio of two numbers, also called a rational number)into a decimal fraction and the patterns that occur in such a decimal fraction. It is interactive and you can usethe calculators on this page to investigate fractions for yourself to many decimal places. No special knowledgebeyond decimals and division is required.
The calculators on this page require JavaScript but you appear to have switched JavaScript off(it is disabled). Please go to the Preferences for this browser and enable it if you want to use thecalculators, then Reload this page.
The icon means there is a Things to do section of questions to start your own manicapital.com calculator iconindicates that there is a live interactive calculator in that section.
Some but not all of the Calculators on this page are combined into a single Calculator on Fractions - Decimal Calculator .

Changing a Fraction into a Decimal number

Converting a fraction to a decimal is just a division operation. Sothe fraction 1/2means 1÷2.
When we do the long division (or use a calculator!) we find 1÷2=0·manicapital.com fraction was easy - just one digit and we are done.

Some examples and patterns

People have always been fascinated by the patterns in decimal fractions, trying to find the order in the seeming chaos and intrigued by the sequences.

When we make a table of the first few reciprocals of the numbers 2,3,, that is when we turn the whole numbers upside down: from2=2/1, 3=3/1, 4=4/1,to 1/2, 1/3, 1/4, we get the following:

StoppingEndless
1/2 =
1/3 =
1/4 =
1/5 =
1/6 = 6
1/7 =
1/8 =
1/9 =
1/10 =
1/11 = 09
1/12 = 3
1/13 =
StoppingEndless
1/14 =
1/15 = 6
1/16 =
1/17 =
1/18 = 5
1/19 =
1/20 =
1/21 =
1/22 = 45
1/23 =
1/24 = 6
1/25 =

Three types of decimal fractions

  1. In the table we can see that some decimal fractions stop after a few decimal places - those in the left-hand columns - such as 1/2, 1/4, 1/5, 1/8.
    These are called terminating decimals.
  2. But others become an endlessly repeating cycle of the same digits - those in the right-hand columns - such as 1/3, 1/6, 1/7.
    These are called recurring (or repeating) decimal fractions. These recurring fractions are of two kinds:
    1. Some decimal fractions are solely a collection of digits that repeat from the beginning, such as which is just 3 repeating for everand 1/7 which is endlessly repeated.
      These are called purely repeating decimal fractions
    2. Others start off with a fixed set of digits before they too eventually settle down to an endless repetition of the same digits, such as
      1/6 =
      which begins and then cycles 6 indefinitely
      1/12 =
      which starts before it too starts to repeat 3 for ever.
      These are also called mixed recurring decimal fractions.

At first it is surprising that every fraction fits into one of these two categories:

The decimal fraction of every proper fraction is either terminating or else it becomes recurring.

To see why we have just two types of decimal fraction: terminating or repeating, think about what happens when youtry to compute n/d as a decimal fraction: d ÷ n.
Here is the division process for 1/4 and 1/6:
1/4 = 1 ÷ 4
 .  2 5
4 )1 . 0 0
 8
2 0
2 0
0
 
1/6 = 1 ÷ 6
 .  1 6
6 )1 . 0 0 0
  6
4 0
3 6
40
Two things can happen in this process:
either at some stage d divides exactly into a number in the division process
and so the division stops because the remainder is 0.
We have a terminating decimal fraction as in 1/4 above.
1/4 =
or we find a remainder which is the same as an earlier remainder.
so the division process would continue with the same divisors and remainders as when we first foundthat remainder and then this cycle would repeat endlessly.
We have found a repeating cycle as in 1/6 above.
1/6 =
Note that we must stop OR else get into a cycle because when we divide by d there are only d different remainders: 0, 1, 2, , d-1so after at most d-1 places, we will find an earlier remainder is repeated and then we have a cycle.
When we find a repeating cycle, it depends if the repeating remainder was the same as the first remainderin which case we have a purely repeating cycle, or if it was a later remainder that was repeated,after some fixed number of digits before the repeating part.

We could simplify this even further by saying that all terminating decimals end with the infinite cycle of so that every proper fraction is a recurring decimal !

Patterns in recurring decimals

If we take all the fractions with the same denominator, that is, the lower number in a fraction,we can find some amazing patterns too. The first and simplest are the sevenths, the ninths and theelevenths:
1/7 =
2/7 =
3/7 =
4/7 =
5/7 =
6/7 =
   1/9 =
2/9 =
3/9 =
4/9 =
5/9 =
6/9 =
7/9 =
8/9 =
   1/11 =
2/11 =
3/11 =
4/11 =
5/11 =
6/11 =
7/11 =
8/11 =
9/11 =
10/11=

Notation for the recurring part of a decimal fraction

Mathematicians use one of two common notations toindicate which of the digits in a decimal fraction are in the repeating part:the period or cycle.
  1. a dot is put over the first and last digits in the recurring sequence
    This notation goes back at least to Robertson ().
  2. a line is drawn over the repeating part
Both of these are a little awkward on web pages and as the output fromcomputer programs and calculators, so an alternative is also used:
  1. enclose the recurring part inside [ and ] brackets

For example:

Things to do

Alternative forms for some recurring fractions

We have just seen that there is no unique way for writing a recurring fractionsince 0.[] = [] = [] =
We could choose one of two conventions: use the longest fixed part or use the shortest fixed part.
For our number example here, it makes sense to write it as 0.[] but in other cases wherethe period begins with 0 we have other choices.
For instance, 1/11 = .
  • With the shortest fixed part (this is the usual form), we have:1/11 = 0.[09] which makes it a purely recurring decimal fraction.
  • Others (such as used in the Mathematica as results from the RealDigits function) prefer to use the longest fixed part and to start a recurring part with a non-zero digit:
    1/11 = [90], making this a mixed recurring decimal fraction.

On this page, we use the shortest fixed part for all recurring decimals.

People have suggested that all fractions are recurring onesbecause they all end with or they can end with .And anyway, is the same as = or not?
The answer is "Yes, they are the same!" but here is a longer explanation if you need moreconvincing

Let's examine these two special periods, [0] and [9]:-
Aren't all fractions recurring?
  • Argument 1:
    Since 1/2=0·5 is exactly the same as 0· you could say that1/2=0·5[0]. This will also apply to every terminating decimal manicapital.com can't we say that all terminating fractions are just recurring ones with a period of [0]?Yes, we can!
    But mathematicians always ignore this special period of just zeroes and just say that "the decimal terminates" because they choose to write the number as a finitecollection of decimal digits rather than an infinite one when there is a choice.
  • Argument 2:
    Since or [9] is indistinguishable from because the series of 9's never ends, we have another way in whichall terminating decimals may be written as recurring ones - always replace the last non-zero digit, D,of a terminating decimal fraction by D-1 followed by a recurring period of 9's.
    for example 1/8 = 0· = 0·
    Again, this reasoning is correct.
    Mathematically though, we do not use a period of [9] in our decimal fractions but again choose to write itas a finite sequence of digits wherever possible (i.e. so that it terminates).
It's really a matter of taste as both arguments are correct.
Such decisions are made, choosing one as the preferred method, so that we can all convenientlytalk the same mathematical language. These choices are called conventions.
The same is true when deciding on which side of the road to drive. It is a convention in theUK that we drive on the left, but the convention in France is to drive on the right. So long as you go with the convention when driving in Britainand go with the other convention when in France, then there is no problem. But make sure you know whichconvention is being used in any other country!

Things to do

Use the interactive calculator following these questions to help you answer them:
[This calculator can give as many decimal places as you like, unlike an ordinary hand-held calculator whichoften only gives you 8 or perhaps 12 decimal places.]
  1. Convert the following fractions to decimals: 1/7, 2/7, 3/7, 4/7, 5/7, 6/7.
    What do all the 6-digit cycles of these 7th fractions have in common ?
    They all have the same six digits in their repeating part, starting at different points in the cycle:
    1/7 = 0.[]
    2/7 = 0.[]
    3/7 = 0.[]
    4/7 = 0.[]
    5/7 = 0.[]
    6/7 = 0.[]
  2. Is this true of the eigths? Try all the fractions from 1/8 to 7/8. No!
  3. Find another number, N, all of whose decimal fractions 1/N, 2/N, 2/N, are made from the same cycle of digits as we found for 1/7.
    Hint: there are two more with N < 20
    n/17 has a period of 16 digits all of which are in the same cycle as
    1/17 = 0.[]
    Similarly n/19 with the cycle being
    1/19 = 0.[]

Fraction to Decimal Calculator

C A L C U L A T O R
R E S U L T S


Converting a decimal fraction into a proper fraction

Converting a terminating decimal to a fraction

First let's look at a method of converting a decimal fraction to a proper fraction by hand. This illustrates the maths behind the manicapital.com we can explore with an online calculator to do it for us!
For example,

The process is to write the fraction as a whole number divided by 10the number of decimal places and thensimplify this fraction until it is in its lowest form.

Converting a periodic fraction to a fraction

If the decimal fraction is periodic then it never ends and we need a different approach.

A purely periodic decimal fraction

First, let's take a purely periodic fraction such as 0.[] = 0. Let's call our decimal fraction d.
First we multiply dby 10the length of the PERIOD to make the fractional part of the decimal (to the right of the decimal point)the same as the original number. For this example, we would use 103 since the period is of length 3:
103 d =
Now, if we subtract the original number form this the part to the right of the decimal point will disappear:
103 d = 37
d = 0
103d – d=37
(103 – 1) d =37
d = 37/
d=1/27
The process is to multiply the purely periodic decimal by 10length of the period, subtract the original from this and then divide to form a fraction.

A mixed periodic decimal fraction

If the decimal fraction is mixed, we use a combination of the terminating and purely periodic methods.
For example, [] = Let's call this m.
First, multiply m by 10length of the FIXED part to get a purely periodic fraction. The power to use here is 2:
m = and so:
m = 12 + 0.[]
Then use the purely periodic fraction method above on this value to find m as a fraction: Now find a proper fraction that is the value of m:
m = 12 + 1/27
m = (12×27 + 1)/27
m = ( + 1)/27
m = /27
m = /
m = 13/
The calculator in the next section does all the arithmetic using the same methods as above.

Decimal to Fraction Calculator

You can input a decimal fraction and the calculator will convert itto a proper fraction. Give the fixed part (if it has one) followed by the recurring part (if your decimal fraction is not a terminating one).
  • If your decimal fraction is a terminating fraction such as , type the digits into the part, leaving the part empty.
  • If your decimal fraction is purely recurring as in , type the digits that repeat (in this example it is just ) into the part leaving the part empty. Don't forget to type in all initial and trailing zeroes.
  • If your decimal fraction starts with a fixed part and is followed by a recurring part, as in then put into the fixed part and type into the box for the recurring part.
THEN press the button to see the conversionin the RESULTS area.

Things to do

  1. Can you find a fraction which is all 1's: 0.[1]=?
    1. Can you find a fraction which is all 2's: 0.[2]=?
      Looking at the result from the Calculator, how could you have got this without using the Calculator>
    2. Without using the calculator, what fraction is 0.[3]=?
    3. and what is 0.[4]=?
  2. Can you find a fraction which repeats your age (e.g. 0.[14]= 14 14 14 )?
    1. What fraction will it be on your next birthday?
  3. Can you find a fraction which is your birthday? e.g. for 5 January you might try 01 or 01 05 if you prefer the American system of writing dates
  4. Can you find a fraction which is ?
  5. By stopping any long fraction after a few decimal places, we can find a fraction that approximates the original one.
    For instance π is
    1. What is as a fraction?
    2. What is as a fraction?
    3. What about and if we round to 3 dps?
    In fact, 22/7 = is better than all those above so using just the first few decimal places to make a fraction is not always the best way to get a good fraction as an approximation.
    For a much better way see my page on Continued Fractions

Which decimal fractions terminate and which recur?

How to tell if a fraction is terminating as a decimal fraction

Some experimentation will help answer this question but we will also justify our answers mathematically.
Use the Fraction to Decimal calculator aboveto find all the fractions which have a denominator less than 50 and whose decimal fractions terminate.
Your list should begin with 2, 4, 5, 8, 10, 16, 20 because:
1/2 = 0·5, 1/4 = 0·25, 1/5 = 0·2, 1/8 = 0·, 1/10 = 0·1, 1/16 = 0·, 1/20 = 0·05
All these fractions stop after a limited number of digits: they terminate.

Can you spot the pattern that is common to the numbers 2, 4, 5, 8, 10, 16, 20, ?
Try looking at their prime factors.
All the numbers have 2 or 5 or both as their prime factors and no other prime factors.
They are the numbers 2a×5b for whole numbers a, b ≥ 0.

See if you can find some more numbers, N, whose unit fractions, 1/N terminate and then check your list withA

How to find the length of a terminating decimal fraction

If the proper fraction n/d is in its lowest terms thenit terminates if and only if d is divisible by 2or by 5 or by both and is not divisible by any other prime number.
This is because in the process of dividing dinto n by long division, some power of 10 will then be an exact multiple of the denominator and so will leave no remainder andour process of long-division will stop.
We can write this as d = 2α × 5βwhere α and β are whole numbers but may be 0.
The decimal fraction for n/d has LCM(α, β) decimal placeswhere the LCM(α, β) function means the lowest common multiple of both α and β; the smallest number that isa multiple of both α and β.

The list of denominators with terminating decimals begins:

2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50, A

How to tell if a fraction is purely recurring as a decimal fraction

The rule for a fraction which is purely recurring, that is, its period starts immediately after the decimalpoint, is just the opposite of the rule for detecting a terminating fraction above:
The fraction n/d, in its lowest terms, is purely recurring if and only if neither 2 nor 5 are factors of d
n1/nPeriod
length
n is
Prime?
31Prime
76Prime
91not Prime
112Prime
136Prime
1716Prime
1918Prime
216not Prime
2322Prime
273not Prime
2928Prime
The first column is 3, 7, 9, 11, 13, 17, Awhich can be described in several equivalent ways as:
  • the numbers coprime to 10
  • the numbers with no prime factor in common with 10
  • the numbers n for which GCD(10,n) = 1
  • the numbers which are not divisible by either 2 or by 5
The third column is the lengths of all the purely periodic decimal fractions:1, 6, 1, 2, 6, 16, 18, 6, AThere is no explicit formula for this series but we can describe it with more detail as we see in the next secion.

Did you notice that all the primes numbers are in this list, except of course 2and 5?
Also, the length of the period of 1/n when n is sucha prime is sometimes n–1 and sometimes not! Can you spot any patterns in theperiod length for a prime n?

The length of the period of a purely periodic decimal fraction

When we divide n into 1 and we eventually reach a remainder of 1 again, then the decimalfraction will repeat. At this point, for example, we have the following if we are using long division tofind the decimal fraction for 1/
. 0 4 7 6 1 9 21 ) 1 . 0 0 0 0 0 0 8 4 1 6 0 1 4 7 1 3 0 1 2 6 4 0 2 1 1 9 0 1 8 9 1
The division of course is equally correct if we ignored the decimal point so that we would be calculating just with whole manicapital.com that case, we have found that 1 followed by six zeroes, 106, when divided by 21, leaves a remainder of 1. That is:
106 = × 21 + 1 or:
106 - 1 is divisible by 21
The length of the recurring part of a purely periodic decimal fraction
is the smallest power of 10 that leaves a remainder of 1 when divided by the denominator.
The decimal form of a fraction is purely recurring if and only if the denominator does not have either 2 or 5 as a factor.
In the same way that we write n / d to mean n divided by d we can also write n mod d to mean just the whole number remainder when we divide the integer n by the integer d.
13 / 5 = = 23/5
13 mod 5 = 3
mod is used only between whole numbers so the possible remainders "mod n" are 0, 1, 2, 3, , n-1 but also sometimes it is useful to use negative remainders -n+1, -n+2, -1, 0 or some other set on n-1 integers.
Another definition of a mod b = r is b divides into (is a factor of) a – r.
mod looks like the other arithmetic operations such as +, –, ×, / in that it goes between the two numbers it "operates" on.

You will often see an alternative notation in maths books, where two numbers a and b are congruent or equivalent (≡) if, when divided by a given number, the modulus n , they have the same remainder:
a ≡ b (mod n):

This is a little more general than the mod operator notation whose result is the remainder whereas this notation means that the two numbers have the same remainder when divided by the modulus, the number in the brackets.
13 mod 5 = 2 or 13 ≡ 2 (mod 5)
27 mod 5 = 2 or 27 ≡ 2 (mod 5)
⇒ 13 ≡ 27 (mod 5)
The equivalence is also called a congruence and the "mathematics of remainders" is called the Theory of Congruences or Modular Arithmetic. For instance, we can add and subtract congruences and multiply them too:
If a ≡ A (mod n) and b ≡ B (mod n) then:
a + k ≡ A + k (mod n);
a + b ≡ A + B (mod n);
a – b ≡ A – B (mod n);
a × b ≡ A × B (mod n);
k a ≡ k b (mod n)
but we must be careful about division since although
6 ≡ 12 (mod 6) but, dividing by 2:
3 ≡ 6 (mod 6) is wrong!

In terms of lengths of recurring parts of decimal fractions:
"The order of 10 mod 7" gives the length of the recurring part of decimal (base 10) fractions with denominator 7. This means the smallest power of 10 which, when divided by 7, leaves a remainder of 1.
101 ÷ 7 = 1× 7 + 3 so has remainder 3: 101 ≡ 3 (mod 7)
102 ÷ 7 = 14×7 + 2 so has remainder 2: 102 ≡ 2 (mod 7)
103 ≡ 6 (mod 7)
104 ≡ 4 (mod 7)
105 ≡ 5 (mod 7)
106 ≡ 1 (mod 7)
So fractions with denominator 7 are periodic with 6 digits in the period.
Note:

  • this is only if the fractions is reduced since 14/7 = 2 and has no recurring part!
  • it only applies to certain fractions since 3/8 = and has no recurring (periodic) part.

Modular arithmetic has many important applications in modern Number Theory. The great mathematician Carl Friedrich Gauss ( - ) was the first to fully develop this topic and show its power in his book Disquisitiones Arithmeticae written in Latin. See the References at the foot of this page for the English translation in paperback.

Here we have found that

and that 6 is the smallest power of 10 that leaves a remainder of 1 when divided by

The same is true for all fractions 1/n which have purely periodicdecimal fractions.
Often in textbooks you will see the Greek letter λ (lambda) used for this length:

If λ is the smallest power of 10 that leaves a remainder of 1when divided by n, then there are λ digits in the period of 1/n:
λ is the smallest number for which 10λmod n = 1
The list of denominators of purely periodic fractions begins:
3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, A

Mixed Recurring Fractions

All fractions as a decimal will either terminate or recurr. Some recurr from the first decimal place and are thepurely recurring decimal fractions of the previous section. Others have a few decimal digits at the start and then they recurr. These are the mixed recurring decimal fractions that we look at in this section.
For the fraction n/d, in its lowest terms, to terminate have seen thatthe prime factors of dmust also be prime factors of 10, namely 2 or 5 or both.
Examples are: 2, 8 = 2×2×2, 40 = 2×2×2×5, = 2×2×5×5

For it to be purely recurring, none of the prime factors of dmust be a prime factor of
Examples are: 3, 7, 9 = 3×3, 11 and all the other prime numbers bigger than 5.

So that leaves the mixed recurring decimal fractions which have at least one prime factor incommon with those of 10and at least one not in common withthose of 10
Examples are 6 = 2×3, 15 = 5×3, 30 = 2×5×3
These denominators are of the form

d = 2α1 5α2 p1β1 p2β2
where the pi are prime numbers other than 2 and 5and α1 or α2 can be 0 (which effectively excludes that prime as a factor).

How long are the fixed and recurring parts of a mixed recurring fraction?

Using the above description of the denominator d, we separate its factorization into two parts, so that
d = D × E
where D includes only the prime factors 2 and/or 5
or else is 1 and
E is the rest of the factorization for the other prime factors
or else is 1.
D = 2α1 5α2 and the other primes and their powers are all included in E = d / D

The size of the fixed and recurring parts are determined solely by D.1/Dwill be therefore be a terminating decimal fraction and the number of decimal places it has is the size of the initial fixed part ofreduced fractions with d as the denominator.
The size of the recurring part is determined by the rest of the factorization of the denominator, E.
1/E will be purely recurring and the length of its period is the same as the length of the recurring partof 1/d.

Let's look at some examples:

  • 1/12
    12 = 22 × 3 so D = 22, E = 3
    The fixed part is determined by D = 22 = 4 and 1/4 = has 2 decimal digits.
    The recurring part is determined by E=12/4=3 and 1/3 = 0.[3] has a recurring period of length 1. We see that 1/12 = [3] and does indeed have a fixed part of 2 digits and a recurring part of 1 digit.
  • 1/38
    38 = 2 × 19 so D = 2, E = 19
    The fixed part is the same length as 1/D = 1/2 = , 1 digit.
    The recurring part is the same length as 1/E = 1/19 = 0.[], 18 digits.
    Check: 1/38 = [] does have a fixed part of 1 digit and a recurring part of 18 digits.
  • 1/
    = 2 × 53 × 7 × 11 so D = 2 × 53, E = 7 × 11
    The fixed part is given by D = 2 × 53 = and 1/ = has 3 decimal digits.
    The recurring part is determined by the rest of the factorisation: E = 7 × 11 = 77 and 1/77 = 0.[] has a recurring period of length 6.
    We find that 1/ = [] and does indeed have a fixed part of 3 digits and a recurring part of 6 digits.
Below there is a calculator which will find denominators or reduced fractions for given lengths of fixed and/or recurring parts.

The denominators of fractions with purely recurring decimals are:

3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31 A
The denominators that have decimals that eventually recur, either as purely recurring decimals or else as mixed recurring decimals arethose which do not have a terminating decimal expansion:
3, 6, 7, 9, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 24, 26, 27, A

Fractions with the same denominator

We have mainly looked at 1/n up to nowand how many decimal places it has and if it is periodic or manicapital.com can we say about k/n?
Some examples are:
nn/5Decimal
11/5
22/5
33/5
44/5
nn/6Decimal
11/6[6]
21/30.[3]
31/2
42/30.[6]
55/6[3]
nn/8Decimal
11/8
21/4
33/8
41/2
55/8
63/4
77/8
nn/12Decimal
11/12[3]
21/6[6]
31/4
41/30.[3]
55/12[6]
61/2
nn/12Decimal
77/12[3]
82/30.[6]
93/4
105/6[3]
1111/12[6]
It looks as if the numerator does not matter but that it is only the denominator of the fraction in its lowest termsthat matters - and indeed this proves correct!
The character of the decimal fraction -whether it terminates or not and the lengths of the fixed and recurring parts - is solely determined by thedenominator provided the fraction is in its lowest terms.

The rules for decimal (base 10) fraction for 1/d in its lowest form

The decimalfraction terminates if and only if
the only prime factors ofd are 2 or 5 or both.
The decimal fraction is purely periodic (its period begins immediately after the decimal point)if and only if
neither 2 nor 5 are factors of d.
The decimal fraction has an initial number of non-repeating decimal places and then is periodic if and only if
d has both a prime factor which is a prime factor of 10and a prime factor which is not a prime factor of 10

Here are the mathematical details (optional) to show why the numerator does not matter:


For n/d we look at If n/d terminates, then eventually 10k n will be divisible by d.
This only happens if the prime factors of d are also prime factors of
If n/dis in its lowest terms then, since d has no factor in common with n, d will divide only into a power of 10, no matter what the value of n is.

If n/d eventually becomes periodic, then we find a remainder when dividing by n by d is equal to one found earlier. This is because in this case we do not find an exact division and the remainders can only be 1, 2, 3, , d-1 and therefore after at most d decimal places, we must find a remainder being repeated.
Suppose the remainder first repeated is 10sn and is again found at 10s+tn.
We can write
10sn ≡ 10s+tn (mod d)
But since n and the modulus d have no factor in common (the fraction n/d is in its lowest terms), then we can divide this equivalence by n:
10s ≡ 10s+t (mod d)
The start of the period - after s initial decimal places - and the length of the period - t decimal places - are therefore independent of n.

For example: 13/:

.1 2 0 3 7 0 8 ) 1 0 0 0 0 1 0 8 2 2 0 2 1 64 0 0 4 0 0 3 2 4 7 6 0 7 5 64
So we see that ÷ has the same remainder 4 as ÷ . Checking this:
= 12× + 4 : check!
= × + 4 : check!
Using congruences, we can write this as:
13 102 ≡ 13 105 (mod ) and, since GCD(,13)=1,
102 ≡ 105 (mod ) :checking:
    = 0× +
= × + : check!
For example:
13/ has an initial fixed part of 2 decimal places and a periodic repeating part of 3 dps and so will all decimal fractions for n/provided that n has no factor in common with :
n/lowest
terms
Decimal
1/1/[]
2/1/54[]
3/1/36[7]
4/1/270.[]
5/5/[]
6/1/18[5]
7/7/[]
8/2/270.[]
9/1/12[3]
10/5/54[]
n/lowest
terms
Decimal
11/11/[]
12/1/90.[1]
13/13/[]
14/7/54[]
15/5/36[8]
16/4/270.[]
17/17/[]
18/1/6[6]
19/19/[]
20/5/270.[]
n/lowest
terms
Decimal
21/7/36[4]
22/11/54[]
23/23/[]
24/2/90.[2]
25/25/[]
26/13/54[]
27/1/4
28/7/270.[]
29/29/[]
30/5/18[7]

Same denominator Decimal Fraction Calculator

This calculator finds all those fractions with the same denominator and counts them, displays all the numeratorsor shows the all the decimal places or the period. The denominator can be a number up to 16 digits long and theCount is displayed but you will need to confirm you want to see all the numerators or decimals if there are more than 50numerators.

The number of fractions with the same denominator and Euler's Totient function φ(n)

The Calculator above computes the number of fractions with the same denominator by using a relatively simple formulawhich is why it is so fast. The number of fractions with the same denominator dis an important function in mathematics andin Number Theory in particular. Eulerused it in his research and called it φ(d), the (Euler) Totient function. It has nothing to do with the goldenmean number φ as that is a completely different use for the Greek letter phi!
Euler's phi function φ(d) is
the number of fractions 0 < n/d < 1 which in their lowest form haved as their denominator.
Here is a table of the number of proper (reduced) fractions with a given denominator dor φ(d):
d234567891011121314151617181920
φ(d)12242646410412688166188
After φ(2)=1, all the values are even.
This is the series A, the totient numbers and it plays an important part in many results in Number Theory.
Another mathematical description of φ(d) is
Euler's phi function φ(d) is
the number of integers between 0 and d that have no factor in common with d
φ(d) = # { 0<n<d | GCD(n,d)=1 }
Sometimes it is called Euler's totient function but always written as φ(d).

Euler found some very important properties of φ(d) that lead to a quick and efficient method of computing φ(d) for large d:

φ(d) = d – 1 when d is prime.
If d is prime then all numbers lower than it, from 1 to d – 1, have no factors in common with it.
φ(d) is multiplicative.
e.g. φ(3)=2, φ(5)=4 ⇒ φ(15)=8
If we take 2 primes such as 3 which by the result above has 2 numbers with no factor in common with it, and similarly, if there are 4 numbers with no factor in common with 5 then there will be 2×4 numbers with no factor in common with 3×5:
because the multiples of 3 will not overlap with the multiples of 5 for numerators less than 3×5=
This generalizes to any pair of numbers with no common factor:
If gcd(a,b)=1 then φ(a b) = φ(a) φ(b)
φ(pα) = pα – pα–1 = pα–1(p – 1) = pα–1 φ(p) if p is prime.
When the denominator is a power of a prime then the only numerators that will have a factor in common with it are just the multiples of the prime: p, 2p, 3p, .., p2, pα-p, pα and there are pα–1 of these. Hence
φ(pα) = pα – pα–1
φ(nα) = nα–1 φ(n) for all n
This follows because φ(n) is multiplicative and from the previous property.
φ(p1α1 p2α2 pkαk) = φ(p1α1) φ(p2α2) φ(pkαk) for primes pi
This looks daunting but it merely means that we split a number into its separate prime factors pi with their powers αi and find the φ count for each of these piαi, using the previous property, then, since all the primes have no factors in common, we can multiply them all using the multiplicative property!

Nontotient Numbers

All values of φ(n) are even for n>2. But not alleven numbers are the result of φ(n) for some n.
In other words when we list the counts of proper fractions with a given denominator, there are some counts thatnever appear in the list and these are the nontotient numbers.For instance,
we can find n for φ(n) = 12, sinceφ(13) = 12 and there are 12 proper fractions less than 1 with a denominator of
Similarly, φ(n) = 16 sinceφ(17) = 16 and there are 16 proper fractions less than 1 with a denominator of
But there is no solution to φ(n) = there is no denominator that has exactly14 reduced fractions!
14 is the smallest nontotient number.
The list begins:
14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94, 98, A

Fractions with the same lengths of period, fixed part or terminating part

We have seen how to compute the length of the terminating part of of the fixed and periodic parts of a given fraction. Now let's ask the question in reverse:
Given the length of terminating part or the lengths of fixed and periodic parts, how do we find such fractions?

Terminating Decimals of a given length

A terminating decimal fraction n/d must have d = 2α × 5β ( α and β may be 0) and the length of its (terminating) decimal is LCM(α, β) which we saw above.
So, given a length t of a terminating decimal fraction we need to find α and β with LCM(α, β) = t. This means that both α and β are among the factors of t or else one of them is 0 and the other is t.
For example, if t = 2, we have
α2αβ5βd = 2α×5β1/dφ(d)
012252520
122255020
240142
2415208
2422540
Total φ=90
As a check, there are 99 decimals with just 2 decimal places, from to , so the number of fractions in their lowest terms with the above denominators must sum to 99, you might think but this is wrong! Why? Because is not a terminating fraction of 2 digits but just 1.
We must exclude those 2-digit numbers that end in 0, leaving just 90 terminating fractions of 2 digits (decimal places).

Purely periodic decimals of a given length

A common notation used for the length of the period of the decimal for 1/dis the Greek lowercase letter for &#; for length, which is lambdaλ.
λ will be the smallest power of 10 that has a remainder of 1 when divided by manicapital.com we are given a value for λ we want to find the d for which10λ = 1 (mod d) which means that d will be a factor of 10λ - 1.
Here are the factors of 10λ - 1 for various values of λ = length of period:
λ10λ–1prime
factorisation
factors>1
found ealier
new factors>1
1932 3, 9
29932×113, 911, 33, 99
333×373, 927, 37, , ,
432×11×3, 9, 11, 33, 99, , ,
, ,
532×41×273, 941, , , , , ,
, ,
633×7×11×13×373, 9, 11, 27, 33, 37, 99,
, ,
7, 13, 21, 39, 63, 77, 91, ,
, , , , , ,
, , , , , ,
, , , , ,
, , , ,
, , , ,
, , , ,
, , ,
732××3, 9, , , , , ,
, ,
Some interesting facts arise from this table:
  • If we find one of the factors d in row λ but not in any earlier row, then 1/d is purely periodic with a period of length λ.
  • Any other fraction n/d with GCD(n,d)=1 will also have a period of the same length.
  • The number of divisors of 10n–1 varies considerably (A and this table includes the factor 1):
    n1234567891011121314151617181920
    #divisors36812126412482048122448126
  • For instance,
    1023–1 has only 6 factors but
    1024–1 has
    1030–1 has
    Here are three consecutive values of the power with wildly differing numbers of factors:
    1059–1 has 12 factors but
    1060–1 has and
    1061–1 has
  • This is because if m is a factor of n then 10m–1 is a factor of 10n–1.
    So numbers n that have many factors will give rise to many factors for 10n–1
  • All numbers 10n–1 for n>1 have at least these 6 factors: 1, 3, 9, (10n–1)/9 = , (10n–1)/3 = , (10n–1)/9 =
  • These 6 factors are the only divisors for 102–1, 1019–1 and 1023–1.
  • So, for n = 2, 19 and 23 the larger 3 factors will be their only denominators for purely recurring fractions with those period lengths.

Decimals of given fixed part length and period length

Let's call the fixed part length t and the period length &#and either may be 0.
Combining the results of the above two sections, we find all numbers Twith terminating decimal of length t and all numbers Rwhich are purely recurring with a period of length λ, as described above.
The mixed fraction denominators which have both fixed part length tand a period of length λ are those numbers made from a product of one of the T with one of the R.
From the sections above we see that
  • the denominators of fractions whose decimal is only a fixed-part of F decimals are factors of 10F
  • the denominators of fractions whose decimal is only a period of P decimals are factors of 10P−1
  • the denominators of fractions whose decimal has both a fixed part and periodic part are a product of the denominators with just the fixed part and just the periodic part

Similar sized Decimals Calculator

The fixed length and period length cannot be larger than 15 with this calculator. Leave the 'up to'value empty to include all valid integers with up to 16 digits.
This Calculator finds the number of distinct denominators that can occur for decimal numbers with a given number of fixed-part decimal places and a given numberof periodic-part decimal places.
For example, there are 9 distinct decimals of the form 0.d with 1 fixed decimal digit d>0 and no periodic decimals as follows:
= 1/10, = 1/5, = 3/10, = 2/5, = 1/2, = 3/5, = 7/10, = 4/5, = 9/10
but there are only 3 possible denominators for these fractions: 2, 5 and

Plots of Period lengths

Here are plots of the lengths of the periods of the purely periodic fractions 1/N for different ranges of N:

Decimal fractions that look like special sequences

Now we look at some special kinds of decimal fractions, ones that contain a whole special series in their decimals!It is amazing to find that some fractions have a decimal expansion with a special patternsuch as the powers of 2 as in which is the first few decimal places of 1/98!Can you guess which simple fraction begins with the powers of 3: 03 09 27 ?
How about ?

However after a few more decimal places the series often get "muddled" and the pattern seems to disappear.
Why? Are all series of numbers codeable as a fraction in this way? How can we find a fraction for a series?
This section unravels some of the simple maths behind this mystery.

Powers of a number

If we look more closely at some simple fractions near 1/we see their decimal fractions are special:
1/99 = 0. 01 01 01 01 01 01 01 01 01 1
1/98 = 0. 01 02 04 08 16 32 65 30 61 2
1/97 = 0. 01 03 09 27 83 50 51 54 63 9
But 1/98 looks like 01 02 04 08 16 32 the powers of two and 98 = - 2.
and 1/97 looks like 01 03 09 27 8(1) the powers of three and 97 = - 3.
In fact, even 1/99 fits this pattern because 99 = - 1 and it would then be the powers of 1, that is 01 01 01 01 01 which it is!
But soon the pattern of powers disappears. Why?
Because it is really there, just masked as the powers get larger

Shift-and-add applied to the a series makes the fraction!

We take the powers of 2 but moving each power exactly 2 places to the right each time and then we add them:
0.01+
02+
04+
08+
16+
32+
64+
128+
256+
512+
1024+
...
0.010204081632653061......
and we see this is indeed the start of 1/98 as a decimal.

Did you notice that

  • the powers of 2 taken two digits at a time are in the fraction 1/(102 - 2) = 1/98
  • the powers of 3 taken two digits at a time are in the fraction 1/(102 - 3) = 1/97
Any guesses as to a fraction whose decimals are the powers of 2 using three digits for each?

Things to do

  1. Check this out with 1/97 = 1/( - 3) and the powers of 3.
    Make a table, moving the unit digit two places to the right each time and adding. Check you have enough powers to verify the first 20 decimal places as we did for the powers of two above.
    30=0.01 +              
    31=   03 +            
    32=     09 +          
    33=       27 +        
    34=         81 +      
    35=          243 +    
    36=            729 +  
    37=             2187 +
    3               
    TOTAL:                  
  2. To about 20 or 30 decimal places, what are 1/ and 1/?

So we observe (or guess!) that

the powers of p taken d digits at a time appearin the decimal fraction for 1/(10d–p)
Источник: [manicapital.com]
Far HTML 3.3.1 serial key or number

1. Introduction


Editors

The OAI Executive:
Carl Lagoze <lagoze@manicapital.com > -- Cornell University - Computer Science
Herbert Van de Sompel <herbertv@manicapital.com > -- Los Alamos National Laboratory - Research Library

From the OAI Technical Committee:
Michael Nelson <manicapital.com@manicapital.com > -- NASA - Langley Research Center
Simeon Warner <simeon@manicapital.com > -- Cornell University - Computer Science

Table of Contents

1. Introduction
2. Definitions and Concepts
    Harvester
    Repository
    Item
    Unique Identifier
    Record
       Deleted records
    Set
    Selective Harvesting
       Selective Harvesting and Datestamps
       Selective Harvesting and Sets
3. Protocol Features
    HTTP Embedding of OAI-PMH requests
       HTTP Request Format
       HTTP Response Format
       Response Compression
    XML Response Format
       XML Schema for Validating Responses to OAI-PMH Requests
    UTCdatetime
       UTCdatetime in Protocol Requests
       UTCdatetime in Protocol Responses
    metadataPrefix and Metadata Schema
    Flow Control
       Idempotency of resumptionTokens
    Error and Exception Conditions
4. Protocol Requests and Responses
    GetRecord
    Identify
    ListIdentifiers
    ListMetadataFormats
    ListRecords
    ListSets
5. Dublin Core
6. Implementation Guidelines
Acknowledgements
Document History

The Open Archives Initiative Protocol for Metadata Harvesting (referred to as the OAI-PMH in the remainder of this document) provides an application-independent interoperability framework based on metadata harvesting. There are two classes of participants in the OAI-PMH framework:

  • Data Providers administer systems that support the OAI-PMH as a means of exposing metadata; and
  • Service Providers use metadata harvested via the OAI-PMH as a basis for building value-added services.

In this document the key words "must", "must not", " required", "shall", "shall not", "should", " should not", "recommended", "may", and "optional " in bold face are to be interpreted as described in RFC . An implementation is not conformant if it fails to satisfy one or more of the "must" or "required" level requirements for the protocols it implements.

This document refers in several places to "community-specific" practices to which individual protocol implementations may conform. These practices are described in an accompanying Implementation Guidelines document.

Harvester

A harvester is a client application that issues OAI-PMH requests. A harvester is operated by a service provider as a means of collecting metadata from repositories.

Repository

A repository is a network accessible server that can process the 6 OAI-PMH requests in the manner described in this document. A repository is managed by a data provider to expose metadata to harvesters. To allow various repository configurations, the OAI-PMH distinguishes between three distinct entities related to the metadata made accessible by the OAI-PMH.

  • resource - A resource is the object or "stuff" that metadata is "about". The nature of a resource, whether it is physical or digital, or whether it is stored in the repository or is a constituent of another database, is outside the scope of the OAI-PMH.
  • item - An item is a constituent of a repository from which metadata about a resource can be disseminated. That metadata may be disseminated on-the-fly from the associated resource, cross-walked from some canonical form, actually stored in the repository, etc.
  • record - A record is metadata in a specific metadata format. A record is returned as an XML-encoded byte stream in response to a protocol request to disseminate a specific metadata format from a constituent item.

Item

An item is a constituent of a repository from which metadata about a resource can be disseminated. An item is conceptually a container that stores or dynamically generates metadata about a single resource in multiple formats, each of which can be harvested as records via the OAI-PMH. Each item has an identifier that is unique within the scope of the repository of which it is a constituent.

Unique Identifier

A unique identifier unambiguously identifies an item within a repository; the unique identifier is used in OAI-PMH requests for extracting metadata from the item. Items may contain metadata in multiple formats. The unique identifier maps to the item, and all possible records available from a single item share the same unique identifier.

The format of the unique identifier must correspond to that of the URI (Uniform Resource Identifier) syntax. Individual communities may develop community-specific URI schemes for coordinated use across repositories. The scheme component of the unique identifiers must not correspond to that of a recognized URI scheme unless the identifiers conform to that scheme. Repositories may implement the syntax described in the accompanying Implementation Guidelines document.

Unique identifiers play two roles in the protocol:

  1. Response: Identifiers are returned by both the and requests.
  2. Request: An identifier, in combination with a , is used in the request as a means of requesting a record in a specific metadata format from an item.

Note that the identifier described here is not that of a resource. The nature of a resource identifier is outside the scope of the OAI-PMH. To facilitate access to the resource associated with harvested metadata, repositories should use an element in metadata records to establish a linkage between the record (and the identifier of its item) and the identifier (URL, URN, DOI, etc.) of the associated resource. The mandatory Dublin Core format provides the element that should be used for this purpose.

Record

A record is metadata expressed in a single format. A record is returned in an XML-encoded byte stream in response to an OAI-PMH request for metadata from an item. A record is identified unambiguously by the combination of the unique identifier of the item from which the record is available, the identifying the metadata format of the record, and the datestamp of the record. The XML-encoding of records is organized into the following parts:

  • header -- contains the unique identifier of the item and properties necessary for selective harvesting. The header consists of the following parts:
    • the unique identifier -- the unique identifier of an item in a repository;
    • the datestamp -- the date of creation, modification or deletion of the record for the purpose of selective harvesting.
    • zero or more setSpec elements -- the set membership of the item for the purpose of selective harvesting.
    • an optional attribute with a value of indicates the withdrawal of availability of the specified metadata format for the item, dependent on the repository support for deletions.
  • metadata -- a single manifestation of the metadata from an item. The OAI-PMH supports items with multiple manifestations (formats) of metadata. At a minimum, repositories must be able to return records with metadata expressed in the Dublin Core format, without any qualification. Optionally, a repository may also disseminate other formats of metadata. The specific metadata format of the record to be disseminated is specified by means of an argument -- the -- in the or request that produces the record. The request returns the list of all metadata formats available from a repository, or for a specific item (which can be specified as an argument to the request).
  • about -- an optional and repeatable container to hold data about the metadata part of the record. The contents of an about container must conform to an XML Schema. Individual implementation communities may create XML Schema that define specific uses for the contents of about containers. Two common uses of about containers are:
    • rights statements: some repositories may find it desirable to attach terms of use to the metadata they make available through the OAI-PMH. No specific set of XML tags for rights expression is defined by OAI-PMH, but the about container is provided to allow for encapsulating community-defined rights tags.
    • provenance statements: One suggested use of the about container is to indicate the provenance of a metadata record, e.g. whether it has been harvested itself and if so from which repository, and when. An XML Schema for such a provenance container, as well as some supporting information is available from the accompanying Implementation Guidelines document.

The following example shows an XML-encoding of a record and its components:

  • the header part with:
    • a unique identifier of the item from which the record was disseminated, equal to oai:manicapital.com:cs/;
    • the datestamp of the record equal to ;
    • two setSpecs, respectively and , indicating that the item from which the record was disseminated belongs to two sets of the repository;
  • the metadata part. This consists of a single root tag - in the example the tag - with the nested tags belonging to the corresponding metadata format - in the example, Dublin Core elements such as . Note that the root tag within the metadata part includes a number of attributes that are common to all XML documents that use namespaces and schema validity:
    • namespace declarations -- the declarations of the namespaces used within the metadata part, each of which is prefixed with . Namespace declarations within the metadata part fall into two categories:
      • metadata format specific namespace(s) - every metadata part must include one or more prefixed attributes that define the correspondence between a metadata format prefix -- e.g. -- and the namespace URI (as defined by the XML namespace specification ) of the respective metadata format. Some metadata formats employ tags from multiple namespaces, requiring multiple prefixed attributes -- in the example, there are declarations for both and .
      • xml schema namespace - every metadata part must include the attribute , the value of which must always be the URI shown in the example, which is the namespace URI for XML schema.
    • -- the value of which is a URI, URL pair; the first is the namespace URI (as defined by the XML namespace specification) of the metadata that follows in this part, and the second is the URL of the XML schema for validation of the metadata that follows.
  • one about part of the record which uses the _ schema, described in the accompanying Implementation Guidelines document, as a means to provide information regarding the origins of the metadata part of the record. Note that the root element within each about part has the same structure as the root element in the metadata part.
<header> <identifier>oai:arXiv:cs/</identifier> <datestamp></datestamp> <setSpec>cs</setSpec> <setSpec>math</setSpec> </header> <metadata> <oai_dc:dc xmlns:oai_dc="manicapital.com" xmlns:dc="manicapital.com" xmlns:xsi="manicapital.com" xsi:schemaLocation="manicapital.com manicapital.com"> <dc:title>Using Structural Metadata to Localize Experience of Digital Content</dc:title> <dc:creator>Dushay, Naomi</dc:creator> <dc:subject>Digital Libraries</dc:subject> <dc:description>With the increasing technical sophistication of both information consumers and providers, there is increasing demand for more meaningful experiences of digital information. We present a framework that separates digital object experience, or rendering, from digital object storage and manipulation, so the rendering can be tailored to particular communities of users. </dc:description> <dc:description>Comment: 23 pages including 2 appendices, 8 figures</dc:description> <dc:date></dc:date> <dc:type>e-print</dc:type> <dc:identifier>manicapital.com</dc:identifier> </oai_dc:dc> </metadata> <about> <provenance xmlns="manicapital.com" xmlns:xsi="manicapital.com" xsi:schemaLocation="manicapital.com manicapital.com"> <originDescription harvestDate="TZ" altered="true"> <baseURL>manicapital.com</baseURL> <identifier>oai:r2:klik</identifier> <datestamp></datestamp> <metadataNamespace>manicapital.com</metadataNamespace> </originDescription> </provenance> </about>

Deleted records

If a record is no longer available then it is said to be deleted. Repositories must declare one of three levels of support for deleted records in the element of the Identify response:

  • - the repository does not maintain information about deletions. A repository that indicates this level of support must not reveal a deleted status in any response.
  • - the repository maintains information about deletions with no time limit. A repository that indicates this level of support must persistently keep track of the full history of deletions and consistently reveal the status of a deleted record over time.
  • - the repository does not guarantee that a list of deletions is maintained persistently or consistently. A repository that indicates this level of support may reveal a deleted status for records.

If a repository does not keep track of deletions then such records will simply vanish from responses and there will be no way for a harvester to discover deletions through continued incremental harvesting. If a repository does keep track of deletions then the datestamp of the deleted record must be the date and time that it was deleted. Responses to request for a deleted record must then include a with the attribute , and must not include or parts. Similarly, responses to selective harvesting requests with set membership and date range criteria that include deleted records must include the headers of these records. Incremental harvesting will thus discover deletions from repositories that keep track of them.

Deleted status is a property of individual records. Like a normal record, a deleted record is identified by a unique identifier, a metadataPrefix and a datestamp. Other records, with different metadataPrefix but the same unique identifier, may remain available for the item.

Set

A set is an optional construct for grouping items for the purpose of selective harvesting. Repositories may organize items into sets. Set organization may be flat, i.e. a simple list, or hierarchical. Multiple hierarchies with distinct, independent top-level nodes are allowed. Hierarchical organization of sets is expressed in the syntax of the parameter as described below. When a repository defines a set organization it must include set membership information in the headers of items returned in response to the , and requests.

Each node in a set organization of a repository has:

  • a -- a colon [] separated list indicating the path from the root of the set hierarchy to the respective node. Each element in the list is a string consisting of any valid URI unreserved characters, which must not contain any colons []. Since a forms a unique identifier for the set within the repository, it must be unique for each set. Flat set organizations have only sets with that do not contain any colons [].
  • a -- a short human-readable string naming the set.
  • a -- an optional and repeatable container that may hold community-specific XML-encoded data about the set; the accompanying Implementation Guidelines document provides suggestions regarding the usage of this container.

The following is an example of a possible set hierarchy in a repository:

  • Institutions
    • Oceanside University of Nebraska
    • Valley View University of Florida
  • Subjects
    • Existential Kenesiology
    • Quantum Psychology

The following table shows a possible representation of the above set hierarchy by means of and respective values.

Institutions

Oceanside University of Nebraska

Valley View University of Florida

Subjects

Existential Kenesiology

Quantum Psychology

An item may be organized in one set, several sets, or no sets at all. In the example above, it is conceivable that an individual item is organized in both and . A harvester should not assume that harvesting every set in a repository will retrieve metadata from all items in the repository. Items may also be assigned to interior nodes in the set hierarchy.

The actual meaning of a set or of the arrangement of sets in a repository is not defined in the protocol. It is expected that individual communities may formulate well-defined set configurations with perhaps a controlled vocabulary for and , and may even develop mechanisms for exposing these to harvesters. For example, a group of cooperating e-print archives in a specific discipline may agree on sets that arrange metadata in their repositories based on a controlled subject classification.

A repository's set hierarchy is represented in the protocol via . returns a list indicating the configuration of sets in a repository. Each member of this list must include a and a and may include a . and requests may include an optional argument, the value of which is a , to specify the target set for selective harvesting. In the previous example of a set hierarchy, the could be used in a request to return only those records that are disseminated from items organized in the set represented by this . Five issues should be noted here:

  • If a repository supports sets then it must include set membership information in response to , and requests. The list of elements should include only the minimum number of elements required to specify the set membership. Using the previous example of a set hierarchy, the header for an item organized in set should not include since that is implied by the .
  • An item may be organized in more than one set; meaning that different arguments may return the same record(s).
  • An item need not be organized in any set; meaning that an exhaustive repetition of requests with all possible is not guaranteed to return all records in the repository. The only guaranteed methods of harvesting all records or headers are or requests with no argument.
  • When a is used as an argument, the response must include records or headers from all items in the set specified by the , and all records or headers from items in sets that are descendant from the specified set. Using the previous example of a set hierarchy, a of to the request will return all records from metadata organized within the set with a value equal to and within the descendent sets with setSpec values equal to and .
  • The set hierarchy of a repository may include sets that are empty.

Selective Harvesting

Selective harvesting allows harvesters to limit harvest requests to portions of the metadata available from a repository. The OAI-PMH supports selective harvesting with two types of harvesting criteria that may be combined in an OAI-PMH request: datestamps and set membership.

Selective Harvesting and Datestamps

Harvesters may use datestamps to harvest only those records that were created, deleted, or modified within a specified date range. To specify datestamp-based selective harvesting, datestamps are included as values of the optional arguments, and , in the and requests. Harvesting is restricted to the range specified by the and arguments, extending back to the earliest datestamp if is omitted, and forward to the most recent datestamp if is omitted. Range limits are inclusive: specifies a bound that must be interpreted as "greater than or equal to", specifies a bound that must be interpreted as "less than or equal to". Therefore, the argument must be less than or equal to the argument. Otherwise, a repository must issue a error.

Repositories must support selective harvesting with the and arguments expressed at day granularity. Optional support for seconds granularity is indicated in the response to the request. The value of datestamps in both requests and responses must comply to the specifications for UTCdatetime in this document. A repository must update the datestamp of a record if a change occurs, the result of which would be a change to the metadata part of the XML-encoding of the record. Such changes include, but are not limited to, changes to the metadata of the record, changes to the metadata format of the record, introduction of a new metadata format, termination of support for a metadata format, etc.

Datestamp ranges for selective harvesting are expressed in the and arguments that may be submitted in the and requests. Repositories must use the following rules to create a response matching the specified datestamp range according to the type of change that occurred within the repository. The response to a request follows the same rules but is abbreviated to include only headers rather than records.

  • modification - the response must include records, corresponding to the argument, which have changed within the bounds of the and arguments.
  • creation - the response must include records, corresponding to the argument, that have become available from the repository within the bounds of the and arguments.
  • deletion - depending on the level at which a repository keeps track of deleted records, the response may include headers of records, corresponding to the argument, which have been withdrawn from the repository within the bounds of the and arguments. Deleted status is indicated via the status attribute of the header element and no metadata is included.

Every header returned by the , or requests contains a datestamp, which reflects the most recent date and time of the creation, modification, or deletion according to the rules defined above.

Selective Harvesting and Sets

Harvesters may specify set membership as a criteria for selective harvesting. To specify set-based selective harvesting, a is included as the value of the optional argument to the and requests, thereby specifying selective harvesting of records from items within the respective set.

When a is used as an argument, the response must include:

  • the records corresponding to the argument, or headers thereof in the case of deleted records, available from those items in the set specified by the
  • the records corresponding to the argument, or headers thereof in the case of deleted records, available from those items in sets that are descendant from the specified set.

HTTP Embedding of OAI-PMH requests

OAI-PMH requests are expressed as HTTP requests. A typical implementation uses a standard Web server that is configured to dispatch OAI-PMH requests to the software handling these requests. The remainder of this section describes the aspects of the protocol that are specific to the HTTP embedding.

HTTP Request Format

OAI-PMH requests must be submitted using either the HTTP or methods. has the advantage of imposing no limitations on the length of arguments. Repositories must support both the and methods. There is a single base URL for all requests. The base URL specifies the Internet host and port, and optionally a path, of an HTTP server acting as a repository. Repositories expose their base URL as the value of the element in the response. Note that the composition of any path is determined by the configuration of the repository's HTTP server.

In addition to the base URL, all requests consist of a list of keyword arguments, which take the form of pairs. Arguments may appear in any order and multiple arguments must be separated by ampersands []. Each OAI-PMH request must have at least one pair that specifies the OAI-PMH request issued by the harvester:

The number and nature of additional pairs depends on the arguments for the individual request.

Encoding an OAI-PMH request in a URL for an HTTP GET

URLs for requests have keyword arguments appended to the base URL, separated from it by a question mark []. For example, the URL of a request to a repository with base URL that is might be:

However, since special characters in URIs must be encoded, the correct form of the above request URL is:

Encoding an OAI-PMH request in an HTTP POST

Keyword arguments are carried in the message body of the HTTP . The of the request must be . For example, submitting the same request as above using the method would use just the base URL as the URL, with the format of the being:

Encoding of special characters in keyword arguments of OAI-PMH requests

The syntax rules for URIs restrict a few characters to special roles in certain contexts, and require that if these characters are used in any other way that they must be written as an escape sequence, i.e. a percent sign followed by the character code in hexadecimal. The reserved characters include:

CharacterURI RoleEscape Sequence
Path Component Separator
Query Component Separator
Fragment Identifier
Name/Value Separator
Argument Separator in Query Component
Host Port Separator
Authority Namespace Separator
  Space Character
% Escape Indicator
+ Escaped Space

As a result, these characters must be represented by their respective escape sequence if their use does not correspond to their established URI role. In case of the OAI-PMH, this means that the reserved characters must be encoded when they appear in the part of the pairs of the request. This applies for both the and encoding of the OAI-PMH requests.

HTTP Response Format

Responses to requests are formatted as HTTP responses, with appropriate HTTP header fields.

Content-Type

The returned for all OAI-PMH requests must be .

Status-Code

OAI-PMH errors are distinguished from HTTP . Since OAI-PMH uses HTTP as a transport layer, servers implementing OAI-PMH must conform to HTTP status code definitions and report relevant HTTP transport layer status via those . OAI-PMH repositories may employ HTTP in addition to "". For instance, the following may be useful for load balancing in OAI repositories:

  • - Allows the repository to temporarily redirect an OAI-PMH request to another repository. The URI of the temporary repository should be given by the field in the HTTP response.
  • - Service unavailable, a period is specified. Harvesters should wait this period before attempting another OAI-PMH request.

Response Compression

Response compression is optional in OAI-PMH. Compression of responses to OAI-PMH requests is handled at the level of HTTP, with the following restrictions:

  • Harvesters may include an header in their OAI-PMH requests to specify response compression preferences.
  • Harvesters that do not include an header in their requests will always receive uncompressed responses.
  • When a request includes an header the list of encodings must include the (no compression) encoding (with a non-zero ).
  • Repositories must support the HTTP encoding.
  • Repositories should express the encodings they support in addition to by including elements in the response.

XML Response Format

All responses to OAI-PMH requests must be well-formed XML instance documents. Encoding of the XML must use the UTF-8 representation of Unicode. Character references, rather than entity references, must be used. Character references allow XML responses to be treated as stand-alone documents that can be manipulated without dependency on entity declarations external to the document.

The XML data for all responses to OAI-PMH requests must validate against the XML Schema shown at the end of this section . As can be seen from that schema, responses to OAI-PMH requests have the following common markup:

  1. The first tag output is an XML declaration where the is always and the is always , eg:
  2. The remaining content is enclosed in a root element with the name OAI-PMH. This element must have three attributes that define the XML namespaces used in the remainder of the response and the location of the validating schema:
    • -- the value of which must be the namespace URI of the OAI-PMH ().
    • -- the value of which must be the namespace URI for XML schema ().
    • -- is a pair, the first part of which is the namespace URI (as defined by the XML namespace specification ) of the OAI-PMH (), and the second part is the URL of the XML schema for validation of the response ().
  3. For all responses, the first two children of the root element are:
    • -- a UTCdatetime indicating the time and date that the response was sent. This must be expressed in UTC.
    • -- indicating the protocol request that generated this response. The rules for generating the element are as follows:
      • The content of the element must always be the base URL of the protocol request;
      • The only valid attributes for the element are the of the pairs of protocol request. The attribute values must be the corresponding of those pairs;
      • In cases where the request that generated this response did not result in an error or exception condition, the attributes and attribute values of the element must match the pairs of the protocol request;
      • In cases where the request that generated this response resulted in or error condition, the repository must return the base URL of the protocol request only. Attributes must not be provided in these cases.
  4. The third child of the root element is either:
    • an element that must be used in case of an error or exception condition;
    • an element with the same name as the verb of the respective OAI-PMH request.

An example of a successful reply to the request shown above is of the form:

<?xml version="" encoding="UTF-8" ?> <OAI-PMH xmlns="manicapital.com" xmlns:xsi="manicapital.com" xsi:schemaLocation="manicapital.com manicapital.com"> <responseDate>TZ</responseDate> <request verb="GetRecord" identifier="oai:manicapital.com:hep-th/" metadataPrefix="oai_dc">manicapital.com</request> <GetRecord> <record> </record> </GetRecord> </OAI-PMH>

XML Schema for Validating Responses to OAI-PMH Requests

<schema targetNamespace="manicapital.com" xmlns="manicapital.com" xmlns:oai="manicapital.com" elementFormDefault="qualified" attributeFormDefault="unqualified"> <annotation> <documentation> XML Schema which can be used to validate replies to all OAI-PMH v requests. Herbert Van de Sompel, Validated with XML Spy v on Validated with XSV / on Added definition of protocolVersionType instead of using anonymous type. No change of function. Simeon Warner, Tightened definition of UTCdatetimeType to enforce the restriction to UTC Z notation. Simeon Warner, Corrected pattern matches for setSpecType and metadataPrefixType to agree with protocol specification. Simeon Warner, Spelling correction. Simeon Warner, -- define OAI-PMH error conditions --> <!-- =============================== --> <complexType name="OAI-PMHerrorType"> <simpleContent> <extension base="string"> <attribute name="code" type="oai:OAI-PMHerrorcodeType" use="required"/> </extension> </simpleContent> </complexType> <simpleType name="OAI-PMHerrorcodeType"> <restriction base="string"> <enumeration value="cannotDisseminateFormat"/> <enumeration value="idDoesNotExist"/> <enumeration value="badArgument"/> <enumeration value="badVerb"/> <enumeration value="noMetadataFormats"/> <enumeration value="noRecordsMatch"/> <enumeration value="badResumptionToken"/> <enumeration value="noSetHierarchy"/> </restriction> </simpleType> <!-- define OAI-PMH verb containers --> <!-- define basic types used in replies to GetRecord, ListRecords, ListIdentifiers --> <!-- ======================================= --> <complexType name="recordType"> <annotation> <documentation>A record has a header, a metadata part, and an optional about container</documentation> </annotation> <sequence> <element name="header" type="oai:headerType"/> <element name="metadata" type="oai:metadataType" minOccurs="0"/> <element name="about" type="oai:aboutType" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <complexType name="headerType"> <annotation> <documentation>A header has a unique identifier, a datestamp, and setSpec(s) in case the item from which the record is disseminated belongs to set(s). the header can carry a deleted status indicating that the record is deleted.</documentation> </annotation> <sequence> <element name="identifier" type="oai:identifierType"/> <element name="datestamp" type="oai:UTCdatetimeType"/> <element name="setSpec" type="oai:setSpecType" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="status" type="oai:statusType" use="optional"/> </complexType> <simpleType name="identifierType"> <restriction base="anyURI"/> </simpleType> <simpleType name="statusType"> <restriction base="string"> <enumeration value="deleted"/> </restriction> </simpleType> <complexType name="metadataType"> <annotation> <documentation>Metadata must be expressed in XML that complies with another XML Schema (namespace=#other). Metadata must be explicitly qualified in the response.</documentation> </annotation> <sequence> <any namespace="##other" processContents="strict"/> </sequence> </complexType> <complexType name="aboutType"> <annotation> <documentation>Data "about" the record must be expressed in XML that is compliant with an XML Schema defined by a community.</documentation> </annotation> <sequence> <any namespace="##other" processContents="strict"/> </sequence> </complexType> <complexType name="resumptionTokenType"> <annotation> <documentation>A resumptionToken may have 3 optional attributes and can be used in ListSets, ListIdentifiers, ListRecords responses.</documentation> </annotation> <simpleContent> <extension base="string"> <attribute name="expirationDate" type="dateTime" use="optional"/> <attribute name="completeListSize" type="positiveInteger" use="optional"/> <attribute name="cursor" type="nonNegativeInteger" use="optional"/> </extension> </simpleContent> </complexType> <complexType name="descriptionType"> <annotation> <documentation>The descriptionType is used for the description element in Identify and for setDescription element in ListSets. Content must be compliant with an XML Schema defined by a community.</documentation> </annotation> <sequence> <any namespace="##other" processContents="strict"/> </sequence> </complexType> <simpleType name="UTCdatetimeType"> <annotation> <documentation>Datestamps are to either day (type date) or to seconds granularity (type oai:UTCdateTimeZType)</documentation> </annotation> <union memberTypes="date oai:UTCdateTimeZType"/> </simpleType> <simpleType name="UTCdateTimeZType"> <restriction base="dateTime"> <pattern value=".*Z"/> </restriction> </simpleType> <!-- define types used for Identify verb only --> <!-- ======================================== --> <simpleType name="protocolVersionType"> <restriction base="string"> <enumeration value=""/> </restriction> </simpleType> <simpleType name="emailType"> <restriction base="string"> <pattern value="\S+@(\S+\.)+\S+"/> </restriction> </simpleType> <simpleType name="deletedRecordType"> <restriction base="string"> <enumeration value="no"/> <enumeration value="persistent"/> <enumeration value="transient"/> </restriction> </simpleType> <simpleType name="granularityType"> <restriction base="string"> <enumeration value="YYYY-MM-DD"/> <enumeration value="YYYY-MM-DDThh:mm:ssZ"/> </restriction> </simpleType> <!-- define types used for ListMetadataFormats verb only --> <!-- =================================================== --> <complexType name="metadataFormatType"> <sequence> <element name="metadataPrefix" type="oai:metadataPrefixType"/> <element name="schema" type="anyURI"/> <element name="metadataNamespace" type="anyURI"/> </sequence> </complexType> <simpleType name="metadataPrefixType"> <restriction base="string"> <pattern value="[A-Za-z\-_\.!~\*'\(\)]+"/> </restriction> </simpleType> <!-- define types used for ListSets verb --> <!-- =================================== --> <complexType name="setType"> <sequence> <element name="setSpec" type="oai:setSpecType"/> <element name="setName" type="string"/> <element name="setDescription" type="oai:descriptionType" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <simpleType name="setSpecType"> <restriction base="string"> <pattern value="([A-Za-z\-_\.!~\*'\(\)])+(:[A-Za-z\-_\.!~\*'\(\)]+)*"/> </restriction> </simpleType> </schema>
This Schema is available at manicapital.com

UTCdatetime

Dates and times are uniformly encoded using ISO and are expressed in UTC throughout the protocol. When time is included, the special UTC designator ("") must be used. UTC is implied for dates although no timezone designator is specified. For example, is UTC PM on March 20th UTCdatetime is used in both protocol requests and protocol replies, in the way described in the following sections.

UTCdatetime in Protocol Requests

Datestamps used as values of the optional arguments and in the and requests are encoded using ISO and are expressed in UTC. These arguments are used to specify datestamp-based selective harvesting. These arguments support the "Complete date" and the "Complete date plus hours, minutes and seconds" granularities defined in ISO The legitimate formats are and Both arguments must have the same granularity. All repositories must support . A repository that supports should indicate so in the response. A request by a harvester with finer granularity than that supported by a repository must produce an error.

UTCdatetime in Protocol Responses

Datestamps appear in the headers of records that are returned in response to , and requests. These datestamps are encoded using ISO and are expressed in UTC; they must be expressed in the finest granularity supported by the repository. The value of the datestamp must correspond to the rules for datestamp-based selective harvesting.

Each protocol response includes a element, which must be the time and date of the response in UTC. This is encoded using the "Complete date plus hours, minutes, and seconds" variant of ISO This format is .

A in a protocol reply may include an optional argument , which is expressed in UTC. This is encoded using the "Complete date plus hours, minutes, and seconds" variant of ISO This format is .

metadataPrefix and Metadata Schema

OAI-PMH supports the dissemination of records in multiple metadata formats from a repository. The request returns the list of all metadata formats available from a repository, each of which has the following properties:

  • The - a string to specify the metadata format in OAI-PMH requests issued to the repository. consists of any valid URI unreserved characters. arguments are used in , , and requests to retrieve records, or the headers of records that include metadata in the format specified by the ;
  • The metadata schema URL - the URL of an XML schema to test validity of metadata expressed according to the format;
  • The XML namespace URI that is a global identifier of the metadata format.

The metadata in each record returned by and must comply with the conventions of the XML namespace specification. This means that the root element of the metadata part must contain an attribute, the value of which is the XML namespace URI of the metadata format. The root element must also contain an attribute that has a value that includes the URL of the XML schema for validation of the metadata. This URL must match the URL of the metadata schema for the included as an argument to the or request (the mapping from to metadata schema is defined by the repository's response to the request).

For purposes of interoperability, repositories must disseminate Dublin Core, without any qualification. Therefore, the protocol reserves the `', and the URL of a metadata schema for unqualified Dublin Core, which is manicapital.com The corresponding XML namespace URI is manicapital.com

The `' is reserved for future use. Implementations should not use this .

Communities should adopt guidelines for sharing of metadata schema and XML namespace URI's of metadata formats. Such guidelines are outside of the scope of the OAI-PMH. The accompanying Implementation Guidelines document provides some sample XML Schema and instance documents for common metadata formats such as MARC and RFC

Flow Control

A number of OAI-PMH requests return a list of discrete entities: returns a list of records, returns a list of headers, and returns a list of sets. Collectively these requests are called list requests. In some cases, these lists may be large and it may be practical to partition them among a series of requests and responses. This partitioning is accomplished as follows:

  • A repository replies to a request with an incomplete list and a
  • In order to make the response a complete list, the harvester will need to issue one or more requests with as arguments. The complete list then consists of the concatenation of the incomplete lists from the sequence of requests, known as a list request sequence.

Details of flow control and the are as follows:

  • The only defined use of is as follows:
    • a repository must include a element as part of each response that includes an incomplete list;
    • in order to retrieve the next portion of the complete list, the next request must use the value of that element as the value of the argument of the request;
    • the response containing the incomplete list that completes the list must include an empty element;
    All other uses of by a harvester are illegal and must return an error.
  • In all cases when a is issued, the incomplete list must consist of complete entities; e.g., all individual records returned in an incomplete record list from a request must be intact.
  • The format of the is not defined by the OAI-PMH and should be considered opaque by the harvester.
  • The protocol does not define the semantics of incompleteness. Therefore, a harvester should not assume that the members in an incomplete list conform to some selection criteria (e.g., date ordering).
  • Before including a in the URL of a subsequent request, a harvester must encode any special characters in it.

The following optional attributes may be included as part of the element along with the itself:

  • -- a UTCdatetime indicating when the ceases to be valid.
  • -- an integer indicating the cardinality of the complete list (i.e., the sum of the cardinalities of the incomplete lists). Because there may be changes in a repository during a list request sequence, as described under Idempotency of resumptionTokens, the value of may be only an estimate of the actual cardinality of the complete list and may be revised during the list request sequence.
  • -- a count of the number of elements of the complete list thus far returned (i.e. starts at 0).

The following example is a series of ListRecords requests where the complete list consists of records and the repository only returns records per response.

  • The harvester issues a request.
  • The repository responds with an incomplete list of records. The repository marks this list as incomplete by including in the response a non-emptyelement, with two attributes: a of , and a of 0.
  • The harvester issues a subsequent request that includes the that it received in the previous response.
  • The repository responds with an incomplete list of 75 records. The repository marks this list as the final incomplete list by including in the response an empty element with two attributes: a of , and a of

This flow control mechanism, in combination with HTTP transport layer facilities, provides some basic tools with which a repository can enforce an acceptable use policy for its harvesting interface. Communities implementing the OAI-PMH may need more extensive tools to enforce acceptable use policies for either the harvesting interface of their repositories or for the metadata harvested from those repositories. The enforcement of such additional policies is outside of the scope of the OAI-PMH.

Idempotency of resumptionTokens

Repositories that implement must do so in a manner that allows harvesters to resume a sequence of requests for incomplete lists by re-issuing a list request with the most recent . The purpose of this is to allow harvesters to recover from network or other errors that would otherwise mean that the list request sequence would have to be started again. A re-issue of a list request with a occurs in two contexts:

  1. When there are no changes in the repository. There are no changes to the complete list returned by the list request sequence. In this case, the repository must return the same incomplete list when the most recent list request, i.e. the one with the most recent non-expired , is re-issued.
  2. When there are changes in the repository. There may be changes to the complete list returned by the list request sequence. These changes occur when the records disseminated in the list move in or out of the datestamp range of the request because of changes, modifications, or deletions in the repository. In this case, strict idempotency of the incomplete-list requests using values is not required. Instead, the incomplete list returned in response to a re-issued request must include all records with unchanged within the range of the initial list request. The incomplete list returned in response to a re-issued request may contain records with datestamps that either moved into or out of the range of the initial request. In cases where there are substantial changes to the repository, it may be appropriate for a repository to return a error, signaling that the harvester should restart the list request sequence.

Error and Exception Conditions

In event of an error or exception condition, repositories must indicate OAI-PMH errors, distinguished from HTTP , by including one or more elements in the response. While one element is sufficient to indicate the presence of the error or exception condition, repositories should report all errors or exceptions that arise from processing the request. Each element must have a attribute that must be from the following table; each element may also have a free text string value to provide information about the error that is useful to a human reader. These strings are not defined by the OAI-PMH.

Error CodesDescriptionApplicable Verbs
The request includes illegal arguments, is missing required arguments, includes a repeated argument, or values for arguments have an illegal syntax.all verbs
The value of the argument is invalid or expired.
Value of the argument is not a legal OAI-PMH verb, the verb argument is missing, or the argument is repeated. N/A
The metadata format identified by the value given for the argument is not supported by the item or by the repository.
The value of the argument is unknown or illegal in this repository.
The combination of the values of the , , and arguments results in an empty list.
There are no metadata formats available for the specified item.
The repository does not support sets.

The following example demonstrates error handling in the case of an illegal verb argument. All request URLs shown from now on will be wrapped to make them more readable.

Request

manicapital.com? verb=nastyVerb

Response

<?xml version="" encoding="UTF-8"?> <OAI-PMH xmlns="manicapital.com" xmlns:xsi="manicapital.com" xsi:schemaLocation="manicapital.com manicapital.com"> <responseDate>TZ</responseDate> <request>manicapital.com</request> <error code="badVerb">Illegal OAI verb</error> </OAI-PMH>

The following example demonstrates error handling in the case of a request to a repository that does not handle sets.

Request

manicapital.com? verb=ListSets
Response
<?xml version="" encoding="UTF-8"?> <OAI-PMH xmlns="manicapital.com" xmlns:xsi="manicapital.com" xsi:schemaLocation="manicapital.com manicapital.com"> <responseDate>TZ</responseDate> <request verb="ListSets">manicapital.com</request> <error code="noSetHierarchy">This repository does not support sets</error> </OAI-PMH>

This section lists the requests, or defined in the OAI-PMH. The documentation for each request is organized as follows:

  • A section title corresponding to the token used to specify the request as the required argument to an HTTP request.
  • A brief summary of the meaning of the verb and notes on its usage.
  • The list of additional arguments for the request. Arguments are of three types:
    • required, the argument must be included with the request (the argument is always required, as described in HTTP Request Format).
    • optional, the argument may be included with the request.
    • exclusive, the argument may be included with request, but must be the only argument (in addition to the argument).
  • Error and exception conditions specific to the protocol request.
  • One or more example requests and corresponding responses, with explanatory notes if appropriate.

An XML Schema defines the format of valid replies to all OAI-PMH requests.

GetRecord

Summary and Usage Notes

This verb is used to retrieve an individual metadata record from a repository. Required arguments specify the identifier of the item from which the record is requested and the format of the metadata that should be included in the record. Depending on the level at which a repository tracks deletions, a header with a "deleted" value for the attribute may be returned, in case the metadata format specified by the is no longer available from the repository or from the specified item.

Arguments

  • a required argument that specifies the unique identifier of the item in the repository from which the record must be disseminated.
  • a required argument that specifies the of the format that should be included in the metadata part of the returned record . A record should only be returned if the format specified by the can be disseminated from the item identified by the value of the identifier argument. The metadata formats supported by a repository and for a particular record can be retrieved using the request.

Error and Exception Conditions

  • - The request includes illegal arguments or is missing required arguments.
  • - The value of the argument is not supported by the item identified by the value of the argument.
  • - The value of the argument is unknown or illegal in this repository.

Examples

Request

Request a record in the Dublin Core metadata format [URL shown without encoding to be more readable].

manicapital.com? verb=GetRecord&identifier=oai:manicapital.com:cs/&metadataPrefix=oai_dc

Response

<?xml version="" encoding="UTF-8"?> <OAI-PMH xmlns="manicapital.com" xmlns:xsi="manicapital.com" xsi:schemaLocation="manicapital.com manicapital.com"> <responseDate>TZ</responseDate> <request verb="GetRecord" identifier="oai:manicapital.com:cs/" metadataPrefix="oai_dc">manicapital.com</request> <GetRecord> <record> <header> <identifier>oai:manicapital.com:cs/</identifier> <datestamp></datestamp> <setSpec>cs</setSpec> <setSpec>math</setSpec> </header> <metadata> <oai_dc:dc xmlns:oai_dc="manicapital.com" xmlns:dc="manicapital.com" xmlns:xsi="manicapital.com" xsi:schemaLocation="manicapital.com manicapital.com"> <dc:title>Using Structural Metadata to Localize Experience of Digital Content</dc:title> <dc:creator>Dushay, Naomi</dc:creator> <dc:subject>Digital Libraries</dc:subject> <dc:description>With the increasing technical sophistication of both information consumers and providers, there is increasing demand for more meaningful experiences of digital information. We present a framework that separates digital object experience, or rendering, from digital object storage and manipulation, so the rendering can be tailored to particular communities of users. </dc:description> <dc:description>Comment: 23 pages including 2 appendices, 8 figures</dc:description> <dc:date></dc:date> </oai_dc:dc> </metadata> </record> </GetRecord> </OAI-PMH>

Request

Request a record in the Dublin Core metadata format. The requested record, however, can not be returned because the identifier does not exist. Therefore, the response does not contain a container. It does have an element with a attribute that has the value . [URL shown without encoding for better readability].

manicapital.com? verb=GetRecord&identifier=oai:manicapital.com:quant-ph/&metadataPrefix=oai_dc

Response

<?xml version="" encoding="UTF-8"?> <OAI-PMH xmlns="manicapital.com" xmlns:xsi="manicapital.com" xsi:schemaLocation="manicapital.com manicapital.com"> <responseDate>TZ</responseDate> <request verb="GetRecord" identifier="oai:manicapital.com:quant-ph/" metadataPrefix="oai_dc">manicapital.com</request> <error code="idDoesNotExist">No matching identifier in arXiv</error> </OAI-PMH>

Request

Request a record in the oai_marc metadata format. However, the requested metadata format can not be disseminated for this identifier. Therefore, the response contains no record. It does contain an element with a attribute that has the value . [URL shown without encoding for better readability].

manicapital.com? verb=GetRecord&identifier=oai:manicapital.com:quant-ph/&metadataPrefix=oai_marc

Response

<?xml version="" encoding="UTF-8"?> <OAI-PMH xmlns="manicapital.com" xmlns:xsi="manicapital.com" xsi:schemaLocation="manicapital.com manicapital.com"> <responseDate>TZ</responseDate> <request verb="GetRecord" identifier="oai:manicapital.com:quant-ph/" metadataPrefix="oai_marc">manicapital.com</request> <error code="cannotDisseminateFormat"/> </OAI-PMH>

Identify

Summary and Usage Notes

This verb is used to retrieve information about a repository. Some of the information returned is required as part of the OAI-PMH. Repositories may also employ the Identify verb to return additional descriptive information.

Arguments

None

Error and Exception Conditions

  • - The request includes illegal arguments.

Response Format

The response must include one instance of the following elements:

  • : a human readable name for the repository;
  • : the base URL of the repository;
  • : the version of the OAI-PMH supported by the repository;
  • : a UTCdatetime that is the guaranteed lower limit of all datestamps recording changes, modifications, or deletions in the repository. A repository must not use datestamps lower than the one specified by the content of the element. must be expressed at the finest granularity supported by the repository.
  • : the manner in which the repository supports the notion of deleted records. Legitimate values are ; ; with meanings defined in the section on deletion.
  • the finest harvesting granularity supported by the repository. The legitimate values are and with meanings as defined in ISO

The response must include one or more instances of the following element:

  • : the e-mail address of an administrator of the repository.

The response may include multiple instances of the following optional elements:

  • : a compression encoding supported by the repository. The recommended values are those defined for the header in Section of RFC describing HTTP A element should not be included for the encoding, which is implied.
  • : an extensible mechanism for communities to describe their repositories. For example, the container could be used to include collection-level metadata in the response to the Identify request. Implementation Guidelines are available to give directions with this respect. Each container must be accompanied by the URL of an XML schema describing the structure of the description container.

Examples

Request

manicapital.com? verb=Identify

Response

The below example of a response to the request contains three containers:

  • The container complies to an XML Schema, which is available at manicapital.com This schema, provided in the accompanying Implementation Guidelines document, is used by repositories that choose to comply with a specific format of unique identifiers for items. The format of that identifier is explained by means of comments in the manicapital.com XML Schema.
  • The container complies to an XML Schema, which is available at manicapital.com This schema, provided in the accompanying Implementation Guidelines document, has been agreed upon by the OAI e-print community, and contains information specific to repositories in that community.
  • The container complies to an XML Schema, which is available at manicapital.com This schema, provided in the accompanying Implementation Guidelines document, is used by repositories that want to point harvesters to other repositories, by listing their base URLs. Usage of the container is recommended; it may support harvesters in discovering the network-location of repositories.
Источник: [manicapital.com]
.

What’s New in the Far HTML 3.3.1 serial key or number?

Screen Shot

System Requirements for Far HTML 3.3.1 serial key or number

Add a Comment

Your email address will not be published. Required fields are marked *