text:
/**
 * @ignore
 * dom/style
 * @author yiminghe@gmail.com, lifesinger@gmail.com
 */
KISSY.add(function (S, require) {
    var RE_DASH = /-([a-z])/ig;

    function upperCase() {
        return arguments[1].toUpperCase();
    }

    function camelCase(name){
        return name.replace(RE_DASH, upperCase);
    }

    // return prefixed css prefix name
    function getCssVendorInfo(name) {
        if (name.indexOf('-') !== -1) {
            name = name.replace(RE_DASH, upperCase);
        }
        if (name in vendorInfos) {
            return vendorInfos[name];
        }
        // if already prefixed or need not to prefix
        if (!documentElementStyle || name in documentElementStyle) {
            vendorInfos[name] = {
                propertyName: name,
                propertyNamePrefix: ''
            };
        } else {
            var upperFirstName = name.charAt(0).toUpperCase() + name.slice(1),
                vendorName;

            for (var i = 0; i < propertyPrefixesLength; i++) {
                var propertyNamePrefix = propertyPrefixes[i];
                vendorName = propertyNamePrefix + upperFirstName;
                if (vendorName in documentElementStyle) {
                    vendorInfos[name] = {
                        propertyName: vendorName,
                        propertyNamePrefix: propertyNamePrefix
                    };
                }
            }

            vendorInfos[name] = vendorInfos[name] || null;
        }
        return  vendorInfos[name];
    }

    var util = S;
    var logger = S.getLogger('s/dom');
    var Dom = require('./api');
    var globalWindow = S.Env.host,
        vendorInfos = {},
        propertyPrefixes = [
            'Webkit',
            'Moz',
            'O',
            // ms is special .... !
            'ms'
        ],
        propertyPrefixesLength = propertyPrefixes.length,
        doc = globalWindow.document || {},
        documentElement = doc && doc.documentElement,
        documentElementStyle = documentElement.style,
        UA = require('ua'),
        BOX_MODELS = ['margin', 'border', 'padding'],
        CONTENT_INDEX = -1,
        PADDING_INDEX = 2,
        BORDER_INDEX = 1,
        MARGIN_INDEX = 0,
        getNodeName = Dom.nodeName,
        RE_MARGIN = /^margin/,
        WIDTH = 'width',
        HEIGHT = 'height',
        DISPLAY = 'display',
        OLD_DISPLAY = DISPLAY + util.now(),
        NONE = 'none',
        cssNumber = {
            fillOpacity: 1,
            fontWeight: 1,
            lineHeight: 1,
            opacity: 1,
            orphans: 1,
            widows: 1,
            zIndex: 1,
            zoom: 1
        },
        EMPTY = '',
        DEFAULT_UNIT = 'px',
        NO_PX_REG = /\d(?!px)[a-z%]+$/i,
        cssHooks = {},
        cssProps = {},
        defaultDisplay = {},
        userSelectVendorInfo = getCssVendorInfo('userSelect'),
        userSelectProperty = userSelectVendorInfo && userSelectVendorInfo.propertyName;

    cssProps['float'] = 'cssFloat';

    function normalizeCssPropName(name) {
        if (cssProps[name]) {
            return cssProps[name];
        }
        var vendor = getCssVendorInfo(name);
        return vendor && vendor.propertyName || name;
    }

    function getDefaultDisplay(tagName) {
        var body,
            oldDisplay = defaultDisplay[ tagName ],
            elem;
        if (!defaultDisplay[ tagName ]) {
            body = doc.body || doc.documentElement;
            elem = doc.createElement(tagName);
            // note: do not change default tag display!
            Dom.prepend(elem, body);
            oldDisplay = Dom.css(elem, 'display');
            body.removeChild(elem);
            // Store the correct default display
            defaultDisplay[ tagName ] = oldDisplay;
        }
        return oldDisplay;
    }

    util.mix(Dom,
        /**
         * @override KISSY.DOM
         * @class
         * @singleton
         */
        {
            _cssHooks: cssHooks,

            _cssProps: cssProps,

            _getComputedStyle: function (elem, name, computedStyle) {
                var val = '',
                    width,
                    minWidth,
                    maxWidth,
                    style,
                    d = elem.ownerDocument;

                name = normalizeCssPropName(name);

                // https://github.com/kissyteam/kissy/issues/61
                if ((computedStyle = (computedStyle || d.defaultView.getComputedStyle(elem, null)))) {
                    val = computedStyle.getPropertyValue(name) || computedStyle[name];
                }

                // 还没有加入到 document,就取行内
                if (val === '' && !Dom.contains(d, elem)) {
                    val = elem.style[name];
                }

                // Safari 5.1 returns percentage for margin
                if (Dom._RE_NUM_NO_PX.test(val) && RE_MARGIN.test(name)) {
                    style = elem.style;
                    width = style.width;
                    minWidth = style.minWidth;
                    maxWidth = style.maxWidth;

                    style.minWidth = style.maxWidth = style.width = val;
                    val = computedStyle.width;

                    style.width = width;
                    style.minWidth = minWidth;
                    style.maxWidth = maxWidth;
                }

                return val;
            },

            /**
             *  Get inline style property from the first element of matched elements
             *  or
             *  Set one or more CSS properties for the set of matched elements.
             *  @param {HTMLElement[]|String|HTMLElement} selector Matched elements
             *  @param {String|Object} name A CSS property. or A map of property-value pairs to set.
             *  @param [val] A value to set for the property.
             *  @return {undefined|String}
             */
            style: function (selector, name, val) {
                var els = Dom.query(selector),
                    k,
                    ret,
                    elem = els[0], i;
                // supports hash
                if (util.isPlainObject(name)) {
                    for (k in name) {
                        for (i = els.length - 1; i >= 0; i--) {
                            style(els[i], k, name[k]);
                        }
                    }
                    return undefined;
                }
                if (val === undefined) {
                    ret = '';
                    if (elem) {
                        ret = style(elem, name, val);
                    }
                    return ret;
                } else {
                    for (i = els.length - 1; i >= 0; i--) {
                        style(els[i], name, val);
                    }
                }
                return undefined;
            },

            /**
             * Get the computed value of a style property for the first element in the set of matched elements.
             * or
             * Set one or more CSS properties for the set of matched elements.
             * @param {HTMLElement[]|String|HTMLElement} selector 选择器或节点或节点数组
             * @param {String|Object} name A CSS property. or A map of property-value pairs to set.
             * @param [val] A value to set for the property.
             * @return {undefined|String}
             */
            css: function (selector, name, val) {
                var els = Dom.query(selector),
                    elem = els[0],
                    k,
                    hook,
                    ret,
                    i;
                // supports hash
                if (util.isPlainObject(name)) {
                    for (k in name) {
                        for (i = els.length - 1; i >= 0; i--) {
                            style(els[i], k, name[k]);
                        }
                    }
                    return undefined;
                }

                name = camelCase(name);
                hook = cssHooks[name];
                // getter
                if (val === undefined) {
                    // supports css selector/Node/NodeList
                    ret = '';
                    if (elem) {
                        // If a hook was provided get the computed value from there
                        if (!(hook && 'get' in hook &&
                            (ret = hook.get(elem, true)) !== undefined)) {

                            ret = Dom._getComputedStyle(elem, name);
                        }
                    }
                    return (typeof ret === 'undefined') ? '' : ret;
                } else {
                    for (i = els.length - 1; i >= 0; i--) {
                        style(els[i], name, val);
                    }
                }
                return undefined;
            },

            /**
             * Display the matched elements.
             * @param {HTMLElement[]|String|HTMLElement} selector Matched elements.
             */
            show: function (selector) {
                var els = Dom.query(selector),
                    tagName,
                    old,
                    elem, i;
                for (i = els.length - 1; i >= 0; i--) {
                    elem = els[i];
                    elem.style[DISPLAY] = Dom.data(elem, OLD_DISPLAY) || EMPTY;
                    // 可能元素还处于隐藏状态,比如 css 里设置了 display: none
                    if (Dom.css(elem, DISPLAY) === NONE) {
                        tagName = elem.tagName.toLowerCase();
                        old = getDefaultDisplay(tagName);
                        Dom.data(elem, OLD_DISPLAY, old);
                        elem.style[DISPLAY] = old;
                    }
                }
            },

            /**
             * Hide the matched elements.
             * @param {HTMLElement[]|String|HTMLElement} selector Matched elements.
             */
            hide: function (selector) {
                var els = Dom.query(selector),
                    elem, i;
                for (i = els.length - 1; i >= 0; i--) {
                    elem = els[i];
                    var style = elem.style,
                        old = style[DISPLAY];
                    if (old !== NONE) {
                        if (old) {
                            Dom.data(elem, OLD_DISPLAY, old);
                        }
                        style[DISPLAY] = NONE;
                    }
                }
            },

            /**
             * Display or hide the matched elements.
             * @param {HTMLElement[]|String|HTMLElement} selector Matched elements.
             */
            toggle: function (selector) {
                var els = Dom.query(selector),
                    elem, i;
                for (i = els.length - 1; i >= 0; i--) {
                    elem = els[i];
                    if (Dom.css(elem, DISPLAY) === NONE) {
                        Dom.show(elem);
                    } else {
                        Dom.hide(elem);
                    }
                }
            },

            /**
             * Creates a stylesheet from a text blob of rules.
             * These rules will be wrapped in a style tag and appended to the HEAD of the document.
             * if cssText does not contain css hacks, u can just use Dom.create('<style>xx</style>')
             * @param {Window} [refWin=window] Window which will accept this stylesheet
             * @param {String} [cssText] The text containing the css rules
             * @param {String} [id] An id to add to the stylesheet for later removal
             */
            addStyleSheet: function (refWin, cssText, id) {
                if (typeof refWin === 'string') {
                    id = cssText;
                    cssText = /**@type String
                     @ignore*/refWin;
                    refWin = globalWindow;
                }

                var doc = Dom.getDocument(refWin),
                    elem;

                if (id && (id = id.replace('#', EMPTY))) {
                    elem = Dom.get('#' + id, doc);
                }

                // 仅添加一次,不重复添加
                if (elem) {
                    return;
                }

                elem = Dom.create('<style>', {id: id}, doc);

                // 先添加到 Dom 树中,再给 cssText 赋值,否则 css hack 会失效
                Dom.get('head', doc).appendChild(elem);

                if (elem.styleSheet) { // IE
                    elem.styleSheet.cssText = cssText;
                } else { // W3C
                    elem.appendChild(doc.createTextNode(cssText));
                }
            },

            /**
             * Make matched elements unselectable
             * @param {HTMLElement[]|String|HTMLElement} selector  Matched elements.
             */
            unselectable: !userSelectProperty ? function (selector) {
                var _els = Dom.query(selector),
                    elem,
                    j,
                    e,
                    i = 0,
                    excludes,
                    style,
                    els;
                for (j = _els.length - 1; j >= 0; j--) {
                    elem = _els[j];
                    style = elem.style;
                    els = elem.getElementsByTagName('*');
                    elem.setAttribute('unselectable', 'on');
                    excludes = ['iframe', 'textarea', 'input', 'select'];
                    while ((e = els[i++])) {
                        if (!util.inArray(getNodeName(e), excludes)) {
                            e.setAttribute('unselectable', 'on');
                        }
                    }
                }
            } : function (selector) {
                var els = Dom.query(selector);
                for (var j = els.length - 1; j >= 0; j--) {
                    els[j].style[userSelectProperty] = 'none';
                }
            },

            /**
             * Get the current computed width for the first element in the set of matched elements, including padding but not border.
             * @method
             * @param {HTMLElement[]|String|HTMLElement} selector Matched elements
             * @return {Number}
             */
            innerWidth: 0,
            /**
             * Get the current computed height for the first element in the set of matched elements, including padding but not border.
             * @method
             * @param {HTMLElement[]|String|HTMLElement} selector Matched elements
             * @return {Number}
             */
            innerHeight: 0,
            /**
             *  Get the current computed width for the first element in the set of matched elements, including padding and border, and optionally margin.
             * @method
             * @param {HTMLElement[]|String|HTMLElement} selector Matched elements
             * @param {Boolean} [includeMargin] A Boolean indicating whether to include the element's margin in the calculation.
             * @return {Number}
             */
            outerWidth: 0,
            /**
             * Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin.
             * @method
             * @param {HTMLElement[]|String|HTMLElement} selector Matched elements
             * @param {Boolean} [includeMargin] A Boolean indicating whether to include the element's margin in the calculation.
             * @return {Number}
             */
            outerHeight: 0,
            /**
             * Get the current computed width for the first element in the set of matched elements.
             * or
             * Set the CSS width of each element in the set of matched elements.
             * @method
             * @param {HTMLElement[]|String|HTMLElement} selector Matched elements
             * @param {String|Number} [value]
             * An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
             * @return {Number|undefined}
             */
            width: 0,
            /**
             * Get the current computed height for the first element in the set of matched elements.
             * or
             * Set the CSS height of each element in the set of matched elements.
             * @method
             * @param {HTMLElement[]|String|HTMLElement} selector Matched elements
             * @param {String|Number} [value]
             * An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
             * @return {Number|undefined}
             */
            height: 0
        });

    util.each([WIDTH, HEIGHT], function (name) {
        Dom['inner' + util.ucfirst(name)] = function (selector) {
            var el = Dom.get(selector);
            return el && getWHIgnoreDisplay(el, name, PADDING_INDEX);
        };

        Dom['outer' + util.ucfirst(name)] = function (selector, includeMargin) {
            var el = Dom.get(selector);
            return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);
        };
        var which = name === WIDTH ? ['Left', 'Right'] : ['Top', 'Bottom'];

        Dom[name] = function (selector, val) {
            var elem = Dom.get(selector);
            if (val !== undefined) {
                if (elem) {
                    var computedStyle = getComputedStyle(elem);
                    var isBorderBox = isBorderBoxFn(elem, computedStyle);
                    if (isBorderBox) {
                        val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);
                    }
                    return Dom.css(elem, name, val);
                }
                return undefined;
            }
            return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);
        };

        /**
         * @ignore
         */
        cssHooks[ name ] = {
            /**
             * @ignore
             */
            get: function (elem, computed) {
                var val;
                if (computed) {
                    val = getWHIgnoreDisplay(elem, name) + 'px';
                }
                return val;
            }
        };
    });

    var cssShow = {position: 'absolute', visibility: 'hidden', display: 'block'};

    util.each(['left', 'top'], function (name) {
        cssHooks[ name ] = {
            get: function (el, computed) {
                var val,
                    isAutoPosition,
                    position;
                if (computed) {
                    position = Dom.css(el, 'position');
                    if (position === 'static') {
                        return 'auto';
                    }
                    val = Dom._getComputedStyle(el, name);
                    isAutoPosition = val === 'auto';
                    if (isAutoPosition && position === 'relative') {
                        return '0px';
                    }
                    // https://github.com/kissyteam/kissy/issues/493
                    if (isAutoPosition || NO_PX_REG.test(val)) {
                        val = getPosition(el)[name] + 'px';
                    }
                }
                return val;
            }
        };
    });

    function swap(elem, options, callback) {
        var old = {},
            style = elem.style,
            name;

        // Remember the old values, and insert the new ones
        for (name in options) {
            old[ name ] = style[ name ];
            style[ name ] = options[ name ];
        }

        callback.call(elem);

        // Revert the old values
        for (name in options) {
            style[ name ] = old[ name ];
        }
    }

    function style(elem, name, val) {
        var elStyle,
            ret,
            hook;
        if (elem.nodeType === 3 ||
            elem.nodeType === 8 || !(elStyle = elem.style)) {
            return undefined;
        }
        name = camelCase(name);
        hook = cssHooks[name];
        name = normalizeCssPropName(name);
        // setter
        if (val !== undefined) {
            // normalize unset
            if (val === null || val === EMPTY) {
                val = EMPTY;
            } else if (!isNaN(Number(val)) && !cssNumber[name]) {
                // number values may need a unit
                val += DEFAULT_UNIT;
            }
            if (hook && hook.set) {
                val = hook.set(elem, val);
            }
            if (val !== undefined) {
                // ie 无效值报错
                try {
                    // EMPTY will unset style!
                    elStyle[name] = val;
                } catch (e) {
                    logger.warn('css set error:' + e);
                }
                // #80 fix,font-family
                if (val === EMPTY && elStyle.removeAttribute) {
                    elStyle.removeAttribute(name);
                }
            }
            if (!elStyle.cssText) {
                // weird for chrome, safari is ok?
                // https://github.com/kissyteam/kissy/issues/231
                if (UA.webkit) {
                    elStyle = elem.outerHTML;
                }
                elem.removeAttribute('style');
            }
            return undefined;
        } else {
            // If a hook was provided get the non-computed value from there
            if (!(hook && 'get' in hook &&
                (ret = hook.get(elem, false)) !== undefined)) {
                // Otherwise just get the value from the style object
                ret = elStyle[ name ];
            }
            return ret === undefined ? '' : ret;
        }
    }

    // fix #119 : https://github.com/kissyteam/kissy/issues/119
    function getWHIgnoreDisplay(elem) {
        var val, args = arguments;
        // in case elem is window
        // elem.offsetWidth === undefined
        if (elem.offsetWidth !== 0) {
            val = getWH.apply(undefined, args);
        } else {
            swap(elem, cssShow, function () {
                val = getWH.apply(undefined, args);
            });
        }
        return val;
    }

    function getPBMWidth(elem, props, which, computedStyle) {
        var value = 0, prop, j, i;
        for (j = 0; j < props.length; j++) {
            prop = props[j];
            if (prop) {
                for (i = 0; i < which.length; i++) {
                    var cssProp;
                    if (prop === 'border') {
                        cssProp = prop + which[i] + 'Width';
                    } else {
                        cssProp = prop + which[i];
                    }
                    value += parseFloat(Dom._getComputedStyle(elem, cssProp, computedStyle)) || 0;
                }
            }
        }
        return value;
    }

    function isBorderBoxFn(elem, computedStyle) {
        return Dom._getComputedStyle(elem, 'boxSizing', computedStyle) === 'border-box';
    }

    function getComputedStyle(elem) {
        var doc = elem.ownerDocument,
            computedStyle;
        if (doc.defaultView) {
            // cache style
            computedStyle = doc.defaultView.getComputedStyle(elem, null);
        }
        return computedStyle;
    }

    /*
     得到元素的大小信息
     @param elem
     @param name
     @param {String} [extra]  'padding' : (css width) + padding
     'border' : (css width) + padding + border
     'margin' : (css width) + padding + border + margin
     */
    function getWH(elem, name, extra) {
        if (util.isWindow(elem)) {
            return name === WIDTH ? Dom.viewportWidth(elem) : Dom.viewportHeight(elem);
        } else if (elem.nodeType === 9) {
            return name === WIDTH ? Dom.docWidth(elem) : Dom.docHeight(elem);
        }
        var which = name === WIDTH ? ['Left', 'Right'] : ['Top', 'Bottom'],
            borderBoxValue = name === WIDTH ? elem.offsetWidth : elem.offsetHeight;
        var computedStyle = getComputedStyle(elem);
        var isBorderBox = isBorderBoxFn(elem, computedStyle);
        var cssBoxValue = 0;
        if (borderBoxValue == null || borderBoxValue <= 0) {
            borderBoxValue = undefined;
            // Fall back to computed then un computed css if necessary
            cssBoxValue = Dom._getComputedStyle(elem, name, computedStyle);
            if (cssBoxValue == null || (Number(cssBoxValue)) < 0) {
                cssBoxValue = elem.style[ name ] || 0;
            }
            // Normalize '', auto, and prepare for extra
            cssBoxValue = parseFloat(cssBoxValue) || 0;
        }
        if (extra === undefined) {
            extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;
        }
        var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;
        var val = borderBoxValue || cssBoxValue;
        if (extra === CONTENT_INDEX) {
            if (borderBoxValueOrIsBorderBox) {
                return val - getPBMWidth(elem, ['border', 'padding'],
                    which, computedStyle);
            } else {
                return cssBoxValue;
            }
        } else if (borderBoxValueOrIsBorderBox) {
            return val + (extra === BORDER_INDEX ? 0 :
                (extra === PADDING_INDEX ?
                    -getPBMWidth(elem, ['border'], which, computedStyle) :
                    getPBMWidth(elem, ['margin'], which, computedStyle)));
        } else {
            return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra),
                which, computedStyle);
        }
    }

    var ROOT_REG = /^(?:body|html)$/i;

    function getPosition(el) {
        var offsetParent,
            offset,
            parentOffset = {top: 0, left: 0};

        if (Dom.css(el, 'position') === 'fixed') {
            offset = el.getBoundingClientRect();
        } else {
            // if offsetParent is body and body has margin
            // then all browsers are different
            // make sure set html,body {margin:0;padding:0;border:0;}
            offsetParent = getOffsetParent(el);
            offset = Dom.offset(el);
            parentOffset = Dom.offset(offsetParent);
            parentOffset.top += parseFloat(Dom.css(offsetParent, 'borderTopWidth')) || 0;
            parentOffset.left += parseFloat(Dom.css(offsetParent, 'borderLeftWidth')) || 0;
        }

        offset.top -= parseFloat(Dom.css(el, 'marginTop')) || 0;
        offset.left -= parseFloat(Dom.css(el, 'marginLeft')) || 0;

        // known bug: if el is relative && offsetParent is document.body, left %
        // should - document.body.paddingLeft
        return {
            top: offset.top - parentOffset.top,
            left: offset.left - parentOffset.left
        };
    }

    function getOffsetParent(el) {
        var offsetParent = el.offsetParent || (el.ownerDocument || doc).body;
        while (offsetParent && !ROOT_REG.test(offsetParent.nodeName) &&
            Dom.css(offsetParent, 'position') === 'static') {
            offsetParent = offsetParent.offsetParent;
        }
        return offsetParent;
    }

    return Dom;
});

