text:
import org.mindrot.jbcrypt.BCrypt;

// In sbt (activator):
//   [todo] $ project passgen
//   > run password
//   (Hashed password will be shown here)
//   > project root
public class PassGen {
    public static void main(String[] args) {
        if (args.length == 0) {
            System.err.println("Password string is required");
            System.exit(0);
        }
        String password = args[0];
        String hashedPassword = BCrypt.hashpw(password, BCrypt.gensalt(8));
        System.out.println(hashedPassword);
    }
}

redpajama_set_name: RedPajamaGithub


text:
from setuptools import setup

requires = [
    'msgpack-python==0.4.5',
    'pyzmq==14.5.0',
    'zope.dottedname==4.1.0',
]

setup(
    name='smite',
    packages=['smite'],
    version='0.2a4',
    install_requires=requires,
    author='pmdez',
    author_email='pawel@mewritescode.com',
    url='https://github.com/pmdz/smite',
    zip_safe=False,
    description='Simple RPC-like messaging library based on ZMQ',
    classifiers=[
        "Programming Language :: Python",
        "Development Status :: 3 - Alpha",
    ],
    entry_points={
        'console_scripts': [
            'smite-create-certificates = smite.cli:create_certificates',
        ],
    }
)


text: ./build.sh && firebase deploy


