Available builders¶
These are the built-in Sphinx builders. More builders can be added by extensions.
The builder’s “name” must be given to the -b command-line option of sphinx-build to select a builder.
-
class
sphinx.builders.html.
StandaloneHTMLBuilder
[source]¶ This is the standard HTML builder. Its output is a directory with HTML files, complete with style sheets and optionally the reST sources. There are quite a few configuration values that customize the output of this builder, see the chapter Options for HTML output for details.
-
name
= ‘html’¶
-
format
= ‘html’¶
-
supported_image_types
= [‘image/svg+xml’, ‘image/png’, ‘image/gif’, ‘image/jpeg’]¶
-
-
class
sphinx.builders.html.
DirectoryHTMLBuilder
[source]¶ This is a subclass of the standard HTML builder. Its output is a directory with HTML files, where each file is called
index.html
and placed in a subdirectory named like its page name. For example, the documentmarkup/rest.rst
will not result in an output filemarkup/rest.html
, butmarkup/rest/index.html
. When generating links between pages, theindex.html
is omitted, so that the URL would look likemarkup/rest/
.-
name
= ‘dirhtml’¶
-
format
= ‘html’¶
-
supported_image_types
= [‘image/svg+xml’, ‘image/png’, ‘image/gif’, ‘image/jpeg’]¶
New in version 0.6.
-
-
class
sphinx.builders.html.
SingleFileHTMLBuilder
[source]¶ This is an HTML builder that combines the whole project in one output file. (Obviously this only works with smaller projects.) The file is named like the master document. No indices will be generated.
-
name
= ‘singlehtml’¶
-
format
= ‘html’¶
-
supported_image_types
= [‘image/svg+xml’, ‘image/png’, ‘image/gif’, ‘image/jpeg’]¶
New in version 1.0.
-
-
class
sphinx.builders.htmlhelp.
HTMLHelpBuilder
[source]¶ This builder produces the same output as the standalone HTML builder, but also generates HTML Help support files that allow the Microsoft HTML Help Workshop to compile them into a CHM file.
-
name
= ‘htmlhelp’¶
-
format
= ‘html’¶
-
supported_image_types
= [‘image/png’, ‘image/gif’, ‘image/jpeg’]¶
-
-
class
sphinx.builders.qthelp.
QtHelpBuilder
[source]¶ This builder produces the same output as the standalone HTML builder, but also generates Qt help collection support files that allow the Qt collection generator to compile them.
-
name
= ‘qthelp’¶
-
format
= ‘html’¶
-
supported_image_types
= [‘image/svg+xml’, ‘image/png’, ‘image/gif’, ‘image/jpeg’]¶
-
-
class
sphinx.builders.applehelp.
AppleHelpBuilder
[source]¶ This builder produces an Apple Help Book based on the same output as the standalone HTML builder.
If the source directory contains any
.lproj
folders, the one corresponding to the selected language will have its contents merged with the generated output. These folders will be ignored by all other documentation types.In order to generate a valid help book, this builder requires the command line tool hiutil, which is only available on Mac OS X 10.6 and above. You can disable the indexing step by setting :confval:`applehelp_disable_external_tools` to
True
, in which case the output will not be valid until hiutil has been run on all of the.lproj
folders within the bundle.-
name
= ‘applehelp’¶
-
format
= ‘html’¶
-
supported_image_types
= [‘image/png’, ‘image/gif’, ‘image/jpeg’, ‘image/tiff’, ‘image/jp2’, ‘image/svg+xml’]¶
New in version 1.3.
-
-
class
sphinx.builders.devhelp.
DevhelpBuilder
[source]¶ This builder produces the same output as the standalone HTML builder, but also generates GNOME Devhelp support file that allows the GNOME Devhelp reader to view them.
-
name
= ‘devhelp’¶
-
format
= ‘html’¶
-
supported_image_types
= [‘image/png’, ‘image/gif’, ‘image/jpeg’]¶
-
-
class
sphinx.builders.epub3.
Epub3Builder
[source]¶ This builder produces the same output as the standalone HTML builder, but also generates an epub file for ebook readers. See Epub info for details about it. For definition of the epub format, have a look at http://idpf.org/epub or https://en.wikipedia.org/wiki/EPUB. The builder creates EPUB 3 files.
-
name
= ‘epub’¶
-
format
= ‘html’¶
-
supported_image_types
= [‘image/svg+xml’, ‘image/png’, ‘image/gif’, ‘image/jpeg’]¶
New in version 1.4.
Changed in version 1.5: Since Sphinx-1.5, the epub3 builder is used for the default builder of epub.
-
-
class
sphinx.builders.latex.
LaTeXBuilder
[source]¶ This builder produces a bunch of LaTeX files in the output directory. You have to specify which documents are to be included in which LaTeX files via the :confval:`latex_documents` configuration value. There are a few configuration values that customize the output of this builder, see the chapter Options for LaTeX output for details.
Note
The produced LaTeX file uses several LaTeX packages that may not be present in a “minimal” TeX distribution installation. For example, on Ubuntu, the following packages need to be installed for successful PDF builds:
- texlive-latex-recommended
- texlive-fonts-recommended
- texlive-latex-extra
- latexmk (for
make latexpdf
)
Sphinx will use
xcolor.sty
if present: recent Ubuntu distributions havexcolor.sty
included in latex-recommended, earlier ones have it in latex-xcolor. Unicode engines will need texlive-luatex or texlive-xetex.The testing of Sphinx LaTeX is done on Ubuntu trusty with the above mentioned packages, which are from a TeXLive 2013 snapshot dated February 2014.
Changed in version 1.6: Formerly, testing had been done for some years on Ubuntu precise (based on TeXLive 2009).
Changed in version 1.6: Use of
latexmk
formake latexpdf
on GNU/Linux and Mac OS XSince 1.6,
make latexpdf
(ormake -C "<builddir>/latex"
after asphinx-build
run) useslatexmk
(not on Windows). One can pass tolatexmk
options via theLATEXMKOPTS
Makefile variable. For example:make latexpdf LATEXMKOPTS="-silent"
reduces console output to a minimum. Also, if
latexmk
version is 4.52b or higher (Jan 17) andxelatex
is the :confval:`latex_engine`, thenLATEXMKOPTS="-xelatex"
will speed up PDF builds.To pass options directly to the
(pdf|xe|lua)latex
executable, use variableLATEXOPTS
(for exampleLATEXOPTS="--interaction=nonstopmode"
).-
name
= ‘latex’¶
-
format
= ‘latex’¶
-
supported_image_types
= [‘application/pdf’, ‘image/png’, ‘image/jpeg’]¶
Note that a direct PDF builder is being provided by rinohtype. The builder’s
name is rinoh
. Refer to the rinohtype manual for details. There is also
PDF builder using ReportLab in rst2pdf version 0.12 or greater. However,
rst2pdf is no longer being actively maintained and suffers from some problems
when used with recent Sphinx versions. See the rst2pdf manual for usage
instructions.
-
class
sphinx.builders.text.
TextBuilder
[source]¶ This builder produces a text file for each reST file – this is almost the same as the reST source, but with much of the markup stripped for better readability.
-
name
= ‘text’¶
-
format
= ‘text’¶
-
supported_image_types
= []¶
New in version 0.4.
-
-
class
sphinx.builders.manpage.
ManualPageBuilder
[source]¶ This builder produces manual pages in the groff format. You have to specify which documents are to be included in which manual pages via the :confval:`man_pages` configuration value.
-
name
= ‘man’¶
-
format
= ‘man’¶
-
supported_image_types
= []¶
New in version 1.0.
-
-
class
sphinx.builders.texinfo.
TexinfoBuilder
[source]¶ This builder produces Texinfo files that can be processed into Info files by the makeinfo program. You have to specify which documents are to be included in which Texinfo files via the :confval:`texinfo_documents` configuration value.
The Info format is the basis of the on-line help system used by GNU Emacs and the terminal-based program info. See Texinfo info for more details. The Texinfo format is the official documentation system used by the GNU project. More information on Texinfo can be found at https://www.gnu.org/software/texinfo/.
-
name
= ‘texinfo’¶
-
format
= ‘texinfo’¶
-
supported_image_types
= [‘image/png’, ‘image/jpeg’, ‘image/gif’]¶
New in version 1.1.
-
-
class
sphinx.builders.html.
SerializingHTMLBuilder
[source]¶ This builder uses a module that implements the Python serialization API (pickle, simplejson, phpserialize, and others) to dump the generated HTML documentation. The pickle builder is a subclass of it.
A concrete subclass of this builder serializing to the PHP serialization format could look like this:
import phpserialize class PHPSerializedBuilder(SerializingHTMLBuilder): name = 'phpserialized' implementation = phpserialize out_suffix = '.file.phpdump' globalcontext_filename = 'globalcontext.phpdump' searchindex_filename = 'searchindex.phpdump'
-
implementation
¶ A module that implements dump(), load(), dumps() and loads() functions that conform to the functions with the same names from the pickle module. Known modules implementing this interface are simplejson, phpserialize, plistlib, and others.
-
out_suffix
¶ The suffix for all regular files.
-
globalcontext_filename
¶ The filename for the file that contains the “global context”. This is a dict with some general configuration values such as the name of the project.
-
searchindex_filename
¶ The filename for the search index Sphinx generates.
See Serialization builder details for details about the output format.
New in version 0.5.
-
-
class
sphinx.builders.html.
PickleHTMLBuilder
[source]¶ This builder produces a directory with pickle files containing mostly HTML fragments and TOC information, for use of a web application (or custom postprocessing tool) that doesn’t use the standard HTML templates.
See Serialization builder details for details about the output format.
-
name
= ‘pickle’¶ The old name
web
still works as well.
-
format
= ‘html’¶
-
supported_image_types
= [‘image/svg+xml’, ‘image/png’, ‘image/gif’, ‘image/jpeg’]¶
The file suffix is
.fpickle
. The global context is calledglobalcontext.pickle
, the search indexsearchindex.pickle
.-
-
class
sphinx.builders.html.
JSONHTMLBuilder
[source]¶ This builder produces a directory with JSON files containing mostly HTML fragments and TOC information, for use of a web application (or custom postprocessing tool) that doesn’t use the standard HTML templates.
See Serialization builder details for details about the output format.
-
name
= ‘json’¶
-
format
= ‘html’¶
-
supported_image_types
= [‘image/svg+xml’, ‘image/png’, ‘image/gif’, ‘image/jpeg’]¶
The file suffix is
.fjson
. The global context is calledglobalcontext.json
, the search indexsearchindex.json
.New in version 0.5.
-
-
class
sphinx.builders.gettext.
MessageCatalogBuilder
[source]¶ This builder produces gettext-style message catalogs. Each top-level file or subdirectory grows a single
.pot
catalog template.See the documentation on Internationalization for further reference.
-
name
= u’gettext’¶
-
format
= ‘’¶
-
supported_image_types
= []¶
New in version 1.1.
-
-
class
sphinx.builders.changes.
ChangesBuilder
[source]¶ This builder produces an HTML overview of all
versionadded
,versionchanged
anddeprecated
directives for the current :confval:`version`. This is useful to generate a ChangeLog file, for example.-
name
= ‘changes’¶
-
format
= ‘’¶
-
supported_image_types
= []¶
-
-
class
sphinx.builders.dummy.
DummyBuilder
[source]¶ This builder produces no output. The input is only parsed and checked for consistency. This is useful for linting purposes.
-
name
= ‘dummy’¶
-
supported_image_types
= []¶
New in version 1.4.
-
-
class
sphinx.builders.linkcheck.
CheckExternalLinksBuilder
[source]¶ This builder scans all documents for external links, tries to open them with
urllib2
, and writes an overview which ones are broken and redirected to standard output and tooutput.txt
in the output directory.-
name
= ‘linkcheck’¶
-
format
= ‘’¶
-
supported_image_types
= []¶
-
-
class
sphinx.builders.xml.
XMLBuilder
[source]¶ This builder produces Docutils-native XML files. The output can be transformed with standard XML tools such as XSLT processors into arbitrary final forms.
-
name
= ‘xml’¶
-
format
= ‘xml’¶
-
supported_image_types
= []¶
New in version 1.2.
-
-
class
sphinx.builders.xml.
PseudoXMLBuilder
[source]¶ This builder is used for debugging the Sphinx/Docutils “Reader to Transform to Writer” pipeline. It produces compact pretty-printed “pseudo-XML”, files where nesting is indicated by indentation (no end-tags). External attributes for all elements are output, and internal attributes for any leftover “pending” elements are also given.
-
name
= ‘pseudoxml’¶
-
format
= ‘pseudoxml’¶
-
supported_image_types
= []¶
New in version 1.2.
-
Built-in Sphinx extensions that offer more builders are:
Serialization builder details¶
All serialization builders outputs one file per source file and a few special
files. They also copy the reST source files in the directory _sources
under the output directory.
The PickleHTMLBuilder
is a builtin subclass that implements the pickle
serialization interface.
The files per source file have the extensions of
out_suffix
, and are arranged in directories
just as the source files are. They unserialize to a dictionary (or dictionary
like structure) with these keys:
body
- The HTML “body” (that is, the HTML rendering of the source file), as rendered by the HTML translator.
title
- The title of the document, as HTML (may contain markup).
toc
- The table of contents for the file, rendered as an HTML
<ul>
. display_toc
- A boolean that is
True
if thetoc
contains more than one entry. current_page_name
- The document name of the current file.
parents
,prev
andnext
- Information about related chapters in the TOC tree. Each relation is a
dictionary with the keys
link
(HREF for the relation) andtitle
(title of the related document, as HTML).parents
is a list of relations, whileprev
andnext
are a single relation. sourcename
- The name of the source file under
_sources
.
The special files are located in the root output directory. They are:
SerializingHTMLBuilder.globalcontext_filename
A pickled dict with these keys:
project
,copyright
,release
,version
- The same values as given in the configuration file.
style
- :confval:`html_style`.
last_updated
- Date of last build.
builder
- Name of the used builder, in the case of pickles this is always
'pickle'
. titles
- A dictionary of all documents’ titles, as HTML strings.
SerializingHTMLBuilder.searchindex_filename
An index that can be used for searching the documentation. It is a pickled list with these entries:
- A list of indexed docnames.
- A list of document titles, as HTML strings, in the same order as the first list.
- A dict mapping word roots (processed by an English-language stemmer) to a list of integers, which are indices into the first list.
environment.pickle
The build environment. This is always a pickle file, independent of the builder and a copy of the environment that was used when the builder was started.
Todo
Document common members.
Unlike the other pickle files this pickle file requires that the
sphinx
package is available on unpickling.