/*
 2011-12-21
 - backgroundPositionX, backgroundPositionY firefox/w3c 不支持
 - w3c 为准,这里不 fix 了

 2011-08-19
 - 调整结构,减少耦合
 - fix css('height') === auto
 */


text:
<?php

namespace App\Http\Controllers\defect\com;

use App\Http\Controllers\Controller;

class PrintController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function protocol()
    {
        return view('defect.com.print.protocol');
    }

    public function zvit()
    {
        return view('defect.com.print.zvit');
    }

    public function raportBrak()
    {
        return view('defect.com.print.raportBrak');
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.axway.ats.agent.webapp.client.executors;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import com.axway.ats.agent.core.action.ActionRequest;
import com.axway.ats.agent.core.exceptions.AgentException;
import com.axway.ats.agent.core.monitoring.queue.ActionExecutionStatistic;
import com.axway.ats.agent.core.threading.ImportantThread;
import com.axway.ats.agent.core.threading.data.config.LoaderDataConfig;
import com.axway.ats.agent.core.threading.patterns.ThreadingPattern;
import com.axway.ats.agent.webapp.client.ActionWrapper;
import com.axway.ats.agent.webapp.client.AgentException_Exception;
import com.axway.ats.agent.webapp.client.AgentService;
import com.axway.ats.agent.webapp.client.AgentServicePool;
import com.axway.ats.agent.webapp.client.InternalComponentException;
import com.axway.ats.agent.webapp.client.InternalComponentException_Exception;
import com.axway.ats.core.events.TestcaseStateEventsDispacher;
import com.axway.ats.core.utils.HostUtils;
import com.axway.ats.log.model.LoadQueueResult;

/**
 * This class is responsible for executing actions on a
 * remote ATS Agent
 */
public class DistributedLoadExecutor extends RemoteExecutor {

    private List<String> atsAgents;
    private int          queueSequence;

    public DistributedLoadExecutor( String name, int sequence, List<String> atsAgents,
                                    ThreadingPattern threadingPattern,
                                    LoaderDataConfig loaderDataConfig ) throws AgentException {

        // we assume the ATS Agent address here comes with IP and PORT
        this.atsAgents = atsAgents;

        this.queueName = name;
        this.queueSequence = sequence;
        this.threadingPattern = threadingPattern;
        this.loaderDataConfig = loaderDataConfig;

        //configure the remote loaders(ATS agents)
        try {
            TestcaseStateEventsDispacher.getInstance().onConfigureAtsAgents(atsAgents);
        } catch (Exception e) {
            // we know for sure this is an AgentException, but as the interface declaration is in Core library,
            // we could not declare the AgentException, but its parent - the regular java Exception
            throw(AgentException) e;
        }
    }

    @Override
    public void executeActions( List<ActionRequest> actionRequests ) throws AgentException {

        //set the block until completion param to false
        //this way we'll be able to start all the loaders on all boxes at the same time
        //and then wait for all of them to finish
        final boolean blockUntilCompletion = threadingPattern.isBlockUntilCompletion();
        threadingPattern.setBlockUntilCompletion(false);

        int maxHostCount = atsAgents.size();
        // distribute the threading pattern for each agent host
        final List<ThreadingPattern> distributedPatterns = threadingPattern.distribute(maxHostCount);
        if (distributedPatterns.size() < maxHostCount) {
            log.warn("Threading pattern cannot be distributed across all agents, only the first "
                     + distributedPatterns.size() + " agents will execute actions");
        }

        // distribute the data configurators for each agent host
        final List<LoaderDataConfig> distributedLoaderDataConfigs = loaderDataConfig.distribute(distributedPatterns.size());

        // start queue in the database and retrieve its ID
        int queueId = retrieveQueueId(queueSequence, getHostsList());

        // populate checkpoint summaries for actions
        populateCheckpointsSummary(queueId, actionRequests);

        //call the web service now
        try {

            //first schedule the loaders on all hosts
            for (int i = 0; i < distributedPatterns.size(); i++) {

                //serialize the threading pattern - it's easier to pass it to the web service that way
                byte[] serializedThreadingPattern = serializeObject(distributedPatterns.get(i));
                byte[] serializedLoaderDataConfig = serializeObject(distributedLoaderDataConfigs.get(i));

                //wrap all the action requests
                List<ActionWrapper> actionWrappers = new ArrayList<ActionWrapper>();
                for (ActionRequest actionRequest : actionRequests) {
                    actionWrappers.add(wrapActionRequest(actionRequest));
                }

                //schedule the actions, but do not execute
                //get the client
                AgentService agentServicePort = AgentServicePool.getInstance()
                                                                .getClient(atsAgents.get(i));
                agentServicePort.scheduleActionsInMultipleThreads(queueName, queueId, actionWrappers,
                                                                  serializedThreadingPattern,
                                                                  serializedLoaderDataConfig,
                                                                  distributedPatterns.get(0)
                                                                                .isUseSynchronizedIterations());
            }

            boolean useSynchronizedIterations = distributedPatterns.get(0).isUseSynchronizedIterations();
            if (useSynchronizedIterations && !blockUntilCompletion) {
                // It is non blocking, but synchronized - we have to wait until the queue finish its execution.
                // We first start the queue. This assures the queue is created before the user have the chance
                // to say "wait for completion"
                startSynchedIterations();

                // and then wait in another thread until the queue finish
                ImportantThread helpThread = new ImportantThread(new Runnable() {
                    @Override
                    public void run() {

                        runSynchedIterations();
                    }
                });
                helpThread.setDescription(queueName);
                helpThread.start();
            } else {
                if (useSynchronizedIterations) {
                    // it is blocking - we can wait until the queue finish it execution
                    startSynchedIterations();
                    runSynchedIterations();
                } else {
                    // if blocking - we can wait until the queue finish it execution
                    // if non blocking - as it is not synchronized, we will wait only until the queue is started
                    runNotSynchedIterations(blockUntilCompletion);
                }
            }
        } catch (AgentException_Exception ae) {
            throw new AgentException(ae.getMessage());
        } catch (InternalComponentException_Exception ice) {

            //we need to get internal component exception info from the soap fault
            InternalComponentException faultInfo = ice.getFaultInfo();

            //then construct and throw a real InternalComponentException (not the JAXB mapping type above)
            throw new com.axway.ats.agent.core.exceptions.InternalComponentException(faultInfo.getComponentName(),
                                                                                faultInfo.getActionName(),
                                                                                faultInfo.getExceptionMessage(),
                                                                                faultInfo.getHostIp());

        } catch (Exception e) {
            throw new AgentException(e.getMessage(), e);
        }

        // restore this flag
        threadingPattern.setBlockUntilCompletion(blockUntilCompletion);
    }

    @Override
    public void waitUntilQueueFinish() throws AgentException {

        try {
            for (String host : atsAgents) {
                AgentService agentServicePort = AgentServicePool.getInstance().getClient(host);

                log.info("Waiting until action queue '" + queueName + "' finish its execution on agent '"
                         + host + "'");

                //wait until finished on this host
                agentServicePort.waitUntilQueueFinish(queueName);

                log.info("Action queue '" + queueName + "' finished on agent '" + host + "'");
            }
        } catch (AgentException_Exception ae) {
            throw new AgentException(ae.getMessage());
        } catch (InternalComponentException_Exception ice) {
            throw new AgentException(ice.getMessage() + ", check server log for stack trace");
        } catch (Exception e) {
            throw new AgentException(e.getMessage(), e);
        }
    }

    /**
     * Cancel all running actions on remote machines
     *
     * @throws AgentException on error
     */
    public void cancelAllActions() {

        for (String host : atsAgents) {
            try {
                AgentService agentServicePort = AgentServicePool.getInstance().getClient(host);

                log.info("Cancelling action queue '" + queueName + "' on agent '" + host + "'");

                //cancel any running queues
                agentServicePort.cancelAllQueues();

                log.info("Cancelled action queue '" + queueName + "' on agent '" + host + "'");
            } catch (Exception e) {
                log.error("Error cancelling action queue '" + queueName + "' on agent '" + host + "'", e);
            }
        }
    }

    public boolean isQueueRunning( String queueName ) {

        for (String host : atsAgents) {
            try {
                AgentService agentServicePort = AgentServicePool.getInstance().getClient(host);
                if (agentServicePort.isQueueRunning(queueName)) {
                    log.info("Queue with name '" + queueName + "' is still running on " + host);
                    return true;
                }
            } catch (Exception e) {
                log.error("Error checking if an action queue with name '" + queueName
                          + "' is running on agent " + host, e);
            }
        }

        return false;
    }

    // TODO When running non blocking, this method is started from a dedicated thread,
    // so throwing an error does not affect the main test execution thread,
    // so the test does not fail.
    // We can keep this errors in some structure which can be checked when
    // closing the test case, so we can fail it when needed
    private void runNotSynchedIterations( boolean blockUntilCompletion ) {

        log.info("Start executing action queue '" + queueName + "' on " + atsAgents.toString() + ". "
                 + (blockUntilCompletion
                                         ? "And wait to finish."
                                         : "Will not wait to finish."));
        try {
            // start the actions on all loaders
            for (int i = 0; i < atsAgents.size(); i++) {
                String host = atsAgents.get(i);

                AgentService agentServicePort = AgentServicePool.getInstance().getClient(host);
                agentServicePort.startQueue(queueName);
            }
        } catch (Exception e) {
            String msg = "Error starting action queue '" + queueName + "'";
            log.error(msg, e);
            throw new RuntimeException(msg, e);
        }

        try {
            //wait until finished
            if (blockUntilCompletion) {

                waitUntilQueueFinishOnAllLoaders();
            } else {

                // and then wait in another thread until the queue finish
                ImportantThread helpThread = new ImportantThread(new Runnable() {
                    @Override
                    public void run() {

                        waitUntilQueueFinishOnAllLoaders();
                    }
                });
                helpThread.setDescription(queueName);
                helpThread.start();
            }
        } catch (Exception e) {
            String msg = "Error waiting for completion of action queue '" + queueName + "'";
            log.error(msg, e);
            throw new RuntimeException(msg, e);
        }
    }

    private void waitUntilQueueFinishOnAllLoaders() {

        try {
            log.info("Action queue '" + queueName + "' is running on " + atsAgents.toString());

            for (int i = 0; i < atsAgents.size(); i++) {
                String host = atsAgents.get(i);

                log.info("Waiting until queue '" + queueName + "' finish on '" + host + "'");
                AgentService agentServicePort = AgentServicePool.getInstance().getClient(host);
                agentServicePort.waitUntilQueueFinish(queueName);
                log.info("Finished executing action queue '" + queueName + "' on '" + host + "'");
            }

            // the queue finished but there might be some failed actions
            // check if the wanted actions pass rate is met
            LoadQueueResult queueResult = getQueueResult(threadingPattern.getQueuePassRate(), atsAgents);
            TestcaseStateEventsDispacher.getInstance()
                                        .setQueueFinishedAsFailed(queueResult == LoadQueueResult.FAILED);

            // end the queue in the log
            log.endLoadQueue(queueName, queueResult);
            log.info("Finished executing action queue '" + queueName + "' on all agents "
                     + atsAgents.toString());
        } catch (Exception e) {

            String msg = "Error waiting for action queue '" + queueName + "' completion";
            log.error(msg, e);
            log.endLoadQueue(queueName, LoadQueueResult.FAILED);
            cancelAllActions();
            throw new RuntimeException(msg, e);
        }
    }

    private void startSynchedIterations() {

        log.info("Start executing action queue '" + queueName + "' with synchronized iterations on "
                 + atsAgents.toString());

        try {
            for (String host : atsAgents) {
                AgentService agentServicePort = AgentServicePool.getInstance().getClient(host);
                agentServicePort.startQueue(queueName);
            }
        } catch (Exception e) {
            String msg = "Error running action queue '" + queueName + "'";
            log.error(msg, e);
            throw new RuntimeException(msg, e);
        }
    }

    // TODO When running non blocking, this method is started from a dedicated thread,
    // so throwing an error does not affect the main test execution thread,
    // so the test does not fail.
    // We can keep this errors in some structure which can be checked when
    // closing the test case, so we can fail it when needed
    private void runSynchedIterations() {

        List<String> atsAgentsTmp = new ArrayList<String>(atsAgents);

        // the actions queue is running, control its execution
        try {
            while (true) {

                Iterator<String> agentsIterator = atsAgentsTmp.iterator();
                while (agentsIterator.hasNext()) {
                    AgentService agentServicePort = AgentServicePool.getInstance()
                                                                    .getClient(agentsIterator.next());
                    boolean needToRunAgain = agentServicePort.waitUntilQueueIsPaused(queueName);
                    if (!needToRunAgain) {
                        agentsIterator.remove();
                    }
                }

                if (atsAgentsTmp.size() == 0) {
                    break;
                }

                // resume the actions on all agents
                for (String agent : atsAgentsTmp) {
                    AgentService agentServicePort = AgentServicePool.getInstance().getClient(agent);
                    agentServicePort.resumeQueue(queueName);
                }
            }

            // the queue finished but there might be some failed actions
            // check if the wanted actions pass rate is met
            LoadQueueResult queueResult = getQueueResult(threadingPattern.getQueuePassRate(), atsAgents);
            TestcaseStateEventsDispacher.getInstance()
                                        .setQueueFinishedAsFailed(queueResult == LoadQueueResult.FAILED);

            // end the queue in the log
            log.endLoadQueue(queueName, queueResult);
            log.info("Finished executing action queue '" + queueName + "' on " + atsAgents.toString()
                     + " with synchronized iterations");
        } catch (Exception e) {

            String msg = "Error running action queue '" + queueName + "'";
            log.error(msg, e);
            log.endLoadQueue(queueName, LoadQueueResult.FAILED);
            cancelAllActions();
            throw new RuntimeException(msg, e);
        }
    }

    /**
     * See if the queue has passed or failed based on number of pass and failed iterations
     */
    private LoadQueueResult getQueueResult( float queuePassRate,
                                            List<String> agentsRunningThisQueue ) throws AgentException {

        // the queue has ended, collect info about the executed actions on all agents
        List<ActionExecutionStatistic> queueStatistics = new ArrayList<ActionExecutionStatistic>();
        Iterator<String> agentsIterator = agentsRunningThisQueue.iterator();
        while (agentsIterator.hasNext()) {
            queueStatistics.addAll(getActionExecutionResults(agentsIterator.next(), queueName));
        }

        // sum up statistics for same actions from different queues
        Map<String, ActionExecutionStatistic> summedQueueStatistics = new HashMap<String, ActionExecutionStatistic>();
        for (ActionExecutionStatistic queueStatistic : queueStatistics) {
            String actionName = queueStatistic.getActionName();
            ActionExecutionStatistic summedQueueStatistic = summedQueueStatistics.get(actionName);
            if (summedQueueStatistic == null) {
                summedQueueStatistics.put(actionName, queueStatistic);
            } else {
                // this action is run on more than 1 agent, merge results into a single statistic
                summedQueueStatistic.merge(queueStatistic);
            }
        }

        // calculate the pass rate for this queue
        int maxNumberExecutions = 0; // tells us the number of queue iterations
        int minNumberPassed = Integer.MAX_VALUE; // tells us the number of passed queue iterations
        for (ActionExecutionStatistic statistic : summedQueueStatistics.values()) {

            int executions = statistic.getNumberPassed() + statistic.getNumberFailed();
            if (maxNumberExecutions < executions) {
                maxNumberExecutions = executions;
            }

            int passed = statistic.getNumberPassed();
            if (minNumberPassed > passed) {
                minNumberPassed = passed;
            }
        }

        // % passed iterations
        float actuallyPassed = ((float) minNumberPassed) / maxNumberExecutions * 100;

        if (actuallyPassed >= queuePassRate) {
            return LoadQueueResult.PASSED;
        } else {
            return LoadQueueResult.FAILED;
        }
    }

    /**
     * Get the action execution results for a given queue on a given agent
     */
    @SuppressWarnings( "unchecked")
    public List<ActionExecutionStatistic>
            getActionExecutionResults( String atsAgent, String queueName ) throws AgentException {

        // get the client instance
        AgentService agentServicePort = AgentServicePool.getInstance().getClient(atsAgent);

        try {
            ByteArrayInputStream byteInStream = new ByteArrayInputStream(agentServicePort.getActionExecutionResults(queueName));
            ObjectInputStream objectInStream = new ObjectInputStream(byteInStream);
            return (List<ActionExecutionStatistic>) objectInStream.readObject();
        } catch (Exception ioe) {
            // log hint for further serialization issue investigation
            log.error(ioe);
            throw new AgentException(ioe);
        }
    }

    /**
     * Serialize the threading pattern so we can pass it over the web service
     *
     * @param object the object to serialize
     * @return serialized pattern
     * @throws AgentException on error while serializing
     */
    private final byte[] serializeObject( Object object ) throws AgentException {

        try {
            ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream();
            ObjectOutputStream objectOutStream = new ObjectOutputStream(byteOutStream);
            objectOutStream.writeObject(object);

            return byteOutStream.toByteArray();

        } catch (IOException ioe) {
            throw new AgentException("Could not serialize input arguments for object " + ( (object != null)
                                                                                ? object.toString()
                                                                                : object),
                                     ioe);
        }
    }

    private String getHostsList() {

        StringBuilder hostsLists = new StringBuilder();
        for (String host : atsAgents) {
            if (host.startsWith(HostUtils.LOCAL_HOST_IPv4)) {
                host = host.replace(HostUtils.LOCAL_HOST_IPv4, HostUtils.getLocalHostIP());
            } else if (host.startsWith(HostUtils.LOCAL_HOST_NAME)) {
                host = host.replace(HostUtils.LOCAL_HOST_NAME, HostUtils.getLocalHostIP());
            } else if (host.startsWith(HostUtils.LOCAL_HOST_IPv6)) {
                host = host.replace(HostUtils.LOCAL_HOST_IPv6, HostUtils.getLocalHostIP());
            }
            hostsLists.append( (hostsLists.length() > 0
                                                        ? ", "
                                                        : "")
                               + host);
        }

        return hostsLists.toString();
    }
}


text:
    <button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#navbar-header" aria-controls="navbar-header">
        ☰
    </button>

        Navbar

            @if ($username)

                    Logout {{ $username }}

            @else

                    {{ trans("public.links.login") }}

                    {{ trans("public.links.register") }}

            @endif


text:
from __future__ import print_function

from collections import defaultdict
from itertools import chain
from itertools import zip_longest
import pandas as pd

from ..workflow.entities.request import RequestInstance
from .statistic_helper import Workflow

def _reset_starttime(requestinss, targetobjs_by_target, do_reset=True):
    first_req = None
    end_req = None
    last_req = None
    for requestins in requestinss.values():
        if first_req is None:
            first_req = requestins
        elif first_req.from_seconds > requestins.from_seconds:
            first_req = requestins

        if end_req is None:
            end_req = requestins
        elif end_req.to_seconds < requestins.to_seconds:
            end_req = requestins

        if last_req is None:
            last_req = requestins
        elif last_req.last_seconds < requestins.last_seconds:
            last_req = requestins

    start_s = first_req.from_seconds
    start_t = first_req.from_time
    end_s = end_req.to_seconds
    end_t = end_req.to_time
    last_s = last_req.last_seconds
    last_t = last_req.last_time
    print("lapse: %.4f, (%.4f -> %.4f,%.4f), (%s -> %s,%s)" % (
            end_s - start_s,
            start_s,
            end_s,
            last_s,
            start_t,
            end_t,
            last_t))

    if do_reset:
        for tg in targetobjs_by_target.values():
            tg.offset -= start_s
        end_s = end_s - start_s
        last_s = last_s - start_s
        start_s = 0
        print("zero: %.4f -> %.4f,%.4f" % (start_s, end_s, last_s))

    return {"seconds": {"start": start_s,
                        "end":   end_s,
                        "last":  last_s},
            "time":    {"start": start_t,
                        "end":   end_t,
                        "last":  last_t}}

def _convert_to_dataframe(objs, index, columns):
    # objs: objs to be converted
    # index: the index attr
    # columns: appended "_entity" column
    if index is None:
        index_vals = None
    else:
        objs = [obj for obj in objs]
        index_vals = [getattr(obj, index) for obj in objs]
    f_getvals = []
    cols = []
    for col in columns:
        if isinstance(col, str):
            def _make_getattr(col):
                return lambda o: getattr(o, col)
            cols.append(col)
            f_getvals.append(_make_getattr(col))
        else:
            assert isinstance(col, tuple)
            assert len(col) == 2
            assert isinstance(col[0], str)
            cols.append(col[0])
            f_getvals.append(col[1])
    f_getvals.append(lambda e:e)
    cols.append("_entity")

    df = pd.DataFrame((tuple(f(o) for f in f_getvals) for o in objs),
                       index=index_vals,
                       columns=cols)
    return df

def generate_dataframes(requestinss):
    targetobjs_by_target = {t.target: t
                            for r in requestinss.values()
                            for t in r.target_objs}
    requestinss_by_type = defaultdict(list)
    for r in requestinss.values():
        assert isinstance(r, RequestInstance)
        requestinss_by_type[r.request_type].append(r)

    ## adjust offset
    start_end = _reset_starttime(requestinss, targetobjs_by_target)

    workflow_by_type = {}
    for r_type, reqinss in requestinss_by_type.items():
        requestins_iters = [r.iter_mainints() for r in reqinss]
        workflow = Workflow(r_type)
        for intervals in zip_longest(*requestins_iters):
            workflow.build(intervals)
        workflow.reduce()
        workflow.ready()
        workflow_by_type[r_type] = workflow

    ## prepare dataframes
    targets_df = _convert_to_dataframe(
            targetobjs_by_target.values(),
            "target",
            ("component",
             "host"))

    join_intervals_df = _convert_to_dataframe(
            chain(chain.from_iterable(req.iter_joins() for req in requestinss.values())),
            None,
            ("request",
             "request_type",
             "int_name",
             "lapse",
             "path",
             "from_seconds",
             "to_seconds",
             "from_time",
             "to_time",
             "from_keyword",
             "to_keyword",
             ("int_type", lambda i: i.__class__.__name__),

             ("desc", lambda i: "%s: %s -> %s" % (i.path,
                                                  i.from_keyword,
                                                  i.to_keyword)),
             "order",
             "is_main",
             "remote_type",
             "from_target",
             "to_target",
             "from_host",
             "to_host",
             ("hosts", lambda i: "%s -> %s" % (i.from_host,
                                               i.to_host)),
             "from_component",
             "to_component",
             "from_thread",
             "to_thread"))

    td_intervals_df = _convert_to_dataframe(
            chain.from_iterable(req.iter_threadints() for req in requestinss.values()),
            None,
            ("request",
             "request_type",
             "int_name",
             "lapse",
             "path",
             "from_seconds",
             "to_seconds",
             "from_time",
             "to_time",
             "from_keyword",
             "to_keyword",
             ("int_type", lambda i: i.__class__.__name__),

             ("desc", lambda i: "%s: %s -> %s" % (i.path,
                                                  i.from_keyword,
                                                  i.to_keyword)),
             "order",
             "is_main",
             "target",
             "host",
             "component",
             "thread"))

    request_df = _convert_to_dataframe(
            requestinss.values(),
            "request",
            ("request_type",
             "int_name",
             "lapse",
             "path",
             "from_seconds",
             "to_seconds",
             "from_time",
             "to_time",
             "from_keyword",
             "to_keyword",
             ("int_type", lambda i: i.__class__.__name__),

             "request_state",
             "last_seconds",
             "last_time",
             "len_paces",
             "len_main_paces",
             ("len_threads", lambda r: len(r.thread_objs)),
             ("len_threadinss", lambda r: len(r.threadinss)),
             ("len_targets", lambda r: len(r.target_objs)),
             ("len_hosts", lambda r: len(r.hosts))))

    #vars
    invalid_keys = set()
    valid_keys = set()
    for req in requestinss.values():
        for k, v in req.request_vars.items():
            if len(v) > 1:
                valid_keys.discard(k)
                invalid_keys.add(k)
            elif len(v) == 1:
                if k not in invalid_keys:
                    valid_keys.add(k)

    def _get_val(k):
        return lambda r: list(r.request_vars.get(k, [None]))[0]
    request_vars_df = _convert_to_dataframe(
            requestinss.values(),
            "request",
            ((k, _get_val(k)) for k in valid_keys))

    return (requestinss_by_type,
            targetobjs_by_target,
            workflow_by_type,
            start_end,
            join_intervals_df, td_intervals_df,
            request_df, targets_df,
            request_vars_df)


text:
<?php
namespace W3TC;

class Extension_Swarmify_AdminActions {
	public function w3tc_swarmify_set_key() {
		if ( isset( $_REQUEST['status'] ) && isset( $_REQUEST['swarmcdnkey'] ) && $_REQUEST['status'] == '1' ) {
			$config = Dispatcher::config();
			$config->set( array( 'swarmify', 'api_key' ), $_REQUEST['swarmcdnkey'] );
			$config->save();
		}

		Util_Environment::redirect( Util_Ui::admin_url(
			'admin.php?page=w3tc_extensions&extension=swarmify&action=view' ) );
		exit();
	}
}


text:
<?php

/* ::base.html.twig */
class __TwigTemplate_e2534f8cd7d4b5df187c2dec9eadc43ff622b78353c385612bf98b70a4446cfb extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
            'title' => array($this, 'block_title'),
            'stylesheets' => array($this, 'block_stylesheets'),
            'javascripts' => array($this, 'block_javascripts'),
            'body' => array($this, 'block_body'),
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "<!DOCTYPE html>

    <meta charset=\"utf-8\">
    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">
    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
    <title>";
        // line 7
        $this->displayBlock('title', $context, $blocks);
        echo "</title>

    <link href=\"";
        // line 10
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("dist/css/bootstrap.min.css"), "html", null, true);
        echo "\" rel=\"stylesheet\">

    <link rel=\"stylesheet\" href=\"";
        // line 12
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("dist/css/bootstrap-theme.min.css"), "html", null, true);
        echo "\">

    <link rel=\"stylesheet\" href=\"";
        // line 14
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("css/style.css"), "html", null, true);
        echo "\">
    ";
        // line 15
        $this->displayBlock('stylesheets', $context, $blocks);
        // line 16
        echo "

    ";
        // line 21
        $this->displayBlock('javascripts', $context, $blocks);
        // line 22
        echo "

    ";
        // line 31
        if ($this->env->getExtension('security')->isGranted("ROLE_ADMIN")) {
            // line 32
            echo "

 Welcome, ";
            // line 34
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : null), "user", array()), "username", array()), "html", null, true);
            echo ", env->getExtension('routing')->getPath("fos_user_security_logout");
            echo "\">logout

    ";
        }
        // line 38
        echo "

            ";
        // line 41
        $this->displayBlock('body', $context, $blocks);
        // line 42
        echo "

