text:
YUI.add('node', function(Y) {

    /**
     * The Node Utility provides a DOM-like interface for interacting with DOM nodes.
     * @module node
     * @submodule node-base
     */

    /**
     * The Node class provides a wrapper for manipulating DOM Nodes.
     * Node properties can be accessed via the set/get methods.
     * Use Y.get() to retrieve Node instances.
     *
     * NOTE: Node properties are accessed using
     * the set and get methods.
     *
     * @class Node
     * @constructor
     */

    var OWNER_DOCUMENT = 'ownerDocument',
        TAG_NAME = 'tagName',
        NODE_NAME = 'nodeName',
        NODE_TYPE = 'nodeType',

        Selector = Y.Selector,
        _instances = {},
        _restrict = {},
        _slice = [].slice;

    // used with previous/next/ancestor tests
    var _wrapFn = function(fn) {
        var ret = null;
        if (fn) {
            ret = (typeof fn === 'string') ?
            function(n) {
                return Y.Selector.test(n, fn);
            } :
            function(n) {
                return fn(Y.get(n));
            };
        }

        return ret;
    };

    var _getDoc = function(node) {
        var doc = Y.config.doc;

        if (node) {
            if (node[NODE_TYPE]) {
                if (node[NODE_TYPE] === 9) { // already a document node
                    doc = node;
                } else {
                    doc = node[OWNER_DOCUMENT];
                }
            } else if (Node[node._yuid]) { // Node instance document
                doc = Node[node._yuid]()[0];
            }
        }

        return doc;
    };

    var _getDOMNode = function(node) {
        if (node && !node[NODE_TYPE] && node._yuid) {
            node = Node[node._yuid]()[0];
        }

        return  node || null;
    };

    var Node = function() {
        this.init.apply(this, arguments);
    };

    Node.PLUGINS = {};

    Node._deepGet = function (path, val) {
        var pl = path.length,
            i;

        if (pl > 0) {
            for (i = 0; val !== undefined && i < pl; ++i) {
                val = val[path[i]];
            }
        }

        return val;
    };

    Node._deepSet = function(path, val, subval) {
        var leafIdx = path.length-1,
            i,
            o;

        if (leafIdx >= 0) {
            o = val;

            for (i = 0; o !== undefined && i < leafIdx; ++i) {
                o = o[path[i]];
            }

            if (o !== undefined && o[path[i]] !== undefined) {
                o[path[i]] = subval;
            }
        }
    };

    Node.scrubVal = function(val, node, depth) {
        if (val !== undefined) {
            if (typeof val === 'object' || typeof val === 'function') { // safari nodeList === function
                if (val !== null && (
                        NODE_TYPE in val || // dom node
                        val.item || // dom collection or Node instance
                        (val[0] && val[0][NODE_TYPE]) || // assume array of nodes
                        val.document) // window TODO: restrict?
                    ) {
                    if (node && _restrict && _restrict[node._yuid] && !node.contains(val)) {
                        val = null; // not allowed to go outside of root node
                    } else {
                        if (val[NODE_TYPE] || val.document) { // node or window
                            val = Node.get(val);
                        } else {
                            val = Node.all(val);
                        }
                    }
                } else {
                    depth = (depth === undefined) ? 4 : depth;
                    if (depth > 0) {
                        for (var i in val) {
                            if (val.hasOwnProperty && val.hasOwnProperty(i)) {
                                val[i] = Node.scrubVal(val[i], node, --depth);
                            }
                        }
                    }

                }
            }
        } else {
            val = node; // for chaining
        }

        return val;
    };

    Node.setters = {};
    Node.getters = {
        /**
         * Normalizes nodeInnerText and textContent.
         * @property text
         * @type String
         */
        'text': function(node) {
            return Y.DOM.getText(node);
        },

        'options': function(node) {
            return (node) ? node.getElementsByTagName('option') : [];
        },

        /**
         * Returns a NodeList instance.
         * @property children
         * @type NodeList
         */
        'children': function(node) {
            var children = node.children;

            if (children === undefined) {
                var childNodes = node.childNodes;
                children = [];

                for (var i = 0, len = childNodes.length; i < len; ++i) {
                    if (childNodes[i][TAG_NAME]) {
                        children[children.length] = childNodes[i];
                    }
                }
            }
            return children;
        }
    };

    Node.methods = function(name, fn) {
        if (typeof name == 'string') {
            Node.prototype[name] = function() {
                var args = _slice.call(arguments, 0),
                    instance = this,
                    getAll =  (_instances[this._yuid]) ? false : true, // return array of vals for lists
                    ret = (getAll) ? [] : null,
                    val;

                var getValue = function(node) {
                    args[0] = node;
                    val = Node.scrubVal(fn.apply(instance, args), instance);
                    if (getAll) {
                        ret[ret.length] = val;
                    } else {
                        ret = val;
                    }
                };

                args.unshift('');
                Node[instance._yuid](getValue);
                return ret;
            };
        } else { // assume object
            Y.each(name, function(fn, name) {
                Node.methods(name, fn);
            });
        }

    };

    Node.getDOMNode = _getDOMNode;

    Node.wrapDOMMethod = function(name) {
        return function() {
            return Y.DOM[name].apply(Y.DOM, arguments);
        };

    };

    Node.addDOMMethods = function(methods) {
        var add = {};
        Y.each(methods, function(v, n) {
            add[v] = Y.Node.wrapDOMMethod(v);
        });

        Y.Node.methods(add);
    };

    Node.prototype = {
        init: function(nodes, doc, isRoot, getAll) {
            var uid;

            doc = _getDoc(doc);

            this.getId = function() {
                return uid;
            };

            var _all = function(fn, i) {
                if (fn) {
                    i = i || 0;
                    for (var node; node = nodes[i++];) {
                        fn(node);
                    }
                }
                return nodes;
            };

            // uid = selector || Y.guid(); // to cache queryAll results
            uid = Y.guid();

            if (nodes) { // zero length collection returns null
                if (nodes[NODE_TYPE] || nodes.document) { // node or window
                    nodes = [nodes];
                }
            } else {
                nodes = [];
            }

            if (!getAll && nodes.length) { // stamp the dom node
                try { // IE only allows ID on Element
                    if (nodes[0].uniqueID) {
                        uid = nodes[0].uniqueID;
                    }
                    nodes[0]._yuid = uid;
                } catch(e) { // not cacheable
                }
            }

            this._yuid = uid;
            Node[uid] = _all; // for applying/returning dom nodes

            if (!getAll) {
                _instances[uid] = this;
            }

            this.initPlugins();
        },

        initPlugins: function() {
            Y.each(Node.PLUGINS, function(config, fn) {
                this.plug(fn, config);
            });
        },

        /**
         * Filters the NodeList instance down to only nodes matching the given selector.
         * @method filter
         * @param {String} selector The selector to filter against
         * @return {NodeList} NodeList containing the updated collection
         * @see Selector
         */
        filter: function(selector) {
            return Node.scrubVal(Selector.filter(Node[this._yuid](), selector), this);
        },

        /**
         * Applies the given function to each Node in the NodeList.
         * @method each
         * @param {Function} fn The function to apply
         * @param {Object} context optional An optional context to apply the function with
         * Default context is the NodeList instance
         * @return {NodeList} NodeList containing the updated collection
         * @chainable
         */
        each: function(fn, context) {
            context = context || this;
            Node[this._yuid](function(node) {
                fn.call(context, Node.get(node));
            });
        },

        /**
         * Returns the current number of items in the NodeList.
         * @method size
         * @return {Int} The number of items in the NodeList.
         */
        size: function() {
            return Node[this._yuid]().length;
        },

        /**
         * Retrieves the Node instance at the given index.
         * @method item
         *
         * @param {Number} index The index of the target Node.
         * @return {Node} The Node instance at the given index.
         */
        item: function(index) {
            var node = Node[this._yuid]()[index];
            return Node.get(node);
        },

       /**
         * Attaches a DOM event handler.
         * @method attach
         * @param {String} type The type of DOM Event to listen for
         * @param {Function} fn The handler to call when the event fires
         * @param {Object} arg An argument object to pass to the handler
         */

        attach: function(type, fn, arg) {
            var args = _slice.call(arguments, 0);
            args.splice(2, 0, Node[this._yuid]());
            return Y.Event.attach.apply(Y.Event, args);
        },

       /**
         * Alias for attach.
         * @method on
         * @param {String} type The type of DOM Event to listen for
         * @param {Function} fn The handler to call when the event fires
         * @param {Object} arg An argument object to pass to the handler
         * @see attach
         */
        on: function(type, fn, arg) {
            return this.attach.apply(this, arguments);
        },

       /**
         * Detaches a DOM event handler.
         * @method detach
         * @param {String} type The type of DOM Event
         * @param {Function} fn The handler to call when the event fires
         */
        detach: function(type, fn) {
            var args = _slice.call(arguments, 0);
            args.splice(2, 0, Node[this._yuid]());
            return Y.Event.detach.apply(Y.Event, args);
        },

       /**
         * Creates a Node instance from HTML string
         * @method create
         * @param {String|Array} html The string of html to create
         * @return {Node} A new Node instance
         */
        create: function(html) {
            return Y.Node.create(html);
        },

        /**
         * Applies the supplied plugin to the node.
         * @method plug
         * @param {Function} The plugin Class to apply
         * @param {Object} config An optional config to pass to the constructor
         * @chainable
         */
        plug: function(PluginClass, config) {
            config = config || {};
            config.owner = this;
            if (PluginClass && PluginClass.NS) {
                this[PluginClass.NS] = new PluginClass(config);
            }
            return this;
        },

        //normalize: function() {},
        //isSupported: function(feature, version) {},
        toString: function() {
            var str = '',
            node = Node[this._yuid]()[0] || {};

            if (node) {
                str += node[NODE_NAME];
                if (node.id) {
                    str += '#' + node.id;
                }

                if (node.className) {
                    str += '.' + node.className.replace(' ', '.');
                }
            } else {
                'no nodes for ' + this._yuid;
            }
            return str;
        }
    };

    Node.methods({
        addEventListener: function() {
            return Y.Event.nativeAdd.apply(Y.Event, arguments);
        },

        removeEventListener: function() {
            return Y.Event.nativeRemove.apply(Y.Event, arguments);
        },

        /**
         * Set the value of the property/attribute on the HTMLElement bound to this Node.
         * Only strings/numbers/booleans are passed through unless a SETTER exists.
         * @method set
         * @param {String} prop Property to set
         * @param {any} val Value to apply to the given property
         * @chainable
         */
        // TODO: document.location.href
        set: function(node, prop, val) {
            if (prop.indexOf('.') < 0) {
                if (prop in Node.setters) { // use custom setter
                    Node.setters[prop](this, prop, val);  // passing Node instance
                } else if (node[prop] !== undefined) { // no expandos
                    node[prop] = val;
                } else {
                }
            } else {
                Node._deepSet(prop.split('.'), node, val);
            }
        },

        /**
         * Get the value of the property/attribute on the HTMLElement bound to this Node.
         * Only strings/numbers/booleans are passed through unless a GETTER exists.
         * @method get
         * @param {String} prop Property to get
         * @return {any} Current value of the property
         */
        get: function(node, prop) {
            var val;
            if (prop.indexOf('.') < 0) {
                if (prop in Node.getters) { // use custom getter
                    val = Node.getters[prop].call(this, node, prop);
                } else {
                    val = node[prop];
                }

                // method wrapper uses undefined in chaining test
                if (val === undefined) {
                    val = null;
                }
            } else {
                val = Node._deepGet(prop.split('.'), node);
            }

            return val;
        },

        invoke: function(node, method, a, b, c, d, e) {
            var ret;

            if (a) { // first 2 may be Node instances
                a = (a[NODE_TYPE]) ? a : _getDOMNode(a);
                if (b) {
                    b = (b[NODE_TYPE]) ? b : _getDOMNode(b);
                }
            }

            ret = node[method](a, b, c, d, e);
            return ret;
        },

        hasMethod: function(node, method) {
            return !! node[method];
        },

        /**
         * Retrieves a Node instance of nodes based on the given CSS selector.
         * @method query
         *
         * @param {string} selector The CSS selector to test against.
         * @return {Node} A Node instance for the matching HTMLElement.
         */
        query: function(node, selector) {
            var ret = Selector.query(selector, node, true);
            if (!ret) {
                ret = null;
            }

            return ret;
        },

        /**
         * Retrieves a nodeList based on the given CSS selector.
         * @method queryAll
         * @deprecated Use query() which returns all matches
         *
         * @param {string} selector The CSS selector to test against.
         * @return {NodeList} A NodeList instance for the matching HTMLCollection/Array.
         */
        queryAll: function(node, selector) {
            var ret = Selector.query(selector, node);
            if (!ret.length) {
                ret = null;
            }

            return ret;
        },

        /**
         * Test if the supplied node matches the supplied selector.
         * @method test
         *
         * @param {string} selector The CSS selector to test against.
         * @return {boolean} Whether or not the node matches the selector.
         */
        test: function(node, selector) {
            return Selector.test(node, selector);
        },

        /**
         * Compares nodes to determine if they match.
         * Node instances can be compared to each other and/or HTMLElements.
         * @method compareTo
         * @param {HTMLElement | Node} refNode The reference node to compare to the node.
         * @return {Boolean} True if the nodes match, false if they do not.
         */
        compareTo: function(node, refNode) {
            refNode = _getDOMNode(refNode) || node;
            return node === refNode;
        },

       /**
         * Returns the nearest ancestor that passes the test applied by supplied boolean method.
         * @method ancestor
         * @param {String | Function} fn A selector or boolean method for testing elements.
         * If a function is used, it receives the current node being tested as the only argument.
         * @return {Node} The matching Node instance or null if not found
         */
        ancestor: function(node, fn) {
            return Y.DOM.elementByAxis(node, 'parentNode', _wrapFn(fn));
        },

        /**
         * Returns the previous matching sibling.
         * Returns the nearest element node sibling if no method provided.
         * @method previous
         * @param {String | Function} fn A selector or boolean method for testing elements.
         * If a function is used, it receives the current node being tested as the only argument.
         * @param {Boolean} all optional Whether all node types should be returned, or just element nodes.
         * @return {Node} Node instance or null if not found
         */
        previous: function(node, fn, all) {
            return Y.DOM.elementByAxis(node, 'previousSibling', _wrapFn(fn), all);
        },

        /**
         * Returns the next matching sibling.
         * Returns the nearest element node sibling if no method provided.
         * @method next
         * @param {String | Function} fn A selector or boolean method for testing elements.
         * If a function is used, it receives the current node being tested as the only argument.
         * @param {Boolean} all optional Whether all node types should be returned, or just element nodes.
         * @return {Node} Node instance or null if not found
         */
        next: function(node, fn, all) {
            return Y.DOM.elementByAxis(node, 'nextSibling', _wrapFn(fn), all);
        },

        /**
         * Determines whether the ndoe is an ancestor of another HTML element in the DOM hierarchy.
         * @method contains
         * @param {Node | HTMLElement} needle The possible node or descendent
         * @return {Boolean} Whether or not this node is the needle its ancestor
         */
        contains: function(node, needle) {
            return Y.DOM.contains(node, _getDOMNode(needle));
        },

        /**
         * Determines whether the node is appended to the document.
         * @method inDoc
         * @param {Node|HTMLElement} doc optional An optional document to check against.
         * Defaults to current document.
         * @return {Boolean} Whether or not this node is appended to the document.
         */
        inDoc: function(node, doc) {
            doc = (doc) ? _getDoc(doc) : node.ownerDocument;
            if (doc.documentElement) {
                return Y.DOM.contains(doc.documentElement, node);
            }
        },

        byId: function(node, id) {
            var ret = node[OWNER_DOCUMENT].getElementById(id);
            if (!ret || !Y.DOM.contains(node, ret)) {
                ret = null;
            }
            return ret;
        }

    });

    /**
     * Creates a Node instance from an HTML string
     * @method create
     * @param {String} html HTML string
     */
    Node.create = function(html) {
        return Node.get(Y.DOM.create(html));
    };

    Node.getById = function(id, doc) {
        doc = (doc && doc[NODE_TYPE]) ? doc : Y.config.doc;
        return Node.get(doc.getElementById(id));
    };

    /**
     * Retrieves a Node instance for the given query or nodes.
     * Note: Use 'document' string to retrieve document Node instance from string
     * @method Y.get
     * @static
     * @param {document|HTMLElement|HTMLCollection|Array|String} node The object to wrap.
     * @param {document|Node} doc optional The document containing the node. Defaults to current document.
     * @param {boolean} isRoot optional Whether or not this node should be treated as a root node. Root nodes
     * aren't allowed to traverse outside their DOM tree.
     * @return {Node} A Node instance bound to the supplied node(s).
     */
    Node.get = function(node, doc, isRoot, getAll) {
        var instance;

        if (node) {
            if (typeof node === 'string') {
                if (node === 'document') { // TODO: allow 'doc'? 'window'?
                    node = [Y.config.doc];
                } else {
                    node = Selector.query(node, doc, !getAll); // Selector arg is getFirst
                }
            }

            if (node) {
                if (!getAll) { // reuse single element node instances
                    if (node._yuid) {
                        // verify IE's uniqueID in case the node was cloned
                        if (!node.uniqueID || (node.uniqueID === node._yuid)) {
                            instance = _instances[node._yuid];
                        }
                    }
                }

                if (!instance) {
                    instance = new Node(node, doc, isRoot, getAll);
                }

                if (instance && isRoot && !getAll) {
                    _restrict[instance._yuid] = true;
                }
            }
        }

        // zero length collection returns null
        return (instance && instance.size()) ? instance : null;
    };

    /**
     * Retrieves a NodeList instance for the given object/string.
     * @method Y.all
     * @static
     * @param {HTMLCollection|Array|String} node The object to wrap.
     * @param {document|Node} doc optional The document containing the node. Defaults to current document.
     * @param {boolean} isRoot optional Whether or not this node should be treated as a root node. Root nodes
     * @return {NodeList} A NodeList instance for the supplied nodes.
     */
    Node.all = function(node, doc, isRoot) {
        return Node.get.call(Node, node, doc, isRoot, true);
    };

    Y.Array.each([
        /**
         * Passes through to DOM method.
         * @method replaceChild
         * @param {HTMLElement | Node} node Node to be inserted
         * @param {HTMLElement | Node} refNode Node to be replaced
         * @return {Node} The replaced node
         */
        'replaceChild',

        /**
         * Passes through to DOM method.
         * @method appendChild
         * @param {HTMLElement | Node} node Node to be appended
         * @return {Node} The appended node
         */
        'appendChild',

        /**
         * Passes through to DOM method.
         * @method insertBefore
         * @param {HTMLElement | Node} newNode Node to be appended
         * @param {HTMLElement | Node} refNode Node to be inserted before
         * @return {Node} The inserted node
         */
        'insertBefore',

        /**
         * Passes through to DOM method.
         * @method removeChild
         * @param {HTMLElement | Node} node Node to be removed
         * @return {Node} The removed node
         */
        'removeChild',

        /**
         * Passes through to DOM method.
         * @method hasChildNodes
         * @return {Boolean} Whether or not the node has any childNodes
         */
        'hasChildNodes',

        /**
         * Passes through to DOM method.
         * @method cloneNode
         * @param {HTMLElement | Node} node Node to be cloned
         * @return {Node} The clone
         */
        'cloneNode',

        /**
         * Passes through to DOM method.
         * @method getAttribute
         * @param {String} attribute The attribute to retrieve
         * @return {String} The current value of the attribute
         */
        'getAttribute',

        /**
         * Passes through to DOM method.
         * @method setAttribute
         * @param {String} attribute The attribute to set
         * @param {String} The value to apply to the attribute
         * @chainable
         */
        'setAttribute',

        /**
         * Passes through to DOM method.
         * @method hasAttribute
         * @param {String} attribute The attribute to test for
         * @return {Boolean} Whether or not the attribute is present
         */
        'hasAttribute',

        /**
         * Passes through to DOM method.
         * @method removeAttribute
         * @param {String} attribute The attribute to be removed
         * @chainable
         */
        'removeAttribute',

        /**
         * Passes through to DOM method.
         * @method scrollIntoView
         * @chainable
         */
        'scrollIntoView',

        /**
         * Passes through to DOM method.
         * @method getElementsByTagName
         * @param {String} tagName The tagName to collect
         * @return {NodeList} A NodeList representing the HTMLCollection
         */
        'getElementsByTagName',

        /**
         * Passes through to DOM method.
         * @method focus
         * @chainable
         */
        'focus',

        /**
         * Passes through to DOM method.
         * @method blur
         * @chainable
         */
        'blur',

        /**
         * Passes through to DOM method.
         * Only valid on FORM elements
         * @method submit
         * @chainable
         */
        'submit',

        /**
         * Passes through to DOM method.
         * Only valid on FORM elements
         * @method reset
         * @chainable
         */
        'reset',

        /**
         * Passes through to DOM method.
         * @method select
         * @chainable
         */
         'select'
    ], function(method) {
        Node.prototype[method] = function(arg1, arg2, arg3) {
            var ret = this.invoke(method, arg1, arg2, arg3);
            return ret;
        };
    });

    if (!document.documentElement.hasAttribute) {
        Node.methods({
            'hasAttribute': function(node, att) {
                return !! node.getAttribute(att);
            }
        });
    }

    // used to call Node methods against NodeList nodes
    Y.Node = Node;
    Y.all = Y.Node.all;
    Y.get = Y.Node.get;
/**
 * Extended Node interface for managing node styles.
 * @module node
 * @submodule node-style
 * @for Node
 */

Y.Node.addDOMMethods([
    /**
     * Returns the style's current value.
     * @method getStyle
     * @param {String} attr The style attribute to retrieve.
     * @return {String} The current value of the style property for the element.
     */
    'getStyle',

    /**
     * Returns the computed value for the given style property.
     * @method getComputedStyle
     * @param {String} attr The style attribute to retrieve.
     * @return {String} The computed value of the style property for the element.
     */
    'getComputedStyle',

    /**
     * Sets a style property of the node.
     * @method setStyle
     * @param {String} attr The style attribute to set.
     * @param {String|Number} val The value.
     * @chainable
     */
    'setStyle',

    /**
     * Sets multiple style properties on the node.
     * @method setStyles
     * @param {Object} hash An object literal of property:value pairs.
     * @chainable
     */
    'setStyles'
]);

/**
 * Extended Node interface for managing classNames.
 * @module node
 * @submodule node
 * @for Node
 */

    Y.Node.addDOMMethods([
        /**
         * Determines whether the node has the given className.
         * @method hasClass
         * @param {String} className the class name to search for
         * @return {Boolean} Whether or not the node has the given class.
         */
        'hasClass',

        /**
         * Adds a class name to the node.
         * @method addClass
         * @param {String} className the class name to add to the node's class attribute
         * @chainable
         */
        'addClass',

        /**
         * Removes a class name from the node.
         * @method removeClass
         * @param {String} className the class name to remove from the node's class attribute
         * @chainable
         */
        'removeClass',

        /**
         * Replace a class with another class.
         * If no oldClassName is present, the newClassName is simply added.
         * @method replaceClass
         * @param {String} oldClassName the class name to be replaced
         * @param {String} newClassName the class name that will be replacing the old class name
         * @chainable
         */
        'replaceClass',

        /**
         * If the className exists on the node it is removed, if it doesn't exist it is added.
         * @method toggleClass
         * @param {String} className the class name to be toggled
         * @chainable
         */
        'toggleClass'
    ]);
/**
 * Extended Node interface for managing regions and screen positioning.
 * Adds support for positioning elements and normalizes window size and scroll detection.
 * @module node
 * @submodule node-screen
 * @for Node
 */
Y.each([
        /**
         * Returns a region object for the node
         * @property region
         * @type Node
         */
        'region',
        /**
         * Returns a region object for the node's viewport
         * @property viewportRegion
         * @type Node
         */
        'viewportRegion'
    ],

    function(v, n) {
        Y.Node.getters[v] = Y.Node.wrapDOMMethod(v);
    }
);

Y.Node.addDOMMethods([
    /**
     * Determines whether or not the node is currently visible in the viewport.
     * @method inViewportRegion
     * @return {Boolean} Whether or not the node is currently positioned
     * within the viewport's region
     */
    'inViewportRegion'
]);

// these need special treatment to extract 2nd node arg
Y.Node.methods({
    /**
     * Compares the intersection of the node with another node or region
     * @method intersect
     * @param {Node|Object} node2 The node or region to compare with.
     * @param {Object} altRegion An alternate region to use (rather than this node's).
     * @return {Object} An object representing the intersection of the regions.
     */
    intersect: function(node1, node2, altRegion) {
        if (node2 instanceof Y.Node) { // might be a region object
            node2 = Y.Node.getDOMNode(node2);
        }
        return Y.DOM.intersect(node1, node2, altRegion);
    },

    /**
     * Determines whether or not the node is within the giving region.
     * @method inRegion
     * @param {Node|Object} node2 The node or region to compare with.
     * @param {Boolean} all Whether or not all of the node must be in the region.
     * @param {Object} altRegion An alternate region to use (rather than this node's).
     * @return {Object} An object representing the intersection of the regions.
     */
    inRegion: function(node1, node2, all, altRegion) {
        if (node2 instanceof Y.Node) { // might be a region object
            node2 = Y.Node.getDOMNode(node2);
        }
        return Y.DOM.inRegion(node1, node2, all, altRegion);
    }
});

/**
 * Extended Node interface for managing regions and screen positioning.
 * Adds support for positioning elements and normalizes window size and scroll detection.
 * @module node
 * @submodule node-screen
 * @for Node
 */

    Y.each([
        /**
         * Returns the inner width of the viewport (exludes scrollbar).
         * @property winWidth
         * @type {Int}
         */
        'winWidth',

        /**
         * Returns the inner height of the viewport (exludes scrollbar).
         * @property winHeight
         * @type {Int}
         */
        'winHeight',

        /**
         * Document width
         * @property winHeight
         * @type {Int}
         */
        'docWidth',

        /**
         * Document height
         * @property docHeight
         * @type {Int}
         */
        'docHeight',

        /**
         * Amount page has been scroll vertically
         * @property docScrollX
         * @type {Int}
         */
        'docScrollX',

        /**
         * Amount page has been scroll horizontally
         * @property docScrollY
         * @type {Int}
         */
        'docScrollY'
        ],
        function(v, n) {
            Y.Node.getters[v] = Y.Node.wrapDOMMethod(v);
        }
    );

    Y.Node.addDOMMethods([
    /**
     * Gets the current position of the node in page coordinates.
     * Nodes must be part of the DOM tree to have page coordinates
     * (display:none or nodes not appended return false).
     * @method getXY
     * @return {Array} The XY position of the node
    */
        'getXY',

    /**
     * Set the position of the node in page coordinates, regardless of how the node is positioned.
     * The node must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
     * @method setXY
     * @param {Array} xy Contains X & Y values for new position (coordinates are page-based)
     * @chainable
     */
        'setXY',

    /**
     * Gets the current position of the node in page coordinates.
     * Nodes must be part of the DOM tree to have page coordinates
     * (display:none or nodes not appended return false).
     * @method getX
     * @return {Int} The X position of the node
    */
        'getX',

    /**
     * Set the position of the node in page coordinates, regardless of how the node is positioned.
     * The node must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
     * @method setX
     * @param {Int} x X value for new position (coordinates are page-based)
     * @chainable
     */
        'setX',

    /**
     * Gets the current position of the node in page coordinates.
     * Nodes must be part of the DOM tree to have page coordinates
     * (display:none or nodes not appended return false).
     * @method getY
     * @return {Int} The Y position of the node
    */
        'getY',

    /**
     * Set the position of the node in page coordinates, regardless of how the node is positioned.
     * The node must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
     * @method setY
     * @param {Int} y Y value for new position (coordinates are page-based)
     * @chainable
     */
        'setY'
    ]);

}, '3.0.0pr2' ,{requires:['dom']});


