text:
'use strict';

const fs = require('fs');
const path = require('path');
const paths = require('./paths');

// Make sure that including paths.js after env.js will read .env variables.
delete require.cache[require.resolve('./paths')];

const NODE_ENV = process.env.NODE_ENV;
if (!NODE_ENV) {
  throw new Error(
    'The NODE_ENV environment variable is required but was not specified.'
  );
}

// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
var dotenvFiles = [
  `${paths.dotenv}.${NODE_ENV}.local`,
  `${paths.dotenv}.${NODE_ENV}`,
  // Don't include `.env.local` for `test` environment
  // since normally you expect tests to produce the same
  // results for everyone
  NODE_ENV !== 'test' && `${paths.dotenv}.local`,
  paths.dotenv,
].filter(Boolean);

// Load environment variables from .env* files. Suppress warnings using silent
// if this file is missing. dotenv will never modify any environment variables
// that have already been set.
// https://github.com/motdotla/dotenv
dotenvFiles.forEach(dotenvFile => {
  if (fs.existsSync(dotenvFile)) {
    require('dotenv').config({
      path: dotenvFile,
    });
  }
});

// We support resolving modules according to `NODE_PATH`.
// This lets you use absolute paths in imports inside large monorepos:
// https://github.com/facebookincubator/create-react-app/issues/253.
// It works similar to `NODE_PATH` in Node itself:
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
// https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421
// We also resolve them to make sure all tools using them work consistently.
const appDirectory = fs.realpathSync(process.cwd());
process.env.NODE_PATH = (process.env.NODE_PATH || '')
  .split(path.delimiter)
  .filter(folder => folder && !path.isAbsolute(folder))
  .map(folder => path.resolve(appDirectory, folder))
  .join(path.delimiter);

// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
// injected into the application via DefinePlugin in Webpack configuration.
const REACT_APP = /^REACT_APP_/i;

function getClientEnvironment(publicUrl) {
  const raw = Object.keys(process.env)
    .filter(key => REACT_APP.test(key))
    .reduce(
      (env, key) => {
        env[key] = process.env[key];
        return env;
      },
      {
        // Useful for determining whether we're running in production mode.
        // Most importantly, it switches React into the correct mode.
        NODE_ENV: process.env.NODE_ENV || 'development',
        // Useful for resolving the correct path to static assets in `public`.
        // For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
        // This should only be used as an escape hatch. Normally you would put
        // images into the `src` and `import` them in code to get their paths.
        PUBLIC_URL: publicUrl,
      }
    );
  // Stringify all values so we can feed into Webpack DefinePlugin
  const stringified = {
    'process.env': Object.keys(raw).reduce((env, key) => {
      env[key] = JSON.stringify(raw[key]);
      return env;
    }, {}),
    TEST: process.env.BUILD_ENV === 'test',
    PRE: process.env.BUILD_ENV === 'pre'
  };

  return { raw, stringified };
}

module.exports = getClientEnvironment;


text:
package event

import "github.com/concourse/turbine"

type Initialize struct {
	BuildConfig turbine.Config `json:"config"`
}

func (Initialize) EventType() EventType { return EventTypeInitialize }

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

<meta charset="utf-8">
<title>Backbone CollectionView</title>
<link rel="stylesheet" href="lib/qunit-1.11.0.css">
<link rel="stylesheet" href="lib/jquery-ui.css">


text:
namespace DemoClassFamily {

    public partial class ViewSwitcher {
    }
}


text:
var path = require('path')
var browserify = require('browserify')
var envify = require('envify/custom')
var concat = require('concat-stream')

module.exports = function createClientScript (options, callback) {
  options = options || {}
  var entries = [
    options.polyfill !== false && require.resolve('eventsource-polyfill'),
    path.join(__dirname, '..', '/client.js')
  ].filter(Boolean)

  var b = browserify(entries)
    .transform(envify({
      DEBUG: process.env.DEBUG
    }))
    .plugin('bundle-minify')
    .bundle()

  b.on('error', callback)

  b.pipe(concat(function (buf) {
    callback(null, buf)
  }))
}


text:
from common_funcs import *
from time import gmtime, strftime
from os import system

thetime = strftime("%a-%d-%b-%Y-%H_%M", gmtime())
resultsdir = "results/explicit-replyprob/"+thetime

system("mkdir -p "+resultsdir)
system("git log -1 --format=\"%%h;%%ad\" > %s/git-revision.txt" % (resultsdir))

#blow away old configs, etc.
#must be run first so pull works

killall_java("lipstick-hosts")
killall_java("cassandra-hosts")
set_up_cassandra_ring()
prepare_cassandra_for_lipstick("cassandra-hosts")

prepare_lipstick_all("lipstick-hosts")
prepare_lipstick("east-lipstick-hosts", "east-cassandra-hosts")
prepare_lipstick("west-lipstick-hosts", "west-cassandra-hosts")
enable_backend_reads()

clients = 1024

pgratio = .5

#potential causality stuff
for variance,  prob_reply, chain_lambda  in [(1, .3, 10.0)]:
    set_lipstick_variance_potential(variance)
    #enable_local_checkpointing("lipstick-hosts")
    enable_backend_reads()

    set_lipstick_chain_lambda(chain_lambda)

    set_lipstick_clients_per_server(clients)
    for iteration in range(0, 5):
        for prob_reply in [.5, .85, 1.0]:
            set_lipstick_reply_prob_explicit(prob_reply)
            set_lipstick_putget_ratio(pgratio)
            for threads in [2,4,8,16,32,64,128,256]:

                set_lipstick_threads_per_server(threads)

                reset_lipstick_states()
                set_backend_explicit()
                run_lipstick_experiment(False, "%s/E-shim-pgr%f-%d-%dC-%dV-pr%f-%d" % (resultsdir, pgratio, threads, clients, variance, prob_reply, iteration), 180)

                reset_lipstick_states()
                set_backend_eventual_explicit()
                run_lipstick_experiment(False, "%s/E-eventual-pgr%f-%d-%dC-%dV-pr%f-%d" % (resultsdir, pgratio, threads, clients, variance, prob_reply, iteration), 180)

                '''
                reset_lipstick_states()
                set_backend_potential()
                run_lipstick_experiment(True, "%s/P-localcheck-%d-%dC-%dV-%d" % (resultsdir, threads, clients, variance, iteration))
                '''


text:
#ifndef _NO_EXECVE

/* execv.c */

/* This and the other exec*.c files in this directory require
   the target to provide the _execve syscall.  */

#include <_ansi.h>
#include <unistd.h>

/* Only deal with a pointer to environ, to work around subtle bugs with shared
   libraries and/or small data systems where the user declares his own
   'environ'.  */
static char ***p_environ = &environ;

int
_DEFUN (execv, (path, argv),
	const char *path _AND
	char * const argv[])
{
  return _execve (path, (char * _CONST *) argv, *p_environ);
}

#endif /* !_NO_EXECVE  */


text:
function routeAPI($routeProvider) {
    $routeProvider.when("/apis", {
        "templateUrl": "html/api/list.html",
        "controller": APIController
    }).when("/apis/:url/:method", {
        "templateUrl": "html/api/update.html",
        "controller": APIUpdateController
    }).when("/new/api", {
        "templateUrl": "html/api/new.html",
        "controller": APICreateController
    });
}

function APIUpdateController($scope, $routeParams, $http, $location, $route) {
    $http.get("api/clusters").success(function (data) {
        $scope.clusters = data.value;
    });

    $http.get("api/apis/" + $routeParams.url + "?method=" + $routeParams.method).success(function (data) {
        $scope.api = data.value;
        $scope.oldMethod = data.value.method;
        $scope.oldUrl = data.value.url;
    });

    $scope.resetNode = function () {
        $scope.newClusterName = "";
        $scope.newNodeUrl = "";
        $scope.newNodeAttrName = "";
        $scope.newNodeRewrite = "";
        $scope.newValidation = [];
    }

    $scope.addNode = function () {
        $scope.api.nodes.push({
            "clusterName": $scope.newClusterName,
            "url": $scope.newNodeUrl,
            "attrName": $scope.newNodeAttrName,
            "rewrite": $scope.newNodeRewrite,
            "validations": $scope.newValidation,
        });

        $scope.resetNode();
    }

    $scope.delete = function (node) {
        ns = []

        for (var i = 0; i < $scope.api.nodes.length; i++) {
            if ($scope.api.nodes[i] != node) {
                ns.push($scope.api.nodes[i]);
            }
        }

        $scope.api.nodes = ns;
    }

    $scope.update = function () {
        $scope.api.status = parseInt($scope.api.status)
        $http.put('api/apis', $scope.api).success(function (data) {
            if ($scope.oldMethod != $scope.api.method || $scope.oldUrl != $scope.api.url) {
                $http.delete('api/apis/' + Base64.encodeURI($scope.oldUrl) + "?method=" + $scope.oldMethod).success(function (data) {
                    $location.path("/apis");
                    $route.reload();
                });
            } else {
                $location.path("/apis");
                $route.reload();
            }
        });
    }
}

function APICreateController($scope, $routeParams, $http, $location, $route) {
    $http.get("api/clusters").success(function (data) {
        $scope.clusters = data.value;
    });

    $scope.newUrl = "";
    $scope.newDesc = "";
    $scope.newName = "";
    $scope.newMock = {};
    $scope.newAccessControl = {};
    $scope.newNodes = [];
    $scope.newStatus = 0;

    $scope.resetNode = function () {
        $scope.newClusterName = "";
        $scope.newNodeUrl = "";
        $scope.newNodeAttrName = "";
        $scope.newNodeRewrite = "";
        $scope.newValidation = [];
    }

    $scope.addNode = function () {
        $scope.newNodes.push({
            "clusterName": $scope.newClusterName,
            "url": $scope.newNodeUrl,
            "attrName": $scope.newNodeAttrName,
            "rewrite": $scope.newNodeRewrite,
            "validations": $scope.newValidation,
        });

        $scope.resetNode();
    }

    $scope.delete = function (node) {
        ns = []

        for (var i = 0; i < $scope.newNodes.length; i++) {
            if ($scope.newNodes[i] != node) {
                ns.push($scope.newNodes[i]);
            }
        }

        $scope.newNodes = ns;
    }

    $scope.add = function () {
        d = {
            "name": $scope.newName,
            "url": $scope.newUrl,
            "method": $scope.newMethod,
            "status": parseInt($scope.newStatus),
            "desc": $scope.newDesc,
            "mock": $scope.newMock,
            "accessControl": $scope.newAccessControl,
            "nodes": $scope.newNodes,
        }

        $http.post('api/apis', d).success(function (data) {
            $location.path("/apis");
            $route.reload();
        });
    }
}

function APIController($scope, $routeParams, $http, $location, $route) {
    $http.get("api/apis").success(function (data) {
        $scope.apis = data.value;

        for (var i = 0; i < $scope.apis.length; i++) {
            $scope.apis[i].encodeURL = Base64.encodeURI($scope.apis[i].url);
        }
    });

    $scope.create = function () {
        $location.path("/new/api");
    }

    $scope.delete = function (url, method) {
        $http.delete('api/apis/' + url + "?method=" + method).success(function (data) {
            $location.path("/apis");
            $route.reload();
        });
    }

    $scope.up = function (api) {
        if (api.status == 1) {
            return;
        }

        var old = api.status;
        api.status = 1;
        $http.put('api/apis', api).error(function (err) {
            api.status = old;
        });
    }

    $scope.down = function (api) {
        if (api.status == 0) {
            return;
        }

        api.status = 0;
        $http.put('api/apis', api).error(function (err) {
            api.status = old;
        });
    }
}


text:
<?php

/**
 * Short description for file.
 *
 * @package       Cake.Test.Fixture
 * @since         CakePHP(tm) v 1.2.0.6879//Correct version number as needed**
 */