";
    }

    // line 7
    public function block_title($context, array $blocks = array())
    {
        echo "Welcome!";
    }

    // line 15
    public function block_stylesheets($context, array $blocks = array())
    {
    }

    // line 21
    public function block_javascripts($context, array $blocks = array())
    {
    }

    // line 41
    public function block_body($context, array $blocks = array())
    {
    }

    public function getTemplateName()
    {
        return "::base.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  125 => 41,  120 => 21,  115 => 15,  109 => 7,  98 => 42,  96 => 41,  91 => 38,  82 => 34,  78 => 32,  76 => 31,  65 => 22,  63 => 21,  59 => 20,  53 => 16,  51 => 15,  47 => 14,  42 => 12,  37 => 10,  31 => 7,  23 => 1,);
    }
}


text:
#include "arch/sparc/insts/branch.hh"

////////////////////////////////////////////////////////////////////
//
// Branch instructions
//

namespace gem5
{

namespace SparcISA
{

template class BranchNBits<19>;
template class BranchNBits<22>;
template class BranchNBits<30>;

std::string
Branch::generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const
{
    std::stringstream response;

    printMnemonic(response, mnemonic);
    printRegArray(response, &srcRegIdx(0), _numSrcRegs);
    if (_numDestRegs && _numSrcRegs)
            response << ", ";
    printDestReg(response, 0);

    return response.str();
}

std::string
BranchImm13::generateDisassembly(
        Addr pc, const loader::SymbolTable *symtab) const
{
    std::stringstream response;

    printMnemonic(response, mnemonic);
    printRegArray(response, &srcRegIdx(0), _numSrcRegs);
    if (_numSrcRegs > 0)
        response << ", ";
    ccprintf(response, "0x%x", imm);
    if (_numDestRegs > 0)
        response << ", ";
    printDestReg(response, 0);

    return response.str();
}

std::string
BranchDisp::generateDisassembly(
        Addr pc, const loader::SymbolTable *symtab) const
{
    std::stringstream response;

    Addr target = disp + pc;

    printMnemonic(response, mnemonic);
    ccprintf(response, "%#x", target);

    loader::SymbolTable::const_iterator it;
    if (symtab && (it = symtab->findNearest(target)) != symtab->end()) {
        ccprintf(response, " <%s", it->name);
        if (it->address != target)
            ccprintf(response, "+%d>", target - it->address);
        else
            ccprintf(response, ">");
    }

    return response.str();
}

} // namespace SparcISA
} // namespace gem5