text:
<?php
require __DIR__ . '/vendor/autoload.php';
require 'config.php';

redpajama_set_name: RedPajamaGithub


text:
<?xml version='1.0' encoding='windows-1252' ?>

<!--L
  Copyright Oracle inc, SAIC-F

  Distributed under the OSI-approved BSD 3-Clause License.
  See http://ncip.github.com/cadsr-util/LICENSE.txt for details.
L-->

<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">

<ViewObject
   Name="AcCsiView"
   SelectList="AcCsi.AC_CSI_IDSEQ,
       AcCsi.CS_CSI_IDSEQ,
       AcCsi.AC_IDSEQ,
       AcCsi.DATE_CREATED,
       AcCsi.CREATED_BY,
       AcCsi.DATE_MODIFIED,
       AcCsi.MODIFIED_BY"
   FromList="AC_CSI AcCsi"
   BindingStyle="Oracle"
   CustomQuery="false"
   RowClass="gov.nih.nci.ncicb.cadsr.common.persistence.bc4j.AcCsiViewRowImpl"
   ComponentClass="gov.nih.nci.ncicb.cadsr.common.persistence.bc4j.AcCsiViewImpl"
   MsgBundleClass="oracle.jbo.common.JboResourceBundle"
   UseGlueCode="false" >
   <DesignTime>
      <Attr Name="_isCodegen" Value="true" />
      <Attr Name="_version" Value="9.0.5.16.0" />
      <Attr Name="_codeGenFlag2" Value="Access|Coll" />
      <Attr Name="_isExpertMode" Value="false" />
   </DesignTime>
   <EntityUsage
      Name="AcCsi"
      Entity="gov.nih.nci.ncicb.cadsr.common.persistence.bc4j.AcCsi" >
      <DesignTime>
         <Attr Name="_EntireObjectTable" Value="false" />
         <Attr Name="_queryClause" Value="false" />
      </DesignTime>
   </EntityUsage>
   <ViewAttribute
      Name="AcCsiIdseq"
      IsNotNull="true"
      PrecisionRule="false"
      EntityAttrName="AcCsiIdseq"
      EntityUsage="AcCsi"
      AliasName="AC_CSI_IDSEQ" >
   </ViewAttribute>
   <ViewAttribute
      Name="CsCsiIdseq"
      IsUnique="true"
      IsNotNull="true"
      PrecisionRule="false"
      EntityAttrName="CsCsiIdseq"
      EntityUsage="AcCsi"
      AliasName="CS_CSI_IDSEQ" >
   </ViewAttribute>
   <ViewAttribute
      Name="AcIdseq"
      IsUnique="true"
      IsNotNull="true"
      PrecisionRule="false"
      EntityAttrName="AcIdseq"
      EntityUsage="AcCsi"
      AliasName="AC_IDSEQ" >
   </ViewAttribute>
   <ViewAttribute
      Name="DateCreated"
      IsNotNull="true"
      PrecisionRule="false"
      EntityAttrName="DateCreated"
      EntityUsage="AcCsi"
      AliasName="DATE_CREATED" >
   </ViewAttribute>
   <ViewAttribute
      Name="CreatedBy"
      IsNotNull="true"
      PrecisionRule="false"
      EntityAttrName="CreatedBy"
      EntityUsage="AcCsi"
      AliasName="CREATED_BY" >
   </ViewAttribute>
   <ViewAttribute
      Name="DateModified"
      PrecisionRule="false"
      EntityAttrName="DateModified"
      EntityUsage="AcCsi"
      AliasName="DATE_MODIFIED" >
   </ViewAttribute>
   <ViewAttribute
      Name="ModifiedBy"
      PrecisionRule="false"
      EntityAttrName="ModifiedBy"
      EntityUsage="AcCsi"
      AliasName="MODIFIED_BY" >
   </ViewAttribute>