class DependencyFixture extends CakeTestFixture {

/**
 * name property
 *
 * @var string 'Dependency'
 */
	public $name = 'Dependency';

/**
 * fields property
 *
 * @var array
 */
	public $fields = array(
		'child_id' => 'integer',
		'parent_id' => 'integer'
	);

/**
 * records property
 *
 * @var array
 */
	public $records = array(
		array('child_id' => 1, 'parent_id' => 2),
	);
}


text:
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, find } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';

module('Integration | Component | simple table header selectable', function(hooks) {
  setupRenderingTest(hooks);

  test('it renders', async function(assert) {
    // Set any properties with this.set('myProperty', 'value');
    // Handle any actions with this.on('myAction', function(val) { ... });
    this.set('columns', [
      { key: 'foo', name: 'Foo' },
      { key: 'baz', name: 'Baz' }
    ]);

    await render(hbs`{{simple-table-header-selectable columns=columns}}`);

    assert.notEqual(find('thead').textContent.trim(), '');
  });
});


text:
/**
    description: Content script that runs after DOM loaded to look for the Library
                 Detector meta element. If found, notifies the extension of the
                 script information
**/

function wait() {
    var meta = document.getElementById('d41d8cd98f00b204e9800998ecf8427e_lib_detect');
    if (meta) {
        chrome.extension.sendMessage(meta.content);
    }
}

window.setTimeout(function() {
    wait();
}, 2500);


text:
.hb {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
  color: #333;
  background-color: #fff;
}
.hb article,
.hb aside,
.hb details,
.hb figcaption,
.hb figure,
.hb footer,
.hb header,
.hb hgroup,
.hb main,
.hb menu,
.hb nav,
.hb section,
.hb summary {
  display: block;
}
.hb audio,
.hb canvas,
.hb progress,
.hb video {
  display: inline-block;
  vertical-align: baseline;
}
.hb audio:not([controls]) {
  display: none;
  height: 0;
}
.hb [hidden],
.hb template {
  display: none;
}
.hb a {
  background-color: transparent;
}
.hb a:active,
.hb a:hover {
  outline: 0;
}
.hb abbr[title] {
  border-bottom: 1px dotted;
}
.hb b,
.hb strong {
  font-weight: bold;
}
.hb dfn {
  font-style: italic;
}
.hb h1 {
  font-size: 2em;
  margin: 0.67em 0;
}
.hb mark {
  background: #ff0;
  color: #000;
}
.hb small {
  font-size: 80%;
}
.hb sub,
.hb sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
.hb sup {
  top: -0.5em;
}
.hb sub {
  bottom: -0.25em;
}
.hb img {
  border: 0;
}
.hb svg:not(:root) {
  overflow: hidden;
}
.hb figure {
  margin: 1em 40px;
}
.hb hr {
  -webkit-box-sizing: content-box;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
  height: 0;
}
.hb pre {
  overflow: auto;
}
.hb code,
.hb kbd,
.hb pre,
.hb samp {
  font-family: monospace, monospace;
  font-size: 1em;
}
.hb button,
.hb input,
.hb optgroup,
.hb select,
.hb textarea {
  color: inherit;
  font: inherit;
  margin: 0;
}
.hb button {
  overflow: visible;
}
.hb button,
.hb select {
  text-transform: none;
}
.hb button,
.hb input[type="button"],
.hb input[type="reset"],
.hb input[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
}
.hb button[disabled],
.hb input[disabled] {
  cursor: default;
}
.hb button::-moz-focus-inner,
.hb input::-moz-focus-inner {
  border: 0;
  padding: 0;
}
.hb input {
  line-height: normal;
}
.hb input[type="checkbox"],
.hb input[type="radio"] {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0;
}
.hb input[type="number"]::-webkit-inner-spin-button,
.hb input[type="number"]::-webkit-outer-spin-button {
  height: auto;
}
.hb input[type="search"] {
  -webkit-appearance: textfield;
  -webkit-box-sizing: content-box;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
}
.hb input[type="search"]::-webkit-search-cancel-button,
.hb input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
.hb fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}
.hb legend {
  border: 0;
  padding: 0;
}
.hb textarea {
  overflow: auto;
}
.hb optgroup {
  font-weight: bold;
}
.hb table {
  border-collapse: collapse;
  border-spacing: 0;
}
.hb td,
.hb th {
  padding: 0;
}
.hb * {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.hb *:before,
.hb *:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.hb input,
.hb button,
.hb select,
.hb textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
.hb a {
  color: #337ab7;
  text-decoration: none;
}
.hb a:hover,
.hb a:focus {
  color: #23527c;
  text-decoration: underline;
}
.hb a:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
.hb figure {
  margin: 0;
}
.hb img {
  vertical-align: middle;
}
.hb .img-responsive {
  display: block;
  max-width: 100%;
  height: auto;
}
.hb .img-rounded {
  border-radius: 6px;
}
.hb .img-thumbnail {
  padding: 4px;
  line-height: 1.42857143;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  -webkit-transition: all 0.2s ease-in-out;
  -o-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  display: inline-block;
  max-width: 100%;
  height: auto;
}
.hb .img-circle {
  border-radius: 50%;
}
.hb hr {
  margin-top: 20px;
  margin-bottom: 20px;
  border: 0;
  border-top: 1px solid #eee;
}
.hb .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.hb .sr-only-focusable:active,
.hb .sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
}
.hb [role="button"] {
  cursor: pointer;
}
.hb .btn {
  display: inline-block;
  margin-bottom: 0;
  font-weight: normal;
  text-align: center;
  vertical-align: middle;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
  cursor: pointer;
  background-image: none;
  border: 1px solid transparent;
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  border-radius: 4px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.hb .btn:focus,
.hb .btn:active:focus,
.hb .btn.active:focus,
.hb .btn.focus,
.hb .btn:active.focus,
.hb .btn.active.focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
.hb .btn:hover,
.hb .btn:focus,
.hb .btn.focus {
  color: #333;
  text-decoration: none;
}
.hb .btn:active,
.hb .btn.active {
  outline: 0;
  background-image: none;
  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.hb .btn.disabled,
.hb .btn[disabled],
.hb fieldset[disabled] .btn {
  cursor: not-allowed;
  opacity: 0.65;
  filter: alpha(opacity=65);
  -webkit-box-shadow: none;
  box-shadow: none;
}
.hb a.btn.disabled,
.hb fieldset[disabled] a.btn {
  pointer-events: none;
}
.hb .btn-default {
  color: #333;
  background-color: #fff;
  border-color: #ccc;
}
.hb .btn-default:focus,
.hb .btn-default.focus {
  color: #333;
  background-color: #e6e6e6;
  border-color: #8c8c8c;
}
.hb .btn-default:hover {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}
.hb .btn-default:active,
.hb .btn-default.active,
.hb .open > .dropdown-toggle.btn-default {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}
.hb .btn-default:active:hover,
.hb .btn-default.active:hover,
.hb .open > .dropdown-toggle.btn-default:hover,
.hb .btn-default:active:focus,
.hb .btn-default.active:focus,
.hb .open > .dropdown-toggle.btn-default:focus,
.hb .btn-default:active.focus,
.hb .btn-default.active.focus,
.hb .open > .dropdown-toggle.btn-default.focus {
  color: #333;
  background-color: #d4d4d4;
  border-color: #8c8c8c;
}
.hb .btn-default:active,
.hb .btn-default.active,
.hb .open > .dropdown-toggle.btn-default {
  background-image: none;
}
.hb .btn-default.disabled,
.hb .btn-default[disabled],
.hb fieldset[disabled] .btn-default,
.hb .btn-default.disabled:hover,
.hb .btn-default[disabled]:hover,
.hb fieldset[disabled] .btn-default:hover,
.hb .btn-default.disabled:focus,
.hb .btn-default[disabled]:focus,
.hb fieldset[disabled] .btn-default:focus,
.hb .btn-default.disabled.focus,
.hb .btn-default[disabled].focus,
.hb fieldset[disabled] .btn-default.focus,
.hb .btn-default.disabled:active,
.hb .btn-default[disabled]:active,
.hb fieldset[disabled] .btn-default:active,
.hb .btn-default.disabled.active,
.hb .btn-default[disabled].active,
.hb fieldset[disabled] .btn-default.active {
  background-color: #fff;
  border-color: #ccc;
}
.hb .btn-default .badge {
  color: #fff;
  background-color: #333;
}
.hb .btn-primary {
  color: #fff;
  background-color: #337ab7;
  border-color: #2e6da4;
}
.hb .btn-primary:focus,
.hb .btn-primary.focus {
  color: #fff;
  background-color: #286090;
  border-color: #122b40;
}
.hb .btn-primary:hover {
  color: #fff;
  background-color: #286090;
  border-color: #204d74;
}
.hb .btn-primary:active,
.hb .btn-primary.active,
.hb .open > .dropdown-toggle.btn-primary {
  color: #fff;
  background-color: #286090;
  border-color: #204d74;
}
.hb .btn-primary:active:hover,
.hb .btn-primary.active:hover,
.hb .open > .dropdown-toggle.btn-primary:hover,
.hb .btn-primary:active:focus,
.hb .btn-primary.active:focus,
.hb .open > .dropdown-toggle.btn-primary:focus,
.hb .btn-primary:active.focus,
.hb .btn-primary.active.focus,
.hb .open > .dropdown-toggle.btn-primary.focus {
  color: #fff;
  background-color: #204d74;
  border-color: #122b40;
}
.hb .btn-primary:active,
.hb .btn-primary.active,
.hb .open > .dropdown-toggle.btn-primary {
  background-image: none;
}
.hb .btn-primary.disabled,
.hb .btn-primary[disabled],
.hb fieldset[disabled] .btn-primary,
.hb .btn-primary.disabled:hover,
.hb .btn-primary[disabled]:hover,
.hb fieldset[disabled] .btn-primary:hover,
.hb .btn-primary.disabled:focus,
.hb .btn-primary[disabled]:focus,
.hb fieldset[disabled] .btn-primary:focus,
.hb .btn-primary.disabled.focus,
.hb .btn-primary[disabled].focus,
.hb fieldset[disabled] .btn-primary.focus,
.hb .btn-primary.disabled:active,
.hb .btn-primary[disabled]:active,
.hb fieldset[disabled] .btn-primary:active,
.hb .btn-primary.disabled.active,
.hb .btn-primary[disabled].active,
.hb fieldset[disabled] .btn-primary.active {
  background-color: #337ab7;
  border-color: #2e6da4;
}
.hb .btn-primary .badge {
  color: #337ab7;
  background-color: #fff;
}
.hb .btn-success {
  color: #fff;
  background-color: #5cb85c;
  border-color: #4cae4c;
}
.hb .btn-success:focus,
.hb .btn-success.focus {
  color: #fff;
  background-color: #449d44;
  border-color: #255625;
}
.hb .btn-success:hover {
  color: #fff;
  background-color: #449d44;
  border-color: #398439;
}
.hb .btn-success:active,
.hb .btn-success.active,
.hb .open > .dropdown-toggle.btn-success {
  color: #fff;
  background-color: #449d44;
  border-color: #398439;
}
.hb .btn-success:active:hover,
.hb .btn-success.active:hover,
.hb .open > .dropdown-toggle.btn-success:hover,
.hb .btn-success:active:focus,
.hb .btn-success.active:focus,
.hb .open > .dropdown-toggle.btn-success:focus,
.hb .btn-success:active.focus,
.hb .btn-success.active.focus,
.hb .open > .dropdown-toggle.btn-success.focus {
  color: #fff;
  background-color: #398439;
  border-color: #255625;
}
.hb .btn-success:active,
.hb .btn-success.active,
.hb .open > .dropdown-toggle.btn-success {
  background-image: none;
}
.hb .btn-success.disabled,
.hb .btn-success[disabled],
.hb fieldset[disabled] .btn-success,
.hb .btn-success.disabled:hover,
.hb .btn-success[disabled]:hover,
.hb fieldset[disabled] .btn-success:hover,
.hb .btn-success.disabled:focus,
.hb .btn-success[disabled]:focus,
.hb fieldset[disabled] .btn-success:focus,
.hb .btn-success.disabled.focus,
.hb .btn-success[disabled].focus,
.hb fieldset[disabled] .btn-success.focus,
.hb .btn-success.disabled:active,
.hb .btn-success[disabled]:active,
.hb fieldset[disabled] .btn-success:active,
.hb .btn-success.disabled.active,
.hb .btn-success[disabled].active,
.hb fieldset[disabled] .btn-success.active {
  background-color: #5cb85c;
  border-color: #4cae4c;
}
.hb .btn-success .badge {
  color: #5cb85c;
  background-color: #fff;
}
.hb .btn-info {
  color: #fff;
  background-color: #5bc0de;
  border-color: #46b8da;
}
.hb .btn-info:focus,
.hb .btn-info.focus {
  color: #fff;
  background-color: #31b0d5;
  border-color: #1b6d85;
}
.hb .btn-info:hover {
  color: #fff;
  background-color: #31b0d5;
  border-color: #269abc;
}
.hb .btn-info:active,
.hb .btn-info.active,
.hb .open > .dropdown-toggle.btn-info {
  color: #fff;
  background-color: #31b0d5;
  border-color: #269abc;
}
.hb .btn-info:active:hover,
.hb .btn-info.active:hover,
.hb .open > .dropdown-toggle.btn-info:hover,
.hb .btn-info:active:focus,
.hb .btn-info.active:focus,
.hb .open > .dropdown-toggle.btn-info:focus,
.hb .btn-info:active.focus,
.hb .btn-info.active.focus,
.hb .open > .dropdown-toggle.btn-info.focus {
  color: #fff;
  background-color: #269abc;
  border-color: #1b6d85;
}
.hb .btn-info:active,
.hb .btn-info.active,
.hb .open > .dropdown-toggle.btn-info {
  background-image: none;
}
.hb .btn-info.disabled,
.hb .btn-info[disabled],
.hb fieldset[disabled] .btn-info,
.hb .btn-info.disabled:hover,
.hb .btn-info[disabled]:hover,
.hb fieldset[disabled] .btn-info:hover,
.hb .btn-info.disabled:focus,
.hb .btn-info[disabled]:focus,
.hb fieldset[disabled] .btn-info:focus,
.hb .btn-info.disabled.focus,
.hb .btn-info[disabled].focus,
.hb fieldset[disabled] .btn-info.focus,
.hb .btn-info.disabled:active,
.hb .btn-info[disabled]:active,
.hb fieldset[disabled] .btn-info:active,
.hb .btn-info.disabled.active,
.hb .btn-info[disabled].active,
.hb fieldset[disabled] .btn-info.active {
  background-color: #5bc0de;
  border-color: #46b8da;
}
.hb .btn-info .badge {
  color: #5bc0de;
  background-color: #fff;
}
.hb .btn-warning {
  color: #fff;
  background-color: #f0ad4e;
  border-color: #eea236;
}
.hb .btn-warning:focus,
.hb .btn-warning.focus {
  color: #fff;
  background-color: #ec971f;
  border-color: #985f0d;
}
.hb .btn-warning:hover {
  color: #fff;
  background-color: #ec971f;
  border-color: #d58512;
}
.hb .btn-warning:active,
.hb .btn-warning.active,
.hb .open > .dropdown-toggle.btn-warning {
  color: #fff;
  background-color: #ec971f;
  border-color: #d58512;
}
.hb .btn-warning:active:hover,
.hb .btn-warning.active:hover,
.hb .open > .dropdown-toggle.btn-warning:hover,
.hb .btn-warning:active:focus,
.hb .btn-warning.active:focus,
.hb .open > .dropdown-toggle.btn-warning:focus,
.hb .btn-warning:active.focus,
.hb .btn-warning.active.focus,
.hb .open > .dropdown-toggle.btn-warning.focus {
  color: #fff;
  background-color: #d58512;
  border-color: #985f0d;
}
.hb .btn-warning:active,
.hb .btn-warning.active,
.hb .open > .dropdown-toggle.btn-warning {
  background-image: none;
}
.hb .btn-warning.disabled,
.hb .btn-warning[disabled],
.hb fieldset[disabled] .btn-warning,
.hb .btn-warning.disabled:hover,
.hb .btn-warning[disabled]:hover,
.hb fieldset[disabled] .btn-warning:hover,
.hb .btn-warning.disabled:focus,
.hb .btn-warning[disabled]:focus,
.hb fieldset[disabled] .btn-warning:focus,
.hb .btn-warning.disabled.focus,
.hb .btn-warning[disabled].focus,
.hb fieldset[disabled] .btn-warning.focus,
.hb .btn-warning.disabled:active,
.hb .btn-warning[disabled]:active,
.hb fieldset[disabled] .btn-warning:active,
.hb .btn-warning.disabled.active,
.hb .btn-warning[disabled].active,
.hb fieldset[disabled] .btn-warning.active {
  background-color: #f0ad4e;
  border-color: #eea236;
}
.hb .btn-warning .badge {
  color: #f0ad4e;
  background-color: #fff;
}
.hb .btn-danger {
  color: #fff;
  background-color: #d9534f;
  border-color: #d43f3a;
}
.hb .btn-danger:focus,
.hb .btn-danger.focus {
  color: #fff;
  background-color: #c9302c;
  border-color: #761c19;
}
.hb .btn-danger:hover {
  color: #fff;
  background-color: #c9302c;
  border-color: #ac2925;
}
.hb .btn-danger:active,
.hb .btn-danger.active,
.hb .open > .dropdown-toggle.btn-danger {
  color: #fff;
  background-color: #c9302c;
  border-color: #ac2925;
}
.hb .btn-danger:active:hover,
.hb .btn-danger.active:hover,
.hb .open > .dropdown-toggle.btn-danger:hover,
.hb .btn-danger:active:focus,
.hb .btn-danger.active:focus,
.hb .open > .dropdown-toggle.btn-danger:focus,
.hb .btn-danger:active.focus,
.hb .btn-danger.active.focus,
.hb .open > .dropdown-toggle.btn-danger.focus {
  color: #fff;
  background-color: #ac2925;
  border-color: #761c19;
}
.hb .btn-danger:active,
.hb .btn-danger.active,
.hb .open > .dropdown-toggle.btn-danger {
  background-image: none;
}
.hb .btn-danger.disabled,
.hb .btn-danger[disabled],
.hb fieldset[disabled] .btn-danger,
.hb .btn-danger.disabled:hover,
.hb .btn-danger[disabled]:hover,
.hb fieldset[disabled] .btn-danger:hover,
.hb .btn-danger.disabled:focus,
.hb .btn-danger[disabled]:focus,
.hb fieldset[disabled] .btn-danger:focus,
.hb .btn-danger.disabled.focus,
.hb .btn-danger[disabled].focus,
.hb fieldset[disabled] .btn-danger.focus,
.hb .btn-danger.disabled:active,
.hb .btn-danger[disabled]:active,
.hb fieldset[disabled] .btn-danger:active,
.hb .btn-danger.disabled.active,
.hb .btn-danger[disabled].active,
.hb fieldset[disabled] .btn-danger.active {
  background-color: #d9534f;
  border-color: #d43f3a;
}
.hb .btn-danger .badge {
  color: #d9534f;
  background-color: #fff;
}
.hb .btn-link {
  color: #337ab7;
  font-weight: normal;
  border-radius: 0;
}
.hb .btn-link,
.hb .btn-link:active,
.hb .btn-link.active,
.hb .btn-link[disabled],
.hb fieldset[disabled] .btn-link {
  background-color: transparent;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.hb .btn-link,
.hb .btn-link:hover,
.hb .btn-link:focus,
.hb .btn-link:active {
  border-color: transparent;
}
.hb .btn-link:hover,
.hb .btn-link:focus {
  color: #23527c;
  text-decoration: underline;
  background-color: transparent;
}
.hb .btn-link[disabled]:hover,
.hb fieldset[disabled] .btn-link:hover,
.hb .btn-link[disabled]:focus,
.hb fieldset[disabled] .btn-link:focus {
  color: #777;
  text-decoration: none;
}
.hb .btn-lg {
  padding: 10px 16px;
  font-size: 18px;
  line-height: 1.3333333;
  border-radius: 6px;
}
.hb .btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}
.hb .btn-xs {
  padding: 1px 5px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}
.hb .btn-block {
  display: block;
  width: 100%;
}
.hb .btn-block + .btn-block {
  margin-top: 5px;
}
.hb input[type="submit"].btn-block,
.hb input[type="reset"].btn-block,
.hb input[type="button"].btn-block {
  width: 100%;
}
.hb .clearfix:before,
.hb .clearfix:after {
  content: " ";
  display: table;
}
.hb .clearfix:after {
  clear: both;
}
.hb .center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.hb .pull-right {
  float: right !important;
}
.hb .pull-left {
  float: left !important;
}
.hb .hide {
  display: none !important;
}
.hb .show {
  display: block !important;
}
.hb .invisible {
  visibility: hidden;
}
.hb .text-hide {
  font: 0/0 a;
  color: transparent;
  text-shadow: none;
  background-color: transparent;
  border: 0;
}
.hb .hidden {
  display: none !important;
}
.hb .affix {
  position: fixed;
}

.card {
  font-family: Arial, sans-serif;
  display: block;
  margin: 10px;
  -webkit-transition: all 250ms;
  -moz-transition: all 250ms;
  transition: all 250ms;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}
.card:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
  -webkit-transform: translateY(-5px);
  -moz-transform: translateY(-5px);
  transform: translateY(-5px);
}
.card-content {
  padding: 10px;
}

.card-label {
  font-family: Arial, sans-serif;
  color: #fff;
  background: #34495e;
  padding: 10px 15px;
}


text:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Cnode by Vue2</title>
    <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link href="//cdn.bootcss.com/materialize/0.98.0/css/materialize.min.css" rel="stylesheet">
    <style type="text/css">
        .loading {
            text-align: center;
            width: 100%;
            height: 100%;
            margin: auto;
            position: fixed;
            z-index: 1000;
            top: 0; left: 0; bottom: 0; right: 0;
            background-color: rgba(0,0,0,0.3);

        }
        .loading .preloader-wrapper.big {
            position: absolute;
            margin: auto;
            top: 0; left: 0; bottom: 0; right: 0;
        }
        .topic img{
            max-width: 100%;
        }
        #editor-wrapper .CodeMirror {
            height: 200px;
        }
    </style>