Docker secrets を使った機密情報の管理
読む時間の目安: 35 分secrets について
Docker Swarm サービスにおいて secret とは、パスワード、SSH 秘密鍵、SSL 証明書などのようなデータ In terms of Docker Swarm services, a secret is a blob of data, such as a password, SSH private key, SSL certificate, or another piece of data that should not be transmitted over a network or stored unencrypted in a Dockerfile or in your application’s source code. In Docker 1.13 and higher, you can use Docker secrets to centrally manage this data and securely transmit it to only those containers that need access to it. Secrets are encrypted during transit and at rest in a Docker swarm. A given secret is only accessible to those services which have been granted explicit access to it, and only while those service tasks are running.
You can use secrets to manage any sensitive data which a container needs at runtime but you don’t want to store in the image or in source control, such as:
- Usernames and passwords
- TLS certificates and keys
- SSH keys
- Other important data such as the name of a database or internal server
- Generic strings or binary content (up to 500 kb in size)
Note: Docker secrets are only available to swarm services, not to standalone containers. To use this feature, consider adapting your container to run as a service. Stateful containers can typically run with a scale of 1 without changing the container code.
Another use case for using secrets is to provide a layer of abstraction between the container and a set of credentials. Consider a scenario where you have separate development, test, and production environments for your application. Each of these environments can have different credentials, stored in the development, test, and production swarms with the same secret name. Your containers only need to know the name of the secret to function in all three environments.
You can also use secrets to manage non-sensitive data, such as configuration files. However, Docker 17.06 and higher support the use of configs for storing non-sensitive data. Configs are mounted into the container’s filesystem directly, without the use of a RAM disk.
Windows support
Docker 17.06 and higher include support for secrets on Windows containers. Where there are differences in the implementations, they are called out in the examples below. Keep the following notable differences in mind:
-
Microsoft Windows has no built-in driver for managing RAM disks, so within running Windows containers, secrets are persisted in clear text to the container’s root disk. However, the secrets are explicitly removed when a container stops. In addition, Windows does not support persisting a running container as an image using
docker commit
or similar commands. -
On Windows, we recommend enabling BitLocker on the volume containing the Docker root directory on the host machine to ensure that secrets for running containers are encrypted at rest.
-
Secret files with custom targets are not directly bind-mounted into Windows containers, since Windows does not support non-directory file bind-mounts. Instead, secrets for a container are all mounted in
C:\ProgramData\Docker\internal\secrets
(an implementation detail which should not be relied upon by applications) within the container. Symbolic links are used to point from there to the desired target of the secret within the container. The default target isC:\ProgramData\Docker\secrets
. -
When creating a service which uses Windows containers, the options to specify UID, GID, and mode are not supported for secrets. Secrets are currently only accessible by administrators and users with
system
access within the container.
How Docker manages secrets
When you add a secret to the swarm, Docker sends the secret to the swarm manager over a mutual TLS connection. The secret is stored in the Raft log, which is encrypted. The entire Raft log is replicated across the other managers, ensuring the same high availability guarantees for secrets as for the rest of the swarm management data.
Warning: Raft data is encrypted in Docker 1.13 and higher. If any of your Swarm managers run an earlier version, and one of those managers becomes the manager of the swarm, the secrets are stored unencrypted in that node’s Raft logs. Before adding any secrets, update all of your manager nodes to Docker 1.13 or higher to prevent secrets from being written to plain-text Raft logs.
When you grant a newly-created or running service access to a secret, the
decrypted secret is mounted into the container in an in-memory filesystem. The
location of the mount point within the container defaults to
/run/secrets/<secret_name>
in Linux containers, or
C:\ProgramData\Docker\secrets
in Windows containers. You can specify a custom
location in Docker 17.06 and higher.
You can update a service to grant it access to additional secrets or revoke its access to a given secret at any time.
A node only has access to (encrypted) secrets if the node is a swarm manager or if it is running service tasks which have been granted access to the secret. When a container task stops running, the decrypted secrets shared to it are unmounted from the in-memory filesystem for that container and flushed from the node’s memory.
If a node loses connectivity to the swarm while it is running a task container with access to a secret, the task container still has access to its secrets, but cannot receive updates until the node reconnects to the swarm.
You can add or inspect an individual secret at any time, or list all secrets. You cannot remove a secret that a running service is using. See Rotate a secret for a way to remove a secret without disrupting running services.
To update or roll back secrets more easily, consider adding a version number or date to the secret name. This is made easier by the ability to control the mount point of the secret within a given container.
Read more about docker secret
commands
Use these links to read about specific commands, or continue to the example about using secrets with a service.
docker secret create
docker secret inspect
docker secret ls
docker secret rm
--secret
flag fordocker service create
--secret-add
and--secret-rm
flags fordocker service update
Examples
This section includes three graduated examples which illustrate how to use Docker secrets. The images used in these examples have been updated to make it easier to use Docker secrets. To find out how to modify your own images in a similar way, see Build support for Docker Secrets into your images.
Note: These examples use a single-Engine swarm and unscaled services for simplicity. The examples use Linux containers, but Windows containers also support secrets in Docker 17.06 and higher. See Windows support.
Defining and using secrets in compose files
Both the docker-compose
and docker stack
commands support defining secrets
in a compose file. See
the Compose file reference for details.
Simple example: Get started with secrets
This simple example shows how secrets work in just a few commands. For a real-world example, continue to Intermediate example: Use secrets with a Nginx service.
-
Add a secret to Docker. The
docker secret create
command reads standard input because the last argument, which represents the file to read the secret from, is set to-
.$ printf "This is a secret" | docker secret create my_secret_data -
-
Create a
redis
service and grant it access to the secret. By default, the container can access the secret at/run/secrets/<secret_name>
, but you can customize the file name on the container using thetarget
option.$ docker service create --name redis --secret my_secret_data redis:alpine
-
Verify that the task is running without issues using
docker service ps
. If everything is working, the output looks similar to this:$ docker service ps redis ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS bkna6bpn8r1a redis.1 redis:alpine ip-172-31-46-109 Running Running 8 seconds ago
If there were an error, and the task were failing and repeatedly restarting, you would see something like this:
$ docker service ps redis NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS redis.1.siftice35gla redis:alpine moby Running Running 4 seconds ago \_ redis.1.whum5b7gu13e redis:alpine moby Shutdown Failed 20 seconds ago "task: non-zero exit (1)" \_ redis.1.2s6yorvd9zow redis:alpine moby Shutdown Failed 56 seconds ago "task: non-zero exit (1)" \_ redis.1.ulfzrcyaf6pg redis:alpine moby Shutdown Failed about a minute ago "task: non-zero exit (1)" \_ redis.1.wrny5v4xyps6 redis:alpine moby Shutdown Failed 2 minutes ago "task: non-zero exit (1)"
-
Get the ID of the
redis
service task container usingdocker ps
, so that you can usedocker container exec
to connect to the container and read the contents of the secret data file, which defaults to being readable by all and has the same name as the name of the secret. The first command below illustrates how to find the container ID, and the second and third commands use shell completion to do this automatically.$ docker ps --filter name=redis -q 5cb1c2348a59 $ docker container exec $(docker ps --filter name=redis -q) ls -l /run/secrets total 4 -r--r--r-- 1 root root 17 Dec 13 22:48 my_secret_data $ docker container exec $(docker ps --filter name=redis -q) cat /run/secrets/my_secret_data This is a secret
-
Verify that the secret is not available if you commit the container.
$ docker commit $(docker ps --filter name=redis -q) committed_redis $ docker run --rm -it committed_redis cat /run/secrets/my_secret_data cat: can't open '/run/secrets/my_secret_data': No such file or directory
-
Try removing the secret. The removal fails because the
redis
service is running and has access to the secret.$ docker secret ls ID NAME CREATED UPDATED wwwrxza8sxy025bas86593fqs my_secret_data 4 hours ago 4 hours ago $ docker secret rm my_secret_data Error response from daemon: rpc error: code = 3 desc = secret 'my_secret_data' is in use by the following service: redis
-
Remove access to the secret from the running
redis
service by updating the service.$ docker service update --secret-rm my_secret_data redis
-
Repeat steps 3 and 4 again, verifying that the service no longer has access to the secret. The container ID is different, because the
service update
command redeploys the service.$ docker container exec -it $(docker ps --filter name=redis -q) cat /run/secrets/my_secret_data cat: can't open '/run/secrets/my_secret_data': No such file or directory
-
Stop and remove the service, and remove the secret from Docker.
$ docker service rm redis $ docker secret rm my_secret_data
Simple example: Use secrets in a Windows service
This is a very simple example which shows how to use secrets with a Microsoft IIS service running on Docker 17.06 EE on Microsoft Windows Server 2016 or Docker Desktop for Mac 17.06 on Microsoft Windows 10. It is a naive example that stores the webpage in a secret.
This example assumes that you have PowerShell installed.
-
Save the following into a new file
index.html
. <title>Hello Docker</title>
Hello Docker! You have deployed a HTML page.