text:
import * as React from 'react';

import './func.less';

import draw from './draw';

export default class Func1 extends React.Component<any,any> {
	constructor(props){
    super(props);
  };

  componentDidMount(){
		var img=require('./1.jpg');
		draw.init(img);
  };
  componentWillUnmount(){
  	draw.distroy();
  };
  render() {
    return (

canvas draw picture

					<button className="ybtn ybtn-info" id="color">color</button>
					<button className="ybtn ybtn-success" id="size">size</button>
					<button className="ybtn ybtn-danger" id="eraser">eraser</button>
					<button className="ybtn ybtn-warning" id="text">text</button>

					<button className="ybtn ybtn-info" id="clean">clean</button>
					<button className="ybtn ybtn-success" id="pre">撤销</button>
					<button className="ybtn ybtn-danger" id="next">重做</button>
					<button className="ybtn ybtn-warning" id="save">保存</button>

					<textarea id="txtArea" colSpan={50} rowSpan={5}></textarea>

					<canvas id="imgCanvas"></canvas>
					<canvas id="canvas"></canvas>

    )
  };
}


text:
package me.champeau.gradle.japicmp.report;

import japicmp.model.JApiCompatibility;

public interface ViolationRule {
    Violation maybeViolation(JApiCompatibility member);
}