</head>
<body>
    <div id="root">
    </div>
</body>
</html>


text:
SHELL=/bin/sh

PROJECT=tidy

# Installation variables.  Spaces OK, only dir create and file copy operations.
runinst_prefix=/usr/local
devinst_prefix=/usr/local

bininst = ${runinst_prefix}/bin
libinst = ${devinst_prefix}/lib
incinst = ${devinst_prefix}/include/$(PROJECT)
maninst = ${devinst_prefix}/man

# Internal variables. - No spaces allowed: libtool chokes on spaces in directory names.
TOPDIR = ../..
INCDIR = ${TOPDIR}/include
APPDIR = ${TOPDIR}/console
SRCDIR = ${TOPDIR}/src
OBJDIR = ./obj
LIBDIR = ${TOPDIR}/lib
BINDIR = ${TOPDIR}/bin
DOCDIR = ${TOPDIR}/htmldoc

# Note about shared library and exported symbols:
# With gcc, one can control the exported symbols by either using
# "-fvisibility=hidden -DTIDY_EXPORT='__attribute__((visibility("default")))'"
# or using a linker map (see GNU ld "--version-script").

# Lookup based on hash table can be disabled with
# "-DELEMENT_HASH_LOOKUP=0 -DATTRIBUTE_HASH_LOOKUP=0"

# Memory mapped i/o can be disabled with -DSUPPORT_POSIX_MAPPED_FILES=0
#

