text:
package org.apereo.cas.support.events.dao;

import org.apereo.cas.support.events.CasEventRepository;
import org.apereo.cas.util.DateTimeUtils;

import lombok.val;

import java.time.ZonedDateTime;
import java.util.Collection;
import java.util.stream.Collectors;

/**
 * This is {@link AbstractCasEventRepository}.
 *
 * @author Misagh Moayyed
 * @since 5.0.0
 */
public abstract class AbstractCasEventRepository implements CasEventRepository {

    /**
     * The constant TYPE_PARAM.
     */
    protected static final String TYPE_PARAM = "type";
    /**
     * The constant CREATION_TIME_PARAM.
     */
    protected static final String CREATION_TIME_PARAM = "creationTime";
    /**
     * The constant PRINCIPAL_ID_PARAM.
     */
    protected static final String PRINCIPAL_ID_PARAM = "principalId";

    @Override
    public Collection<? extends CasEvent> getEventsOfType(final String type) {
        val events = load();
        return events.stream().filter(event -> event.getType().equals(type)).collect(Collectors.toSet());
    }

    @Override
    public Collection<? extends CasEvent> getEventsOfType(final String type, final ZonedDateTime dateTime) {
        return getEventsOfType(type)
            .stream()
            .filter(e -> {
                val dt = convertEventCreationTime(e);
                return dt.isEqual(dt) || dt.isAfter(dt);
            })
            .collect(Collectors.toSet());
    }

    @Override
    public Collection<? extends CasEvent> getEventsOfTypeForPrincipal(final String type, final String principal) {
        return getEventsForPrincipal(principal)
            .stream()
            .filter(event -> event.getType().equals(type))
            .collect(Collectors.toSet());
    }

    @Override
    public Collection<? extends CasEvent> getEventsOfTypeForPrincipal(final String type, final String principal, final ZonedDateTime dateTime) {
        return getEventsOfTypeForPrincipal(type, principal)
            .stream()
            .filter(e -> {
                val dt = convertEventCreationTime(e);
                return dt.isEqual(dateTime) || dt.isAfter(dateTime);
            })
            .collect(Collectors.toSet());
    }

    @Override
    public Collection<? extends CasEvent> load(final ZonedDateTime dateTime) {
        return load()
            .stream()
            .filter(e -> {
                val dt = convertEventCreationTime(e);
                return dt.isEqual(dateTime) || dt.isAfter(dateTime);
            })
            .collect(Collectors.toSet());
    }

    @Override
    public Collection<? extends CasEvent> getEventsForPrincipal(final String id, final ZonedDateTime dateTime) {
        return getEventsForPrincipal(id)
            .stream()
            .filter(e -> {
                val dt = convertEventCreationTime(e);
                return dt.isEqual(dateTime) || dt.isAfter(dateTime);
            })
            .collect(Collectors.toSet());
    }

    @Override
    public Collection<? extends CasEvent> getEventsForPrincipal(final String id) {
        return load()
            .stream()
            .filter(e -> e.getPrincipalId().equalsIgnoreCase(id))
            .collect(Collectors.toSet());
    }

    private static ZonedDateTime convertEventCreationTime(final CasEvent event) {
        return DateTimeUtils.convertToZonedDateTime(event.getCreationTime());
    }

}


text:
(function($) {
    $.fn.ellipsis = function(options) {
        options = $.extend({
            'ellipsis': '...',
            'multilineClass': 'multiline',
            'trimFunction': $.fn.ellipsis.trimToWord
        }, options);

        return this.each(function() {
            var el = $(this);

            if (el.css("overflow") === "hidden") {
                // Clone current background and get content
                var text = el.html(),
                    multiline = el.hasClass(options.multilineClass),
                    t = $(this.cloneNode(true))
                        .hide()
                        .css({
                            'position': 'absolute',
                            'overflow': 'visible'
                        })
                        .width(multiline ? el.width() : 'auto')
                        .height(multiline ? 'auto' : el.height());
                el.after(t);

                // Calculate size of content
                function height() { return t.height() > el.height(); }
                function width() { return t.width() > el.width(); }
                var func = multiline ? height : width;

                // Fit content to panel
                while (text.length > 0 && func()) {
                    text = text.substr(0, text.length - 1);
                    t.html(text + options.ellipsis);
                }

                // Setup content, clean up.
                el.html(options.trimFunction(t.html()));
                t.remove();
            }
        });
    };

    // Trim the text to length (will remove extra spaces etc)
    $.fn.ellipsis.trimToLength = function (text) {
        return $.trim(text);
    };

    // Trim the text that fits to a word boundary.
    $.fn.ellipsis.trimToWord = function (text) {
        return $.trim(text);
    };
})(jQuery);

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Operations</title>
<meta name="date" content="2015-10-30">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

eic.beike.projectx.android.event

Class Operations

java.lang.Object

eic.beike.projectx.android.event.Operations

public class Operations
extends java.lang.Object

Created by Simon on 2015-10-26.
 The Strings is used in GameEventTrigger and GameEventHandler to send Messages between
 the GameModel and GameActivity

Field Summary

Fields

Modifier and Type
Field and Description

protected static java.lang.String
DESELECTBUTTON

protected static java.lang.String
ENDROUND

protected static java.lang.String
EXCEPTION

protected static java.lang.String
OPERATION

protected static java.lang.String
SELECTBUTTON

protected static java.lang.String
SWAPBUTTON

protected static java.lang.String
UPDATEBOARD

protected static java.lang.String
UPDATEFACTOR

protected static java.lang.String
UPDATESCORE

Constructor Summary

Constructors

Constructor and Description

Operations()

Method Summary

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

OPERATION

protected static final java.lang.String OPERATION

See Also:

Constant Field Values

UPDATESCORE

protected static final java.lang.String UPDATESCORE

See Also:

Constant Field Values

UPDATEFACTOR

protected static final java.lang.String UPDATEFACTOR

See Also:

Constant Field Values

UPDATEBOARD

protected static final java.lang.String UPDATEBOARD

See Also:

Constant Field Values

SELECTBUTTON

protected static final java.lang.String SELECTBUTTON

See Also:

Constant Field Values

DESELECTBUTTON

protected static final java.lang.String DESELECTBUTTON

See Also:

Constant Field Values

SWAPBUTTON

protected static final java.lang.String SWAPBUTTON

See Also:

Constant Field Values

ENDROUND

protected static final java.lang.String ENDROUND

See Also:

Constant Field Values

EXCEPTION

protected static final java.lang.String EXCEPTION

See Also:

Constant Field Values

Constructor Detail

Operations

public Operations()

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
require 'spec_helper_acceptance'

describe 'ghost_blog class' do

  context 'default parameters' do
    # Using puppet_apply as a helper
    it 'should work idempotently with no errors' do
      pp = <<-EOS
      class { 'ghost_blog_profile::basic': }
      EOS

      # Run it twice and test for errors
      apply_manifest(pp, :catch_failures => true)
      apply_manifest(pp, :catch_failures  => true)

      # Takes a little time for Node to startup
      sleep(30)
    end

    describe file('/home/ghost/my_blog') do
      it { should be_directory }
    end

    describe command('ls -al /home/ghost/my_blog') do
      its(:stdout) { should match /README.md/ }
    end

    it 'should start ghost' do
      shell('curl localhost:80/') do |curl|
        expect(curl.stdout).to include 'Moved Permanently. Redirecting to https://my-ghost-blog.com/'
      end
    end
  end
end


text:
define(function (require, exports) {
    "use strict";

    var PlayObject = require("../playObject");

    /**
     * _ref object for the generator status property
     *
     * @private
     * @type {object}
     */
    var _generatorStatusRef = {
        _ref: [
            { _ref: "property", _property: "generatorStatus" },
            { _ref: "application", _enum: "ordinal", _value: "targetEnum" }
        ]
    };

    /**
     * _ref object for the generator "pluginPicker" property
     *
     * @private
     * @type {object}
     */
    var _pluginPickerRef = {
        _ref: [
            { _ref: "property", _property: "pluginPicker" },
            { _ref: "application", _enum: "ordinal", _value: "targetEnum" }
        ]
    };

    /**
     * Build a PlayObject that will query the current status of Generator
     *
     * The resolved response can be tested for an "enabled" status as:
     * `status.generatorStatus.generatorStatus === 1`
     *
     * @return {PlayObject}
     */
    var getGeneratorStatus = function () {
        var desc = {
            "null": _generatorStatusRef
        };
        return new PlayObject("get", desc);
    };

    /**
     * Build a play object that will attempt to set generator to enabled/disabled
     *
     * @param {boolean} desiredStatus If truthy, enabled generator. Otherwise disable generator.
     * @return {PlayObject}
     */
    var setGeneratorStatus = function (desiredStatus) {
        var desc = {
            null: _pluginPickerRef,
            to: {
                _obj: "pluginPicker",
                _value: {
                    generatorEnabled: desiredStatus
                }
            }
        };

        return new PlayObject("set", desc);
    };

    exports.getGeneratorStatus = getGeneratorStatus;
    exports.setGeneratorStatus = setGeneratorStatus;
});


text:
<?php

/**
 * @see Zend_config
 */
#require_once 'Zend/Config.php';
/**
 * @see Zend_Filter
 */
#require_once 'Zend/Filter.php';
/**
 * @see Zend_Markup_Renderer_TokenConverterInterface
 */
#require_once 'Zend/Markup/Renderer/TokenConverterInterface.php';