text:
using Microsoft.OData.Core;
using Microsoft.OData.Edm;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.Dispatcher;
using System.Web.Http.Filters;
using System.Web.OData;
using System.Web.OData.Formatter;
using System.Web.OData.Formatter.Deserialization;
using System.Web.OData.Formatter.Serialization;

namespace jqGridExtension
{
    public class jqGridODataHelper
    {
        public static void Register(HttpConfiguration config)
        {
            var formatters = ODataMediaTypeFormatters.Create(new CustomODataSerializerProvider(), new DefaultODataDeserializerProvider());
            config.Formatters.InsertRange(0, formatters);

            //config.MessageHandlers.Insert(0, new jqGridODataHandler(config));
        }
    }

    public class jqGridODataHandler : DelegatingHandler
    {
        public jqGridODataHandler(HttpConfiguration httpConfiguration)
        {
            InnerHandler = new HttpControllerDispatcher(httpConfiguration);
        }

        protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            return base.SendAsync(request, cancellationToken).ContinueWith(
                task =>
                {
                    var response = task.Result;
                    IEnumerable<string> headers;
                    if (request.Headers.TryGetValues("Prefer", out headers))
                        response.Content.Headers.Add("Preference-Applied", headers);

                    return response;
                },
                cancellationToken
            );
        }
    }

    public class CustomODataDeserializerProvider : DefaultODataDeserializerProvider
    {
        private readonly CustomODataFeedDeserializer _feedSerializer;

        public CustomODataDeserializerProvider()
        {
            _feedSerializer = new CustomODataFeedDeserializer(this);
        }

        public override ODataEdmTypeDeserializer GetEdmTypeDeserializer(IEdmTypeReference edmType)
        {
            var serializer = base.GetEdmTypeDeserializer(edmType);
            var feedSerializer = serializer as ODataFeedDeserializer;
            return feedSerializer != null ? _feedSerializer : serializer;
        }
    }

    public class CustomODataFeedDeserializer : ODataFeedDeserializer
    {
        public CustomODataFeedDeserializer(ODataDeserializerProvider serializerProvider)
            : base(serializerProvider)
        {
        }

        public override IEnumerable ReadFeed(ODataFeedWithEntries feed, IEdmEntityTypeReference elementType, ODataDeserializerContext readContext)
        {
            IEnumerable feedInstance = base.ReadFeed(feed, elementType, readContext);
            return feedInstance;
        }
    }

    public class CustomODataSerializerProvider : DefaultODataSerializerProvider
    {
        private readonly CustomODataFeedSerializer _feedSerializer;

        public CustomODataSerializerProvider()
        {
            _feedSerializer = new CustomODataFeedSerializer(this);
        }

        public override ODataEdmTypeSerializer GetEdmTypeSerializer(IEdmTypeReference edmType)
        {
            var serializer = base.GetEdmTypeSerializer(edmType);
            var feedSerializer = serializer as ODataFeedSerializer;
            return feedSerializer != null ? _feedSerializer : serializer;
        }
    }

    public class CustomODataFeedSerializer : ODataFeedSerializer
    {
        public CustomODataFeedSerializer(ODataSerializerProvider serializerProvider)
            : base(serializerProvider)
        {
        }

        public override ODataFeed CreateODataFeed(IEnumerable feedInstance, IEdmCollectionTypeReference feedType, ODataSerializerContext writeContext)
        {
            ODataFeed feed = base.CreateODataFeed(feedInstance, feedType, writeContext);

            if (feedInstance != null)
            {
                var options = writeContext.Request.RequestUri.ParseQueryString();
                int skip;
                int.TryParse(options["$skip"], out skip);

                object oPageSize, oUserData;
                int iPageSize = 0;
                if (writeContext.Request.Properties.TryGetValue("PageSize", out oPageSize))
                    iPageSize = (int)oPageSize;
                string sUserData = "{}";
                if (writeContext.Request.Properties.TryGetValue("userdata", out oUserData))
                    sUserData = oUserData as string

                var records = (int)feed.Count.GetValueOrDefault(0);
                //var records = writeContext.Request.ODataProperties().TotalCount;
                var total = (int)Math.Ceiling((double)records / iPageSize);
                var page = (int)Math.Ceiling((double)skip / iPageSize) + 1;

                var value = new ODataComplexValue()
                {
                    TypeName = "jqGridExtension.GridModelAnnotate",
                    Properties = new List<ODataProperty>
                    {
                        new ODataProperty { Name = "page", Value = page },
                        new ODataProperty { Name = "records", Value = records },
                        new ODataProperty { Name = "total", Value = total },
                        new ODataProperty { Name = "userdata", Value = sUserData }
                    }
                };

                feed.InstanceAnnotations.Add(new ODataInstanceAnnotation("jqgrid.GridModelAnnotate", value));
            }

            return feed;
        }
    }

    public class JQGridODataQueryableAttribute : ActionFilterAttribute
    {
        public int PageSize { get; set; }

        public override void OnActionExecuting(HttpActionContext actionContext)
        {
            base.OnActionExecuting(actionContext);

            if (PageSize == 0)
            {
                var enableQuery = actionContext.ActionDescriptor.GetCustomAttributes<EnableQueryAttribute>().FirstOrDefault();
                if (enableQuery != null)
                    PageSize = enableQuery.PageSize;
            }

            actionContext.Request.Properties["PageSize"] = PageSize;
        }
    }

    public class GridModelAnnotate
    {
        public int total { get; set; }
        public int page { get; set; }
        public int records { get; set; }
        public string userdata { get; set; }
    }
}