# CFLAGS etc..
# For optimised builds, flags such as "-O2" should be added and -D_DEBUG=1
# disabled.
CC= gcc
CFLAGS= -g -pedantic -Wall -I $(INCDIR)
# flags only supported with gcc 3.x
CFLAGS += -Wunused-parameter

OTHERCFLAGS=
OTHERCFLAGS+= -D_DEBUG=1
# OTHERCFLAGS+= -fvisibility=hidden -DTIDY_EXPORT='__attribute__((visibility("default")))'
ifdef SUPPORT_UTF16_ENCODINGS
CFLAGS += -DSUPPORT_UTF16_ENCODINGS=$(SUPPORT_UTF16_ENCODINGS)
endif
ifdef SUPPORT_ASIAN_ENCODINGS
CFLAGS += -DSUPPORT_ASIAN_ENCODINGS=$(SUPPORT_ASIAN_ENCODINGS)
endif
ifdef SUPPORT_ACCESSIBILITY_CHECKS
CFLAGS += -DSUPPORT_ACCESSIBILITY_CHECKS=$(SUPPORT_ACCESSIBILITY_CHECKS)
endif

DEBUGFLAGS=-g
ifdef DMALLOC
DEBUGFLAGS += -DDMALLOC
endif

LIBS=
DEBUGLIBS=-ldmalloc

# Tidy lib related variables
TIDY_MAJOR = 1
TIDY_MINOR = 0

# This will come from autoconf again
LIBPREFIX = lib
LIBSUFFIX = .a
OBJSUF = .o

LIBRARY = $(LIBDIR)/$(LIBPREFIX)$(PROJECT)$(LIBSUFFIX)
AR=ar -r

XSLTPROC = xsltproc

EXES = $(BINDIR)/$(PROJECT) $(BINDIR)/tab2space

DOCS = $(DOCDIR)/quickref.html $(DOCDIR)/tidy.1

CONFIGXML = $(DOCDIR)/tidy-config.xml
HELPXML = $(DOCDIR)/tidy-help.xml

OBJFILES=\
        $(OBJDIR)/access$(OBJSUF)     $(OBJDIR)/attrs$(OBJSUF)      $(OBJDIR)/istack$(OBJSUF) \
        $(OBJDIR)/parser$(OBJSUF)     $(OBJDIR)/tags$(OBJSUF)       $(OBJDIR)/entities$(OBJSUF) \
        $(OBJDIR)/lexer$(OBJSUF)      $(OBJDIR)/pprint$(OBJSUF)     $(OBJDIR)/clean$(OBJSUF) \
        $(OBJDIR)/localize$(OBJSUF)   $(OBJDIR)/config$(OBJSUF)     $(OBJDIR)/alloc$(OBJSUF) \
        $(OBJDIR)/attrask$(OBJSUF)    $(OBJDIR)/attrdict$(OBJSUF)   $(OBJDIR)/attrget$(OBJSUF) \
        $(OBJDIR)/buffio$(OBJSUF)     $(OBJDIR)/fileio$(OBJSUF)     $(OBJDIR)/streamio$(OBJSUF) \
        $(OBJDIR)/tagask$(OBJSUF)     $(OBJDIR)/tmbstr$(OBJSUF)     $(OBJDIR)/utf8$(OBJSUF) \
        $(OBJDIR)/tidylib$(OBJSUF)    $(OBJDIR)/mappedio$(OBJSUF)

CFILES= \
        $(SRCDIR)/access.c       $(SRCDIR)/attrs.c        $(SRCDIR)/istack.c \
        $(SRCDIR)/parser.c       $(SRCDIR)/tags.c         $(SRCDIR)/entities.c \
        $(SRCDIR)/lexer.c        $(SRCDIR)/pprint.c       $(SRCDIR)/clean.c \
        $(SRCDIR)/localize.c     $(SRCDIR)/config.c       $(SRCDIR)/alloc.c \
        $(SRCDIR)/attrask.c      $(SRCDIR)/attrdict.c     $(SRCDIR)/attrget.c \
        $(SRCDIR)/buffio.c       $(SRCDIR)/fileio.c       $(SRCDIR)/streamio.c \
        $(SRCDIR)/tagask.c       $(SRCDIR)/tmbstr.c       $(SRCDIR)/utf8.c \
        $(SRCDIR)/tidylib.c      $(SRCDIR)/mappedio.c

HFILES= $(INCDIR)/platform.h     $(INCDIR)/tidy.h         $(INCDIR)/tidyenum.h \
        $(INCDIR)/buffio.h

LIBHFILES= \
        $(SRCDIR)/access.h       $(SRCDIR)/attrs.h        $(SRCDIR)/attrdict.h \
        $(SRCDIR)/clean.h        $(SRCDIR)/config.h       $(SRCDIR)/entities.h \
        $(SRCDIR)/fileio.h       $(SRCDIR)/forward.h      $(SRCDIR)/lexer.h \
        $(SRCDIR)/mappedio.h     $(SRCDIR)/message.h      $(SRCDIR)/parser.h \
        $(SRCDIR)/pprint.h       $(SRCDIR)/streamio.h     $(SRCDIR)/tags.h \
        $(SRCDIR)/tmbstr.h       $(SRCDIR)/utf8.h         $(SRCDIR)/tidy-int.h \
        $(SRCDIR)/version.h

all:    $(LIBRARY) $(EXES)

doc:    $(DOCS)

$(LIBRARY): $(OBJFILES)
	if [ ! -d $(LIBDIR) ]; then mkdir $(LIBDIR); fi
	$(AR) $@ $(OBJFILES)
ifdef RANLIB
	$(RANLIB) $@
endif

$(OBJDIR)/%$(OBJSUF):	$(SRCDIR)/%.c $(HFILES) $(LIBHFILES) Makefile
	if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi
	$(CC) $(CFLAGS) $(OTHERCFLAGS) -o $@ -c $<

$(BINDIR)/$(PROJECT):	$(APPDIR)/tidy.c $(HFILES) $(LIBRARY)
	if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR); fi
	$(CC) $(CFLAGS) $(OTHERCFLAGS) -o $@ $(APPDIR)/tidy.c -I$(INCDIR) $(LIBRARY)

$(BINDIR)/tab2space: $(APPDIR)/tab2space.c
	if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR); fi
	$(CC) $(CFLAGS) $(OTHERCFLAGS) -o $@ $(APPDIR)/tab2space.c $(LIBS)

$(HELPXML): $(BINDIR)/$(PROJECT)
	$(BINDIR)/$(PROJECT) -xml-help > $@

$(CONFIGXML): $(BINDIR)/$(PROJECT)
	$(BINDIR)/$(PROJECT) -xml-config > $@

$(DOCDIR)/quickref.html: $(DOCDIR)/quickref-html.xsl $(CONFIGXML)
	$(XSLTPROC) -o $@ $(DOCDIR)/quickref-html.xsl $(CONFIGXML)

$(DOCDIR)/tidy.1: $(DOCDIR)/tidy1.xsl $(HELPXML) $(CONFIGXML)
	$(XSLTPROC) -o $@ $(DOCDIR)/tidy1.xsl $(HELPXML)

debug:
	@$(MAKE) CFLAGS='$(CFLAGS) $(DEBUGFLAGS)' LIBS='$(LIBS) $(DEBUGLIBS)' all

clean:
	rm -f $(OBJFILES) $(EXES) $(LIBRARY) $(DOCS) $(HELPXML) $(CONFIGXML) $(OBJDIR)/*.lo
	if [ -d $(OBJDIR)/.libs ]; then rmdir $(OBJDIR)/.libs; fi
	if [ -d $(LIBDIR)/.libs ]; then rmdir $(LIBDIR)/.libs; fi
	if [ "$(OBJDIR)" != "$(TOPDIR)" -a -d $(OBJDIR) ]; then rmdir $(OBJDIR); fi
	if [ "$(LIBDIR)" != "$(TOPDIR)" -a -d $(LIBDIR) ]; then rmdir $(LIBDIR); fi
	if [ "$(BINDIR)" != "$(TOPDIR)" -a -d $(BINDIR) ]; then rmdir $(BINDIR); fi

installhdrs: $(HFILES)
	if [ ! -d "$(incinst)" ]; then mkdir -p "$(incinst)"; fi
	cp -f $(HFILES) "$(incinst)/"

installib: $(LIBRARY)
	if [ ! -d "$(libinst)" ]; then mkdir -p "$(libinst)"; fi
	cp -f $(LIBRARY) "$(libinst)/"

installexes: $(EXES)
	if [ ! -d "$(bininst)" ]; then mkdir -p "$(bininst)"; fi
	cp -f $(EXES) "$(bininst)/"

installmanpage: $(DOCDIR)/tidy.1
	if [ ! -d "$(maninst)/man1" ]; then mkdir -p "$(maninst)/man1"; fi;
	cp -f $(DOCDIR)/tidy.1 "$(maninst)/man1/tidy.1";

install: installhdrs installib installexes installmanpage


text:
#include "base/polygraph.h"

#include "xstd/Rnd.h"
#include "pgl/AddrMapSym.h"
#include "pgl/DynamicNameSym.h"
#include "runtime/AddrMapItems.h"

/* AddrMapItem */

AddrMapItem::AddrMapItem(const NetAddr &aName): theName(aName), theNewProb(-1) {
	Assert(theName);
}

AddrMapItem::AddrMapItem(const NetAddrSym &aName): theName(aName.val()) {
	Assert(theName);
	if (aName.isA(DynamicNameSym::TheType)) {
		Assert(theName.isDynamicName());
		((const DynamicNameSym&)aName).newProb(theNewProb);
	} else {
		Assert(!theName.isDynamicName());
		theNewProb = -1;
	}
}

/* Name2NameMapItem */

Name2NameMapItem::Name2NameMapItem(const NetAddr &aName): AddrMapItem(aName) {
	Assert(!theName.isDomainName());
}

/* Name2AddrMapItem */

Name2AddrMapItem::Name2AddrMapItem(const NetAddrSym &aName, const NetAddr &anAddr):
	AddrMapItem(aName), theAddr(anAddr) {
	Assert(theAddr);
	Assert(!theAddr.isDomainName());
}

/* Name2AddrsMapItem */

Name2AddrsMapItem::Name2AddrsMapItem(const NetAddrSym &aName, const Array<NetAddr*> &anAddrs):
	AddrMapItem(aName) {
	theAddrs.stretch(anAddrs.count());
	for (int i = 0; i < anAddrs.count(); ++i) {
		const NetAddr &addr = *anAddrs[i];
		Assert(!addr.isDomainName());
		theAddrs.append(new NetAddr(addr));
	}
}

Name2AddrsMapItem::~Name2AddrsMapItem() {
	while (theAddrs.count()) delete theAddrs.pop();
}

const NetAddr &Name2AddrsMapItem::selectAddr() const {
	static RndGen rng;
	const int idx = rng(0, theAddrs.count());
	return addrAt(idx);
}


text:
<?php
namespace App\Controller;

use App\Controller\AppController;

/**
 * CommunityRole Controller
 *
 * @property \App\Model\Table\CommunityRoleTable $CommunityRole
 */
class CommunityRoleController extends AppController
{

    /**
     * Index method
     *
     * @return void
     */
    public function index()
    {
        $this->set('communityRole', $this->paginate($this->CommunityRole));
        $this->set('_serialize', ['communityRole']);
    }

    /**
     * View method
     *
     * @param string|null $id Community Role id.
     * @return void
     * @throws \Cake\Network\Exception\NotFoundException When record not found.
     */
    public function view($id = null)
    {
        $communityRole = $this->CommunityRole->get($id, [
            'contain' => []
        ]);
        $this->set('communityRole', $communityRole);
        $this->set('_serialize', ['communityRole']);
    }

