PAX
Section: User Commands (1)Index Return to Main Contents
BSD mandoc
NAME
pax - read and write file archives and copy directory hierarchiesSYNOPSIS
pax [-0cdOnvz ] -words [-f archive ] -words [-s replstr ] ... -words [-U user ] ... -words [-G group ] ... -words [-T [from_date ] [,to_date ] ] ... [pattern ... ]pax -r [-cdiknuvzDOYZ ] -words [-f archive ] -words [-o options ] ... -words [-p string ] ... -words [-s replstr ] ... [-E limit ] -words [-U user ] ... -words [-G group ] ... -words [-T [from_date ] [,to_date ] ] ... [pattern ... ]
pax -w [-0dituvzHLOPX ] -words [-b blocksize ] [[-a ] [-f archive ] ] -words [-x format ] -words [-s replstr ] ... -words [-o options ] ... -words [-U user ] ... -words [-G group ] ... -words [-B bytes ] -words [-T [from_date ] [,to_date ] [/[c][m] ] ] ... [file ... ]
pax -r -w [-0diklntuvDHLOPXYZ ] -words [-p string ] ... -words [-s replstr ] ... -words [-U user ] ... -words [-G group ] ... -words [-T [from_date ] [,to_date ] [/[c][m] ] ] ... [file ... ] directory
DESCRIPTION
pax will read, write, and list the members of an archive file, and will copy directory hierarchies. pax operation is independent of the specific archive format, and supports a wide variety of different archive formats. A list of supported archive formats can be found under the description of the -x option.The presence of the -r and the -w options specifies which of the following functional modes pax will operate under: list , read , write and copy
- <none>
- List pax will write to standard output a table of contents of the members of the archive file read from standard input, whose pathnames match the specified patterns The table of contents contains one filename per line and is written using single line buffering.
- -r
- Read pax extracts the members of the archive file read from the standard input, with pathnames matching the specified patterns The archive format and blocking is automatically determined on input. When an extracted file is a directory, the entire file hierarchy rooted at that directory is extracted. All extracted files are created relative to the current file hierarchy. The setting of ownership, access and modification times, and file mode of the extracted files are discussed in more detail under the -p option.
- -w
- Write pax writes an archive containing the file operands to standard output using the specified archive format. When no file operands are specified, a list of files to copy with one per line is read from standard input. When a file operand is also a directory, the entire file hierarchy rooted at that directory will be included.
- -r -w
-
Copy
pax
copies the
file
operands to the destination
directory
When no
file
operands are specified, a list of files to copy with one per line is read from
the standard input.
When a
file
operand is also a directory the entire file
hierarchy rooted at that directory will be included.
The effect of the
copy
is as if the copied files were written to an archive file and then
subsequently extracted, except that there may be hard links between
the original and the copied files (see the
-l
option below).
Warning The destination directory must not be one of the file operands or a member of a file hierarchy rooted at one of the file operands. The result of a copy under these conditions is unpredictable.
While processing a damaged archive during a read or list operation, pax will attempt to recover from media defects and will search through the archive to locate and process the largest number of archive members possible (see the -E option for more details on error handling).
The directory operand specifies a destination directory pathname. If the directory operand does not exist, or it is not writable by the user, or it is not of type directory, pax will exit with a non-zero exit status.
The pattern operand is used to select one or more pathnames of archive members. Archive members are selected using the pattern matching notation described by fnmatch(3). When the pattern operand is not supplied, all members of the archive will be selected. When a pattern matches a directory, the entire file hierarchy rooted at that directory will be selected. When a pattern operand does not select at least one archive member, pax will write these pattern operands in a diagnostic message to standard error and then exit with a non-zero exit status.
The file operand specifies the pathname of a file to be copied or archived. When a file operand does not select at least one archive member, pax will write these file operand pathnames in a diagnostic message to standard error and then exit with a non-zero exit status.
The options are as follows:
- -r
- Read an archive file from standard input and extract the specified files If any intermediate directories are needed in order to extract an archive member, these directories will be created as if mkdir(2) was called with the bitwise inclusive OR of S_IRWXU , S_IRWXG and S_IRWXO as the mode argument. When the selected archive format supports the specification of linked files and these files cannot be linked while the archive is being extracted, pax will write a diagnostic message to standard error and exit with a non-zero exit status at the completion of operation.
- -w
- Write files to the standard output in the specified archive format. When no file operands are specified, standard input is read for a list of pathnames with one per line without any leading or trailing Aq blanks .
- -a
-
Append
files
to the end of an archive that was previously written.
If an archive format is not specified with a
-x
option, the format currently being used in the archive will be selected.
Any attempt to append to an archive in a format different from the
format already used in the archive will cause
pax
to exit immediately
with a non-zero exit status.
The blocking size used in the archive volume where writing starts
will continue to be used for the remainder of that archive volume.
Warning Many storage devices are not able to support the operations necessary to perform an append operation. Any attempt to append to an archive stored on such a device may damage the archive or have other unpredictable results. Tape drives in particular are more likely to not support an append operation. An archive stored in a regular file system file or on a disk device will usually support an append operation.
- -0
- Use the NUL (`\0' ) character as a pathname terminator, instead of newline (`\n' ) This applies only to the pathnames read from standard input in the write and copy modes, and to the pathnames written to standard output in list mode. This option is expected to be used in concert with the -print0 function in find(1) or the -0 flag in xargs(1).
- -b blocksize
- When writing an archive, block the output at a positive decimal integer number of bytes per write to the archive file. The blocksize must be a multiple of 512 bytes with a maximum of 64512 bytes. Archives larger than 32256 bytes violate the POSIX standard and will not be portable to all systems. A blocksize can end with `k ' or `b ' to specify multiplication by 1024 (1K) or 512, respectively. A pair of blocksizes can be separated by `x ' to indicate a product. A specific archive device may impose additional restrictions on the size of blocking it will support. When blocking is not specified, the default blocksize is dependent on the specific archive format being used (see the -x option).
- -c
- Match all file or archive members except those specified by the pattern and file operands.
- -d
- Cause files of type directory being copied or archived, or archive members of type directory being extracted, to match only the directory file or archive member and not the file hierarchy rooted at the directory.
- -f archive
- Specify archive as the pathname of the input or output archive, overriding the default standard input (for list and read or standard output (for write ) A single archive may span multiple files and different archive devices. When required, pax will prompt for the pathname of the file or device of the next volume in the archive.
- -i
- Interactively rename files or archive members. For each archive member matching a pattern operand or each file matching a file operand, pax will prompt to /dev/tty giving the name of the file, its file mode, and its modification time. pax will then read a line from /dev/tty If this line is blank, the file or archive member is skipped. If this line consists of a single period, the file or archive member is processed with no modification to its name. Otherwise, its name is replaced with the contents of the line. pax will immediately exit with a non-zero exit status if EOF is encountered when reading a response or if /dev/tty cannot be opened for reading and writing.
- -k
- Do not overwrite existing files.
- -l
- (The lowercase letter ``ell.'' Link files. In the copy mode (-r -w ) hard links are made between the source and destination file hierarchies whenever possible.
- -n
- Select the first archive member that matches each pattern operand. No more than one archive member is matched for each pattern When members of type directory are matched, the file hierarchy rooted at that directory is also matched (unless -d is also specified).
- -o options
- Information to modify the algorithm for extracting or writing archive files which is specific to the archive format specified by -x In general, options take the form: name = value
- -p string
-
Specify one or more file characteristic options (privileges).
The
string
option-argument is a string specifying file characteristics to be retained or
discarded on extraction.
The string consists of the specification characters
a , e , m , o
and
p
Multiple characteristics can be concatenated within the same string
and multiple
-p
options can be specified.
The meaning of the specification characters are as follows:
- a
- Do not preserve file access times. By default, file access times are preserved whenever possible.
- e
- `Preserve everything' the user ID, group ID, file mode bits, file access time, and file modification time. This is intended to be used by root someone with all the appropriate privileges, in order to preserve all aspects of the files as they are recorded in the archive. The e flag is the sum of the o and p flags.
- m
- Do not preserve file modification times. By default, file modification times are preserved whenever possible.
- o
- Preserve the user ID and group ID.
- p
- `Preserve' the file mode bits. This is intended to be used by a user with regular privileges who wants to preserve all aspects of the file other than the ownership. The file times are preserved by default, but two other flags are offered to disable this and use the time of extraction instead.
In the preceding list, `preserve' indicates that an attribute stored in the archive is given to the extracted file, subject to the permissions of the invoking process. Otherwise the attribute of the extracted file is determined as part of the normal file creation action. If neither the e nor the o specification character is specified, or the user ID and group ID are not preserved for any reason, pax will not set the S_ISUID ( setuid and S_ISGID ( setgid bits of the file mode. If the preservation of any of these items fails for any reason, pax will write a diagnostic message to standard error. Failure to preserve these items will affect the final exit status, but will not cause the extracted file to be deleted. If the file characteristic letters in any of the string option-arguments are duplicated or conflict with each other, the one(s) given last will take precedence. For example, if
-p eme
is specified, file modification times are still preserved. - -s replstr
-
Modify the file or archive member names specified by the
pattern
or
file
operands according to the substitution expression
replstr
using the syntax of the
ed(1)
utility regular expressions.
The format of these regular expressions are:
/old/new/[gp]
As in ed(1), old is a basic regular expression and new can contain an ampersand (`&' ) `\n' (where n is a digit) back-references, or subexpression matching. The old string may also contain newline characters. Any non-null character can be used as a delimiter Po `/' is shown here Pc . Multiple -s expressions can be specified. The expressions are applied in the order they are specified on the command line, terminating with the first successful substitution. The optional trailing g continues to apply the substitution expression to the pathname substring which starts with the first character following the end of the last successful substitution. The first unsuccessful substitution stops the operation of the g option. The optional trailing p will cause the final result of a successful substitution to be written to standard error in the following format:<original pathname> >> <new pathname>
File or archive member names that substitute to the empty string are not selected and will be skipped. - -t
- Reset the access times of any file or directory read or accessed by pax to be the same as they were before being read or accessed by pax
- -u
- Ignore files that are older (having a less recent file modification time) than a pre-existing file or archive member with the same name. During read an archive member with the same name as a file in the file system will be extracted if the archive member is newer than the file. During write a file system member with the same name as an archive member will be written to the archive if it is newer than the archive member. During copy the file in the destination hierarchy is replaced by the file in the source hierarchy or by a link to the file in the source hierarchy if the file in the source hierarchy is newer.
- -v
-
During a
list
operation, produce a verbose table of contents using the format of the
ls(1)
utility with the
-l
option.
For pathnames representing a hard link to a previous member of the archive,
the output has the format:
<ls -l listing> == <link name>
For pathnames representing a symbolic link, the output has the format:<ls -l listing> => <link name>
Where <ls -l listing> is the output format specified by the ls(1) utility when used with the -l option. Otherwise for all the other operational modes Po Em read , write , Li and Em copy Pc , pathnames are written and flushed to standard error without a trailing newline as soon as processing begins on that file or archive member. The trailing newline is not buffered and is written only after the file has been read or written. - -x format
-
Specify the output archive format, with the default format being
ustar
pax
currently supports the following formats:
- cpio
- The extended cpio interchange format specified in the St -p1003.2 standard. The default blocksize for this format is 5120 bytes. Inode and device information about a file (used for detecting file hard links by this format) which may be truncated by this format is detected by pax and is repaired.
- bcpio
- The old binary cpio format. The default blocksize for this format is 5120 bytes. This format is not very portable and should not be used when other formats are available. Inode and device information about a file (used for detecting file hard links by this format) which may be truncated by this format is detected by pax and is repaired.
- sv4cpio
- The System V release 4 cpio. The default blocksize for this format is 5120 bytes. Inode and device information about a file (used for detecting file hard links by this format) which may be truncated by this format is detected by pax and is repaired.
- sv4crc
- The System V release 4 cpio with file crc checksums. The default blocksize for this format is 5120 bytes. Inode and device information about a file (used for detecting file hard links by this format) which may be truncated by this format is detected by pax and is repaired.
- tar
-
The old BSD tar format as found in BSD4.3.
The default blocksize for this format is 10240 bytes.
Pathnames stored by this format must be 100 characters or less in length
(including the trailing character, which means that filenames can have
a maximum length of 99 characters).
Only
regular
files,
hard links , soft links
and
directories
will be archived (other file system types are not supported).
For backwards compatibility with even older tar formats, a
-o
option can be used when writing an archive to omit the storage of directories.
This option takes the form:
-o write_opt=nodir
- ustar
- The extended tar interchange format specified in the St -p1003.2 standard. The default blocksize for this format is 10240 bytes. Filenames stored by this format must be 100 characters or less in length (including the trailing character, which means that filenames can have a maximum length of 99 characters). Pathnames (directorynames + filenames) stored by this format must be 250 characters or less in length.
pax will detect and report any file that it is unable to store or extract as the result of any specific archive format restrictions. The individual archive formats may impose additional restrictions on use. Typical archive format restrictions include (but are not limited to): file pathname length, file size, link pathname length, and the type of the file.
- -z
- Use gzip(1) to compress (decompress) the archive while writing (reading). Incompatible with -a
- -B bytes
-
Limit the number of bytes written to a single archive volume to
bytes
The
bytes
limit can end with
`m
'
`k
'
or
`b
'
to specify multiplication by 1048576 (1M), 1024 (1K) or 512, respectively.
A pair of
bytes
limits can be separated by
`x
'
to indicate a product.
Warning Only use this option when writing an archive to a device which supports an end of file read condition based on last (or largest) write offset (such as a regular file or a tape drive). The use of this option with a floppy or hard disk is not recommended.
- -D
- This option is the same as the -u option, except that the file inode change time is checked instead of the file modification time. The file inode change time can be used to select files whose inode information (e.g., UID, GID, etc.) is newer than a copy of the file in the destination directory
- -E limit
-
Limit the number of consecutive read faults while trying to read a flawed
archive to
limit
With a positive
limit
pax
will attempt to recover from an archive read error and will
continue processing starting with the next file stored in the archive.
A
limit
of 0 will cause
pax
to stop operation after the first read error is detected on an archive volume.
A
limit
of
NONE
will cause
pax
to attempt to recover from read errors forever.
The default
limit
is a small positive number of retries.
Warning Using this option with NONE should be used with extreme caution as pax may get stuck in an infinite loop on a very badly flawed archive.
- -G group
- Select a file based on its group name, or when starting with a # a numeric gid. A `\' can be used to escape the # Multiple -G options may be supplied and checking stops with the first match.
- -H
- Follow only command-line symbolic links while performing a physical file system traversal.
- -L
- Follow all symbolic links to perform a logical file system traversal.
- -O
- Force the archive to be one volume. If a volume ends prematurely, pax will not prompt for a new volume. This option can be useful for automated tasks where error recovery cannot be performed by a human.
- -P
- Do not follow symbolic links, perform a physical file system traversal. This is the default mode.
- -T [from_date][,to_date][/[c][m]]
-
Allow files to be selected based on a file modification or inode change
time falling within a specified time range of
from_date
to
to_date
(the dates are inclusive).
If only a
from_date
is supplied, all files with a modification or inode change time
equal to or younger are selected.
If only a
to_date
is supplied, all files with a modification or inode change time
equal to or older will be selected.
When the
from_date
is equal to the
to_date
only files with a modification or inode change time of exactly that
time will be selected.
When pax is in the write or copy mode, the optional trailing field [c][m] can be used to determine which file time (inode change, file modification or both) are used in the comparison. If neither is specified, the default is to use file modification time only. The m specifies the comparison of file modification time (the time when the file was last written). The c specifies the comparison of inode change time (the time when the file inode was last changed; e.g., a change of owner, group, mode, etc). When c and m are both specified, then the modification and inode change times are both compared. The inode change time comparison is useful in selecting files whose attributes were recently changed or selecting files which were recently created and had their modification time reset to an older time (as what happens when a file is extracted from an archive and the modification time is preserved). Time comparisons using both file times is useful when pax is used to create a time based incremental archive (only files that were changed during a specified time range will be archived).
A time range is made up of six different fields and each field must contain two digits. The format is:
[[[[[cc]yy]mm]dd]HH]MM[.SS]
Where cc is the first two digits of the year (the century), yy is the last two digits of the year, the first mm is the month (from 01 to 12), dd is the day of the month (from 01 to 31), HH is the hour of the day (from 00 to 23), MM is the minute (from 00 to 59), and SS is the seconds (from 00 to 59). The minute field MM is required, while the other fields are optional and must be added in the following order:
HH , dd , mm
yy , cc
The SS field may be added independently of the other fields. Time ranges are relative to the current time, so-T 1234/cm
would select all files with a modification or inode change time of 12:34 PM today or later. Multiple -T time range can be supplied and checking stops with the first match. - -U user
- Select a file based on its user name, or when starting with a # a numeric UID. A `\' can be used to escape the # Multiple -U options may be supplied and checking stops with the first match.
- -X
- When traversing the file hierarchy specified by a pathname, do not descend into directories that have a different device ID. See the st_dev field as described in stat(2) for more information about device IDs.
- -Y
- This option is the same as the -D option, except that the inode change time is checked using the pathname created after all the file name modifications have completed.
- -Z
- This option is the same as the -u option, except that the modification time is checked using the pathname created after all the file name modifications have completed.
The options that operate on the names of files or archive members Po Fl c , -i -n -s -u -v -D -G -T -U -Y and -Z Pc interact as follows.
When extracting files during a read operation, archive members are `selected' based only on the user specified pattern operands as modified by the -c -n -u -D -G -T -U options. Then any -s and -i options will modify in that order, the names of these selected files. Then the -Y and -Z options will be applied based on the final pathname. Finally, the -v option will write the names resulting from these modifications.
When archiving files during a write operation, or copying files during a copy operation, archive members are `selected' based only on the user specified pathnames as modified by the -n -u -D -G -T and -U options (the -D option only applies during a copy operation). Then any -s and -i options will modify in that order, the names of these selected files. Then during a copy operation the -Y and the -Z options will be applied based on the final pathname. Finally, the -v option will write the names resulting from these modifications.
When one or both of the -u or -D options are specified along with the -n option, a file is not considered selected unless it is newer than the file to which it is compared.
ENVIRONMENT
- TMPDIR
- Path in which to store temporary files.
EXAMPLES
$ pax -w -f /dev/rst0 .Copies the contents of the current directory to the device /dev/rst0
$ pax -v -f filename
Gives the verbose table of contents for an archive stored in filename
$ mkdir newdir cd olddir pax -rw . newdir
This sequence of commands will copy the entire olddir directory hierarchy to newdir
$ pax -r -s ',^//*usr//*,,' -f a.pax
Reads the archive a.pax with all files rooted in /usr into the archive extracted relative to the current directory.
$ pax -rw -i . dest_dir
Can be used to interactively select the files to copy from the current directory to dest_dir
$ pax -r -pe -U root -G bin -f a.pax
Extract all files from the archive a.pax which are owned by root with group bin and preserve all file permissions.
$ pax -r -w -v -Y -Z home /backup
Update (and list) only those files in the destination directory /backup which are older (less recent inode change or file modification times) than files with the same name found in the source file tree home
DIAGNOSTICS
pax will exit with one of the following values:- 0
- All files were processed successfully.
- 1
- An error occurred.
Whenever pax cannot create a file or a link when reading an archive or cannot find a file when writing an archive, or cannot preserve the user ID, group ID, or file mode when the -p option is specified, a diagnostic message is written to standard error and a non-zero exit status will be returned, but processing will continue. In the case where pax cannot create a link to a file, pax will not create a second copy of the file.
If the extraction of a file from an archive is prematurely terminated by a signal or error, pax may have only partially extracted a file the user wanted. Additionally, the file modes of extracted files and directories may have incorrect file bits, and the modification and access times may be wrong.
If the creation of an archive is prematurely terminated by a signal or error, pax may have only partially created the archive which may violate the specific archive format specification.
If while doing a copy pax detects a file is about to overwrite itself, the file is not copied, a diagnostic message is written to standard error and when pax completes it will exit with a non-zero exit status.
SEE ALSO
cpio(1), tar(1)STANDARDS
The pax utility is a superset of the St -p1003.2 standard. The options -B -D -E -G -H -L -O -P -T -U -Y -Z the archive formats bcpio sv4cpio sv4crc tar and the flawed archive handling during list and read operations are extensions to the POSIX standard.AUTHORS
Keith Muller at the University of California, San Diego.
Index
This document was created by man2html, using the manual pages.
Time: 05:29:07 GMT, December 24, 2015


This paragraph will keep its click event even after it is moved.
This paragraph will not keep its click event after it is moved.


Create New Activity
Update Activity
Activity Name
*
Short Description
*
Price
*
Group Size
*
Start Time
*
Duration (minutes)
*
Age Restriction
*
Height Restriction (centimeters)
*
Full Description
*
URL Main Page Picture
URL Detail Page Picture
Cancel


[URL] (https://www.codeigniter.com/)
[Manual] (https://www.codeigniter.com/user_guide/index.html)
a view variable which contains a array of model records.
functions used to “Filter” some type of input. ie. like PHPs trim for example.
functions used to “validate” some type of input. Failures are registered with the Errors object
functions which can be called based on the url
view specific functions. These are called using PHP static syntax
Event package for your app and domain
As the name indicates the packages folder contains HMVC or composer like packages each independent package is like a mini application folder with a few exceptions
[CodeIgntier Loaded as Composer Package] (https://packagist.org/packages/codeigniter/framework)
CLImate allows you to easily output colored text, special formatting, and more. It makes output to the terminal clearer and debugging a lot simpler.
[packagist] (https://packagist.org/packages/league/climate)
[climate] (http://climate.thephpleague.com/)
KRUMO - version 2.0 of print_r(); and var_dump(); (with new updates).
[packagist] (https://packagist.org/packages/mmucklo/krumo)
[krumo] (https://github.com/mmucklo/krumo)
lightncandy - An extremely fast PHP implementation of [handlebars] (http://handlebarsjs.com/) and [mustache] (http://mustache.github.io/).
[packagist] (https://packagist.org/packages/zordius/lightncandy)
[lightncandy] (https://github.com/zordius/lightncandy)
Whoops - php error handling for cool kids. [packagist] (https://packagist.org/packages/filp/whoops) [whoops] (https://github.com/filp/whoops)
.env
.env.local
Used to storing configuration in the environment separate from code.
[The configuration file] (http://php.net/manual/en/configuration.file.php)
[parse_ini_file] (http://php.net/manual/en/function.parse-ini-file.php)
It is common practice to not committing your .env files to version control.
NOTE: the .env.local configurations are merged over .env configurations
/application
As the name indicates the Application folder contains the application specific code. When using CodeIgniter / Orange thou you should put as much code in packages as possible this makes code reuse a lot easier.
/bin
Storage for misc shell scripts which pertain to your application for example special deployment scripts, a script to start the PHP built in server
composer.json
PHP composer file see [composer] (https://getcomposer.org/doc/)
deploy.json
PHP Deploy file see [deploy] (https://github.com/dmyers2004/deploy)
/packages
As the name indicates the packages folder contains HMVC or composer like packages each independent package is like a mini application folder with a few exceptions These are usually individual GIT repositories to simplify package reuse.
/public
This is the publicly accessible folder apache “servers” files from.
/public/index.php
The index.php serves as the front controller or router. [Application Flow Chart] (https://www.codeigniter.com/user_guide/overview/appflow.html?highlight=index%20php)
/support
In order to keep a project organized, This folder contain things such as database backups, import files, migrations, SSL keys, etc…
/var
This folder much like the Linux equivalent contains things like caches, downloads, emails, logs, sessions, uploads. This folder should NOT be managed in your GIT repository and should be ignored.
/vendor
This folder is created and managed by PHP Composer. This folder is NOT managed in your GIT repositories and should be ignored.
core/MY_Config.php
provides extensions to CodeIgniter config such as getting configuration using dot notation with a default, flushing of cached config data, loading configuration if needed from a database, etc…
core/MY_Controller.php
provides extensions to CodeIgniter Controller for automatically handling if site is down for maintenance. Calling middleware if needed, auto loading libraries, models, helpers for this controller (not needed to much anymore using the new extended ci() function) auto loading “catalogs”. attaching a “controller” specific model
core/MY_Input.php
provides extensions to CodeIgniter Input for grouping PUT and POST into a single function (no need for the dev to switch between them). Advanced auto “remapping” of request data. Updated wrapper for reading cookies with default.
core/MY_Loader.php
provides extensions to CodeIgniter loader to making loading and “overloading” classes faster (since it uses a array to locate classes and not a file system “scan”)
core/MY_Log.php
provides extensions to CodeIgniter Log to provide support for PSR3 bitwise levels as well as monolog if necessary.
core/MY_Model.php
provides extensions to CodeIgniter Model with validation. Not specific to Databases because not all models are modeling database tables.
core/MY_Output.php
provides extensions to CodeIgniter Output with json, nocache, wrapper for inputs “set cookie” since setting cookies are more of a output function and simple function to delete all cookies
core/MY_Router.php
provides extensions to CodeIgniter Router to automatically handle controllers in Packages. This also added the “Action” suffix and HTTP method (Post, Put, Delete, Cli (command line), Get (none)). This uses a advanced caching technique to make this lighting fast (no filesystem scanning etc.)…
core/Orange.php
Provides additional functions to CodeIgniter. methods include but are not limited to:
ci(class)
a much smarter get_instance() To get a reference to the CodeIgniter “Super Object” you simple use [get_instance] (https://www.codeigniter.com/user_guide/general/ancillary_classes.html?highlight=get_instance#get_instance) But I’ve made it smarter by making it a little more like a dependency injection contain. You can autoload a library or model simply by entering it’s name in the function ie.
ci('email')->send();
this will auto load the email library if it’s not already loaded and then call the send method. Then you don’t need to call
ci()->load->library(‘email’);
ci()->email->send();
This also becomes a dependency injection contain because the ‘email’ library can be something other than a class named ‘email’ (the default CI way of loading classes)
This “remapping” is handled by the remap entry in /config/autoload.php
$autoload['remap'] = [
'auth'=>'ldap_auth',
'o_user_entity'=>'O_ldap_user_entity',
];
in this example ldap_auth is loaded instead of auth when ci(‘auth’) is called. or a mock_auth for testing etc…
site_url(uri,protocol)
Smarter site_url This does everything the CodeIgniter [site_url] (https://www.codeigniter.com/user_guide/helpers/url_helper.html?highlight=site_url#site_url) except this version of the function added a simple find and replace for {} tags. These tags are loaded from /config/paths.php. This then makes it easier to have any reused path in paths.php and by using site_url() load them.
$path = site_url('/{www theme}/assets/css')
config(setting,default)
wrapper for config’s dot_item calls
ci('config')->dot_item()
This makes loaded configuration values a lot easier and it’s fully cached. config(‘auth.login h2’) will return the value for /config/auto.php array key ‘login h2’.
Just like $html = ci(‘config’)->dot_item(‘auth.login h2’,‘Login’); you can also provided a default value. $html = config(‘auth.login h2’,‘Login’);
filter(rules,field) wrapper for running a validation filter calls ci(‘validate’)->single($rules,$field);
valid(rule,field) wrapper for running a validation calls ci(‘validate’)->single($rule,$field); and returns value of !ci(‘errors’)->has();
esc(string) escape " with "
e(html) performs a html encoding of special characters
env(key,default) wrapper to read environmental variables with a default loads values from the .env file. This should be used in the /config/*.php files. very rarely should you call it in actual code. exceptions might be to load the server environment or debug mode.
view(view,data) most basic wrapper for loading views https://www.codeigniter.com/user_guide/general/views.html?highlight=view#adding-dynamic-data-to-the-view
NOTE: this ALWAYS returns the rendered view. This does not echo anything.
unlock_session() more english wrapper for PHP session_write_close() function
console(var,type) simple browser level debugger shows up in the javascript console wrapper for echo ‘’;
l(…) “raw” logging function Simple Logging function for debugging purposes ALWAYS writes to LOGPATH.‘/orange_debug.log’
atomic_file_put_contents(file path,content) PHP necessary atomic file writing Writes to a file without the needed to worry about another process loading it write it’s still being written to.
remove_php_file_from_opcache(full path) APC / OPcache friendly Remove from cache function removes a file from opcache or apache without worrying about if it’s actually loaded
convert_to_real(value) convert_to_string(value) Converting to and from values Try to convert a value to it’s real type this is nice for pulling string from a database such as configuration values stored in string format
simplify_array(array,key,value) collapse a array with multiple values into a single key=>value pair this will collapse a array with multiple values into a single key=>value pair
acl.users.database.table acl.groups.database.table food.database.table colors.file colors.table colors_status.table
You can use different tags delete_cache_by_tags(‘acl’) delete_cache_by_tags(‘acl’,‘user’,‘roles’) delete_cache_by_tags(‘acl.user.roles’) delete_cache_by_tags([‘acl’,‘user’,‘roles’]) if the cache key has one or more matching tag delete the record
Libraries
Auth libraries/Auth.php provides the authorization for users. Functions include login(user identifier, password) logout() refresh_userdata(user identifier, save session)
Cache Export libraries/Cache_export.php provides the library to cache to the file system
Cache Request libraries/Cache_request.php provides the library to create a cache for the current request (in stored in PHP memory)
Errors libraries/Errors.php provides a unified library to register errors for further processing
Event libraries/Event.php provides the library to provides events in your app methods include register(name, closure, priority) trigger(name, a#…) count(name) has(name)
Filters libraries/Filter_base.php provides the abstract base class for all filters and extends validate_base class (just a basic placeholder) no need to focus on in the short term
libraries/filters/ folder to contain filters all filters start with Filter_*.php
Orange Autoload Files libraries/Orange_autoload_files.php provides generates the autoload cache file of controllers, libraries, models, classes, etc…
Pages libraries/Page.php provides the heavy lifting of building HTML Pages. methods include but are not limited to: title(title) set the pages title if different than the default meta(attribute, name, content, priority) add additional meta data body_class(class, priority) add a class to the body render(view, data) render the page and send it’s output to the output class view(view file, data, return) basic MVC view function https://www.codeigniter.com/user_guide/libraries/loader.html#CI_Loader::view data(name, value) attach data to a page from any where in the application icon(image path) change the default icon css(file, priority) add additional links to page link_html(file) create and return html style(style, priority) add style to page js(file, priority) add additional javascript to a page script_html(file) create and return


Origami Designs
About Us
Follow Us
Interesting Facts about Chameleon
- Chameleons are reptiles that are part of the iguana suborder
- Changing skin color is an important part of the communication among chameleons
- Most chameleons have a prehensile tail that they use to wrap around tree branches
Interesting Facts about Pigeons
- Pigeons are incredibly complex and intelligent animals
- Pigeons are renowed for their outstanding navigational abilities
- Pigeons have excellent hearing abilities


### CNS*2020 Tutorial #6 ## Methods from Data Science for Model Simulation, Analysis, and Visualization **Organizers:** Cengiz Gunay and Anca Doloc-Mihu **Schedule:** 7-10pm Berlin time on July 18, 2020 1. *C Gunay*, "From High Performance Computing to Hadoop and Spark" 2. *A Doloc-Mihu*, "High-dimensional data visualizations" 3. *H Dinh, J Walton, and A Morariu*, "Analysim.tech: A data sharing site for crowdsourcing analysis of parameter-search datasets" (each hands-on session is 50 min followed by break of 10 min)
### CNS*2020 Tutorial #6 - Session 1 ## From High Performance Computing to Hadoop and Spark #### Cengiz Gunay, July 18, 2020
### Data! - Prediction: the world will have 44 _zettabytes_ by year 2020`$^*$` - Scale: mega, giga, tera, peta, exa, zetta (`$10^{21}$`) Data producers: - NY Stock Exchange: 4-5 terabytes/day - Facebook: 7 petabytes/month - Ancestry.com: 10 petabytes - Internet Archive: 18 petabytes - Computational neuroscience: ??? `$^*$` Hadoop: The definitive guide (2015); seem to match [current data](https://techjury.net/blog/big-data-statistics/#gref)
### Large-scale simulations and data analysis in computational neuroscience Workflows in historical order: 1. High-performance computing clusters (SGE, PBS, NSG, ...) 2. Cloud deployment of virtual machines (AWS, GCP, Azure, ...) 3. Specialized distributed computing platforms (Hadoop, Spark, ...)
### High-performance computing (HPC) Classical *scientific computing* environment: - Cluster of similar computers - Submit "jobs", scheduler software will run on available nodes - Results can be collected on network drives, or collected at end Cons: - Cluster usually administered by central authority - Can't install custom programs into OS, except in home folder - Must compete with other users and wait turn in queue - Errors come with delay
### Cloud deployment of virtual machines Popular and "easy" method on several vendors: - Amazon Web Services, Google Cloud Platform, Microsoft Azure, etc - Freedom to deploy own virtual machine (VM) "images" - Can quickly create copies of same machine - No waiting, but have to pay Cons: - More expensive than the HPC approach - More administrative work needed to orchestrate VMs - Not efficient because it involves creating whole machines
### Data science field has parallel computing solutions Not unique to computational neuroscience: - Large data requires more than one machine - Parallelization is painful - Load balancing is a problem, otherwise you wait for the slowest one A general solution: - **MapReduce** algorithm, implemented in **Apache Hadoop** - Has been widely adopted in industry - Hadoop comes with an ecosystem of tools: YARN, HDFS, Pig, Spark
### Your turn! Type on Zoom chat your research use case for MapReduce. Identify steps for: - **map**: extract information from each item - **reduce**: combine/process mapped information to produce output **Example:** *map* to select a parameter set, and *reduce* to average it
### What is MapReduce? An example A weather dataset from White Chapter 2 - Live streaming data from weather stations all around world - Each row is one reading from one station at a time
### Back to the command-line: inspect the data ```bash % ls raw/1990 | head<PHONE_NUMBER>9-1990.gz<PHONE_NUMBER>9-1990.gz<PHONE_NUMBER>9-1990.gz<PHONE_NUMBER>9-1990.gz<PHONE_NUMBER>9-1990.gz<PHONE_NUMBER>9-1990.gz<PHONE_NUMBER>9-1990.gz<PHONE_NUMBER>9-1990.gz<PHONE_NUMBER>9-1990.gz<PHONE_NUMBER>9-1990.gz ```
- Many small files; can be analyzed sequentially with `awk`: ```bash % ./max_temperature.sh 1901 317 1902 244 1903 289 1904 256 1905 283 ... ```
### Enter Map+Reduce: Can be partitioned to run on parallel hardware
### Map in Java: (ID, row of text) `$\Rightarrow$` (year, temp) ```java public class MaxTemperatureMapper extends Mapper
{ private static final int MISSING = 9999; @Override public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException { String line = value.toString(); String year = line.substring(15, 19); int airTemperature; if (line.charAt(87) == '+') { // parseInt doesn't like leading plus signs airTemperature = Integer.parseInt(line.substring(88, 92)); } else { airTemperature = Integer.parseInt(line.substring(87, 92)); } String quality = line.substring(92, 93); if (airTemperature != MISSING && quality.matches("[01459]")) { context.write(new Text(year), new IntWritable(airTemperature)); } } } ```
### Reduce: (year, [temps]) `$\Rightarrow$` (year, max temp) ```java public class MaxTemperatureReducer extends Reducer
{ @Override public void reduce(Text key, Iterable
values, Context context) throws IOException, InterruptedException { int maxValue = Integer.MIN_VALUE; for (IntWritable value : values) { maxValue = Math.max(maxValue, value.get()); } context.write(key, new IntWritable(maxValue)); } } ```
### Putting it all together ```java public class MaxTemperature { public static void main(String[] args) throws Exception { if (args.length != 2) { System.err.println("Usage: MaxTemperature
"); System.exit(-1); } Job job = new Job(); job.setJarByClass(MaxTemperature.class); job.setJobName("Max temperature"); FileInputFormat.addInputPath(job, new Path(args[0])); FileOutputFormat.setOutputPath(job, new Path(args[1])); job.setMapperClass(MaxTemperatureMapper.class); job.setReducerClass(MaxTemperatureReducer.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(IntWritable.class); System.exit(job.waitForCompletion(true) ? 0 : 1); } } ```
### A sample run ```bash % export HADOOP_CLASSPATH=hadoop-examples.jar % hadoop MaxTemperature input/ncdc/sample.txt output 14/09/16 09:48:39 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 14/09/16 09:48:40 WARN mapreduce.JobSubmitter: Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this. 14/09/16 09:48:40 INFO input.FileInputFormat: Total input paths to process : 1 14/09/16 09:48:40 INFO mapreduce.JobSubmitter: number of splits:1 14/09/16 09:48:40 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_local26392882_0001 14/09/16 09:48:40 INFO mapreduce.Job: The url to track the job: http://localhost:8080/ 14/09/16 09:48:40 INFO mapreduce.Job: Running job: job_local26392882_0001 14/09/16 09:48:40 INFO mapred.LocalJobRunner: OutputCommitter set in config null 14/09/16 09:48:40 INFO mapred.LocalJobRunner: OutputCommitter is org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter 14/09/16 09:48:40 INFO mapred.LocalJobRunner: Waiting for map tasks 14/09/16 09:48:40 INFO mapred.LocalJobRunner: Starting task: attempt_local26392882_0001_m_000000_0 14/09/16 09:48:40 INFO mapred.Task: Using ResourceCalculatorProcessTree : null 14/09/16 09:48:40 INFO mapred.LocalJobRunner: 14/09/16 09:48:40 INFO mapred.Task: Task:attempt_local26392882_0001_m_000000_0 is done. And is in the process of committing 14/09/16 09:48:40 INFO mapred.LocalJobRunner: map 14/09/16 09:48:40 INFO mapred.Task: Task 'attempt_local26392882_0001_m_000000_0' done. 14/09/16 09:48:40 INFO mapred.LocalJobRunner: Finishing task: attempt_local26392882_0001_m_000000_0 14/09/16 09:48:40 INFO mapred.LocalJobRunner: map task executor complete. 14/09/16 09:48:40 INFO mapred.LocalJobRunner: Waiting for reduce tasks 14/09/16 09:48:40 INFO mapred.LocalJobRunner: Starting task: attempt_local26392882_0001_r_000000_0 14/09/16 09:48:40 INFO mapred.Task: Using ResourceCalculatorProcessTree : null 14/09/16 09:48:40 INFO mapred.LocalJobRunner: 1 / 1 copied. 14/09/16 09:48:40 INFO mapred.Merger: Merging 1 sorted segments 14/09/16 09:48:40 INFO mapred.Merger: Down to the last merge-pass, with 1 segments left of total size: 50 bytes 14/09/16 09:48:40 INFO mapred.Merger: Merging 1 sorted segments 14/09/16 09:48:40 INFO mapred.Merger: Down to the last merge-pass, with 1 segments left of total size: 50 bytes 14/09/16 09:48:40 INFO mapred.LocalJobRunner: 1 / 1 copied. 14/09/16 09:48:40 INFO mapred.Task: Task:attempt_local26392882_0001_r_000000_0 is done. And is in the process of committing 14/09/16 09:48:40 INFO mapred.LocalJobRunner: 1 / 1 copied. 14/09/16 09:48:40 INFO mapred.Task: Task attempt_local26392882_0001_r_000000_0 is allowed to commit now 14/09/16 09:48:40 INFO output.FileOutputCommitter: Saved output of task 'attempt...local26392882_0001_r_000000_0' to file:/Users/tom/book-workspace/ hadoop-book/output/_temporary/0/task_local26392882_0001_r_000000 14/09/16 09:48:40 INFO mapred.LocalJobRunner: reduce > reduce 14/09/16 09:48:40 INFO mapred.Task: Task 'attempt_local26392882_0001_r_000000_0' done. 14/09/16 09:48:40 INFO mapred.LocalJobRunner: Finishing task: attempt_local26392882_0001_r_000000_0 14/09/16 09:48:40 INFO mapred.LocalJobRunner: reduce task executor complete. 14/09/16 09:48:41 INFO mapreduce.Job: Job job_local26392882_0001 running in uber mode : false 14/09/16 09:48:41 INFO mapreduce.Job: map 100% reduce 100% 14/09/16 09:48:41 INFO mapreduce.Job: Job job_local26392882_0001 completed successfully 14/09/16 09:48:41 INFO mapreduce.Job: Counters: 30 File System Counters FILE: Number of bytes read=377168 FILE: Number of bytes written=828464 FILE: Number of read operations=0 FILE: Number of large read operations=0 FILE: Number of write operations=0 Map-Reduce Framework Map input records=5 Map output records=5 Map output bytes=45 Map output materialized bytes=61 Input split bytes=129 Combine input records=0 Combine output records=0 Reduce input groups=2 Reduce shuffle bytes=61 Reduce input records=5 Reduce output records=2 Spilled Records=10 Shuffled Maps =1 Failed Shuffles=0 Merged Map outputs=1 GC time elapsed (ms)=39 Total committed heap usage (bytes)=226754560 File Input Format Counters Bytes Read=529 File Output Format Counters Bytes Written=29 ```
### HDFS: Hadoop Distributed Filesystem - Optimized to work on parallel hardware:
### HDFS _local_ data replication - Data shipped out to each machine via _input splits_ for Map tasks
### HDFS input _splits_ merged into output _part_
### Workflow with multiple Reduce tasks - Output of *map* can be used for different *reduce* steps:
### Reduce step can be omitted - Sometimes *map* is enough for "embarassingly parallel" simulations!
### Hadoop is dead. Long live Hadoop! - Hadoop created an ecosystem of projects: - Avro: Data serialization system - Flume: Work with data streams - Sqoop: Interface with traditional relational DBs - Hive: SQL queries converted to MapReduce - [Pig](https://www.slideshare.net/kevinweil/hadoop-pig-and-twitter-nosql-east-2009/): Hadoop processing with custom high-level language - Parquet: Columnar storage for nested data - Crunch: High-level API for using Hadoop - [Kafka](https://kafka.apache.org/): Distributed streaming platform - [Spark](https://spark.apache.org/): Another distributed computing framework - We will give a brief intro to Spark
### Spark - Since 2009 - 10x-20x faster than Hadoop - Written in Scala running on JVM - Can be programmed in Scala, Java, and Python
### Practice time! Connect to our Spark server - See our [Sched page](https://cns2020online.sched.com/event/a1f62dac60f1e6d93a34724500d3ff66) for the IP address and downloads On Mac and Linux: - Download `spark-key` from [Sched](https://cns2020online.sched.com/event/a1f62dac60f1e6d93a34724500d3ff66) - Open terminal and run: ```bash $ ssh -i spark-key cnsuser@IP address ``` On Windows: - Download `spark-windows.ppk` from [Sched](https://cns2020online.sched.com/event/a1f62dac60f1e6d93a34724500d3ff66) - Download [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/) and follow [instructions](https://devops.ionos.com/tutorials/use-ssh-keys-with-putty-on-windows/#connect-to-server-with-private-key) to use ppk key file - [Open SSH connection](https://www.ssh.com/ssh/putty/windows/) to IP address with username "cnsuser"
### Practice time! (Cont) Once connected to Spark server, run: ```bash $ docker exec -it klt-spark-wwym bin/pyspark ``` which should result in: ```bash Python 3.6.11 (default, Jul 15 2020, 18:47:56) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. Welcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /__ / .__/\_,_/_/ /_/\_\ version 3.0.0 /_/ Using Python version 3.6.11 (default, Jul 15 2020 18:47:56) SparkSession available as 'spark'. >>> ```
### Spark works with _resilient distributed datasets_ (RDDs) - Try these on the `pyspark` command line - A line count program example: ```python >>> lines = sc.textFile("data/tutorial.md") # Create an RDD called lines >>> lines.count() # Count the number of items in this RDD 67 >>> lines.first() # First item in this RDD, i.e. first line of tutorial.md '---' ``` - Parallel operation completely transparent! - `sc` is the `SparkContext` _driver_ to access Spark and create RDDs - RDD is broken into pieces to run `count()` in parallel
### Inside Spark
- Try another example with a custom filter function: ```python >>> lines = sc.textFile("data/tutorial.md") >>> sparkLines = lines.filter(lambda line: "Spark" in line) >>> sparkLines.first() 'tools, such as [Apache Spark](https://spark.apache.org/). These tools' ```
### Map-Reduce operations generalize to
Transformation-Action with RDDs _Transformations_ create new RDDs; e.g.: ```python >>> sparkLines = lines.filter(lambda line: "Spark" in line) ``` _Actions_ calculate results from RDDs; e.g.: ```python >>> sparkLines.first() ```
### RDD transformations: `map()` and `filter()`
```python >>> inputRDD = sc.parallelize([1, 2, 3, 4]) # Create a numeric input RDD ``` ```python >>> outputRDD = inputRDD.map(lambda x: x * x) # MAP ``` ```python >>> outputRDD = inputRDD.filter(lambda x: x != 1) # FILTER ``` ```python >>> outputRDD.collect() # Show all results ```
### RDD transformations (Continued) - For `map()`, if multiple outputs for each input, then use `flatMap()` - Set operations: - `distinct()` - `union()` - `intersection()` - `subtract()` - `cartesian()` -> expensive
### RDD actions - Most common `reduce()`: Takes two inputs and outputs one ```python sum = inputRDD.reduce(lambda x, y: x + y) ``` - `fold()` also takes a _zero_ value for initialization ```python sum = inputRDD.fold(0, lambda x, y: x + y) ``` - `aggregate()` asks for accummulation and combine functions. Example that calculates a running sum and count of elements to calculate an average value: ```python sumCount = inputRDD.aggregate((0, 0), (lambda acc, value: (acc[0] + value, acc[1] + 1)), (lambda acc1, acc2: (acc1[0] + acc2[0], acc1[1] + acc2[1]))) return sumCount[0] / float(sumCount[1]) ```
### RDD actions (continued) - `collect()`: Return all elements - `count()`: Number of elements - `countByValue()`: Number of times each element occurs in RDD (histogram) - and more...
### RRDs can act as DataFrames! - Can read/write data in JSON, CSV, Hive Tables, and Parquet - _DataFrame_ holds semi-structured data, supports SQL-like querying ```python df = spark.read.json("examples/src/main/resources/people.json") # also see read.csv() # Displays the content of the DataFrame to stdout df.show() # +----+-------+ # | age| name| # +----+-------+ # |null|Michael| # | 30| Andy| # | 19| Justin| # +----+-------+ # # Select only the "name" column df.select("name").show() # Select people older than 21 df.filter(df['age'] > 21).show() ```
### Spark can run SQL queries in parallel - SQL interface to be used inside or outside Spark
(e.g. JDBC connection or from Tableau) ```python # Register the DataFrame as a SQL temporary view df.createOrReplaceTempView("people") sqlDF = spark.sql("SELECT * FROM people") sqlDF.show() # +----+-------+ # | age| name| # +----+-------+ # |null|Michael| # | 30| Andy| # | 19| Justin| # +----+-------+ ```
### A Spark-ling challenge for you! Load our CSV file with measurements from model neuron simulations: ```python df = spark.read.csv("data/AnalySim.csv") # watch for capitalization # show info df.printSchema() df.show() ``` Question: - Use [RDD](https://spark.apache.org/docs/latest/rdd-programming-guide.html) and [Dataframe](https://spark.apache.org/docs/latest/sql-getting-started.html) operations to calculate one of min, max, average, standard deviation for one column, or an arithmetic operation between multiple columns to find a ratio, slopes, etc. - You can also filter rows based on column constraints. - Post your code and results on [NeuroStars](https://neurostars.org/t/cns-2020-tutorial-t6-methods-from-data-science-for-model-simulation-analysis-and-visualization/13337) or Zoom.
### If you want to install Spark locally - Installation could become complex, [Hadoop and Spark](https://spark.apache.org/docs/latest/#downloading) are bundled together - Can also just download and run Docker image from [bitnami/spark](https://hub.docker.com/r/bitnami/spark/), and run it like in our example above.
### Closing notes for Spark
Spark also provides: - Real-time processing via streaming (Chapter 10) - Machine learning library _MLlib_ (Chapter 11) More resources: - [Book's Github repo with examples](https://github.com/databricks/learning-spark) - [Spark API documentation](https://spark.apache.org/docs/latest/) - [Spark Quick Start](https://spark.apache.org/docs/latest/quick-start.html) - [RDD Programming Guide](https://spark.apache.org/docs/latest/rdd-programming-guide.html)
### Questions and comments? - Conversation can continue if you post on our [NeuroStars page](https://neurostars.org/t/cns-2020-tutorial-t6-methods-from-data-science-for-model-simulation-analysis-and-visualization/13337). - Please fill [our survey](https://ggc.az1.qualtrics.com/jfe/form/SV_023P8dEuPo8G8N7) before leaving the tutorial - Thank you for coming to our tutorial! :)


--- layout: post title: 单词本：Thereby hangs a tale tags: [English] categories: [language] ---
昨天看我们公司的架构师们写的架构文档，在提到某个设计方案的时候，写道： Thereby hangs a tale。然后，哗啦哗啦地写了一堆。
这个 Thereby hangs a tale 直译是这里挂着一个故事。大概就是说来话长、一言难尽的意思。
所以，当别人问你一个事情的时候，你觉得这个事情一时半会解释不清楚，可以说 “Thereby hangs a tale” 因为有很多东西要解释。
这个表达方式出自莎士比亚的喜剧《皆大欢喜（As You Like It）》：
JAQUES:
A fool, a fool!

’Good morrow, fool,’ quoth I. ’No, sir,’ quoth he,
’Call me not fool till heaven hath sent me fortune:’
And then he drew a dial from his poke,
And, looking on it with lack-lustre eye,
Says very wisely, ’It is ten o’clock:
Thus we may see,’ quoth he, ’how the world wags:
’Tis but an hour ago since it was nine,
And after one hour more ’twill be eleven;
And so, from hour to hour, we ripe and ripe,
And then, from hour to hour, we rot and rot;
And thereby hangs a tale.’ When I did hear
The motley fool thus moral on the time,
My lungs began to crow like chanticleer,
That fools should be so deep-contemplative,
And I did laugh sans intermission
An hour by his dial. O noble fool!
A worthy fool! Motley’s the only wear.
Jaques 在森林遇到个人，他说：“现在是十点钟了。我们可以从这里看出世界是怎样在变迁着：一小时之前还不过是九点钟，而再过一小时便是十一点钟了；照这样，一小时一小时地过去，我们越长越老，越老越不中用。真是一言难尽。”


Vendor Name:
THRESHOLD ASSOCIATES
Reference Number:
8026914
Contract Date:
2012-08-08
Description of Work:
TRAINING CONSULTANTS
Contract Period:
2012-08-08 to 2012-30-11
Delivery Date:
2012-30-11
Original Contract Value:
$0.00
Current Contract Value:
$10,452.50


Gender: male female
Enter your height: centimetre inches
Enter your weight: kilograms pounds
Age:
Current Activity Level: Sedentary (Little or No Exercise) Lightly Active (Light Exercise/Sports 1-3 Days Per Week) Moderateley Active (Moderate Exercise/Sports 3-5 Days Per Week) Very Active (Hard Exercise/Sports 6-7 days Per Week) Extra Active (Very Intense Exercise/Sports and Physical Job Daily)


🏡
NYX
This application is not supported by your current browser.
Druid Forms
↑
Character Sheet
Forms


Activate a cell on the grid. Calling this function with no arguments will deselect any active cells.
row
(integer)
- The index of the row in which your cell will be activated.
cell
(integer)
- The index of the cell in the row you want to activate.
(object)
- A Doby Grid class instance
// Activate the first cell
new DobyGrid(...).activate(0, 0)
// De-activate all cells
new DobyGrid(...).activate()


Magister Hanellin:
Oh, well, I disgress...
High-ranking members of the Platinum tribe and bloodless angels have been using the Angelic Vortex to visit the Emperor.
Perhaps if you disguised yourself to look like them, you could pass through the vortex! Follow my instructions carefully and you may survive. Are you up to this?
"I'm ready."


"No problem can be solved from the same level of consciousness that created it." - Albert Einstein
To begin, select a decimal number from the list:
Click the button to proceed.


Sungmin brings on the Christmas spirit early in cover image for his solo debut mini-album 'Orgel'
by jennywillSungmin has released his debut mini-album cover.
The former Super Junior member will be debuting solo on November 22nd with his first mini-album 'Orgel'. The mini-album includes 5 songs include the title song "Orgel", and will feature a warm healing moment for listeners with Sungmin's soft voice.
Are you ready for his solo


All Classes
AttendanceRecord
Car
CarUserInfo
Department
Employee
EncordingFilter
ILoginDAO
ILoginService
IOfficeDAO
IOfficeService
IPersonAdminDAO
IPersonAdminService
IVehicleManageDAO
IVehicleManageService
JDBCTools
LoginDAO
LoginService
LoginServlet
OfficeDAO
OfficeService
OfficeServlet
OfficeStationery
Page
Park
PersonAdminDAO
PersonAdminService
PersonAdminServlet
SessionFilter
User
VehicleManageDAO
VehicleManageService
VehicleManageServlet


Just to clarify, these contents are mainly summarized from the course I took: “Fundamental of Big Data Analytics”, taught by Prof. Mathar Rudolf. For for information please visit: https://www.ti.rwth-aachen.de
What is SVM?
Support Vector Machine (SVM) is a method for classification (and possibly for regression). Here we mainly discuss the most common application: binary classification problem.
Given a training dataset with binary classes {+1, -1}, SVM means to find a separating hyperplane which can maximize the margin.
Here the margin represents the minimum distance from points of both classes to the hyperplane. Support vectors represent the points which are closest to the hyperplane. These points determine the position and direction of the hyperplane, so they are called “support vectors”.
In the series of SVMs, following aspects will be discusses:
- The optimization problem of SVM in linearly separable case
- Using gradient descent algorithm to solve the SVM optimization problem
- Lagrangian dual optimization and Karush-Kuhn-Tucker (KKT) condition
- Dual problem of SVM and analysis
- Solve the dual problem using Sequential Minimal Optimization (SMO)
- The optimization problem of SVM with penalty term
- Kernel SVM for nonlinear cases
SVM in Linearly Separable Case
The linearly separable case means that in the training dataset, points with two different classes can be linearly separated by a hyperplane $H:\{\mathbf{x}|\mathbf{w}^{T}\mathbf{x}+b=0 \}$. The goal of SVM is to find the optimal parameters of $\hat{\mathbf{w}}$ and $\hat{b}$ which maximize the margin. See figure Linear-SVM.
Given a training dataset $\{(\mathbf{x}_i,\ y_i)\}, i=1,\dots,n$, where $\mathbf{x}\in{R^p}$ and $y\in\{-1,+1\}$. If such a separating hyperplane exists as shown in figure Linear-SVM, there exists a positive value, $\gamma>0$, which satisfies that
- for any $y_i=+1$, $\mathbf{w}^T\mathbf{x}_i+b\geq \gamma$
- for any $y_i=-1$, $\mathbf{w}^T\mathbf{x}_i+b\leq -\gamma$
Those two conditions can be summarized into one condition by considering $y_i$ and $\mathbf{x}_ {i}$ jointly:
- $y_i(\mathbf{w}^T\mathbf{x}_ i+b)\geq \gamma \ \ \ $ for any $i=1,\dots,n$
The equality holds for marginal points (like the blue square, and red circles in figure Linear-SVM). This condition ensures that the hyperplane can correctly classify two classes in the training dataset, yet we have another condition in SVM which is to maximize the margin.
How is the margin is defined?
The margin is defined by the Euclidean distance between the closest points (marginal points) to the hyperplane. Since for marginal points $(\mathbf{x}, y)$ it holds $\mathbf{w}^T\mathbf{x}+b = \gamma$ or $\mathbf{w}^T\mathbf{x}+b = -\gamma$, and the hyperplane satisfies $\mathbf{w}^T\mathbf{x}+b = 0$, computing the margin is equivalent to computing the distance between two parallel hyperplane $h_1:\{\mathbf{x}|\mathbf{w}^T\mathbf{x}+b = \gamma\}$ and $h_2:\{\mathbf{w}^T\mathbf{x}+b = 0\}$. Therefore, the margin is . represent the norm of the vector .
Recall of linear algebra:
- the normal vector of hyperplane $h_1:\{\mathbf{x}|\mathbf{w}^T\mathbf{x}+b_1=0\}$ is
- the distance from origin $\mathbf{0}$ to hyperplane is .
This can be proved by simply solve the equation: , where is the distance- the distance between two parallel hyperplanes and is
Therefore, the SVM optimization problem is:
note that here we cannot just maximize , since the definition of a hyperplane is scale invariant. and represent the same hyperplane. Therefore, maximizing may make the magnitude of and reach infinity, and has no contribution to maximizing the real margin.
It is the geodesic margin that matters, not the functional margin . Therefore, we can select an arbitrary positive value for . This will only influence the scale of final optimal and , but the optimal separating hyperplane remains the same. For simplicity, we can set . Then the SVM optimization problem is:
We can convert this problem into a convex optimization problem by reforming the objective function. The the final form of the SVM optimization problem is:
This is the standard expression of the linear SVM. In the next post I will introduce how to solve this optimization problem and get the optimal separating hyperplane .


Child to Parent sharing of data via an 'ViewChild(Ex2Child1Component)' var in the parent component.
Message (from child): {{message}}
Click me to update the 'message' var from child component


| DOSE: |
1 line |
insufflated |
MDPV |
(powder / crystals) |
During the summer of 2008 I heard of an experience from one of my friends. She was at the boomtown fair and told me of a substance called monkey dust, which she bought for £10 a hit. She explained that it was extremely euphoric better than any other upper she had tried. I searched far and wide to discover the identity of this drug, but the only references I could find for Monkey Dust were a street term for PCP. Since the effects my friend described did not sound anything like PCP I ruled this out and eventually gave up and thought no more of the drug.
 When I'm partying anything goes except the big three - Heroin, Crack and Salvia. I am also fascinated by new things and am by nature very experimental.
A year later I was on my way to one such party in France to partake in a weekend of fine music played out of a whopping 160kw link-up (also known as french-tek). The people I was travelling with had mentioned that some-one had some of the fabled Monkey Dust, but I waited for it to come my way rather than seek it out.
It was the Sunday mid afternoon of the party and everyone was packing up, as it was rumoured that the Genderme and miltitary would move in to dislodge us. Before we moved out one of the boys came into the van and announced that he was going to snort the rest of his monkey dust before we left to minimise the amount of drugs he had on him. He offered everyone a line but no-one accepted except me and one of my girl-friends. It was at this point that I was informed of the true name of the chemical - MDPV. I had never seen or heard of this chemical, it was light brown in colour and clung together slightly, I was suspicious that it was heroin but was assured otherwise. Having never heard of this chemical I had no idea of dosage so I left that to the guy who owned it, I believe what I took was a relatively high dose the line looked to be about 20-30mgs anyway I sank it and waited for the effects.
After about half an hour I felt a light rush similar to good coke, but a little more peaceful. I felt quite happy taking part in conversation and yet didn't talk gibberish, it was very subtle. Empathy came next and loads of it, I felt like hugging everyone much like MDMA but with no twitches or flutters or muscle tension. These effects carried on for about half an hour and seemed to be getting stronger, but I never felt like I lost control I was loved up but felt quite happy to keep this to my self whereas had I been on MDMA I would have been giving people massages and taking off my clothes.
My girlfriend rang me at this point and I had a great conversation with her. (My girlfriend doesn't take drugs, smoke and drinks about four times a year. But she has no problem with my personal choices) I found conversation came easily and I felt like I loved her more than ever. I was on the phone to her for about fifteen minutes, when I came off the phone and went back to everyone we continued chatting and laughing for a while. Then came the comedown.
The comedown on MDPV was horrific for me, it was preceded by that horrible empty feeling in my stomach that 'actually everything is not as amazing as it was ten minutes ago, balls!' this continued for the rest of the day, we drove around and I was very quiet for the remainder of the day. We binged on Ketamine that night in the hotel we stayed in and I was unable to have fun I just wanted to go to sleep and wallow in my misery. But I found myself completely unable to sleep, I must have got three hours that night.
The next day I felt tired but OK.  I'm just glad I hadn't discovered it at the start of the weekend or I may have had to recover from 300mgs instead of 30.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


The Whole Nine Yards ***
Rated on a 4-star scale Screening venue: Warner Village (Birkenhead Conway Park) Released in the UK by Warner Bros. on May 19, 2000; certificate 15; 99 minutes; country of origin USA; aspect ratio 1.85:1
Directed by Jonathan Lynn; produced by Allan Kaufman, David Willis. Written by Mitchell Kapner. Photographed by David Franco; edited by Tom Lewis.
CAST..... Matthew Perry..... 'Oz' Oseransky Bruce Willis..... Jimmy 'The Tulip' Tudeski Michael Clarke Duncan..... Frankie Figs Amanda Peet..... Jill Natasha Henstridge..... Cynthia Rosanna Arquette..... Sophie Kevin Pollack..... Yanni Gogolack
It's easy to make a bad movie look good in a trailer: Arrange a couple of moments into a fast-paced rhythm, stick a nice song on the soundtrack, and overlay some snappy lines. Recently, though, some wonderful movies have been getting sloppy treatment in the ads -- think of "Three Kings" and "The Green Mile", and now "The Whole Nine Yards".
The commercials for "The Whole Nine Yards" make it look like a completely inane buddy comedy, full of people goofily shouting and bumping into doors. It's actually a much more skilful and witty picture; even Matthew Perry, an actor I previously hated, impressed me with his performance. In the television show "Friends" he scrunches his face, raises his voice, and always seems to be asking a question. Here, his voice is slower and calmer, and he plays a more likeable man, with reasonable worries and desires.
His name is Oz, a Chicago dentist living in Toronto because his bloodsucking French-Canadian wife Sophie (Rosanna Arquette) refuses to move. In next door moves Jimmy (Bruce Willis), who Oz recognises as an infamous Mafia hitman from back home. Sophie discovers that some of Jimmy's old gangster pals have a contract out on his life, and tries to get Oz to turn him in and collect a reward.
Oz travels to Chicago just to humour her and get a break, and even though he has no intention of actually getting involved with any criminals, they somehow know he has information, and are on his back as soon as he steps off the plane. Our hero's life gets complicated from here on in, and so does the movie's plot --Oz just wants to keep his head above water, but both the groups of enemies are using him as a pawn, he's fallen in love with Jimmy's wife, and his secretary Jill (Amanda Peet) wants to jump in and become a contract killer herself.
The story is violent, and features a lot of complex plotting and double-crossing, but it's sweet, enjoyable and easy to follow because the director, Jonathan Lynn, sets such an easy-going tone, and there's a cute central friendship between Oz, Jimmy and Jill. Perry, as I've already mentioned, performs in an uncharacteristically grounded manner; and Bruce Willis is an actor who always seems calm and self-assured, even when buildings are falling down around him. By simply adding a grin to this, he gives Jimmy an amusingly devious authority. And Amanda Peet, as the secretary who gets excited and giggly from the most perverse and macabre of things, gives off wonderful vibes of silly energy.
It was also a wise decision to set the movie in Toronto. American light comedy movies are normally set in stunningly clean and stylish versions of big US cities, and the unusual location makes Lynn pay attention to the surroundings, and use them to add texture to his picture. He was in the same position when he made the Alabaman "My Cousin Vinny" (1992), which is one of my favourite films. "The Whole Nine Yards" is not its equal, but it's a lot better than you'd expect from those damned trailers.
COPYRIGHT(c) 2000 Ian Waldron-Mantgani Please visit, and encourage others to visit, the UK Critic's website at http://members.aol.com/ukcritic
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


| cake |
Breakage Angle of Chocolate Cakes |
| cbpp |
Contagious bovine pleuropneumonia |
| checkConv |
Extended Convergence Checking |
| coef.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| confint.merMod |
Compute Confidence Intervals for Parameters of a [ng]lmer Fit |
| confint.thpr |
Compute Confidence Intervals for Parameters of a [ng]lmer Fit |
| convergence |
Assessing Convergence for Fitted Models |
| cooks.distance.influence.merMod |
Influence Diagnostics for Mixed-Effects Models |
| cooks.distance.merMod |
Influence Diagnostics for Mixed-Effects Models |
| cov2sdcor |
Convert between representations of (co-)variance structures |
| Cv_to_Sv |
Convert between representations of (co-)variance structures |
| Cv_to_Vv |
Convert between representations of (co-)variance structures |
| factorize |
Attempt to convert grouping variables to factors |
| family.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| findbars |
Determine random-effects expressions from a formula |
| fitted.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| fixed.effects |
Extract fixed-effects estimates |
| fixef |
Extract fixed-effects estimates |
| fixef.merMod |
Extract fixed-effects estimates |
| formatVC |
Print and Summary Method Utilities for Mixed Effects |
| formula.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| fortify |
add information to data based on a fitted model |
| fortify.merMod |
add information to data based on a fitted model |
| getData |
add information to data based on a fitted model |
| getData.merMod |
add information to data based on a fitted model |
| getL |
Extract or Get Generalized Components from a Fitted Mixed Effects Model |
| getL-method |
Extract or Get Generalized Components from a Fitted Mixed Effects Model |
| getME |
Extract or Get Generalized Components from a Fitted Mixed Effects Model |
| getME.merMod |
Extract or Get Generalized Components from a Fitted Mixed Effects Model |
| GHrule |
Univariate Gauss-Hermite quadrature rule |
| glFormula |
Modular Functions for Mixed Model Fits |
| glmer |
Fitting Generalized Linear Mixed-Effects Models |
| glmer.nb |
Fitting Negative Binomial GLMMs |
| glmerControl |
Control of Mixed Model Fitting |
| glmerLaplaceHandle |
Handle for 'glmerLaplace' |
| glmerMod-class |
Class "merMod" of Fitted Mixed-Effect Models |
| glmFamily |
Generator object for the 'glmFamily' class |
| glmFamily-class |
Class '"glmFamily"' - a reference class for 'family' |
| glmResp |
Generator objects for the response classes |
| glmResp-class |
Reference Classes for Response Modules, '"(lm|glm|nls|lmer)Resp"' |
| golden |
Class '"golden"' and Generator for Golden Search Optimizer Class |
| golden-class |
Class '"golden"' and Generator for Golden Search Optimizer Class |
| GQdk |
Sparse Gaussian / Gauss-Hermite Quadrature grid |
| GQN |
Sparse Gaussian / Gauss-Hermite Quadrature grid |
| grouseticks |
Data on red grouse ticks from Elston et al. 2001 |
| grouseticks_agg |
Data on red grouse ticks from Elston et al. 2001 |
| lFormula |
Modular Functions for Mixed Model Fits |
| llikAIC |
Print and Summary Method Utilities for Mixed Effects |
| lme4 |
Linear, generalized linear, and nonlinear mixed models |
| lme4_testlevel |
Detect testing level for lme4 examples and tests |
| lmer |
Fit Linear Mixed-Effects Models |
| lmerControl |
Control of Mixed Model Fitting |
| lmerMod-class |
Class "merMod" of Fitted Mixed-Effect Models |
| lmerResp |
Generator objects for the response classes |
| lmerResp-class |
Reference Classes for Response Modules, '"(lm|glm|nls|lmer)Resp"' |
| lmList |
Fit List of lm or glm Objects with a Common Model |
| lmList4-class |
Class "lmList4" of 'lm' Objects on Common Model |
| lmResp |
Generator objects for the response classes |
| lmResp-class |
Reference Classes for Response Modules, '"(lm|glm|nls|lmer)Resp"' |
| log.thpr |
Profile method for merMod objects |
| logLik.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| logProf |
Profile method for merMod objects |
| mcmcsamp |
Getting p-values for fitted models |
| merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| merMod-class |
Class "merMod" of Fitted Mixed-Effect Models |
| merPredD |
Generator object for the 'merPredD' class |
| merPredD-class |
Class '"merPredD"' - a Dense Predictor Reference Class |
| methTitle |
Print and Summary Method Utilities for Mixed Effects |
| mkDataTemplate |
Make templates suitable for guiding mixed model simulations |
| mkGlmerDevfun |
Modular Functions for Mixed Model Fits |
| mkLmerDevfun |
Modular Functions for Mixed Model Fits |
| mkMerMod |
Create a 'merMod' Object |
| mkNewReTrms |
Make Random Effect Terms: Create Z, Lambda, Lind, etc. |
| mkParsTemplate |
Make templates suitable for guiding mixed model simulations |
| mkRespMod |
Create an lmerResp, glmResp or nlsResp instance |
| mkReTrms |
Make Random Effect Terms: Create Z, Lambda, Lind, etc. |
| mkVarCorr |
Make Variance and Correlation Matrices from 'theta' |
| mlist2vec |
Convert between representations of (co-)variance structures |
| model.frame.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| model.matrix.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| modular |
Modular Functions for Mixed Model Fits |
| negative.binomial |
Fitting Negative Binomial GLMMs |
| NelderMead |
Class '"NelderMead"' of Nelder-Mead optimizers and its Generator |
| NelderMead-class |
Class '"NelderMead"' of Nelder-Mead optimizers and its Generator |
| Nelder_Mead |
Nelder-Mead Optimization of Parameters, Possibly (Box) Constrained |
| ngrps |
Number of Levels of a Factor or a "merMod" Model |
| ngrps.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| nlformula |
Manipulate a Nonlinear Model Formula |
| nlmer |
Fitting Nonlinear Mixed-Effects Models |
| nlmerControl |
Control of Mixed Model Fitting |
| nlmerMod-class |
Class "merMod" of Fitted Mixed-Effect Models |
| nlminbwrap |
Wrappers for additional optimizers |
| nloptwrap |
Wrappers for additional optimizers |
| nlsResp |
Generator objects for the response classes |
| nlsResp-class |
Reference Classes for Response Modules, '"(lm|glm|nls|lmer)Resp"' |
| nobars |
Omit terms separated by vertical bars in a formula |
| nobs |
Class "merMod" of Fitted Mixed-Effect Models |
| nobs.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| sdcor2cov |
Convert between representations of (co-)variance structures |
| show-method |
Class "lmList4" of 'lm' Objects on Common Model |
| show-method |
Class "merMod" of Fitted Mixed-Effect Models |
| show.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| show.summary.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| sigma |
Extract Residual Standard Deviation 'Sigma' |
| sigma.merMod |
Extract Residual Standard Deviation 'Sigma' |
| simulate.formula |
A 'simulate' Method for 'formula' objects that dispatches based on the Left-Hand Side |
| simulate.merMod |
Simulate Responses From 'merMod' Object |
| sleepstudy |
Reaction times in a sleep deprivation study |
| splom.thpr |
Mixed-Effects Profile Plots (Regular / Density / Pairs) |
| subbars |
"Sub[stitute] Bars" |
| summary.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| summary.summary.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| Sv_to_Cv |
Convert between representations of (co-)variance structures |
| VarCorr |
Extract Variance and Correlation Components |
| VarCorr.merMod |
Extract Variance and Correlation Components |
| varianceProf |
Profile method for merMod objects |
| vcconv |
Convert between representations of (co-)variance structures |
| vcov.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| vcov.summary.merMod |
Class "merMod" of Fitted Mixed-Effect Models |
| vec2mlist |
Convert between representations of (co-)variance structures |
| vec2STlist |
Convert between representations of (co-)variance structures |
| VerbAgg |
Verbal Aggression item responses |
| Vv_to_Cv |
Convert between representations of (co-)variance structures |
| .makeCC |
Control of Mixed Model Fitting |
| .prt.aictab |
Print and Summary Method Utilities for Mixed Effects |
| .prt.call |
Print and Summary Method Utilities for Mixed Effects |
| .prt.family |
Print and Summary Method Utilities for Mixed Effects |
| .prt.grps |
Print and Summary Method Utilities for Mixed Effects |
| .prt.methTit |
Print and Summary Method Utilities for Mixed Effects |
| .prt.resids |
Print and Summary Method Utilities for Mixed Effects |
| .prt.VC |
Print and Summary Method Utilities for Mixed Effects |
| .prt.warn |
Print and Summary Method Utilities for Mixed Effects |
| .simulateFun |
Simulate Responses From 'merMod' Object |
| || |
Expand terms with "||" notation into separate "|" terms |


Update timetables and view train arrival times for the Coaster Surfer rail system
| Train name | Destination | Frequency (minutes) | Next arrival | Minutes to next train |
|---|
Note: These schedules are for demonstration purposes only and do not reflect actual routes.


utils module¶
-
utils.
add_facevec_to_records
(face_vector, fname)[source]¶ adds face vector to records :param face_vector: {np.ndarray} Roll number to be added :param fname: {str} file name with which the vector is saved :return: {none} when the function completes
-
utils.
add_student_to_attendance_sheet
(roll_number, path='./attendance_sheet.csv')[source]¶ adds students rol number to the attendance sheet :param roll_number: {int} Roll number to be added to the sheet :param path: {str} path to the attendance sheet :return: {none} when the function completes


@* * Copyright 2017 Lightbend * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import play.api.i18n.Messages @import play.api.mvc.RequestHeader @import play.twirl.api.Html @import org.webjars.play.WebJarsUtil @import controllers.AssetsFinder @(title: String, user: Option[models.User])(content: Html)(implicit request: RequestHeader, messages: Messages, assets: AssetsFinder, webJarsUtil: WebJarsUtil)


ARIA A film review by Mark R. Leeper Copyright 1988 Mark R. Leeper
Book publishing has the concept of the "original anthology." Several well-known authors are given a theme to write on and each does a short story bringing an original approach to that theme. Occasionally a similar approach is tried in anthology films, having a different director for each segment, but usually what is done seems to be to give the director a script and let him direct it. Films like QUARTET, TRIO, ENCORE (all based on collections of W. Somerset Maugham stories), O. HENRY'S FULL HOUSE, and DEAD OF NIGHT were probably done this way. ARIA appears to be a film that gave its directors even more autonomy. In this anthology film, the only thing that the segments have in common is that each is an interpretation of an operatic aria. As long as the aria is played through the film, it seems to fulfill the requirements.
It would be misleading to try to rate such a mixed bag of short films as a single piece. Instead I will consider each segment. Even there I want to give each piece two ratings, one on how it stands on its own as a film and a second rating on how well it used the music it was interpreting. (Ratings are on the -4 to +4 scale.)
Opera: UN BALLO IN MASCHERA (A MASKED BALL) by Giuseppe Verdi Director: Nicholas Roeg
The opening piece (but for a framing piece that will be described later) involves an assassination attempt on King Zog of Albania. The attractive and versatile Teresa Russell (BLACK WIDOW) has finally been given a role that she is totally unconvincing in. Sporting a handlebar mustache and wearing a tight military tunic, she plays King Zog. Only afterwards did I find out that it was she in the role, but it was obviously an actress rather than an actor. Nor did the punchline of the story work. Story: 0. Appropriateness: +1.
Opera: LA FORZA DEL DESTINO (THE FORCE OF DESTINY) by Giuseppe Verdi Director: Charles Sturridge
I did not care for this segment on first brush, but on discussing it later I see more quality in it. Sturridge shows us troubled children leading a pointless existence of TV-watching and getting into trouble. The original aria is a plea to the Virgin Mary which may well be appropriate. Story: +1. Appropriateness: +1.
Opera: ARMIDE by Jean-Baptiste Lully Director: Jean-Luc Godard
Two attractive female attendants in a gym for body-builders first desire the powerful masculine bodies around them, then try to seduce them, only to be frustrated and ignored by the dehumanized athletes around them. The section is amusing and perhaps even erotic. Story: +1. Appropriateness: -1.
Opera: RIGOLETTO by Giuseppe Verdi Director: Julian Temple
Seemingly out of place we have one Blake-Edwards-style sex farce. A husband and wife cheating on each other both go with their lovers to the same garish motel. The common tension builds as husband and wife nearly run into each other time and again. Will they run into each other? Do we really care? Mindless but amusing. Story: +1. Appropriateness: 0.
Opera: DIE TOTE STADT (THE DEAD CITY) by Erick Korngold Director: Bruce Beresford
Because I read the program I know what the director of BREAKER MORANT and CRIMES OF THE HEART was trying to say with this film, but it does not come from the film. According to the program, it has a man falling "in love with what he believes to be the spirit of his dead wife." It appears to be just two lovers and scenes of an atmospheric (and apparently empty) old European city. Story: 0. Appropriateness: +1.
Opera: LES BOREADES by Jean-Phillippe Rameau Director: Robert Altman
One would expect a good segment from a director as distinguished as Robert Altman. Surprise!  It is dull, but worse than that, it is borrowed from a much better film, MARAT/SADE. Both films deal with the historical fact that in post- Revolutionary France it was though chic to involve the inmates of insane asylums in theatrical productions. In MARAT/SADE the insane put on a play and rich patrons come to see it; in Altman's the insane come to see an opera. In both the mad are uncontrollable, which is one reason the rich want to watch them. But in MARAT/SADE the monkeyshines are only a tiny piece of all that is going on on the screen. They are all that happens in Altman's section of ARIA. Story: -1. Appropriateness: -1.
Opera: TRISTAN UND ISOLDE by Richard Wagner Director: Franc Roddam
I was not fond of Roddam's films THE BRIDE and QUADROPHENIA, but I have to give him the prize for ARIA. This had to be what the people who thought of the film had in mind. This is a very sensual adaptation of Wagner's "Liebestod" that in some ways fits the music as well or better than Wagner did originally. Story: +1. Appropriateness: +3.
Opera: TURANDOT by Giacomo Puccini Director: Ken Russell
I lucked out on this one--I did not read the program. There is a nice surprise in this segment, but the program ruins it by telling too much. The story is of a princess of some sort being decorated by having diamonds and rubies inlaid directly into her flesh. But even as we watch it, more is going on than we realize. Don't read the program. Story: +1. Appropriateness: +1.
Opera: LOUISE by Gustave Charpentier Director: Derek Jarman
An old woman dressed incongruously in the clothes of a much younger person remembers days gone by. This one squeaks by, passable but no great shakes. Story: 0. Appropriateness: 0.
Opera: PAGLIACCI by Ruggero Leoncavallo Director: Bill Bryden
If Bryden was trying to say something with his framing sequence of John Hurt preparing for and singing PAGLIACCI, it went right past me. Not very unusual. This was not up to most of the segments it framed. Story: -1. Appropriateness: +1.
Mark R. Leeper ihnp4!mtgzz!leeper<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Flight Tracking Details:
Flight number: {{Flight.flightNumber}}
From: {{Flight.origin}}
To: {{Flight.destination}}
Departure time: {{Flight.departureDateTime}}
Arrival time: {{Flight.arrivalDateTime}}
Current State: Unavailable
ETA: N/A
Enter the flight number
Flight:
Track


Section 3 Electrical Concepts
This class and modern life relies heavily on electricity and electronics. Our course electronics text points this out quite eloquently:
The history of electricity starts more than two thousand years ago, with the Greek philosopher Thales being the earliest known researcher into electricity. But it was Alessandro Volta who created the most common DC power source, the battery (for this invention the unit Volt was named after him).
Direct current (also known as DC) is the flow of charged particles in one unchanging direction (most commonly found as electron flow through conductive materials). DC can be found in just about every home and electronic device, as it is more practical (compared to AC from power stations) for many consumer devices. Just a few of the places where you can find direct current are batteries, phones, computers, cars, TVs, calculators, and even lightning.
We will begin exploring a number of concepts relating to electricity as we will essentially be using electrons as our modes of information processing. From the electrons that flow through a button or distance sensor to be read by the microprocessor to those which supply the power for our motors and servos, we are heavily dependent on electricity. Before we get into this, we need to go over some very important concepts. Take out your Raspberry Pi and follow along with the video below.
Video hereRules of this course in regards to electricity:
- Always work only with DC electricity, never use AC voltage except for when you plug your Raspberry Pi into the outlet.
- Always work on your circuits when the devices are unplugged and batteries removed. Not only is this a safety issue, it will prevent the need to replace electrical components
- Only use the components listed in the laboratory activity on which you are working. Do not try new components you have never used before or are unfamiliar with.
- Keep your work area clean and uncluttered. Do not keep beverages on your workstation.
Using EasyEDA for circuit design
There are many useful tools available to help with circuit design. During this course we will need to learn to use some of them. Circuit schematics make it easy for us to design and interpret circuits to communicate our project. For this class we will use EasyEDA. We can run it in a web browser. It allows us to save projects to a free account and share them for submission. If you learn how to use it well enough you may also use it to design your own printed circuit boards (PCB) to make your own components.
Go to the EasyEDA editor website. Create an account. While you may be able to just start using it and learn through trial and error, here are a few tutorials that will become useful which may be found in the Tutorials section of the app:
- Introduction to EasyEDA
- UI Introduction
- Create a New Project or File
- Schematic Capture
- Basic Skills
You should spend some time learning how to use this app. We will begin using it soon and you will learn how to read an electronics schematic, by designing them yourself. Once you have set up your account and learned some basics, complete the following assignment:
Assignment 3.0
Using your newly discovered schematic design skills, you will make your own basic schematic. Watch this short tutorial explaining schematics. Create and save a schematic in EasyEDA with the following components in a circuit:
- 5V power supply
- 220 Ohm Resistor
- Blue LED
- Ground
3.1 Circuits
A basic understanding of circuit electricity is essential going forward. For this section of the course, we will begin using our online textbook. It gives us an excellent overview of electrons, circuits and polarity. Please keep in mind that, in order to begin using the Raspberry Pi (i.e. receiving the power supply) you will need to pass all of the required quizzes with at least a 70%.
Key Concepts of Section 3.1
- A circuit is a loop of conductive material.
- In order for electrons to flow a closed circuit is required.
- A circuit is open or broken if a complete path for the electrons to flow no longer exists.
Rather than me trying to do a better job than our textbook, you are going to read the short section on circuits. These questions will be similar to those that you will see on your unit exam (The one you need at least a 70% on to move on). So…that means that you are not completing this worksheet for a grade. Instead, you are trying to measure how well you learned the concepts in the reading. Much of this year’s content will be delivered this way. Get your head around the idea of learning for the sake of learning.
To help you understand this concept, here is an excellent video from SparkFun Electronics on the topic.
Assignment 3.1
- After reading the section on circuits, complete the worksheet
- Using EasyEDA, design a closed circuit with the following components:
- 5V power supply
- 220 Ohm Resistor
- Blue LED
- Ground
Submit the your work on GitHub through Assignment 3.1.
3.2 Voltage and Current
The movement of electrons from one pole to another is what we use in robotics to make our robots work. By altering the volume of electrons moving through the wires connected to a motor we can alter the speed of the wheel attached to the motor. The potential energy coming in to our microprocessor pin over a wire attached to a photoresistor tells us the level of brightness or lumosity in a room. Putting these two concepts together we could create a robotic system that opens the blinds on our lab when the sun sets in the west. That is, of course, if we can program our system to make that decision on its own. We will get to the programming part later. For now, we will examine the concepts of voltage and current which allow us, along with resistance, to receive information through sensor and send information out to an actuation device like a motor.
Read short section on voltage and current. Be sure to review the concepts at the bottom of the page for understanding.
To help you understand this concept, here is an excellent video from SparkFun Electronics on the topic.
3.3 Resistance
The final concept needed to understand how electricity in a DC circuit may be used to control devices is resistance. One day last year I was sitting in my office upstairs. I had just come from the mechatronics lab and had packed a bunch of supplies from the lab into my backpack so I could do a little work on a demonstration I would be giving later in the week. All of a sudden I smelled smoke. I looked down and it was coming from my backpack! After digging around a bit I found the culprit. I had put a battery pack in my bag like the one here:
Can you see the problem? I had left all of the batteries in the pack. When I threw it in my bag, the red and black leads touched and starte what is know as a short circuit. With no resistance on the flow of electrons through the wires. The by product of this rapid flow was heat which began to melt the inside of my backpack and start it smoking. Remember this example and always pull one battery out of your battery packs when not connected to your device. Also, never connect two poles of a power source without any resistance. It can cause serious injury.
This problem is prevented by placing a resistive force on the circuit. Small electrical components like LEDs and sensors cannot handle even the two amperes of current available from the Raspberry Pi’s 5V pin. A reisistor is used to prevent the LED from burning up. In order to understand how resistance works, read short section on resistance.
Assignment 3.3- After reading the section on circuits, complete the worksheet
3.4 Ohm’s Law
All three of these concepts come together in Ohm’s Law. In the 19th century many scientists were experimenting with electricity in an attempt to understand it. One of these scientists, Georg Ohm, determined that there was a relationship between Voltage, Current and Resistance. This is why an LED burns up (receives too much current) when no resistance is placed on the circuit. If we create resistance on the circuit with a resistor the voltage, or potential energy, remains constant but the current decreases. Ohm’s law is represented by this simple formula:
\[V = I * R\] As we will see, this formula is quite handy. It may be rearranged to solve for any one of the three possible outputs (V-voltage, I-current, R-resistance). In order to understand how resistance works, read short section on Ohm’s Law.
To help you understand this concept, here is an excellent video from SparkFun Electronics on the topic.
- After reading the section on circuits, complete the worksheet
3.5 Using a Digital Multimeter
This section will become active in the event that we are not using remote instruction.
3.6 Basic Soldering
This section will become active in the event that we are not using remote instruction.