text:
package cache

import (
	"time"

	utilclock "k8s.io/apimachinery/pkg/util/clock"
	"k8s.io/apiserver/pkg/authentication/authenticator"
	"k8s.io/apiserver/pkg/authentication/user"
)

// cacheRecord holds the three return values of the authenticator.Token AuthenticateToken method
type cacheRecord struct {
	user user.Info
	ok   bool
	err  error
}

type cachedTokenAuthenticator struct {
	authenticator authenticator.Token

	successTTL time.Duration
	failureTTL time.Duration

	cache cache
}

type cache interface {
	// given a key, return the record, and whether or not it existed
	get(key string) (value *cacheRecord, exists bool)
	// caches the record for the key
	set(key string, value *cacheRecord, ttl time.Duration)
	// removes the record for the key
	remove(key string)
}

// New returns a token authenticator that caches the results of the specified authenticator. A ttl of 0 bypasses the cache.
func New(authenticator authenticator.Token, successTTL, failureTTL time.Duration) authenticator.Token {
	return newWithClock(authenticator, successTTL, failureTTL, utilclock.RealClock{})
}

func newWithClock(authenticator authenticator.Token, successTTL, failureTTL time.Duration, clock utilclock.Clock) authenticator.Token {
	return &cachedTokenAuthenticator{
		authenticator: authenticator,
		successTTL:    successTTL,
		failureTTL:    failureTTL,
		cache:         newStripedCache(32, fnvKeyFunc, func() cache { return newSimpleCache(128, clock) }),
	}
}

// AuthenticateToken implements authenticator.Token
func (a *cachedTokenAuthenticator) AuthenticateToken(token string) (user.Info, bool, error) {
	if record, ok := a.cache.get(token); ok {
		return record.user, record.ok, record.err
	}

	user, ok, err := a.authenticator.AuthenticateToken(token)

	switch {
	case ok && a.successTTL > 0:
		a.cache.set(token, &cacheRecord{user: user, ok: ok, err: err}, a.successTTL)
	case !ok && a.failureTTL > 0:
		a.cache.set(token, &cacheRecord{user: user, ok: ok, err: err}, a.failureTTL)
	}

	return user, ok, err
}


text:
package org.jetbrains.plugins.scala.lang.psi.api.expr

import org.jetbrains.plugins.scala.extensions._
import org.jetbrains.plugins.scala.lang.parser.util.ParserUtils
import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor
import org.jetbrains.plugins.scala.lang.psi.api.base.ScInfixElement
import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeArgs
import org.jetbrains.plugins.scala.lang.resolve.ScalaResolveResult

trait ScInfixExpr extends ScExpression with ScSugarCallExpr with ScInfixElement {

  import ScInfixExpr._

  type Kind = ScExpression
  type Reference = ScReferenceExpression

  override def left: ScExpression = unapply._1

  override def operation: ScReferenceExpression = extractOperationRef(unapply._2)

  override def rightOption: Option[ScExpression] = Option(right)

  def right: ScExpression = unapply._3

  def typeArgs: Option[ScTypeArgs] =
    getInvokedExpr.asOptionOf[ScGenericCall].map(_.typeArgs)

  override def getBaseExpr: ScExpression = {
    val withAssoc(base, _, _) = this
    base
  }

  override def getInvokedExpr: ScExpression = unapply._2

  override def argsElement: ScExpression = {
    val withAssoc(_, _, argument) = this
    argument
  }

  def isAssignmentOperator: Boolean =
    ParserUtils.isAssignmentOperator(operation.getText)

  def isAssignment: Boolean = isAssignmentOperator && (
    operation.textMatches("=") ||
      operation.multiResolveScala(incomplete = false).exists {
        case ScalaResolveResult(element, _) => element.name + "=" == operation.refName
      }
  )

  override protected def acceptScala(visitor: ScalaElementVisitor): Unit = {
    visitor.visitInfixExpression(this)
  }

  private def unapply: (ScExpression, ScExpression, ScExpression) =
    findChildren[ScExpression] match {
      case Seq(left, operation, right) => (left, operation, right)
      case _                           => malformedInfixExpr(getText)
    }
}