    /**
     * Add method
     *
     * @return void Redirects on successful add, renders view otherwise.
     */
    public function add()
    {
        $communityRole = $this->CommunityRole->newEntity();
        if ($this->request->is('post')) {
            $communityRole = $this->CommunityRole->patchEntity($communityRole, $this->request->data);
            if ($this->CommunityRole->save($communityRole)) {
                $this->Flash->success(__('The community role has been saved.'));
                return $this->redirect(['action' => 'index']);
            } else {
                $this->Flash->error(__('The community role could not be saved. Please, try again.'));
            }
        }
        $this->set(compact('communityRole'));
        $this->set('_serialize', ['communityRole']);
    }

    /**
     * Edit method
     *
     * @param string|null $id Community Role id.
     * @return void Redirects on successful edit, renders view otherwise.
     * @throws \Cake\Network\Exception\NotFoundException When record not found.
     */
    public function edit($id = null)
    {
        $communityRole = $this->CommunityRole->get($id, [
            'contain' => []
        ]);
        if ($this->request->is(['patch', 'post', 'put'])) {
            $communityRole = $this->CommunityRole->patchEntity($communityRole, $this->request->data);
            if ($this->CommunityRole->save($communityRole)) {
                $this->Flash->success(__('The community role has been saved.'));
                return $this->redirect(['action' => 'index']);
            } else {
                $this->Flash->error(__('The community role could not be saved. Please, try again.'));
            }
        }
        $this->set(compact('communityRole'));
        $this->set('_serialize', ['communityRole']);
    }

    /**
     * Delete method
     *
     * @param string|null $id Community Role id.
     * @return void Redirects to index.
     * @throws \Cake\Network\Exception\NotFoundException When record not found.
     */
    public function delete($id = null)
    {
        $this->request->allowMethod(['post', 'delete']);
        $communityRole = $this->CommunityRole->get($id);
        if ($this->CommunityRole->delete($communityRole)) {
            $this->Flash->success(__('The community role has been deleted.'));
        } else {
            $this->Flash->error(__('The community role could not be deleted. Please, try again.'));
        }
        return $this->redirect(['action' => 'index']);
    }
}


text:
function WYSIWYG_Color() {

	// colors
	var COLORS = new Array(
		"#000000","#993300","#333300","#003300","#003366","#000080",
		"#333399","#333333","#800000","#FF6600","#808000","#008000",
		"#008080","#0000FF","#666699","#808080","#FF0000","#FF9900",
		"#99CC00","#339966","#33CCCC","#3366FF","#800080","#999999",
		"#FF00FF","#FFCC00","#FFFF00","#00FF00","#00CCFF","#993366",
		"#C0C0C0","#FF99CC","#FFCC99","#FFFF99","#CCFFCC","#CCFFFF",
		"#99CCFF","#666699","#777777","#999999","#EEEEEE","#FFFFFF"
	);

	// div id of the color table
	var CHOOSER_DIV_ID = "colorpicker-div";

	/**
	 * Init the color picker
	 */
	this.init = function() {
		var div = document.createElement("DIV");
		div.id = CHOOSER_DIV_ID;
		div.style.position = "absolute";
		div.style.visibility = "hidden";
		document.body.appendChild(div);
	};

	/**
	 * Open the color chooser to choose a color.
	 *
	 * @param {String} element Element identifier
	 */
	this.choose = function(element) {
		var div = document.getElementById(CHOOSER_DIV_ID);
		if(div == null) {
			alert("Initialisation of color picker failed.");
			return;
		}

		// writes the content of the color picker
		write(element);

		// Display color picker
		var x = window.event.clientX + document.body.scrollLeft;
		var y = window.event.clientY + document.body.scrollTop;
		var winsize = windowSize();
		if(x + div.offsetWidth > winsize.width) x = winsize.width - div.offsetWidth - 5;
		if(y + div.offsetHeight > winsize.height) y = winsize.height - div.offsetHeight - 5;
		div.style.left = x + "px";
		div.style.top = y + "px";
		div.style.visibility = "visible";
	};

	/**
	 * Set the color in the given field
	 *
	 * @param {String} n Element identifier
	 * @param {String} color HexColor String
	 */
	this.select = function(n, color) {
		var div = document.getElementById(CHOOSER_DIV_ID);
		var elm = document.getElementById(n);
		elm.value = color;
		elm.style.color = color;
		elm.style.backgroundColor = color;
		div.style.visibility = "hidden";
	}

	/**
	 * Write the color table
	 * @param {String} n Element identifier
	 * @private
	 */
	function write(n) {

		var div = document.getElementById(CHOOSER_DIV_ID);

		var output = "";
		output += '

';
		for(var i = 0; i < COLORS.length;i++) {
			var color = COLORS[i];
			output += ' ';
			output += '

 ';
			output += '	';

			if(((i+1) % Math.round(Math.sqrt(COLORS.length))) == 0) {
				output += "

";
			}
		}

		output += '

';

		// write to div element
		div.innerHTML = output;
	};

	/**
	 * Set the window.event on Mozilla Browser
	 * @private
	 */
	function _event_tracker(event) {
		if (!document.all && document.getElementById) {
			window.event = event;
		}
	}
	document.onmousedown = _event_tracker;

	/**
	 * Get the window size
	 * @private
	 */
	function windowSize() {
		if (window.innerWidth) {
	  		return {width: window.innerWidth, height: window.innerHeight};
	  	}
		else if (document.body && document.body.offsetWidth) {
	  		return {width: document.body.offsetWidth, height: document.body.offsetHeight};
	  	}
		else {
	  		return {width: 0, height: 0};
	  	}
	}
}

var WYSIWYG_ColorInst = new WYSIWYG_Color();


text:
'use strict';