/**
 * Defines the basic rendering functionality
 *
 * @category   Zend
 * @package    Zend_Markup
 * @subpackage Renderer
 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
abstract class Zend_Markup_Renderer_RendererAbstract
{
    const TYPE_CALLBACK = 4;
    const TYPE_REPLACE  = 8;
    const TYPE_ALIAS    = 16;

    /**
     * Tag info
     *
     * @var array
     */
    protected $_markups = array();

    /**
     * Parser
     *
     * @var Zend_Markup_Parser_ParserInterface
     */
    protected $_parser;

    /**
     * What filter to use
     *
     * @var bool
     */
    protected $_filter;

    /**
     * Filter chain
     *
     * @var Zend_Filter
     */
    protected $_defaultFilter;

    /**
     * The current group
     *
     * @var string
     */
    protected $_group;

    /**
     * Groups definition
     *
     * @var array
     */
    protected $_groups = array();

    /**
     * Plugin loader for tags
     *
     * @var Zend_Loader_PluginLoader
     */
    protected $_pluginLoader;

    /**
     * The current token
     *
     * @var Zend_Markup_Token
     */
    protected $_token;

    /**
     * Encoding
     *
     * @var string
     */
    protected static $_encoding = 'UTF-8';

    /**
     * Constructor
     *
     * @param array|Zend_Config $options
     *
     * @return void
     */
    public function __construct($options = array())
    {
        if ($options instanceof Zend_Config) {
            $options = $options->toArray();
        }

        if (isset($options['encoding'])) {
            $this->setEncoding($options['encoding']);
        }
        if (isset($options['parser'])) {
            $this->setParser($options['parser']);
        }
        if (!isset($options['useDefaultFilters']) || ($options['useDefaultFilters'] === true)) {
            $this->addDefaultFilters();
        }
        if (isset($options['defaultFilter'])) {
            $this->addDefaultFilter($options['defaultFilter']);
        }
    }

    /**
     * Set the parser
     *
     * @param  Zend_Markup_Parser_ParserInterface $parser
     * @return Zend_Markup_Renderer_RendererAbstract
     */
    public function setParser(Zend_Markup_Parser_ParserInterface $parser)
    {
        $this->_parser = $parser;
        return $this;
    }

    /**
     * Get the parser
     *
     * @return Zend_Markup_Parser_ParserInterface
     */
    public function getParser()
    {
        return $this->_parser;
    }

    /**
     * Get the plugin loader
     *
     * @return Zend_Loader_PluginLoader
     */
    public function getPluginLoader()
    {
        return $this->_pluginLoader;
    }

    /**
     * Set the renderer's encoding
     *
     * @param string $encoding
     *
     * @return void
     */
    public static function setEncoding($encoding)
    {
        self::$_encoding = $encoding;
    }

    /**
     * Get the renderer's encoding
     *
     * @return string
     */
    public static function getEncoding()
    {
        return self::$_encoding;
    }

    /**
     * Add a new markup
     *
     * @param string $name
     * @param string $type
     * @param array $options
     *
     * @return Zend_Markup_Renderer_RendererAbstract
     */
    public function addMarkup($name, $type, array $options)
    {
        if (!isset($options['group']) && ($type ^ self::TYPE_ALIAS)) {
            #require_once 'Zend/Markup/Renderer/Exception.php';
            throw new Zend_Markup_Renderer_Exception("There is no render group defined.");
        }

        // add the filter
        if (isset($options['filter'])) {
            if ($options['filter'] instanceof Zend_Filter_Interface) {
                $filter = $options['filter'];
            } elseif ($options['filter'] === true) {
                $filter = $this->getDefaultFilter();
            } else {
                $filter = false;
            }
        } else {
            $filter = $this->getDefaultFilter();
        }

        // check the type
        if ($type & self::TYPE_CALLBACK) {
            // add a callback tag
            if (isset($options['callback'])) {
                if (!($options['callback'] instanceof Zend_Markup_Renderer_TokenConverterInterface)) {
                    #require_once 'Zend/Markup/Renderer/Exception.php';
                    throw new Zend_Markup_Renderer_Exception("Not a valid tag callback.");
                }
                if (method_exists($options['callback'], 'setRenderer')) {
                    $options['callback']->setRenderer($this);
                }
            } else {
                $options['callback'] = null;
            }

            $options['type'] = $type;
            $options['filter'] = $filter;

            $this->_markups[$name] = $options;
        } elseif ($type & self::TYPE_ALIAS) {
            // add an alias
            if (empty($options['name'])) {
                #require_once 'Zend/Markup/Renderer/Exception.php';
                throw new Zend_Markup_Renderer_Exception(
                        'No alias was provided but tag was defined as such');
            }

            $this->_markups[$name] = array(
                'type' => self::TYPE_ALIAS,
                'name' => $options['name']
            );
        } else {
            if ($type && array_key_exists('empty', $options) && $options['empty']) {
                // add a single replace markup
                $options['type']   = $type;
                $options['filter'] = $filter;

                $this->_markups[$name] = $options;
            } else {
                // add a replace markup
                $options['type']   = $type;
                $options['filter'] = $filter;

                $this->_markups[$name] = $options;
            }
        }
        return $this;
    }

    /**
     * Remove a markup
     *
     * @param string $name
     *
     * @return void
     */
    public function removeMarkup($name)
    {
        unset($this->_markups[$name]);
    }

    /**
     * Remove the default tags
     *
     * @return void
     */
    public function clearMarkups()
    {
        $this->_markups = array();
    }

    /**
     * Render function
     *
     * @param  Zend_Markup_TokenList|string $tokenList
     * @return string
     */
    public function render($value)
    {
        if ($value instanceof Zend_Markup_TokenList) {
            $tokenList = $value;
        } else {
            $tokenList = $this->getParser()->parse($value);
        }

        $root = $tokenList->current();

        $this->_filter = $this->getDefaultFilter();

        return $this->_render($root);
    }

    /**
     * Render a single token
     *
     * @param  Zend_Markup_Token $token
     * @return string
     */
    protected function _render(Zend_Markup_Token $token)
    {
        $return    = '';

        $this->_token = $token;

        // if this tag has children, execute them
        if ($token->hasChildren()) {
            foreach ($token->getChildren() as $child) {
                $return .= $this->_execute($child);
            }
        }

        return $return;
    }

    /**
     * Get the group of a token
     *
     * @param  Zend_Markup_Token $token
     * @return string|bool
     */
    protected function _getGroup(Zend_Markup_Token $token)
    {
        if (!isset($this->_markups[$token->getName()])) {
            return false;
        }

        $tag = $this->_markups[$token->getName()];

        // alias processing
        while ($tag['type'] & self::TYPE_ALIAS) {
            $tag = $this->_markups[$tag['name']];
        }

        return isset($tag['group']) ? $tag['group'] : false;
    }

    /**
     * Execute the token
     *
     * @param  Zend_Markup_Token $token
     * @return string
     */
    protected function _execute(Zend_Markup_Token $token)
    {
        // first return the normal text tags
        if ($token->getType() == Zend_Markup_Token::TYPE_NONE) {
            return $this->_filter($token->getTag());
        }

        // if the token doesn't have a notation, return the plain text
        if (!isset($this->_markups[$token->getName()])) {
            $oldToken  = $this->_token;
            $return = $this->_filter($token->getTag()) . $this->_render($token) . $token->getStopper();
            $this->_token = $oldToken;
            return $return;
        }

        $name   = $this->_getMarkupName($token);
        $markup = (!$name) ? false : $this->_markups[$name];
        $empty  = (is_array($markup) && array_key_exists('empty', $markup) && $markup['empty']);

        // check if the tag has content
        if (!$empty && !$token->hasChildren()) {
            return '';
        }

        // check for the context
        if (is_array($markup) && !in_array($markup['group'], $this->_groups[$this->_group])) {
            $oldToken = $this->_token;
            $return   = $this->_filter($token->getTag()) . $this->_render($token) . $token->getStopper();
            $this->_token = $oldToken;
            return $return;
        }

        // check for the filter
        if (!isset($markup['filter'])
            || (!($markup['filter'] instanceof Zend_Filter_Interface) && ($markup['filter'] !== false))) {
            $this->_markups[$name]['filter'] = $this->getDefaultFilter();
        }

        // save old values to reset them after the work is done
        $oldFilter = $this->_filter;
        $oldGroup  = $this->_group;

        $return = '';

        // set the filter and the group
        $this->_filter = $this->getFilter($name);

        if ($group = $this->_getGroup($token)) {
            $this->_group = $group;
        }

        // callback
        if (is_array($markup) && ($markup['type'] & self::TYPE_CALLBACK)) {
            // load the callback if the tag doesn't exist
            if (!($markup['callback'] instanceof Zend_Markup_Renderer_TokenConverterInterface)) {
                $class = $this->getPluginLoader()->load($name);

                $markup['callback'] = new $class;

                if (!($markup['callback'] instanceof Zend_Markup_Renderer_TokenConverterInterface)) {
                    #require_once 'Zend/Markup/Renderer/Exception.php';
                    throw new Zend_Markup_Renderer_Exception("Callback for tag '$name' found, but it isn't valid.");
                }

                if (method_exists($markup['callback'], 'setRenderer')) {
                    $markup['callback']->setRenderer($this);
                }
            }
            if ($markup['type'] && !$empty) {
                $return = $markup['callback']->convert($token, $this->_render($token));
            } else {
                $return = $markup['callback']->convert($token, null);
            }
        } else {
            // replace
            if ($markup['type'] && !$empty) {
                $return = $this->_executeReplace($token, $markup);
            } else {
                $return = $this->_executeSingleReplace($token, $markup);
            }
        }

        // reset to the old values
        $this->_filter = $oldFilter;
        $this->_group  = $oldGroup;

        return $return;
    }

    /**
     * Filter method
     *
     * @param string $value
     *
     * @return string
     */
    protected function _filter($value)
    {
        if ($this->_filter instanceof Zend_Filter_Interface) {
            return $this->_filter->filter($value);
        }
        return $value;
    }

    /**
     * Get the markup name
     *
     * @param Zend_Markup_Token
     *
     * @return string
     */
    protected function _getMarkupName(Zend_Markup_Token $token)
    {
        $name = $token->getName();
        if (empty($name)) {
            return false;
        }

        return $this->_resolveMarkupName($name);
    }

    /**
     * Resolve aliases for a markup name
     *
     * @param string $name
     *
     * @return string
     */
    protected function _resolveMarkupName($name)
    {
        while (($type = $this->_getMarkupType($name))
               && ($type & self::TYPE_ALIAS)
        ) {
            $name = $this->_markups[$name]['name'];
        }

        return $name;
    }

    /**
     * Retrieve markup type
     *
     * @param  string $name
     * @return false|int
     */
    protected function _getMarkupType($name)
    {
        if (!isset($this->_markups[$name])) {
            return false;
        }
        if (!isset($this->_markups[$name]['type'])) {
            return false;
        }
        return $this->_markups[$name]['type'];
    }

    /**
     * Execute a replace token
     *
     * @param  Zend_Markup_Token $token
     * @param  array $tag
     * @return string
     */
    protected function _executeReplace(Zend_Markup_Token $token, $tag)
    {
        return $tag['start'] . $this->_render($token) . $tag['end'];
    }

    /**
     * Execute a single replace token
     *
     * @param  Zend_Markup_Token $token
     * @param  array $tag
     * @return string
     */
    protected function _executeSingleReplace(Zend_Markup_Token $token, $tag)
    {
        return $tag['replace'];
    }

    /**
     * Get the default filter
     *
     * @return void
     */
    public function getDefaultFilter()
    {
        if (null === $this->_defaultFilter) {
            $this->addDefaultFilters();
        }

        return $this->_defaultFilter;
    }

    /**
     * Add a default filter
     *
     * @param string $filter
     *
     * @return void
     */
    public function addDefaultFilter(Zend_Filter_Interface $filter, $placement = Zend_Filter::CHAIN_APPEND)
    {
        if (!($this->_defaultFilter instanceof Zend_Filter)) {
            $defaultFilter = new Zend_Filter();
            $defaultFilter->addFilter($filter);
            $this->_defaultFilter = $defaultFilter;
        }

        $this->_defaultFilter->addFilter($filter, $placement);
    }

    /**
     * Set the default filter
     *
     * @param Zend_Filter_Interface $filter
     *
     * @return void
     */
    public function setDefaultFilter(Zend_Filter_Interface $filter)
    {
        $this->_defaultFilter = $filter;
    }

    /**
     * Get the filter for an existing markup
     *
     * @param string $markup
     *
     * @return Zend_Filter_Interface
     */
    public function getFilter($markup)
    {
        $markup = $this->_resolveMarkupName($markup);

        if (!isset($this->_markups[$markup]['filter'])
            || !($this->_markups[$markup]['filter'] instanceof Zend_Filter_Interface)
        ) {
            if (isset($this->_markups[$markup]['filter']) && $this->_markups[$markup]['filter']) {
                $this->_markups[$markup]['filter'] = $this->getDefaultFilter();
            } else {
                return false;
            }
        }

        return $this->_markups[$markup]['filter'];
    }

    /**
     * Add a filter for an existing markup
     *
     * @param Zend_Filter_Interface $filter
     * @param string $markup
     * @param string $placement
     *
     * @return Zend_Markup_Renderer_RendererAbstract
     */
    public function addFilter(Zend_Filter_Interface $filter, $markup, $placement = Zend_Filter::CHAIN_APPEND)
    {
        $markup = $this->_resolveMarkupName($markup);

        $oldFilter = $this->getFilter($markup);

        // if this filter is the default filter, clone it first
        if ($oldFilter === $this->getDefaultFilter()) {
            $oldFilter = clone $oldFilter;
        }

        if (!($oldFilter instanceof Zend_Filter)) {
            $this->_markups[$markup]['filter'] = new Zend_Filter();

            if ($oldFilter instanceof Zend_Filter_Interface) {
                $this->_markups[$markup]['filter']->addFilter($oldFilter);
            }
        } else {
            $this->_markups[$markup]['filter'] = $oldFilter;
        }

        $this->_markups[$markup]['filter']->addFilter($filter, $placement);

        return $this;
    }

    /**
     * Set the filter for an existing
     *
     * @param Zend_Filter_Interface $filter
     * @param string $markup
     *
     * @return Zend_Markup_Renderer_RendererAbstract
     */
    public function setFilter(Zend_Filter_Interface $filter, $markup)
    {
        $markup = $this->_resolveMarkupName($markup);

        $this->_markups[$markup]['filter'] = $filter;

        return $this;
    }

    /**
     * Add a render group
     *
     * @param string $name
     * @param array $allowedInside
     * @param array $allowsInside
     *
     * @return void
     */
    public function addGroup($name, array $allowedInside = array(), array $allowsInside = array())
    {
        $this->_groups[$name] = $allowsInside;

        foreach ($allowedInside as $group) {
            $this->_groups[$group][] = $name;
        }
    }

    /**
     * Get group definitions
     *
     * @return array
     */
    public function getGroups()
    {
        return $this->_groups;
    }

    /**
     * Set the default filters
     *
     * @return void
     */
    abstract public function addDefaultFilters();

}