text:
//Author      : @arboshiki
//create lobibox object
var Lobibox = Lobibox || {};
(function () {

    Lobibox.counter = 0;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------

    //User can set default properties for prompt in the following way
    //Lobibox.prompt.DEFAULT_OPTIONS = object;
    Lobibox.prompt = function (type, options) {
        return new LobiboxPrompt(type, options);
    };
    //User can set default properties for confirm in the following way
    //Lobibox.confirm.DEFAULT_OPTIONS = object;
    Lobibox.confirm = function (options) {
        return new LobiboxConfirm(options);
    };
    //User can set default properties for progress in the following way
    //Lobibox.progress.DEFAULT_OPTIONS = object;
    Lobibox.progress = function (options) {
        return new LobiboxProgress(options);
    };
    //Create empty objects in order user to be able to set default options in the following way
    //Lobibox.error.DEFAULT_OPTIONS = object;
    //Lobibox.success.DEFAULT_OPTIONS = object;
    //Lobibox.warning.DEFAULT_OPTIONS = object;
    //Lobibox.info.DEFAULT_OPTIONS = object;

    Lobibox.error = {};
    Lobibox.success = {};
    Lobibox.warning = {};
    Lobibox.info = {};

    //User can set default properties for alert in the following way
    //Lobibox.alert.DEFAULT_OPTIONS = object;
    Lobibox.alert = function (type, options) {
        if (["success", "error", "warning", "info"].indexOf(type) > -1) {
            return new LobiboxAlert(type, options);
        }
    };
    //User can set default properties for window in the following way
    //Lobibox.window.DEFAULT_OPTIONS = object;
    Lobibox.window = function (options) {
        return new LobiboxWindow('window', options);
    };

    /**
     * Base prototype for all messageboxes and window
     */
    var LobiboxBase = {
        $type: null,
        $el: null,
        $options: null,
        debug: function () {
            if (this.$options.debug) {
                window.console.debug.apply(window.console, arguments);
            }
        },
        _processInput: function (options) {
            if ($.isArray(options.buttons)) {
                var btns = {};
                for (var i = 0; i < options.buttons.length; i++) {
                    btns[options.buttons[i]] = Lobibox.base.OPTIONS.buttons[options.buttons[i]];
                }
                options.buttons = btns;
            }
            options.customBtnClass = options.customBtnClass ? options.customBtnClass : Lobibox.base.DEFAULTS.customBtnClass;
            for (var i in options.buttons) {
                if (options.buttons.hasOwnProperty(i)) {
                    var btn = options.buttons[i];
                    btn = $.extend({}, Lobibox.base.OPTIONS.buttons[i], btn);
                    if (!btn['class']) {
                        btn['class'] = options.customBtnClass;
                    }
                    options.buttons[i] = btn;
                }
            }
            options = $.extend({}, Lobibox.base.DEFAULTS, options);
            if (options.showClass === undefined) {
                options.showClass = Lobibox.base.OPTIONS.showClass;
            }
            if (options.hideClass === undefined) {
                options.hideClass = Lobibox.base.OPTIONS.hideClass;
            }
            if (options.baseClass === undefined) {
                options.baseClass = Lobibox.base.OPTIONS.baseClass;
            }
            if (options.delayToRemove === undefined) {
                options.delayToRemove = Lobibox.base.OPTIONS.delayToRemove;
            }
            if (!options.iconClass) {
                options.iconClass = Lobibox.base.OPTIONS.icons[options.iconSource][this.$type];
            }
            return options;
        },
        _init: function () {
            var me = this;

            me._createMarkup();
            me.setTitle(me.$options.title);
            if (me.$options.draggable && !me._isMobileScreen()) {
                me.$el.addClass('draggable');
                me._enableDrag();
            }
            if (me.$options.closeButton) {
                me._addCloseButton();
            }
            if (me.$options.closeOnEsc) {
                $(document).on('keyup.lobibox', function (ev) {
                    if (ev.which === 27) {
                        me.destroy();
                    }
                });
            }
            if (me.$options.baseClass) {
                me.$el.addClass(me.$options.baseClass);
            }
            if (me.$options.showClass) {
                me.$el.removeClass(me.$options.hideClass);
                me.$el.addClass(me.$options.showClass);
            }
            me.$el.data('lobibox', me);
        },

        /**
         * Calculate top, left position based on string keyword
         *
         * @param {string} position "'top', 'center', 'bottom'"
         * @returns {{left: number, top: number}}
         * @private
         */
        _calculatePosition: function (position) {
            var me = this;
            var top;
            if (position === 'top') {
                top = 30;
            } else if (position === 'bottom') {
                top = $(window).outerHeight() - me.$el.outerHeight() - 30;
            } else {
                top = ($(window).outerHeight() - me.$el.outerHeight()) / 2;
            }
            var left = ($(window).outerWidth() - me.$el.outerWidth()) / 2;
            return {
                left: left,
                top: top
            };
        },

        _createButton: function (type, op) {
            var me = this;
            var btn = $('<button></button>')
                .addClass(op['class'])
                .attr('data-type', type)
                .html(op.text);
            if (me.$options.callback && typeof me.$options.callback === 'function') {
                btn.on('click.lobibox', function (ev) {
                    var bt = $(this);
                    me._onButtonClick(me.$options.buttons[type], type);
                    me.$options.callback(me, bt.data('type'), ev);
                });
            }
            btn.click(function () {
                me._onButtonClick(me.$options.buttons[type], type);
            });
            return btn;
        },

        _onButtonClick: function (buttonOptions, type) {
            var me = this;

            if ((type === 'ok' && me.$type === 'prompt' && me.isValid() || me.$type !== 'prompt' || type !== 'ok')
                && buttonOptions && buttonOptions.closeOnClick) {
                me.destroy();
            }
        },

        _generateButtons: function () {
            var me = this;
            var btns = [];
            for (var i in me.$options.buttons) {
                if (me.$options.buttons.hasOwnProperty(i)) {
                    var op = me.$options.buttons[i];
                    var btn = me._createButton(i, op);
                    btns.push(btn);
                }
            }
            return btns;
        },
        _createMarkup: function () {
            var me = this;
            var lobibox = $('

');
            lobibox.attr('data-is-modal', me.$options.modal);
            var header = $('

')
                .append('')
                ;
            var body = $('

');
            lobibox.append(header);
            lobibox.append(body);
            if (me.$options.buttons && !$.isEmptyObject(me.$options.buttons)) {
                var footer = $('

');
                footer.append(me._generateButtons());
                lobibox.append(footer);
                if (Lobibox.base.OPTIONS.buttonsAlign.indexOf(me.$options.buttonsAlign) > -1) {
                    footer.addClass('text-' + me.$options.buttonsAlign);
                }
            }
            me.$el = lobibox
                .addClass(Lobibox.base.OPTIONS.modalClasses[me.$type])
            ;
        },
        _setSize: function () {
            var me = this;
            me.setWidth(me.$options.width);
            if (me.$options.height === 'auto') {
                me.setHeight(me.$el.outerHeight());
            } else {
                me.setHeight(me.$options.height);
            }
        },
        _calculateBodyHeight: function (height) {
            var me = this;
            var headerHeight = me.$el.find('.lobibox-header').outerHeight();
            var footerHeight = me.$el.find('.lobibox-footer').outerHeight();
            return height - (headerHeight ? headerHeight : 0) - (footerHeight ? footerHeight : 0);

        },

        /**
         * Add backdrop in case if backdrop does not exist
         *
         * @private
         */
        _addBackdrop: function () {
            if ($('.lobibox-backdrop').length === 0) {
                $('body').append('

');
            }
        },

        _triggerEvent: function (type) {
            var me = this;
            if (me.$options[type] && typeof me.$options[type] === 'function') {
                me.$options[type](me);
            }
        },

        _calculateWidth: function (width) {
            var me = this;
            width = Math.min(Math.max(width, me.$options.width), $(window).outerWidth());
            if (width === $(window).outerWidth()) {
                width -= 2 * me.$options.horizontalOffset;
            }
            return width;
        },

        _calculateHeight: function (height) {
            var me = this;
            console.log(me.$options.height);
            height = Math.min(Math.max(height, me.$options.height), $(window).outerHeight());
            if (height === $(window).outerHeight()) {
                height -= 2 * me.$options.verticalOffset;
            }
            return height;
        },

        _addCloseButton: function () {
            var me = this;
            var closeBtn = $('×');
            me.$el.find('.lobibox-header').append(closeBtn);
            closeBtn.on('mousedown', function (ev) {
                ev.stopPropagation();
            });
            closeBtn.on('click.lobibox', function () {
                me.destroy();
            });
        },
        _position: function () {
            var me = this;

            me._setSize();
            var pos = me._calculatePosition();
            me.setPosition(pos.left, pos.top);
        },
        _isMobileScreen: function () {
            return $(window).outerWidth() < 768;
        },
        _enableDrag: function () {
            var el = this.$el,
                heading = el.find('.lobibox-header');

            heading.on('mousedown.lobibox', function (ev) {
                el.attr('offset-left', ev.offsetX);
                el.attr('offset-top', ev.offsetY);
                el.attr('allow-drag', 'true');
            });
            $(document).on('mouseup.lobibox', function () {
                el.attr('allow-drag', 'false');
            });
            $(document).on('mousemove.lobibox', function (ev) {
                if (el.attr('allow-drag') === 'true') {
                    var left = ev.clientX - parseInt(el.attr('offset-left'), 10) - parseInt(el.css('border-left-width'), 10);
                    var top = ev.clientY - parseInt(el.attr('offset-top'), 10) - parseInt(el.css('border-top-width'), 10);
                    el.css({
                        left: left,
                        top: top
                    });
                }
            });
        },

        /**
         * Set the message of messagebox
         *
         * @param {string} msg "new message of messagebox"
         * @returns {LobiboxBase}
         * @private
         */
        _setContent: function (msg) {
            var me = this;
            me.$el.find('.lobibox-body').html(msg);
            return me;
        },

        _beforeShow: function () {
            var me = this;
            me._triggerEvent('onShow');
        },

        _afterShow: function () {
            var me = this;
            Lobibox.counter++;
            me.$el.attr('data-nth', Lobibox.counter);
            if (!me.$options.draggable){
                $(window).on('resize.lobibox-'+me.$el.attr('data-nth'), function(){
                    me.refreshWidth();
                    me.refreshHeight();
                    me.$el.css('left', '50%').css('margin-left', '-'+(me.$el.width()/2)+'px');
                    me.$el.css('top', '50%').css('margin-top', '-'+(me.$el.height()/2)+'px');
                });
            }

            me._triggerEvent('shown');
        },

        _beforeClose: function () {
            var me = this;
            me._triggerEvent('beforeClose');
        },

        _afterClose: function () {
            var me = this;
            if (!me.$options.draggable){
                $(window).off('resize.lobibox-'+me.$el.attr('data-nth'));
            }
            me._triggerEvent('closed');
        },
//------------------------------------------------------------------------------
//--------------------------PUBLIC METHODS--------------------------------------
//------------------------------------------------------------------------------

        /**
         * Hide the messagebox
         *
         * @returns {LobiboxBase}
         */
        hide: function () {
            var me = this;
            if (me.$options.hideClass) {
                me.$el.removeClass(me.$options.showClass);
                me.$el.addClass(me.$options.hideClass);
                setTimeout(function () {
                    callback();
                }, me.$options.delayToRemove);
            } else {
                callback();
            }
            function callback() {
                me.$el.addClass('lobibox-hidden');
                if ($('.lobibox[data-is-modal=true]:not(.lobibox-hidden)').length === 0) {
                    $('.lobibox-backdrop').remove();
                    $('body').removeClass(Lobibox.base.OPTIONS.bodyClass);
                }
            }

            return this;
        },

        /**
         * Removes the messagebox from document
         *
         * @returns {LobiboxBase}
         */
        destroy: function () {
            var me = this;
            me._beforeClose();
            if (me.$options.hideClass) {
                me.$el.removeClass(me.$options.showClass).addClass(me.$options.hideClass);
                setTimeout(function () {
                    callback();
                }, me.$options.delayToRemove);
            } else {
                callback();
            }
            function callback() {
                me.$el.remove();
                if ($('.lobibox[data-is-modal=true]').length === 0) {
                    $('.lobibox-backdrop').remove();
                    $('body').removeClass(Lobibox.base.OPTIONS.bodyClass);
                }
                me._afterClose();
            }

            return this;
        },

        /**
         * Set the width of messagebox
         *
         * @param {number} width "new width of messagebox"
         * @returns {LobiboxBase}
         */
        setWidth: function (width) {
            var me = this;
            me.$el.css('width', me._calculateWidth(width));
            return me;
        },

        refreshWidth: function(){
            this.setWidth(this.$el.width());
        },

        refreshHeight: function(){
            this.setHeight(this.$el.height());
        },

        /**
         * Set the height of messagebox
         *
         * @param {number} height "new height of messagebox"
         * @returns {LobiboxBase}
         */
        setHeight: function (height) {
            var me = this;
            me.$el.css('height', me._calculateHeight(height))
                .find('.lobibox-body')
                .css('height', me._calculateBodyHeight(me.$el.innerHeight()));
            return me;
        },

        /**
         * Set the width and height of messagebox
         *
         * @param {number} width "new width of messagebox"
         * @param {number} height "new height of messagebox"
         * @returns {LobiboxBase}
         */
        setSize: function (width, height) {
            var me = this;
            me.setWidth(width);
            me.setHeight(height);
            return me;
        },

        /**
         * Set position of messagebox
         *
         * @param {number|String} left "left coordinate of messsagebox or string representaing position. Available: ('top', 'center', 'bottom')"
         * @param {number} top
         * @returns {LobiboxBase}
         */
        setPosition: function (left, top) {
            var pos;
            if (typeof left === 'number' && typeof top === 'number') {
                pos = {
                    left: left,
                    top: top
                };
            } else if (typeof left === 'string') {
                pos = this._calculatePosition(left);
            }
            this.$el.css(pos);
            return this;
        },
        /**
         * Set the title of messagebox
         *
         * @param {string} title "new title of messagebox"
         * @returns {LobiboxBase}
         */
        setTitle: function (title) {
            return this.$el.find('.lobibox-title').html(title);
        },

        /**
         * Get the title of messagebox
         *
         * @returns {string}
         */
        getTitle: function () {
            return this.$el.find('.lobibox-title').html();
        },

        /**
         * Show messagebox
         *
         * @returns {LobiboxBase}
         */
        show: function () {
            var me = this,
                $body = $('body');

            me._beforeShow();

            me.$el.removeClass('lobibox-hidden');
            $body.append(me.$el);
            if (me.$options.buttons) {
                var buttons = me.$el.find('.lobibox-footer').children();
                buttons[0].focus();
            }
            if (me.$options.modal) {
                $body.addClass(Lobibox.base.OPTIONS.bodyClass);
                me._addBackdrop();
            }
            if (me.$options.delay !== false) {
                setTimeout(function () {
                    me.destroy();
                }, me.$options.delay);
            }
            me._afterShow();
            return me;
        }
    };
    //User can set default options by this variable
    Lobibox.base = {};
    Lobibox.base.OPTIONS = {
        bodyClass: 'lobibox-open',

        modalClasses: {
            'error': 'lobibox-error',
            'success': 'lobibox-success',
            'info': 'lobibox-info',
            'warning': 'lobibox-warning',
            'confirm': 'lobibox-confirm',
            'progress': 'lobibox-progress',
            'prompt': 'lobibox-prompt',
            'default': 'lobibox-default',
            'window': 'lobibox-window'
        },
        buttonsAlign: ['left', 'center', 'right'],
        buttons: {
            ok: {
                'class': 'lobibox-btn lobibox-btn-default',
                text: 'OK',
                closeOnClick: true
            },
            cancel: {
                'class': 'lobibox-btn lobibox-btn-cancel',
                text: 'Cancel',
                closeOnClick: true
            },
            yes: {
                'class': 'lobibox-btn lobibox-btn-yes',
                text: 'Yes',
                closeOnClick: true
            },
            no: {
                'class': 'lobibox-btn lobibox-btn-no',
                text: 'No',
                closeOnClick: true
            }
        },
        icons: {
            bootstrap: {
                confirm: 'glyphicon glyphicon-question-sign',
                success: 'glyphicon glyphicon-ok-sign',
                error: 'glyphicon glyphicon-remove-sign',
                warning: 'glyphicon glyphicon-exclamation-sign',
                info: 'glyphicon glyphicon-info-sign'
            },
            fontAwesome: {
                confirm: 'fa fa-question-circle',
                success: 'fa fa-check-circle',
                error: 'fa fa-times-circle',
                warning: 'fa fa-exclamation-circle',
                info: 'fa fa-info-circle'
            }
        }
    };
    Lobibox.base.DEFAULTS = {
        horizontalOffset: 5,                //If the messagebox is larger (in width) than window's width. The messagebox's width is reduced to window width - 2 * horizontalOffset
        verticalOffset: 5,                  //If the messagebox is larger (in height) than window's height. The messagebox's height is reduced to window height - 2 * verticalOffset
        width: 600,
        height: 'auto',                     // Height is automatically calculated by width
        closeButton: true,                  // Show close button or not
        draggable: false,                   // Make messagebox draggable
        customBtnClass: 'lobibox-btn lobibox-btn-default', // Class for custom buttons
        modal: true,
        debug: false,
        buttonsAlign: 'center',             // Position where buttons should be aligned
        closeOnEsc: true,                   // Close messagebox on Esc press
        delayToRemove: 200,                 // Time after which lobibox will be removed after remove call. (This option is for hide animation to finish)
        delay: false,                       // Time to remove lobibox after shown
        baseClass: 'animated-super-fast',   // Base class to add all messageboxes
        showClass: 'zoomIn',                // Show animation class
        hideClass: 'zoomOut',               // Hide animation class
        iconSource: 'bootstrap',            // "bootstrap" or "fontAwesome" the library which will be used for icons

        //events
        //When messagebox show is called but before it is actually shown
        onShow: null,
        //After messagebox is shown
        shown: null,
        //When messagebox remove method is called but before it is actually hidden
        beforeClose: null,
        //After messagebox is hidden
        closed: null
    };
//------------------------------------------------------------------------------
//-------------------------LobiboxPrompt----------------------------------------
//------------------------------------------------------------------------------
    function LobiboxPrompt(type, options) {
        this.$input = null;
        this.$type = 'prompt';
        this.$promptType = type;

        options = $.extend({}, Lobibox.prompt.DEFAULT_OPTIONS, options);

        this.$options = this._processInput(options);

        this._init();
        this.debug(this);
    }

    LobiboxPrompt.prototype = $.extend({}, LobiboxBase, {
        constructor: LobiboxPrompt,

        _processInput: function (options) {
            var me = this;

            var mergedOptions = LobiboxBase._processInput.call(me, options);
            mergedOptions.buttons = {
                ok: Lobibox.base.OPTIONS.buttons.ok,
                cancel: Lobibox.base.OPTIONS.buttons.cancel
            };
            options = $.extend({}, mergedOptions, LobiboxPrompt.DEFAULT_OPTIONS, options);
            return options;
        },

        _init: function () {
            var me = this;
            LobiboxBase._init.call(me);
            me.show();
        },

        _afterShow: function () {
            var me = this;
            me._setContent(me._createInput())._position();
            me.$input.focus();
            LobiboxBase._afterShow.call(me);
        },

        _createInput: function () {
            var me = this,
                label;
            if (me.$options.multiline) {
                me.$input = $('<textarea></textarea>').attr('rows', me.$options.lines);
            } else {
                me.$input = $('<input type="' + me.$promptType + '"/>');
            }
            me.$input.addClass('lobibox-input').attr(me.$options.attrs);
            if (me.$options.value) {
                me.setValue(me.$options.value);
            }
            if (me.$options.label) {
                label = $('' + me.$options.label + '');
            }
            return $('

').append(label, me.$input);
        },

        /**
         * Set value of input
         *
         * @param {string} val "value of input"
         * @returns {LobiboxPrompt}
         */
        setValue: function (val) {
            this.$input.val(val);
            return this;
        },

        /**
         * Get value of input
         *
         * @returns {String}
         */
        getValue: function () {
            return this.$input.val();
        },

        isValid: function () {
            var me = this,
                $error = me.$el.find('.lobibox-input-error-message');

            if (me.$options.required && !me.getValue()){
                me.$input.addClass('invalid');
                if ($error.length === 0){
                    me.$el.find('.lobibox-body').append('
'+me.$options.errorMessage+'
');
                    me._position();
                    me.$input.focus();
                }
                return false;
            }
            me.$input.removeClass('invalid');
            $error.remove();
            me._position();
            me.$input.focus();

            return true;
        }
    });

    LobiboxPrompt.DEFAULT_OPTIONS = {
        width: 400,
        attrs: {},          // Object of any valid attribute of input field
        value: '',          // Value which is given to textfield when messagebox is created
        multiline: false,   // Set this true for multiline prompt
        lines: 3,           // This works only for multiline prompt. Number of lines
        type: 'text',       // Prompt type. Available types (text|number|color)
        label: '',          // Set some text which will be shown exactly on top of textfield
        required: true,
        errorMessage: 'The field is required'
    };
//------------------------------------------------------------------------------
//-------------------------LobiboxConfirm---------------------------------------
//------------------------------------------------------------------------------
    function LobiboxConfirm(options) {
        this.$type = 'confirm';

//        options = $.extend({}, Lobibox.confirm.DEFAULT_OPTIONS, options);

        this.$options = this._processInput(options);
        this._init();
        this.debug(this);
    }

    LobiboxConfirm.prototype = $.extend({}, LobiboxBase, {
        constructor: LobiboxConfirm,

        _processInput: function (options) {
            var me = this;

            var mergedOptions = LobiboxBase._processInput.call(me, options);
            mergedOptions.buttons = {
                yes: Lobibox.base.OPTIONS.buttons.yes,
                no: Lobibox.base.OPTIONS.buttons.no
            };
            options = $.extend({}, mergedOptions, Lobibox.confirm.DEFAULTS, options);
            return options;
        },

        _init: function () {
            var me = this;

            LobiboxBase._init.call(me);
            me.show();
        },

        _afterShow: function () {
            var me = this;

            var d = $('

');
            if (me.$options.iconClass) {
                d.append($('

')
                    .append(''))
                ;
            }
            d.append('
' + me.$options.msg + '
');
            me._setContent(d.html());

            me._position();

            LobiboxBase._afterShow.call(me);
        }
    });

    Lobibox.confirm.DEFAULTS = {
        title: 'Question',
        width: 500
    };
//------------------------------------------------------------------------------
//-------------------------LobiboxAlert------------------------------------------
//------------------------------------------------------------------------------
    function LobiboxAlert(type, options) {
        this.$type = type;

//        options = $.extend({}, Lobibox.alert.DEFAULT_OPTIONS, Lobibox[type].DEFAULT_OPTIONS, options);

        this.$options = this._processInput(options);

        this._init();
        this.debug(this);
    }

    LobiboxAlert.prototype = $.extend({}, LobiboxBase, {
        constructor: LobiboxAlert,

        _processInput: function (options) {

//            ALERT_OPTIONS = $.extend({}, LobiboxAlert.OPTIONS, Lobibox.alert.DEFAULTS);
            var me = this;
            var mergedOptions = LobiboxBase._processInput.call(me, options);
            mergedOptions.buttons = {
                ok: Lobibox.base.OPTIONS.buttons.ok
            };

            options = $.extend({}, mergedOptions, Lobibox.alert.OPTIONS[me.$type], Lobibox.alert.DEFAULTS, options);

            return options;
        },

        _init: function () {
            var me = this;
            LobiboxBase._init.call(me);
            me.show();
        },

        _afterShow: function () {
            var me = this;

            var d = $('

');
            if (me.$options.iconClass) {
                d.append($('

')
                    .append(''))
                ;
            }
            d.append('
' + me.$options.msg + '
');
            me._setContent(d.html());
            me._position();

            LobiboxBase._afterShow.call(me);
        }
    });
    Lobibox.alert.OPTIONS = {
        warning: {
            title: 'Warning'
        },
        info: {
            title: 'Information'
        },
        success: {
            title: 'Success'
        },
        error: {
            title: 'Error'
        }
    };
    //User can set default options by this variable
    Lobibox.alert.DEFAULTS = {};
//------------------------------------------------------------------------------
//-------------------------LobiboxProgress--------------------------------------
//------------------------------------------------------------------------------
    function LobiboxProgress(options) {
        this.$type = 'progress';
        this.$progressBarElement = null;
        this.$options = this._processInput(options);
        this.$progress = 0;

        this._init();
        this.debug(this);
    }

    LobiboxProgress.prototype = $.extend({}, LobiboxBase, {
        constructor: LobiboxProgress,

        _processInput: function (options) {
            var me = this;
            var mergedOptions = LobiboxBase._processInput.call(me, options);

            options = $.extend({}, mergedOptions, Lobibox.progress.DEFAULTS, options);
            return options;
        },

        _init: function () {
            var me = this;

            LobiboxBase._init.call(me);
            me.show();
        },

        _afterShow: function () {
            var me = this;

            if (me.$options.progressTpl) {
                me.$progressBarElement = $(me.$options.progressTpl);
            } else {
                me.$progressBarElement = me._createProgressbar();
            }
            var label;
            if (me.$options.label) {
                label = $('' + me.$options.label + '');
            }
            var innerHTML = $('

').append(label, me.$progressBarElement);
            me._setContent(innerHTML);
            me._position();

            LobiboxBase._afterShow.call(me);
        },

        _createProgressbar: function () {
            var me = this;
            var outer = $('

')
                .append('

')
                ;
            if (me.$options.showProgressLabel) {
                outer.append('');
            }

            return outer;
        },

        /**
         * Set progress value
         *
         * @param {number} progress "progress value"
         * @returns {LobiboxProgress}
         */
        setProgress: function (progress) {
            var me = this;
            if (me.$progress === 100) {
                return;
            }
            progress = Math.min(100, Math.max(0, progress));
            me.$progress = progress;
            me._triggerEvent('progressUpdated');
            if (me.$progress === 100) {
                me._triggerEvent('progressCompleted');
            }
            me.$el.find('.lobibox-progress-element').css('width', progress.toFixed(1) + "%");
            me.$el.find('[data-role="progress-text"]').html(progress.toFixed(1) + "%");
            return me;
        },

        /**
         * Get progress value
         *
         * @returns {number}
         */
        getProgress: function () {
            return this.$progress;
        }
    });

    Lobibox.progress.DEFAULTS = {
        width: 500,
        showProgressLabel: true,  // Show percentage of progress
        label: '',  // Show progress label
        progressTpl: false,  //Template of progress bar

        //Events
        progressUpdated: null,
        progressCompleted: null
    };
//------------------------------------------------------------------------------
//-------------------------LobiboxWindow----------------------------------------
//------------------------------------------------------------------------------
    function LobiboxWindow(type, options) {
        this.$type = type;

        this.$options = this._processInput(options);

        this._init();
        this.debug(this);
    }

    LobiboxWindow.prototype = $.extend({}, LobiboxBase, {
        constructor: LobiboxWindow,
        _processInput: function (options) {
            var me = this;
            var mergedOptions = LobiboxBase._processInput.call(me, options);

            if (options.content && typeof options.content === 'function') {
                options.content = options.content();
            }
            if (options.content instanceof jQuery) {
                options.content = options.content.clone();
            }
            options = $.extend({}, mergedOptions, Lobibox.window.DEFAULTS, options);
            return options;
        },

        _init: function () {
            var me = this;

            LobiboxBase._init.call(me);
            me.setContent(me.$options.content);
            if (me.$options.url && me.$options.autoload) {
                if (!me.$options.showAfterLoad) {
                    me.show();
                }
                me.load(function () {
                    if (me.$options.showAfterLoad) {
                        me.show();
                    }
                });
            } else {
                me.show();
            }
        },

        _afterShow: function () {
            var me = this;

            me._position();

            LobiboxBase._afterShow.call(me);
        },

        /**
         * Setter method for params option
         *
         * @param {object} params "new params"
         * @returns {LobiboxWindow}
         */
        setParams: function (params) {
            var me = this;
            me.$options.params = params;
            return me;
        },
        /**
         * Getter method for params
         *
         * @returns {object}
         */
        getParams: function () {
            var me = this;
            return me.$options.params;
        },
        /**
         * Setter method of loadMethod option
         *
         * @param {string} method "new method"
         * @returns {LobiboxWindow}
         */
        setLoadMethod: function (method) {
            var me = this;
            me.$options.loadMethod = method;
            return me;
        },
        /**
         * Getter method for loadMethod option
         *
         * @returns {string}
         */
        getLoadMethod: function () {
            var me = this;
            return me.$options.loadMethod;
        },
        /**
         * Setter method of content option.
         * Change the content of window
         *
         * @param {string} content "new content"
         * @returns {LobiboxWindow}
         */
        setContent: function (content) {
            var me = this;
            me.$options.content = content;
            me.$el.find('.lobibox-body').html('').append(content);
            return me;
        },
        /**
         * Getter method of content option
         *
         * @returns {string}
         */
        getContent: function () {
            var me = this;
            return me.$options.content;
        },
        /**
         * Setter method of url option
         *
         * @param {string} url "new url"
         * @returns {LobiboxWindow}
         */
        setUrl: function (url) {
            this.$options.url = url;
            return this;
        },
        /**
         * Getter method of url option
         *
         * @returns {String}
         */
        getUrl: function () {
            return this.$options.url;
        },
        /**
         * Loads content to window by ajax from specific url
         *
         * @param {Function} callback "callback function"
         * @returns {LobiboxWindow}
         */
        load: function (callback) {
            var me = this;
            if (!me.$options.url) {
                return me;
            }
            $.ajax(me.$options.url, {
                method: me.$options.loadMethod,
                data: me.$options.params
            }).done(function (res) {
                me.setContent(res);
                if (callback && typeof callback === 'function') {
                    callback(res);
                }
            });
            return me;
        }
    });

    Lobibox.window.DEFAULTS = {
        width: 480,
        height: 600,
        content: '',  // HTML Content of window
        url: '',  // URL which will be used to load content
        draggable: true,  // Override default option
        autoload: true,  // Auto load from given url when window is created
        loadMethod: 'GET',  // Ajax method to load content
        showAfterLoad: true,  // Show window after content is loaded or show and then load content
        params: {}  // Parameters which will be send by ajax for loading content
    };

})();

//Author      : @arboshiki
/**
 * Generates random string of n length.
 * String contains only letters and numbers
 *
 * @param {int} n
 * @returns {String}
 */
Math.randomString = function (n) {
    var text = "";
    var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

    for (var i = 0; i < n; i++)
        text += possible.charAt(Math.floor(Math.random() * possible.length));

    return text;
};
var Lobibox = Lobibox || {};
(function () {

    var LobiboxNotify = function (type, options) {
//------------------------------------------------------------------------------
//----------------PROTOTYPE VARIABLES-------------------------------------------
//------------------------------------------------------------------------------
        this.$type = null;
        this.$options = null;
        this.$el = null;
//------------------------------------------------------------------------------
//-----------------PRIVATE VARIABLES--------------------------------------------
//------------------------------------------------------------------------------
        var me = this;
//------------------------------------------------------------------------------
//-----------------PRIVATE FUNCTIONS--------------------------------------------
//------------------------------------------------------------------------------
        var _processInput = function (options) {

            if (options.size === 'mini' || options.size === 'large') {
                options = $.extend({}, Lobibox.notify.OPTIONS[options.size], options);
            }
            options = $.extend({}, Lobibox.notify.OPTIONS[me.$type], Lobibox.notify.DEFAULTS, options);

            if (options.size !== 'mini' && options.title === true) {
                options.title = Lobibox.notify.OPTIONS[me.$type].title;
            } else if (options.size === 'mini' && options.title === true) {
                options.title = false;
            }
            if (options.icon === true) {
                options.icon = Lobibox.notify.OPTIONS.icons[options.iconSource][me.$type];
            }
            if (options.sound === true) {
                options.sound = Lobibox.notify.OPTIONS[me.$type].sound;
            }
            if (options.sound) {
                options.sound = options.soundPath + options.sound + options.soundExt;
            }
            return options;
        };

        var _appendInWrapper = function ($el, $wrapper) {
            if (me.$options.size === 'normal') {
                if ($wrapper.hasClass('bottom')) {
                    $wrapper.prepend($el);
                } else {
                    $wrapper.append($el);
                }

            } else if (me.$options.size === 'mini') {
                if ($wrapper.hasClass('bottom')) {
                    $wrapper.prepend($el);
                } else {
                    $wrapper.append($el);
                }
            } else if (me.$options.size === 'large') {
                var tabPane = _createTabPane().append($el);
                var $li = _createTabControl(tabPane.attr('id'));
                $wrapper.find('.lb-notify-wrapper').append(tabPane);
                $wrapper.find('.lb-notify-tabs').append($li);
                _activateTab($li);
                $li.find('>a').click(function () {
                    _activateTab($li);
                });
            }
        };
        var _activateTab = function ($li) {
            $li.closest('.lb-notify-tabs').find('>li').removeClass('active');
            $li.addClass('active');
            var $current = $($li.find('>a').attr('href'));
            $current.closest('.lb-notify-wrapper').find('>.lb-tab-pane').removeClass('active');
            $current.addClass('active')
        };
        var _createTabControl = function (tabPaneId) {
            var $li = $('

', {
                'class': Lobibox.notify.OPTIONS[me.$type]['class']
            });
            $('', {
                'href': '#' + tabPaneId
            }).append('')
                .appendTo($li);
            return $li;
        };
        var _createTabPane = function () {
            return $('

', {
                'class': 'lb-tab-pane',
                'id': Math.randomString(10)
            })
        };
        var _createNotifyWrapper = function () {
            var selector = (me.$options.size === 'large' ? '.lobibox-notify-wrapper-large' : '.lobibox-notify-wrapper')
                    + "." + me.$options.position.replace(/\s/gi, '.'),
                $wrapper;

            //var classes = me.$options.position.split(" ");
            $wrapper = $(selector);
            if ($wrapper.length === 0) {
                $wrapper = $('

')
                    .addClass(selector.replace(/\./g, ' ').trim())
                    .appendTo($('body'));
                if (me.$options.size === 'large') {
                    $wrapper.append($('

'))
                        .append($('

'));
                }
            }
            return $wrapper;
        };
        var _createNotify = function () {
            var OPTS = Lobibox.notify.OPTIONS,
                $iconEl,
                $innerIconEl,
                $iconWrapper,
                $body,
                $msg,
                $notify = $('

', {
                    'class': 'lobibox-notify ' + OPTS[me.$type]['class'] + ' ' + OPTS['class'] + ' ' + me.$options.showClass
                });

            $iconWrapper = $('

').appendTo($notify);
            $iconEl = $('

').appendTo($iconWrapper);
            $innerIconEl = $('

').appendTo($iconEl);

            // Add image or icon depending on given parameters
            if (me.$options.img) {
                $innerIconEl.append('');
            } else if (me.$options.icon) {
                $innerIconEl.append('

');
            } else {
                $notify.addClass('without-icon');
            }
            // Create body, append title and message in body and append body in notification
            $msg = $('
' + me.$options.msg + '
');

            if (me.$options.messageHeight !== false) {
                $msg.css('max-height', me.$options.messageHeight);
            }

            $body = $('

', {
                'class': 'lobibox-notify-body'
            }).append($msg).appendTo($notify);

            if (me.$options.title) {
                $body.prepend('
' + me.$options.title + '
');
            }
            _addCloseButton($notify);
            if (me.$options.size === 'normal' || me.$options.size === 'mini') {
                _addCloseOnClick($notify);
                _addDelay($notify);
            }

            // Give width to notification
            if (me.$options.width) {
                $notify.css('width', _calculateWidth(me.$options.width));
            }

            return $notify;
        };
        var _addCloseButton = function ($el) {
            if (!me.$options.closable) {
                return;
            }
            $('×').click(function () {
                me.remove();
            }).appendTo($el);
        };
        var _addCloseOnClick = function ($el) {
            if (!me.$options.closeOnClick) {
                return;
            }
            $el.click(function () {
                me.remove();
            });
        };
        var _addDelay = function ($el) {
            if (!me.$options.delay) {
                return;
            }
            if (me.$options.delayIndicator) {
                var delay = $('

');
                $el.append(delay);
            }
            var time = 0;
            var interval = 1000 / 30;
            var currentTime = new Date().getTime();
            var timer = setInterval(function () {
                if (me.$options.continueDelayOnInactiveTab){
                    time = new Date().getTime() - currentTime;
                } else {
                    time += interval;
                }

                var width = 100 * time / me.$options.delay;
                if (width >= 100) {
                    width = 100;
                    me.remove();
                    timer = clearInterval(timer);
                }
                if (me.$options.delayIndicator) {
                    delay.find('div').css('width', width + "%");
                }

            }, interval);

            if (me.$options.pauseDelayOnHover) {
                $el.on('mouseenter.lobibox', function () {
                    interval = 0;
                }).on('mouseleave.lobibox', function () {
                    interval = 1000 / 30;
                });
            }
        };
        var _findTabToActivate = function ($li) {
            var $itemToActivate = $li.prev();
            if ($itemToActivate.length === 0) {
                $itemToActivate = $li.next();
            }
            if ($itemToActivate.length === 0) {
                return null;
            }
            return $itemToActivate;
        };
        var _calculateWidth = function (width) {
            width = Math.min($(window).outerWidth(), width);
            return width;
        };
//------------------------------------------------------------------------------
//----------------PROTOTYPE FUNCTIONS-------------------------------------------
//------------------------------------------------------------------------------
        /**
         * Delete the notification
         *
         * @returns {LobiboxNotify}
         */
        this.remove = function () {
            me.$el.removeClass(me.$options.showClass)
                .addClass(me.$options.hideClass);
            var parent = me.$el.parent();
            var wrapper = parent.closest('.lobibox-notify-wrapper-large');

            var href = '#' + parent.attr('id');

            var $li = wrapper.find('>.lb-notify-tabs>li:has(a[href="' + href + '"])');
            $li.addClass(Lobibox.notify.OPTIONS['class'])
                .addClass(me.$options.hideClass);
            setTimeout(function () {
                if (me.$options.size === 'normal' || me.$options.size === 'mini') {
                    me.$el.remove();
                } else if (me.$options.size === 'large') {

                    var $newLi = _findTabToActivate($li);
                    if ($newLi) {
                        _activateTab($newLi);
                    }
                    $li.remove();
                    parent.remove();
                }
                var list = Lobibox.notify.list;
                var ind = list.indexOf(me);
                list.splice(ind, 1);
                var next = list[ind];
                if (next && next.$options.showAfterPrevious){
                    next._init();
                }
            }, 500);
            return me;
        };
        me._init = function () {
            // Create notification
            var $notify = _createNotify();
            if (me.$options.size === 'mini') {
                $notify.addClass('notify-mini');
            }

            if (typeof me.$options.position === 'string') {
                var $wrapper = _createNotifyWrapper();
                _appendInWrapper($notify, $wrapper);
                if ($wrapper.hasClass('center')) {
                    $wrapper.css('margin-left', '-' + ($wrapper.width() / 2) + "px");
                }
            } else {
                $('body').append($notify);
                $notify.css({
                    'position': 'fixed',
                    left: me.$options.position.left,
                    top: me.$options.position.top
                })
            }

            me.$el = $notify;
            if (me.$options.sound) {
                var snd = new Audio(me.$options.sound); // buffers automatically when created
                snd.play();
            }
            if (me.$options.rounded) {
                me.$el.addClass('rounded');
            }
            me.$el.on('click.lobibox', function(ev){
                if (me.$options.onClickUrl){
                    window.location.href = me.$options.onClickUrl;
                }
                if (me.$options.onClick && typeof me.$options.onClick === 'function'){
                    me.$options.onClick.call(me, ev);
                }
            });
            me.$el.data('lobibox', me);
        };
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
        this.$type = type;
        this.$options = _processInput(options);
        if (!me.$options.showAfterPrevious || Lobibox.notify.list.length === 0){
            this._init();
        }

    };

    Lobibox.notify = function (type, options) {
        if (["default", "info", "warning", "error", "success"].indexOf(type) > -1) {
            var lobibox = new LobiboxNotify(type, options);
            Lobibox.notify.list.push(lobibox);
            return lobibox;
        }
    };
    Lobibox.notify.list = [];
    Lobibox.notify.closeAll = function () {
        var list = Lobibox.notify.list;
        for (var i in list){
            list[i].remove();
        }
    };
    //User can set default options to this variable
    Lobibox.notify.DEFAULTS = {
        title: true,                // Title of notification. If you do not include the title in options it will automatically takes its value
        //from Lobibox.notify.OPTIONS object depending of the type of the notifications or set custom string. Set this false to disable title
        size: 'normal',             // normal, mini, large
        soundPath: 'sounds/',   // The folder path where sounds are located
        soundExt: '.ogg',           // Default extension for all sounds
        showClass: 'fadeInDown',    // Show animation class.
        hideClass: 'zoomOut',       // Hide animation class.
        icon: true,                 // Icon of notification. Leave as is for default icon or set custom string
        msg: '',                    // Message of notification
        img: null,                  // Image source string
        closable: true,             // Make notifications closable
        hideCloseButton: false,     // Notification may be closable but you can hide close button and it will be closed by clicking on notification itsef
        delay: 5000,                // Hide notification after this time (in miliseconds)
        delayIndicator: true,       // Show timer indicator
        closeOnClick: true,         // Close notifications by clicking on them
        width: 400,                 // Width of notification box
        sound: true,                // Sound of notification. Set this false to disable sound. Leave as is for default sound or set custom soud path
        // Place to show notification. Available options: "top left", "top right", "bottom left", "bottom right", "center top", "center bottom"
        // It can also be object {left: number, top: number} to position notification at any place
        position: "bottom right",
        iconSource: 'bootstrap',    // "bootstrap" or "fontAwesome" the library which will be used for icons
        rounded: false,             // Whether to make notification corners rounded
        messageHeight: 60,          // Notification message maximum height. This is not for notification itself, this is for .lobibox-notify-msg
        pauseDelayOnHover: true,    // When you mouse over on notification delay (if it is enabled) will be paused.
        onClickUrl: null,           // The url which will be opened when notification is clicked
        showAfterPrevious: false,   // Set this to true if you want notification not to be shown until previous notification is closed. This is useful for notification queues
        continueDelayOnInactiveTab: true, // Continue delay when browser tab is inactive

        // Events
        onClick: null
    };
    //This variable is necessary.
    Lobibox.notify.OPTIONS = {
        'class': 'animated-fast',
        large: {
            width: 500,
            messageHeight: 96
        },
        mini: {
            'class': 'notify-mini',
            messageHeight: 32
        },
        default: {
            'class': 'lobibox-notify-default',
            'title': 'Default',
            sound: false
        },
        success: {
            'class': 'lobibox-notify-success',
            'title': 'Success',
            sound: 'sound2'
        },
        error: {
            'class': 'lobibox-notify-error',
            'title': 'Error',
            sound: 'sound4'
        },
        warning: {
            'class': 'lobibox-notify-warning',
            'title': 'Warning',
            sound: 'sound5'
        },
        info: {
            'class': 'lobibox-notify-info',
            'title': 'Information',
            sound: 'sound6'
        },
        icons: {
            bootstrap: {
                success: 'glyphicon glyphicon-ok-sign',
                error: 'glyphicon glyphicon-remove-sign',
                warning: 'glyphicon glyphicon-exclamation-sign',
                info: 'glyphicon glyphicon-info-sign'
            },
            fontAwesome: {
                success: 'fa fa-check-circle',
                error: 'fa fa-times-circle',
                warning: 'fa fa-exclamation-circle',
                info: 'fa fa-info-circle'
            }
        }
    };
})();


text:
import io

def logit(text):
  fh = io.open('/var/log/frust-log', 'a')
  fh.write(unicode(text))
  fh.close()

def faveit(text):
  print text


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ES5.Script.EcmaScript.Objects
{
    public class EcmaScriptObjectObject : EcmaScriptBaseFunctionObject
    {
        public EcmaScriptObjectObject(GlobalObject aOwner, string aName) :
            base(aOwner, new EcmaScriptObject(aOwner, aOwner.FunctionPrototype))
        {
            Class = "Function";
            fOriginalName = aName;
            Values.Add("length", PropertyValue.NotAllFlags(1));
        }

        public override object Call(ExecutionContext context, params object[] args)
        {
            var lVal = Utilities.GetArg(args, 0);
            if ((lVal != null) || (lVal == Undefined.Instance))
                return Construct(context, null, args);

            return Utilities.ToObject(context, lVal);
        }

        public override object Construct(ExecutionContext context, params object[] args)
        {
            if ((args.Length != 0) && (args[0] != null) && (args[0] != Undefined.Instance))
            {
                if (args[0] is EcmaScriptObject)
                    return args[0];

                if ((args[0] is String) ||
                    (args[0] is Int32) ||
                    (args[0] is Int64) ||
                    (args[0] is Double) ||
                    (args[0] is Boolean))
                    return Utilities.ToObject(context, args[0]);
            }
            return new EcmaScriptObject(Root);
        }

        public override object CallEx(ExecutionContext context, object aSelf, params object[] args)
        {
            var lVal = Utilities.GetArg(args, 0);
            if ((lVal != null) || (lVal == Undefined.Instance))
                return Construct(context, null, args);

            return Utilities.ToObject(context, lVal);
        }

    }
}


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Drawing;
using System.Threading;
using System.IO;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Serialization;
using OpenMetaverse;
using OpenMetaverse.Http;
using OpenMetaverse.Imaging;
using OpenMetaverse.ImportExport;
using OpenMetaverse.StructuredData;

namespace OpenMetaverse.ImportExport
{

    /// <summary>
    /// Implements mesh upload communications with the simulator
    /// </summary>
    public class cmdModelUploader
    {
        public GridClient Client;
        public List<cmdModelPrim> Prims;
        public List<byte[]> Images;
        public List<string> ImageNames;
        public Dictionary<string, int> ImgIndex;
        public string InvName = "NewMesh";
        public string InvDescription = "";
        public UUID InvAssetFolderUUID, InvTextureFolderUUID;
        public bool UploadTextures;
        public int Debug;
        public UUID ReturnedMeshUUID;
        public UUID ReturnedMeshInvUUID;
        public float TextureScale = 1.0f;

        /// <summary>
        /// Inlcude stub convex hull physics, required for uploading to Second Life
        /// </summary>
        public bool IncludePhysicsStub;

        /// <summary>
        /// Use the same mesh used for geometry as the physical mesh upload
        /// </summary>
        public bool UseModelAsPhysics;

        /// <summary>
        /// Callback for mesh upload operations
        /// </summary>
        /// <param name="result">null on failure, result from server on success</param>
        public delegate void ModelUploadCallback(OSD result);

        /// <summary>
        /// Creates instance of the mesh uploader
        /// </summary>
        /// <param name="client">GridClient instance to communicate with the simulator</param>
        /// <param name="prims">List of ModelPrimitive objects to upload as a linkset</param>
        public cmdModelUploader(GridClient client, List<cmdModelPrim> prims)
        {
            this.Client = client;
            this.Prims = prims;
        }
        /// <summary>
        /// Performs model upload in one go, without first checking for the price
        /// </summary>
        /// <param name="callback">Callback that will be invoke upon completion of the upload. Null is sent on request failure</param>
        public void Upload(ModelUploadCallback callback)
        {
            PrepareUpload((result =>
            {
                if (result == null && callback != null)
                {
                    callback(null);
                    return;
                }

                if (result is OSDMap)
                {
                    var res = (OSDMap)result;
                    Uri uploader = new Uri(res["uploader"]);
                    PerformUpload(uploader, (contents =>
                    {
                        if (contents != null)
                        {
                            var reply = (OSDMap)contents;
                            if (reply.ContainsKey("new_inventory_item") && reply.ContainsKey("new_asset"))
                            {
                                // Request full update on the item in order to update the local store
                                Client.Inventory.RequestFetchInventory(reply["new_inventory_item"].AsUUID(), Client.Self.AgentID);
                                ReturnedMeshUUID = reply["new_asset"].AsUUID();
                                ReturnedMeshInvUUID = reply["new_inventory_item"].AsUUID();
                            }
                        }
                        if (callback != null) callback(contents);
                    }));
                }
            }));

        }

        /// <summary>
        /// Ask server for details of cost and impact of the mesh upload
        /// </summary>
        /// <param name="callback">Callback that will be invoke upon completion of the upload. Null is sent on request failure</param>
        public void PrepareUpload(ModelUploadCallback callback)
        {
            Console.WriteLine("Preparing Upload...");
            Uri url = null;
            if (Client.Network.CurrentSim == null ||
                Client.Network.CurrentSim.Caps == null ||
                null == (url = Client.Network.CurrentSim.Caps.CapabilityURI("NewFileAgentInventory")))
            {
                Console.WriteLine("Cannot upload mesh, no connection or NewFileAgentInventory not available");
                if (callback != null) callback(null);
                return;
            }

            Images = new List<byte[]>();
            ImageNames = new List<string>();
            ImgIndex = new Dictionary<string, int>();

            OSDMap req = new OSDMap();
            req["name"] = InvName;
            req["description"] = InvDescription;

            req["asset_resources"] = AssetResources(UploadTextures, UseModelAsPhysics);
            req["asset_type"] = "mesh";
            req["inventory_type"] = "object";

            req["folder_id"] = InvAssetFolderUUID;
            req["texture_folder_id"] = InvTextureFolderUUID;

            req["everyone_mask"] = (int)PermissionMask.All;
            req["group_mask"] = (int)PermissionMask.All; ;
            req["next_owner_mask"] = (int)PermissionMask.All;

            CapsClient request = new CapsClient(url);
            request.OnComplete += (client, result, error) =>
            {
                if (error != null || result == null || result.Type != OSDType.Map)
                {
                    Console.WriteLine("Mesh upload request failure: {0}", error.Message);
                    if (callback != null) callback(null);
                    return;
                }
                OSDMap res = (OSDMap)result;

                if (res["state"] != "upload")
                {
                    OSDMap err = (OSDMap)res["error"];
                    Console.WriteLine("Mesh upload failure: {0}", err["message"]);
                    if (callback != null) callback(null);
                    return;
                }

                Console.WriteLine("Done.");
                if (Debug > 2) Console.WriteLine("Response from mesh upload prepare:\n{0}", OSDParser.SerializeLLSDNotationFormatted(result));
                if (callback != null) callback(result);
            };

            Console.WriteLine("Sending Request Resources ({0} bytes) to server...", OSDParser.SerializeLLSDXmlBytes(req).LongLength);
            if (Debug > 2) Console.WriteLine("{0}", OSDParser.SerializeLLSDNotationFormatted(req));
            request.BeginGetResponse(req, OSDFormat.Xml, 1200 * 1000);

        }

        OSD AssetResources(bool upload, bool physicsFromMesh)
        {
            OSDArray instanceList = new OSDArray();
            List<byte[]> meshes = new List<byte[]>();
            //List<byte[]> textures = new List<byte[]>();

            foreach (var prim in Prims)
            {
                OSDMap primMap = new OSDMap();

                OSDArray faceList = new OSDArray();

                foreach (var face in prim.Faces)
                {
                    OSDMap faceMap = new OSDMap();

                    faceMap["diffuse_color"] = face.Material.DiffuseColor;
                    faceMap["fullbright"] = false;

                    if (face.Material.TextureData != null)
                    {
                        int index;
                        if (ImgIndex.ContainsKey(face.Material.Texture))
                        {
                            index = ImgIndex[face.Material.Texture];
                        }
                        else
                        {
                            index = Images.Count;
                            ImgIndex[face.Material.Texture] = index;
                            Images.Add(face.Material.TextureData);
                            ImageNames.Add(face.Material.Texture);
                        }
                        faceMap["image"] = index;
                        faceMap["scales"] = TextureScale;
                        faceMap["scalet"] = TextureScale;
                        faceMap["offsets"] = 0.0f;
                        faceMap["offsett"] = 0.0f;
                        faceMap["imagerot"] = 0.0f;
                    }

                    faceList.Add(faceMap);
                }

                primMap["face_list"] = faceList;

                primMap["position"] = prim.Position;
                primMap["rotation"] = prim.Rotation;
                primMap["scale"] = prim.Scale;

                //I don't think Opensim honours these selections at present.... :(
                primMap["material"] = (int)Material.Wood; // always sent as "wood" material

                if (physicsFromMesh) primMap["physics_shape_type"] = (int)PhysicsShapeType.Prim;
                else primMap["physics_shape_type"] = (int)PhysicsShapeType.ConvexHull;

                primMap["mesh"] = meshes.Count;
                meshes.Add(prim.Asset);

                instanceList.Add(primMap);
            }

            OSDMap resources = new OSDMap();
            resources["instance_list"] = instanceList;

            OSDArray meshList = new OSDArray();
            foreach (var mesh in meshes)
            {
                meshList.Add(OSD.FromBinary(mesh));
            }
            resources["mesh_list"] = meshList;

            OSDArray textureList = new OSDArray();
            for (int i = 0; i < Images.Count; i++)
            {
                if (upload)
                {
                    textureList.Add(new OSDBinary(Images[i]));
                }
                else
                {
                    textureList.Add(new OSDBinary(Utils.EmptyBytes));
                }
            }

            resources["texture_list"] = textureList;

            resources["metric"] = "MUT_Unspecified";
            return resources;
        }

        /// <summary>
        /// Performas actual mesh and image upload
        /// </summary>
        /// <param name="uploader">Uri recieved in the upload prepare stage</param>
        /// <param name="callback">Callback that will be invoke upon completion of the upload. Null is sent on request failure</param>
        public void PerformUpload(Uri uploader, ModelUploadCallback callback)
        {
            CapsClient request = new CapsClient(uploader);
            request.OnComplete += (client, result, error) =>
            {
                if (error != null || result == null || result.Type != OSDType.Map)
                {
                    Console.WriteLine("Mesh upload request failure {0}", error.Message);
                    if (callback != null) callback(null);
                    return;
                }
                OSDMap res = (OSDMap)result;
                Console.WriteLine("Done.");
                if (Debug > 2) Console.WriteLine("Response from mesh upload perform:\n{0}", OSDParser.SerializeLLSDNotationFormatted(result));
                if (callback != null) callback(res);
            };

            OSD resources = AssetResources(UploadTextures, UseModelAsPhysics);
            Console.WriteLine("Sending Request Resources ({0} bytes) to server...", OSDParser.SerializeLLSDXmlBytes(resources).LongLength);
            if (Debug > 2) Console.WriteLine("{0}", OSDParser.SerializeLLSDNotationFormatted(resources));
            request.BeginGetResponse(resources, OSDFormat.Xml, 1200 * 1000);
        }
    }
}


text:
package org.apache.felix.dm.annotation.api;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Injects a Runnable object in a Service for starting/stopping it programatically.
 * By default, a Service is implicitly started when the service's bundle is started and when
 * all required dependencies are satisfied. However, it is sometimes required to programatically
 * take control of when the service is started or stopped. In this case, the injected Runnable
 * can be invoked in order to start/register (or stop/unregister) a Service at any time. When this annotation
 * is used, then the Service on which this annotation is applied is not activated by default, and you have to
 * call the injected Runnable yourself.
 *

 *
Usage Examples

 *

 *
 *

 * /**
 *   * This Service will be registered programatically into the OSGi registry, using the LifecycleController annotation.
 *   */
 * @Service
 * class X implements Z {
 *     @LifecycleController
 *     Runnable starter
 *
 *     @LifecycleController(start=false)
 *     Runnable stopper
 *
 *     @Init
 *     void init() {
 *         // At this point, all required dependencies are there, but we'll activate our service in 2 seconds ...
 *         Thread t = new Thread() {
 *            public void run() {
 *              sleep(2000);
 *              // start our "Z" service (our "start" method will be called, juste before service registration
 *              starter.run();
 *
 *              sleep(2000);
 *              // now, stop/unregister the "Z" service (we'll then be called in our stop() method
 *              stopper.run();
 *            }
 *          };
 *          t.start();
 *     }
 *
 *     @Start
 *     public void start() {
 *         // This method will be called after we invoke our starter Runnable, and our service will be
 *         // published after our method returns, as in normal case.
 *     }

 *     @Stop
 *     public void stop() {
 *         // This method will be called after we invoke our "stop" Runnable, and our service will be
 *         // unregistered before our method is invoked, as in normal case. Notice that the service won't
 *         // be destroyed here, and the "starter" runnable can be re-invoked later.
 *     }
 * }
 *

 *

 *
 * @author Felix Project Team
 */
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.FIELD)
public @interface LifecycleController
{
    /**
     * Specifies the action to be performed when the Injected runnable is invoked. By default, the
     * Runnable will fire a Service Component activation, when invoked. If you specify this attribute
     * to false, then the Service Component will be stopped, when the runnable is invoked.
     */
    public boolean start() default true;
}


text:
@class XCTestExpectation;

@protocol XCTestExpectationDelegate <NSObject>
- (void)didFulfillExpectation:(XCTestExpectation *)arg1;
@end


text:
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController

  def facebook
    # You need to implement the method below in your model (e.g. app/models/user.rb)
    @user = User.find_for_facebook_oauth(request.env["omniauth.auth"], current_user)

    if @user.persisted?
      sign_in_and_redirect @user, :event => :authentication #this will throw if @user is not activated
      set_flash_message(:notice, :success, :kind => "Facebook") if is_navigational_format?
    else
      session["devise.facebook_data"] = request.env["omniauth.auth"]
      redirect_to new_user_registration_url
    end
  end

  def twitter
    # You need to implement the method below in your model (e.g. app/models/user.rb)
    @user = User.find_for_facebook_oauth(request.env["omniauth.auth"], current_user)

    if @user.persisted?
      sign_in_and_redirect @user, :event => :authentication #this will throw if @user is not activated
      set_flash_message(:notice, :success, :kind => "Twitter") if is_navigational_format?
    else
      session["devise.twitter_data"] = request.env["omniauth.auth"]
      redirect_to new_user_registration_url
    end
  end

end


text:
using UnityEngine;
using UnityEngine.Networking;
using System;
using System.Collections;
using System.Collections.Generic;

namespace Cisco.Spark
{
    /// <summary>
    /// An uploaded file on Spark.
    /// </summary>
    public class SparkFile
    {
        /// <summary>
        /// UID of the uploaded file.
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// Public URL the file can be found at (for uploading).
        /// </summary>
        public Uri UploadUrl { get; set; }

        /// <summary>
        /// The filename of the SparkFile.
        /// </summary>
        public string Filename { get; private set; }

        /// <summary>
        /// The extension of the SparkFile.
        /// </summary>
        public string Extension { get; private set; }

        /// <summary>
        /// The raw data of the file as a byte array.
        /// </summary>
        public byte[] Data { get; set; }

        /// <summary>
        /// The C# type this file can be best represented as.
        /// </summary>
        public Type ReturnType { get; private set; }

        /// <summary>
        /// Initializes a new <see cref="Cisco.Spark.SparkFile"/> instance from a given Spark File ID.
        /// </summary>
        /// <param name="id">File ID</param>
        public SparkFile(string id)
        {
            Id = id;
        }

        /// <summary>
        /// Generate a new SparkFile for upload from a public URL.
        /// </summary>
        /// <param name="url">Public URL the file can be found at.</param>
        public SparkFile(Uri url)
        {
            UploadUrl = url;
        }

        /// <summary>
        /// Generate a new SparkFile from local data.
        /// </summary>
        /// <param name="filename">Filename of the file.</param>
        /// <param name="data">File data as bytes.</param>
        public SparkFile(string filename, byte[] data)
        {
            Filename = filename;
            Data = data;
        }

        /// <summary>
        /// Download the File data.
        /// </summary>
        /// <param name="callback">File data as Unity specific object or bytes.</param>
        /// <param name="forceBytes">Stops intelligent conversion of file array (e.g png -> Texture) and forces returning of a raw byte array.</param>
        public IEnumerator Download(Action<object> callback, bool forceBytes = false)
        {
            var manager = Request.Instance;
            using (UnityWebRequest www = manager.Generate("contents/" + Id, UnityWebRequest.kHttpVerbGET))
            {
#if UNITY_5_4 || UNITY_5_5
                yield return www.Send();
                if (www.isError)
#else
                yield return www.SendWebRequest();
                if (www.isNetworkError)
#endif
                {
                    Debug.LogError("Failed to Download File: " + www.error);
                }
                else
                {
                    // Get Headers.
                    var headers = www.GetResponseHeaders();
                    // Get data as bytes.
                    Data = www.downloadHandler.data;
                    // Get filename from Content-Disposition header.
                    Filename = headers["Content-Disposition"].Split('"')[1];
                    // Parse Extension.
                    Extension = Filename.Substring(Filename.LastIndexOf('.') + 1).ToLower();
                    // Figure Unity-native ReturnType.
                    SetReturnType();

                    // Convert data to ReturnType.
                    if (forceBytes)
                    {
                        // Specifically asked for bytes.
                        callback(Data);
                    }
                    else if (ReturnType == typeof(Texture))
                    {
                        // Downloaded File is a supported image.
                        var texture = new Texture2D(2, 2);
                        texture.LoadImage(Data);
                        callback(texture);
                    }
                    else
                    {
                        // TODO: Support more file types.
                        // Unsupported file type, returning bytes.
                        Debug.LogWarning(Extension + " is unsupported, returning bytes.");
                        ReturnType = typeof(Byte);
                        callback(Data);
                    }
                }
            }
        }

        /// <summary>
        /// Only retrieve the headers of the file.
        /// </summary>
        /// <param name="callback">Dictionary of headers.</param>
        public IEnumerator GetHeaders(Action<Dictionary<string, string>> callback)
        {
            var manager = Request.Instance;
            using (UnityWebRequest www = manager.Generate("contents/" + Id, UnityWebRequest.kHttpVerbHEAD))
            {
#if UNITY_5_4 || UNITY_5_5
                yield return www.Send();
                if (www.isError)
#else
                yield return www.SendWebRequest();
                if (www.isNetworkError)
#endif
                {
                    Debug.LogError("Failed to Download File Headers: " + www.error);
                }
                else
                {
                    var headers = www.GetResponseHeaders();
                    Filename = headers["Content-Disposition"].Split('"')[1];
                    Extension = Filename.Substring(Filename.LastIndexOf('.') + 1).ToLower();
                    SetReturnType();
                    callback(headers);
                }
            }
        }

        /// <summary>
        /// Sets <see cref="ReturnType"/> from the <see cref="extension"/> of the file.
        /// </summary>
        void SetReturnType()
        {
            // Supported Return Types
            var models = new List<string> { "obj" };
            var images = new List<string> { "psd", "tiff", "jpg", "tga", "png", "gif", "bmp", "iff", "pict", "exr", "hdr" };

            if (images.Contains(Extension))
            {
                // Image -> Texture
                ReturnType = typeof(Texture);
            }
            else if (models.Contains(Extension))
            {
                // 3D Model -> Mesh
                ReturnType = typeof(GameObject);
            }
        }
    }
}


text:
import {Pipe, PipeTransform} from "angular2/core";

import {convertToAmount, Amount} from "../entities/currency";
import {IAmount} from "../entities/currency";

const names = [
    ' cp',
    ' sp',
    ' ep',
    ' gp',
    ' pp',
];
function getPresence(values: IAmount) {
    return [
        !!values.copper,
        !!values.silver,
        !!values.electrum,
        !!values.gold,
        !!values.platinum,
    ];
}

function toArray(values: IAmount) {
    return [
        values.copper,
        values.silver,
        values.electrum,
        values.gold,
        values.platinum,
    ];
}

@Pipe({
    name: 'currency'
})
export class CurrencyPipe implements PipeTransform {
    public transform(value: any, args: any[]): any {
        let values: Amount;
        if (value instanceof Amount) {
            values = value;
        } else {
            let numeric = +value;
            if (isNaN(numeric)) {
                values = new Amount(value);
            } else {
                values = convertToAmount(numeric, false);
            }
        }
        if (values.totalValue <= 0) {
            return '—';
        }
        let array = toArray(values);
        let present = getPresence(values);
        let smallest = present.indexOf(true);
        let biggest = present.lastIndexOf(true);

        if (smallest === biggest) {
            return array[smallest] + names[smallest];
        }
        if (smallest + 1 === biggest) {
            return (array[biggest] * 10 + array[smallest]) + names[smallest];
        }

        let out = '';

        for (let i = biggest; i >= smallest; i--) {
            if (!array[i]) {
                continue;
            }
            if (out) {
                out += ', ';
            }
            out += array[i] + names[i];
        }
        return out;
    }
}


text:
using System.Collections.Generic;

namespace Bio.IO.GenBank
{
    /// <summary>
    /// Static class to hold standard feature keys.
    /// </summary>
    public static class StandardFeatureKeys
    {
        #region Feature Keys
        /// <summary>
        /// Holds key for Minus10Signal (-10_signal) feature.
        /// </summary>
        public const string Minus10Signal = "-10_signal";

        /// <summary>
        /// Holds key for Minus35Signal (-35_signal) feature.
        /// </summary>
        public const string Minus35Signal = "-35_signal";

        /// <summary>
        /// Holds key for ThreePrimeUtr (3'UTR) feature.
        /// </summary>
        public const string ThreePrimeUtr = "3'UTR";

        /// <summary>
        /// Holds key for FivePrimeUtr (5'UTR) feature.
        /// </summary>
        public const string FivePrimeUtr = "5'UTR";

        /// <summary>
        /// Holds key for Attenuator feature.
        /// </summary>
        public const string Attenuator = "attenuator";

        /// <summary>
        /// Holds key for CAATSignal (CAAT_signal) feature.
        /// </summary>
        public const string CaaTSignal = "CAAT_signal";

        /// <summary>
        /// Holds key for CodingSequence (CDS) feature.
        /// </summary>
        public const string CodingSequence = "CDS";

        /// <summary>
        /// Holds key for DisplacementLoop (D-loop) feature.
        /// </summary>
        public const string DisplacementLoop = "D-loop";

        /// <summary>
        /// Holds key for Enhancer feature.
        /// </summary>
        public const string Enhancer = "enhancer";

        /// <summary>
        /// Holds key for Exon feature.
        /// </summary>
        public const string Exon = "exon";

        /// <summary>
        /// Holds key for GCSingal (GC_signal) feature.
        /// </summary>
        public const string GcSingal = "GC_signal";

        /// <summary>
        /// Holds key for Gene feature.
        /// </summary>
        public const string Gene = "gene";

        /// <summary>
        /// Holds key for InterveningDNA (iDNA) feature.
        /// </summary>
        public const string InterveningDna = "iDNA";

        /// <summary>
        /// Holds key for Intron feature.
        /// </summary>
        public const string Intron = "intron";

        /// <summary>
        /// Holds key for LongTerminalRepeat (LTR) feature.
        /// </summary>
        public const string LongTerminalRepeat = "LTR";

        /// <summary>
        /// Holds key for MaturePeptide (mat_peptide) feature.
        /// </summary>
        public const string MaturePeptide = "mat_peptide";

        /// <summary>
        /// Holds key for MiscBinding (misc_binding) feature.
        /// </summary>
        public const string MiscBinding = "misc_binding";

        /// <summary>
        /// Holds key for MiscDifference (misc_difference) feature.
        /// </summary>
        public const string MiscDifference = "misc_difference";

        /// <summary>
        /// Holds key for MiscFeature (misc_feature) feature.
        /// </summary>
        public const string MiscFeature = "misc_feature";

        /// <summary>
        /// Holds key for MiscRecombination (misc_recomb) feature.
        /// </summary>
        public const string MiscRecombination = "misc_recomb";

        /// <summary>
        /// Holds key for MiscRNA (misc_RNA) feature.
        /// </summary>
        public const string MiscRna = "misc_RNA";

        /// <summary>
        /// Holds key for MiscSignal (misc_signal) feature.
        /// </summary>
        public const string MiscSignal = "misc_signal";

        /// <summary>
        /// Holds key for MiscStructure (misc_structure) feature.
        /// </summary>
        public const string MiscStructure = "misc_structure";

        /// <summary>
        /// Holds key for ModifiedBase (modified_base) feature.
        /// </summary>
        public const string ModifiedBase = "modified_base";

        /// <summary>
        /// Holds key for MessengerRNA (mRNA) feature.
        /// </summary>
        public const string MessengerRna = "mRNA";

        /// <summary>
        /// Holds key for NonCodingRNA (ncRNA) feature.
        /// </summary>
        public const string NonCodingRna = "ncRNA";

        /// <summary>
        /// Holds key for Operon feature.
        /// </summary>
        public const string OperonRegion = "operon";

        /// <summary>
        /// Holds key for PolyASignal (polyA_signal) feature.
        /// </summary>
        public const string PolyASignal = "polyA_signal";

        /// <summary>
        /// Holds key for PolyASite (polyA_site) feature.
        /// </summary>
        public const string PolyASite = "polyA_site";

        /// <summary>
        /// Holds key for PrecursorRNA (precursor_RNA) feature.
        /// </summary>
        public const string PrecursorRna = "precursor_RNA";

        /// <summary>
        /// Holds key for Promoter feature.
        /// </summary>
        public const string Promoter = "promoter";

        /// <summary>
        /// Holds key for ProteinBindingSite (protein_bind) feature.
        /// </summary>
        public const string ProteinBindingSite = "protein_bind";

        /// <summary>
        /// Holds key for RibosomeBindingSite (RBS) feature.
        /// </summary>
        public const string RibosomeBindingSite = "RBS";

        /// <summary>
        /// Holds key for ReplicationOrigin (rep_origin) feature.
        /// </summary>
        public const string ReplicationOrigin = "rep_origin";

        /// <summary>
        /// Holds key for RepeatRegion (repeat_region) feature.
        /// </summary>
        public const string RepeatRegion = "repeat_region";

        /// <summary>
        /// Holds key for RibosomalRNA (rRNA) feature.
        /// </summary>
        public const string RibosomalRna = "rRNA";

        /// <summary>
        /// Holds key for SignalPeptide (sig_peptide) feature.
        /// </summary>
        public const string SignalPeptide = "sig_peptide";

        /// <summary>
        /// Holds key for StemLoop (stem_loop) feature.
        /// </summary>
        public const string StemLoop = "stem_loop";

        /// <summary>
        /// Holds key for TATASignal (TATA_signal) feature.
        /// </summary>
        public const string TataSignal = "TATA_signal";

        /// <summary>
        /// Holds key for Terminator feature.
        /// </summary>
        public const string Terminator = "terminator";

        /// <summary>
        /// Holds key for TransferMessengerRNA (tmRNA) feature.
        /// </summary>
        public const string TransferMessengerRna = "tmRNA";

        /// <summary>
        /// Holds key for TransitPeptide (transit_peptide) feature.
        /// </summary>
        public const string TransitPeptide = "transit_peptide";

        /// <summary>
        /// Holds key for TransferRNA (tRNA) feature.
        /// </summary>
        public const string TransferRna = "tRNA";

        /// <summary>
        /// Holds key for UnsureSequenceRegion (unsure) feature.
        /// </summary>
        public const string UnsureSequenceRegion = "unsure";

        /// <summary>
        /// Holds key for Variation feature.
        /// </summary>
        public const string Variation = "variation";

        #endregion Feature Keys

        private static List<string> all;

        /// <summary>
        /// Static constructor.
        /// </summary>
        static StandardFeatureKeys()
        {
            all = new List<string>();

            #region Add feature keys to list
            all.Add(Minus10Signal);
            all.Add(Minus35Signal);
            all.Add(ThreePrimeUtr);
            all.Add(FivePrimeUtr);
            all.Add(Attenuator);
            all.Add(CaaTSignal);
            all.Add(CodingSequence);
            all.Add(DisplacementLoop);
            all.Add(Enhancer);
            all.Add(Exon);
            all.Add(GcSingal);
            all.Add(Gene);
            all.Add(InterveningDna);
            all.Add(Intron);
            all.Add(LongTerminalRepeat);
            all.Add(MaturePeptide);
            all.Add(MiscBinding);
            all.Add(MiscDifference);
            all.Add(MiscFeature);
            all.Add(MiscRecombination);
            all.Add(MiscRna);
            all.Add(MiscSignal);
            all.Add(MiscStructure);
            all.Add(ModifiedBase);
            all.Add(MessengerRna);
            all.Add(NonCodingRna);
            all.Add(OperonRegion);
            all.Add(PolyASignal);
            all.Add(PolyASite);
            all.Add(PrecursorRna);
            all.Add(Promoter);
            all.Add(ProteinBindingSite);
            all.Add(RibosomeBindingSite);
            all.Add(ReplicationOrigin);
            all.Add(RepeatRegion);
            all.Add(RibosomalRna);
            all.Add(SignalPeptide);
            all.Add(StemLoop);
            all.Add(TataSignal);
            all.Add(Terminator);
            all.Add(TransferMessengerRna);
            all.Add(TransitPeptide);
            all.Add(TransferRna);
            all.Add(UnsureSequenceRegion);
            all.Add(Variation);
            #endregion Add feature keys to list
        }

        /// <summary>
        /// Returns a list which contains standard feature keys.
        /// </summary>
        public static IReadOnlyList<string> All
        {
            get
            {
                return all;
            }
        }
    }
}


text:
import BaseParser from './BaseParser';
import ParserFactory from '../ParserFactory';
import { IParser } from './IParser';
import { IParserReturner } from './IParserReturner';
import { IChapter } from '../IChapter';

export default class RoyalroadlParser extends BaseParser implements IParser {
	constructor(_document: HTMLDocument, pageUrl: string) {
		super(_document, pageUrl);
	}

	public static getParserReturner(): IParserReturner {
		return function(_document: HTMLDocument, pageUrl: string) {
			return new RoyalroadlParser(_document, pageUrl);
		};
	}

	public getTitle(): string {
		return (<HTMLElement> this._document.querySelector('[property=name]')).innerText;
	}

	public getAuthor(): string {
		const elemText = (<HTMLElement> this._document.querySelector('[property=author]')).innerText;
		// Remove 'by ' from 'by <author>'
		return elemText.slice(3, elemText.length);
	}

	// TODO: make this work even when `Show All` chapters is not selected
	// Chapter entries are viewable in source html but not through document queries
	public getChapterUrls(): string[] {
		const links: NodeList = this._document.getElementById('chapters').querySelectorAll('a[href]');

		let chapterUrls = [];
		for (let i=0; i<links.length; i++) {
			chapterUrls.push( (<HTMLAnchorElement> links[i]).href );
		}

		return chapterUrls;
	}

	public getChapter(): IChapter {
		return {
			title: this.getChapterTitle(),
			author: this.getAuthor(),
			content: <HTMLDivElement> this._document.querySelector('.entry-content')
		}
	}

	private getChapterTitle(): string {
		// TODO
		return 'PLACEHOLDER'
	}
}


text:
'use strict';

var alter = require('../lib/alter.js');
var Chainable = require('../lib/classes/chainable');
var tinygradient = require('tinygradient');

module.exports = new Chainable('color', {
  args: [{
    name: 'inputSeries',
    types: ['seriesList']
  }, {
    name: 'color',
    types: ['string'],
    help: 'Color of series, as hex, eg #c6c6c6 is a lovely light grey. If you specify multiple colors, and have ' + 'multiple series, you will get a gradient, eg "#00B1CC:#00FF94:#FF3A39:#CC1A6F"'
  }],
  help: 'Change the color of the series',
  fn: function colorFn(args) {
    var colors = args.byName.color.split(':');

    if (colors.length > 1 && args.byName.inputSeries.list.length > 1) {
      colors = tinygradient(colors).rgb(args.byName.inputSeries.list.length);
    }

    var i = 0;
    return alter(args, function (eachSeries) {
      if (colors.length === 1 || args.byName.inputSeries.list.length === 1) {
        eachSeries.color = colors[0];
      } else if (colors.length > 1) {
        eachSeries.color = colors[i].toHexString();
        i++;
      } else {
        throw new Error('Hey, I need at least one color to work with');
      }

      return eachSeries;
    });
  }
});