(() => {
  const appMenu = require('./menu');
  const util = require('./util');
  const {ipcRenderer, remote} = require('electron');
  const {BrowserWindow, shell, Menu} = remote;

  const isMac = process.platform === 'darwin';

  const defaultUpdateIntervalSec = 600;

  let isDarkMode = JSON.parse(localStorage.getItem('isDarkMode'));

  class RedmineNow {
    constructor() {
      this._settingsWindow = null;
      this._settings = {};
      this._startupTime = null;
      this._needsUpdateStatus = true;
      this._issueStatuses = [];
      this._timer = null;
      this._issues = [];
    }

    initMenu() {
      Menu.setApplicationMenu(appMenu);
      return this;
    }

    initEventListener() {
      ipcRenderer.on('toggle-dark-mode', () => {
        this.toggleDarkMode();
      });

      ipcRenderer.on('open-settings-window', () => {
        this.openSettingsWindow();
      });

      ipcRenderer.on('save-settings', () => {
        this._needsUpdateStatus = true;
        this.readStoredSettings()
          .overlay()
          .initFetch();
      });

      document.getElementById('open-settings-button').addEventListener('click', () => {
        this.openSettingsWindow();
      });

      remote.getCurrentWindow().on('close', () => {
        this.removeBaseTime();
      });

      return this;
    }

    openSettingsWindow() {
      if (this._settingsWindow !== null) {
        return this;
      }

      this._settingsWindow = new BrowserWindow({
        title: 'Settings',
        show: false,
        resizable: false,
        maximizable: false,
        fullscreenable: false,
        width: isMac ? 540 : 555,
        height: isMac ? 245 : 270,
        parent: isMac ? null : remote.getCurrentWindow(),
        titleBarStyle: isMac ? 'hidden' : 'default'
      });

      if (!isMac) {
        this._settingsWindow.setMenuBarVisibility(false);
      }

      this._settingsWindow.loadFile(`${__dirname}/settings.html`);

      this._settingsWindow.once('ready-to-show', () => {
        if (isMac) {
          this._settingsWindow.setParentWindow(remote.getCurrentWindow());
        }
        this._settingsWindow.show();
      });

      this._settingsWindow.on('closed', () => {
        this._settingsWindow = null;
      });

      this._settingsWindow.webContents.on('did-finish-load', () => {
        this._settingsWindow.webContents.send('load-settings-window', this._startupTime);
      });

      return this;
    }

    toggleDarkMode() {
      isDarkMode = document.body.classList.toggle('dark');
      localStorage.setItem('isDarkMode', isDarkMode);

      if (this._settingsWindow !== null) {
        this._settingsWindow.webContents.send('toggle-dark-mode', isDarkMode);
      }
    }

    initStartupTime() {
      this._startupTime = new Date();
      return this;
    }

    fetchIssueStatus() {
      if (!this._needsUpdateStatus) {
        return this;
      }

      if (!this.validateSettings()) {
        return this;
      }

      const xhr = new XMLHttpRequest();

      xhr.onreadystatechange = () => {
        if (xhr.readyState === 4) {
          this.handleResponseFetchIssueStatus(xhr.status, xhr.responseText);
        }
      };

      this.updateLastExecutionTimeWithBaseTime();

      xhr.open('GET', `${this._settings.url}/issue_statuses.json`);
      xhr.setRequestHeader('X-Redmine-API-Key', this._settings.apiKey);
      xhr.send();

      return this;
    }

    handleResponseFetchIssueStatus(status, responseText) {
      if (status === 200) {
        const headers = document.getElementById('headers');
        const container = document.getElementById('container');
        this._issueStatuses = JSON.parse(responseText).issue_statuses;

        const collapsedHeaders = headers.getElementsByClassName('collapsed');
        const collapsedIds = [];
        for (const header of collapsedHeaders) {
          const headerId = header.getAttribute('id');
          collapsedIds.push(headerId.replace(/header-column-status-/g, ''));
        }

        this.clear();

        this._issueStatuses.forEach(issueStatus => {
          const header = document.createElement('div');
          header.id = `header-column-status-${issueStatus.id}`;
          header.className = 'header-column';
          if (collapsedIds.includes(String(issueStatus.id))) {
            header.classList.add('collapsed');
          }
          header.innerText = issueStatus.name;
          header.title = issueStatus.name;
          header.addEventListener('click', () => {
            header.classList.toggle('collapsed');

            const columnId = `column-status-${issueStatus.id}`;
            const column = document.getElementById(columnId);
            column.classList.toggle('collapsed');

            this.updateCollapseTime(issueStatus.id, header.classList.contains('collapsed'))
              .hideUnreadMark(issueStatus.id);
          });

          const unreadMark = document.createElement('div');
          unreadMark.id = `unread-mark-status-${issueStatus.id}`;
          unreadMark.className = 'unread-mark';
          header.insertBefore(unreadMark, header.firstChild);
          headers.appendChild(header);

          const column = document.createElement('div');
          column.id = `column-status-${issueStatus.id}`;
          column.className = isMac ? 'column' : 'column windows';
          if (collapsedIds.includes(String(issueStatus.id))) {
            column.classList.add('collapsed');
          }
          container.appendChild(column);
        });

        this._needsUpdateStatus = false;
      }

      return this;
    }

    clear() {
      this._issues = [];
      document.getElementById('headers').innerHTML = '';
      document.getElementById('container').innerHTML = '';
    }

    updateCollapseTime(issueStatusId, isCollapsed) {
      const collapseTime = JSON.parse(localStorage.getItem('collapseTime')) || {};

      if (isCollapsed) {
        Object.assign(collapseTime, {[issueStatusId]: new Date().toISOString().replace(/\.\d+Z$/, 'Z')});
      } else {
        delete collapseTime[issueStatusId];
      }

      localStorage.setItem('collapseTime', JSON.stringify(collapseTime));

      return this;
    }

    removeCollapseTime() {
      localStorage.removeItem('collapseTime');
      return this;
    }

    showUnreadMark(issueStatusId) {
      const unreadMarkElement = document.getElementById(`unread-mark-status-${issueStatusId}`);
      unreadMarkElement.classList.add('show');

      return this;
    }

    hideUnreadMark(issueStatusId) {
      const unreadMarkElement = document.getElementById(`unread-mark-status-${issueStatusId}`);
      unreadMarkElement.classList.remove('show');

      return this;
    }

    checkUnread(issue) {
      const collapseTime = JSON.parse(localStorage.getItem('collapseTime')) || {};
      const time = collapseTime[issue.status.id];

      if (time === undefined) {
        return this;
      }

      if (new Date(issue.updated_on).getTime() > new Date(time).getTime()) {
        this.showUnreadMark(issue.status.id);
      }

      return this;
    }

    initFetch() {
      const timer = () => {
        this.fetch(1);
        clearInterval(this._timer);
        this._timer = setInterval(timer, this.getUpdateIntervalMsec());
      };

      clearInterval(this._timer);
      this._timer = setInterval(timer, this.getUpdateIntervalMsec());

      return this;
    }

    getUpdateIntervalMsec() {
      return 1000 * (this._settings.updateInterval || defaultUpdateIntervalSec);
    }

    fetch(page) {
      this.fetchIssueStatus();

      if (!this.validateSettings()) {
        return this;
      }

      const xhr = new XMLHttpRequest();

      xhr.onreadystatechange = () => {
        if (xhr.readyState === 4) {
          this.handleResponseFetch(xhr.status, xhr.responseText, page);
        }
      };

      xhr.open('GET', `${this._settings.url}/issues.json${this.getRequestParams(page)}`);
      xhr.setRequestHeader('X-Redmine-API-Key', this._settings.apiKey);
      xhr.send();

      return this;
    }

    handleResponseFetch(status, responseText, page) {
      if (status === 200) {
        const response = JSON.parse(responseText);

        this.keepIssues(response.issues);

        if (this.calcRemainingRequestCount(response, page) > 0) {
          this.fetch(page + 1);
        } else {
          this.sortIssuesByUpdatedOn()
            .showIssues()
            .showTotalIssue()
            .updateLastExecutionTime();
        }
      }

      return this;
    }

    getRequestParams(page) {
      const lastExecutionTime = localStorage.getItem('lastExecutionTime');
      const params = [
        `updated_on=%3E%3D${lastExecutionTime}`,
        'status_id=*',
        'sort=updated_on:asc',
        'limit=100',
        `page=${page}`
      ];

      const {projectId} = this._settings;
      if (projectId !== null && projectId !== '') {
        params.unshift(`project_id=${projectId}`);
      }

      return `?${params.join('&')}`;
    }

    calcRemainingRequestCount(response, page) {
      return Math.floor(response.total_count / response.limit) + 1 - page;
    }

    keepIssues(issues) {
      issues.forEach(issue => {
        this.removeIssue(issue.id);
        this._issues.push(issue);
      });

      return this;
    }

    removeIssue(issueId) {
      this._issues = this._issues.filter(issue => {
        return issue.id !== issueId;
      });

      return this;
    }

    sortIssuesByUpdatedOn() {
      this._issues.sort((a, b) => {
        const dateA = new Date(a.updated_on);
        const dateB = new Date(b.updated_on);
        return dateA - dateB || a.id - b.id;
      });

      return this;
    }

    showIssues() {
      const issueCount = this._issues.length;

      if (issueCount === 0) {
        return this;
      }

      const now = new Date();
      const todayTime = new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime();

      this._issues.forEach(issue => {
        const issueElementId = `issue-${issue.id}`;
        this.removeIssueElement(issueElementId);
        const issueElement = this.createIssueElement(issueElementId, issue, todayTime, this._settings.url);
        const column = document.getElementById(`column-status-${issue.status.id}`);
        column.insertBefore(issueElement, column.firstChild);
      });

      return this;
    }

    removeIssueElement(issueElementId) {
      const issueElement = document.getElementById(issueElementId);
      if (issueElement) {
        issueElement.parentNode.removeChild(issueElement);
      }

      return this;
    }

    createIssueElement(issueElementId, issue, todayTime, url) {
      const issueElement = document.createElement('div');
      issueElement.id = issueElementId;
      issueElement.className = 'issue';

      const issueIdElement = document.createElement('div');
      issueIdElement.innerText = `#${issue.id}`;
      issueIdElement.className = 'issue-id';
      issueElement.appendChild(issueIdElement);

      const subjectElement = document.createElement('div');
      subjectElement.innerText = issue.subject;
      subjectElement.className = 'subject';
      issueElement.appendChild(subjectElement);

      const assignedTo = issue.assigned_to;
      if (assignedTo !== undefined) {
        const assignedToElement = document.createElement('div');
        assignedToElement.innerText = assignedTo.name;
        assignedToElement.className = 'assigned-to';
        issueElement.appendChild(assignedToElement);
      }

      const updatedOnElement = document.createElement('div');
      updatedOnElement.innerText = util.formatDate(new Date(issue.updated_on), todayTime);
      updatedOnElement.className = 'updated-on';
      issueElement.appendChild(updatedOnElement);

      issueElement.addEventListener('click', () => {
        shell.openExternal(`${url}/issues/${issue.id}`);
      });

      this.checkUnread(issue);

      return issueElement;
    }

    showTotalIssue() {
      const issueCount = this._issues.length;

      document.getElementById('total-issue-count').innerText = issueCount;

      const issueUnit = (issueCount === 0 || issueCount === 1) ? 'issue' : 'issues';
      document.getElementById('total-issue-unit').innerText = issueUnit;

      return this;
    }

    updateLastExecutionTime(date = new Date()) {
      const lastExecutionTime = date.toISOString().replace(/\.\d+Z$/, 'Z');
      localStorage.setItem('lastExecutionTime', lastExecutionTime);

      return this;
    }

    updateLastExecutionTimeWithBaseTime() {
      if (this._settings.baseTime !== null) {
        this.updateLastExecutionTime(new Date(this._settings.baseTime));
      }

      return this;
    }

    readStoredSettings() {
      this._settings = {
        url: localStorage.getItem('url'),
        apiKey: localStorage.getItem('apiKey'),
        projectId: localStorage.getItem('projectId'),
        updateInterval: localStorage.getItem('updateInterval'),
        baseTime: localStorage.getItem('baseTime')
      };

      return this;
    }

    validateSettings() {
      const {url, apiKey} = this._settings;

      if (url === null || url === '' || apiKey === null || apiKey === '') {
        return false;
      }

      return true;
    }

    removeBaseTime() {
      localStorage.removeItem('baseTime');
      localStorage.removeItem('baseTimeValue');

      return this;
    }

    overlay() {
      const {url, apiKey} = this._settings;
      const overlayElement = document.getElementById('no-setting');

      if (url === null || url === '' || apiKey === null || apiKey === '') {
        overlayElement.classList.add('overlay');
      } else {
        overlayElement.classList.remove('overlay');
      }

      return this;
    }
  }

  document.addEventListener('DOMContentLoaded', () => {
    document.body.classList.toggle('dark', isDarkMode);

    util.hideTitleBar();
  });

  window.addEventListener('load', () => {
    const redmineNow = new RedmineNow();
    redmineNow.initMenu()
      .initEventListener()
      .initStartupTime()
      .readStoredSettings()
      .overlay()
      .removeCollapseTime()
      .fetchIssueStatus()
      .updateLastExecutionTime(redmineNow._startupTime)
      .initFetch();
  });
})();


text:
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
    <item>
        <content:encoded>
            <![CDATA[Tantek Çelik]]>
        </content:encoded>
    </item>
</channel>
</rss>


text:
package org.apache.s4.wordcount;

import java.io.IOException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

import junit.framework.Assert;

import org.apache.s4.base.Event;
import org.apache.s4.comm.DefaultCommModule;
import org.apache.s4.comm.serialize.SerializerDeserializerFactory;
import org.apache.s4.comm.tcp.TCPEmitter;
import org.apache.s4.core.BaseModule;
import org.apache.s4.core.DefaultCoreModule;
import org.apache.s4.core.S4Node;
import org.apache.s4.core.util.AppConfig;
import org.apache.s4.deploy.DeploymentUtils;
import org.apache.s4.fixtures.CommTestUtils;
import org.apache.s4.fixtures.ZkBasedTest;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.ZooDefs.Ids;
import org.apache.zookeeper.ZooKeeper;
import org.junit.Test;

import com.google.common.io.Resources;
import com.google.inject.Guice;
import com.google.inject.Injector;

public class WordCountTest extends ZkBasedTest {

    public static final String SENTENCE_1 = "to be or not to be doobie doobie da";
    public static final int SENTENCE_1_TOTAL_WORDS = SENTENCE_1.split(" ").length;
    public static final String SENTENCE_2 = "doobie doobie da";
    public static final int SENTENCE_2_TOTAL_WORDS = SENTENCE_2.split(" ").length;
    public static final String SENTENCE_3 = "doobie";
    public static final int SENTENCE_3_TOTAL_WORDS = SENTENCE_3.split(" ").length;
    public static final String FLAG = ";";
    public static int TOTAL_WORDS = SENTENCE_1_TOTAL_WORDS + SENTENCE_2_TOTAL_WORDS + SENTENCE_3_TOTAL_WORDS;
    private TCPEmitter emitter;
    Injector injector;

    public void createEmitter() throws IOException {
        injector = Guice.createInjector(new BaseModule(
                Resources.getResource("default.s4.base.properties").openStream(), "cluster1"), new DefaultCommModule(
                Resources.getResource("default.s4.comm.properties").openStream()), new DefaultCoreModule(Resources
                .getResource("default.s4.core.properties").openStream()));

        emitter = injector.getInstance(TCPEmitter.class);

    }

    /**
     * A simple word count application:
     *
     *
     *
     *
     * sentences words word counts Adapter ------------> WordSplitterPE -----------> WordCounterPE ------------->
     * WordClassifierPE key = "sentence" key = word key="classifier" (should be *)
     *
     *
     * The test consists in checking that words are correctly counted.
     *
     *
     */
    @Test
    public void testSimple() throws Exception {
        final ZooKeeper zk = CommTestUtils.createZkClient();
        DeploymentUtils.initAppConfig(new AppConfig.Builder().appClassName(WordCountApp.class.getName()).build(),
                "cluster1", true, "localhost:2181");
        S4Node.main(new String[] { "-cluster=cluster1", });

        // we create the emitter now, it will share zk node assignment with the S4 node
        createEmitter();

        CountDownLatch signalTextProcessed = new CountDownLatch(1);
        CommTestUtils.watchAndSignalCreation("/results", signalTextProcessed, zk);

        // add authorizations for processing
        for (int i = 1; i <= SENTENCE_1_TOTAL_WORDS + SENTENCE_2_TOTAL_WORDS + 1; i++) {
            zk.create("/continue_" + i, new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
        }
        injectSentence(SENTENCE_1);
        injectSentence(SENTENCE_2);
        injectSentence(SENTENCE_3);
        Assert.assertTrue(signalTextProcessed.await(10, TimeUnit.SECONDS));
        String results = new String(zk.getData("/results", false, null));
        Assert.assertEquals("be=2;da=2;doobie=5;not=1;or=1;to=2;", results);
    }

    public void injectSentence(String sentence) throws IOException, InterruptedException {
        Event event = new Event();
        event.setStreamId("inputStream");
        event.put("sentence", String.class, sentence);

        // NOTE: we send to partition 0 since partition 1 hosts the emitter
        emitter.send(
                0,
                injector.getInstance(SerializerDeserializerFactory.class)
                        .createSerializerDeserializer(Thread.currentThread().getContextClassLoader()).serialize(event));
    }

}


text:
'''
Implements the targetcli backstores related UI.

his file is part of targetcli.
Copyright (c) 2011-2014 by Datera, 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.
'''

from ui_node import UINode, UIRTSLibNode
from rtslib import RTSRoot
from rtslib import FileIOBackstore, IBlockBackstore
from rtslib import PSCSIBackstore, RDMCPBackstore
from rtslib import FileIOStorageObject, IBlockStorageObject
from rtslib import PSCSIStorageObject, RDMCPStorageObject
from rtslib.utils import get_block_type, is_disk_partition

class UIBackstoresLegacy(UINode):
    '''
    The backstores container UI.
    '''
    def __init__(self, parent):
        UINode.__init__(self, 'backstores', parent)
        self.cfs_cwd = "%s/core" % self.cfs_cwd
        self.refresh()