text:
class QComboBox;
class QDoubleSpinBox;
class QCheckBox;

class interval_ui : public possumwood::properties::property<possumwood::maths::Interval, interval_ui> {
  public:
	interval_ui();
	virtual ~interval_ui();

	virtual void get(possumwood::maths::Interval& value) const override;
	virtual void set(const possumwood::maths::Interval& value) override;

	virtual QWidget* widget() override;

  protected:
	virtual void onFlagsChanged(unsigned flags) override;

  private:
	QWidget* m_widget;
	QSlider* m_slider;
	QToolButton* m_detailsButton;

	possumwood::maths::Interval m_value;

	QMetaObject::Connection m_sliderConnection, m_buttonConnection;
};

class IntervalDialog : public QDialog {
	Q_OBJECT

  public:
	IntervalDialog(QWidget* parent, const possumwood::maths::Interval& current);

	// updates the interval value to match options set up by the user
	void updateInterval(possumwood::maths::Interval& i);

  private:
	QComboBox* m_type;
	QDoubleSpinBox* m_min;
	QDoubleSpinBox* m_max;
	QCheckBox* m_update;
};


text:
mkdir -p "$PREFIX/bin"
export MACHTYPE=x86_64
export BINDIR=$(pwd)/bin
export L="${LDFLAGS}"
mkdir -p "$BINDIR"
(cd kent/src/lib && make)
(cd kent/src/htslib && make)
(cd kent/src/jkOwnLib && make)
(cd kent/src/hg/lib && make)
(cd kent/src/utils/tickToDate && make)
cp bin/tickToDate "$PREFIX/bin"
chmod +x "$PREFIX/bin/tickToDate"


text:
using System.IO;
using System.Xml.Linq;

namespace Casimodo.Mojen
{
    /// <summary>
    /// Generates ASP.NET Web API OData controllers.
    /// </summary>
    [Obsolete]
    public class ODataControllerGen : WebPartGenerator
    {
        public ODataControllerGen()
        {
            throw new Exception();
            Scope = "App";
        }

        WebODataBuildConfig ODataConfig { get; set; }

        ODataControllerOptions Options { get; set; }

        MojControllerConfig Controller { get; set; }

        public MojType Type { get; set; }

        public Func<string, string> GetDbContextSaveChangesExpression { get; set; }
            = db => $"await {db}.SaveChangesAsync()";

        public override void ProcessOnUse(object usedBy)
        {
            // NOP
        }

        protected override void GenerateCore()
        {
            ODataConfig = App.Get<WebODataBuildConfig>();

            var controllers = App.GetItems<MojControllerConfig>().Where(x => x.Uses(this)).ToArray();

            foreach (var controller in controllers)
            {
                Controller = controller;
                Type = controller.TypeConfig.RequiredStore;

                string controllerFilePath = Path.Combine(
                    ODataConfig.WebODataControllerDirPath,
                    this.GetODataControllerName(controller.TypeConfig) + ".generated.cs");

                PerformWrite(controllerFilePath, () => GenerateController());
            }
        }

        void GenerateController()
        {
            Options = Controller.GetGeneratorConfig<ODataControllerOptions>() ?? new ODataControllerOptions();

            var key = Type.Key;

            var dataContext = App.GetDataLayerConfig(Type.DataContextName);

            OUsing(
                "System",
                "System.Linq",
                "System.Collections.Generic",
                "System.Threading",
                "System.Threading.Tasks",
                "System.Net",
                //"System.Net.Http",
                "System.Web.Http",
                "System.Web.Http.Controllers",
                "Microsoft.AspNet.OData",
                "Microsoft.AspNet.OData.Query",
                "Microsoft.AspNet.OData.Routing",
                //"AutoMapper",
                //"AutoMapper.QueryableExtensions",
                "System.Data",
                //"System.Data.Entity",
                //"System.Data.Entity.Infrastructure",
                //"System.Web",
                //"System.Web.Mvc",
                "Casimodo.Lib",
                "Casimodo.Lib.Data",
                "Casimodo.Lib.Web",
                "Casimodo.Lib.Web.Auth",
                GetAllDataNamespaces()
            );

            ONamespace(ODataConfig.WebODataControllerNamespace);

            foreach (var attr in Controller.Attrs)
            {
                O(BuildAttr(attr));
            }

            O($"[ODataRoutePrefix(\"{Type.PluralName}\")]");
            O($"public partial class {this.GetODataControllerName(Type)} : {ODataConfig.WebODataControllerBaseClass}");
            Begin();

            // EF DB repository
            var repoName = GetWebRepositoryName(Type);
#if (false)

            // KABU TODO: Should we use this one instead?
            O("{0} Db", repoName);
            Begin();
            O("get {{ return LazyInitializer.EnsureInitialized(ref _db, () => new {0}()); }}", repoName);
            End();
#endif

            OFormat("{0} _db = new {0}();", repoName);

            O();
            O("protected override void Initialize(HttpControllerContext controllerContext)");
            Begin();
            O("base.Initialize(controllerContext);");
            O("_db.Request = Request;");
            O("InitializeExtended();");
            End();

            O();
            O("partial void InitializeExtended();");

            if (!Options.IsEmpty)
            {
                GenerateFilters(Type);

                if (Options.IsReadable)
                    GenerateRead(Type, key, Type.Key.VName);

                if (!Options.IsReadOnly)
                {
                    if (Options.IsCreatable)
                        GenerateCreate();

                    if (Options.IsUpdateable)
                    {
                        GenerateUpdate();
                        GeneratePatch();
                    }

                    if (Options.IsDeletable)
                        GenerateDelete();
                }
            }

            // Let other generaors inject further actions.
            foreach (var gen in App.Generators.OfType<IWebApiODataActionInjector>())
                gen.GenerateWebApiODataActionFor(this, Type);

            // Dispose
            O();
            O("protected override void Dispose(bool disposing)");
            Begin();
            O("_db.Dispose();");
            O("base.Dispose(disposing);");
            End();

            O();
            O("const AllowedQueryOptions LookupQueryOptions = AllowedQueryOptions.Expand | AllowedQueryOptions.Select | AllowedQueryOptions.Filter | AllowedQueryOptions.OrderBy | AllowedQueryOptions.Count | AllowedQueryOptions.Skip | AllowedQueryOptions.Top | AllowedQueryOptions.Format;");

            if (Options.UpdateMask)
            {
                foreach (var viewGroup in Controller.GetViewGroups())
                    GenerateUpdateGraphMask(viewGroup);
            }

            End(); // Class
            End(); // Namespace
        }