</ViewObject>


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using CoolNameGenerator.GA.Chromosomes;
using CoolNameGenerator.Helper;

namespace CoolNameGenerator.GA.Crossovers
{
    /// <summary>
    ///     Two-Point Crossover (C2)
    ///     <remarks>
    ///         Two-point crossover calls for two points to be selected on the parents.
    ///         Everything between the two points is swapped between the parents, rendering two children.
    ///         <see href="http://en.wikipedia.org/wiki/Crossover_(genetic_algorithm)#Two-point_crossover">Wikipedia</see>
    ///     </remarks>
    /// </summary>
    [DisplayName("Two-Point")]
    public class TwoPointCrossover : OnePointCrossover
    {
        #region Constructors

        /// <summary>
        ///     Initializes a new instance of the <see cref="TwoPointCrossover" /> class.
        /// </summary>
        /// <param name="swapPointOneGeneIndex">Swap point one gene index.</param>
        /// <param name="swapPointTwoGeneIndex">Swap point two gene index.</param>
        public TwoPointCrossover(int swapPointOneGeneIndex, int swapPointTwoGeneIndex)
        {
            if (swapPointOneGeneIndex >= swapPointTwoGeneIndex)
            {
                throw new ArgumentOutOfRangeException(nameof(swapPointTwoGeneIndex),
                    "The the swap point two index should be greater than swap point one index.");
            }

            SwapPointOneGeneIndex = swapPointOneGeneIndex;
            SwapPointTwoGeneIndex = swapPointTwoGeneIndex;
            MinChromosomeLength = 3;
        }