    def refresh(self):
        self._children = set([])
        for backstore in RTSRoot().backstores:
            backstore_plugin = backstore.plugin
            if backstore_plugin == 'pscsi':
                UIPSCSIBackstoreLegacy(backstore, self)
            elif backstore_plugin == 'rd_mcp':
                UIRDMCPBackstoreLegacy(backstore, self)
            elif backstore_plugin == 'fileio':
                UIFileIOBackstoreLegacy(backstore, self)
            elif backstore_plugin == 'iblock':
                UIIBlockBackstoreLegacy(backstore, self)

    def summary(self):
        no_backstores = len(self._children)
        if no_backstores > 1:
            msg = "%d Backstores (legacy mode)" % no_backstores
        else:
            msg = "%d Backstore (legacy mode)" % no_backstores
        return (msg, None)

    def ui_command_create(self, backstore_plugin):
        '''
        Creates a new backstore, using the chosen I{backstore_plugin}. More
        than one backstores using the same I{backstore_plugin} can co-exist.
        They will be identified by incremental index numbers, starting from 0.

        AVAILABLE BACKSTORE PLUGINS
        ===========================

        B{iblock}
        ---------
        This I{backstore_plugin} provides I{SPC-4}, along with I{ALUA} and
        I{Persistent Reservations} emulation on top of Linux BLOCK devices:
        B{any block device} that appears in /sys/block.

        B{pscsi}
        --------
        Provides pass-through for Linux physical SCSI devices. It can be used
        with any storage object that does B{direct pass-through} of SCSI
        commands without SCSI emulation. This assumes an underlying SCSI
        device that appears with lsscsi in /proc/scsi/scsi, such as a SAS hard
        drive, such as any SCSI device. The Linux kernel code for device SCSI
        drivers resides in linux/drivers/scsi. SCSI-3 and higher is supported
        with this subsystem, but only for control CDBs capable by the device
        firmware.

        B{fileio}
        ---------
        This I{backstore_plugin} provides I{SPC-4}, along with I{ALUA} and
        I{Persistent Reservations} emulation on top of Linux VFS devices:
        B{any file on a mounted filesystem}. It may be backed by a file or an
        underlying real block device. FILEIO is using struct file to serve
        block I/O with various methods (synchronous or asynchronous) and
        (buffered or direct).

        B{rd_mcp}
        --------
        This I{backstore_plugin} uses a ramdisk with a separate
        mapping using memory copy. Typically used for bandwidth
        testing.

        EXAMPLE
        =======

        B{create iblock}
        ----------------
        Creates a new backstore, using the B{iblock} I{backstore_plugin}.
        '''
        self.assert_root()
        self.shell.log.debug("%r" % [(backstore.plugin, backstore.index)
                                     for backstore in RTSRoot().backstores])
        indexes = [backstore.index for backstore in RTSRoot().backstores
                   if backstore.plugin == backstore_plugin]
        self.shell.log.debug("Existing %s backstore indexes: %r"
                             % (backstore_plugin, indexes))
        for index in range(1048576):
            if index not in indexes:
                backstore_index = index
                break

        if backstore_index is None:
            self.shell.log.error("Cannot find an available backstore index.")
            return
        else:
            self.shell.log.info("First available %s backstore index is %d."
                                % (backstore_plugin, backstore_index))

        if backstore_plugin == 'pscsi':
            backstore = PSCSIBackstore(backstore_index, mode='create')
            return self.new_node(UIPSCSIBackstoreLegacy(backstore, self))
        elif backstore_plugin == 'rd_mcp':
            backstore = RDMCPBackstore(backstore_index, mode='create')
            return self.new_node(UIRDMCPBackstoreLegacy(backstore, self))
        elif backstore_plugin == 'fileio':
            backstore = FileIOBackstore(backstore_index, mode='create')
            return self.new_node(UIFileIOBackstoreLegacy(backstore, self))
        elif backstore_plugin == 'iblock':
            backstore = IBlockBackstore(backstore_index, mode='create')
            return self.new_node(UIIBlockBackstoreLegacy(backstore, self))
        else:
            self.shell.log.error("Invalid backstore plugin %s"
                                 % backstore_plugin)
            return

        self.shell.log.info("Created new backstore %s" % backstore.name)

    def ui_complete_create(self, parameters, text, current_param):
        '''
        Parameter auto-completion method for user command create.
        @param parameters: Parameters on the command line.
        @type parameters: dict
        @param text: Current text of parameter being typed by the user.
        @type text: str
        @param current_param: Name of parameter to complete.
        @type current_param: str
        @return: Possible completions
        @rtype: list of str
        '''
        if current_param == 'backstore_plugin':
            plugins = ['pscsi', 'rd_mcp', 'fileio', 'iblock']
            completions = [plugin for plugin in plugins
                           if plugin.startswith(text)]
        else:
            completions = []

        if len(completions) == 1:
            return [completions[0] + ' ']
        else:
            return completions

    def ui_command_delete(self, backstore):
        '''
        Deletes a I{backstore}, and recursively all defined storage objects
        hanging under it. If there are existing LUNs making use of those
        storage objects, they will be deleted too.

        EXAMPLE
        =======
        B{delete iblock2}
        -----------------
        That would recursively delete the B{iblock} backstore with index 2.
        '''
        self.assert_root()
        try:
            child = self.get_child(backstore)
        except ValueError:
            self.shell.log.error("No backstore named %s." % backstore)
        else:
            child.rtsnode.delete()
            self.remove_child(child)
            self.shell.log.info("Deleted backstore %s." % backstore)
            self.parent.refresh()

    def ui_complete_delete(self, parameters, text, current_param):
        '''
        Parameter auto-completion method for user command delete.
        @param parameters: Parameters on the command line.
        @type parameters: dict
        @param text: Current text of parameter being typed by the user.
        @type text: str
        @param current_param: Name of parameter to complete.
        @type current_param: str
        @return: Possible completions
        @rtype: list of str
        '''
        if current_param == 'backstore':
            backstores = [child.name for child in self.children]
            completions = [backstore for backstore in backstores
                           if backstore.startswith(text)]
        else:
            completions = []

        if len(completions) == 1:
            return [completions[0] + ' ']
        else:
            return completions

class UIBackstoreLegacy(UIRTSLibNode):
    '''
    A backstore UI.
    '''
    def __init__(self, backstore, parent):
        UIRTSLibNode.__init__(self, backstore.name, backstore, parent)
        self.cfs_cwd = backstore.path
        self.refresh()

    def refresh(self):
        self._children = set([])
        for storage_object in self.rtsnode.storage_objects:
            UIStorageObjectLegacy(storage_object, self)

    def summary(self):
        no_storage_objects = len(self._children)
        if no_storage_objects > 1:
            msg = "%d Storage Objects" % no_storage_objects
        else:
            msg = "%d Storage Object" % no_storage_objects
        return (msg, None)

    def prm_buffered(self, buffered):
        buffered = \
                self.ui_eval_param(buffered, 'bool', True)
        if buffered:
            self.shell.log.info("Using buffered mode.")
        else:
            self.shell.log.info("Not using buffered mode.")
        return buffered

    def ui_command_version(self):
        '''
        Displays the version of the current backstore's plugin.
        '''
        self.shell.con.display("Backstore plugin %s %s"
                               % (self.rtsnode.plugin, self.rtsnode.version))

    def ui_command_delete(self, name):
        '''
        Recursively deletes the storage object having the specified I{name}. If
        there are LUNs using this storage object, they will be deleted too.

        EXAMPLE
        =======
        B{delete mystorage}
        -------------------
        Deletes the storage object named mystorage, and all associated LUNs.
        '''
        self.assert_root()
        try:
            child = self.get_child(name)
        except ValueError:
            self.shell.log.error("No storage object named %s." % name)
        else:
            child.rtsnode.delete()
            self.remove_child(child)
            self.shell.log.info("Deleted storage object %s." % name)
            self.parent.parent.refresh()

    def ui_complete_delete(self, parameters, text, current_param):
        '''
        Parameter auto-completion method for user command delete.
        @param parameters: Parameters on the command line.
        @type parameters: dict
        @param text: Current text of parameter being typed by the user.
        @type text: str
        @param current_param: Name of parameter to complete.
        @type current_param: str
        @return: Possible completions
        @rtype: list of str
        '''
        if current_param == 'name':
            names = [child.name for child in self.children]
            completions = [name for name in names
                           if name.startswith(text)]
        else:
            completions = []

        if len(completions) == 1:
            return [completions[0] + ' ']
        else:
            return completions

class UIPSCSIBackstoreLegacy(UIBackstoreLegacy):
    '''
    PSCSI backstore UI.
    '''
    def ui_command_create(self, name, dev):
        '''
        Creates a PSCSI storage object, with supplied name and SCSI device. The
        SCSI device I{dev} can either be a path name to the device, in which
        case it is recommended to use the /dev/disk/by-id hierarchy to have
        consistent naming should your physical SCSI system be modified, or an
        SCSI device ID in the H:C:T:L format, which is not recommended as SCSI
        IDs may vary in time.
        '''
        self.assert_root()
        so = PSCSIStorageObject(self.rtsnode, name, dev)
        ui_so = UIStorageObjectLegacy(so, self)
        self.shell.log.info("Created pscsi storage object %s using %s."
                            % (name, dev))
        return self.new_node(ui_so)

class UIRDMCPBackstoreLegacy(UIBackstoreLegacy):
    '''
    RDMCP backstore UI.
    '''
    def ui_command_create(self, name, size):
        '''
        Creates an RDMCP storage object. I{size} is the size of the ramdisk.

        SIZE SYNTAX
        ===========
        - If size is an int, it represents a number of bytes.
        - If size is a string, the following units can be used:
            - B{B} or no unit present for bytes
            - B{k}, B{K}, B{kB}, B{KB} for kB (kilobytes)
            - B{m}, B{M}, B{mB}, B{MB} for MB (megabytes)
            - B{g}, B{G}, B{gB}, B{GB} for GB (gigabytes)
            - B{t}, B{T}, B{tB}, B{TB} for TB (terabytes)
        '''
        self.assert_root()
        so = RDMCPStorageObject(self.rtsnode, name, size)
        ui_so = UIStorageObjectLegacy(so, self)
        self.shell.log.info("Created rd_mcp ramdisk %s with size %s."
                            % (name, size))
        return self.new_node(ui_so)

class UIFileIOBackstoreLegacy(UIBackstoreLegacy):
    '''
    FileIO backstore UI.
    '''
    def ui_command_create(self, name, file_or_dev, size=None, buffered=None):
        '''
        Creates a FileIO storage object. If I{file_or_dev} is a path to a
        regular file to be used as backend, then the I{size} parameter is
        mandatory. Else, if I{file_or_dev} is a path to a block device, the
        size parameter B{must} be ommited. If present, I{size} is the size of
        the file to be used, I{file} the path to the file or I{dev} the path to
        a block device. The I{buffered} parameter is a boolean stating
        whether or not to enable buffered mode. It is disabled by
        default (synchronous mode).

        SIZE SYNTAX
        ===========
        - If size is an int, it represents a number of bytes.
        - If size is a string, the following units can be used:
            - B{B} or no unit present for bytes
            - B{k}, B{K}, B{kB}, B{KB} for kB (kilobytes)
            - B{m}, B{M}, B{mB}, B{MB} for MB (megabytes)
            - B{g}, B{G}, B{gB}, B{GB} for GB (gigabytes)
            - B{t}, B{T}, B{tB}, B{TB} for TB (terabytes)
        '''
        self.assert_root()
        self.shell.log.debug('Using params size=%s buffered=%s'
                             % (size, buffered))
        is_dev = get_block_type(file_or_dev) is not None \
                or is_disk_partition(file_or_dev)