        // Create ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        void GenerateCreate()
        {
            GenerateCreateMain();

            var actions = new List<string>();
            foreach (var viewGroup in Controller.GetViewGroups().OrderBy(x => x))
            {
                var editorView = Controller.GetEditorView(viewGroup);
                if (editorView == null || editorView.HasNoApi || !editorView.CanCreate
                    || editorView.IsCustomODataCreateAction)
                    continue;

                var action = editorView.GetODataCreateActionName();
                if (actions.Contains(action))
                    continue;

                actions.Add(action);

                GenerateCreateSingle(editorView);
            }
        }

        void GenerateCreateSingle(MojViewConfig editorView)
        {
            if (editorView.Group == null)
                return;

            var action = editorView.GetODataCreateActionName();
            if (action == "Post")
                return;

            O();
            OApiActionAuthAttribute(editorView, "Create");
            O("[HttpPost]");
            O($"public async Task<IHttpActionResult> {action}(ODataActionParameters parameters)");
            Begin();
            O($"return await CreateCore(parameters?.Values?.FirstOrDefault() as {editorView.TypeConfig.Name});");
            End();
        }

        void GenerateCreateMain()
        {
            // No default create method if no editor exists.
            if (Controller.GetEditorView(null) != null)
            {
                O();
                OApiActionAuthAttribute(Type, "Create");
                O("[HttpPost]");
                O("[ODataRoute]");
                O($"public async Task<IHttpActionResult> Post({Type.ClassName} model)");
                Begin();
                O("return await CreateCore(model);");
                End();
            }

            O();
            O($"async Task<IHttpActionResult> CreateCore({Type.ClassName} model)");
            Begin();

            O("if (!ModelState.IsValid) return BadRequest(ModelState);");
            O();

            O("OnCreatingExtended(model);");

            // KABU TODO: MOVE to repository core layer.
            // Apply DB sequences.
            foreach (var prop in Type.GetProps().Where(x => x.DbAnno.Sequence.IsDbSequence))
            {
                O($"model.{prop.Name} = _db.{GetDbSequenceFunction(prop)};");
            }

            O("var item = _db.Add(model);");
            O();
            O($"{GetDbContextSaveChangesExpression("_db")};");
            O();
            O("return Created(item);");

            End();

            O();
            O($"partial void OnCreatingExtended({Type.ClassName} model);");
        }

        // Filters

        void GenerateFilters(MojType type)
        {
            O();
            O($"Func<IQueryable<{type.ClassName}>, IQueryable<{type.ClassName}>> CustomFilter {{ get; set; }} = (query) => query;");
        }

        // Read ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        void GenerateRead(MojType type, MojProp key, string keyName)
        {
            // GET: odata/ControllerName
            // ODataQueryOptions: https://aspnet.codeplex.com/SourceControl/latest#Samples/WebApi/OData/v4/ODataQueryableSample/Controllers/OrdersController.cs
            // var settings = new ODataQuerySettings();
            // settings.HandleNullPropagation = HandleNullPropagationOption.Default;
            // settings.EnableConstantParameterization = true;

            // Default query function.
            O();
            OApiActionAuthAttribute(Type, "View");
            O("[HttpGet]");
            O($"[ODataRoute(\"{ODataConfig.Namespace}.{ODataConfig.Query}()\")]");
            Oo("[EnableQuery(");
            if (Options.MaxPageSize != null)
                o($"PageSize = {Options.MaxPageSize}, ");
            oO($"AllowedQueryOptions = LookupQueryOptions, MaxExpansionDepth = {Options.MaxExpansionDepth})]");
            O($"public System.Web.Http.IHttpActionResult {ODataConfig.Query}()");
            Begin();
            O("return Ok(CustomFilter(_db.Query()));");
            End();

            // Distinct by property query function.
            O();
            OApiActionAuthAttribute(Type, "View");
            O("[HttpGet]");
            O($"[ODataRoute(\"{ODataConfig.Namespace}.{ODataConfig.QueryDistinct}(on={{on}})\")]");
            O("[EnableQuery]");
            O($"public System.Web.Http.IHttpActionResult {ODataConfig.QueryDistinct}(string on)");
            Begin();
            O($"return Ok(CustomFilter(_db.Query()).GroupBy(ExpressionHelper.GetGroupKey<{type.ClassName}>(on.Trim('\\''))).Select(g => g.FirstOrDefault()));");
            End();

            O();
            OApiActionAuthAttribute(Type, "View");
            O("[HttpGet]");
            O("[ODataRoute]");
            OFormat("public async Task<IEnumerable<{0}>> Get(ODataQueryOptions<{0}> query)", type.ClassName);
            Begin();
            O("return await _db.SelectAsync(query);");
            End();

            // KABU TODO: IMPORTANT: Should this return null if not found? Currently a not found exception is thrown.
            // GET: odata/ControllerName(x)
            O();
            OApiActionAuthAttribute(Type, "View");
            O("[HttpGet]");
            O($"[ODataRoute(\"({{{keyName}}})\"), EnableQuery]");
            O($"public SingleResult<{type.ClassName}> Get([FromODataUri] {key.Type.Name} {keyName})");
            Begin();
            O($"return SingleResult.Create(_db.Get({keyName}).ToQueryable());");
            End();
        }

        void GenerateUpdateGraphMask(string group)
        {
            var editorView = Controller.GetEditorView(group);
            if (editorView == null)
                return;

            if (editorView.IsCustomODataUpdateData)
                return;

            O();
            Oo($"static readonly MojDataGraphMask {GetUpdateMaskMemberName(editorView)} = MojDataGraphMask.ParseXml(@\"");

            // Build the XML of the graph mask.
            o(Controller.BuildDataGraphMaskForUpdate(group).ToString(SaveOptions.DisableFormatting).Replace("\"", "'"));

            oO("\");");
        }

        string GetUpdateMaskMemberName(MojViewConfig view)
        {
            return $"Update{view.Group ?? ""}GraphMask";
        }

        // Update ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        void GenerateUpdate()
        {
            GenerateUpdateSingleMain();

            foreach (var viewGroup in Controller.GetViewGroups())
                GenerateUpdateSingle(viewGroup);
        }

        void GenerateUpdateSingle(string group)
        {
            var editorView = Controller.GetEditorView(group);
            if (editorView == null || editorView.HasNoApi || !editorView.CanModify
                || editorView.IsCustomODataUpdateAction)
                return;

            if (editorView.IsCustomODataUpdateAction)
                return;

            var key = Type.Key;

            var action = editorView.GetODataUpdateActionName();

            var mask = GetUpdateMaskMemberName(editorView);

            O();
            if (group != null)
            {
                // NOTE: For updates, grouped views will use OData *actions* (POST) rather than the default PUT method.
                // POST: odata/ControllerName(x)/Ns.MethodName
                // Async
                OApiActionAuthAttribute(editorView, "Modify");
                O("[HttpPost]");
                // NOTE: The ID parameter *must* be named "key" by convention.
                // Otherwise the action won't be found by the OData Web API machinery.
                O($"public async Task<IHttpActionResult> {action}([FromODataUri] {key.Type.Name} key, ODataActionParameters parameters)");
                Begin();
                O($"return await UpdateCore(key, parameters?.Values?.FirstOrDefault() as {Type.ClassName}, {mask}, \"{group}\");");
                End();
            }
            else
            {
                // PUT: odata/ControllerName(x)
                // Async
                OApiActionAuthAttribute(editorView, "Modify");
                O("[HttpPut]");
                O($"[ODataRoute(\"({{{key.VName}}})\")]");
                O($"public async Task<IHttpActionResult> {action}([FromODataUri] {key.Type.Name} {key.VName}, {Type.ClassName} model)");
                Begin();
                O($"return await UpdateCore({key.VName}, model, {mask});");
                End();
            }
        }