-
If you have not already done so, initialize or join the swarm.
docker swarm init
-
Save the
index.html
file as a swarm secret namedhomepage
.docker secret create homepage index.html
-
Create an IIS service and grant it access to the
homepage
secret.docker service create --name my-iis --publish published=8000,target=8000 --secret src=homepage,target="\inetpub\wwwroot\index.html" microsoft/iis:nanoserver
Note: There is technically no reason to use secrets for this example. With Docker 17.06 and higher, configs are a better fit. This example is for illustration only.
-
Access the IIS service at
http://localhost:8000/
. It should serve the HTML content from the first step. -
Remove the service and the secret.
docker service rm my-iis docker secret rm homepage docker image remove secret-test
Intermediate example: Use secrets with a Nginx service
This example is divided into two parts. The first part is all about generating the site certificate and does not directly involve Docker secrets at all, but it sets up the second part, where you store and use the site certificate and Nginx configuration as secrets.
Generate the site certificate
Generate a root CA and TLS certificate and key for your site. For production
sites, you may want to use a service such as Let’s Encrypt
to generate the
TLS certificate and key, but this example uses command-line tools. This step
is a little complicated, but is only a set-up step so that you have
something to store as a Docker secret. If you want to skip these sub-steps,
you can use Let’s Encrypt to
generate the site key and certificate, name the files site.key
and
site.crt
, and skip to
Configure the Nginx container.
-
Generate a root key.
$ openssl genrsa -out "root-ca.key" 4096
-
Generate a CSR using the root key.
$ openssl req \ -new -key "root-ca.key" \ -out "root-ca.csr" -sha256 \ -subj '/C=US/ST=CA/L=San Francisco/O=Docker/CN=Swarm Secret Example CA'
-
Configure the root CA. Edit a new file called
root-ca.cnf
and paste the following contents into it. This constrains the root CA to signing leaf certificates and not intermediate CAs.[root_ca] basicConstraints = critical,CA:TRUE,pathlen:1 keyUsage = critical, nonRepudiation, cRLSign, keyCertSign subjectKeyIdentifier=hash
-
Sign the certificate.
$ openssl x509 -req -days 3650 -in "root-ca.csr" \ -signkey "root-ca.key" -sha256 -out "root-ca.crt" \ -extfile "root-ca.cnf" -extensions \ root_ca
-
Generate the site key.
$ openssl genrsa -out "site.key" 4096
-
Generate the site certificate and sign it with the site key.
$ openssl req -new -key "site.key" -out "site.csr" -sha256 \ -subj '/C=US/ST=CA/L=San Francisco/O=Docker/CN=localhost'
-
Configure the site certificate. Edit a new file called
site.cnf
and paste the following contents into it. This constrains the site certificate so that it can only be used to authenticate a server and can’t be used to sign certificates.[server] authorityKeyIdentifier=keyid,issuer basicConstraints = critical,CA:FALSE extendedKeyUsage=serverAuth keyUsage = critical, digitalSignature, keyEncipherment subjectAltName = DNS:localhost, IP:<IP_ADDRESS> subjectKeyIdentifier=hash
-
Sign the site certificate.
$ openssl x509 -req -days 750 -in "site.csr" -sha256 \ -CA "root-ca.crt" -CAkey "root-ca.key" -CAcreateserial \ -out "site.crt" -extfile "site.cnf" -extensions server
-
The
site.csr
andsite.cnf
files are not needed by the Nginx service, but you need them if you want to generate a new site certificate. Protect theroot-ca.key
file.
Configure the Nginx container
-
Produce a very basic Nginx configuration that serves static files over HTTPS. The TLS certificate and key are stored as Docker secrets so that they can be rotated easily.
In the current directory, create a new file called
site.conf
with the following contents:server { listen 443 ssl; server_name localhost; ssl_certificate /run/secrets/site.crt; ssl_certificate_key /run/secrets/site.key; location / { root /usr/share/nginx/html; index index.html index.htm; } }
-
Create three secrets, representing the key, the certificate, and the
site.conf
. You can store any file as a secret as long as it is smaller than 500 KB. This allows you to decouple the key, certificate, and configuration from the services that use them. In each of these commands, the last argument represents the path to the file to read the secret from on the host machine’s filesystem. In these examples, the secret name and the file name are the same.$ docker secret create site.key site.key $ docker secret create site.crt site.crt $ docker secret create site.conf site.conf
$ docker secret ls ID NAME CREATED UPDATED 2hvoi9mnnaof7olr3z5g3g7fp site.key 58 seconds ago 58 seconds ago aya1dh363719pkiuoldpter4b site.crt 24 seconds ago 24 seconds ago zoa5df26f7vpcoz42qf2csth8 site.conf 11 seconds ago 11 seconds ago
-
Create a service that runs Nginx and has access to the three secrets. The last part of the
docker service create
command creates a symbolic link from the location of thesite.conf
secret to/etc/nginx.conf.d/
, where Nginx looks for extra configuration files. This step happens before Nginx actually starts, so you don’t need to rebuild your image if you change the Nginx configuration.Note: Normally you would create a Dockerfile which copies the
site.conf
into place, build the image, and run a container using your custom image. This example does not require a custom image. It puts thesite.conf
into place and runs the container all in one step.In Docker 17.05 and earlier, secrets are always located within the
/run/secrets/
directory. Docker 17.06 and higher allow you to specify a custom location for a secret within the container. The two examples below illustrate the difference. The older version of this command requires you to create a symbolic link to the true location of thesite.conf
file so that Nginx can read it, but the newer version does not require this. The older example is preserved so that you can see the difference.-
Docker 17.06 and higher:
$ docker service create \ --name nginx \ --secret site.key \ --secret site.crt \ --secret source=site.conf,target=/etc/nginx/conf.d/site.conf \ --publish published=3000,target=443 \ nginx:latest \ sh -c "exec nginx -g 'daemon off;'"
-
Docker 17.05 and earlier:
$ docker service create \ --name nginx \ --secret site.key \ --secret site.crt \ --secret site.conf \ --publish published=3000,target=443 \ nginx:latest \ sh -c "ln -s /run/secrets/site.conf /etc/nginx/conf.d/site.conf && exec nginx -g 'daemon off;'"
The first example shows both the short and long syntax for secrets, and the second example shows only the short syntax. The short syntax creates files in
/run/secrets/
with the same name as the secret. Within the running containers, the following three files now exist:/run/secrets/site.key
/run/secrets/site.crt
/etc/nginx/conf.d/site.conf
(or/run/secrets/site.conf
if you used the second example)
-
-
Verify that the Nginx service is running.
$ docker service ls ID NAME MODE REPLICAS IMAGE zeskcec62q24 nginx replicated 1/1 nginx:latest $ docker service ps nginx NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS nginx.1.9ls3yo9ugcls nginx:latest moby Running Running 3 minutes ago
-
Verify that the service is operational: you can reach the Nginx server, and that the correct TLS certificate is being used.
$ curl --cacert root-ca.crt https://localhost:3000 <!DOCTYPE html>   <title>Welcome to nginx!</title>
Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support. refer to nginx.org.
 Commercial support is available at nginx.com.

Thank you for using nginx.