        /// <summary>
        ///     Initializes a new instance of the <see cref="TwoPointCrossover" /> class.
        /// </summary>
        public TwoPointCrossover() : this(0, 1)
        {
        }

        #endregion

        #region Properties

        /// <summary>
        ///     Gets or sets the index of the swap point one gene.
        /// </summary>
        /// <value>The index of the swap point one gene.</value>
        public int SwapPointOneGeneIndex { get; set; }

        /// <summary>
        ///     Gets or sets the index of the swap point two gene.
        /// </summary>
        /// <value>The index of the swap point two gene.</value>
        public int SwapPointTwoGeneIndex { get; set; }

        #endregion

        #region Methods

        /// <summary>
        ///     Performs the cross with specified parents generating the children.
        /// </summary>
        /// <param name="parents">The parents chromosomes.</param>
        /// <returns>
        ///     The offspring (children) of the parents.
        /// </returns>
        protected override IList<IChromosome> PerformCross(IList<IChromosome> parents)
        {
            var firstParent = parents[0];
            var secondParent = parents[1];
            var parentLength = firstParent.Length;
            var swapPointsLength = parentLength - 1;

            if (SwapPointTwoGeneIndex >= swapPointsLength)
            {
                throw new ArgumentOutOfRangeException(
                    nameof(parents),
                    "The swap point two index is {0}, but there is only {1} genes. The swap should result at least one gene to each sides."
                        .With(SwapPointTwoGeneIndex, parentLength));
            }

            return CreateChildren(firstParent, secondParent);
        }

        /// <summary>
        ///     Creates the child.
        /// </summary>
        /// <returns>The child.</returns>
        /// <param name="leftParent">Left parent.</param>
        /// <param name="rightParent">Right parent.</param>
        protected override IChromosome CreateChild(IChromosome leftParent, IChromosome rightParent)
        {
            var firstCutGenesCount = SwapPointOneGeneIndex + 1;
            var secondCutGenesCount = SwapPointTwoGeneIndex + 1;
            var child = leftParent.CreateNew();
            child.ReplaceGenes(0, leftParent.GetGenes().Take(firstCutGenesCount).ToArray());
            child.ReplaceGenes(firstCutGenesCount,
                rightParent.GetGenes().Skip(firstCutGenesCount).Take(secondCutGenesCount - firstCutGenesCount).ToArray());
            child.ReplaceGenes(secondCutGenesCount, leftParent.GetGenes().Skip(secondCutGenesCount).ToArray());

            return child;
        }

        #endregion
    }
}


text:
from Util.pose import Pose
from Util.role import Role

from ai.STA.Strategy.team_go_to_position import TeamGoToPosition
from ai.STA.Tactic.penalty_goalkeeper import PenaltyGoalKeeper

class PrepareShootoutDefense(TeamGoToPosition):
    def __init__(self, p_game_state):
        super().__init__(p_game_state)

        field = self.game_state.field
        our_goal = field.our_goal_pose

        role_to_positions = {Role.SECOND_ATTACK: Pose.from_values(our_goal.position.x * 1 / 8, field.top * 4 / 5),
                             Role.MIDDLE: Pose.from_values(our_goal.position.x * 2 / 8, field.top * 4 / 5),
                             Role.FIRST_DEFENCE:  Pose.from_values(our_goal.position.x * 4 / 8, field.top * 4 / 5),
                             Role.SECOND_DEFENCE: Pose.from_values(our_goal.position.x * 6 / 8, field.top * 4 / 5),
                             Role.FIRST_ATTACK:   Pose.from_values(our_goal.position.x * 7 / 8, field.top * 4 / 5)
                             }

        goalkeeper = self.game_state.get_player_by_role(Role.GOALKEEPER)
        self.create_node(Role.GOALKEEPER, PenaltyGoalKeeper(self.game_state, goalkeeper))

        self.assign_tactics(role_to_positions)

    @classmethod
    def required_roles(cls):
        return [Role.GOALKEEPER]

    @classmethod
    def optional_roles(cls):
        return [Role.FIRST_ATTACK,
                Role.SECOND_ATTACK,
                Role.MIDDLE,
                Role.FIRST_DEFENCE,
                Role.SECOND_DEFENCE]


text:
void SetVConfigRegistrySetting( const char *pName, const char *pValue );
bool GetVConfigRegistrySetting( const char *pName, char *pReturn, int size );
#ifdef _WIN32
bool RemoveObsoleteVConfigRegistrySetting( const char *pValueName, char *pOldValue = NULL , int size = 0 );
#endif
bool ConvertObsoleteVConfigRegistrySetting( const char *pValueName );


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- From: file:/Users/cherish/Documents/yibairun/yibairun/res/values-w820dp/dimens.xml -->
    <eat-comment/>
    <dimen name="activity_horizontal_margin">64dp</dimen>
</resources>


text:
package org.openxava.actions;

import org.openxava.model.meta.*;
import org.openxava.session.*;
import org.openxava.util.*;
import org.openxava.web.*;

/**
 *
 * @author Javier Paniza
 */

public class OnChangeMyReportColumnNameAction extends OnChangeMyReportColumnBaseAction {

	public final static String SHOW_MORE="__MORE__";

	public void execute() throws Exception {
		String propertyName = (String) getNewValue();
		if (SHOW_MORE.equals(propertyName)) {
			getView().putObject("xava.myReportColumnShowAllColumns", true);
			propertyName = null;
		}
		if (Is.emptyString(propertyName)) {
			getView().setValue("label", "");
			getView().setValue("comparator", EMPTY_COMPARATOR);
			getView().setHidden("sum", true); // We hide it by default, because there are more non-summable properties than summable ones
			showStandardMembers();
			return;
		}
		MetaProperty property = getTab().getMetaTab().getMetaModel().getMetaProperty(propertyName);
		MyReportColumn column = (MyReportColumn) getView().getModel();
		if (column != null && propertyName.equals(column.getName())) {
			getView().setValue("label", column.getLabel());
		}
		else {
			property = property.cloneMetaProperty();
			property.setQualifiedName(propertyName);
			getView().setValue("label", property.getQualifiedLabel(Locales.getCurrent()));
		}
		getView().setHidden("sum", !getTab().isTotalCapable(property));
		if (property.isCalculated()) {
			hideMembers();
			return;
		}

		if (java.util.Date.class.equals(property.getType())) {
			setComparator(property);
			showDateValue();
			return;
		}

		if (boolean.class.equals(property.getType()) || java.lang.Boolean.class.equals(property.getType())) {
			showBooleanValue();
			return;
		}

		if (property.hasValidValues()) {
			showValidValuesValue();
			return;
		}

		String descriptionsListEditorURL = WebEditors.getEditorURLDescriptionsList(
				getTab().getTabName(), getTab().getModelName(), "${propertyKey}",
				-1, "", propertyName, property.getName());

		if (!Is.emptyString(descriptionsListEditorURL)) {
			getView().putObject("xava.myReportColumnDescriptionsListEditorURL", descriptionsListEditorURL);
			showDescriptionsListValue();
			return;
		}

		setComparator(property);
		showStandardMembers();
	}

