text:
/*! normalize.css v2.1.0 | MIT License | git.io/normalize */

/* ==========================================================================
   HTML5 display definitions
   ========================================================================== */

/**
 * Correct `block` display not defined in IE 8/9.
 */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
    display: block;
}

/**
 * Correct `inline-block` display not defined in IE 8/9.
 */

audio,
canvas,
video {
    display: inline-block;
}

/**
 * Prevent modern browsers from displaying `audio` without controls.
 * Remove excess height in iOS 5 devices.
 */

audio:not([controls]) {
    display: none;
    height: 0;
}

/**
 * Address styling not present in IE 8/9.
 */

[hidden] {
    display: none;
}

/* ==========================================================================
   Base
   ========================================================================== */

/**
 * 1. Set default font family to sans-serif.
 * 2. Prevent iOS text size adjust after orientation change, without disabling
 *    user zoom.
 */

html {
    font-family: sans-serif; /* 1 */
    -webkit-text-size-adjust: 100%; /* 2 */
    -ms-text-size-adjust: 100%; /* 2 */
}

/**
 * Remove default margin.
 */

body {
    margin: 0;
}

/* ==========================================================================
   Links
   ========================================================================== */

/**
 * Address `outline` inconsistency between Chrome and other browsers.
 */

a:focus {
    outline: thin dotted;
}

/**
 * Improve readability when focused and also mouse hovered in all browsers.
 */

a:active,
a:hover {
    outline: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

/**
 * Address variable `h1` font-size and margin within `section` and `article`
 * contexts in Firefox 4+, Safari 5, and Chrome.
 */

h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

/**
 * Address styling not present in IE 8/9, Safari 5, and Chrome.
 */

abbr[title] {
    border-bottom: 1px dotted;
}

/**
 * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
 */

b,
strong {
    font-weight: bold;
}

/**
 * Address styling not present in Safari 5 and Chrome.
 */

dfn {
    font-style: italic;
}

/**
 * Address differences between Firefox and other browsers.
 */

hr {
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    height: 0;
}

/**
 * Address styling not present in IE 8/9.
 */

mark {
    background: #ff0;
    color: #000;
}

/**
 * Correct font family set oddly in Safari 5 and Chrome.
 */

code,
kbd,
pre,
samp {
    font-family:  Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, serif;
    font-size: 1em;
}

/**
 * Improve readability of pre-formatted text in all browsers.
 */

pre {
    white-space: pre-wrap;
}

/**
 * Set consistent quote types.
 */

q {
    quotes: "\201C" "\201D" "\2018" "\2019";
}

/**
 * Address inconsistent and variable font size in all browsers.
 */

small {
    font-size: 80%;
}

/**
 * Prevent `sub` and `sup` affecting `line-height` in all browsers.
 */

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

/* ==========================================================================
   Embedded content
   ========================================================================== */

/**
 * Remove border when inside `a` element in IE 8/9.
 */

img {
    border: 0;
}

/**
 * Correct overflow displayed oddly in IE 9.
 */

svg:not(:root) {
    overflow: hidden;
}

/* ==========================================================================
   Figures
   ========================================================================== */

/**
 * Address margin not present in IE 8/9 and Safari 5.
 */

figure {
    margin: 0;
}

/* ==========================================================================
   Forms
   ========================================================================== */

/**
 * Define consistent border, margin, and padding.
 */

fieldset {
    border: 1px solid #c0c0c0;
    margin: 0 2px;
    padding: 0.35em 0.625em 0.75em;
}

/**
 * 1. Correct `color` not being inherited in IE 8/9.
 * 2. Remove padding so people aren't caught out if they zero out fieldsets.
 */

legend {
    border: 0; /* 1 */
    padding: 0; /* 2 */
}

/**
 * 1. Correct font family not being inherited in all browsers.
 * 2. Correct font size not being inherited in all browsers.
 * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
 */

button,
input,
select,
textarea {
    font-family: inherit; /* 1 */
    font-size: 100%; /* 2 */
    margin: 0; /* 3 */
}

/**
 * Address Firefox 4+ setting `line-height` on `input` using `!important` in
 * the UA stylesheet.
 */

button,
input {
    line-height: normal;
}

/**
 * Address inconsistent `text-transform` inheritance for `button` and `select`.
 * All other form control elements do not inherit `text-transform` values.
 * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
 * Correct `select` style inheritance in Firefox 4+ and Opera.
 */

button,
select {
    text-transform: none;
}

/**
 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
 *    and `video` controls.
 * 2. Correct inability to style clickable `input` types in iOS.
 * 3. Improve usability and consistency of cursor style between image-type
 *    `input` and others.
 */

button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
    -webkit-appearance: button; /* 2 */
    cursor: pointer; /* 3 */
}

/**
 * Re-set default cursor for disabled elements.
 */

button[disabled],
html input[disabled] {
    cursor: default;
}

/**
 * 1. Address box sizing set to `content-box` in IE 8/9.
 * 2. Remove excess padding in IE 8/9.
 */

input[type="checkbox"],
input[type="radio"] {
    box-sizing: border-box; /* 1 */
    padding: 0; /* 2 */
}

/**
 * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
 * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
 *    (include `-moz` to future-proof).
 */

input[type="search"] {
    -webkit-appearance: textfield; /* 1 */
    -moz-box-sizing: content-box;
    -webkit-box-sizing: content-box; /* 2 */
    box-sizing: content-box;
}

/**
 * Remove inner padding and search cancel button in Safari 5 and Chrome
 * on OS X.
 */

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

/**
 * Remove inner padding and border in Firefox 4+.
 */

button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

/**
 * 1. Remove default vertical scrollbar in IE 8/9.
 * 2. Improve readability and alignment in all browsers.
 */

textarea {
    overflow: auto; /* 1 */
    vertical-align: top; /* 2 */
}

/* ==========================================================================
   Tables
   ========================================================================== */

/**
 * Remove most spacing between table cells.
 */

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* GENERAL */
html,
body {
  height: 100%;
}

body {
  background: #fff;
}

body,
input,
textarea {
  color: #191919;
  font: 14px/140% -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
                  "Helvetica Neue", Helvetica, Arial, sans-serif,
                  "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

a {
  color: #119bdf;
  text-decoration: none;
}
a:hover {
  color: #29aeef;
  text-decoration: underline;
}

h1,
h2,
h3,
h4,
p,
ul,
code {
  margin: 0 0 20px;
}

code {
  font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* SIDEBAR */
#sidebar {
  background: #191919;
  color: #fff;
  float: left;
  height: 100%;
  overflow: auto;
  position: fixed;
  top: 0;
  width: 240px;
}

#sidebar h1 {
  background: #111;
  font-size: 14px;
  margin: 0;
  padding: 20px;
  text-transform: uppercase;
}

#sidebar h2 {
  color: #888;
  font-size: 14px;
  margin: 0;
}

#sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#sidebar ul#links {
  padding: 20px;
}

#sidebar ul ul {
  padding-left: 20px;
}

#sidebar ul li a {
  color: #fff;
  display: block;
  padding: 0 0 15px;
}
#sidebar ul li a:active,
#sidebar ul li a.active {
  text-decoration: underline;
}

#sidebar input {
  background: #111;
  border: 0;
  border-radius: 2px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  -moz-box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.2);
  -webkit-box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.2);
  color: #ddd;
  margin-bottom: 20px;
  padding: 5px 10px;
}
#sidebar input:active,
#sidebar input:focus {
  border-color: #ccc;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.1);
  outline: none;
}

/* References */
#content {
  padding: 20px;
  padding-left: 260px;
  max-width: 700px;
}

#content .control {
  cursor: pointer;
  font-size: 12px;
  margin-left: 15px;
}

#content article {
  clear: both;
  margin: 15px 0;
}

#content article > a {
  background: #333;
  border-radius: 2px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  cursor: pointer;
  display: block;
  padding: 15px;
}
#content article > a:hover {
  background: #222;
  text-decoration: none;
}

#content a h2 {
  color: #fff;
  font-size: 18px;
  font-weight: normal;
  margin: 0;
}

#content a h2 code {
  float: right;
  font-size: 14px;
}

#content a h2 code b {
  border-radius: 2px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  color: #fff;
  font-weight: normal;
  padding: 3px 6px;
}

/* Default */
#content article {
  border-color: #e2e7ea;
}

#content article a h2 code {
  color: #657e8b;
}

#content article a h2 code b {
  background: #657e8b;
  text-transform: uppercase;
}

/* GET */
#content article.GET a h2 code {
  color: #119bdf;
}

#content article.GET a h2 code b {
  background: #119bdf;
}

/* POST */
#content article.POST a h2 code {
  color: #52ce0e;
}

#content article.POST a h2 code b {
  background: #52ce0e;
}

/* PUT */
#content article.PUT a h2 code {
  color: #e08f10;
}

#content article.PUT a h2 code b {
  background: #e08f10;
}

/* DELETE */
#content article.DELETE a h2 code {
  color: #e02a10;
}

#content article.DELETE a h2 code b {
  background: #e02a10;
}

/* Reference's body */
#content h3 {
}

#content .body {
  border-top: 1px solid #eef1f2;
  display: block;
  padding: 15px 15px 0;
}

#content .body pre {
  border: 1px solid #e2e7ea;
  background: #eef1f2;
  border-radius: 2px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  color: #546974;
  padding: 0 1px;
}