$ openssl s_client -connect localhost:3000 -CAfile root-ca.crt CONNECTED(00000003) depth=1 /C=US/ST=CA/L=San Francisco/O=Docker/CN=Swarm Secret Example CA verify return:1 depth=0 /C=US/ST=CA/L=San Francisco/O=Docker/CN=localhost verify return:1 --- Certificate chain 0 s:/C=US/ST=CA/L=San Francisco/O=Docker/CN=localhost i:/C=US/ST=CA/L=San Francisco/O=Docker/CN=Swarm Secret Example CA --- Server certificate -----BEGIN CERTIFICATE----- … -----END CERTIFICATE----- subject=/C=US/ST=CA/L=San Francisco/O=Docker/CN=localhost issuer=/C=US/ST=CA/L=San Francisco/O=Docker/CN=Swarm Secret Example CA --- No client certificate CA names sent --- SSL handshake has read 1663 bytes and written 712 bytes --- New, TLSv1/SSLv3, Cipher is AES256-SHA Server public key is 4096 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE SSL-Session: Protocol : TLSv1 Cipher : AES256-SHA Session-ID: A1A8BF35549C5715648A12FD7B7E3D861539316B03440187D9DA6C2E48822853 Session-ID-ctx: Master-Key: F39D1B12274BA16D3A906F390A61438221E381952E9E1E05D3DD784F0135FB81353DA38C6D5C021CB926E844DFC49FC4 Key-Arg : None Start Time:<PHONE_NUMBER> Timeout : 300 (sec) Verify return code: 0 (ok)
-
To clean up after running this example, remove the
nginx
service and the stored secrets.$ docker service rm nginx $ docker secret rm site.crt site.key site.conf
Advanced example: Use secrets with a WordPress service
In this example, you create a single-node MySQL service with a custom root password, add the credentials as secrets, and create a single-node WordPress service which uses these credentials to connect to MySQL. The next example builds on this one and shows you how to rotate the MySQL password and update the services so that the WordPress service can still connect to MySQL.
This example illustrates some techniques to use Docker secrets to avoid saving sensitive credentials within your image or passing them directly on the command line.
Note: This example uses a single-Engine swarm for simplicity, and uses a single-node MySQL service because a single MySQL server instance cannot be scaled by simply using a replicated service, and setting up a MySQL cluster is beyond the scope of this example.
Also, changing a MySQL root passphrase isn’t as simple as changing a file on disk. You must use a query or a
mysqladmin
command to change the password in MySQL.
-
Generate a random alphanumeric password for MySQL and store it as a Docker secret with the name
mysql_password
using thedocker secret create
command. To make the password shorter or longer, adjust the last argument of theopenssl
command. This is just one way to create a relatively random password. You can use another command to generate the password if you choose.Note: After you create a secret, you cannot update it. You can only remove and re-create it, and you cannot remove a secret that a service is using. However, you can grant or revoke a running service’s access to secrets using
docker service update
. If you need the ability to update a secret, consider adding a version component to the secret name, so that you can later add a new version, update the service to use it, then remove the old version.The last argument is set to
-
, which indicates that the input is read from standard input.$ openssl rand -base64 20 | docker secret create mysql_password - l1vinzevzhj4goakjap5ya409
The value returned is not the password, but the ID of the secret. In the remainder of this tutorial, the ID output is omitted.
Generate a second secret for the MySQL
root
user. This secret isn’t shared with the WordPress service created later. It’s only needed to bootstrap themysql
service.$ openssl rand -base64 20 | docker secret create mysql_root_password -
List the secrets managed by Docker using
docker secret ls
:$ docker secret ls ID NAME CREATED UPDATED l1vinzevzhj4goakjap5ya409 mysql_password 41 seconds ago 41 seconds ago yvsczlx9votfw3l0nz5rlidig mysql_root_password 12 seconds ago 12 seconds ago
The secrets are stored in the encrypted Raft logs for the swarm.
-
Create a user-defined overlay network which is used for communication between the MySQL and WordPress services. There is no need to expose the MySQL service to any external host or container.
$ docker network create -d overlay mysql_private
-
Create the MySQL service. The MySQL service has the following characteristics:
- Because the scale is set to
1
, only a single MySQL task runs. Load-balancing MySQL is left as an exercise to the reader and involves more than just scaling the service. - Only reachable by other containers on the
mysql_private
network. - Uses the volume
mydata
to store the MySQL data, so that it persists across restarts to themysql
service. - The secrets are each mounted in a
tmpfs
filesystem at/run/secrets/mysql_password
and/run/secrets/mysql_root_password
. They are never exposed as environment variables, nor can they be committed to an image if thedocker commit
command is run. Themysql_password
secret is the one used by the non-privileged WordPress container to connect to MySQL. - Sets the environment variables
MYSQL_PASSWORD_FILE
andMYSQL_ROOT_PASSWORD_FILE
to point to the files/run/secrets/mysql_password
and/run/secrets/mysql_root_password
. Themysql
image reads the password strings from those files when initializing the system database for the first time. Afterward, the passwords are stored in the MySQL system database itself. -
Sets environment variables
MYSQL_USER
andMYSQL_DATABASE
. A new database calledwordpress
is created when the container starts, and thewordpress
user has full permissions for this database only. This user cannot create or drop databases or change the MySQL configuration.$ docker service create \ --name mysql \ --replicas 1 \ --network mysql_private \ --mount type=volume,source=mydata,destination=/var/lib/mysql \ --secret source=mysql_root_password,target=mysql_root_password \ --secret source=mysql_password,target=mysql_password \ -e MYSQL_ROOT_PASSWORD_FILE="/run/secrets/mysql_root_password" \ -e MYSQL_PASSWORD_FILE="/run/secrets/mysql_password" \ -e MYSQL_USER="wordpress" \ -e MYSQL_DATABASE="wordpress" \ mysql:latest
- Because the scale is set to
-
Verify that the
mysql
container is running using thedocker service ls
command.$ docker service ls ID NAME MODE REPLICAS IMAGE wvnh0siktqr3 mysql replicated 1/1 mysql:latest
At this point, you could actually revoke the
mysql
service’s access to themysql_password
andmysql_root_password
secrets because the passwords have been saved in the MySQL system database. Don’t do that for now, because we use them later to facilitate rotating the MySQL password. -
Now that MySQL is set up, create a WordPress service that connects to the MySQL service. The WordPress service has the following characteristics:
- Because the scale is set to
1
, only a single WordPress task runs. Load-balancing WordPress is left as an exercise to the reader, because of limitations with storing WordPress session data on the container filesystem. - Exposes WordPress on port 30000 of the host machine, so that you can access it from external hosts. You can expose port 80 instead if you do not have a web server running on port 80 of the host machine.
- Connects to the
mysql_private
network so it can communicate with themysql
container, and also publishes port 80 to port 30000 on all swarm nodes. - Has access to the
mysql_password
secret, but specifies a different target file name within the container. The WordPress container uses the mount point/run/secrets/wp_db_password
. Also specifies that the secret is not group-or-world-readable, by setting the mode to0400
. - Sets the environment variable
WORDPRESS_DB_PASSWORD_FILE
to the file path where the secret is mounted. The WordPress service reads the MySQL password string from that file and add it to thewp-config.php
configuration file. - Connects to the MySQL container using the username
wordpress
and the password in/run/secrets/wp_db_password
and creates thewordpress
database if it does not yet exist. - Stores its data, such as themes and plugins, in a volume called
wpdata
so these files persist when the service restarts.
$ docker service create \ --name wordpress \ --replicas 1 \ --network mysql_private \ --publish published=30000,target=80 \ --mount type=volume,source=wpdata,destination=/var/www/html \ --secret source=mysql_password,target=wp_db_password,mode=0400 \ -e WORDPRESS_DB_USER="wordpress" \ -e WORDPRESS_DB_PASSWORD_FILE="/run/secrets/wp_db_password" \ -e WORDPRESS_DB_HOST="mysql:3306" \ -e WORDPRESS_DB_NAME="wordpress" \ wordpress:latest
- Because the scale is set to
-
Verify the service is running using
docker service ls
anddocker service ps
commands.$ docker service ls ID NAME MODE REPLICAS IMAGE wvnh0siktqr3 mysql replicated 1/1 mysql:latest nzt5xzae4n62 wordpress replicated 1/1 wordpress:latest
$ docker service ps wordpress ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS aukx6hgs9gwc wordpress.1 wordpress:latest moby Running Running 52 seconds ago
At this point, you could actually revoke the WordPress service’s access to the
mysql_password
secret, because WordPress has copied the secret to its configuration filewp-config.php
. Don’t do that for now, because we use it later to facilitate rotating the MySQL password. -
Access
http://localhost:30000/
from any swarm node and set up WordPress using the web-based wizard. All of these settings are stored in the MySQLwordpress
database. WordPress automatically generates a password for your WordPress user, which is completely different from the password WordPress uses to access MySQL. Store this password securely, such as in a password manager. You need it to log into WordPress after rotating the secret.Go ahead and write a blog post or two and install a WordPress plugin or theme to verify that WordPress is fully operational and its state is saved across service restarts.
-
Do not clean up any services or secrets if you intend to proceed to the next example, which demonstrates how to rotate the MySQL root password.
Example: Rotate a secret
This example builds upon the previous one. In this scenario, you create a new
secret with a new MySQL password, update the mysql
and wordpress
services to
use it, then remove the old secret.
Note: Changing the password on a MySQL database involves running extra queries or commands, as opposed to just changing a single environment variable or a file, since the image only sets the MySQL password if the database doesn’t already exist, and MySQL stores the password within a MySQL database by default. Rotating passwords or other secrets may involve additional steps outside of Docker.
-
Create the new password and store it as a secret named
mysql_password_v2
.$ openssl rand -base64 20 | docker secret create mysql_password_v2 -
-
Update the MySQL service to give it access to both the old and new secrets. Remember that you cannot update or rename a secret, but you can revoke a secret and grant access to it using a new target filename.
$ docker service update \ --secret-rm mysql_password mysql $ docker service update \ --secret-add source=mysql_password,target=old_mysql_password \ --secret-add source=mysql_password_v2,target=mysql_password \ mysql
Updating a service causes it to restart, and when the MySQL service restarts the second time, it has access to the old secret under
/run/secrets/old_mysql_password
and the new secret under/run/secrets/mysql_password
.Even though the MySQL service has access to both the old and new secrets now, the MySQL password for the WordPress user has not yet been changed.
Note: This example does not rotate the MySQL
root
password. -
Now, change the MySQL password for the
wordpress
user using themysqladmin
CLI. This command reads the old and new password from the files in/run/secrets
but does not expose them on the command line or save them in the shell history.Do this quickly and move on to the next step, because WordPress loses the ability to connect to MySQL.
First, find the ID of the
mysql
container task.$ docker ps --filter name=mysql -q c7705cf6176f
Substitute the ID in the command below, or use the second variant which uses shell expansion to do it all in a single step.
$ docker container exec <CONTAINER_ID> \ bash -c 'mysqladmin --user=wordpress --password="$(< /run/secrets/old_mysql_password)" password "$(< /run/secrets/mysql_password)"'
or:
$ docker container exec $(docker ps --filter name=mysql -q) \ bash -c 'mysqladmin --user=wordpress --password="$(< /run/secrets/old_mysql_password)" password "$(< /run/secrets/mysql_password)"'
-
Update the
wordpress
service to use the new password, keeping the target path at/run/secrets/wp_db_secret
and keeping the file permissions at0400
. This triggers a rolling restart of the WordPress service and the new secret is used.$ docker service update \ --secret-rm mysql_password \ --secret-add source=mysql_password_v2,target=wp_db_password,mode=0400 \ wordpress
-
Verify that WordPress works by browsing to http://localhost:30000/ on any swarm node again. Use the WordPress username and password from when you ran through the WordPress wizard in the previous task.
Verify that the blog post you wrote still exists, and if you changed any configuration values, verify that they are still changed.
-
Revoke access to the old secret from the MySQL service and remove the old secret from Docker.
$ docker service update \ --secret-rm mysql_password \ mysql $ docker secret rm mysql_password
-
If you want to try the running all of these examples again or just want to clean up after running through them, use these commands to remove the WordPress service, the MySQL container, the
mydata
andwpdata
volumes, and the Docker secrets.$ docker service rm wordpress mysql $ docker volume rm mydata wpdata $ docker secret rm mysql_password_v2 mysql_root_password
Build support for Docker Secrets into your images
If you develop a container that can be deployed as a service and requires sensitive data, such as a credential, as an environment variable, consider adapting your image to take advantage of Docker secrets. One way to do this is to ensure that each parameter you pass to the image when creating the container can also be read from a file.
Many of the official images in the Docker library, such as the wordpress image used in the above examples, have been updated in this way.
When you start a WordPress container, you provide it with the parameters it
needs by setting them as environment variables. The WordPress image has been
updated so that the environment variables which contain important data for
WordPress, such as WORDPRESS_DB_PASSWORD
, also have variants which can read
their values from a file (WORDPRESS_DB_PASSWORD_FILE
). This strategy ensures
that backward compatibility is preserved, while allowing your container to read
the information from a Docker-managed secret instead of being passed directly.
Note: Docker secrets do not set environment variables directly. This was a conscious decision, because environment variables can unintentionally be leaked between containers (for instance, if you use
--link
).
Use Secrets in Compose
version: '3.1'
services:
db:
image: mysql:latest
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_root_password
- db_password
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "8000:80"
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_password
secrets:
db_password:
file: db_password.txt
db_root_password:
file: db_root_password.txt
volumes:
db_data:
This example creates a simple WordPress site using two secrets in a compose file.
The keyword secrets:
defines two secrets db_password:
and
db_root_password:
.
When deploying, Docker creates these two secrets and populates them with the content from the file specified in the compose file.
The db service uses both secrets, and the wordpress is using one.
When you deploy, Docker mounts a file under /run/secrets/<secret_name>
in the
services. These files are never persisted in disk, but are managed in memory.
Each service uses environment variables to specify where the service should look for that secret data.
More information on short and long syntax for secrets can be found at Compose file version 3 reference.
swarm, secrets, credentials, sensitive strings, sensitive data, security, encryption, encryption at rest