	private void setComparator(MetaProperty property) {
		String value = getView().getValueString("value");
		String comparatorValue = Is.emptyString(value)?"":getView().getValueString("comparator");
		if (String.class.equals(property.getType())) {
			getView().setValue("comparator", STRING_COMPARATOR + ":" + comparatorValue);
		}
		else if (java.util.Date.class.isAssignableFrom(property.getType()) &&
			!property.getType().equals(java.sql.Time.class))
		{
			getView().setValue("comparator", DATE_COMPARATOR + ":" + comparatorValue);
		}
		else {
			getView().setValue("comparator", OTHER_COMPARATOR + ":" + comparatorValue);
		}
	}

}


text:
package net.sf.farrago.namespace.sfdc;

import com.sforce.soap.partner.*;

import java.io.StringWriter;

import java.rmi.RemoteException;

import java.sql.*;

import java.util.*;
import java.util.regex.Pattern;

import net.sf.farrago.namespace.*;
import net.sf.farrago.namespace.impl.*;
import net.sf.farrago.namespace.sfdc.resource.*;
import net.sf.farrago.type.*;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.eigenbase.reltype.RelDataType;
import org.eigenbase.sql.type.SqlTypeName;

/**
 * SfdcNameDirectory provides an implementation of the {@link
 * FarragoMedNameDirectory} interface.
 *
 * @author Sunny Choi
 * @version $Id$
 */
class SfdcNameDirectory
    extends MedAbstractNameDirectory
{
    //~ Static fields/initializers ---------------------------------------------

    private static final Properties EMPTY_PROPERTIES = new Properties();
    protected static final int MAX_PRECISION = 256;

    protected static final Log log = LogFactory.getLog(SfdcNameDirectory.class);

    //~ Instance fields --------------------------------------------------------

    // ~ Instance fields -------------------------------------------------------

    final SfdcDataServer server;
    String scope;
    int varcharPrecision;
    private final Map<String, Pattern> patternMap;

    //~ Constructors -----------------------------------------------------------

    // ~ Constructors ----------------------------------------------------------

    SfdcNameDirectory(SfdcDataServer server, String scope)
    {
        this.server = server;
        this.scope = scope;
        this.varcharPrecision = this.server.getVarcharPrecision();
        this.patternMap = new HashMap<String, Pattern>();
    }

    //~ Methods ----------------------------------------------------------------

    // ~ Methods ---------------------------------------------------------------

    // implement FarragoMedNameDirectory
    public FarragoMedColumnSet lookupColumnSet(
        FarragoTypeFactory typeFactory,
        String foreignName,
        String [] localName)
        throws SQLException
    {
        if (!scope.equals(FarragoMedMetadataQuery.OTN_TABLE)) {
            return null;
        }

        return server.newColumnSet(
            localName,
            server.getProperties(),
            typeFactory,
            null,
            Collections.EMPTY_MAP);
    }

    // implement FarragoMedNameDirectory
    public FarragoMedNameDirectory lookupSubdirectory(String foreignName)
        throws SQLException
    {
        if (scope.equals(FarragoMedMetadataQuery.OTN_SCHEMA)) {
            if (!foreignName.equals("SFDC") && !foreignName.equals("DEFAULT")) {
                return null;
            }
            return new SfdcNameDirectory(
                server,
                FarragoMedMetadataQuery.OTN_TABLE);
        }
        return null;
    }

    // implement FarragoMedNameDirectory
    public boolean queryMetadata(
        FarragoMedMetadataQuery query,
        FarragoMedMetadataSink sink)
        throws SQLException
    {
        if (scope.equals(FarragoMedMetadataQuery.OTN_SCHEMA)) {
            boolean wantSchemas =
                query.getResultObjectTypes().contains(
                    FarragoMedMetadataQuery.OTN_SCHEMA);
            if (wantSchemas) {
                sink.writeObjectDescriptor(
                    "SFDC",
                    FarragoMedMetadataQuery.OTN_SCHEMA,
                    null,
                    EMPTY_PROPERTIES);
            }
        } else {
            boolean wantTables =
                query.getResultObjectTypes().contains(
                    FarragoMedMetadataQuery.OTN_TABLE);
            if (wantTables) {
                if (!queryTables(query, sink)) {
                    return false;
                }
            }
            boolean wantColumns =
                query.getResultObjectTypes().contains(
                    FarragoMedMetadataQuery.OTN_COLUMN);
            if (wantColumns) {
                if (!queryColumns(query, sink)) {
                    return false;
                }
            }
        }
        return true;
    }

    private boolean queryTables(
        FarragoMedMetadataQuery query,
        FarragoMedMetadataSink sink)
        throws SQLException
    {
        try {
            DescribeGlobalResult describeGlobalResult = server.getEntityTypes();
            if (!(describeGlobalResult == null)) {
                DescribeGlobalSObjectResult [] types =
                    describeGlobalResult.getSobjects();
                if (!(types == null)) {
                    for (int i = 0; i < types.length; i++) {
                        String tableName = types[i].getName();
                        if (isIncluded(tableName, query)) {
                            sink.writeObjectDescriptor(
                                tableName,
                                FarragoMedMetadataQuery.OTN_TABLE,
                                null,
                                EMPTY_PROPERTIES);
                        }
                        if (isLovIncluded(tableName, query)) {
                            sink.writeObjectDescriptor(
                                tableName + "_LOV",
                                FarragoMedMetadataQuery.OTN_TABLE,
                                null,
                                EMPTY_PROPERTIES);
                        }
                    }
                }
            }
        } catch (RemoteException re) {
            throw SfdcResource.instance().BindingCallException.ex(
                re.getMessage());
        }
        return true;
    }

    private boolean queryColumns(
        FarragoMedMetadataQuery query,
        FarragoMedMetadataSink sink)
        throws SQLException
    {
        try {
            DescribeGlobalResult describeGlobalResult = server.getEntityTypes();
            if (!(describeGlobalResult == null)) {
                // Get the array of object names
                DescribeGlobalSObjectResult [] types =
                    describeGlobalResult.getSobjects();
                for (int i = 0; i < types.length; i++) {
                    if (!isIncluded(types[i].getName(), query)
                        && !isLovIncluded(types[i].getName(), query))
                    {
                        continue;
                    }

                    // verify can access objects
                    DescribeSObjectResult describeSObjectResult =
                        (DescribeSObjectResult) server.getEntityDescribe(
                            types[i].getName());

                    // check the name
                    if ((describeSObjectResult != null)
                        && describeSObjectResult.getName().equals(
                            types[i].getName()))
                    {
                        if (isIncluded(types[i].getName(), query)) {
                            com.sforce.soap.partner.Field [] fields =
                                describeSObjectResult.getFields();
                            int ordinal = 0;
                            for (int j = 0; j < fields.length; j++) {
                                RelDataType reltype =
                                    toRelType(
                                        fields[j],
                                        sink.getTypeFactory());
                                sink.writeColumnDescriptor(
                                    types[i].getName(),
                                    fields[j].getName(),
                                    ordinal,
                                    reltype,
                                    null,
                                    null,
                                    EMPTY_PROPERTIES);
                                ordinal++;
                            }
                        }
                        if (isLovIncluded(types[i].getName(), query)) {
                            // import picklist LOV as well
                            RelDataType reltype =
                                sink.getTypeFactory().createTypeWithNullability(
                                    sink.getTypeFactory().createSqlType(
                                        SqlTypeName.VARCHAR,
                                        25 + this.varcharPrecision),
                                    true);
                            sink.writeColumnDescriptor(
                                types[i].getName() + "_LOV",
                                "Field",
                                0,
                                reltype,
                                null,
                                null,
                                EMPTY_PROPERTIES);
                            reltype =
                                sink.getTypeFactory().createTypeWithNullability(
                                    sink.getTypeFactory().createSqlType(
                                        SqlTypeName.VARCHAR,
                                        MAX_PRECISION + this.varcharPrecision),
                                    true);
                            sink.writeColumnDescriptor(
                                types[i].getName() + "_LOV",
                                "Value",
                                1,
                                reltype,
                                null,
                                null,
                                EMPTY_PROPERTIES);
                        }
                    } else {
                        if (types[i].getName().endsWith("__c")) {
                            log.info(
                                SfdcResource.instance().ObjectExtractErrorMsg
                                .str(types[i].getName()));
                        } else {
                            throw SfdcResource.instance()
                            .InvalidObjectException.ex(types[i].getName());
                        }
                    }
                }
            }
        } catch (RemoteException re) {
            throw SfdcResource.instance().BindingCallException.ex(
                re.getMessage());
        }
        return true;
    }

    private boolean isIncluded(String tableName, FarragoMedMetadataQuery query)
    {
        FarragoMedMetadataFilter filter =
            (FarragoMedMetadataFilter) query.getFilterMap().get(
                FarragoMedMetadataQuery.OTN_TABLE);
        if (filter == null) {
            return true;
        }
        boolean included = false;
        if (filter.getRoster() != null) {
            if (filter.getRoster().contains(tableName)) {
                included = true;
            }
        } else {
            Pattern pattern = getPattern(filter.getPattern());
            included = pattern.matcher(tableName).matches();
        }
        if (filter.isExclusion()) {
            included = !included;
        }
        return included;
    }

    private boolean isLovIncluded(
        String tableName,
        FarragoMedMetadataQuery query)
    {
        return isIncluded(tableName + "_LOV", query);
    }

    // See: MedAbstractMetadataSink.getPattern()
    Pattern getPattern(String likePattern)
    {
        Pattern pattern = patternMap.get(likePattern);
        if (pattern == null) {
            StringWriter regex = new StringWriter();
            int n = likePattern.length();
            for (int i = 0; i < n; ++i) {
                char c = likePattern.charAt(i);
                switch (c) {
                case '%':
                    regex.write(".*");
                    break;
                case '_':
                    regex.write(".");
                    break;
                default:
                    regex.write((int) c);
                    break;
                }
            }
            pattern = Pattern.compile(regex.toString());
            patternMap.put(likePattern, pattern);
        }
        return pattern;
    }

    protected RelDataType toRelType(Field field, FarragoTypeFactory typeFactory)
    {
        SqlTypeName typeName = convertSfdcSqlToSqlType(field.getType());
        if (typeName.allowsPrec()) {
            if (typeName.allowsScale()) { // only decimal type
                int maxPrecision = SqlTypeName.DECIMAL.MAX_NUMERIC_PRECISION;
                int precision = field.getPrecision();
                int scale = field.getScale();
                if ((precision > maxPrecision) || (scale > precision)) {
                    precision = maxPrecision;
                    int cappedScale = 6;
                    if (scale > cappedScale) {
                        scale = cappedScale;
                    }
                }
                if (scale < 0) {
                    scale = 0;
                }
                return typeFactory.createTypeWithNullability(
                    typeFactory.createSqlType(typeName, precision, scale),
                    true);
            } else {
                int precision = field.getPrecision();
                String fieldType = field.getType().getValue().toLowerCase();
                if (typeName.equals(SqlTypeName.TIMESTAMP)
                    || typeName.equals(SqlTypeName.TIME))
                {
                    precision = typeName.getDefaultPrecision();
                } else if (fieldType.equals("boolean")) {
                    precision = 5;
                } else {
                    precision = field.getLength() + varcharPrecision;
                    if (precision == 0) {
                        precision = 1024;
                    }
                }

                if (precision > (MAX_PRECISION + varcharPrecision)) {
                    precision = MAX_PRECISION + varcharPrecision;
                }

                return typeFactory.createTypeWithNullability(
                    typeFactory.createSqlType(typeName, precision),
                    true);
            }
        } else {
            return typeFactory.createTypeWithNullability(
                typeFactory.createSqlType(typeName),
                true);
        }
    }

    private static SqlTypeName convertSfdcSqlToSqlType(FieldType field)
    {
        if (field.getValue().equalsIgnoreCase("string")
            || field.getValue().equalsIgnoreCase("boolean")
            || field.getValue().equalsIgnoreCase("base64")
            || field.getValue().equalsIgnoreCase("id")
            || field.getValue().equalsIgnoreCase("reference")
            || field.getValue().equalsIgnoreCase("textarea")
            || field.getValue().equalsIgnoreCase("phone")
            || field.getValue().equalsIgnoreCase("url")
            || field.getValue().equalsIgnoreCase("email")
            || field.getValue().equalsIgnoreCase("picklist")
            || field.getValue().equalsIgnoreCase("multipicklist")
            || field.getValue().equalsIgnoreCase("combobox")
            || field.getValue().equalsIgnoreCase("calculated")
            || field.getValue().equalsIgnoreCase("anytype"))
        {
            return SqlTypeName.VARCHAR;
        } else if (field.getValue().equalsIgnoreCase("int")) {
            return SqlTypeName.INTEGER;
        } else if (
            field.getValue().equalsIgnoreCase("double")
            || field.getValue().equalsIgnoreCase("currency")
            || field.getValue().equalsIgnoreCase("percent"))
        {
            return SqlTypeName.DOUBLE;
        } else if (field.getValue().equalsIgnoreCase("date")) {
            return SqlTypeName.DATE;
        } else if (field.getValue().equalsIgnoreCase("datetime")) {
            return SqlTypeName.TIMESTAMP;
        } else if (field.getValue().equalsIgnoreCase("time")) {
            return SqlTypeName.TIME;
        } else { // unknown
            return SqlTypeName.VARCHAR;
        }
    }
}