        if size is None and is_dev:
            so = FileIOStorageObject(self.rtsnode, name, file_or_dev,
                                     buffered_mode=self.prm_buffered(buffered))
            self.shell.log.info("Created fileio %s with size %s."
                                % (name, size))
            ui_so = UIStorageObjectLegacy(so, self)
            return self.new_node(ui_so)
        elif size is not None and not is_dev:
            so = FileIOStorageObject(self.rtsnode, name, file_or_dev, size,
                                     buffered_mode=self.prm_buffered(buffered))
            self.shell.log.info("Created fileio storage object %s." % name)
            ui_so = UIStorageObjectLegacy(so, self)
            return self.new_node(ui_so)
        else:
            self.shell.log.error("For fileio, you must either specify both a "
                                 + "file and a size, or just a device path.")

class UIIBlockBackstoreLegacy(UIBackstoreLegacy):
    '''
    IBlock backstore UI.
    '''
    def ui_command_create(self, name, dev):
        '''
        Creates an IBlock Storage object. I{dev} is the path to the TYPE_DISK
        block device to use.
        '''
        self.assert_root()
        so = IBlockStorageObject(self.rtsnode, name, dev)
        ui_so = UIStorageObjectLegacy(so, self)
        self.shell.log.info("Created iblock storage object %s using %s."
                            % (name, dev))
        return self.new_node(ui_so)

class UIStorageObjectLegacy(UIRTSLibNode):
    '''
    A storage object UI.
    '''
    def __init__(self, storage_object, parent):
        name = storage_object.name
        UIRTSLibNode.__init__(self, name, storage_object, parent)
        self.cfs_cwd = storage_object.path
        self.refresh()

    def summary(self):
        so = self.rtsnode
        if so.backstore.plugin.startswith("rd"):
            path = "ramdisk"
        else:
            path = so.udev_path
        if not path:
            return ("BROKEN STORAGE LINK", False)
        else:
            return ("%s %s" % (path, so.status), True)


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>elFinder 2.0</title>

    <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />

    <link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
    <link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">

    <link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme-bootstrap-libreicons-svg.css') ?>">

    <?php if($locale){ ?>

    <?php } ?>


text:
<?php

namespace AlphaLemon\Block\TinyMceBlockBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Finder\Finder;

/**
 * TinyMceController
 *
 * @author alphalemon <webmaster@alphalemon.com>
 */
class TinyMceController extends Controller
{
    public function createLinksListAction()
    {
        $factoryRepository = $this->container->get('alpha_lemon_cms.factory_repository');
        $seoRepository = $factoryRepository->createRepository('Seo');
        $seoAttributes = $seoRepository->fromLanguageName($this->getRequest()->get('language'));

        $mceLinks = array();
        foreach ($seoAttributes as $seoAttribute) {
            $permalink = $seoAttribute->getPermalink();
            $mceLinks[] = array(
                'title' => $permalink,
                'value' => $permalink,
            );

        }

        $response = new Response();
        $response->setContent(json_encode($mceLinks));

        return $response;

        return $this->setResponse();
    }
}


text:
package Lucy::Test;
use Lucy;
our $VERSION = '0.004000';
$VERSION = eval $VERSION;

# Set the default memory threshold for PostingListWriter to a low number so
# that we simulate large indexes by performing a lot of PostingPool flushes.
Lucy::Index::PostingListWriter::set_default_mem_thresh(0x1000);

1;

__END__


text:
from ansi2html import Ansi2HTMLConverter

from changes.api.serializer import Serializer, register
from changes.models.log import LogChunk

@register(LogChunk)
class LogChunkSerializer(Serializer):
    def serialize(self, instance, attrs):
        conv = Ansi2HTMLConverter()
        formatted_text = conv.convert(instance.text, full=False)

        return {
            'id': instance.id.hex,
            'source': {
                'id': instance.source.id.hex,
            },
            'text': formatted_text,
            'offset': instance.offset,
            'size': instance.size,
        }


text:
using System;
using System.ComponentModel.DataAnnotations;

namespace GRA.Data.Model
{
    public class VendorCodeType : Abstract.BaseDbEntity
    {
        [Required]
        public int SiteId { get; set; }

        public Site Site { get; set; }

        [Required]
        [MaxLength(255)]
        public string Description { get; set; }

        [Required]
        [MaxLength(1250)]
        public string Mail { get; set; }

        [Required]
        [MaxLength(255)]
        public string MailSubject { get; set; }

        [MaxLength(255)]
        public string OptionSubject { get; set; }

        [MaxLength(1250)]
        public string OptionMail { get; set; }

        [MaxLength(255)]
        public string DonationSubject { get; set; }

        [MaxLength(1250)]
        public string DonationMail { get; set; }

        [MaxLength(255)]
        public string DonationMessage { get; set; }

        [MaxLength(255)]
        public string EmailAwardSubject { get; set; }

        [MaxLength(1250)]
        public string EmailAwardMail { get; set; }

        [MaxLength(255)]
        public string EmailAwardMessage { get; set; }

        [MaxLength(255)]
#pragma warning disable CA1056 // URI-like properties should not be strings
        public string Url { get; set; }
#pragma warning restore CA1056 // URI-like properties should not be strings

        public DateTime? ExpirationDate { get; set; }
        public bool AwardPrizeOnShipDate { get; set; }
        public bool AwardPrizeOnPackingSlip { get; set; }
        public int? ReadyForPickupEmailTemplateId { get; set; }

    }
}


text:
package test.org.apache.skywalking.apm.testcase.retransform_class;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
public class Application {
    private static final Logger LOGGER = LogManager.getLogger(Application.class);

    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

    public static void main(String[] args) {
        try {
            SpringApplication.run(Application.class, args);
        } catch (Exception e) {
            // Never do this
        }

        RetransformUtil.doRetransform();
    }

}


text:
#pragma once
#include "oxygine_include.h"
#include "TextField.h"
namespace oxygine
{
    /*
    WARNING! Class TextActor was renamed to TextField.
    TextActor name is deprecated.
    */

    DECLARE_SMART(TextActor, spTextActor);
    class TextActor : public TextField
    {
    public:
        DECLARE_COPYCLONE_NEW(TextActor);
//      OXYGINE_DEPRECATED
        TextActor() {}
    };

    inline void TextActor::copyFrom(const TextActor& src, cloneOptions opt)
    {
        TextField::copyFrom(src, opt);
    }
}


text:
define(['facade', 'components/message/messages', 'polyfills/closest'], function (facade, messages) {

    var Messenger = function (element) {
        this.element = element;
        this.list = this.element.querySelector('.m-messenger__list');
        this.options = this.element.querySelector('.m-messenger__options');

        this.messageIndex = [];
        this.optionsMap = {}

        this.init();
    };

    Messenger.prototype.init = function () {
        this.enableScripting();
    };

    Messenger.prototype.messagesReady = function () {
        facade.publish('loader:refresh');

        this.messageIndex = this.messageIndexing();

        facade.subscribe('message:complete', this.beginNextMessage, this);
        facade.subscribe('message:remove', this.removeMessage, this);
        facade.subscribe('message:options', this.showOptions, this);
        facade.subscribe('messenger:scroll', this.updateScroll, this);
        facade.subscribe('messenger:hide-options', this.hideOptions, this);

        setTimeout(function () {
            this.beginNextMessage();
        }.bind(this), 1300);
    };

    Messenger.prototype.beginNextMessage = function (immediately) {
        var nextMessage = this.messageIndex.shift();
        var delay = immediately ? 1 : 1000;

        setTimeout(function () {
            facade.publish('message:incoming:' + nextMessage);
        }, delay);
    };

    Messenger.prototype.messageIndexing = function () {
        var messageIndex = [];

        this.list.querySelectorAll('[data-component="message"]').forEach(function (message) {
            messageIndex.push(message.getAttribute('data-message-id'));
        });

        return messageIndex;
    };

    Messenger.prototype.enableScripting = function () {
        this.list.innerHTML = '';

        this.mapOptions();
        this.populateMessages();
    };

    Messenger.prototype.mapOptions = function () {
        var optionsMap = this.optionsMap;

        messages.forEach(function (message, i) {
            if (typeof message.options !== 'undefined') {
                optionsMap[message.id] = message.options;
            }
        });
    };

    Messenger.prototype.populateMessages = function () {
        var messagesHTML = [];

        messages.forEach(function (message, i) {
            messagesHTML.push(this.createMessage(message));
        }.bind(this));

        this.list.innerHTML = messagesHTML.join('');

        this.messagesReady();
    };

    Messenger.prototype.showOptions = function (messageId) {
        var optionsHTML = [];

        var options = this.optionsMap[messageId];

        options.forEach(function (option, i) {
            optionsHTML.push(this.createOption(option));
        }.bind(this));

        this.options.innerHTML = optionsHTML.join('');

        setTimeout(function () {
            this.options.querySelectorAll('.a-message--option').forEach(function (el) {
                el.addEventListener('click', this.clickOption.bind(this));
                el.classList.add('a-message--incoming');
            }.bind(this));
        }.bind(this), 100);
    };

    Messenger.prototype.hideOptions = function () {
        var lastOptions = this.options.querySelector('.a-message--option.a-message--incoming');

        // let's have our options cleaned out completely when transitions are completed
        lastOptions.addEventListener('transitionend', function (e, callee) {
            e.currentTarget.removeEventListener(e.type, callee);
            this.options.innerHTML = '';
        }.bind(this));

        // let's remove the option not selected just a tad after the one selected
        setTimeout(function () {
            this.options.querySelector('.a-message--option.a-message--incoming').classList.remove('a-message--incoming');
        }.bind(this), 200);
    };

    Messenger.prototype.clickOption = function (e, callee) {
        var action = e.currentTarget.getAttribute('data-action');
        var gaLabel = e.currentTarget.innerHTML;

        ga('send', 'event', 'chat', 'option-selected', gaLabel);

        // the next thing we're doing, is removing the options. For this we don't want distinct delays on transitions anymore. We want it to be the option clicked, that leaves first.
        this.options.querySelector('.a-message--option--primary').classList.remove('a-message--option--primary');
        this.options.querySelector('.a-message--option--secondary').classList.remove('a-message--option--secondary');

        e.currentTarget.removeEventListener(e.type, callee);
        e.currentTarget.classList.remove('a-message--incoming');

        switch (action) {
            case 'continue':
                facade.publish('message:complete', true);
                break;
            case 'navigate:services':
                window.location.href = 'services';
                break;
            case 'navigate:about':
                window.location.href = 'about';
                break;
        }

        facade.publish('messenger:hide-options');
    };

    Messenger.prototype.createMessage = function (message) {
        var messageHTML = '';
        var hasOptions = typeof message.options !== 'undefined';

        messageHTML += '
';

        messageHTML += '<div class="a-message a-message--messenger';

        if (message.isRecipient) {
            messageHTML += ' a-message--recipient';
        } else {
            messageHTML += ' a-message--sender';
        }

        if (message.isCentered) {
            messageHTML += ' a-message--centered';
        }

        if (message.isLarge) {
            messageHTML += ' a-message--large';
        }

        messageHTML += '" data-message="' + message.message + '" data-component="message" data-message-id="' + message.id + '"';

        if (hasOptions) {
            messageHTML += 'data-options="' + message.id + '"';
        }

        if (message.skipLoading) {
            messageHTML += 'data-skiploading="true"';
        }

        messageHTML += '>
';
        messageHTML += '
';

        return messageHTML;
    };

    Messenger.prototype.createOption = function (option) {
        var optionHTML = '';

        optionHTML += '
';
        optionHTML += '
' + option.message + '
';
        optionHTML += '
';

        return optionHTML;
    };

    Messenger.prototype.updateScroll = function (messageId) {
        var message = this.list.querySelector('[data-message-id="' + messageId + '"]');

        message.closest('.m-messenger__line').scrollIntoView(false);
    };

    return Messenger;

});