object ScInfixExpr {
  private def malformedInfixExpr(text: String): Nothing =
    throw new RuntimeException("Malformed infix expr: " + text)

  private def extractOperationRef(invoked: ScExpression): ScReferenceExpression = invoked match {
    case ref: ScReferenceExpression => ref
    case ScGenericCall(ref, _)      => ref
    case _                          => malformedInfixExpr(invoked.getParent.getText)
  }

  def unapply(expression: ScInfixExpr): Option[(ScExpression, ScReferenceExpression, ScExpression)] =
    Option(expression.unapply).map { case (l, invoked, r) => (l, extractOperationRef(invoked), r) }

  object withAssoc {

    def unapply(expression: ScInfixExpr): Some[(ScExpression, ScReferenceExpression, ScExpression)] = {
      val (left, invoked, right) = expression.unapply
      val op = extractOperationRef(invoked)

      if (expression.isRightAssoc) Some(right, op, left)
      else                         Some(left, op, right)
    }
  }
}


text:
{extends 'layout.html'}
{block title append} - Simple{/block}

{block menu}
MENU
{/block}

{block content}
CONTENT
{/block}


text:
<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>PHPExcel classes » \PHPExcel_Shared_JAMA_LUDecomposition</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">

PHPExcel classes

                                    API Documentation

Packages

 Default

 JAMA

 JAMA
Cholesky decomposition class
For a symmetric, positive definite matrix A, the Cholesky decomposition
is an lower triangular matrix L so that A = L*L'

 JAMA
Class to obtain eigenvalues and eigenvectors of a real matrix

 JAMA
Error handling

 JAMA
For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n
unit lower triangular matrix L, an n-by-n upper triangular matrix U,
and a permutation vector piv of length m so that A(piv,:) = L*U

 JAMA
For an m-by-n matrix A with m >= n, the QR decomposition is an m-by-n
orthogonal matrix Q and an n-by-n upper triangular matrix R so that
A = Q*R

 JAMA
For an m-by-n matrix A with m >= n, the singular value decomposition is
an m-by-n orthogonal matrix U, an n-by-n diagonal matrix S, and
an n-by-n orthogonal matrix V so that A = U*S*V'

 JAMA
Pythagorean Theorem:
a = 3
b = 4
r = sqrt(square(a) + square(b))
r = 5
r = sqrt(a^2 + b^2) without under/overflow

 PHPExcel

                                    Charts

 Class hierarchy diagram

                                    Reports

 Errors
                519

 Markers

todo
                19

fixme
                10

 Deprecated elements
                12

Back to top

                            Javascript is disabled; several features are only available
                            if Javascript is enabled.

<button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button>

<button class="btn details" title="Show descriptions and method names"></button><button class="btn simple" title="Show only method names"></button>

 Methods

LU Decomposition constructor.
__construct()

Count determinants
det()

Alias for getPivot
getDoublePivot()

Get lower triangular factor.
getL()

Return pivot permutation vector.
getPivot()

Get upper triangular factor.
getU()

Is the matrix nonsingular?
isNonsingular()

Solve A*X = B
solve()

 Properties

» Private

$LU

$m

$n

$piv

$pivsign

 Constants

MatrixSingularException
MatrixSingularException

MatrixSquareException
MatrixSquareException

\

global

\PHPExcel_Shared_JAMA_LUDecomposition

package
<a href="../packages/JAMA%0D%0AFor%20an%20m-by-n%20matrix%20A%20with%20m%20>=%20n,%20the%20LU%20decomposition%20is%20an%20m-by-n%0D%0Aunit%20lower%20triangular%20matrix%20L,%20an%20n-by-n%20upper%20triangular%20matrix%20U,%0D%0Aand%20a%20permutation%20vector%20piv%20of%20length%20m%20so%20that%20A(piv,:)%20=%20L*U.%0D%0AIf%20m%20<%20n,%20then%20L%20is%20m-by-m%20and%20U%20is%20m-by-n.%0D%0AThe%20LU%20decompostion%20with%20pivoting%20always%20exists,%20even%20if%20the%20matrix%20is%0D%0Asingular,%20so%20the%20constructor%20will%20never%20fail.%20The%20primary%20use%20of%20the%0D%0ALU%20decomposition%20is%20in%20the%20solution%20of%20square%20systems%20of%20simultaneous%0D%0Alinear%20equations.%20This%20will%20fail%20if%20isNonsingular()%20returns%20false..html">JAMA
For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n
unit lower triangular matrix L, an n-by-n upper triangular matrix U,
and a permutation vector piv of length m so that A(piv,:) = L*U.
If m < n, then L is m-by-m and U is m-by-n.
The LU decompostion with pivoting always exists, even if the matrix is
singular, so the constructor will never fail. The primary use of the
LU decomposition is in the solution of square systems of simultaneous
linear equations. This will fail if isNonsingular() returns false.

author
Paul Meagher

author
Bartosz Matosiuk

author
Michael Bommarito

version
1.1

license
PHP v3.0

 Methods

LU Decomposition constructor.

__construct($A) : \Structure

Parameters

$A

Rectangular matrix

Returns

\Structureto access L, U and piv.

Count determinants

det() : array

Returns

arrayd matrix deterninat

Alias for getPivot

getDoublePivot()

see
\getPivot

Get lower triangular factor.

getL() : array

Returns

arrayLower triangular factor

Return pivot permutation vector.

getPivot() : array

Returns

arrayPivot vector

Get upper triangular factor.

getU() : array

Returns

arrayUpper triangular factor

Is the matrix nonsingular?

isNonsingular() : true

Returns

trueif U, and hence A, is nonsingular.

Solve A*X = B

solve($B) : \X

PHPExcel_Calculation_Exception
IllegalArgumentException Matrix row dimensions must agree.

PHPExcel_Calculation_Exception
RuntimeException  Matrix is singular.

Parameters

$B

A Matrix with as many rows as A and any number of columns.

Returns

\Xso that L*U*X = B(piv,:)

 Properties

$LU : array

$m : int

$n : int

$piv : array

$pivsign : int

 Constants

MatrixSingularException

MatrixSingularException

MatrixSquareException

MatrixSquareException

            Template is built using Twitter Bootstrap 2 and icons provided by Glyphicons.

            Documentation is powered by phpDocumentor 2.0.0a12 and

            generated on 2013-06-02T15:42:50+01:00.


text:
package com.gooddata.sdk.model.md;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.gooddata.sdk.common.util.GoodDataToStringBuilder;

import java.util.Collection;

/**
 * Metadata bulk get result
 */
@JsonTypeName("objects")
@JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME)
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BulkGet {

    public static final String URI = "/gdc/md/{projectId}/objects/get";

    private final Collection<Obj> items;

    @JsonCreator
    BulkGet(@JsonProperty("items") Collection<Obj> items) {
        this.items = items;
    }

    public Collection<Obj> getItems() {
        return items;
    }

    @Override
    public String toString() {
        return GoodDataToStringBuilder.defaultToString(this);
    }
}


text:
<!--

    Copyright (C) 2014-2018 LinkedIn Corp. (pinot-core@linkedin.com)

    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.

-->
<assembly
  xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
  <id>bin</id>
  <formats>
    <format>zip</format>
    <format>dir</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <dependencySets>
    <dependencySet>
      <useProjectArtifact>false</useProjectArtifact>
      <useTransitiveDependencies>true</useTransitiveDependencies>
      <outputDirectory>lib</outputDirectory>
      <unpack>false</unpack>
      <excludes>
        <exclude>${project.groupId}:*:*</exclude>
      </excludes>
    </dependencySet>
    <dependencySet>
      <useProjectArtifact>false</useProjectArtifact>
      <useTransitiveDependencies>true</useTransitiveDependencies>
      <outputDirectory>lib</outputDirectory>
      <unpack>false</unpack>
      <includes>
        <include>${project.groupId}:*:*</include>
      </includes>
    </dependencySet>
  </dependencySets>
  <fileSets>
    <fileSet>
      <directory>${pinot.root}</directory>
      <includes>
        <include>LICENSE</include>
      </includes>
      <outputDirectory></outputDirectory>
    </fileSet>
    <fileSet>
      <useDefaultExcludes>false</useDefaultExcludes>
      <directory>${pinot.root}/pinot-controller/src/main/resources/webapp</directory>
      <outputDirectory>query_console</outputDirectory>
    </fileSet>
    <fileSet>
      <useDefaultExcludes>false</useDefaultExcludes>
      <directory>${pinot.root}/pinot-tools/src/main/resources/conf</directory>
      <outputDirectory>conf</outputDirectory>
    </fileSet>
    <fileSet>
      <useDefaultExcludes>false</useDefaultExcludes>
      <directory>${pinot.root}/pinot-tools/src/main/resources/sample_data</directory>
      <outputDirectory>sample_data/</outputDirectory>
    </fileSet>
    <fileSet>
      <useDefaultExcludes>false</useDefaultExcludes>
      <directory>${pinot.root}/pinot-tools/src/main/resources/sample_data_realtime</directory>
      <outputDirectory>sample_data</outputDirectory>
    </fileSet>
    <fileSet>
      <useDefaultExcludes>false</useDefaultExcludes>
      <directory>${pinot.root}/pinot-tools/target/pinot-tools-pkg/bin</directory>
      <outputDirectory>bin</outputDirectory>
      <fileMode>0755</fileMode>
    </fileSet>
  </fileSets>
</assembly>


text:
package org.ihtsdo.otf.query.integration.tests;

import java.io.IOException;
import org.ihtsdo.otf.query.implementation.Clause;
import org.ihtsdo.otf.query.implementation.Query;
import org.ihtsdo.otf.tcc.api.metadata.binding.Snomed;
import org.ihtsdo.otf.tcc.api.nid.NativeIdSetBI;
import org.ihtsdo.otf.tcc.api.store.Ts;

/**
 * Creates a test for the
 * ConceptIs clause.
 *
 * @author dylangrald
 */
public class ConceptIsTest extends QueryClauseTest {

    public ConceptIsTest() throws IOException {
        final SetViewCoordinate vc = new SetViewCoordinate(2001, 1, 31, 0, 0);
        this.q = new Query() {
            @Override
            protected NativeIdSetBI For() throws IOException {
                return Ts.get().getAllConceptNids();
            }

            @Override
            public void Let() throws IOException {
                let("motion", Snomed.MOTION);
//                let("v2", vc.getViewCoordinate());
            }

            @Override
            public Clause Where() {
                return Or(ConceptIs("motion"));
            }
        };
    }
}