Nineteen-year-old private Billy Lynn (Joe Alwyn), along with his fellow soldiers in Bravo Squad, becomes a hero after a harrowing Iraq battle and is brought home temporarily for a victory tour. Through flashbacks, culminating at the spectacular halftime show of the Thanksgiving Day football game, what really happened to the squad is revealed, contrasting the realities of the war with America's perceptions. Based on the novel by Ben Fountain.
Release date: November 11, 2016 (USA)
Director: Ang Lee
Box office: 23.8 million USD
Budget: 40 million USD
Cinematography: John Toll


Roadmap
v2.x - Maintenance Mode
No new features are being worked on for v2.x.
v3.0 - Brainstorming, no timeline
Focus
- Nailing the mobile experience
- Fluid iteractions across devices
- Maintaining ease of setup
Not planned for v3.0
The goal of this script from it's beginnings till today is to to provide a better image viewing experience.
- HTML or video content: If you need to show html or video content, I recommend googling for an alternative script as there are many options.
- Social sharing buttons
Image support
srcset
and <picture>
: Investigate
- EXIF rotation data: Investigate
- File formats: All formats supported by the browser utilized? Test vector formats, e.g. SVG. Test animated, e.g. GIF.
Interactions
- Swipe gesture: Allow swiping horizontally to navigate between images in a set. Up and down to exist.
- Wide images on mobile: Explore cropping when height would be reduced substantially on mobile devices. Allow swiping, and maybe tilt, support to view full image. Hint at behavior by doing small horizontal slide in when opening? What does tapping do? How does horizontal swiping affect navigation in sets?
- If user attempts to go forward when at end of image set, animation (shake?) indicating the end or option to close Lightbox.
- Make sure right-click/long pressing works to access the image's context menu.
Layout
- Allow vertical centering.
- Update sizing on window resize.
- Should the dev be able to choose the position of the caption, close button, and nav controls?
- Optimize layout for mobile.
- Optimize layout for screens of varying densities.
- Should the close button still live in the bottom right corner?
Animations
- Start/end animation: Animate towards the trigger.
- Easing: Speed up and include bounce? Options to control?
- Performant animations: Rewrite to use transforms exclusively.
Assets
- Use inline SVG for UI elements.
Caching
- Preloading: Review if and which images should be preloaded. Options?
Error Handling
- What happens when an image url is incorrect?
- What happens when an image takes too long to load?
Native behavior and accessibility
- Right-click support: Bring up image context menu. Allow saving and copying image.
- Should opening lightbox update the url? and should this url be parsed on page load to show Lightbox automatically?
- Review alt attributes.
- Review ARIA roles.
- Review constrast ratios.
- Review keyboard input and tabbing.
- Review click/touch target size.
- Test with screen reader.
API
- Do not initialize automatically and allow multiple instances.
- Add event handlers.
- Allow setting options on the fly.
- Allow the setting of options from HTML?
- Evaluate preloading and caching.
- Allow placement inside of a specified element? Orig feature requester was dealing with iframe.
Dependencies


GridEZ.framework
Introduction
The GridEZ framework was written to make Xgrid integration in your application very easy. The XgridFoundation API is powerful, but complicated to use. To allow the user to connect to a Controller, submit a job and get the results back, you have to write hundreds of lines of code using the XgridFoundation, and manage a complex chain of asynchronous callbacks that XgridFoundation requires you to follow. The GridEZ framework provides easy-to-use objects that hide this complexity, and yet provide most of the functionality you need. For instance, when you submit a job, the results will be automatically loaded in your application when the job finishes and all is left to you is to write the delegate method to handle it. If you have never used the XgridFoundation APIs, you might wonder what the big deal is. But if you have, you probably already realize how GridEZ might make your life much much easier...
Examples
To better see what you can do with GridEZ, the best place to start is in the Examples folder in the GridEZ distribution. The code used in these examples is released under the modified BSD license, so you can freely use it and modify it for your application. The PolyShell example is explained in greater detail in a tutorial.
- PolyShell: this is a very simple example application, with just one class, 8 methods, and ~30 lines of actual code; yet, it is already quite powerful; the user can connect to an Xgrid Controller, type a list of shell commands, and have PolyShell submit them all in one job, and browse the results when they are done
- XgridCal: a slightly more complex application, with 2 classes; XgridCal makes use of the GEZMetaJob class, which can be used in any application where you want to submit a bunch of independent tasks that can be run in any order on the grid (for instance, 3D rendering of the frames of an animation movie). Just provide a dataSource to provide the number of tasks, the task specifications and handle the results, and the MetaJob takes care of the rest.
Features
- the XgridFoundation API is powerful, but complicated to use; the GridEZ framework provides easy-to-use objects that hide the complex chain of asynchronous callbacks that XgridFoundation requires you to follow:
- GEZServer: easy-to-use wrapper for XGController/XGConnection
- GEZJob: wrapper for XGJob; submission and result retrieval as it should be: submit a job and get the results in a delegate method
- GEZGrid: for more advanced uses, you may need to occasionally specify a specific grid to submit jobs to (by default, submitting to a server will submit to the default grid)
- Bonjour browser: with just one call to the startBrowsing method, you get all the local Xgrid Controllers available to the user and ready to be used by your application
- Controller Connection Window: without writing any code, your application can let the user connect to any Xgrid Controllers she has access to using the prebuilt connection panel that handles local and remote connections, authentication,...; your application can then easily access these servers or be notified when the user connects to them
- integration with CoreData; with just one call to the save method, your application will automatically save all the information about the jobs it submitted and the server it connected to in the past; for instance, the user may quit your application and come back later to retrieve all the jobs that are now finished, and you don't have to write any code to provide that functionality
Side effects
Because some users are sensitive to that issue, it is important for you to realize that when using the GridEZ.framework, your application will now create the following folder and add some files inside this location, in the user's folder:
- ~/Library/Application Support/THENAMEOFYOURAPP/GridEZ
- ~/Library/Application Support/GridEZ
This is where persistent information about the xgrid servers and jobs is stored.
The creation of these files can be disabled using appropriate keys in the Info.plist file of your application (see below section on Advanced Options). At present, it can't be disabled for standalone non-GUI tools.
Adding GridEZ.framework to your Xcode project
The integration of GridEZ.framework into your application is similar to the use of any other framework. The following instructions are for Xcode 2.2. For a more detailed example, read the PolyShell tutorial.
To be able to compile your application and link it to the GridEZ framework, you should do the following:
- Copy GridEZ.framework to a location that Xcode can find, for instance ~/Library/Frameworks
- Select the menu Project ... Add to Project... and select the GridEZ.framework package in the file selection sheet
- In the next panel, make sure the check box for you target is selected
- In this same panel, you probably don't want to make a copy of it if it is already in ~/Library/Frameworks or a location Xcode can find
- Ideally, you want to place the GridEZ.framework item in the the 'Linked Frameworks' group in the 'Groups & Files' pane
- Add an
#import
where needed, for instance in your prefix header
The easiest way to have GridEZ.framework available at runtime is to embed it in your application (the binary of the framework was compiled with the installation path "@executable_path/../Frameworks"). To use it this way, you should add a copy phase to the target:
- If you have more than one target in your project, make sure you select the target of interest
- Select the menu Project ... New Build Phase ... New Copy Files Build Phase
- This will add an item in the 'Groups & Files' pane: Targets > YourTarget > CopyFiles
- The inspector panel for that 'Copy Files' item will open automatically, but you can always go back to it by selecting it the 'Groups & Files' pane, and selecting the menu File ... Get Info
- In this inspector panel, select Frameworks in the pop-up menu for Destination
- You can close the inspector panel
- In the 'Groups & Files' pane, drag the GridEZ.framework item into the newly created 'CopyFiles' group
Finally, you will usually want to link to the XgridFoundation.framework, installed by Apple in /System/Library/Frameworks. For convenience, the GridEZ header already #import the header, but you still have to explicity link to XgridFoundation if you use any of its symbols. In particular, you will probably want to use the keys defined by XgridFoundation to build the specification dictionary needed to submit a job.
Here are some relevant internet links with more details on linking/embedding frameworks:
Advanced options
Some options can be set by editing the Info.plist file of the application that uses the GridEZ.framework. Here is a list of the supported keys:
- GEZShouldUseUndoManager: by default, the default managed object context created by the framework will not have an NSUndoManager attached to it; you can force the addition of one using this key
- GEZStoreType: by default, the default managed object context created by the framework will create a store of type SQLLite; you can change this by setting the value of this key to one of these strings:
- SQLite
- XML
- Binary
- InMemory
For instance, you would add the following lines in the Info.plist file to add an NSUndoManager to the application-wide managedObjectContext and to use an XML store:
<key>GEZShouldUseUndoManager</key>
<string>YES</string>
<key>GEZStoreType</key>
<string>XML</string>