        void GenerateUpdateSingleMain()
        {
            var key = Type.Key;

            O();
            O($"async Task<IHttpActionResult> UpdateCore([FromODataUri] {key.Type.Name} {key.VName}, {Type.ClassName} model, MojDataGraphMask mask, string group = null)");
            Begin();

            O("if (!ModelState.IsValid) return BadRequest(ModelState);");

            // TODO: REMOVE: O("OnUpdatingExtended(model, group);");

            // Update the item.
            O($"var item = _db.Update({key.VName}, model, mask);");

            O("OnUpdatedExtended(item, group);");

            // Save to DB
            O($"{GetDbContextSaveChangesExpression("_db")};");
            O();
            O("return Updated(item);");
            End();

            O();
            // TODO: REMOVE: O($"partial void OnUpdatingExtended({Type.ClassName} model, string group);");
            O($"partial void OnUpdatedExtended({Type.ClassName} model, string group);");
        }

        // Patch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        void GeneratePatch()
        {
            // KABU TODO: REVISIT: Currently disabled.
            // PATCH, MERGE: odata/ControllerName(x)
            // Async, delta
            if (false)
            {
#pragma warning disable 0162
                var key = Type.Key;

                O();
                O("[AcceptVerbs(\"PATCH\", \"MERGE\")]");
                O($"[ODataRoute(\"({{{key.VName}}})\"), System.Web.Http.AcceptVerbs(\"PATCH\", \"MERGE\")]");
                O($"public async Task<IHttpActionResult> Patch([FromODataUri] {key.Type.Name} {key.VName}, Delta<{Type.ClassName}> delta, CancellationToken cancellationToken)");
                Begin();
                O("Validate(delta.GetEntity());");
                O("if (!ModelState.IsValid) return BadRequest(ModelState);");
                O($"return Updated(await _db.PatchAsync({key.VName}, delta, save: true, token: cancellationToken));");
                End();
#pragma warning restore 0162
            }
        }

        // Delete ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        void GenerateDelete()
        {
            var key = Type.Key;

            // DELETE: odata/ControllerName(x)
            // Async
            O();
            OApiActionAuthAttribute(Type, "Delete");
            O("[HttpDelete]");
            O($"[ODataRoute(\"({{{key.VName}}})\")]");
            O($"public async Task<IHttpActionResult> Delete([FromODataUri] {key.Type.Name} {key.VName})");
            Begin();
            O();
            // Operate on the entity repository (i.e. not the model repository).
            var repository = Type.Kind == MojTypeKind.Model ? "_db.Entities" : "_db";
            O($"var item = {repository}.Get({key.VName});");
            O();

            if (Type.IsHardDeleteEnabled || ODataConfig.IsPhysicalDeletionEnabled)
            {
                GeneratePhysicalDelete();
            }
            else
            {
                GenerateSoftDelete();
            }

            O();
            O($"{GetDbContextSaveChangesExpression(repository)};");
            O();
            O("return StatusCode(HttpStatusCode.NoContent);");
            End();
        }

        void GenerateSoftDelete()
        {
            // Set IsSelfDeleted to true.
            O("// Mark as deleted");
            O($"item.{Type.FindDeletedMarker(MojPropDeletedMarker.Self).Name} = true;");

            var repository = Type.Kind == MojTypeKind.Model ? "_db.Entities" : "_db";
            O($"{repository}.Update(item);");
        }

        void GeneratePhysicalDelete()
        {
            O("// Delete physically");
            var repository = Type.Kind == MojTypeKind.Model ? "_db.Entities" : "_db";
            O($"{repository}.Delete(item, isPhysicalDeletionAuthorized: true);");
        }

        public void OApiActionAuthAttribute(MojViewConfig view, string action)
        {
            O($"[ApiActionAuth(Part = \"{view.TypeConfig.Name}\", Group = {Moj.CS(view.Group)}, Action = \"{action}\")]");
        }

        public void OApiActionAuthAttribute(MojType type, string action)
        {
            O($"[ApiActionAuth(Part = \"{type.Name}\", Action = \"{action}\")]");
        }
    }
}


text:
package org.batfish.representation.vyos;

import java.io.Serializable;
import org.batfish.datamodel.Ip;

public class BgpNeighbor implements Serializable {

  private String _exportRouteMap;

  private String _importRouteMap;

  private boolean _nextHopSelf;

  private int _remoteAs;

  private final Ip _remoteIp;

  public BgpNeighbor(Ip neighborIp) {
    _remoteIp = neighborIp;
  }

  public String getExportRouteMap() {
    return _exportRouteMap;
  }

  public String getImportRouteMap() {
    return _importRouteMap;
  }

  public boolean getNextHopSelf() {
    return _nextHopSelf;
  }

  public int getRemoteAs() {
    return _remoteAs;
  }

  public Ip getRemoteIp() {
    return _remoteIp;
  }

  public void setExportRouteMap(String exportRouteMap) {
    _exportRouteMap = exportRouteMap;
  }

  public void setImportRouteMap(String importRouteMap) {
    _importRouteMap = importRouteMap;
  }

  public void setNextHopSelf(boolean nextHopSelf) {
    _nextHopSelf = nextHopSelf;
  }

  public void setRemoteAs(int remoteAs) {
    _remoteAs = remoteAs;
  }
}


text:
package de.tkuhn.util.prefs.gui;

import java.util.Collection;
import java.util.prefs.Preferences;

import javax.swing.Action;
import javax.swing.JPanel;
import javax.swing.JToolBar;
import javax.swing.tree.TreeSelectionModel;

import de.tkuhn.swing.actions.ActionUtils;
import de.tkuhn.util.prefs.gui.event.PrefSelectionEvent;
import de.tkuhn.util.prefs.gui.event.PrefSelectionListener;
import de.tkuhn.util.prefs.gui.event.PrefSelectionSupport;

/**
 * A tree panel that renders the preferences node tree holding the preferences
 * to be edited. In the non-basic mode it also provides controls to remove and
 * add nodes.
 *
 * @author Tilmann Kuhn
 */
public class PrefTreePanel extends JPanel {

	private static final long serialVersionUID = 1L;

	/** Support for propagating PrefSelectionEvents */
	private PrefSelectionSupport prefSelSup = new PrefSelectionSupport();

	/** Model for the tree view */
	private PrefTreeModel treeModel = null;
	/** Preferences root node for the tree view */
	private Preferences root = null;
	/** May Preferences be modified? */
	private boolean modifyMode = false;
	/** Use Resource names for nodes */
	private boolean useResNames = true;

	/** Additional Resource names for nodes */
	// private boolean addResNames = false;

	/** Creates new form PrefTreePanel */
	public PrefTreePanel() {
		initComponents();

		prefTree.getSelectionModel().setSelectionMode(
				TreeSelectionModel.SINGLE_TREE_SELECTION);
	}

	/**
	 * Set the mode this tree is operating in. Supported Modes are those defined
	 * in PrefEditor.
	 *
	 * @param mode
	 *            the mode to be used.
	 */
	public void setMode(int mode) {

		if (treeModel != null)
			throw new IllegalStateException("Must set mode before root node!");

		switch (mode) {
		// these allow modification
		case PrefEditorPanel.META_ADMIN:
		case PrefEditorPanel.BASIC_ADMIN:
			modifyMode = true;
			break;
		case PrefEditorPanel.BASIC_DEVELOPER:
		case PrefEditorPanel.META_DEVELOPER:
			useResNames = false;
			modifyMode = true;
			break;

		// these don't allow modification
		case PrefEditorPanel.META_DEFAULT:
		case PrefEditorPanel.META_ALLOW_DELETE:
		case PrefEditorPanel.BASIC_DEFAULT:
		case PrefEditorPanel.BASIC_ALLOW_DELETE:
			modifyMode = false;
			break;
		default:
			throw new IllegalArgumentException("No legal mode key given!");
		}
	}

	/**
	 * Set the root of the Preferences tree to be displayed.
	 *
	 * @param prefs
	 *            the new root node of the tree.
	 */
	public void setRoot(Preferences prefs) {
		if (prefs != root && prefs != null) {

			// Create a new Model if we don't have one.
			if (treeModel == null) {
				treeModel = new PrefTreeModel(prefs, modifyMode);
				prefTree.setCellRenderer(new PrefTreeCellRenderer(useResNames));

				Collection<Action> actions = treeModel.getActions();

				// Register the TreeModels Actions' Keys at the tree.
				ActionUtils.registerAllKeys(prefTree, actions);

				// and the Actions at a Toolbar
				add(ActionUtils.addAll(new JToolBar(), actions),
						java.awt.BorderLayout.SOUTH);

				// Set the model for the tree
				prefTree.setModel(treeModel);
			} else {
				treeModel.setPrefs(prefs);
			}

			root = prefs;

		}
	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	private void initComponents() {// GEN-BEGIN:initComponents
		jScrollPane = new javax.swing.JScrollPane();
		prefTree = new javax.swing.JTree();

		setLayout(new java.awt.BorderLayout());

		prefTree.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
			public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
				prefTreeValueChanged(evt);
			}
		});

		jScrollPane.setViewportView(prefTree);

		add(jScrollPane, java.awt.BorderLayout.CENTER);

	}// GEN-END:initComponents

	private void prefTreeValueChanged(javax.swing.event.TreeSelectionEvent evt) {// GEN-FIRST:event_prefTreeValueChanged
		prefSelSup.valueChanged(new PrefSelectionEvent(evt, (Preferences) evt
				.getPath().getLastPathComponent()));
	}// GEN-LAST:event_prefTreeValueChanged

	/**
	 * Adds a PrefSelectionListener to the list of listeners. These are informed
	 * if the selection of Preferences nodes in the tree changes.
	 *
	 * @param psl
	 *            the PrefSelectionListener to be added
	 */
	public void addPrefSelectionListener(PrefSelectionListener psl) {
		prefSelSup.addPrefSelectionListener(psl);
	}

	/**
	 * Remove a previously registered PrefSelectionListener.
	 *
	 * @param psl
	 *            the PrefSelectionListener to be released.
	 */
	public void removePrefSelectionListener(PrefSelectionListener psl) {
		prefSelSup.removePrefSelectionListener(psl);
	}

	// Variables declaration - do not modify//GEN-BEGIN:variables
	private javax.swing.JTree prefTree;
	private javax.swing.JScrollPane jScrollPane;
	// End of variables declaration//GEN-END:variables

}