// End SfdcNameDirectory.java


text:
ACCEPTED

#### According to
Euro+Med Plantbase

#### Published in
null

#### Original name
Hieracium praecox subsp. pulverosum Zahn

### Remarks
null


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="UIDispatcher.Windows.cs" company="MADE Apps">
//   Copyright (c) MADE Apps.
// </copyright>
// <summary>
//   Defines the Windows helper class for dispatching actions on the UI thread.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

#if WINDOWS_UWP
namespace MADE.App.Views.Threading
{
    using System;
    using System.Threading.Tasks;

    using XPlat.UI.Core;

    /// <summary>
    /// Defines the Windows helper class for dispatching actions on the UI thread.
    /// </summary>
    public class UIDispatcher : IUIDispatcher
    {
        /// <summary>
        /// Gets the platform specified UI object to use as a reference.
        /// </summary>
        public object Reference { get; private set; }

        /// <summary>Gets the instance of the Windows CoreDispatcher.</summary>
        internal CoreDispatcher Instance { get; private set; }

        /// <summary>
        /// Sets the platform specific UI object to use as a reference for dispatching actions on the UI thread.
        /// </summary>
        /// <param name="reference">
        /// The platform specific UI reference object.
        /// </param>
        public void SetReference(object reference)
        {
            this.Instance = null;

            if (!(reference is Windows.UI.Core.CoreDispatcher dispatcher))
            {
                throw new UIDispatcherException("Cannot initialize the UIDispatcher without a CoreDispatcher.");
            }

            this.Reference = dispatcher;
            this.Instance = new CoreDispatcher(dispatcher);
        }

        /// <summary>
        /// Schedules the provided action on the UI thread from a worker thread.
        /// </summary>
        /// <param name="action">
        /// The action to run on the dispatcher.
        /// </param>
        public void Run(Action action)
        {
            this.CheckInitialized();

            if (action == null)
            {
                return;
            }

            this.Run(CoreDispatcherPriority.Normal, action);
        }

        /// <summary>
        /// Schedules the provided action on the UI thread from a worker thread.
        /// </summary>
        /// <param name="priority">
        /// The priority.
        /// </param>
        /// <param name="action">
        /// The action to run on the dispatcher.
        /// </param>
        public async void Run(CoreDispatcherPriority priority, Action action)
        {
            this.CheckInitialized();

            if (action == null)
            {
                return;
            }

            await this.Instance.RunAsync(() => action());
        }

        /// <summary>
        /// Schedules the provided action on the UI thread from a worker thread.
        /// </summary>
        /// <param name="action">
        /// The action to run on the dispatcher.
        /// </param>
        /// <returns>
        /// An asynchronous operation.
        /// </returns>
        public Task RunAsync(Action action)
        {
            this.CheckInitialized();

            return action == null ? Task.CompletedTask : this.RunAsync(CoreDispatcherPriority.Normal, action);
        }

        /// <summary>
        /// Schedules the provided action on the UI thread from a worker thread.
        /// </summary>
        /// <param name="priority">
        /// The priority.
        /// </param>
        /// <param name="action">
        /// The action to run on the dispatcher.
        /// </param>
        /// <returns>
        /// An asynchronous operation.
        /// </returns>
        public Task RunAsync(CoreDispatcherPriority priority, Action action)
        {
            this.CheckInitialized();

            return action == null ? Task.CompletedTask : this.Instance.RunAsync(() => action());
        }

        private void CheckInitialized()
        {
            if (this.Instance == null)
            {
                throw new UIDispatcherException("Cannot run an action as the UIDispatcher has no UI reference set.");
            }
        }
    }
}
#endif


text:
package org.springframework.test.web.client;

import java.io.IOException;
import java.util.LinkedList;
import java.util.List;

import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.util.Assert;

/**
 * Default implementation of {@code RequestExpectation} that simply delegates
 * to the request matchers and the response creator it contains.
 *
 * @author Rossen Stoyanchev
 * @since 4.3
 */
public class DefaultRequestExpectation implements RequestExpectation {

	private final RequestCount requestCount;

	private final List<RequestMatcher> requestMatchers = new LinkedList<>();

	private ResponseCreator responseCreator;

	/**
	 * Create a new request expectation that should be called a number of times
	 * as indicated by {@code RequestCount}.
	 * @param expectedCount the expected request expectedCount
	 */
	public DefaultRequestExpectation(ExpectedCount expectedCount, RequestMatcher requestMatcher) {
		Assert.notNull(expectedCount, "ExpectedCount is required");
		Assert.notNull(requestMatcher, "RequestMatcher is required");
		this.requestCount = new RequestCount(expectedCount);
		this.requestMatchers.add(requestMatcher);
	}

	protected RequestCount getRequestCount() {
		return this.requestCount;
	}

	protected List<RequestMatcher> getRequestMatchers() {
		return this.requestMatchers;
	}

	protected ResponseCreator getResponseCreator() {
		return this.responseCreator;
	}

	@Override
	public ResponseActions andExpect(RequestMatcher requestMatcher) {
		Assert.notNull(requestMatcher, "RequestMatcher is required");
		this.requestMatchers.add(requestMatcher);
		return this;
	}

	@Override
	public void andRespond(ResponseCreator responseCreator) {
		Assert.notNull(responseCreator, "ResponseCreator is required");
		this.responseCreator = responseCreator;
	}

	@Override
	public void match(ClientHttpRequest request) throws IOException {
		for (RequestMatcher matcher : getRequestMatchers()) {
			matcher.match(request);
		}
	}

	@Override
	public ClientHttpResponse createResponse(ClientHttpRequest request) throws IOException {
		ResponseCreator responseCreator = getResponseCreator();
		Assert.state(responseCreator != null, "createResponse() called before ResponseCreator was set");
		getRequestCount().incrementAndValidate();
		return responseCreator.createResponse(request);
	}