text:
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import { Text } from 'react-native';

import RaisedButton from '../raised-button';
import { styles } from './styles';

export default class RaisedTextButton extends PureComponent {
  static defaultProps = {
    titleColor: 'rgb(66, 66, 66)',
    disabledTitleColor: 'rgba(0, 0, 0, .26)',
  };

  static propTypes = {
    ...RaisedButton.propTypes,

    title: PropTypes.string.isRequired,
    titleColor: PropTypes.string,
    disabledTitleColor: PropTypes.string,
  };

  render() {
    let { title, titleColor, disabledTitleColor, ...props } = this.props;
    let { disabled } = this.props;

    let titleStyle = {
      color: disabled? disabledTitleColor : titleColor,
    };

    return (
      <RaisedButton rippleColor={titleColor} shadeColor={titleColor} {...props}>
        <Text style={[styles.text, titleStyle]} numberOfLines={1}>
          {String(title).toUpperCase()}
        </Text>
      </RaisedButton>
    );
  }
}


text:
package es.hol.galvisoft.aerolina.fragments.find;

import android.app.Activity;
import android.app.DialogFragment;
import android.app.Fragment;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.Spinner;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;

import es.hol.galvisoft.aerolina.R;
import es.hol.galvisoft.aerolina.data.AirportDataManager;
import es.hol.galvisoft.aerolina.fragments.CustomDialogFragment;
import es.hol.galvisoft.aerolina.model.Airport;

/**
 * Creado por Juan Carlos el dia 31/05/2015.
 */
public class MainFragment extends Fragment implements View.OnClickListener {
    private TextView tvOriginCity, tvDestinyCity, tvRoundDate, tvTripDate;
    private CheckBox cbRoundTrip;
    private List<Airport> airports;
    private String roundAirport, tripAirport;
    private String originName, destinationName, roundDate, tripDate;
    private Activity context;
    private Date dtRound, dtTrip;
    private int classType;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        context = getActivity();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_find_main, container, false);
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        configureUI();
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.date_round: {
                selectRoundDate();
                break;
            }
            case R.id.date_trip: {
                selectTripDate();
                break;
            }
            case R.id.destiny: {
                selectDestiny();
                break;
            }
            case R.id.origin: {
                selectOrigin();
                break;
            }
            case R.id.bt_exchange: {
                exchange();
                break;
            }
        }
    }

    private void configureUI() {
        AirportDataManager airportDM = new AirportDataManager(context);
        airports = airportDM.getAll();
        tvOriginCity = (TextView) context.findViewById(R.id.origin);
        tvOriginCity.setSelected(true);
        tvOriginCity.setOnClickListener(this);
        tvDestinyCity = (TextView) context.findViewById(R.id.destiny);
        tvDestinyCity.setSelected(true);
        tvDestinyCity.setOnClickListener(this);
        tvRoundDate = (TextView) context.findViewById(R.id.date_round);
        tvRoundDate.setOnClickListener(this);
        tvTripDate = (TextView) context.findViewById(R.id.date_trip);
        tvTripDate.setOnClickListener(this);
        context.findViewById(R.id.bt_exchange).setOnClickListener(this);
        final TableRow tableRow = (TableRow) context.findViewById(R.id.row_date_trip);
        cbRoundTrip = (CheckBox) context.findViewById(R.id.roundtrip);
        cbRoundTrip.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                if (isChecked) {
                    tableRow.setVisibility(View.VISIBLE);
                } else {
                    tableRow.setVisibility(View.GONE);
                }
            }
        });
        if (roundDate != null) {
            tvRoundDate.setText(roundDate);
            tvOriginCity.setText(originName);
            tvDestinyCity.setText(destinationName);
            if (tripDate != null) {
                tvTripDate.setText(tripDate);
                cbRoundTrip.setChecked(true);
            }
        }
    }

    public void selectOrigin() {
        DialogFragment dialogFragment = new CustomDialogFragment();
        ((CustomDialogFragment) dialogFragment).setAirports(airports);
        Bundle args = new Bundle();
        args.putInt(CustomDialogFragment.TYPE, CustomDialogFragment.ORIGIN_CITY);
        dialogFragment.setArguments(args);
        dialogFragment.show(context.getFragmentManager(), "cities");
    }

    public void selectDestiny() {
        List<Airport> destAirports = new ArrayList<>();
        for (Airport airport : airports) {
            if (!airport.getIata().equalsIgnoreCase(roundAirport)) {
                destAirports.add(airport);
            }
        }
        DialogFragment dialogFragment = new CustomDialogFragment();
        ((CustomDialogFragment) dialogFragment).setAirports(destAirports);
        Bundle args = new Bundle();
        args.putInt(CustomDialogFragment.TYPE, CustomDialogFragment.DESTINY_CITY);
        dialogFragment.setArguments(args);
        dialogFragment.show(context.getFragmentManager(), "cities");
    }

    public void selectRoundDate() {
        DialogFragment dialogFragment = new CustomDialogFragment();
        Bundle args = new Bundle();
        args.putInt(CustomDialogFragment.TYPE, CustomDialogFragment.DATE_ROUND);
        dialogFragment.setArguments(args);
        dialogFragment.show(context.getFragmentManager(), "cities");
    }

    public void selectTripDate() {
        if (TextUtils.isEmpty(tvRoundDate.getText())) {
            showToast(getResources().getString(R.string.should_round_date_first));
            return;
        }
        DialogFragment dialogFragment = new CustomDialogFragment();
        Bundle args = new Bundle();
        args.putInt(CustomDialogFragment.TYPE, CustomDialogFragment.DATE_TRIP);
        dialogFragment.setArguments(args);
        dialogFragment.show(context.getFragmentManager(), "cities");
    }

    public void setOriginCity(String code, String name) {
            this.originName = name;
        this.tvOriginCity.setText(name);
        this.tvOriginCity.setContentDescription(code);
        roundAirport = code;
        if (roundAirport.equalsIgnoreCase(tripAirport)) {
            setDestinyCity(null, null);
        }
    }

    public String getOriginCity() {
        return roundAirport;
    }

    public void setDestinyCity(String code, String name) {
        this.destinationName = name;
        this.tvDestinyCity.setText(name);
        this.tvDestinyCity.setContentDescription(code);
        tripAirport = code;
    }

    public String getDestinyCity() {
        return tripAirport;
    }

    public boolean isRoundTrip() {
        return cbRoundTrip.isChecked();
    }

    public void setDateRound(int year, int monthOfYear, int dayOfMonth) {
        Calendar cal = Calendar.getInstance();
        GregorianCalendar today = new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH));
        GregorianCalendar roundDate = new GregorianCalendar(year, monthOfYear - 1, dayOfMonth);
        if (today.getTimeInMillis() <= roundDate.getTimeInMillis()) {
            this.roundDate = formatearFecha(year, monthOfYear, dayOfMonth);
            tvRoundDate.setText(this.roundDate);
            tvTripDate.setText(null);
            dtRound = new Date(roundDate.getTimeInMillis());
        } else {
            showToast(getResources().getString(R.string.bad_round_date));
        }
    }

    public Date getDateRound() {
        return dtRound;
    }

    public void setDateTrip(int year, int monthOfYear, int dayOfMonth) {
        String round[] = TextUtils.split(tvRoundDate.getText().toString(), "-");
        GregorianCalendar roundDate = new GregorianCalendar(Integer.parseInt(round[2]), Integer.parseInt(round[1]) - 1, Integer.parseInt(round[0]));
        GregorianCalendar tripDate = new GregorianCalendar(year, monthOfYear - 1, dayOfMonth);
        if (roundDate.getTimeInMillis() <= tripDate.getTimeInMillis()) {
            this.tripDate = formatearFecha(year, monthOfYear, dayOfMonth);
            tvTripDate.setText(this.tripDate);
            dtTrip = new Date(tripDate.getTimeInMillis());
        } else {
            showToast(getResources().getString(R.string.bad_trip_date));
        }
    }

    public Date getDateTrip() {
        return dtTrip;
    }

    public boolean next() {
        boolean error = false;
        if (TextUtils.isEmpty(tvOriginCity.getText())) {
            error = true;
            ((TextView) context.findViewById(R.id.origin_required)).setTextColor(Color.RED);
        } else {
            ((TextView) context.findViewById(R.id.origin_required)).setTextColor(Color.WHITE);
        }
        if (TextUtils.isEmpty(tvDestinyCity.getText())) {
            error = true;
            ((TextView) context.findViewById(R.id.destiny_required)).setTextColor(Color.RED);
        } else {
            ((TextView) context.findViewById(R.id.destiny_required)).setTextColor(Color.WHITE);
        }
        if (TextUtils.isEmpty(tvRoundDate.getText())) {
            error = true;
            ((TextView) context.findViewById(R.id.date_round_required)).setTextColor(Color.RED);
        } else {
            ((TextView) context.findViewById(R.id.date_round_required)).setTextColor(Color.WHITE);
        }
        if (TextUtils.isEmpty(tvTripDate.getText()) && cbRoundTrip.isChecked()) {
            error = true;
            ((TextView) context.findViewById(R.id.date_trip_required)).setTextColor(Color.RED);
        } else {
            ((TextView) context.findViewById(R.id.date_trip_required)).setTextColor(Color.WHITE);
        }
        if (error) {
            showToast(getResources().getString(R.string.required_fields_find));
        }
        return !error;
    }

    private String formatearFecha(int year, int month, int day) {
        String mes = Integer.toString(month);
        String dia = Integer.toString(day);
        if (month < 10) {
            mes = "0" + mes;
        }
        if (day < 10) {
            dia = "0" + dia;
        }
        return (year + "-" + mes + "-" + dia);
    }

    private void exchange() {
        String auxLong = roundAirport;
        String auxString = tvOriginCity.getText().toString();
        roundAirport = tripAirport;
        tvOriginCity.setText(tvDestinyCity.getText());
        tripAirport = auxLong;
        tvDestinyCity.setText(auxString);
    }

    private void showToast(String resource) {
        Toast.makeText(context, resource, Toast.LENGTH_SHORT).show();
    }

    public int getClassType() {
        Spinner spinner = (Spinner) getView().findViewById(R.id.class_type);
        return spinner.getSelectedItemPosition();
    }

    public void setClassType(int classType) {
        this.classType = classType;
    }
}