text:
{
  var enumerator = this;
  enumerator._instanceConstructor = Constructor;
  enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop);

  if (enumerator._validateInput(input)) {
    enumerator._input = input;
    enumerator.length = input.length;
    enumerator._remaining = input.length;

    enumerator._init();

    if (enumerator.length === 0) {
      lib$es6$promise$$internal$$fulfill(
        enumerator.promise,
        enumerator._result
      );
    } else {
      enumerator.length = enumerator.length || 0;

      enumerator._enumerate();

      if (enumerator._remaining === 0) {
        lib$es6$promise$$internal$$fulfill(
          enumerator.promise,
          enumerator._result
        );
      }
    }
  } else {
    lib$es6$promise$$internal$$reject(
      enumerator.promise,
      enumerator._validationError()
    );
  }
}


text:
/ *****************************************************************************
// Server.js - This file is the initial starting point for the Node/Express server.
//
// ******************************************************************************
// *** Dependencies
// =============================================================
var express = require("express");
var bodyParser = require("body-parser");

// Sets up the Express App
// =============================================================
var app = express();
var PORT = process.env.PORT || 8080;

// Requiring our models for syncing
var db = require("./models");

// Sets up the Express app to handle data parsing
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.text());
app.use(bodyParser.json({ type: "application/vnd.api+json" }));

// Static directory
app.use(express.static("./public"));

// Routes =============================================================

require("./routes/page-routes.js")(app);

// Syncing our sequelize models and then starting our express app
db.sequelize.sync({ force: true }).then(function() {
  app.listen(PORT, function() {
    console.log("App listening on PORT " + PORT);
  });
});


text:
//
//  DZImageView.h
//  DragZoom
//
//  Created by Jonathon Mah on 2006-04-13.
//  Copyright 2006 Playhaus. All rights reserved.
//  License information is contained at the bottom of this file and in the
//  'LICENSE.txt' file.
//

#import <Cocoa/Cocoa.h>
#import "PVImageView.h"

@interface DZImageView : PVImageView
{
}

@end


text:
ranger
======

Simple reverse proxy written in Erlang


text:
export { FormlyMatSliderModule } from './slider.module';
export { FormlyFieldSlider } from './slider.type';


text:
/**
 * Swaggy Jenkins
 * Jenkins API clients generated from Swagger / Open API specification
 *
 * The version of the OpenAPI document: 1.5.1-pre.0
 * Contact: blah@cliffano.com
 *
 * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0.
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

#include "CppRestOpenAPIClient/model/InputStepImpl.h"

namespace org {
namespace openapitools {
namespace client {
namespace model {

InputStepImpl::InputStepImpl()
{
    m__class = utility::conversions::to_string_t("");
    m__classIsSet = false;
    m__linksIsSet = false;
    m_Id = utility::conversions::to_string_t("");
    m_IdIsSet = false;
    m_Message = utility::conversions::to_string_t("");
    m_MessageIsSet = false;
    m_Ok = utility::conversions::to_string_t("");
    m_OkIsSet = false;
    m_ParametersIsSet = false;
    m_Submitter = utility::conversions::to_string_t("");
    m_SubmitterIsSet = false;
}

InputStepImpl::~InputStepImpl()
{
}

void InputStepImpl::validate()
{
    // TODO: implement validation
}

web::json::value InputStepImpl::toJson() const
{

    web::json::value val = web::json::value::object();

    if(m__classIsSet)
    {
        val[utility::conversions::to_string_t(U("_class"))] = ModelBase::toJson(m__class);
    }
    if(m__linksIsSet)
    {
        val[utility::conversions::to_string_t(U("_links"))] = ModelBase::toJson(m__links);
    }
    if(m_IdIsSet)
    {
        val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id);
    }
    if(m_MessageIsSet)
    {
        val[utility::conversions::to_string_t(U("message"))] = ModelBase::toJson(m_Message);
    }
    if(m_OkIsSet)
    {
        val[utility::conversions::to_string_t(U("ok"))] = ModelBase::toJson(m_Ok);
    }
    if(m_ParametersIsSet)
    {
        val[utility::conversions::to_string_t(U("parameters"))] = ModelBase::toJson(m_Parameters);
    }
    if(m_SubmitterIsSet)
    {
        val[utility::conversions::to_string_t(U("submitter"))] = ModelBase::toJson(m_Submitter);
    }

    return val;
}

bool InputStepImpl::fromJson(const web::json::value& val)
{
    bool ok = true;

    if(val.has_field(utility::conversions::to_string_t(U("_class"))))
    {
        const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("_class")));
        if(!fieldValue.is_null())
        {
            utility::string_t refVal_setClass;
            ok &= ModelBase::fromJson(fieldValue, refVal_setClass);
            setClass(refVal_setClass);
        }
    }
    if(val.has_field(utility::conversions::to_string_t(U("_links"))))
    {
        const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("_links")));
        if(!fieldValue.is_null())
        {
            std::shared_ptr<InputStepImpllinks> refVal_setLinks;
            ok &= ModelBase::fromJson(fieldValue, refVal_setLinks);
            setLinks(refVal_setLinks);
        }
    }
    if(val.has_field(utility::conversions::to_string_t(U("id"))))
    {
        const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
        if(!fieldValue.is_null())
        {
            utility::string_t refVal_setId;
            ok &= ModelBase::fromJson(fieldValue, refVal_setId);
            setId(refVal_setId);
        }
    }
    if(val.has_field(utility::conversions::to_string_t(U("message"))))
    {
        const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("message")));
        if(!fieldValue.is_null())
        {
            utility::string_t refVal_setMessage;
            ok &= ModelBase::fromJson(fieldValue, refVal_setMessage);
            setMessage(refVal_setMessage);
        }
    }
    if(val.has_field(utility::conversions::to_string_t(U("ok"))))
    {
        const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("ok")));
        if(!fieldValue.is_null())
        {
            utility::string_t refVal_setOk;
            ok &= ModelBase::fromJson(fieldValue, refVal_setOk);
            setOk(refVal_setOk);
        }
    }
    if(val.has_field(utility::conversions::to_string_t(U("parameters"))))
    {
        const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("parameters")));
        if(!fieldValue.is_null())
        {
            std::vector<std::shared_ptr<StringParameterDefinition>> refVal_setParameters;
            ok &= ModelBase::fromJson(fieldValue, refVal_setParameters);
            setParameters(refVal_setParameters);
        }
    }
    if(val.has_field(utility::conversions::to_string_t(U("submitter"))))
    {
        const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("submitter")));
        if(!fieldValue.is_null())
        {
            utility::string_t refVal_setSubmitter;
            ok &= ModelBase::fromJson(fieldValue, refVal_setSubmitter);
            setSubmitter(refVal_setSubmitter);
        }
    }
    return ok;
}

void InputStepImpl::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
    utility::string_t namePrefix = prefix;
    if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
    {
        namePrefix += utility::conversions::to_string_t(U("."));
    }
    if(m__classIsSet)
    {
        multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("_class")), m__class));
    }
    if(m__linksIsSet)
    {
        multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("_links")), m__links));
    }
    if(m_IdIsSet)
    {
        multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id));
    }
    if(m_MessageIsSet)
    {
        multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("message")), m_Message));
    }
    if(m_OkIsSet)
    {
        multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ok")), m_Ok));
    }
    if(m_ParametersIsSet)
    {
        multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("parameters")), m_Parameters));
    }
    if(m_SubmitterIsSet)
    {
        multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("submitter")), m_Submitter));
    }
}

bool InputStepImpl::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
    bool ok = true;
    utility::string_t namePrefix = prefix;
    if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
    {
        namePrefix += utility::conversions::to_string_t(U("."));
    }

    if(multipart->hasContent(utility::conversions::to_string_t(U("_class"))))
    {
        utility::string_t refVal_setClass;
        ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("_class"))), refVal_setClass );
        setClass(refVal_setClass);
    }
    if(multipart->hasContent(utility::conversions::to_string_t(U("_links"))))
    {
        std::shared_ptr<InputStepImpllinks> refVal_setLinks;
        ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("_links"))), refVal_setLinks );
        setLinks(refVal_setLinks);
    }
    if(multipart->hasContent(utility::conversions::to_string_t(U("id"))))
    {
        utility::string_t refVal_setId;
        ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
        setId(refVal_setId);
    }
    if(multipart->hasContent(utility::conversions::to_string_t(U("message"))))
    {
        utility::string_t refVal_setMessage;
        ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("message"))), refVal_setMessage );
        setMessage(refVal_setMessage);
    }
    if(multipart->hasContent(utility::conversions::to_string_t(U("ok"))))
    {
        utility::string_t refVal_setOk;
        ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ok"))), refVal_setOk );
        setOk(refVal_setOk);
    }
    if(multipart->hasContent(utility::conversions::to_string_t(U("parameters"))))
    {
        std::vector<std::shared_ptr<StringParameterDefinition>> refVal_setParameters;
        ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("parameters"))), refVal_setParameters );
        setParameters(refVal_setParameters);
    }
    if(multipart->hasContent(utility::conversions::to_string_t(U("submitter"))))
    {
        utility::string_t refVal_setSubmitter;
        ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("submitter"))), refVal_setSubmitter );
        setSubmitter(refVal_setSubmitter);
    }
    return ok;
}

utility::string_t InputStepImpl::getClass() const
{
    return m__class;
}

void InputStepImpl::setClass(const utility::string_t& value)
{
    m__class = value;
    m__classIsSet = true;
}

bool InputStepImpl::r_classIsSet() const
{
    return m__classIsSet;
}

void InputStepImpl::unset_class()
{
    m__classIsSet = false;
}
std::shared_ptr<InputStepImpllinks> InputStepImpl::getLinks() const
{
    return m__links;
}

void InputStepImpl::setLinks(const std::shared_ptr<InputStepImpllinks>& value)
{
    m__links = value;
    m__linksIsSet = true;
}

bool InputStepImpl::linksIsSet() const
{
    return m__linksIsSet;
}

void InputStepImpl::unset_links()
{
    m__linksIsSet = false;
}
utility::string_t InputStepImpl::getId() const
{
    return m_Id;
}

void InputStepImpl::setId(const utility::string_t& value)
{
    m_Id = value;
    m_IdIsSet = true;
}

bool InputStepImpl::idIsSet() const
{
    return m_IdIsSet;
}

void InputStepImpl::unsetId()
{
    m_IdIsSet = false;
}
utility::string_t InputStepImpl::getMessage() const
{
    return m_Message;
}

void InputStepImpl::setMessage(const utility::string_t& value)
{
    m_Message = value;
    m_MessageIsSet = true;
}

bool InputStepImpl::messageIsSet() const
{
    return m_MessageIsSet;
}

void InputStepImpl::unsetMessage()
{
    m_MessageIsSet = false;
}
utility::string_t InputStepImpl::getOk() const
{
    return m_Ok;
}

void InputStepImpl::setOk(const utility::string_t& value)
{
    m_Ok = value;
    m_OkIsSet = true;
}

bool InputStepImpl::okIsSet() const
{
    return m_OkIsSet;
}

void InputStepImpl::unsetOk()
{
    m_OkIsSet = false;
}
std::vector<std::shared_ptr<StringParameterDefinition>>& InputStepImpl::getParameters()
{
    return m_Parameters;
}

void InputStepImpl::setParameters(const std::vector<std::shared_ptr<StringParameterDefinition>>& value)
{
    m_Parameters = value;
    m_ParametersIsSet = true;
}

bool InputStepImpl::parametersIsSet() const
{
    return m_ParametersIsSet;
}

void InputStepImpl::unsetParameters()
{
    m_ParametersIsSet = false;
}
utility::string_t InputStepImpl::getSubmitter() const
{
    return m_Submitter;
}

void InputStepImpl::setSubmitter(const utility::string_t& value)
{
    m_Submitter = value;
    m_SubmitterIsSet = true;
}

bool InputStepImpl::submitterIsSet() const
{
    return m_SubmitterIsSet;
}

void InputStepImpl::unsetSubmitter()
{
    m_SubmitterIsSet = false;
}
}
}
}
}


text:
package net.anotheria.moskito.core.stats.impl;

import net.anotheria.moskito.core.stats.Interval;

/**
 * This class is a special version of long holder, that does not reset on interval update.
 * @author lrosenberg
 * @see net.java.dev.moskito.core.stats.ValueHolder
 */