|
1-Wire API for .NET Version 4.00
|
1-Wire temperature interface class for basic temperature measuring operations. More...
Inherits com::dalsemi::onewire::container::OneWireSensor.
Inherited by OneWireContainer10, OneWireContainer21, OneWireContainer22, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
Public Member Functions | |
| boolean | hasTemperatureAlarms () |
| Checks to see if this temperature measuring device has high/low trip alarms. | |
| boolean | hasSelectableTemperatureResolution () |
| Checks to see if this device has selectable temperature resolution. | |
| double[] | getTemperatureResolutions () |
| Get an array of available temperature resolutions in Celsius. | |
| double | getTemperatureAlarmResolution () throws OneWireException |
| Gets the temperature alarm resolution in Celsius. | |
| double | getMaxTemperature () |
| Gets the maximum temperature in Celsius. | |
| double | getMinTemperature () |
| Gets the minimum temperature in Celsius. | |
| void | doTemperatureConvert (byte[] state) throws OneWireIOException, OneWireException |
| Performs a temperature conversion. | |
| double | getTemperature (byte[] state) throws OneWireIOException |
Gets the temperature value in Celsius from the state data retrieved from the readDevice() method. | |
| double | getTemperatureAlarm (int alarmType, byte[] state) throws OneWireException |
Gets the specified temperature alarm value in Celsius from the state data retrieved from the readDevice() method. | |
| double | getTemperatureResolution (byte[] state) |
Gets the current temperature resolution in Celsius from the state data retrieved from the readDevice() method. | |
| void | setTemperatureAlarm (int alarmType, double alarmValue, byte[] state) throws OneWireException |
Sets the temperature alarm value in Celsius in the provided state data. | |
| void | setTemperatureResolution (double resolution, byte[] state) throws OneWireException |
Sets the current temperature resolution in Celsius in the provided state data. | |
Static Public Attributes | |
| static final int | ALARM_HIGH = 1 |
| high temperature alarm | |
| static final int | ALARM_LOW = 0 |
| low temperature alarm |
1-Wire temperature interface class for basic temperature measuring operations.
This class should be implemented for each temperature type 1-Wire device.
The TemperatureContainer methods can be organized into the following categories:
Display some features of TemperatureContainer instance 'tc
':
// Read High and Low Alarms
if (!tc.hasTemperatureAlarms())
System.out.println("Temperature alarms not supported");
else
{
byte[] state = tc.readDevice();
double alarmLow = tc.getTemperatureAlarm(TemperatureContainer.ALARM_LOW, state);
double alarmHigh = tc.getTemperatureAlarm(TemperatureContainer.ALARM_HIGH, state);
System.out.println("Alarm: High = " + alarmHigh + ", Low = " + alarmLow);
} }
Gets temperature reading from a TemperatureContainer instance 'tc
':
double lastTemperature;
// get the current resolution and other settings of the device (done only once)
byte[] state = tc.readDevice();
do // loop to read the temp
{
// perform a temperature conversion
tc.doTemperatureConvert(state);
// read the result of the conversion
state = tc.readDevice();
// extract the result out of state
lastTemperature = tc.getTemperature(state);
...
}while (!done);
The reason the conversion and the reading are separated is that one may want to do a conversion without reading the result. One could take advantage of the alarm features of a device by setting a threshold and doing conversions until the device is alarming. For example:
// get the current resolution of the device
byte [] state = tc.readDevice();
// set the trips
tc.setTemperatureAlarm(TemperatureContainer.ALARM_HIGH, 50, state);
tc.setTemperatureAlarm(TemperatureContainer.ALARM_LOW, 20, state);
tc.writeDevice(state);
do // loop on conversions until an alarm occurs
{
tc.doTemperatureConvert(state);
} while (!tc.isAlarming());
Sets the temperature resolution of a TemperatureContainer instance 'tc
':
byte[] state = tc.readDevice();
if (tc.hasSelectableTemperatureResolution())
{
double[] resolution = tc.getTemperatureResolutions();
tc.setTemperatureResolution(resolution [resolution.length - 1], state);
tc.writeDevice(state);
}
| void doTemperatureConvert | ( | byte[] | state | ) | throws OneWireIOException, OneWireException |
Performs a temperature conversion.
| state | byte array with device state information |
| OneWireException | Part could not be found [ fatal ] |
| OneWireIOException | Data wasn't transferred properly [ recoverable ] |
Implemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| double getMaxTemperature | ( | ) |
Gets the maximum temperature in Celsius.
Implemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| double getMinTemperature | ( | ) |
Gets the minimum temperature in Celsius.
Implemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| double getTemperature | ( | byte[] | state | ) | throws OneWireIOException |
Gets the temperature value in Celsius from the state
data retrieved from the readDevice()
method.
| state | byte array with device state information |
doTemperatureConvert()
| OneWireIOException | In the case of invalid temperature data |
Implemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| double getTemperatureAlarm | ( | int | alarmType, |
| byte[] | state | ||
| ) | throws OneWireException |
Gets the specified temperature alarm value in Celsius from the state
data retrieved from the readDevice()
method.
| alarmType | valid value: ALARM_HIGH or ALARM_LOW |
| state | byte array with device state information |
| OneWireException | Device does not support temperature alarms |
Implemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| double getTemperatureAlarmResolution | ( | ) | throws OneWireException |
Gets the temperature alarm resolution in Celsius.
| OneWireException | Device does not support temperature alarms |
Implemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| double getTemperatureResolution | ( | byte[] | state | ) |
Gets the current temperature resolution in Celsius from the state
data retrieved from the readDevice()
method.
| state | byte array with device state information |
Implemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| double [] getTemperatureResolutions | ( | ) |
Get an array of available temperature resolutions in Celsius.
Implemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| boolean hasSelectableTemperatureResolution | ( | ) |
Checks to see if this device has selectable temperature resolution.
true
if this TemperatureContainer
has selectable temperature resolutionImplemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| boolean hasTemperatureAlarms | ( | ) |
Checks to see if this temperature measuring device has high/low trip alarms.
true
if this TemperatureContainer
has high/low trip alarmsImplemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| void setTemperatureAlarm | ( | int | alarmType, |
| double | alarmValue, | ||
| byte[] | state | ||
| ) | throws OneWireException |
Sets the temperature alarm value in Celsius in the provided state
data.
Use the method writeDevice()
with this data to finalize the change to the device.
| alarmType | valid value: ALARM_HIGH or ALARM_LOW |
| alarmValue | alarm trip value in Celsius |
| state | byte array with device state information |
| OneWireException | Device does not support temperature alarms |
Implemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.
| void setTemperatureResolution | ( | double | resolution, |
| byte[] | state | ||
| ) | throws OneWireException |
Sets the current temperature resolution in Celsius in the provided state
data.
Use the method writeDevice()
with this data to finalize the change to the device.
| resolution | temperature resolution in Celsius |
| state | byte array with device state information |
| OneWireException | Device does not support selectable temperature resolution |
Implemented in OneWireContainer10, OneWireContainer21, OneWireContainer28, OneWireContainer30, OneWireContainer41, and OneWireContainer42.


Home
Similar images for image {{ image_name }}
Chosen clinical findings
{% for i in range(findings|length) %}
{{ findings[i] }}
{% endfor %}
Similar Images:
{% for image_filename in top20_image_paths %}
{% endfor %}


2017-07-05
15. 3 Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note: The solution set must not contain duplicate triplets.
For example, given array S = [-1, 0, 1, 2, -1, -4],
A solution set is: [ [-1, 0, 1], [-1, -1, 2] ]
Thought Process:
This question is a modification from the 2 sum question. I can start thinking if we can reduce this question into the 2 sum question. We can try to fix the first number and then use the negative of the first number as a target to find the two numbers that sum up to it. This is exactly like the 2 sum question, since the question requires there is no duplicate in the solution we cannot use the “complement stored in the array approach method”, because the key have to be unique. We will try the sliding window method. Sort the array first, fix the first number, two pointers pointing to the front and back of rest of the array, then slide front* and back* according to the comparison between the sum and the target to find the other numbers.
class Solution {
public:
vector<vector<int>> threeSum(vector<int>& nums) {
vector<vector<int>> res;
sort(nums.begin(), nums.end());
int length = nums.size();
int front;
int back;
for (int i = 0; i < length; i++){
int target = -nums[i];
// Finding answer which start from number num[i]
front = i+1;
back = length-1;
while(front < back){
int sum = nums[front] + nums[back];
if (sum < target){
front++;
}
else if (sum > target){
back--;
}
else {
vector<int> one = {nums[i], nums[front], nums[back]};
res.push_back(one);
// Processing duplicates of Number 2
// Rolling the front pointer to the next different number forwards
while (front < back && nums[front] == one[1]){
front++;
}
// Processing duplicates of Number 3
// Rolling the back pointer to the next different number backwards
while (front < back && nums[back] == one[2]){
back--;
}
}
}
// Processing duplicates of Number 1
while (i < length-1 && nums[i] == nums[i+1]){
i++;
}
}
return res;
}
};
121. Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.
Example 1: Input: [7, 1, 5, 3, 6, 4] Output: 5
max. difference = 6-1 = 5 (not 7-1 = 6, as selling price needs to be larger than buying price) Example 2: Input: [7, 6, 4, 3, 1] Output: 0
In this case, no transaction is done, i.e. max profit = 0.
Thought Process:
My first thought for this question is to keep track of the highest and lowest number in the array, and the highest have to occur after the lowest one, but this make this question much more complicated than it should be. Actually we only need to keep track of the lowest number encountered so far, and keep using the current number subtract the lowest number to find the profit, update the maximum profit if needed.
class Solution {
public:
int maxProfit(vector<int>& prices) {
if (prices.size() < 2) {
return 0;
}
int min = prices[0];
int profit = 0;
for (int i = 1; i < prices.size(); i++) {
if (prices[i] < min) {
min = prices[i];
}
else {
if (prices[i]-min > profit){
profit = prices[i]-min;
}
}
}
return profit;
}
};
122. Best Time to Buy and Sell Stock II
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times). However, you may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).
Thought Process:
If we can make multiple transactions, the maximum profit can be found if we make a profit whenever there is a profit, that is do a subtraction whenever the price next day is higher than the previous one, and add the profit into the total profit.
class Solution {
public:
int maxProfit(vector<int>& prices) {
if (prices.size() < 2){
return 0;
}
int prev = prices[0];
int profit = 0;
for (int i = 1; i < prices.size(); i++){
if (prices[i] > prev){
profit += prices[i] - prev;
}
prev = prices[i];
}
return profit;
}
};