	@Override
	public boolean hasRemainingCount() {
		return getRequestCount().hasRemainingCount();
	}

	@Override
	public boolean isSatisfied() {
		return getRequestCount().isSatisfied();
	}

	/**
	 * Helper class that keeps track of actual vs expected request count.
	 */
	protected static class RequestCount {

		private final ExpectedCount expectedCount;

		private int matchedRequestCount;

		public RequestCount(ExpectedCount expectedCount) {
			this.expectedCount = expectedCount;
		}

		public ExpectedCount getExpectedCount() {
			return this.expectedCount;
		}

		public int getMatchedRequestCount() {
			return this.matchedRequestCount;
		}

		public void incrementAndValidate() {
			this.matchedRequestCount++;
			if (getMatchedRequestCount() > getExpectedCount().getMaxCount()) {
				throw new AssertionError("No more calls expected.");
			}
		}

		public boolean hasRemainingCount() {
			return (getMatchedRequestCount() < getExpectedCount().getMaxCount());
		}

		public boolean isSatisfied() {
			return (getMatchedRequestCount() >= getExpectedCount().getMinCount());
		}
	}

}


text:
from rs4 import asynchat
from . import dbconnect
import socket

DEBUG = True
LINE_FEED = b"\r\n"

class RedisError (Exception):
	pass

class AsynConnect (dbconnect.AsynDBConnect, asynchat.async_chat):
	def __init__ (self, address, params = None, lock = None, logger = None):
		dbconnect.AsynDBConnect.__init__ (self, address, params, lock, logger)
		asynchat.async_chat.__init__ (self)

	def close (self, deactive = 1):
		asynchat.async_chat.close (self)
		# re-init asychat
		self.ac_in_buffer = b''
		self.incoming = []
		self.producer_fifo.clear()

		dbconnect.AsynDBConnect.close (self, deactive)
		self.logger ("[info] ..dbo %s:%d has been closed" % self.address)

	def handle_connect (self):
		self.set_event_time ()
		if self.user:
			self.push_command ('AUTH', self.password)

	def push_command (self, *args):
		self.set_event_time ()
		self.last_command = args [0].upper ()
		command = pack_command (self.last_command, *args [1:])

		if isinstance(command, list):
			command = b"".join (command)
		self.push (command)

	def connect (self):
		self.create_socket (socket.AF_INET, socket.SOCK_STREAM)
		try:
			asynchat.async_chat.connect (self, self.address)
		except:
			self.handle_error ()

	def collect_incoming_data (self, data):
		self.set_event_time ()
		self.data.append (data)

	def fetchall (self):
		try:
			res = self.response [0][0]
		except IndexError:
			res = None
		self.response = []
		return res

	def add_element (self, e):
		if type (e) is bytes:
			e = e.decode ("utf8")
		self.response [-1].append (e)
		self.num_elements [-1] -= 1
		while self.num_elements and self.num_elements [-1] <= 0:
			self.num_elements.pop (-1)
			if len (self.response) > 1:
				item = self.response.pop (-1)
				self.response [-1].append (item)

	def raise_error (self, e):
		raise RedisError (e.decode ("utf8"))

	def found_terminator (self):
		if self.last_command == "AUTH":
			if self.data [-1] != b"+OK":
				self.raise_error (self.data [-1][1:])
			if self.dbname:
				return self.push_command ('SELECT', self.dbname)

		if self.last_command == "SELECT" and self.data [-1] != b"+OK":
			self.raise_error (self.data [-1][1:])

		header = self.data [-1][:1]
		if self.length != -1:
			self.add_element (self.data [-1][:-2])
			self.data = []
			self.length = -1
			self.set_terminator (LINE_FEED)

		elif header in b"-":
			self.raise_error (self.data [-1][1:])

		elif header in b"+":
			self.add_element (self.data [-1][1:])
			self.has_result = True
			self.set_terminator (LINE_FEED)

		elif header in b":":
			self.add_element ((int (self.data [-1][1:]),))
			self.set_terminator (LINE_FEED)

		elif header == b"$":
			self.length = int (self.data [-1][1:]) + 2
			if self.length == 1:
				self.add_element (None)
				self.data = []
				self.set_terminator (LINE_FEED)
				self.length = -1
			else:
				self.set_terminator (self.length)

		elif header == b"*":
			num_elements = int (self.data [-1][1:])
			if self.num_elements [-1] == -1:
				self.add_element (None)
			else:
				self.response.append ([])
				self.num_elements.append (num_elements)
			self.data = []
			self.set_terminator (LINE_FEED)

		else:
			raise ValueError ("Protocol Error")

		if not self.num_elements:
			self.has_result = True
			self.close_case_with_end_tran ()

	def close_case (self):
		if self.request:
			self.request.handle_result (None, self.expt, self.fetchall ())
			self.request = None
		self.set_active (False)

	def end_tran (self):
		if not self.backend:
			self.del_channel ()

	def begin_tran (self, request):
		dbconnect.AsynDBConnect.begin_tran (self, request)
		self.response = [[]]
		self.data = []
		self.length = -1
		self.num_elements = [0]
		self.last_command = None

	def execute (self, request):
		self.begin_tran (request)
		# SHOULD push before adding to map, otherwise raised threading collision
		self.push_command (request.method, *request.params)
		self.set_terminator (LINE_FEED)
		if not self.connected:
			self.connect ()
		elif not self.backend:
			self.add_channel ()

_AsynConnect = AsynConnect # for subclassing

try:
	from redis import connection as redisconn
	import redis.connection
	pack_command = redisconn.Connection ().pack_command

except ImportError:
	from ..uninstalled import Uninstalled
	AsynConnect = Uninstalled ('redis')


text:
package com.salesforce.storm.spout.sideline.config;

import com.salesforce.storm.spout.documentation.ClassSpec;
import com.salesforce.storm.spout.documentation.DocGenerator;
import com.salesforce.storm.spout.sideline.metrics.SidelineMetrics;

import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Generates Configuration Values for Sideline.
 */
public class DocTask {
    /**
     * Entry point into Doc generating task.
     * @param args not used.
     * @throws IOException on error writing file.
     */
    public static void main(String[] args) throws IOException {
        final Path inputPath = Paths.get("README.md");
        generateConfigDocs(inputPath);
        generateMetricDocs(inputPath);
    }

    private static void generateMetricDocs(final Path inputPath) throws IOException {
        final String tagArg = "SIDELINE_METRICS";
        final List<ClassSpec> classSpecs = new ArrayList<>();
        classSpecs.add(new ClassSpec(SidelineMetrics.class));

        final DocGenerator docGenerator = new DocGenerator(inputPath, tagArg, classSpecs);
        docGenerator.generateMetricDocs();
    }

    private static void generateConfigDocs(final Path inputPath) throws IOException {
        final String tagArg = "SIDELINE_CONFIGURATION";
        final List<ClassSpec> classSpecs = new ArrayList<>();
        classSpecs.add(new ClassSpec(SidelineConfig.class, SidelineConfig.setDefaults(new HashMap<>())));

        final DocGenerator docGenerator = new DocGenerator(inputPath, tagArg, classSpecs);
        docGenerator.generateConfigDocs();
    }
}


text:
layout: archive
title: "Tiny House Plans"
date: 2014-09-14
excerpt: "Here's how I'm planning to build my tiny house."
image:
  feature: tinyhouse-feature.jpg
  teaser: tinyhouse-teaser.jpg
  thumb: tinyhouse-teaser.jpg
  credit: Tammy Strobel
  creditlink: https://flic.kr/p/dKrndr
ads: true
share: true
comments: true
---

<div class="tiles">
{% for post in site.categories.tiny-house %}
  {% include post-grid.html %}
{% endfor %}
</div><!-- /.tiles -->


text:
#ifndef GrRectanizerSkyline_DEFINED
#define GrRectanizerSkyline_DEFINED

#include "include/private/SkTDArray.h"
#include "src/gpu/GrRectanizer.h"

// Pack rectangles and track the current silhouette
// Based, in part, on Jukka Jylanki's work at http://clb.demon.fi
//
// Mark this class final in an effort to avoid the vtable when this subclass is used explicitly.
class GrRectanizerSkyline final : public GrRectanizer {
public:
    GrRectanizerSkyline(int w, int h) : INHERITED(w, h) {
        this->reset();
    }

    ~GrRectanizerSkyline() final { }

    void reset() final {
        fAreaSoFar = 0;
        fSkyline.reset();
        SkylineSegment* seg = fSkyline.append(1);
        seg->fX = 0;
        seg->fY = 0;
        seg->fWidth = this->width();
    }

    bool addRect(int w, int h, SkIPoint16* loc) final;

    float percentFull() const final {
        return fAreaSoFar / ((float)this->width() * this->height());
    }

private:
    struct SkylineSegment {
        int  fX;
        int  fY;
        int  fWidth;
    };

    SkTDArray<SkylineSegment> fSkyline;

    int32_t fAreaSoFar;

    // Can a width x height rectangle fit in the free space represented by
    // the skyline segments >= 'skylineIndex'? If so, return true and fill in
    // 'y' with the y-location at which it fits (the x location is pulled from
    // 'skylineIndex's segment.
    bool rectangleFits(int skylineIndex, int width, int height, int* y) const;
    // Update the skyline structure to include a width x height rect located
    // at x,y.
    void addSkylineLevel(int skylineIndex, int x, int y, int width, int height);

    using INHERITED = GrRectanizer;
};

#endif


text:
<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
?>

                <button type="button" class="close" data-dismiss="modal">

                        ×

                        Close
                </button>

                <button type="button" class="close" data-dismiss="modal">

                        ×

                        Close
                </button>

            <button type="button" class="btn btn-default" data-dismiss="modal">
                Close</button>
            <button type="button" class="btn btn-primary" id="save_modal_btn">
                Save changes</button>

                <button type="button" class="close" data-dismiss="modal">

                        ×

                        Close
                </button>