class CounterValueHolder extends LongValueHolder {

	/**
	 * The Constructor.
	 *
	 * @param aInterval this is the Interval this value will be updated
	 */
	public CounterValueHolder(Interval aInterval) {
		super(aInterval);
	}

	/**
	 * @see net.java.dev.moskito.core.stats.IIntervalListener#intervalUpdated(net.java.dev.moskito.core.stats.impl.IntervalImpl)
	 */
	@Override public void intervalUpdated(Interval caller) {
		updateLastValueFromCurrent();
	}

	/**
	 * @see net.java.dev.moskito.core.stats.impl.AbstractValueHolder#toString()
	 */
	@Override
	public String toString() {
		return super.toString() + " CL " + getLastValue() + " / "	+ getCurrentValueAsLong();
	}

}


text:
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.equalCoords = exports.doesFitWithin = exports.centerOfBoundsFromBounds = exports.centerOfBounds = exports.centerOfSize = exports.axes = exports.pickZone = exports.place = exports.calcRelPos = exports.validTypeValues = exports.types = exports.El = undefined;

var _platform = require('./platform');

var _utils = require('./utils');

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

/* Axes System

This allows us to at-will work in a different orientation
without having to manually keep track of knowing if we should be using
x or y positions. */

var axes = {
  row: {},
  column: {}
};

axes.row.main = {
  start: 'x',
  end: 'x2',
  size: 'w'
};
axes.row.cross = {
  start: 'y',
  end: 'y2',
  size: 'h'
};
axes.column.main = axes.row.cross;
axes.column.cross = axes.row.main;

var types = [{ name: 'side', values: ['start', 'end'] }, { name: 'standing', values: ['above', 'right', 'below', 'left'] }, { name: 'flow', values: ['column', 'row'] }];

var validTypeValues = types.reduce(function (xs, _ref) {
  var values = _ref.values;
  return xs.concat(values);
}, []);

var centerOfSize = function centerOfSize(flow, axis, size) {
  return size[axes[flow][axis].size] / 2;
};

var centerOfBounds = function centerOfBounds(flow, axis, bounds) {
  return bounds[axes[flow][axis].start] + bounds[axes[flow][axis].size] / 2;
};

var centerOfBoundsFromBounds = function centerOfBoundsFromBounds(flow, axis, boundsTo, boundsFrom) {
  return centerOfBounds(flow, axis, boundsTo) - boundsFrom[axes[flow][axis].start];
};

var place = function place(flow, axis, align, bounds, size) {
  var axisProps = axes[flow][axis];
  return align === 'center' ? centerOfBounds(flow, axis, bounds) - centerOfSize(flow, axis, size) : align === 'end' ? bounds[axisProps.end] : align === 'start'
  /* DOM rendering unfolds leftward. Therefore if the slave is positioned before
  the master then the slave`s position must in addition be pulled back
  by its [the slave`s] own length. */
  ? bounds[axisProps.start] - size[axisProps.size] : null;
};

/* Element Layout Queries */

var El = {};

El.calcBounds = function (el) {

  if (el === _platform.window) {
    return {
      x: 0,
      y: 0,
      x2: el.innerWidth,
      y2: el.innerHeight,
      w: el.innerWidth,
      h: el.innerHeight
    };
  }

  var b = el.getBoundingClientRect();

  return {
    x: b.left,
    y: b.top,
    x2: b.right,
    y2: b.bottom,
    w: b.right - b.left,
    h: b.bottom - b.top
  };
};

El.calcSize = function (el) {
  return el === _platform.window ? { w: el.innerWidth, h: el.innerHeight } : { w: el.offsetWidth, h: el.offsetHeight };
};

El.calcScrollSize = function (el) {
  return el === _platform.window ? {
    w: el.scrollX || el.pageXOffset,
    h: el.scrollY || el.pageYOffset
  } : { w: el.scrollLeft, h: el.scrollTop };
};

/* Misc Utilities */

var getPreferenceType = function getPreferenceType(preference) {
  return types.reduce(function (found, type) {
    return found ? found : type.values.indexOf(preference) !== -1 ? type.name : null;
  }, null);
};

/* Dimension Fit Checks */

var fitWithinChecker = function fitWithinChecker(dimension) {
  return function (domainSize, itemSize) {
    return domainSize[dimension] >= itemSize[dimension];
  };
};

var doesWidthFitWithin = fitWithinChecker('w');
var doesHeightFitWithin = fitWithinChecker('h');

var doesFitWithin = function doesFitWithin(domainSize, itemSize) {
  return doesWidthFitWithin(domainSize, itemSize) && doesHeightFitWithin(domainSize, itemSize);
};

/* Errors */

var createPreferenceError = function createPreferenceError(givenValue) {
  return new Error('The given layout placement of "' + givenValue + '" is not a valid choice. Valid choices are: ' + validTypeValues.join(' | ') + '.');
};

/* Algorithm for picking the best fitting zone for popover. The current technique will loop through all zones picking the last one that fits.
In the case that none fit we should pick the least-not-fitting zone. */

var pickZone = function pickZone(opts, frameBounds, targetBounds, size) {
  var t = targetBounds;
  var f = frameBounds;
  var zones = [{ side: 'start', standing: 'above', flow: 'column', order: -1, w: f.x2, h: t.y }, { side: 'end', standing: 'right', flow: 'row', order: 1, w: f.x2 - t.x2, h: f.y2 }, { side: 'end', standing: 'below', flow: 'column', order: 1, w: f.x2, h: f.y2 - t.y2 }, { side: 'start', standing: 'left', flow: 'row', order: -1, w: t.x, h: f.y2 }];

  /* Order the zones by the amount of popup that would be cut out if that zone is used.
     The first one in the array is the one that cuts the least amount.

     const area = size.w * size.h  // Popup area is constant and it does not change the order
  */
  zones.forEach(function (z) {
    z.cutOff = /* area */-Math.max(0, Math.min(z.w, size.w)) * Math.max(0, Math.min(z.h, size.h));
  });
  zones.sort(function (a, b) {
    return a.cutOff - b.cutOff;
  });

  var availZones = zones.filter(function (zone) {
    return doesFitWithin(zone, size);
  });

  /* If a place is required pick it from the available zones if possible. */

  if (opts.place) {
    var _ret = function () {
      var type = getPreferenceType(opts.place);
      if (!type) throw createPreferenceError(opts.place);
      var finder = function finder(z) {
        return z[type] === opts.place;
      };
      return {
        v: (0, _utils.find)(finder, availZones) || (0, _utils.find)(finder, zones)
      };
    }();

    if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
  }

  /* If the preferred side is part of the available zones, use that otherwise
  pick the largest available zone. If there are no available zones, pick the
  largest zone. */

  if (opts.preferPlace) {
    var _ret2 = function () {
      var preferenceType = getPreferenceType(opts.preferPlace);
      if (!preferenceType) throw createPreferenceError(opts.preferPlace);

      // Try to fit first in zone where the pop up fit completely
      var preferredAvailZones = availZones.filter(function (zone) {
        return zone[preferenceType] === opts.preferPlace;
      });
      if (preferredAvailZones.length) return {
          v: preferredAvailZones[0]
        };

      // If there are not areas where the pop up fit completely, it uses the prefered ones
      // in order from the one the fit better
      var preferredZones = zones.filter(function (zone) {
        return zone[preferenceType] === opts.preferPlace;
      });
      if (preferredZones.length) return {
          v: preferredZones[0]
        };
    }();

    if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v;
  }

  // Return a zone that fit completely or the one that fit the best
  return availZones.length ? availZones[0] : zones[0];
};