{% extends "layout.html" %} {% block pageTitle %} GOV.UK Content Publisher prototype {% endblock %} {% block pageScripts %} {% endblock %} {% block beforeContent %} {% include "includes/phase-banner.html" %} {{ govukBackLink({ text: "Back", href: actions.back }) }} {% endblock %} {% block content %}
Are you sure you want to delete this draft?
This will delete all content you have added and cannot be undone.


Register
First Name:
Last Name:
Gender:
Male
Female
Other
Email:
Password:
Birthday:
Month
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Day
1
2
3
4
5
6
7
8
9
10
Year
1985
1986
1987
1988
1989
1990
I agree to the terms and conditions
Submit


Yamaha TG33
Multimode Patch Editor
This patch editor will work with the Yamaha TG33, but not the SY22 nor SY35.
Communicating with Edisyn
Set your synthesizer to receive and transmit on the same MIDI channel (perhaps Channel 1). Turn on Program Change and System Exclusive data. The TG-33 also has a "device number": ideally this should be set to the same as the MIDI channel. You set both the device number and MIDI channel in Edisyn when connecting to the synthesizer via the Change MIDI menu.
About the "Show" Button
If you press the Show button, Edisyn will request the appropriate single-mode patch. However, the patch will not properly load unless you are first (manually) in Voice mode. You must select Voice mode before you press the Show button.
Gotchas
- Edisyn cannot write patches to patch memory locations: you can only send them to the current working memory. From there, you will have to manually save them to an appropriate memory location if you like.
- The TG33 is very slow in responding to real-time parameter changes.
- The TG33 may occasionally get caught in a strange "Cannot Edit" warning message on-screen when receiving real-time parameter changes. You can get it out of this by selecting the multi and edit buttons again, or some similar combination.
| By
| Sean Luke
|
| Date
| January 2020
|