<button type="button" class="btn btn-danger btn-large" id="confirm_btn">Confirm</button>

<button type="button" class="btn btn-default btn-large" data-dismiss="modal">Cancel</button>

                <button type="button" class="close" data-dismiss="modal">

                        ×

                        Close
                </button>

                <input type="text" class="form-control" placeholder='Chassis Setup name' id="text_entry_modal_input"></input>

                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary" id="text_entry_modal_update_btn">Update</button>


text:
.. _installation_toc:

************
Installation
************

.. TIP::

    Note: check out the :ref:`quick-start guides <quickstart-toc>` if you want a first impression of zrepl.

.. toctree::

    installation/user-privileges
    installation/packages
    installation/apt-repos
    installation/rpm-repos
    installation/compile-from-source
    installation/freebsd-jail-with-iocage
    installation/what-next


text:
import scala.io.Source

object LongLines3 {
  import scala.io.Source

  object LongLines {

    def processFile(filename: String, width: Int) {

      def processLine(line: String) {
        if (line.length > width)
          print(filename +": "+ line)
      }

      val source = Source.fromFile(filename)
      for (line <- source.getLines)
        processLine(line)
    }
  }

  object FindLongLines {
    def main(args: Array[String]) {
      val width = args(0).toInt
      for (arg <- args.drop(1))
        LongLines.processFile(arg, width)
    }
  }

  def main(args: Array[String]) = FindLongLines.main(args)
}


text:
@class CMessageWrap, MessageExpItem, NSString, VideoUploadStatInfo;

@interface CExtendInfoOfVideo : NSObject <IMessageWrapExt, IMsgExtendOperation, NSCopying>
{
    unsigned int m_uiVideoLen;
    unsigned int m_uiVideoTime;
    unsigned int m_uiUploadStatus;
    unsigned int m_uiVideoOffset;
    unsigned int m_uiCameraType;
    unsigned int m_uiVideoSource;
    NSString *m_nsAesKey;
    NSString *m_nsMsgDataUrl;
    NSString *m_nsMsgThumbUrl;
    NSString *m_nsMsgThumbAesKey;
    unsigned int m_uiMsgThumbSize;
    unsigned int m_uiMsgThumbWidth;
    unsigned int m_uiMsgThumbHeight;
    NSString *m_nsAutoDownloadControl;
    NSString *m_nsStatExtStr;
    MessageExpItem *m_oMsgExpItem;
    NSString *m_nsFileParam;
    NSString *m_nsStreamVideoUrl;
    unsigned int m_uiStreamVideoTime;
    NSString *m_nsStreamVideoTitle;
    NSString *m_nsStreamVideoWording;
    NSString *m_nsStreamVideoWebUrl;
    NSString *m_nsStreamVideoThumbUrl;
    NSString *m_nsStreamVideoPublishId;
    NSString *m_nsStreamVideoAdUxInfo;
    NSString *m_nsMsgMd5;
    NSString *m_nsNewMd5;
    int m_nDownloadLimit;
    CMessageWrap *m_refMessageWrap;
    VideoUploadStatInfo *_m_oVideoUploadStatInfo;
}

+ (void)CreateVideoMsg:(id)arg1 ToUsr:(id)arg2 VideoInfo:(id)arg3 MsgType:(unsigned int)arg4 retMessageWrap:(id *)arg5;
+ (void)CreateExtendInfoWithType:(unsigned int)arg1 retExtendInfo:(id *)arg2;
@property(retain, nonatomic) VideoUploadStatInfo *m_oVideoUploadStatInfo; // @synthesize m_oVideoUploadStatInfo=_m_oVideoUploadStatInfo;
@property(retain, nonatomic) MessageExpItem *m_oMsgExpItem; // @synthesize m_oMsgExpItem;
@property(nonatomic) int m_nDownloadLimit; // @synthesize m_nDownloadLimit;
@property(retain, nonatomic) NSString *m_nsNewMd5; // @synthesize m_nsNewMd5;
@property(retain, nonatomic) NSString *m_nsMsgMd5; // @synthesize m_nsMsgMd5;
@property(retain, nonatomic) NSString *m_nsStatExtStr; // @synthesize m_nsStatExtStr;
@property(retain, nonatomic) NSString *m_nsStreamVideoAdUxInfo; // @synthesize m_nsStreamVideoAdUxInfo;
@property(retain, nonatomic) NSString *m_nsStreamVideoPublishId; // @synthesize m_nsStreamVideoPublishId;
@property(retain, nonatomic) NSString *m_nsStreamVideoThumbUrl; // @synthesize m_nsStreamVideoThumbUrl;
@property(retain, nonatomic) NSString *m_nsStreamVideoWebUrl; // @synthesize m_nsStreamVideoWebUrl;
@property(retain, nonatomic) NSString *m_nsStreamVideoWording; // @synthesize m_nsStreamVideoWording;
@property(retain, nonatomic) NSString *m_nsStreamVideoTitle; // @synthesize m_nsStreamVideoTitle;
@property(nonatomic) unsigned int m_uiStreamVideoTime; // @synthesize m_uiStreamVideoTime;
@property(retain, nonatomic) NSString *m_nsStreamVideoUrl; // @synthesize m_nsStreamVideoUrl;
@property(retain, nonatomic) NSString *m_nsFileParam; // @synthesize m_nsFileParam;
@property(nonatomic) CMessageWrap *m_refMessageWrap; // @synthesize m_refMessageWrap;
@property(retain, nonatomic) NSString *m_nsMsgDataUrl; // @synthesize m_nsMsgDataUrl;
@property(retain, nonatomic) NSString *m_nsAesKey; // @synthesize m_nsAesKey;
@property(retain, nonatomic) NSString *m_nsMsgThumbUrl; // @synthesize m_nsMsgThumbUrl;
@property(retain, nonatomic) NSString *m_nsMsgThumbAesKey; // @synthesize m_nsMsgThumbAesKey;
@property(nonatomic) unsigned int m_uiVideoTime; // @synthesize m_uiVideoTime;
@property(nonatomic) unsigned int m_uiVideoSource; // @synthesize m_uiVideoSource;
@property(nonatomic) unsigned int m_uiVideoOffset; // @synthesize m_uiVideoOffset;
@property(nonatomic) unsigned int m_uiVideoLen; // @synthesize m_uiVideoLen;
@property(nonatomic) unsigned int m_uiUploadStatus; // @synthesize m_uiUploadStatus;
@property(nonatomic) unsigned int m_uiCameraType; // @synthesize m_uiCameraType;
@property(retain, nonatomic) NSString *m_nsAutoDownloadControl; // @synthesize m_nsAutoDownloadControl;
@property(nonatomic) unsigned int m_uiMsgThumbWidth; // @synthesize m_uiMsgThumbWidth;
@property(nonatomic) unsigned int m_uiMsgThumbSize; // @synthesize m_uiMsgThumbSize;
@property(nonatomic) unsigned int m_uiMsgThumbHeight; // @synthesize m_uiMsgThumbHeight;
- (void).cxx_destruct;
- (void)SetPlayed;
- (_Bool)IsUnPlayed;
- (_Bool)IsDownloadEnded;
- (id)GetDownloadThumbPath;
- (id)GetThumbPath;
- (void)UpdateVideoStatus:(id)arg1;
- (void)ChangeForBackup;
- (void)UpdateContent:(id)arg1;
- (id)xmlOfStreamVideo;
- (void)parseStreamVideoNode:(struct XmlReaderNode_t *)arg1;
- (void)ChangeForDisplay;
- (id)copyWithZone:(struct _NSZone *)arg1;
- (id)init;

// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;

@end


text:
Mif.Tree.Rename {#Mif.Tree.Rename}
==========================================

Implements rename functionality.

Mif.Tree.Item {#Mif.Tree.Item::Rename}
==========================================

Mif.Tree.Item Method: rename {#Mif.Tree.Name:rename}
------------------------------------------------------

inline edit name.

### Syntax:

	node.rename();

### Example:

#####javascript

	myTree=new Mif.Tree({
		...
	});

	$('rename').addEvent('click', function(){
		var node=myTree.selected;
		if(!node) return;
		node.rename();
	});

#####html

	<input type="button" id="rename" />


text:
package com.antigenomics.mageri.core.assemble;

import com.milaboratory.core.sequence.NucleotideSQPair;
import com.milaboratory.core.sequence.nucleotide.NucleotideSequence;
import com.milaboratory.core.sequencing.read.SSequencingRead;
import com.milaboratory.core.sequencing.read.SSequencingReadImpl;
import com.antigenomics.mageri.pipeline.analysis.Sample;

import java.util.Collections;
import java.util.Set;

public final class SConsensus extends Consensus<SSequencingRead> {
    private final NucleotideSQPair consensusSQPair;
    private final int assembledSize, trueSize;
    private final Set<Integer> minors;

    public SConsensus(Sample sample,
                      NucleotideSequence umi,
                      NucleotideSQPair consensusSQPair,
                      Set<Integer> minors,
                      int assembledSize, int trueSize) {
        super(sample, umi);
        this.consensusSQPair = consensusSQPair;
        this.minors = minors;
        this.assembledSize = assembledSize;
        this.trueSize = trueSize;
    }

    public Set<Integer> getMinors() {
        return Collections.unmodifiableSet(minors);
    }

    public NucleotideSQPair getConsensusSQPair() {
        return consensusSQPair;
    }

    @Override
    public SSequencingRead asRead() {
        return new SSequencingReadImpl(
                "C:" + sample.getFullName() + " " + umi + ":" + assembledSize + ":" + trueSize,
                consensusSQPair,
                -1);
    }

    public int getAssembledSize() {
        return assembledSize;
    }

    public int getTrueSize() {
        return trueSize;
    }

    @Override
    public boolean isPairedEnd() {
        return false;
    }

    @Override
    public String toString() {
        return umi + "\t" + consensusSQPair.getSequence() + "\t" + consensusSQPair.getQuality();
    }
}