/* TODO Document this. */

var calcRelPos = function calcRelPos(zone, masterBounds, slaveSize) {
  var _ref2;

  var _axes$zone$flow = axes[zone.flow];
  var main = _axes$zone$flow.main;
  var cross = _axes$zone$flow.cross;
  /* TODO: The slave is hard-coded to align cross-center with master. */

  var crossAlign = 'center';
  var mainStart = place(zone.flow, 'main', zone.side, masterBounds, slaveSize);
  var mainSize = slaveSize[main.size];
  var crossStart = place(zone.flow, 'cross', crossAlign, masterBounds, slaveSize);
  var crossSize = slaveSize[cross.size];

  return _ref2 = {}, _defineProperty(_ref2, main.start, mainStart), _defineProperty(_ref2, 'mainLength', mainSize), _defineProperty(_ref2, main.end, mainStart + mainSize), _defineProperty(_ref2, cross.start, crossStart), _defineProperty(_ref2, 'crossLength', crossSize), _defineProperty(_ref2, cross.end, crossStart + crossSize), _ref2;
};

exports.default = {
  El: El,
  types: types,
  validTypeValues: validTypeValues,
  calcRelPos: calcRelPos,
  place: place,
  pickZone: pickZone,
  axes: axes,
  centerOfSize: centerOfSize,
  centerOfBounds: centerOfBounds,
  centerOfBoundsFromBounds: centerOfBoundsFromBounds,
  doesFitWithin: doesFitWithin,
  equalCoords: _utils.equalRecords
};
exports.El = El;
exports.types = types;
exports.validTypeValues = validTypeValues;
exports.calcRelPos = calcRelPos;
exports.place = place;
exports.pickZone = pickZone;
exports.axes = axes;
exports.centerOfSize = centerOfSize;
exports.centerOfBounds = centerOfBounds;
exports.centerOfBoundsFromBounds = centerOfBoundsFromBounds;
exports.doesFitWithin = doesFitWithin;
exports.equalCoords = _utils.equalRecords;


text:
import {Component} from "react";

export type BaseProps = {
	ref?, // needed so TypeScript doesn't complain about ref func not matching, because <VMenuUI> doesn't have "align" property of <div>
};
export class BaseComponent<P, S> extends Component<P & BaseProps, S> {
	constructor(props) {
		super(props);
		//autoBind(this);
		this.state = this.state || {} as any;

		// if using PreRender, wrap render func
		if (this.PreRender != BaseComponent.prototype.render) {
			let oldRender = this.render;
			this.render = function() {
				this.PreRender();
				return oldRender.apply(this, arguments);
			};
		}
	}

	refs;

	ComponentWillMount(): void {};
	ComponentWillMountOrReceiveProps(props: any, forMount?: boolean): void {};
	private componentWillMount() {
		this.ComponentWillMount();
	    this.ComponentWillMountOrReceiveProps(this.props, true);
	}
	ComponentDidMount(...args: any[]): void {};
	ComponentDidMountOrUpdate(forMount: boolean): void {};
	mounted = false;
	private componentDidMount(...args) {
		this.ComponentDidMount(...args);
		this.ComponentDidMountOrUpdate(true);
		this.mounted = true;
		if (this.PostRender != BaseComponent.prototype.PostRender) {
			/*setTimeout(()=>window.requestAnimationFrame(()=> {
				if (!this.mounted) return;
				this.PostRender(true);
			}));*/
			this.PostRender(true);
		}
	}
	ComponentWillUnmount(): void {};
	private componentWillUnmount() {
		this.ComponentWillUnmount();
		this.mounted = false;
	}

	ComponentWillReceiveProps(newProps: any[]): void {};
	private componentWillReceiveProps(newProps) {
		this.ComponentWillReceiveProps(newProps);
	    this.ComponentWillMountOrReceiveProps(newProps, false);
	}
	ComponentDidUpdate(...args: any[]): void {};
	private componentDidUpdate(...args) {
	    this.ComponentDidUpdate(...args);
		this.ComponentDidMountOrUpdate(false);
		if (this.PostRender != BaseComponent.prototype.PostRender) {
			/*setTimeout(()=>window.requestAnimationFrame(()=> {
				if (!this.mounted) return;
				this.PostRender(false);
			}));*/
			this.PostRender(false);
		}
	}

	PreRender(): void {};
	PostRender(initialMount: boolean): void {};
}


text:
/**
 * Created by Indexyz on 2017/4/30.
 */

const Router = require('co-router');
let router = Router();
const typeEnum = require("../../Define/OAuth").scope;
const multer  = require("multer");
const makeError = require("./Error");
const db = require("mongoose");
const userAuthSchema = require("../../Db/Schema/UserAuth");
const appSchema = require("../../Db/Schema/Application");
const dbEnum = require("../../Define/Db").Db;

let upload = multer({
    dest: "tmp/",
    limits: { fileSize:  1024 * 64 }
});

router.get("/", (req, res, next) => {
    res.status(204).send();
});

router.use("/authorize", (req, res, next) => {
    if (!req.session.user) {
        res.redirect("/auth/login?redirect=" + encodeURIComponent(req.originalUrl))
    } else {
        next()
    }
});
router.get("/authorize", require("./Authorize").get);
router.post("/authorize", require("./Authorize").post);

router.get("/getCode", require("./GetCode").get);

router.post("/token", require("./Token").post);

router.use("/resources/:type", (req, res, next) => {
    if (!req.params.type || req.params.type === "undefined"){
        return makeError(res, makeError.Types.TYPE_ERROR);
    } else {
        let thisType = req.params.type;
        let userAuthModel = db.model(dbEnum.APP_USER_DB, userAuthSchema),
            appModel = db.model(dbEnum.APPS_DB, appSchema);
        userAuthModel.findOne({
            accessToken: req.headers.access_token,
            scope: thisType
        }, (err, doc) => {
            if (err || !doc) { return makeError(res, makeError.Types.INVALID_TOKEN) }
            appModel.findOne({
                client_secret: req.headers.client_secret
            }, (err, app) => {
                if (err || !app) { return makeError(res, makeError.Types.INVALID_SECRET) }
                req.doc = doc;
                req.app = app;
                req.resType = thisType;
                next()
            })
        });
    }
});

router.post("/resources/" + typeEnum.MODIFY_SKIN, (req, res, next) => {
    if (!req.headers.type || (!req.headers.type in ["cap", "slim", "skin"])){
        return makeError(res, makeError.Types.INVALID_REQUEST)
    } else {
        req.skinType = req.headers.type;
        next()
    }
});

router.post("/resources/" + typeEnum.MODIFY_SKIN, require("./Resources").upload);

router.get("/resources/:type", require("./Resources").get);

router.use("/resources", (req, res, next) => {
    return makeError(res, makeError.Types.TYPE_ERROR);
});

module.exports = router;


text:
package com.intellij.execution.process;

import com.intellij.execution.process.impl.ProcessListUtil;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.registry.Registry;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jvnet.winp.WinProcess;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/******************************************************************************
 * Copyright (C) 2013  Fabio Zadrozny
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Fabio Zadrozny <fabiofz@gmail.com> - initial API and implementation
 ******************************************************************************/
public class OSProcessUtil {
  private static final Logger LOG = Logger.getInstance(OSProcessUtil.class);

  @NotNull
  public static ProcessInfo[] getProcessList() {
    return ProcessListUtil.getProcessList();
  }

  public static boolean killProcessTree(@NotNull Process process) {
    if (SystemInfo.isWindows) {
      try {
        if (Registry.is("disable.winp")) {
          return WinProcessManager.kill(process, true);
        }
        else {
          createWinProcess(process).killRecursively();
          return true;
        }
      }
      catch (Throwable e) {
        LOG.info("Cannot kill process tree", e);
      }
    }
    else if (SystemInfo.isUnix) {
      return UnixProcessManager.sendSigKillToProcessTree(process);
    }
    return false;
  }

  public static void killProcess(@NotNull Process process) {
    if (SystemInfo.isWindows) {
      try {
        if (Registry.is("disable.winp")) {
          WinProcessManager.kill(process, false);
        }
        else {
          createWinProcess(process).kill();
        }
      }
      catch (Throwable e) {
        LOG.info("Cannot kill process", e);
      }
    }
    else if (SystemInfo.isUnix) {
      UnixProcessManager.sendSignal(UnixProcessManager.getProcessPid(process), UnixProcessManager.SIGKILL);
    }
  }

  public static int getProcessID(@NotNull Process process) {
    if (SystemInfo.isWindows) {
      try {
        if (Registry.is("disable.winp")) {
          WinProcessManager.getProcessPid(process);
        }
        else {
          return createWinProcess(process).getPid();
        }
      }
      catch (Throwable e) {
        LOG.info("Cannot get process id", e);
        return -1;
      }
    }
    else if (SystemInfo.isUnix) {
      return UnixProcessManager.getProcessPid(process);
    }
    throw new IllegalStateException("Unknown OS: "  + SystemInfo.OS_NAME);
  }

  @SuppressWarnings("deprecation")
  @NotNull
  private static WinProcess createWinProcess(@NotNull Process process) {
    if (process instanceof RunnerWinProcess) process = ((RunnerWinProcess)process).getOriginalProcess();
    return new WinProcess(process);
  }

  @Nullable
  public static List<String> getCommandLinesOfRunningProcesses() {
    List<String> result = new ArrayList<String>();
    for (ProcessInfo each : getProcessList()) {
      result.add(each.getCommandLine());
    }
    return Collections.unmodifiableList(result);
  }
}