Modules
XStream project consists of several modules:
- xstream - the core module
- xstream-benchmark - the benchmark tool
- xstream-distribution - the module contains the documentation and assembles the src and bin distributions
When you checkout the trunk you'll get all the modules, but you can just add the module you are interested in to the URL, e.g.
svn co http://svn.codehaus.org/xstream/trunk/[module]
to checkout out the single module separately.
Browser
You can use the browser to navigate within the sources online
with the help of the FishEye installation on Codehaus.
Subversion
XStream uses Subversion as the SCM. See Subversion website for details and documentation on IDE integration.
WebDav Access
WebDav is an access protocol supported by SVN and being http-based is often allowed by corporate firewalls.
Anonymous Access
svn co http://svn.codehaus.org/xstream/trunk
You might also use this URL to browse the repository in a simple manner.
Committer Access
svn co https://svn.codehaus.org/xstream/trunk
This access protocol is available to all, but only developers can commit changes.
Developers require a LDAP password for Codehaus username (contact Bob at the Haus to get assigned a password if you don't have one).


Name: Marten Dobbins
Course: CIS 155
Date: June 13th, 2020
V1 Additions:
☞Added link to video.
☞Added image of band members.
☞Added about.html, styles.css, index.html, and discography.html files.
V2 Additions:
☞Added text and box shadows.
☞Added album artwork to discography page.
☞Added links to individual song names that go to their respective video.
☞Added a semi-transparent image of the band's members to the homepage.
☞Added link to the playlist of each album on each album artwork with imagemap.
☞Changed footer and header to actually fill their areas of the page instead of leaving blank space on the sides.
☞Blank space for overflow
☞Blank space for overflow
☞Blank space for overflow
☞Blank space for overflow
☞Blank space for overflow
☞Blank space for overflow
☞Blank space for overflow
☞Overflow added to the about page
V3 Additions:
☞Added an info page.
☞Added flexbox to info page.
☞Changed text shadow for visibility.
☞Added a social media submenu to the new info page.
☞Added information pertaining to the band on the info page.
☞Moved the social media submenu from the info page to the home page.
V4 Additions:
☞Added really low quality Sam Melo gif to the home page.
☞Changed positioning of the table on the info page to set below the image.
☞Switched the image on the about page for an iframe that shows the official RKS website.
☞Added a slight animation change to the discography page that covers the area behind the divs.
☞Moved the social media list into a div and made a div setup similar to the discography page on the homepage.


truncate, ftruncate - truncate a file to a specified length
#include <unistd.h>
#include <sys/types.h>
int truncate(const char *path, off_t
length);
int ftruncate(int fd, off_t length);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
truncate():
_XOPEN_SOURCE >= 500
|| /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
|| /* Glibc versions <= 2.19: */ _BSD_SOURCE
ftruncate():
_XOPEN_SOURCE >= 500
|| /* Since glibc 2.3.5: */ _POSIX_C_SOURCE >= 200112L
|| /* Glibc versions <= 2.19: */ _BSD_SOURCE
The truncate() and ftruncate() functions cause the regular file
named by path or referenced by fd to be truncated to a size of
precisely length bytes.
If the file previously was larger than this size, the extra data
is lost. If the file previously was shorter, it is extended, and the
extended part reads as null bytes ('\0').
The file offset is not changed.
If the size changed, then the st_ctime and st_mtime fields
(respectively, time of last status change and time of last modification; see
inode(7)) for the file are updated, and the set-user-ID and
set-group-ID mode bits may be cleared.
With ftruncate(), the file must be open for writing; with
truncate(), the file must be writable.
On success, zero is returned. On error, -1 is returned, and errno is set
appropriately.
For truncate():
- EACCES
- Search permission is denied for a component of the path prefix, or the
named file is not writable by the user. (See also
path_resolution(7).)
- EFAULT
- The argument path points outside the process's allocated address
space.
- EFBIG
- The argument length is larger than the maximum file size.
(XSI)
- EINTR
- While blocked waiting to complete, the call was interrupted by a signal
handler; see fcntl(2) and signal(7).
- EINVAL
- The argument length is negative or larger than the maximum file
size.
- EIO
- An I/O error occurred updating the inode.
- EISDIR
- The named file is a directory.
- ELOOP
- Too many symbolic links were encountered in translating the pathname.
- ENAMETOOLONG
- A component of a pathname exceeded 255 characters, or an entire pathname
exceeded 1023 characters.
- ENOENT
- The named file does not exist.
- ENOTDIR
- A component of the path prefix is not a directory.
- EPERM
- The underlying filesystem does not support extending a file beyond its
current size.
- EPERM
- The operation was prevented by a file seal; see fcntl(2).
- EROFS
- The named file resides on a read-only filesystem.
- ETXTBSY
- The file is an executable file that is being executed.
For ftruncate() the same errors apply, but instead of
things that can be wrong with path, we now have things that can be
wrong with the file descriptor, fd:
- EBADF
- fd is not a valid file descriptor.
- EBADF or EINVAL
- fd is not open for writing.
- EINVAL
- fd does not reference a regular file or a POSIX shared memory
object.
- EINVAL or EBADF
- The file descriptor fd is not open for writing. POSIX permits, and
portable applications should handle, either error for this case. (Linux
produces EINVAL.)
POSIX.1-2001, POSIX.1-2008, 4.4BSD, SVr4 (these calls first appeared in 4.2BSD).
ftruncate() can also be used to set the size of a POSIX shared memory
object; see shm_open(7).
The details in DESCRIPTION are for XSI-compliant systems. For
non-XSI-compliant systems, the POSIX standard allows two behaviors for
ftruncate() when length exceeds the file length (note that
truncate() is not specified at all in such an environment): either
returning an error, or extending the file. Like most UNIX implementations,
Linux follows the XSI requirement when dealing with native filesystems.
However, some nonnative filesystems do not permit truncate() and
ftruncate() to be used to extend a file beyond its current length: a
notable example on Linux is VFAT.
The original Linux truncate() and ftruncate() system
calls were not designed to handle large file offsets. Consequently, Linux
2.4 added truncate64() and ftruncate64() system calls that
handle large files. However, these details can be ignored by applications
using glibc, whose wrapper functions transparently employ the more recent
system calls where they are available.
On some 32-bit architectures, the calling signature for these
system calls differ, for the reasons described in syscall(2).
A header file bug in glibc 2.12 meant that the minimum value of
_POSIX_C_SOURCE required to expose the declaration of
ftruncate() was 200809L instead of 200112L. This has been fixed in
later glibc versions.
truncate(1), open(2), stat(2), path_resolution(7)
This page is part of release 5.05 of the Linux man-pages project. A
description of the project, information about reporting bugs, and the latest
version of this page, can be found at https://www.kernel.org/doc/man-pages/.


Graphics is a great strength of R. The graphics
package is part of the standard distribution and contains many useful functions for creating a variety of graphic displays. This chapter focuses on those functions, although it occasionally suggests other packages. In this chapter's See Also sections I mention functions in other packages that do the same job in a different way. I suggest that you explore those alternatives if you are dissatisfied with the basic function.
Graphics is a vast subject, and I can only scratch the surface here. If you want to delve deeper, I recommend R Graphics by Paul Murrell (Chapman & Hall, 2006). That book discusses the paradigms behind R graphics, explains how to use the graphics functions, and contains numerous examples.
You can see the documentation of graphics
package in the following link.
The useful functions in the graphics package is listed below:
plot(), boxplot(), hist(), qqnorm(), and curve() generate the new plots, but other functions did not create a new plot, instead they add layers in the previous plot.
In addtion to the base of R pachage, there are other packages for the graphic purpose. zoo package is customized for displaying a time series, lattice package can be an alternative to traditional graphics. ggplot2 package provides yet another graphics paradigm, which is called the Grammar of Graphics.
# Assign three variables
a <- 1
b <- -3
# print variable 'a' without 'print' function
# display variable 'b' by using 'print' function
# Assign three variables
a <- 1
b <- -3
# print variable 'a' without 'print' function
a
# display variable 'b' by using 'print' function
print(b)
test_object("a", undefined_msg = "Make sure to define a variable `a`.",
incorrect_msg = "Make sure that you assign the correct value to `a`.")
test_object("b", undefined_msg = "Make sure to define a variable `b`.",
incorrect_msg = "Make sure that you assign the correct value to `b`.")
test_output_contains("a", incorrect_msg = "Make sure that you should type a to print out value in variable 'a'.")
test_output_contains("print(b)", incorrect_msg = "Make sure that you should use print function to print out value in variable 'b'.")
test_function("print"")
success_msg("Great! Head over to the next exercise.")


You! Yes you, with the keyboard. You look like you've got some secrets to keep. I bet you're tired of using tricks like writing backwards, or using light yellow colored pencils. Well, I've got a tool for you, then! This here is a genuine Caesar Cipher Code Machine. I'll even throw a substitution cipher in for free. Sound good? Well, pick your shift (or choose random) below and then type your secret message into the code box. I'll then show you the cipher text, or if you like I'll even email it to your co-conspirator.


An application framework for site-specific browsers, powered by Electron.
Version {{ site.juli_version }}. Requirements: macOS 10.9+, Windows 7+ or Linux (64 bit only).
Dark mode
Notification
Dock badge
Navigation bar
Swipe to navigate
CSS injection
JS injection
Custom user-agent
Proxy
Isolated container
Password protection
& more.
Facebook Messenger, created with WebCatalog with Juli engine. Navigation bar & dark mode are turned on.
Juli icon is created from Aquarius icon by Bernar Novaly.


Delphi-Temple of Apollo
"I wish, in announcing that fortunate man Telesikrates as a bronze-shielded Pythian victor, to proclaim with the aid of the deep-bosomed Graces a crowning song for chariot-driving Kyrene.."
Pindar - Pythian Odes (For Telesikrates of Kyrene, winner race in armor, 474BC)
Delphi, located in upper central Greece, on multiple plateaux along the slope of Mount Parnassus, was the site of a major temple to Apollo, as well as the Pythian Games and the prehistoric oracle. The ancient sanctury, formerly also called Pytho, grew rich as the seat of Pythia, the oracle who was consulted about important decisions throughout the ancient classical world. The ancient Greeks considered the centre of the world to be in Delphi, marked by the stone monument known as the omphalos (navel).
Apollo spoke through his oracle Pythia. She had to be an older woman of blameless life chosen from among the peasants of the area. Alone in an enclosed inner sanctum, she sat on a tripod seat over an opening in the earth (the "chasm"). Intoxicated by the vapours, the sibyl would fall into a trance, allowing Apollo to possess her spirit. In this state she prophesied. While in a trance the Pythia "raved" – probably a form of ecstatic speech – and her ravings were "translated" by the priests of the temple into elegant hexameters.
The oracle could not be consulted during the winter months, for this was traditionally the time when Apollo would live among the Hyperboreans. Dionysus would inhabit the temple during his absence.
The Delphic oracle exerted considerable influence throughout the Greek world, and she was consulted before all major undertakings including wars and the founding of colonies. She also was respected by the Greek-influenced countries around the periphery of the Greek world, such as Lydia, Caria, and even Egypt.
The Pythian Games were founded in Delphi sometime in the 6th century BC and featured competitions for art and dance. The art and dance competitions pre-dated the athletic portion of the games, and were said to have been started by Apollo after he killed Python and set up the oracle at Delphi.
The historical timeframe of the Pythian Games started in 582 BC, when the administration of the Games was handed over to the Delphic Amphictyony, a council of twelve Greek tribes, at the end of the First Sacred War.
Preparations for the games began six months prior. Nine citizens from Delphi, called Theoroi, were sent to all Greek cities to announce the beginning of the games in order to attract athletes, as well as to declare the period of the Sacred Truce (Hierominia), aiming at protecting not only the Theoroi and the athletes who travelled to Delphi, but also the temple of Apollo itself. If a city was involved in armed conflict or in robberies during that period, its citizens were forbidden to enter the Sanctuary, participate at the games, or consult the Oracle. At the same time, the truce allowed the Amphictyony to focus on preparing for the games, which included restorations for all structures of the Sanctuary, from the temples to the streets and fountains. Scores of people flocked out of entire Greece, bringing in substantial revenue to the city. (Wikipedia)


Gateway
BOT
05-Jun-19 04:13 PM
[dscrd-hush] <CryptoJesus> What do i do with btch?
[dscrd-hush] <Chewy> Any advice appreciated. This is only a sanity check question, but just making sure I prioritize my time where it needs to go first. If I only used the old v2 HUSH full node windows wallet, and have not claimed my HUSH v3 coins on the KMD Asset chain yet there should be zero problems correct? They were never used on AGAMA in any way.
[dscrd-hush] <Chewy> By old version 2 one, I mean the one that looked almost like the radix zec version one.
[dscrd-hush] <Chewy> Think it was the one she stopped supporting, but it looked very similar to the HUSH wallet.
(edited)
[dscrd-hush] <ITM> @Chewy Yes, only if u used AGAMA then u need to move funds out asap to a new wallet.
[dscrd-hush] <Chewy> Thank you.
[dscrd-hush] <ITM> @Chewy as long as u have wallet.dat and your private key. you should be fine.
[dscrd-hush] <CryptoJesus> Guys i know ive asked alot of questions but agama aint working and i have three assets including Hush and Bitcoin Hush. What do i do if the wallet is not connecting? Just wait? Or is there something we can do
[dscrd-hush] <CryptoJesus> Cheers
[dscrd-hush] <Berg> If you have already used Agama in the last 2 months with that seed than its "ok" to use it again to move the funds. If you have not used it for more than 4 months then you can leave them just on the seed. We recommend moving all funds (all coins) out. Use this link to see all your assetchain balance https://dexstats.info/assetviewer.php
How to Generate new address quickly?
Use Verus version of Agama which is not affected - https://veruscoin.io/wallet.html
1. Start VRSC Lite mode
2. create new seed which will generate new address which is compatible with KMD and all assetchain. Keed the seed safely backedup (make a note of that address)
Alternative method to generate new address
- Use native mode (best to use CLI) - Safest - Use bootstrap from here if you like https://dexstats.info/bootstrap.php
- Use coinbin (may not be most secure as it's web) - https://deckersu.github.io/coinbin/#newAddress
How to send funds to the new address?
Send all KMD and assetchains funds to that address, even if Verus wallet doesn't support that coin at the moment. As long as you have the seed safe, you can access your funds later.
0. If you have Agama 0.3.5 or 0.3.6b, use that to send funds out or
1. Quickest - Agama webwallet ONLY to send funds out immediately https://www.atomicexplorer.com/wallet/#/
2. You can also use this guide to send all KMD and assetchains to new address. You don't need to use 2 computers. Just use one offline computer https://support.komodoplatform.com/en/support/solutions/articles/29000026631-sign-transactions-offline-and-broadcast-online-using-agama
Where to send funds?
- Another address created by Verus Agama or native mode
- Ledger wallet
- CEX (they are not affected but if you want to)
Check your Address Balances on KMD Assetchains
Community driven open source CPU mineable cryptocurrency with 50/50 Proof-of-Work/Proof-of-Stake, zk-SNARK zero-knowledge proof privacy.
Bootstrap for KMD and Assetchains
A Bitcoin Wallet written in Javascript. Supports Multisig, SegWit, Custom Transactions, nLockTime and more!
[dscrd-hush] <Berg> You can use the Veruscoin Agama to connect
[dscrd-hush] <Berg> Using your old seed / WIF
[dscrd-hush] <Berg> I was just able to connect and send my funds out of Agama v 0.3.6 beta
[dscrd-hush] <Berg> It was having issues retrieving fees for sending, but eventually worked
[dscrd-hush] <dukeleto> the servers are overloaded, but keep trying
[dscrd-hush] <dukeleto> ALSO, it is an option: You can send funds to the Hush tip bot as a temp solution. Not recommended for large amounts
[dscrd-hush] <dukeleto> @Berg thanks for than awesome summary above
[dscrd-hush] <CryptoJesus> Brilliant thank you
[dscrd-hush] <CryptoJesus> Do i need to download testflight to get veruscoin wallet
[dscrd-hush] <heguli97> It is a much safer solution than keeping them in agama
[dscrd-hush] <CryptoJesus> Agama doesnt work tho
[dscrd-hush] <heguli97> Are there server probelms due to traffic?
[dscrd-hush] <ITM> anyone has a link to the analyses of Agama issue? Exactly how it was detected etc .
[dscrd-hush] <CryptoJesus> Also why is hush not on the latest agama update
[dscrd-hush] <heguli97> It is, i just used it this morning to move my Hush off Agama 0.3.6b
[dscrd-hush] <CryptoJesus> I have agama 0.2.34 and 0.5.6
[dscrd-hush] <CryptoJesus> Its on 0.2.34 and not on 0.5.6
[dscrd-hush] <heguli97> Is that the veruscoin agama, the 0.5.6?
[dscrd-hush] <CryptoJesus> Yeah
[dscrd-hush] <CryptoJesus> Cant find the normal one
[dscrd-hush] <CryptoJesus> No link for the lastest agama
[dscrd-hush] <heguli97> In earlier versions of the komodo agama you needed to activate experimental setting to see Hush, maybe it's the same case in the verus agama?
[dscrd-hush] <CryptoJesus> Dont think so will try not
[dscrd-hush] <CryptoJesus> But is there a way to download the v0.3.6 since its not on github
[dscrd-hush] <heguli97> the agama wallet 0.3.6 by komodo is the version which is affected by the vulnerability
[dscrd-hush] <CryptoJesus> So if im using an older version that means im safe?
[dscrd-hush] <CryptoJesus> Why is bitcoin hush website and discord not available
[dscrd-hush] <CryptoJesus> Thanks
[dscrd-hush] <ITM> BTCH offers no benefits? Why was it even created in the first place. All I know I sold out hush before BTCH snapshot.
[dscrd-hush] <ITM> I reentered hush after 2months and both the price of BTCH and Hush was 80% down. lol


---
layout: post
title: 10/14
date: '2012-10-14T22:54:00.003-06:00'
author: Jacob .
tags:
modified_time: '2012-10-15T07:32:52.414-06:00'
blogger_id: tag:blogger.com,1999:blog-6400085873105072120.post-5624281784258847774
blogger_orig_url: http://www.svlark.com/2012/10/1014.html
---
April made great headway today excavating kid clothes to unload.
We're going to try again with the first aid class on 12/8. Babysitting fell through last time.
We went out this evening with our good friends Valerie and Ian and I picked his brain a little on technical trading, which I've been investigating as one possible component of sustaining. BTW, here's his brand new book. Very interesting stuff...
Audrey's getting good with the learning to read primers GranMiri has been sending. Thanks GranMiri!
-8.4