#content .body pre code {
  border: none;
}

.nav-logo {
  background: url("/images/logo_text_white.png");
  background-image: url("/images/logo_text_white.svg"), none;

  background-size: 200px 31px;
  float: left;
  height: 31px;
  margin-top: .3333rem;
  width: 200px;
  margin-bottom: 0.5rem;
}

.nav-logo img {
  filter: alpha(opacity = 0);
  height: 31px;
  opacity: 0;
  width: 200px;
}

#content article table {
  width: 100%;
  margin-bottom: 1rem;
}
#content article table th,
#content article table td {
  padding: 10px;
  border: 1px solid #ddd;
}

#content article table thead {
  background-color: #ddd;
}

#content article table tr:nth-child(even) {
  background-color: #f8f8f8;
}

/* https://github.com/richleland/pygments-css/blob/master/pastie.css */
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #60a0b0; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #808080 } /* Generic.Output */
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0040D0 } /* Generic.Traceback */
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #902000 } /* Keyword.Type */
.highlight .m { color: #40a070 } /* Literal.Number */
.highlight .s { color: #4070a0 } /* Literal.String */
.highlight .na { color: #4070a0 } /* Name.Attribute */
.highlight .nb { color: #007020 } /* Name.Builtin */
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
.highlight .no { color: #60add5 } /* Name.Constant */
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #007020 } /* Name.Exception */
.highlight .nf { color: #06287e } /* Name.Function */
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #bb60d5 } /* Name.Variable */
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #40a070 } /* Literal.Number.Float */
.highlight .mh { color: #40a070 } /* Literal.Number.Hex */
.highlight .mi { color: #40a070 } /* Literal.Number.Integer */
.highlight .mo { color: #40a070 } /* Literal.Number.Oct */
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
.highlight .sr { color: #235388 } /* Literal.String.Regex */
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */


text:
Loggers
=======

.. automodule:: uwsgiconf.options.logging_loggers
   :members:

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace phpDocumentor\Descriptor;

use phpDocumentor\Descriptor\Filter\Filterable;
use phpDocumentor\Descriptor\Interfaces\ChildInterface;

abstract class DescriptorAbstract implements Filterable
{
    /** @var string */
    protected $fqsen = '';

    /** @var string */
    protected $name = '';

    /** @var NamespaceDescriptor $namespace */
    protected $namespace;

    /** @var string $package */
    protected $package = '';

    /** @var string */
    protected $summary = '';

    /** @var string */
    protected $description = '';

    /** @var FileDescriptor */
    protected $fileDescriptor;

    /** @var int */
    protected $line = 0;

    /** @var Collection */
    protected $tags;

    /** @var Collection */
    protected $errors;

    /**
     * Initializes this descriptor.
     */
    public function __construct()
    {
        $this->setTags(new Collection());
        $this->setErrors(new Collection());
    }

    /**
     * @param string $name
     *
     * @return void
     */
    public function setFullyQualifiedStructuralElementName($name)
    {
        $this->fqsen = $name;
    }

    /**
     * @return string
     */
    public function getFullyQualifiedStructuralElementName()
    {
        return $this->fqsen;
    }

    /**
     * @param string $name
     *
     * @return void
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param string|NamespaceDescriptor $namespace
     */
    public function setNamespace($namespace)
    {
        $this->namespace = $namespace;
    }

    /**
     * @return NamespaceDescriptor|string|null
     */
    public function getNamespace()
    {
        return $this->namespace;
    }

    /**
     * @param string $summary
     *
     * @return void
     */
    public function setSummary($summary)
    {
        $this->summary = $summary;
    }

    /**
     * @return string
     */
    public function getSummary()
    {
        // if the summary is not set, inherit it from the parent
        if ((!$this->summary || strtolower(trim($this->summary)) == '{@inheritdoc}')
            && ($this instanceof ChildInterface)
            && ($this->getParent() instanceof self)
        ) {
            return $this->getParent()->getSummary();
        }

        return $this->summary;
    }

    /**
     * @param string $description
     *
     * @return void
     */
    public function setDescription($description)
    {
        $this->description = $description;
    }

    /**
     * @return string
     */
    public function getDescription()
    {
        // if the description is not set, inherit it from the parent
        if (!$this->description && ($this instanceof ChildInterface) && ($this->getParent() instanceof self)) {
            return $this->getParent()->getDescription();
        }

        return $this->description;
    }

    /**
     * @param FileDescriptor $file
     * @param int    $line
     *
     * @return void
     */
    public function setLocation(FileDescriptor $file, $line = 0)
    {
        $this->fileDescriptor = $file;
        $this->line = $line;
    }

    /**
     * @return string
     */
    public function getPath()
    {
        return $this->fileDescriptor ? $this->fileDescriptor->getPath() : '';
    }

    /**
     * @return FileDescriptor
     */
    public function getFile()
    {
        return $this->fileDescriptor;
    }

    /**
     * @return int
     */
    public function getLine()
    {
        return $this->line;
    }

    /**
     * Sets the line number for this element's location in the source file.
     *
     * @param integer $lineNumber
     *
     * @return void
     */
    public function setLine($lineNumber)
    {
        $this->line = $lineNumber;
    }

    /**
     * @param Collection $tags
     *
     * @return void
     */
    public function setTags(Collection $tags)
    {
        $this->tags = $tags;
    }

    /**
     * @return Collection
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * @param string $package
     */
    public function setPackage($package)
    {
        $this->package = trim($package);
    }

    /**
     * @return string
     */
    public function getPackage()
    {
        // if the package is not set, inherit it from the parent
        if (!$this->package && ($this instanceof ChildInterface) && ($this->getParent() instanceof self)) {
            return $this->getParent()->getPackage();
        }

        return $this->package;
    }

    /**
     * @return Collection
     */
    public function getSubPackage()
    {
        /** @var Collection $subpackage */
        $subpackage = $this->getTags()->get('subpackage', new Collection());

        // if the subpackage is not set, inherit it from the parent
        if ($subpackage->count() == 0
            && ($this instanceof ChildInterface)
            && ($this->getParent() instanceof self)
            && ($this->getParent()->getPackage() == $this->getPackage())
        ) {
            return $this->getParent()->getSubPackage();
        }

        $subpackageDescriptor = current(current($subpackage));

        return $subpackageDescriptor ? $subpackageDescriptor->getDescription() : '';
    }

    /**
     * Returns the authors for this element.
     *
     * @return Collection
     */
    public function getAuthor()
    {
        /** @var Collection $author */
        $author = $this->getTags()->get('author', new Collection());

        // if the author is not set, inherit it from the parent
        if ($author->count() == 0 && ($this instanceof ChildInterface) && ($this->getParent() instanceof self)) {
            return $this->getParent()->getAuthor();
        }

        return $author;
    }

    /**
     * Returns the versions for this element.
     *
     * @return Collection
     */
    public function getVersion()
    {
        /** @var Collection $version */
        $version = $this->getTags()->get('version', new Collection());

        // if the version is not set, inherit it from the parent
        if ($version->count() == 0 && ($this instanceof ChildInterface) && ($this->getParent() instanceof self)) {
            return $this->getParent()->getVersion();
        }

        return $version;
    }

    /**
     * Returns the copyrights for this element.
     *
     * @return Collection
     */
    public function getCopyright()
    {
        /** @var Collection $copyright */
        $copyright = $this->getTags()->get('copyright', new Collection());

        // if the copyright is not set, inherit it from the parent
        if ($copyright->count() == 0 && ($this instanceof ChildInterface) && ($this->getParent() instanceof self)) {
            return $this->getParent()->getCopyright();
        }

        return $copyright;
    }

    /**
     * Checks whether this element is deprecated.
     *
     * @return boolean
     */
    public function isDeprecated()
    {
        return isset($this->tags['deprecated']);
    }

    /**
     * @param Collection $errors
     */
    public function setErrors(Collection $errors)
    {
        $this->errors = $errors;
    }

    /**
     * @return Collection
     */
    public function getErrors()
    {
        return $this->errors;
    }

    /**
     * Dynamically constructs a set of getters to retrieve tag (collections) with.
     *
     * Important: __call() is not a fast method of access; it is preferred to directly use the getTags() collection.
     * This interface is provided to allow for uniform and easy access to certain tags.
     *
     * @param string  $name
     * @param mixed[] $arguments
     *
     * @return Collection|null
     */
    public function __call($name, $arguments)
    {
        if (substr($name, 0, 3) !== 'get') {
            return null;
        }

        $tagName = substr($name, 3);
        $tagName[0] = strtolower($tagName[0]); // lowercase the first letter

        return $this->getTags()->get($tagName, new Collection());
    }

    /**
     * Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
     *
     * @return string
     */
    public function __toString()
    {
        return $this->getFullyQualifiedStructuralElementName();
    }
}


text:
export function genCSSModulesCode(
  id: string,
  index: number,
  request: string,
  moduleName: string | boolean,
  needsHotReload: boolean
): string {
  const styleVar = `style${index}`
  let code = `\nimport ${styleVar} from ${request}`

  // inject variable
  const name = typeof moduleName === 'string' ? moduleName : '$style'
  code += `\ncssModules["${name}"] = ${styleVar}`

  if (needsHotReload) {
    code += `
if (module.hot) {
  module.hot.accept(${request}, () => {
    cssModules["${name}"] = ${styleVar}
    __VUE_HMR_RUNTIME__.rerender("${id}")
  })
}`
  }

  return code
}


text:
import localStorageMock from '../../src/app/__mock__/localStorage';

describe('Local Storage', () => {
  it('add and get items from localStorage', () => {
    localStorageMock.setItem(0, 'hello');
    localStorageMock.setItem(1, 'world');
    expect(localStorageMock.getItem(0)).toBe('hello');
    expect(localStorageMock.getItem(1)).toBe('world');
  });

  it('should clear the local storage on clear', () => {
    localStorageMock.clear();
    expect(localStorageMock.getItem(0)).toBeUndefined();
  });
});


text:
// Copyright 2008 Google Inc.
//
// 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.
//
#include "helpers.h"

#include <sstream>
#include <iostream>
#include <fstream>
#include "Linear.h"
#include "MemoryXFile.h"

namespace Torch {

DiskXFile* InitResultsFile(Allocator* allocator,std::string expdir, std::string type)
{
  std::stringstream ss;
  ss.str("");
  ss.clear();
  std::string expdirprefix = expdir.substr(0,expdir.length()-1);
  ss << expdirprefix <<  "_" << type << "_results.txt";
  DiskXFile *resultsfile = new(allocator) DiskXFile(ss.str().c_str(),"w");
  return resultsfile;
}

void AddClassificationMeasurers(Allocator* allocator, std::string expdir,
                                MeasurerList *measurers, Machine *machine,
                                DataSet *train, DataSet *valid, DataSet *test,
                                ClassFormat *class_format, bool disk_results)
{
  std::stringstream ss;
  XFile* tfile_mentor_train_nll;
  XFile* tfile_mentor_train_class;
  XFile* tfile_mentor_valid_nll;
  XFile* tfile_mentor_valid_class;
  XFile* tfile_mentor_test_nll;
  XFile* tfile_mentor_test_class;

  // train
  ss.str("");
  ss.clear();
  //ss << expdir << machine->name << "_train_nll.txt";
  ss << expdir << "train_nll.txt";
  if (disk_results) {
    DiskXFile *file_mentor_train_nll = new(allocator) DiskXFile(ss.str().c_str(),"w");
    tfile_mentor_train_nll = file_mentor_train_nll;
  }
  else  {
    MemoryXFile *file_mentor_train_nll = new(allocator) MemoryXFile();
    tfile_mentor_train_nll = file_mentor_train_nll;
  }

  ClassNLLMeasurer *measurer_mentor_train_nll = new(allocator) ClassNLLMeasurer(machine->outputs, train,
                                                                             class_format, tfile_mentor_train_nll);
  measurers->addNode(measurer_mentor_train_nll);
  ss.str("");
  ss.clear();
  //ss << expdir << machine->name << "_train_class.txt";
  ss << expdir << "train_class.txt";
  if (disk_results) {
    DiskXFile *file_mentor_train_class = new(allocator) DiskXFile(ss.str().c_str(),"w");
    tfile_mentor_train_class = file_mentor_train_class;
  }
  else {
    MemoryXFile *file_mentor_train_class = new(allocator) MemoryXFile();
    tfile_mentor_train_class = file_mentor_train_class;
  }

  ClassMeasurer *measurer_mentor_train_class = new(allocator) ClassMeasurer(machine->outputs, train,
                                                                         class_format, tfile_mentor_train_class);
  measurers->addNode(measurer_mentor_train_class);
  // valid
  ss.str("");
  ss.clear();
  //ss << expdir << machine->name << "_valid_nll.txt";
  ss << expdir << "valid_nll.txt";

  if (disk_results) {
    DiskXFile *file_mentor_valid_nll = new(allocator) DiskXFile(ss.str().c_str(),"w");
    tfile_mentor_valid_nll = file_mentor_valid_nll;
  }
  else {
    MemoryXFile *file_mentor_valid_nll = new(allocator) MemoryXFile();
    tfile_mentor_valid_nll = file_mentor_valid_nll;
  }

  ClassNLLMeasurer *measurer_mentor_valid_nll = new(allocator) ClassNLLMeasurer(machine->outputs, valid,
                                                                             class_format, tfile_mentor_valid_nll);
  measurers->addNode(measurer_mentor_valid_nll);
  ss.str("");
  ss.clear();
  //ss << expdir << machine->name << "_valid_class.txt";
  ss << expdir << "valid_class.txt";

  if (disk_results) {
    DiskXFile *file_mentor_valid_class = new(allocator) DiskXFile(ss.str().c_str(),"w");
    tfile_mentor_valid_class = file_mentor_valid_class;
  }
  else {
    MemoryXFile  *file_mentor_valid_class = new(allocator) MemoryXFile();
    tfile_mentor_valid_class = file_mentor_valid_class;
  }

  ClassMeasurer *measurer_mentor_valid_class = new(allocator) ClassMeasurer(machine->outputs, valid,
                                                                         class_format, tfile_mentor_valid_class);
  measurers->addNode(measurer_mentor_valid_class);
  // test
  ss.str("");
  ss.clear();
  //ss << expdir << machine->name << "_test_nll.txt";
  ss << expdir << "test_nll.txt";
  if (disk_results) {
    DiskXFile *file_mentor_test_nll = new(allocator) DiskXFile(ss.str().c_str(),"w");
    tfile_mentor_test_nll = file_mentor_test_nll;
  }
  else {
    MemoryXFile  *file_mentor_test_nll  = new(allocator)  MemoryXFile();
    tfile_mentor_test_nll = file_mentor_test_nll;
  }

  ClassNLLMeasurer *measurer_mentor_test_nll = new(allocator) ClassNLLMeasurer(machine->outputs, test,
                                                                             class_format, tfile_mentor_test_nll);
  measurers->addNode(measurer_mentor_test_nll);
  ss.str("");
  ss.clear();
  //ss << expdir << machine->name << "_test_class.txt";
  ss << expdir << "test_class.txt";

  if (disk_results) {
    DiskXFile *file_mentor_test_class = new(allocator) DiskXFile(ss.str().c_str(),"w");
    tfile_mentor_test_class = file_mentor_test_class;
  }
  else {
    MemoryXFile  *file_mentor_test_class = new(allocator) MemoryXFile();
    tfile_mentor_test_class = file_mentor_test_class;
  }

  ClassMeasurer *measurer_mentor_test_class = new(allocator) ClassMeasurer(machine->outputs, test,
                                                                         class_format, tfile_mentor_test_class);
  measurers->addNode(measurer_mentor_test_class);
}

Criterion* NewUnsupCriterion(Allocator* allocator, std::string recons_cost, int size)
{
  if(recons_cost=="xentropy")   {
    return new(allocator) CrossEntropyCriterion(size);
  }     else if(recons_cost=="mse")     {
    return new(allocator) MSECriterion(size);
  }     else    {
    error("%s is not a valid reconstruction cost!", recons_cost.c_str());
    return NULL;
  }
}

Measurer* NewUnsupMeasurer(Allocator* allocator, std::string recons_cost,
                           Sequence *inputs_, DataSet *data_, XFile *file_)
{
  if(recons_cost=="xentropy")   {
    return new(allocator) CrossEntropyMeasurer(inputs_, data_, file_);
  }     else if(recons_cost=="mse")     {
    return new(allocator) MSEMeasurer(inputs_, data_, file_);
  }     else    {
    error("%s is not a valid reconstruction measurer!", recons_cost.c_str());
    return NULL;
  }
}

void BuildSaeUnsupDataSetsCriteriaMeasurers(Allocator *allocator,
                                            std::string expdir,
                                            StackedAutoencoder *sae,
                                            DataSet *supervised_train_data,
                                            Criterion *supervised_criterion,
                                            std::string recons_cost,
                                            bool criterion_avg_frame_size,
                                            DataSet **unsup_datasets,
                                            Criterion **unsup_criterions,
                                            Measurer **unsup_measurers,
                                            bool disk_results)
{
  std::stringstream ss;
  XFile* thefile;

  for(int i=0; i<sae->n_hidden_layers; i++) {
    // DataSet
    // The first dataset is special, as it can't just monitor a memory
    // location. The examples are each at different locations.
    if(i==0)
      unsup_datasets[0] = new(allocator) InputAsTargetDataSet(supervised_train_data);
    else
      unsup_datasets[i] = new(allocator) DynamicDataSet(supervised_train_data, (Sequence*)NULL, sae->encoders[i-1]->outputs);

    // Criterion
    unsup_criterions[i] = NewUnsupCriterion(allocator, recons_cost, sae->decoders[i]->n_outputs);
    unsup_criterions[i]->setBOption("average frame size", criterion_avg_frame_size);
    unsup_criterions[i]->setDataSet(unsup_datasets[i]);

    // Measurer
    ss.str("");
    ss.clear();

    if (disk_results) {
      ss << expdir << sae->name << "_unsup_" << recons_cost << "_layer_" << i << ".txt";
      DiskXFile *file = new(allocator) DiskXFile(ss.str().c_str(),"w");
      thefile = file;
    }
    else {
      MemoryXFile *file = new(allocator) MemoryXFile();
      thefile = file;
    }

    unsup_measurers[i] = NewUnsupMeasurer(allocator, recons_cost,
                                          sae->decoders[i]->outputs,
                                          unsup_datasets[i],
                                          thefile);
  }
}

/*
void StackedAutoencoderTrainer::FreeUnsupDataSetsCriteriaMeasurers()
{
  for(int i=0; i<sae->n_hidden_layers; i++) {
    allocator->free(unsup_datasets[i]);
    allocator->free(unsup_criterions[i]);
    allocator->free(unsup_measurers[i]->file);
    allocator->free(unsup_measurers[i]);
  }
  allocator->free(unsup_datasets);
  allocator->free(unsup_criterions);
  allocator->free(unsup_measurers);
}
*/

// We don't know what to agree with yet, so agree with ourself.
// -> the datasets' targets will need to be set!
void BuildSaeComAgreeDatasetsCriteriaMeasurers(Allocator *allocator,
                                          std::string expdir,
                                          CommunicatingStackedAutoencoder *csae,
                                          DataSet *supervised_train_data,
                                          Criterion *supervised_criterion,
                                          std::string recons_cost,
                                          int communication_type,
                                          bool criterion_avg_frame_size,
                                          DataSet **agree_datasets,
                                          Criterion **agree_criterions,
                                          Measurer **agree_measurers,
                                          bool disk_results,
                                          int n_communication_layers)
{
  std::stringstream ss;
  XFile *file;

  for(int i=0; i<n_communication_layers; i++) {

    ss.str("");
    ss.clear();

    if (disk_results) {
      ss << expdir << csae->name << "_comAgree_" << recons_cost << "_layer_" << i << ".txt";
      file = new(allocator) DiskXFile(ss.str().c_str(),"w");
    }
    else
      file = new(allocator) MemoryXFile();

    // *** Com0 and Com1 - We try to match the other guy's hidden units...
    if( communication_type==0 || communication_type==1 )        {
      agree_datasets[i] = new(allocator) DynamicDataSet(supervised_train_data, (Sequence*)NULL, csae->encoders[i]->outputs);

      agree_criterions[i] = NewUnsupCriterion(allocator, recons_cost, csae->encoders[i]->n_outputs);
      agree_criterions[i]->setBOption("average frame size", criterion_avg_frame_size);
      agree_criterions[i]->setDataSet(agree_datasets[i]);

      // ... with our own units
      if(communication_type==0) {
        agree_measurers[i] = NewUnsupMeasurer(allocator, recons_cost,
                                              csae->encoders[i]->outputs,
                                              agree_datasets[i], file);
      }
      // ... with our speech
      else      {
        agree_measurers[i] = NewUnsupMeasurer(allocator, recons_cost,
                                              csae->speakers[i]->outputs,
                                              agree_datasets[i], file);
      }
    }
    // *** Com2 - We try to match the other guy's speech with our speech
    else        {
      agree_datasets[i] = new(allocator) DynamicDataSet(supervised_train_data, (Sequence*)NULL, csae->speakers[i]->outputs);
      agree_criterions[i] = NewUnsupCriterion(allocator, recons_cost, csae->speakers[i]->n_outputs);
      agree_criterions[i]->setBOption("average frame size", criterion_avg_frame_size);
      agree_criterions[i]->setDataSet(agree_datasets[i]);
      agree_measurers[i] = NewUnsupMeasurer(allocator, recons_cost,
                                            csae->speakers[i]->outputs,
                                            agree_datasets[i], file);
    }
  }
}

void BuildSaeComContentDatasetsCriteriaMeasurers(Allocator *allocator,
                                          std::string expdir,
                                          CommunicatingStackedAutoencoder *csae,
                                          DataSet *supervised_train_data,
                                          Criterion *supervised_criterion,
                                          std::string recons_cost,
                                          bool criterion_avg_frame_size,
                                          DataSet **content_datasets,
                                          Criterion **content_criterions,
                                          Measurer **content_measurers,
                                          bool disk_results,
                                          int n_communication_layers)
{
  std::stringstream ss;
  XFile *file;

  for(int i=0; i<n_communication_layers; i++) {
    content_datasets[i] = new(allocator) DynamicDataSet(supervised_train_data, (Sequence*)NULL, csae->encoders[i]->outputs);
    content_criterions[i] = NewUnsupCriterion(allocator, recons_cost, csae->encoders[i]->n_outputs);
    content_criterions[i]->setBOption("average frame size", criterion_avg_frame_size);
    content_criterions[i]->setDataSet(content_datasets[i]);

    ss.str("");
    ss.clear();

    if (disk_results) {
      ss << expdir << csae->name << "_comContent_" << recons_cost << "_layer_" << i << ".txt";
      file = new(allocator) DiskXFile(ss.str().c_str(),"w");
    }
    else
      file = new(allocator) MemoryXFile();

    content_measurers[i] = NewUnsupMeasurer(allocator, recons_cost, csae->listeners[i]->outputs,
                                            content_datasets[i], file);
  }
}

/*
void CommunicatingSaePairTrainer::FreeComDataSetsCriteriaMeasurers()
{
}
*/

void SaveCoder(std::string expdir, std::string filename, Coder *coder)
{
  warning("SaveCoder(...) - implements a partial save only.");

  std::string model_filename = expdir + filename;
  DiskXFile xfile_model(model_filename.c_str(), "w");

  xfile_model.taggedWrite(&coder->n_inputs, sizeof(int), 1, "n_inputs");
  xfile_model.taggedWrite(&coder->n_outputs, sizeof(int), 1, "n_outputs");
  int nonlinearity_length = coder->nonlinearity.length()+1;
  xfile_model.taggedWrite(&nonlinearity_length, sizeof(int), 1, "nonlinearity_length");
  xfile_model.taggedWrite((char*)coder->nonlinearity.c_str(), sizeof(char), nonlinearity_length, "nonlinearity");

  coder->saveXFile(&xfile_model);
}

Coder* LoadCoder(Allocator* allocator, std::string filename)
{
  warning("LoadCoder(...) - implements a partial load only.");
  XFile *m = new(allocator) DiskXFile(filename.c_str(), "r");

  int n_inputs=0;
  m->taggedRead(&n_inputs, sizeof(int), 1, "n_inputs");
  int n_outputs=0;
  m->taggedRead(&n_outputs, sizeof(int), 1, "n_outputs");
  int nonlinearity_length=0;
  m->taggedRead(&nonlinearity_length, sizeof(int), 1, "nonlinearity_length");
  char *nonlinearity = new char[nonlinearity_length];
  m->taggedRead(nonlinearity, sizeof(char), nonlinearity_length, "nonlinearity");

  Coder *coder = new(allocator) Coder(n_inputs, n_outputs, false, NULL, false, false, nonlinearity);
  coder->loadXFile(m);

  delete nonlinearity;
  return coder;
}

void SaveCSAE(std::string expdir, std::string type, int n_layers, int n_inputs, int *units_per_hidden_layer, int *units_per_speech_layer,
              int n_classes,
              bool tied_weights, std::string nonlinearity, std::string recons_cost,
              real corrupt_prob, real corrupt_value,
              CommunicatingStackedAutoencoder *csae)
{
  std::string model_filename = expdir + type + "model.save";
  DiskXFile model_(model_filename.c_str(), "w");

  // save whar's necessary to rebuilding the architecture
  model_.taggedWrite(&n_inputs, sizeof(int), 1, "n_inputs");
  model_.taggedWrite(&n_classes, sizeof(int), 1, "n_classes");
  model_.taggedWrite(&n_layers, sizeof(int), 1, "n_layers");
  model_.taggedWrite(units_per_hidden_layer, sizeof(int), n_layers, "units_per_hidden_layer");
  model_.taggedWrite(units_per_speech_layer, sizeof(int), n_layers, "units_per_speech_layer");
  model_.taggedWrite(&tied_weights, sizeof(bool), 1, "tied_weights");
  model_.taggedWrite(&csae->reparametrize_tied, sizeof(bool), 1, "reparametrize_tied");
  model_.taggedWrite(&csae->communication_type, sizeof(int), 1, "communication_type");
  model_.taggedWrite(&csae->n_communication_layers, sizeof(int), 1, "n_communication_layers");

  int nonlinearity_integer;
  if(nonlinearity=="tanh")    {
    nonlinearity_integer = 0;
  }     else if(nonlinearity=="sigmoid")        {
    nonlinearity_integer = 1;
  }     else if (nonlinearity=="nonlinear")     {
    nonlinearity_integer = 2;
  }     else    {
    nonlinearity_integer = -1;
    error("SaveCSAE - Unrecognized nonlinearity!");
  }
  model_.taggedWrite(&nonlinearity_integer, sizeof(int), 1, "nonlinearity: 0 tanh, 1 sigmoid, 2 nonlinear");

  int recons_cost_integer;
  if(recons_cost=="xentropy")   {
    recons_cost_integer = 0;
  }     else if(recons_cost=="mse")     {
    recons_cost_integer = 1;
  }     else    {
    error("SaveCSAE - %s is not a valid reconstruction cost!", recons_cost.c_str());
  }
  model_.taggedWrite(&recons_cost_integer, sizeof(int), 1, "recons_cost: 0 xentropy, 1 tanh");

  model_.taggedWrite(&corrupt_prob, sizeof(real), 1, "corrupt_prob");
  model_.taggedWrite(&corrupt_value, sizeof(real), 1, "corrupt_value");
  csae->saveXFile(&model_);
}

CommunicatingStackedAutoencoder* LoadCSAE(Allocator* allocator, std::string filename)
{
  int n_layers;
  int n_inputs;
  int *units_per_hidden_layer;
  int *units_per_speech_layer;
  int n_classes;
  bool tied_weights;
  bool reparametrize_tied;
  int nonlinearity_integer;
  std::string nonlinearity;
  int recons_cost_integer;
  std::string recons_cost;
  real corrupt_prob;
  real corrupt_value;
  int communication_type;
  int n_communication_layers;
  CommunicatingStackedAutoencoder *csae;

  XFile *m = new(allocator) DiskXFile(filename.c_str(), "r");

  m->taggedRead(&n_inputs, sizeof(int), 1, "n_inputs");
  m->taggedRead(&n_classes, sizeof(int), 1, "n_classes");
  m->taggedRead(&n_layers, sizeof(int), 1, "n_layers");
  units_per_hidden_layer = (int*)malloc(sizeof(int)*(n_layers));
  m->taggedRead(units_per_hidden_layer, sizeof(int), n_layers, "units_per_hidden_layer");
  units_per_speech_layer = (int*)malloc(sizeof(int)*(n_layers));
  m->taggedRead(units_per_speech_layer, sizeof(int), n_layers, "units_per_speech_layer");
  m->taggedRead(&tied_weights, sizeof(bool), 1, "tied_weights");
  warning("Ignoring reparametrize_tied's value");
  //m->taggedRead(&reparametrize_tied, sizeof(bool), 1, "reparametrize_tied");
  reparametrize_tied = false;

  m->taggedRead(&communication_type, sizeof(int), 1, "communication_type");
  m->taggedRead(&n_communication_layers, sizeof(int), 1, "n_communication_layers");

  m->taggedRead(&nonlinearity_integer, sizeof(int), 1, "nonlinearity: 0 tanh, 1 sigmoid, 2 nonlinear");
  if(nonlinearity_integer==0)    {
    nonlinearity = "tanh";
  }     else if(nonlinearity_integer==1)        {
    nonlinearity = "sigmoid";
  }     else if (nonlinearity_integer==2)     {
    nonlinearity = "nonlinear";
  }     else    {
    nonlinearity = "";
    error("LoadCSAE - Unrecognized nonlinearity!");
  }

  m->taggedRead(&recons_cost_integer, sizeof(int), 1, "recons_cost: 0 xentropy, 1 tanh");
  if(recons_cost_integer==0)   {
    recons_cost = "xentropy";
  }     else if(recons_cost_integer==1)     {
    recons_cost = "mse";
  }     else    {
    error("LoadCSAE - Unrecognized reconstruction cost!");
  }

  m->taggedRead(&corrupt_prob, sizeof(real), 1, "corrupt_prob");
  m->taggedRead(&corrupt_value, sizeof(real), 1, "corrupt_value");

  // ------
  /*
  cout << "n_layers=" << n_layers << std::endl;

  cout << "units_per_hidden_layer";
  for(int i=0; i<n_layers; i++) {
    cout << " " << units_per_hidden_layer[i];
  }
  cout << std::endl;

  cout << "units_per_speech_layer";
  for(int i=0; i<n_layers; i++) {
    cout << " " << units_per_speech_layer[i];
  }
  cout << std::endl;

  cout << "tied_weights " << tied_weights << std::endl;
  cout << "nonlinearity " << nonlinearity << std::endl;
  cout << "recons_cost " << recons_cost << std::endl;
  cout << "corrupt_prob " << corrupt_prob << std::endl;
  cout << "corrupt_value " << corrupt_value << std::endl;
  */
  // ------

  warning("should do a lean construction of csae here...");
  warning("Ignoring first_layer_smoothed's value");
  // Are the autoencoders noisy?
  bool is_noisy = false;
  if(corrupt_prob>0.0)
    is_noisy = true;
  csae = new(allocator) CommunicatingStackedAutoencoder("csae", nonlinearity, tied_weights, reparametrize_tied, n_inputs,
              n_layers, units_per_hidden_layer, n_classes,
              is_noisy, false, units_per_speech_layer,  communication_type, n_communication_layers);

  csae->loadXFile(m);

  return csae;
}

void saveWeightMatrix(std::string filename, Coder* the_coder, bool is_transposed)
{
  // find the first linear machine
  Linear *linear = the_coder->linear_layer;

  int n_inputs = linear->n_inputs;
  int n_outputs = linear->n_outputs;
  real *weights = linear->weights;
  real *bias = linear->bias;

  // Open the output file
  std::ofstream fd(filename.c_str());
  if(!fd.is_open())
    error("saveWeightMatrix - can't open %s", filename.c_str());

  if(!is_transposed)    {
    for(int j=0; j<n_outputs; j++)      {
      for(int k=0; k<n_inputs; k++)     {
        fd << weights[k] << " ";
      }
      fd << bias[j] << std::endl;
      weights += n_inputs;
    }
  // these weights are stored transposed
  }     else    {
    for(int j=0; j<n_outputs; j++)      {
      for(int k=0; k<n_inputs; k++)     {
        fd << weights[k*n_outputs + j] << " ";
      }
      fd << bias[j] << std::endl;
    }
  }

  fd.close();
}

void saveWeightMatrices(CommunicatingStackedAutoencoder* csae, std::string dir, bool is_transposed)
{
  std::stringstream ss;

  // save the number of layers in a file
  std::string filename_nlayers = dir + "nlayers.txt";
  std::ofstream fd_nlayers(filename_nlayers.c_str());
  if(!fd_nlayers.is_open())     {
    error("saveWeightMatrices - can't open %s", filename_nlayers.c_str());
  }
  fd_nlayers << csae->n_hidden_layers;
  fd_nlayers.close();

  // for all hidden layers output the 4 weight matrices (possibly 2 equal)
  for(int i=0; i<csae->n_hidden_layers; i++) {
    // W
    ss.str("");
    ss.clear();
    ss << dir << "W" << i << ".txt";
    saveWeightMatrix(ss.str(), csae->encoders[i], false);

    // V
    ss.str("");
    ss.clear();
    ss << dir << "V" << i << ".txt";
    saveWeightMatrix(ss.str(), csae->decoders[i], is_transposed);

    // F
    if (csae->communication_type > 0)  {
      ss.str("");
      ss.clear();
      ss << dir << "F" << i << ".txt";
      saveWeightMatrix(ss.str(), csae->speakers[i], false);
    }

    // G
    if (csae->communication_type > 1)  {
      ss.str("");
      ss.clear();
      ss << dir << "G" << i << ".txt";
      saveWeightMatrix(ss.str(), csae->listeners[i], is_transposed);
    }
  }

  // output the output layer
  ss.str("");
  ss.clear();
  ss << dir << "W" << csae->n_hidden_layers << ".txt";
  saveWeightMatrix(ss.str(), csae->outputer, false);

}

void saveRepresentation(std::ofstream *fd, real *ptr, int n)       {
  for(int i=0; i<n; i++)      {
    *fd << ptr[i] << " ";
  }
  *fd << std::endl;
}

void openNumberedRepresentationFile(std::ofstream *fd, std::string dir, std::string name, int number)
{
  std::stringstream ss;
  ss << dir << name << number << ".txt";
  fd->open(ss.str().c_str());
  if(!fd->is_open())    {
    error("openNumberedRepresentationFile - couldn't open %s", ss.str().c_str());
  }
}

void saveRepresentations(CommunicatingStackedAutoencoder* csae, std::string dir,
                         DataSet *data, int n_examples)
{
  int nhid = csae->n_hidden_layers;

  // open all the necessary files
  std::ofstream fd_input;
  std::ofstream fd_output;
  std::ofstream* fds_hidden = new std::ofstream[nhid];
  std::ofstream* fds_speech = new std::ofstream[nhid];
  std::ofstream* fds_recons_from_hidden = new std::ofstream[nhid];
  std::ofstream* fds_recons_from_speech = new std::ofstream[nhid];

  std::string filename;
  filename = dir + "input.txt";
  fd_input.open(filename.c_str());
  filename = dir + "output.txt";
  fd_output.open(filename.c_str());

  if(!fd_input.is_open() || !fd_output.is_open())
    error("saveRepresentations - problem opening a file.");

  std::stringstream ss;
  for(int i=0; i<nhid; i++)  {
    openNumberedRepresentationFile(&fds_hidden[i], dir, "hidden_l", i);
    openNumberedRepresentationFile(&fds_recons_from_hidden[i], dir, "recons_from_hidden_l", i);
    if (csae->communication_type > 0)
      openNumberedRepresentationFile(&fds_speech[i], dir, "speech_l", i);
    if (csae->communication_type > 1)
      openNumberedRepresentationFile(&fds_recons_from_speech[i], dir, "recons_from_speech_l", i);
  }

  // create a place to exponentiate the outputs (logsoftmax)
  real *exp_output = (real*) malloc(sizeof(real)*csae->n_outputs);

  // for each example fprop and then print everything
  for(int i=0; i<n_examples; i++)       {
    data->setExample(i);

    if (csae->communication_type == 0)  {
      csae->sup_unsup_comA_machine->forward(data->inputs);
    }  else if (csae->communication_type == 1)  {
      csae->sup_unsup_comB_machine->forward(data->inputs);
    }  else if (csae->communication_type == 2)  {
      csae->sup_unsup_comC_machine->forward(data->inputs);
    }  else  {
      error("saveRepresentations - invalid communication_type.");
    }

    saveRepresentation(&fd_input, data->inputs->frames[0], data->n_inputs);
    for(int j=0; j<csae->n_outputs; j++)        {
      exp_output[j] = exp(csae->outputs->frames[0][j]);
    }
    saveRepresentation(&fd_output, exp_output, csae->n_outputs);

    for(int l=0; l<nhid; l++)  {
      saveRepresentation(&fds_hidden[l], csae->encoders[l]->outputs->frames[0], csae->encoders[l]->n_outputs);
      saveRepresentation(&fds_recons_from_hidden[l], csae->decoders[l]->outputs->frames[0], csae->decoders[l]->n_outputs);
      if (csae->communication_type > 0)
        saveRepresentation(&fds_speech[l], csae->speakers[l]->outputs->frames[0], csae->speakers[l]->n_outputs);
      if (csae->communication_type > 1)
        saveRepresentation(&fds_recons_from_speech[l], csae->listeners[l]->outputs->frames[0], csae->listeners[l]->n_outputs);
    }
  }

  // close all files
  fd_input.close();
  fd_output.close();
  for(int i=0; i<nhid; i++)  {
    fds_hidden[i].close();
    fds_recons_from_hidden[i].close();
    if (csae->communication_type > 0)
      fds_speech[i].close();
    if (csae->communication_type > 1)
      fds_recons_from_speech[i].close();
  }

}

void saveOutputs(CommunicatingStackedAutoencoder* csae, DataSet *data, int n_outputs,
                std::string dir, std::string data_label)
{

  csae->setDataSet(data);
  std::stringstream ss_outputs;

  // Iterate over the data, putting the outputs in a stringstream
  for (int i=0; i<data->n_examples; i++)  {

    data->setExample(i);
    csae->forward(data->inputs);

    for (int j=0; j<n_outputs; j++)
      ss_outputs << csae->outputs->frames[0][j] << " ";

  }

  // Save the outputs to a file
  std::ofstream fd_outputs;
  std::stringstream ss_filename;
  ss_filename << dir << data_label << n_outputs << "outputs.txt";
  fd_outputs.open(ss_filename.str().c_str());
  if (!fd_outputs.is_open())
    error("saveOutputs(...) - cannot open the file.");

  fd_outputs << ss_outputs.str() << std::endl;
  fd_outputs.close();
}

void LoadBinners(Allocator* allocator, char* flag_binners_location,
                  CommunicatingStackedAutoencoder *csae,
                  Binner **w_binners, Binner **b_binners)
{
  std::stringstream filename;
  XFile *the_xfile;

  for (int i=0; i<csae->n_hidden_layers; i++) {
    filename.str("");
    filename.clear();
    filename << flag_binners_location << "binner_w" << i << ".save";
    the_xfile = new(allocator) DiskXFile(filename.str().c_str(), "r");
    w_binners[i] = new(allocator) Binner();
    w_binners[i]->loadXFile(the_xfile);
    allocator->free(the_xfile);

    filename.str("");
    filename.clear();
    filename << flag_binners_location << "binner_b" << i << ".save";
    the_xfile = new(allocator) DiskXFile(filename.str().c_str(), "r");
    b_binners[i] = new(allocator) Binner();
    b_binners[i]->loadXFile(the_xfile);
    allocator->free(the_xfile);
  }
}

void ReInitCsaeFromBinners(CommunicatingStackedAutoencoder *csae,
                            Binner **w_binners, Binner **b_binners)
{
  for (int i=0; i<csae->n_hidden_layers; i++) {
    Linear *linear_layer = csae->encoders[i]->linear_layer;
    real *weights_ = linear_layer->weights;
    real *bias_ = linear_layer->bias;

    for (int j=0; j<linear_layer->n_outputs; j++) {
      for (int k=0; k<linear_layer->n_inputs; k++)
        weights_[k] = w_binners[i]->draw();
      bias_[j] = b_binners[i]->draw();
      weights_ += linear_layer->n_inputs;
    }
  }
}

}


text:
JAVA="/usr/lib/jvm/jdk1.7.0_67/bin/java"

echo $JAVA -jar supervisor-starter.jar
nohup $JAVA -jar supervisor-starter.jar &

sleep 5

echo $JAVA -jar master-starter.jar
nohup $JAVA -jar master-starter.jar &

sleep 5

echo $JAVA -jar scheduled-job-starter.jar
nohup $JAVA -jar scheduled-job-starter.jar &


text:
require_relative '../pcmk_noop'

Puppet::Type.type(:pcmk_resource).provide(:noop, :parent => Puppet::Provider::PcmkNoop) do
  # disable this provider
  confine({ :true => false })
end


text:
import * as ActionTypes from '../actions'
import merge from 'lodash/merge'
import { routerReducer as routing } from 'react-router-redux'
import { combineReducers } from 'redux'

// Updates an entity cache in response to any action with response.posts.
const posts = (state = {}, action) => {
    if (action.type === ActionTypes.POSTS_SUCCESS && action.response && action.response) {
        return merge({}, state, action.response)
    }
    return state
}

const post = (state = {}, action) => {
    if (action.type === ActionTypes.POST_SUCCESS && action.response) {
        return action.response
    }
    return state
}

// Updates error message to notify about the failed fetches.
const errorMessage = (state = null, action) => {
    const { type, error } = action

    if (type === ActionTypes.RESET_ERROR_MESSAGE) {
        return null
    } else if (error) {
        return action.error
    }

    return state
}

const rootReducer = combineReducers({
    posts,
    post,
    errorMessage,
    routing
})

export default rootReducer


text:
module Fog
  module Concerto
    class Compute
      class Mock
        def create_firewall_profile(name, description, rules)
          Fog::Mock.not_implemented
        end
      end

      class Real
        def create_firewall_profile(name, description, rules)
          body = {
            name: name,
            description: description,
            rules: rules
          }
          request(
            method: :post,
            path: "network/firewall_profiles",
            body: body.reject{|key, value| value.nil?},
            expects: [201]
          )
        end
      end
    end
  end
end


text:
namespace physx
{

	// wrappers for IO classes so that we can add extra functionality (byte counting, buffering etc)

namespace Cm
{

class InputStreamReader
{
public:

	InputStreamReader(PxInputStream& stream) : mStream(stream) {	}
	PxU32	read(void* dest, PxU32 count)
	{
		PxU32 readLength = mStream.read(dest, count);

		// zero the buffer if we didn't get all the data
		if(readLength<count)
			Ps::memZero(reinterpret_cast<PxU8*>(dest)+readLength, count-readLength);

		return readLength;
	}

	template <typename T> T get()
	{
		T val;
		PxU32 length = mStream.read(&val, sizeof(T));
		PX_ASSERT(length == sizeof(T));
		return val;
	}

protected:
	PxInputStream &mStream;
};

class InputDataReader : public InputStreamReader
{
public:
	InputDataReader(PxInputData& data) : InputStreamReader(data) {}

	PxU32	length() const					{		return getData().getLength();		}
	void	seek(PxU32 offset)				{		getData().seek(offset);				}
	PxU32	tell()							{		return getData().tell();			}

private:
	PxInputData& getData()					{		return static_cast<PxInputData&>(mStream); }
	const PxInputData& getData() const		{		return static_cast<const PxInputData&>(mStream); }
};

class OutputStreamWriter
{
public:

	PX_INLINE OutputStreamWriter(PxOutputStream& stream)
	:	mStream(stream)
	,	mCount(0)
	{}

	PX_INLINE	PxU32	write(const void* src, PxU32 offset)
	{
		PxU32 count = mStream.write(src, offset);
		mCount += count;
		return count;
	}

	PX_INLINE	PxU32	getStoredSize()
	{
		return mCount;
	}

	template<typename T> void put(const T& val)
	{
		PxU32 length = write(&val, sizeof(T));
		PX_ASSERT(length == sizeof(T));
	}

private:
	PxOutputStream& mStream;
	PxU32 mCount;
};

class LegacySerialStream : public PxSerialStream
{
public:
	LegacySerialStream(OutputStreamWriter& writer) : mWriter(writer) {}
	void		storeBuffer(const void* buffer, PxU32 size)		{		mWriter.write(buffer, size);	}
	PxU32		getTotalStoredSize()							{		return mWriter.getStoredSize();	}
private:
	OutputStreamWriter& mWriter;
};

}
}

#endif


text:
using System;
using System.Diagnostics;
using System.Globalization;

namespace WpfConverters.Converters.Common
{
    public class ValueConverter : BaseHybridConverterExtension
    {
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value != null)
            {
                if (value is DateTime)
                    Debug.WriteLine($"{Environment.NewLine}---ValueConverter.Convert---{Environment.NewLine}value: {((DateTime?)value).Value}\ttargetType: {targetType}");
                else
                {
                    Debug.WriteLine($"{Environment.NewLine}---ValueConverter.Convert---{Environment.NewLine}value: {value}\ttargetType: {targetType}");
                }
            }
            else
            {
                Debug.WriteLine($"{Environment.NewLine}---ValueConverter.Convert---{Environment.NewLine}value: null\ttargetType: {targetType}");
            }
            return value;
        }

        public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value != null)
            {
                if (value is DateTime)
                    Debug.WriteLine($"{Environment.NewLine}---ValueConverter.ConvertBack---{Environment.NewLine}value: {((DateTime?)value).Value.ToString(CultureInfo.InvariantCulture)}\ttargetType: {targetType}");
                else
                {
                    Debug.WriteLine($"{Environment.NewLine}---ValueConverter.ConvertBack---{Environment.NewLine}value: {value}\ttargetType: {targetType}");
                }
            }
            else
            {
                Debug.WriteLine($"{Environment.NewLine}---ValueConverter.ConvertBack---{Environment.NewLine}value: null\ttargetType: {targetType}");
            }
            return value;
        }

        public override object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }

        public override object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            return null;
        }
    }
}


text:
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Login extends CI_Controller {

    public function __construct() {

        parent:: __construct();
        $this->load->library('session');
        $this->load->model('Login_model', 'model', TRUE);
        $this->load->helper('url');
    }

    public function index() {

        $this->load->helper('form');
        $data['title'] = "Sigere";
        $this->load->view('templates/energia_angular/login_view.php', $data);
    }

    public function validador_cadastro() {

        $dados_cadastro = array(
            "nome" => $this->input->Post("name"),
            "email" => $this->input->Post("email"),
            "senha" => md5($this->input->Post("pwd") . HASH),
            "foto" => "assets/images/user/default.jpg"
        );

        $retorno_cadastro = [];

        $valida = $this->model->valida_cadastro($dados_cadastro);

        if ($valida == 0) {
            $this->cadastrar($dados_cadastro);
            $retorno_cadastro['existe_erro'] = false;
        } else {
            $retorno_cadastro['existe_erro'] = true;
            $retorno_cadastro['mensagem'] = "*Ja Existe um usuario com Esse Email";
        }
        echo json_encode($retorno_cadastro);
    }

    public function cadastrar($dados) {

        $this->model->inserir($dados);
    }

    public function validador_login() {

        $dados_login = array(
            "email" => $this->input->Post("email_login"),
            "senha" => md5($this->input->Post("pwd_login") . HASH),
        );

        $retorno_login = [];

        $valida = $this->model->valida_login($dados_login);

        if ($valida['json'] == 0) {
            $retorno_login['existe_erro'] = "email";
            $retorno_login['mensagem'] = "*Email Não Encontrado";
        } else if ($valida['json'] == 1) {
            $retorno_login['existe_erro'] = "senha";
            $retorno_login['mensagem'] = "*Senha Incorreta";
        } else if ($valida['json'] == 2) {

            $retorno_login['existe_erro'] = "valido";
            $retorno_login['mensagem'] = $valida["nome_login"];

            $usuario = explode(' ', $valida["nome_login"]);

            $dados_sessao = array(
                'nome_de_usuario' => $usuario[0] . " " . $usuario[1],
                'email' => $dados_login['email'],
                'logged_in' => true,
                'id_user' => $valida['id_usuario']
            );
            $this->session->set_userdata($dados_sessao);
        } else {
            $dados_sessao = array(
                'nome_de_usuario' => null,
                'email' => null,
                'logged_in' => false
            );

            $this->session->set_userdata($dados_sessao);
        }
        echo json_encode($retorno_login);
    }

}


text:
<?php

namespace Symfony\Component\PropertyAccess;

/**
 * Traverses a property path and provides additional methods to find out
 * information about the current element.
 *
 * @author Bernhard Schussek <bschussek@gmail.com>
 */
class PropertyPathIterator extends \ArrayIterator implements PropertyPathIteratorInterface
{
    protected $path;

    public function __construct(PropertyPathInterface $path)
    {
        parent::__construct($path->getElements());

        $this->path = $path;
    }

    /**
     * {@inheritdoc}
     */
    public function isIndex()
    {
        return $this->path->isIndex($this->key());
    }

    /**
     * {@inheritdoc}
     */
    public function isProperty()
    {
        return $this->path->isProperty($this->key());
    }
}


text:
export * from './playwright-page';
export * from './playwright-declarations';


text:
package bartMachine;

import java.io.Serializable;

/**
 * This portion of the code used to have many debug functions. These have
 * been removed during the tidy up for release.
 *
 * @author Adam Kapelner and Justin Bleich
 */
@SuppressWarnings("serial")
public abstract class bartMachine_c_debug extends bartMachine_b_hyperparams implements Serializable{

	/** should we create illustrations of the trees and save the images to the debug directory? */
	protected boolean tree_illust = false;

	/** the hook that gets called to save the tree illustrations when the Gibbs sampler begins */
	protected void InitTreeIllustrations() {
		bartMachineTreeNode[] initial_trees = gibbs_samples_of_bart_trees[0];
		TreeArrayIllustration tree_array_illustration = new TreeArrayIllustration(0, unique_name);

		for (bartMachineTreeNode tree : initial_trees){
			tree_array_illustration.AddTree(tree);
			tree_array_illustration.addLikelihood(0);
		}
		tree_array_illustration.CreateIllustrationAndSaveImage();
	}

	/** the hook that gets called to save the tree illustrations for each Gibbs sample */
	protected void illustrate(TreeArrayIllustration tree_array_illustration) {
		if (tree_illust){ //
			tree_array_illustration.CreateIllustrationAndSaveImage();
		}
	}

	/**
	 * Get the untransformed samples of the sigsqs from the Gibbs chaing
	 *
	 * @return	The vector of untransformed variances over all the Gibbs samples
	 */
	public double[] getGibbsSamplesSigsqs(){
		double[] sigsqs_to_export = new double[gibbs_samples_of_sigsq.length];
		for (int n_g = 0; n_g < gibbs_samples_of_sigsq.length; n_g++){
			sigsqs_to_export[n_g] = un_transform_sigsq(gibbs_samples_of_sigsq[n_g]);
		}
		return sigsqs_to_export;
	}

	/**
	 * Queries the depths of the num_trees trees between a range of Gibbs samples
	 *
	 * @param n_g_i		The Gibbs sample number to start querying
	 * @param n_g_f		The Gibbs sample number (+1) to stop querying
	 * @return			The depths of all num_trees trees for each Gibbs sample specified
	 */
	public int[][] getDepthsForTrees(int n_g_i, int n_g_f){
		int[][] all_depths = new int[n_g_f - n_g_i][num_trees];
		for (int g = n_g_i; g < n_g_f; g++){
			for (int t = 0; t < num_trees; t++){
				all_depths[g - n_g_i][t] = gibbs_samples_of_bart_trees[g][t].deepestNode();
			}
		}
		return all_depths;
	}

	/**
	 * Queries the number of nodes (terminal and non-terminal) in the num_trees trees between a range of Gibbs samples
	 *
	 * @param n_g_i		The Gibbs sample number to start querying
	 * @param n_g_f		The Gibbs sample number (+1) to stop querying
	 * @return			The number of nodes of all num_trees trees for each Gibbs sample specified
	 */
	public int[][] getNumNodesAndLeavesForTrees(int n_g_i, int n_g_f){
		int[][] all_new_nodes = new int[n_g_f - n_g_i][num_trees];
		for (int g = n_g_i; g < n_g_f; g++){
			for (int t = 0; t < num_trees; t++){
				all_new_nodes[g - n_g_i][t] = gibbs_samples_of_bart_trees[g][t].numNodesAndLeaves();
			}
		}
		return all_new_nodes;
	}

}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="html-wide" table-class="display nowrap" order="4">

    <css lib="datatables responsive fixedheader">
        div.container { max-width: 1200px }
    </css>
    <js lib="jquery datatables responsive fixedheader">
        <![CDATA[

$(document).ready(function() {
	var table = $('#example').DataTable( {
		responsive: true,
		paging: false
	} );

	new $.fn.dataTable.FixedHeader( table );
} );

]]>
    </js>

    <title lib="Responsive">With FixedHeader</title>

    <info><![CDATA[

This example shows Responsive being used with the DataTables [FixedHeader](http://datatables.net/extensions/fixedheader) extension. FixedHeader will lock a table's header to the top of the table, ensuring that the user always knows what each column relates to.

]]></info>

</dt-example>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="e1dadfd6-7f93-471f-b452-3253e50411f9" name="Default" comment="" />
    <ignored path="app.iws" />
    <ignored path=".idea/workspace.xml" />
    <ignored path=".idea/dataSources.local.xml" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="app" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="index.html" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/index.html">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-7.0416665">
              <caret line="14" column="21" selection-start-line="14" selection-start-column="21" selection-end-line="14" selection-end-column="21" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="rockpaperscissors.js" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/js/rockpaperscissors.js">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.2924791">
              <caret line="14" column="72" selection-start-line="14" selection-start-column="72" selection-end-line="14" selection-end-column="72" />
              <folding>
                <element signature="n#!!doc" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/index.html" />
        <option value="$PROJECT_DIR$/js/rockpaperscissors.js" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
  </component>
  <component name="NamedScopeManager">
    <order />
  </component>
  <component name="PhpServers">
    <servers />
  </component>
  <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
  <component name="ProjectFrameBounds">
    <option name="y" value="23" />
    <option name="width" value="1440" />
    <option name="height" value="815" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="app" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="app" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="app" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="app" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="app" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="js" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scratches" />
      <pane id="Scope" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="FullScreen" value="false" />
  </component>
  <component name="RunManager">
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
      <TestRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat">
      <BehatRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
      <method />
    </configuration>
    <configuration default="true" type="PhpUnitRemoteRunConfigurationType" factoryName="PHPUnit on Server">
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
      <node-options />
      <gulpfile />
      <tasks />
      <arguments />
      <pass-parent-envs>true</pass-parent-envs>
      <envs />
      <method />
    </configuration>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="SvnConfiguration">
    <configuration />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="e1dadfd6-7f93-471f-b452-3253e50411f9" name="Default" comment="" />
      <created>1442427340397</created>
      <option name="number" value="Default" />
      <updated>1442427340397</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="0" y="23" width="1440" height="815" extended-state="6" />
    <editor active="true" />
    <layout>
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3297587" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3994638" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
      <option name="time" value="1" />
    </breakpoint-manager>
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="11" column="21" selection-start-line="11" selection-start-column="21" selection-end-line="11" selection-end-column="21" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/js/rockpaperscissors.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding>
            <element signature="n#!!doc" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-7.0416665">
          <caret line="14" column="21" selection-start-line="14" selection-start-column="21" selection-end-line="14" selection-end-column="21" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/js/rockpaperscissors.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.2924791">
          <caret line="14" column="72" selection-start-line="14" selection-start-column="72" selection-end-line="14" selection-end-column="72" />
          <folding>
            <element signature="n#!!doc" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Flexbox Test: flex-basis - negative number(width not specified)</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="author" title="Intel" href="mailto:shiyoux.tan@intel.com">
<link rel="help" title="7.3.3. The 'flex-basis' property" href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="The 'flex-basis' property set negative number, the tested element is not shown when width not set either.">

Test passes if there is a filled green square and no red.


text:
class cBlockHopperHandler final :
	public cClearMetaOnDrop<cMetaRotator<cBlockEntityHandler, 0x7, E_META_HOPPER_FACING_ZP, E_META_HOPPER_FACING_XM, E_META_HOPPER_FACING_ZM, E_META_HOPPER_FACING_XP>>
{
	using Super = cClearMetaOnDrop<cMetaRotator<cBlockEntityHandler, 0x7, E_META_HOPPER_FACING_ZP, E_META_HOPPER_FACING_XM, E_META_HOPPER_FACING_ZM, E_META_HOPPER_FACING_XP>>;

public:

	using Super::Super;

private:

	virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
	{
		UNUSED(a_Meta);
		return 11;
	}
} ;


text:
package ru.pravvich.lesson_6.client;

import java.io.File;
import java.util.Scanner;

public class Input {
    private ViewFileSystem view = new ViewFileSystem();
    private Scanner scanner = new Scanner(System.in);

    void select(File thisPosition) {

        String key= this.scanner.nextLine();

        while (!key.equals("q")) {
            if (key.equals("cd ..")) {
                thisPosition = this.view.moveUp(thisPosition);
            } else if (key.equals("ls")) {
                this.view.seeCatalog(thisPosition);
            } else if (key.equals("copy")) {
                File src = new File(this.action());
                System.out.println("Введите имя директории для копирования файла в формате: 'Absolute_path... /file'");
                MoveFiles.copy(src,this.scanner.nextLine());
            } else if (key.equals("move")) {
                File src = new File(this.action());
                System.out.println("Введите имя директории для переноса файла в формате: 'Absolute_path... /file'");
                MoveFiles.move(src,this.scanner.nextLine());
                thisPosition = this.view.moveDown(thisPosition,key);
            } else {
                thisPosition = this.view.moveDown(thisPosition,key);
            }
            key = this.scanner.nextLine();
        }
        System.out.println("Goodbye!");
    }

    private String action() {
        System.out.println("Введите имя файла:");
        String fileName = this.scanner.nextLine();
        System.out.println(fileName);
        return String.format("%s/%s",ViewFileSystem.path,fileName);
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityCapsuleCollider
{
    [TaskCategory("Basic/CapsuleCollider")]
    [TaskDescription("Sets the direction of the CapsuleCollider. Returns Success.")]
    public class SetDirection : Action
    {
        [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
        public SharedGameObject targetGameObject;
        [Tooltip("The direction of the CapsuleCollider")]
        public SharedInt direction;

        private CapsuleCollider capsuleCollider;
        private GameObject prevGameObject;

        public override void OnStart()
        {
            var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
            if (currentGameObject != prevGameObject) {
                capsuleCollider = currentGameObject.GetComponent<CapsuleCollider>();
                prevGameObject = currentGameObject;
            }
        }

        public override TaskStatus OnUpdate()
        {
            if (capsuleCollider == null) {
                Debug.LogWarning("CapsuleCollider is null");
                return TaskStatus.Failure;
            }

            capsuleCollider.direction = direction.Value;

            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            targetGameObject = null;
            direction = 0;
        }
    }
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.liquibase.ext</groupId>
    <artifactId>liquibase-oracle</artifactId>

    <version>4.17.2</version>

    <name>Liquibase Oracle Extensions</name>
    <description>Some tags to work on Oracle DB.</description>
    <url>http://liquibase.jira.com/wiki/display/CONTRIB/Oracle+Extensions</url>

	<organization>
		<name>Liquibase.org</name>
		<url>http://www.liquibase.org</url>
	</organization>

     <licenses>
        <license>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <name>Apache License, Version 2.0</name>
        </license>
    </licenses>

	<issueManagement>
		<url>https://github.com/liquibase/liquibase-oracle/issues</url>
	</issueManagement>

    <scm>
        <connection>scm:git:http://github.com/liquibase/liquibase-oracle.git</connection>
        <url>https://github.com/liquibase/liquibase-oracle</url>
	<tag>HEAD</tag>
  </scm>
	    <developers>
        <developer>
            <id>nvoxland</id>
            <name>Nathan Voxland</name>
	    <email>nathan.voxland@liquibase.org</email>
            <url>http://nathan.voxland.net</url>
            <organizationUrl>http://nathan.voxland.net/</organizationUrl>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
            <timezone>-6</timezone>
        </developer>
    </developers>

    <properties>
        <oracle.version>11.2.0.3</oracle.version>
        <slf4j.version>2.0.3</slf4j.version>
        <junit.version>4.13.2</junit.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <version>4.17.2</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.dbunit</groupId>
            <artifactId>dbunit</artifactId>
            <version>2.7.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.10.19</version>
            <scope>test</scope>
        </dependency>

        <!--<dependency>-->
        <!--<groupId>org.liquibase</groupId>-->
        <!--<artifactId>liquibase-integration-tests</artifactId>-->
        <!--<version>2.0-SNAPSHOT</version>-->
        <!--<type>test-jar</type>-->
        <!--<scope>test</scope>-->
        <!--</dependency>-->

        <!-- TO PHYSICALLY RUN TESTS AGAINST THE DATABASE UNCOMMENT THIS DEPENDENCY -->
        <!-- NOT ENABLE BY DEFAULT SO BUILDSERVER RUNS SUCCESSFULLY -->
        <!-- Download from http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html -->
        <!--<dependency>-->
            <!--<groupId>com.oracle</groupId>-->
            <!--<artifactId>ojdbc6</artifactId>-->
            <!--<version>${oracle.version}</version>-->
            <!--<scope>test</scope>-->
        <!--</dependency>-->
    </dependencies>

	<build>
		<plugins>

			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<optimize>true</optimize>
					<debug>true</debug>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skipTests>false</skipTests>
					<redirectTestOutputToFile>true</redirectTestOutputToFile>
					<reportFormat>plain</reportFormat>
				</configuration>
				<executions>
					<execution>
						<id>unit-tests</id>
						<phase>test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<includes>
								<include>**/*Test.java</include>
							</includes>
						</configuration>
					</execution>
					<execution>
						<id>integration-tests</id>
						<phase>integration-test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<includes>
								<include>**/*IT.java</include>
								<include>**/*Test.java</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-java</id>
						<phase>compile</phase>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>1.8</version>
								</requireJavaVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>3.3.0</version>
			</plugin>

			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.13</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>sonatype-nexus-staging</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
				</configuration>
			</plugin>

		</plugins>

	</build>

	<distributionManagement>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
		<snapshotRepository>
			<id>sonatype-nexus-staging</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<profiles>
		<profile>
			<!-- Required for deployment to Sonatype -->
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.2.1</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<author>false</author>
							<doctitle>Liquibase CDI ${project.version} API</doctitle>
							<quiet>true</quiet>
							<doclint>none</doclint>
							<encoding>UTF-8</encoding>
							<jarOutputDirectory>${project.basedir}/target</jarOutputDirectory>
						</configuration>
						<executions>
							<execution>
								<id>jar-javadoc</id>
								<goals>
									<goal>jar</goal>
								</goals>
								<phase>package</phase>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<configuration>
							<passphrase>${env.GPG_PASSPHRASE}</passphrase>
							<gpgArguments>
								<!-- This is necessary for gpg to not try to use the pinentry programs -->
								<arg>--batch</arg>
								<arg>--no-tty</arg>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>


text:
Upgrade Instructions
====================

## New installation

Follow the [Setup guide](Resources/doc/DashboardAnalyticsWidgetSetup.md)

## Upgrading from v2.3.6 or lower

Because of the changes with the multi-config setup, you'll need to flush your database and refill it.

Use either a migration or force a schema update to update the database

    app/console doctrine:migrations:diff && app/console doctrine:migrations:migrate
    app/console doctrine:schema:update --force

Flush the data and reload it

    app/console kuma:dashboard:widget:googleanalytics:data:flush
    app/console kuma:dashboard:collect


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Collybia xanthophylla Malençon & Bertault, 1975

### Remarks
null