text:
'use strict';

var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

function _CustomElement() {
  return Reflect.construct(HTMLElement, [], this.__proto__.constructor);
}

;
Object.setPrototypeOf(_CustomElement.prototype, HTMLElement.prototype);
Object.setPrototypeOf(_CustomElement, HTMLElement);

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

;(function () {
  try {
    var _window = window,
        _Slim = _window.Slim;

    if (!!_Slim && Symbol.slimjs && _Slim.plugins && _Slim.asap) {
      var warn = console.error || console.warn || console.log;
      return warn('Stopping script: slim.js already initialized');
    }
  } catch (err) {}

  var _$2 = Symbol.slimjs = Symbol('@SlimInternals');

  var __flags = {
    isWCSupported: 'customElements' in window && 'import' in document.createElement('link') && 'content' in document.createElement('template'),
    isIE11: !!window['MSInputMethodContext'] && !!document['documentMode'],
    isChrome: undefined,
    isEdge: undefined,
    isSafari: undefined,
    isFirefox: undefined
  };

  try {
    __flags.isChrome = /Chrome/.test(navigator.userAgent);
    __flags.isEdge = /Edge/.test(navigator.userAgent);
    __flags.isSafari = /Safari/.test(navigator.userAgent);
    __flags.isFirefox = /Firefox/.test(navigator.userAgent);

    if (__flags.isIE11 || __flags.isEdge) {
      __flags.isChrome = false;
      Object.defineProperty(Node.prototype, 'children', function () {
        return this.childNodes;
      });
    }
  } catch (err) {}

  var Internals = function Internals() {
    _classCallCheck(this, Internals);

    this.boundParent = null;
    this.repeater = {};
    this.bindings = {};
    this.inbounds = {};
    this.eventHandlers = {};
    this.rootElement = null;
    this.createdCallbackInvoked = false;
    this.sourceText = null;
    this.excluded = false;
    this.autoBoundAttributes = [];
  };

  var Slim = function (_CustomElement2) {
    _inherits(Slim, _CustomElement2);

    _createClass(Slim, null, [{
      key: 'dashToCamel',
      value: function dashToCamel(dash) {
        return dash.indexOf('-') < 0 ? dash : dash.replace(/-[a-z]/g, function (m) {
          return m[1].toUpperCase();
        });
      }
    }, {
      key: 'camelToDash',
      value: function camelToDash(camel) {
        return camel.replace(/([A-Z])/g, '-$1').toLowerCase();
      }
    }, {
      key: 'lookup',
      value: function lookup(target, expression, maybeRepeated) {
        var chain = expression.split('.');
        var o = void 0;
        if (maybeRepeated && maybeRepeated[_$2].repeater[chain[0]]) {
          o = maybeRepeated[_$2].repeater;
        } else {
          o = target;
        }
        var i = 0;
        while (o && i < chain.length) {
          o = o[chain[i++]];
        }
        return o;
      }

      // noinspection JSUnresolvedVariable

    }, {
      key: '_$',
      value: function _$(target) {
        target[_$2] = target[_$2] || new Internals();
        return target[_$2];
      }
    }, {
      key: 'polyFill',
      value: function polyFill(url) {
        if (!__flags.isWCSupported) {
          var existingScript = document.querySelector('script[data-is-slim-polyfill="true"]');
          if (!existingScript) {
            var script = document.createElement('script');
            script.setAttribute('data-is-slim-polyfill', 'true');
            script.src = url;
            document.head.appendChild(script);
          }
        }
      }
    }, {
      key: 'tag',
      value: function tag(tagName, tplOrClazz, clazz) {
        if (clazz === undefined) {
          clazz = tplOrClazz;
        } else {
          Slim.tagToTemplateDict.set(tagName, tplOrClazz);
        }
        this.classToTagDict.set(clazz, tagName);
        customElements.define(tagName, clazz);
      }
    }, {
      key: 'tagOf',
      value: function tagOf(clazz) {
        return this.classToTagDict.get(clazz);
      }

      /**
       * @deprecated
       * @param tag
       * @returns {Function} Class constructor
       */

    }, {
      key: 'classOf',
      value: function classOf(tag) {
        return customElements.get(tag);
      }
    }, {
      key: 'plugin',
      value: function plugin(phase, _plugin) {
        if (!this.plugins[phase]) {
          throw new Error('Cannot attach plugin: ' + phase + ' is not a supported phase');
        }
        this.plugins[phase].push(_plugin);
      }
    }, {
      key: 'checkCreationBlocking',
      value: function checkCreationBlocking(element) {
        if (element.attributes) {
          for (var i = 0, n = element.attributes.length; i < n; i++) {
            var attribute = element.attributes[i];
            var _iteratorNormalCompletion = true;
            var _didIteratorError = false;
            var _iteratorError = undefined;

            try {
              for (var _iterator = Slim[_$2].customDirectives[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                var _ref = _step.value;

                var _ref2 = _slicedToArray(_ref, 2);

                var test = _ref2[0];
                var directive = _ref2[1];

                var value = directive.isBlocking && test(attribute);
                if (value) {
                  return true;
                }
              }
            } catch (err) {
              _didIteratorError = true;
              _iteratorError = err;
            } finally {
              try {
                if (!_iteratorNormalCompletion && _iterator.return) {
                  _iterator.return();
                }
              } finally {
                if (_didIteratorError) {
                  throw _iteratorError;
                }
              }
            }
          }
        }
        return false;
      }
    }, {
      key: 'customDirective',
      value: function customDirective(testFn, fn, isBlocking) {
        if (this[_$2].customDirectives.has(testFn)) {
          throw new Error('Cannot register custom directive: ' + testFn + ' already registered');
        }
        fn.isBlocking = isBlocking;
        this[_$2].customDirectives.set(testFn, fn);
      }
    }, {
      key: 'executePlugins',
      value: function executePlugins(phase, target) {
        this.plugins[phase].forEach(function (fn) {
          fn(target);
        });
      }
    }, {
      key: 'qSelectAll',
      value: function qSelectAll(target, selector) {
        return [].concat(_toConsumableArray(target.querySelectorAll(selector)));
      }
    }, {
      key: 'unbind',
      value: function unbind(source, target) {
        var bindings = source[_$2].bindings;
        Object.keys(bindings).forEach(function (key) {
          var chain = bindings[key].chain;
          if (chain.has(target)) {
            chain.delete(target);
          }
        });
      }
    }, {
      key: 'root',
      value: function root(target) {
        return target.__isSlim && target.useShadow ? target[_$2].rootElement || target : target;
      }
    }, {
      key: 'selectRecursive',
      value: function selectRecursive(target, force) {
        var collection = [];
        var search = function search(node, force) {
          collection.push(node);
          var allow = !node.__isSlim || node.__isSlim && !node.template || node.__isSlim && node === target || force;
          if (allow) {
            var children = [].concat(_toConsumableArray(Slim.root(node).children));
            children.forEach(function (childNode) {
              search(childNode, force);
            });
          }
        };
        search(target, force);
        return collection;
      }
    }, {
      key: 'removeChild',
      value: function removeChild(target) {
        if (typeof target.remove === 'function') {
          target.remove();
        }
        if (target.parentNode) {
          target.parentNode.removeChild(target);
        }
        if (this._$(target).internetExploderClone) {
          this.removeChild(this._$(target).internetExploderClone);
        }
      }
    }, {
      key: 'moveChildren',
      value: function moveChildren(source, target) {
        while (source.firstChild) {
          target.appendChild(source.firstChild);
        }
      }
    }, {
      key: 'wrapGetterSetter',
      value: function wrapGetterSetter(element, expression) {
        var pName = expression.split('.')[0];
        var oSetter = element.__lookupSetter__(pName);
        if (oSetter && oSetter[_$2]) return pName;
        var srcValue = element[pName];

        var _$3 = this._$(element),
            bindings = _$3.bindings;

        bindings[pName] = {
          chain: new Set(),
          value: srcValue
        };
        bindings[pName].value = srcValue;
        var newSetter = function newSetter(v) {
          oSetter && oSetter.call(element, v);
          bindings[pName].value = v;
          element._executeBindings(pName);
        };
        newSetter[_$2] = true;
        element.__defineGetter__(pName, function () {
          return element[_$2].bindings[pName].value;
        });
        element.__defineSetter__(pName, newSetter);
        return pName;
      }
    }, {
      key: 'bindOwn',
      value: function bindOwn(target, expression, executor) {
        return Slim.bind(target, target, expression, executor);
      }
    }, {
      key: 'bind',
      value: function bind(source, target, expression, executor) {
        Slim._$(source);
        Slim._$(target);
        if (target[_$2].excluded) return;
        executor.source = source;
        executor.target = target;
        var pName = this.wrapGetterSetter(source, expression);
        if (!target[_$2].repeater[pName]) {
          source[_$2].bindings[pName].chain.add(target);
        }
        target[_$2].inbounds[pName] = target[_$2].inbounds[pName] || new Set();
        target[_$2].inbounds[pName].add(executor);
        return executor;
      }
    }, {
      key: 'update',
      value: function update(target) {
        for (var _len = arguments.length, props = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          props[_key - 1] = arguments[_key];
        }

        if (props.length === 0) {
          return Slim.commit(target);
        }
        var _iteratorNormalCompletion2 = true;
        var _didIteratorError2 = false;
        var _iteratorError2 = undefined;

        try {
          for (var _iterator2 = props[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
            var prop = _step2.value;

            Slim.commit(target, prop);
          }
        } catch (err) {
          _didIteratorError2 = true;
          _iteratorError2 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion2 && _iterator2.return) {
              _iterator2.return();
            }
          } finally {
            if (_didIteratorError2) {
              throw _iteratorError2;
            }
          }
        }
      }
    }, {
      key: 'commit',
      value: function commit(target, propertyName) {
        var $ = Slim._$(target);
        var props = propertyName ? [propertyName] : Object.keys($.bindings);
        var _iteratorNormalCompletion3 = true;
        var _didIteratorError3 = false;
        var _iteratorError3 = undefined;

        try {
          for (var _iterator3 = props[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
            var prop = _step3.value;

            var inbounds = $.inbounds[prop];
            if (inbounds) {
              var _iteratorNormalCompletion4 = true;
              var _didIteratorError4 = false;
              var _iteratorError4 = undefined;

              try {
                for (var _iterator4 = inbounds[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
                  var fn = _step4.value;

                  fn();
                }
              } catch (err) {
                _didIteratorError4 = true;
                _iteratorError4 = err;
              } finally {
                try {
                  if (!_iteratorNormalCompletion4 && _iterator4.return) {
                    _iterator4.return();
                  }
                } finally {
                  if (_didIteratorError4) {
                    throw _iteratorError4;
                  }
                }
              }
            }
            var bindings = $.bindings[prop];
            if (bindings) {
              var nodes = bindings.chain;
              var _iteratorNormalCompletion5 = true;
              var _didIteratorError5 = false;
              var _iteratorError5 = undefined;

              try {
                for (var _iterator5 = nodes[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
                  var node = _step5.value;

                  Slim.commit(node, prop);
                }
              } catch (err) {
                _didIteratorError5 = true;
                _iteratorError5 = err;
              } finally {
                try {
                  if (!_iteratorNormalCompletion5 && _iterator5.return) {
                    _iterator5.return();
                  }
                } finally {
                  if (_didIteratorError5) {
                    throw _iteratorError5;
                  }
                }
              }
            }
          }
        } catch (err) {
          _didIteratorError3 = true;
          _iteratorError3 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion3 && _iterator3.return) {
              _iterator3.return();
            }
          } finally {
            if (_didIteratorError3) {
              throw _iteratorError3;
            }
          }
        }
      }

      /*
        Class instance
        */

    }, {
      key: 'rxProp',
      get: function get() {
        return (/(.+[^(\((.+)\))])/
        ); // eslint-disable-line
      }
    }, {
      key: 'rxMethod',
      get: function get() {
        return (/(.+)(\((.+)\)){1}/
        ); // eslint-disable-line
      }
    }]);

    function Slim() {
      _classCallCheck(this, Slim);

      var _this = _possibleConstructorReturn(this, (Slim.__proto__ || Object.getPrototypeOf(Slim)).call(this));

      Slim._$(_this);
      _this.__isSlim = true;
      var init = function init() {
        Slim.debug('ctor', _this.localName);
        if (Slim.checkCreationBlocking(_this)) {
          return;
        }
        _this.createdCallback();
      };
      if (__flags.isSafari) {
        Slim.asap(init);
      } else init();
      return _this;
    }

    // Native DOM Api V1

    _createClass(Slim, [{
      key: 'createdCallback',
      value: function createdCallback() {
        if (this[_$2] && this[_$2].createdCallbackInvoked) return;
        this._initialize();
        this[_$2].createdCallbackInvoked = true;
        this.onBeforeCreated();
        Slim.executePlugins('create', this);
        this.render();
        this.onCreated();
      }

      // Native DOM Api V2

    }, {
      key: 'connectedCallback',
      value: function connectedCallback() {
        this.onAdded();
        Slim.executePlugins('added', this);
      }
    }, {
      key: 'disconnectedCallback',
      value: function disconnectedCallback() {
        this.onRemoved();
        Slim.executePlugins('removed', this);
      }
    }, {
      key: 'attributeChangedCallback',
      value: function attributeChangedCallback(attr, oldValue, newValue) {
        if (newValue !== oldValue && this.autoBoundAttributes.includes[attr]) {
          var prop = Slim.dashToCamel(attr);
          this[prop] = newValue;
        }
      }
      // Slim internal API

    }, {
      key: '_executeBindings',
      value: function _executeBindings(prop) {
        Slim.debug('_executeBindings', this.localName, this);
        Slim.commit(this, prop);
      }
    }, {
      key: '_bindChildren',
      value: function _bindChildren(children) {
        Slim.debug('_bindChildren', this.localName);
        if (!children) {
          children = Slim.qSelectAll(this, '*');
        }
        var _iteratorNormalCompletion6 = true;
        var _didIteratorError6 = false;
        var _iteratorError6 = undefined;

        try {
          for (var _iterator6 = children[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
            var child = _step6.value;

            Slim._$(child);
            if (child[_$2].boundParent === this) continue;
            child[_$2].boundParent = child[_$2].boundParent || this;

            // todo: child.localName === 'style' && this.useShadow -> processStyleNodeInShadowMode

            if (child.attributes.length) {
              var attributes = Array.from(child.attributes);
              var i = 0;
              var n = child.attributes.length;
              while (i < n) {
                var source = this;
                var attribute = attributes[i];
                if (!child[_$2].excluded) {
                  var _iteratorNormalCompletion7 = true;
                  var _didIteratorError7 = false;
                  var _iteratorError7 = undefined;

                  try {
                    for (var _iterator7 = Slim[_$2].customDirectives[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {
                      var _ref3 = _step7.value;

                      var _ref4 = _slicedToArray(_ref3, 2);

                      var check = _ref4[0];
                      var directive = _ref4[1];

                      var match = check(attribute);
                      if (match) {
                        directive(source, child, attribute, match);
                      }
                    }
                  } catch (err) {
                    _didIteratorError7 = true;
                    _iteratorError7 = err;
                  } finally {
                    try {
                      if (!_iteratorNormalCompletion7 && _iterator7.return) {
                        _iterator7.return();
                      }
                    } finally {
                      if (_didIteratorError7) {
                        throw _iteratorError7;
                      }
                    }
                  }
                }
                i++;
              }
            }

            if (!child[_$2].excluded) {
              scanNode(this, child);
            }
          }
        } catch (err) {
          _didIteratorError6 = true;
          _iteratorError6 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion6 && _iterator6.return) {
              _iterator6.return();
            }
          } finally {
            if (_didIteratorError6) {
              throw _iteratorError6;
            }
          }
        }
      }
    }, {
      key: '_resetBindings',
      value: function _resetBindings() {
        Slim.debug('_resetBindings', this.localName);
        this[_$2].bindings = {};
      }
    }, {
      key: '_render',
      value: function _render(customTemplate) {
        var _this2 = this;

        Slim.debug('_render', this.localName);
        Slim.executePlugins('beforeRender', this);
        this._resetBindings();[].concat(_toConsumableArray(this.children)).forEach(function (childNode) {
          if (childNode.localName === 'style') {
            _this2[_$2].externalStyle = document.importNode(childNode).cloneNode();
          }
        });
        Slim.root(this).innerHTML = '';
        var templateString = customTemplate || this.template;
        var template = document.createElement('template');
        template.innerHTML = templateString;
        var frag = template.content.cloneNode(true);
        var externalStyle = this[_$2].externalStyle;

        if (externalStyle) {
          frag.appendChild(this[_$2]);
        }
        var scopedChildren = Slim.qSelectAll(frag, '*');
        var doRender = function doRender() {
          (_this2[_$2].rootElement || _this2).appendChild(frag);
          _this2._bindChildren(scopedChildren);
          _this2._executeBindings();
          _this2.onRender();
          Slim.executePlugins('afterRender', _this2);
        };
        if (this.useShadow) {
          doRender();
        } else {
          Slim.asap(doRender);
        }
      }
    }, {
      key: '_initialize',
      value: function _initialize() {
        var _this3 = this;

        Slim.debug('_initialize', this.localName);
        if (this.useShadow) {
          if (typeof HTMLElement.prototype.attachShadow === 'undefined') {
            this[_$2].rootElement = this.createShadowRoot();
          } else {
            this[_$2].rootElement = this.attachShadow({ mode: 'open' });
          }
        } else {
          this[_$2].rootElement = this;
        }
        var observedAttributes = this.constructor.observedAttributes;
        if (observedAttributes) {
          observedAttributes.forEach(function (attr) {
            var pName = Slim.dashToCamel(attr);
            _this3[pName] = _this3.getAttribute(attr);
          });
        }
      }

      // Slim public / protected API

    }, {
      key: 'commit',
      value: function commit() {
        for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
          args[_key2] = arguments[_key2];
        }

        Slim.commit.apply(Slim, [this].concat(args));
      }
    }, {
      key: 'update',
      value: function update() {
        for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
          args[_key3] = arguments[_key3];
        }

        Slim.update.apply(Slim, [this].concat(args));
      }
    }, {
      key: 'render',
      value: function render(tpl) {
        this._render(tpl);
      }
    }, {
      key: 'onRender',
      value: function onRender() {}
    }, {
      key: 'onBeforeCreated',
      value: function onBeforeCreated() {}
    }, {
      key: 'onCreated',
      value: function onCreated() {}
    }, {
      key: 'onAdded',
      value: function onAdded() {}
    }, {
      key: 'onRemoved',
      value: function onRemoved() {}
    }, {
      key: 'find',
      value: function find(selector) {
        return this[_$2].rootElement.querySelector(selector);
      }
    }, {
      key: 'findAll',
      value: function findAll(selector) {
        return Slim.qSelectAll(this[_$2].rootElement, selector);
      }
    }, {
      key: 'callAttribute',
      value: function callAttribute(attr, data) {
        var fnName = this.getAttribute(attr);
        if (fnName) {
          return this[_$2].boundParent[fnName](data);
        }
      }
    }, {
      key: 'autoBoundAttributes',
      get: function get() {
        return [];
      }
    }, {
      key: 'useShadow',
      get: function get() {
        return false;
      }
    }, {
      key: 'template',
      get: function get() {
        return Slim.tagToTemplateDict.get(Slim.tagOf(this.constructor));
      }
    }]);

    return Slim;
  }(_CustomElement);

  Slim.classToTagDict = new Map();
  // noinspection JSAnnotator
  Slim.tagToTemplateDict = new Map();
  // noinspection JSAnnotator
  Slim.plugins = {
    create: [],
    added: [],
    beforeRender: [],
    afterRender: [],
    removed: []
  };

  Slim.debug = function () {};
  Slim.asap = window && window.requestAnimationFrame ? function (cb) {
    return window.requestAnimationFrame(cb);
  } : typeof setImmediate !== 'undefined' ? setImmediate : function (cb) {
    return setTimeout(cb, 0);
  };

  Slim[_$2] = {
    customDirectives: new Map(),
    uniqueCounter: 0,
    supportedNativeEvents: ['click', 'mouseover', 'mouseout', 'mousemove', 'mouseenter', 'mousedown', 'mouseup', 'dblclick', 'contextmenu', 'wheel', 'mouseleave', 'select', 'pointerlockchange', 'pointerlockerror', 'focus', 'blur', 'input', 'error', 'invalid', 'animationstart', 'animationend', 'animationiteration', 'reset', 'submit', 'resize', 'scroll', 'keydown', 'keypress', 'keyup', 'change']
  };

  Slim.customDirective(function (attr) {
    return attr.nodeName === 's:switch';
  }, function (source, target, attribute) {
    var expression = attribute.value;
    var oldValue = void 0;
    var anchor = document.createComment('switch:' + expression);
    target.appendChild(anchor);
    var children = [].concat(_toConsumableArray(target.children));
    var defaultChildren = children.filter(function (child) {
      return child.hasAttribute('s:default');
    });
    var fn = function fn() {
      var value = Slim.lookup(source, expression, target);
      if (String(value) === oldValue) return;
      var useDefault = true;
      children.forEach(function (child) {
        if (child.getAttribute('s:case') === String(value)) {
          if (child.__isSlim) {
            child.createdCallback();
          }
          anchor.parentNode.insertBefore(child, anchor);
          useDefault = false;
        } else {
          Slim.removeChild(child);
        }
      });
      if (useDefault) {
        defaultChildren.forEach(function (child) {
          if (child.__isSlim) {
            child.createdCallback();
          }
          anchor.parentNode.insertBefore(child, anchor);
        });
      } else {
        defaultChildren.forEach(function (child) {
          Slim.removeChild(child);
        });
      }
      oldValue = String(value);
    };
    Slim.bind(source, target, expression, fn);
  });

  Slim.customDirective(function (attr) {
    return (/^s:case$/.exec(attr.nodeName)
    );
  }, function () {}, true);
  Slim.customDirective(function (attr) {
    return (/^s:default$/.exec(attr.nodeName)
    );
  }, function () {}, true);

  // supported events (i.e. click, mouseover, change...)
  Slim.customDirective(function (attr) {
    return Slim[_$2].supportedNativeEvents.indexOf(attr.nodeName) >= 0;
  }, function (source, target, attribute) {
    var eventName = attribute.nodeName;
    var delegate = attribute.value;
    Slim._$(target).eventHandlers = target[_$2].eventHandlers || {};
    var allHandlers = target[_$2].eventHandlers;
    allHandlers[eventName] = allHandlers[eventName] || new WeakSet();
    var handler = function handler(e) {
      try {
        source[delegate].call(source, e); // eslint-disable-line
      } catch (err) {
        err.message = 'Could not respond to event "' + eventName + '" on ' + target.localName + ' -> "' + delegate + '" on ' + source.localName + ' ... ' + err.message;
        console.warn(err);
      }
    };
    allHandlers[eventName].add(handler);
    target.addEventListener(eventName, handler);
    handler = null;
  });

  Slim.customDirective(function (attr) {
    return attr.nodeName === 's:if';
  }, function (source, target, attribute) {
    var expression = attribute.value;
    var path = expression;
    var isNegative = false;
    if (path.charAt(0) === '!') {
      path = path.slice(1);
      isNegative = true;
    }
    var oldValue = void 0;
    var anchor = document.createComment('{$target.localName} if:' + expression);
    target.parentNode.insertBefore(anchor, target);
    var fn = function fn() {
      var value = !!Slim.lookup(source, path, target);
      if (isNegative) {
        value = !value;
      }
      if (value === oldValue) return;
      if (value) {
        if (target.__isSlim) {
          target.createdCallback();
        }
        anchor.parentNode.insertBefore(target, anchor.nextSibling);
      } else {
        Slim.removeChild(target);
      }
      oldValue = value;
    };
    Slim.bind(source, target, path, fn);
  }, true);

  var scanNode = function scanNode(source, target) {
    var textNodes = Array.from(target.childNodes).filter(function (n) {
      return n.nodeType === Node.TEXT_NODE;
    });
    var masterNode = target;
    var repeater = Slim._$(target).repeater;
    textNodes.forEach(function (target) {
      var updatedText = '';
      var matches = target.nodeValue.match(/\{\{([^\}\}]+)+\}\}/g); // eslint-disable-line
      var aggProps = {};
      var textBinds = {};
      if (matches) {
        Slim._$(target).sourceText = target.nodeValue;
        target[_$2].repeater = repeater;
        matches.forEach(function (expression) {
          var oldValue = void 0;
          var rxM = /\{\{(.+)(\((.+)\)){1}\}\}/.exec(expression);
          if (rxM) {
            var fnName = rxM[1];
            var pNames = rxM[3].split(' ').join('').split(',');
            pNames.map(function (path) {
              return path.split('.')[0];
            }).forEach(function (p) {
              return aggProps[p] = true;
            });
            textBinds[expression] = function (target) {
              var args = pNames.map(function (path) {
                return Slim.lookup(source, path, target);
              });
              var fn = source[fnName];
              var value = fn ? fn.apply(source, args) : undefined;
              if (oldValue === value) return;
              updatedText = updatedText.split(expression).join(value || '');
            };
            return;
          }
          var rxP = /\{\{(.+[^(\((.+)\))])\}\}/.exec(expression); // eslint-disable-line
          if (rxP) {
            var path = rxP[1];
            aggProps[path] = true;
            textBinds[expression] = function (target) {
              var value = Slim.lookup(source, path, masterNode);
              if (oldValue === value) return;
              updatedText = updatedText.split(expression).join(value || '');
            };
          }
        });
        var chainExecutor = function chainExecutor() {
          updatedText = target[_$2].sourceText;
          Object.keys(textBinds).forEach(function (expression) {
            textBinds[expression](target);
          });
          target.nodeValue = updatedText;
        };
        Object.keys(aggProps).forEach(function (prop) {
          Slim.bind(source, masterNode, prop, chainExecutor);
        });
      }
    });
  };

  Slim.customDirective(function (attr) {
    return attr.nodeName === 's:id';
  }, function (source, target, attribute) {
    Slim._$(target).boundParent[attribute.value] = target;
  });

  // bind:property
  Slim.customDirective(function (attr) {
    return (/^(bind):(\S+)/.exec(attr.nodeName)
    );
  }, function (source, target, attribute, match) {
    var tAttr = match[2];
    var tProp = Slim.dashToCamel(tAttr);
    var expression = attribute.value;
    var oldValue = void 0;
    var rxM = Slim.rxMethod.exec(expression);
    if (rxM) {
      var pNames = rxM[3].split(' ').join('').split(',');
      pNames.forEach(function (pName) {
        Slim.bind(source, target, pName, function () {
          var fn = Slim.lookup(source, rxM[1], target);
          var args = pNames.map(function (prop) {
            return Slim.lookup(source, prop, target);
          });
          var value = fn.apply(source, args);
          if (oldValue === value) return;
          target[tProp] = value;
          target.setAttribute(tAttr, value);
        });
      });
      return;
    }
    var rxP = Slim.rxProp.exec(expression);
    if (rxP) {
      var prop = rxP[1];
      Slim.bind(source, target, prop, function () {
        var value = Slim.lookup(source, expression, target);
        if (oldValue === value) return;
        target.setAttribute(tAttr, value);
        target[tProp] = value;
      });
    }
  });

  Slim.customDirective(function (attr) {
    return attr.nodeName === 's:repeat';
  }, function (source, repeaterNode, attribute) {
    var path = attribute.value;
    var tProp = 'data'; // default
    if (path.indexOf(' as ') > 0) {
      var _path$split = path.split(' as ');

      var _path$split2 = _slicedToArray(_path$split, 2);

      path = _path$split2[0];
      tProp = _path$split2[1];
    }

    // initialize clones list
    var clones = [];

    // create mount point and repeat template
    var mountPoint = document.createComment(repeaterNode.localName + ' s:repeat="' + attribute.value + '"');
    var parent = repeaterNode.parentElement || Slim.root(source);
    parent.insertBefore(mountPoint, repeaterNode);
    repeaterNode.removeAttribute('s:repeat');
    Slim.qSelectAll(repeaterNode, '*').forEach(function (node) {
      return Slim._$(node).excluded = true;
    });
    Slim._$(repeaterNode).excluded = true;
    var clonesTemplate = repeaterNode.outerHTML;
    repeaterNode.remove();

    // prepare for bind
    var oldDataSource = [];

    var replicate = function replicate(n, text) {
      var temp = text;
      var result = '';
      if (n < 1) return result;
      while (n > 1) {
        if (n & 1) result += temp;
        n >>= 1;
        temp += temp;
      }
      return result + temp;
    };

    // bind changes
    Slim.bind(source, mountPoint, path, function () {
      // execute bindings here
      var dataSource = Slim.lookup(source, path) || [];
      // read the diff -> list of CHANGED indicies

      var fragment = void 0;

      // when data source shrinks, dispose extra clones
      if (dataSource.length < clones.length) {
        var disposables = clones.slice(dataSource.length);
        disposables.forEach(function (node) {
          Slim.unbind(source, node);
          if (node[_$2].subTree) {
            node[_$2].subTree.forEach(function (subNode) {
              return Slim.unbind(source, subNode);
            });
          }
          node.remove();
        });
        clones.length = dataSource.length;
      }

      // build new clones if needed
      if (dataSource.length > clones.length) {
        var offset = clones.length;
        var diff = dataSource.length - clones.length;
        var html = replicate(diff, clonesTemplate); //  Array(diff).fill(clonesTemplate.innerHTML).join('');
        var range = document.createRange();
        range.setStartBefore(mountPoint);
        fragment = range.createContextualFragment(html);
        // build clone by index

        var _loop = function _loop(i) {
          var dataIndex = i + offset;
          var dataItem = dataSource[dataIndex];
          var clone = fragment.children[i];
          Slim._$(clone).repeater[tProp] = dataItem;
          var subTree = Slim.qSelectAll(clone, '*');
          subTree.forEach(function (node) {
            Slim._$(node).repeater[tProp] = dataItem;
          });
          clone[_$2].subTree = subTree;
          clones.push(clone);
        };

        for (var i = 0; i < diff; i++) {
          _loop(i);
        }
        var fragmentTree = Slim.qSelectAll(fragment, '*');
        source._bindChildren(fragmentTree);
      }

      var init = function init(target, value) {
        target[tProp] = value;
        Slim.commit(target, tProp);
      };

      dataSource.forEach(function (dataItem, i) {
        if (oldDataSource[i] !== dataItem) {
          var rootNode = clones[i];[rootNode].concat(_toConsumableArray(rootNode[_$2].subTree || Slim.qSelectAll(rootNode, '*'))).forEach(function (node) {
            node[_$2].repeater[tProp] = dataItem;
            node[_$2].repeater.__node = rootNode;
            if (node.__isSlim) {
              node.createdCallback();
              Slim.asap(function () {
                return init(node, dataItem);
              });
            } else {
              init(node, dataItem);
            }
          });
        }
      });
      oldDataSource = dataSource.concat();
      if (fragment) {
        Slim.asap(function () {
          parent.insertBefore(fragment, mountPoint);
        });
      }
    });
  }, true);

  if (window) {
    window['Slim'] = Slim;
  }
  if (typeof module !== 'undefined') {
    module.exports.Slim = Slim;
  }
})();


text:
<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          id="footer.content.properties">
<refmeta>
<refentrytitle>footer.content.properties</refentrytitle>
<refmiscinfo role="type"></refmiscinfo>
</refmeta>
<refnamediv>
<refname>footer.content.properties</refname>
<refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv>
<src:fragment id='footer.content.properties.frag'>
<xsl:attribute-set name="footer.content.properties">
  <xsl:attribute name="font-family">
    <xsl:value-of select="$body.fontset"/>
  </xsl:attribute>
  <xsl:attribute name="margin-left">
    <xsl:value-of select="$title.margin.left"/>
  </xsl:attribute>
</xsl:attribute-set>
</src:fragment>
</refsynopsisdiv>

<refsect1><title>Description</title>

<para>Properties of page footer content.</para>

</refsect1>
</refentry>

redpajama_set_name: RedPajamaGithub


text:
..
      Copyright 2011 OpenStack Foundation
      All Rights Reserved.

      Licensed under the Apache License, Version 2.0 (the "License"); you may
      not use this file except in compliance with the License. You may obtain
      a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
      WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
      License for the specific language governing permissions and limitations
      under the License.

Basic Configuration
===================

Glance has a number of options that you can use to configure the Glance API
server, the Glance Registry server, and the various storage backends that
Glance can use to store images.

Most configuration is done via configuration files, with the Glance API
server and Glance Registry server using separate configuration files.

When starting up a Glance server, you can specify the configuration file to
use (see :doc:`the documentation on controller Glance servers <controllingservers>`).
If you do **not** specify a configuration file, Glance will look in the following
directories for a configuration file, in order:

* ``~/.glance``
* ``~/``
* ``/etc/glance``
* ``/etc``

The Glance API server configuration file should be named ``glance-api.conf``.
Similarly, the Glance Registry server configuration file should be named
``glance-registry.conf``. If you installed Glance via your operating system's
package management system, it is likely that you will have sample
configuration files installed in ``/etc/glance``.

In addition to this documentation page, you can check the
``etc/glance-api.conf`` and ``etc/glance-registry.conf`` sample configuration
files distributed with Glance for example configuration files for each server
application with detailed comments on what each options does.

The PasteDeploy configuration (controlling the deployment of the WSGI
application for each component) may be found by default in
<component>-paste.ini alongside the main configuration file, <component>.conf.
For example, ``glance-api-paste.ini`` corresponds to ``glance-api.conf``.
This pathname for the paste config is configurable, as follows::

  [paste_deploy]
  config_file = /path/to/paste/config

Common Configuration Options in Glance
--------------------------------------

Glance has a few command-line options that are common to all Glance programs:

* ``--verbose``

Optional. Default: ``False``

Can be specified on the command line and in configuration files.

Turns on the INFO level in logging and prints more verbose command-line
interface printouts.

* ``--debug``

Optional. Default: ``False``

Can be specified on the command line and in configuration files.

Turns on the DEBUG level in logging.

* ``--config-file=PATH``

Optional. Default: See below for default search order.

Specified on the command line only.

Takes a path to a configuration file to use when running the program. If this
CLI option is not specified, then we check to see if the first argument is a
file. If it is, then we try to use that as the configuration file. If there is
no file or there were no arguments, we search for a configuration file in the
following order:

* ``~/.glance``
* ``~/``
* ``/etc/glance``
* ``/etc``

The filename that is searched for depends on the server application name. So,
if you are starting up the API server, ``glance-api.conf`` is searched for,
otherwise ``glance-registry.conf``.

* ``--config-dir=DIR``

Optional. Default: ``None``

Specified on the command line only.

Takes a path to a configuration directory from which all \*.conf fragments
are loaded. This provides an alternative to multiple --config-file options
when it is inconvenient to explicitly enumerate all the config files, for
example when an unknown number of config fragments are being generated
by a deployment framework.

If --config-dir is set, then --config-file is ignored.

An example usage would be:

  $ glance-api --config-dir=/etc/glance/glance-api.d

  $ ls /etc/glance/glance-api.d
   00-core.conf
   01-s3.conf
   02-swift.conf
   03-ssl.conf
   ... etc.

The numeric prefixes in the example above are only necessary if a specific
parse ordering is required (i.e. if an individual config option set in an
earlier fragment is overridden in a later fragment).

Configuring Server Startup Options
----------------------------------

You can put the following options in the ``glance-api.conf`` and
``glance-registry.conf`` files, under the ``[DEFAULT]`` section. They enable
startup and binding behaviour for the API and registry servers, respectively.

* ``bind_host=ADDRESS``

The address of the host to bind to.

Optional. Default: ``0.0.0.0``

* ``bind_port=PORT``

The port the server should bind to.

Optional. Default: ``9191`` for the registry server, ``9292`` for the API server

* ``backlog=REQUESTS``

Number of backlog requests to configure the socket with.

Optional. Default: ``4096``

* ``tcp_keepidle=SECONDS``

Sets the value of TCP_KEEPIDLE in seconds for each server socket.
Not supported on OS X.

Optional. Default: ``600``

* ``workers=PROCESSES``

Number of Glance API worker processes to start. Each worker
process will listen on the same port. Increasing this
value may increase performance (especially if using SSL
with compression enabled). Typically it is recommended
to have one worker process per CPU. The value `0` will
prevent any new processes from being created.

Optional. Default: ``1``

* ``db_auto_create=False``

Whether to automatically create the database tables.  Otherwise you can
manually run `glance-manage db_sync`.

Optional. Default: ``False``

Configurating SSL Support
~~~~~~~~~~~~~~~~~~~~~~~~~

* ``cert_file=PATH``

Path to the certificate file the server should use when binding to an
SSL-wrapped socket.

Optional. Default: not enabled.

* ``key_file=PATH``

Path to the private key file the server should use when binding to an
SSL-wrapped socket.

Optional. Default: not enabled.

* ``ca_file=PATH``

Path to the CA certificate file the server should use to validate client
certificates provided during an SSL handshake. This is ignored if
``cert_file`` and ''key_file`` are not set.

Optional. Default: not enabled.

* ``registry_client_protocol=PROTOCOL``

If you run a secure Registry server, you need to set this value to ``https``
and also set ``registry_client_key_file`` and optionally
``registry_client_cert_file``.

Optional. Default: http

* ``registry_client_key_file=PATH``

The path to the key file to use in SSL connections to the
registry server, if any. Alternately, you may set the
``GLANCE_CLIENT_KEY_FILE`` environ variable to a filepath of the key file

Optional. Default: Not set.

* ``registry_client_cert_file=PATH``

Optional. Default: Not set.

The path to the cert file to use in SSL connections to the
registry server, if any. Alternately, you may set the
``GLANCE_CLIENT_CERT_FILE`` environ variable to a filepath of the cert file

* ``registry_client_ca_file=PATH``

Optional. Default: Not set.

The path to a Certifying Authority's cert file to use in SSL connections to the
registry server, if any. Alternately, you may set the
``GLANCE_CLIENT_CA_FILE`` environ variable to a filepath of the CA cert file

* ``registry_client_insecure=False``

Optional. Default: False.

When using SSL in connections to the registry server, do not require
validation via a certifying authority. This is the registry's equivalent of
specifying --insecure on the command line using glanceclient for the API

* ``registry_client_timeout=SECONDS``

Optional. Default: ``600``.

The period of time, in seconds, that the API server will wait for a registry
request to complete. A value of '0' implies no timeout.

Configuring Logging in Glance
-----------------------------

There are a number of configuration options in Glance that control how Glance
servers log messages.

* ``--log-config=PATH``

Optional. Default: ``None``

Specified on the command line only.

Takes a path to a configuration file to use for configuring logging.

Logging Options Available Only in Configuration Files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You will want to place the different logging options in the **[DEFAULT]** section
in your application configuration file. As an example, you might do the following
for the API server, in a configuration file called ``etc/glance-api.conf``::

  [DEFAULT]
  log_file = /var/log/glance/api.log

* ``log_file``

The filepath of the file to use for logging messages from Glance's servers. If
missing, the default is to output messages to ``stdout``, so if you are running
Glance servers in a daemon mode (using ``glance-control``) you should make
sure that the ``log_file`` option is set appropriately.

* ``log_dir``

The filepath of the directory to use for log files. If not specified (the default)
the ``log_file`` is used as an absolute filepath.

* ``log_date_format``

The format string for timestamps in the log output.

Defaults to ``%Y-%m-%d %H:%M:%S``. See the
`logging module <http://docs.python.org/library/logging.html>`_ documentation for
more information on setting this format string.

* ``log_use_syslog``

Use syslog logging functionality.

Defaults to False.

Configuring Glance Storage Backends
-----------------------------------

There are a number of configuration options in Glance that control how Glance
stores disk images. These configuration options are specified in the
``glance-api.conf`` config file in the section ``[DEFAULT]``.

* ``default_store=STORE``

Optional. Default: ``file``

Can only be specified in configuration files.

Sets the storage backend to use by default when storing images in Glance.
Available options for this option are (``file``, ``swift``, ``s3``, ``rbd``, or ``sheepdog``, or ``cinder``).

Configuring Glance Image Size Limit
-----------------------------------

The following configuration option is specified in the
``glance-api.conf`` config file in the section ``[DEFAULT]``.

* ``image_size_cap=SIZE``

Optional. Default: ``1099511627776`` (1 TB)

Maximum image size, in bytes, which can be uploaded through the Glance API server.

**IMPORTANT NOTE**: this value should only be increased after careful consideration
and must be set to a value under 8 EB (9223372036854775808).

Configuring Glance User Storage Quota
-------------------------------------

The following configuration option is specified in the
``glance-api.conf`` config file in the section ``[DEFAULT]``.

* ``user_storage_quota``

Optional. Default: 0 (Unlimited).

This value specifies the maximum amount of bytes that each user can use
across all storage systems.

Configuring the Filesystem Storage Backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* ``filesystem_store_datadir=PATH``

Optional. Default: ``/var/lib/glance/images/``

Can only be specified in configuration files.

`This option is specific to the filesystem storage backend.`

Sets the path where the filesystem storage backend write disk images. Note that
the filesystem storage backend will attempt to create this directory if it does
not exist. Ensure that the user that ``glance-api`` runs under has write
permissions to this directory.

Configuring the Swift Storage Backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* ``swift_store_auth_address=URL``

Required when using the Swift storage backend.

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

Sets the authentication URL supplied to Swift when making calls to its storage
system. For more information about the Swift authentication system, please
see the `Swift auth <http://swift.openstack.org/overview_auth.html>`_
documentation and the
`overview of Swift authentication <http://docs.openstack.org/openstack-object-storage/admin/content/ch02s02.html>`_.

**IMPORTANT NOTE**: Swift authentication addresses use HTTPS by default. This
means that if you are running Swift with authentication over HTTP, you need
to set your ``swift_store_auth_address`` to the full URL, including the ``http://``.

* ``swift_store_user=USER``

Required when using the Swift storage backend.

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

Sets the user to authenticate against the ``swift_store_auth_address`` with.

* ``swift_store_key=KEY``

Required when using the Swift storage backend.

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

Sets the authentication key to authenticate against the
``swift_store_auth_address`` with for the user ``swift_store_user``.

* ``swift_store_container=CONTAINER``

Optional. Default: ``glance``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

Sets the name of the container to use for Glance images in Swift.

* ``swift_store_create_container_on_put``

Optional. Default: ``False``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

If true, Glance will attempt to create the container ``swift_store_container``
if it does not exist.

* ``swift_store_large_object_size=SIZE_IN_MB``

Optional. Default: ``5120``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

What size, in MB, should Glance start chunking image files
and do a large object manifest in Swift? By default, this is
the maximum object size in Swift, which is 5GB

* ``swift_store_large_object_chunk_size=SIZE_IN_MB``

Optional. Default: ``200``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

When doing a large object manifest, what size, in MB, should
Glance write chunks to Swift?  The default is 200MB.

* ``swift_store_multi_tenant=False``

Optional. Default: ``False``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

If set to True enables multi-tenant storage mode which causes Glance images
to be stored in tenant specific Swift accounts. When set to False Glance
stores all images in a single Swift account.

* ``swift_store_admin_tenants``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

Optional. Default: Not set.

A list of swift ACL strings that will be applied as both read and
write ACLs to the containers created by Glance in multi-tenant
mode. This grants the specified tenants/users read and write access
to all newly created image objects. The standard swift ACL string
formats are allowed, including:

<tenant_id>:<username>
<tenant_name>:<username>
\*:<username>

Multiple ACLs can be combined using a comma separated list, for
example: swift_store_admin_tenants = service:glance,*:admin

* ``swift_store_auth_version``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

Optional. Default: ``2``

A string indicating which version of Swift OpenStack authentication
to use. See the project
`python-swiftclient <http://docs.openstack.org/developer/python-swiftclient/>`_
for more details.

* ``swift_store_service_type``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

Optional. Default: ``object-store``

A string giving the service type of the swift service to use. This
setting is only used if swift_store_auth_version is ``2``.

* ``swift_store_region``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

Optional. Default: Not set.

A string giving the region of the swift service endpoint to use. This
setting is only used if swift_store_auth_version is ``2``. This
setting is especially useful for disambiguation if multiple swift
services might appear in a service catalog during authentication.

* ``swift_store_endpoint_type``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

Optional. Default: ``publicURL``

A string giving the endpoint type of the swift service endpoint to
use. This setting is only used if swift_store_auth_version is ``2``.

* ``swift_store_ssl_compression``

Can only be specified in configuration files.

`This option is specific to the Swift storage backend.`

Optional. Default: True.

If set to False, disables SSL layer compression of https swift
requests. Setting to 'False' may improve performance for images which
are already in a compressed format, eg qcow2. If set to True then
compression will be enabled (provided it is supported by the swift
proxy).

Configuring the S3 Storage Backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* ``s3_store_host=URL``

Required when using the S3 storage backend.

Can only be specified in configuration files.

`This option is specific to the S3 storage backend.`

Default: s3.amazonaws.com

Sets the main service URL supplied to S3 when making calls to its storage
system. For more information about the S3 authentication system, please
see the `S3 documentation <http://aws.amazon.com/documentation/s3/>`_

* ``s3_store_access_key=ACCESS_KEY``

Required when using the S3 storage backend.

Can only be specified in configuration files.

`This option is specific to the S3 storage backend.`

Sets the access key to authenticate against the ``s3_store_host`` with.

You should set this to your 20-character Amazon AWS access key.

* ``s3_store_secret_key=SECRET_KEY``

Required when using the S3 storage backend.

Can only be specified in configuration files.

`This option is specific to the S3 storage backend.`

Sets the secret key to authenticate against the
``s3_store_host`` with for the access key ``s3_store_access_key``.

You should set this to your 40-character Amazon AWS secret key.

* ``s3_store_bucket=BUCKET``

Required when using the S3 storage backend.

Can only be specified in configuration files.

`This option is specific to the S3 storage backend.`

Sets the name of the bucket to use for Glance images in S3.

Note that the namespace for S3 buckets is **global**,
therefore you must use a name for the bucket that is unique. It
is recommended that you use a combination of your AWS access key,
**lowercased** with "glance".

For instance if your Amazon AWS access key is:

``ABCDEFGHIJKLMNOPQRST``

then make your bucket value be:

``abcdefghijklmnopqrstglance``

* ``s3_store_create_bucket_on_put``

Optional. Default: ``False``

Can only be specified in configuration files.

`This option is specific to the S3 storage backend.`

If true, Glance will attempt to create the bucket ``s3_store_bucket``
if it does not exist.

* ``s3_store_object_buffer_dir=PATH``

Optional. Default: ``the platform's default temporary directory``

Can only be specified in configuration files.

`This option is specific to the S3 storage backend.`

When sending images to S3, what directory should be
used to buffer the chunks? By default the platform's
temporary directory will be used.

Configuring the RBD Storage Backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

**Note**: the RBD storage backend requires the python bindings for
librados and librbd. These are in the python-ceph package on
Debian-based distributions.

* ``rbd_store_pool=POOL``

Optional. Default: ``rbd``

Can only be specified in configuration files.

`This option is specific to the RBD storage backend.`

Sets the RADOS pool in which images are stored.

* ``rbd_store_chunk_size=CHUNK_SIZE_MB``

Optional. Default: ``4``

Can only be specified in configuration files.

`This option is specific to the RBD storage backend.`

Images will be chunked into objects of this size (in megabytes).
For best performance, this should be a power of two.

* ``rbd_store_ceph_conf=PATH``

Optional. Default: ``/etc/ceph/ceph.conf``, ``~/.ceph/config``, and ``./ceph.conf``

Can only be specified in configuration files.

`This option is specific to the RBD storage backend.`

Sets the Ceph configuration file to use.

* ``rbd_store_user=NAME``

Optional. Default: ``admin``

Can only be specified in configuration files.

`This option is specific to the RBD storage backend.`

Sets the RADOS user to authenticate as. This is only needed
when `RADOS authentication <http://ceph.newdream.net/wiki/Cephx>`_
is `enabled. <http://ceph.newdream.net/wiki/Cluster_configuration#Cephx_auth>`_

A keyring must be set for this user in the Ceph
configuration file, e.g. with a user ``glance``::

  [client.glance]
  keyring=/etc/glance/rbd.keyring

To set up a user named ``glance`` with minimal permissions, using a pool called
``images``, run::

  rados mkpool images
  ceph-authtool --create-keyring /etc/glance/rbd.keyring
  ceph-authtool --gen-key --name client.glance --cap mon 'allow r' --cap osd 'allow rwx pool=images' /etc/glance/rbd.keyring
  ceph auth add client.glance -i /etc/glance/rbd.keyring

Configuring the Sheepdog Storage Backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* ``sheepdog_store_address=ADDR``

Optional. Default: ``localhost``

Can only be specified in configuration files.

`This option is specific to the Sheepdog storage backend.`

Sets the IP address of the sheep daemon

* ``sheepdog_store_port=PORT``

Optional. Default: ``7000``

Can only be specified in configuration files.

`This option is specific to the Sheepdog storage backend.`

Sets the IP port of the sheep daemon

* ``sheepdog_store_chunk_size=SIZE_IN_MB``

Optional. Default: ``64``

Can only be specified in configuration files.

`This option is specific to the Sheepdog storage backend.`

Images will be chunked into objects of this size (in megabytes).
For best performance, this should be a power of two.

Configuring the Cinder Storage Backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

**Note**: Currently Cinder store is a partial implementation.
After Cinder expose 'brick' library, and 'Readonly-volume-attaching',
'volume-multiple-attaching' enhancement ready, the store will support
'Upload' and 'Download' interface finally.

* ``cinder_catalog_info=<service_type>:<service_name>:<endpoint_type>``

Optional. Default: ``volume:cinder:publicURL``

Can only be specified in configuration files.

`This option is specific to the Cinder storage backend.`

Sets the info to match when looking for cinder in the service catalog.
Format is : separated values of the form: <service_type>:<service_name>:<endpoint_type>

* ``cinder_endpoint_template=http://ADDR:PORT/VERSION/%(project_id)s``

Optional. Default: ``None``

Can only be specified in configuration files.

Override service catalog lookup with template for cinder endpoint.
e.g. http://localhost:8776/v1/%(project_id)s

* ``os_region_name=REGION_NAME``

Optional. Default: ``None``

Can only be specified in configuration files.

Region name of this node.

* ``cinder_ca_certificates_file=CA_FILE_PATH``

Optional. Default: ``None``

Can only be specified in configuration files.

Location of ca certicates file to use for cinder client requests.

* ``cinder_http_retries=TIMES``

Optional. Default: ``3``

Can only be specified in configuration files.

Number of cinderclient retries on failed http calls.

* ``cinder_api_insecure=ON_OFF``

Optional. Default: ``False``

Can only be specified in configuration files.

Allow to perform insecure SSL requests to cinder.

Configuring the Image Cache
---------------------------

Glance API servers can be configured to have a local image cache. Caching of
image files is transparent and happens using a piece of middleware that can
optionally be placed in the server application pipeline.

This pipeline is configured in the PasteDeploy configuration file,
<component>-paste.ini. You should not generally have to edit this file
directly, as it ships with ready-made pipelines for all common deployment
flavors.

Enabling the Image Cache Middleware
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To enable the image cache middleware, the cache middleware must occur in
the application pipeline **after** the appropriate context middleware.

The cache middleware should be in your ``glance-api-paste.ini`` in a section
titled ``[filter:cache]``. It should look like this::

  [filter:cache]
  paste.filter_factory = glance.api.middleware.cache:CacheFilter.factory

A ready-made application pipeline including this filter is defined in
the ``glance-api-paste.ini`` file, looking like so::

  [pipeline:glance-api-caching]
  pipeline = versionnegotiation context cache apiv1app

To enable the above application pipeline, in your main ``glance-api.conf``
configuration file, select the appropriate deployment flavor like so::

  [paste_deploy]
  flavor = caching

Enabling the Image Cache Management Middleware
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There is an optional ``cachemanage`` middleware that allows you to
directly interact with cache images. Use this flavor in place of the
``cache`` flavor in your api config file.

  [paste_deploy]
  flavor = cachemanage

Configuration Options Affecting the Image Cache
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. note::

  These configuration options must be set in both the glance-cache
  and glance-api configuration files.

One main configuration file option affects the image cache.

 * ``image_cache_dir=PATH``

Required when image cache middleware is enabled.

Default: ``/var/lib/glance/image-cache``

This is the base directory the image cache can write files to.
Make sure the directory is writeable by the user running the
``glance-api`` server

 * ``image_cache_driver=DRIVER``

Optional. Choice of ``sqlite`` or ``xattr``

Default: ``sqlite``

The default ``sqlite`` cache driver has no special dependencies, other
than the ``python-sqlite3`` library, which is installed on virtually
all operating systems with modern versions of Python. It stores
information about the cached files in a SQLite database.

The ``xattr`` cache driver required the ``python-xattr>=0.6.0`` library
and requires that the filesystem containing ``image_cache_dir`` have
access times tracked for all files (in other words, the noatime option
CANNOT be set for that filesystem). In addition, ``user_xattr`` must be
set on the filesystem's description line in fstab. Because of these
requirements, the ``xattr`` cache driver is not available on Windows.

 * ``image_cache_sqlite_db=DB_FILE``

Optional.

Default: ``cache.db``

When using the ``sqlite`` cache driver, you can set the name of the database
that will be used to store the cached images information. The database
is always contained in the ``image_cache_dir``.

 * ``image_cache_max_size=SIZE``

Optional.

Default: ``10737418240`` (10 GB)

Size, in bytes, that the image cache should be constrained to. Images files
are cached automatically in the local image cache, even if the writing of that
image file would put the total cache size over this size. The
``glance-cache-pruner`` executable is what prunes the image cache to be equal
to or less than this value. The ``glance-cache-pruner`` executable is designed
to be run via cron on a regular basis. See more about this executable in
:doc:`Controlling the Growth of the Image Cache <cache>`

Configuring the Glance Registry
-------------------------------

There are a number of configuration options in Glance that control how
this registry server operates. These configuration options are specified in the
``glance-registry.conf`` config file in the section ``[DEFAULT]``.

**IMPORTANT NOTE**: The glance-registry service is only used in conjunction
with the glance-api service when clients are using the v1 REST API. See
`Configuring Glance APIs`_ for more info.

* ``sql_connection=CONNECTION_STRING`` (``--sql-connection`` when specified
  on command line)

Optional. Default: ``None``

Can be specified in configuration files. Can also be specified on the
command-line for the ``glance-manage`` program.

Sets the SQLAlchemy connection string to use when connecting to the registry
database. Please see the documentation for
`SQLAlchemy connection strings <http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html>`_
online. You must urlencode any special characters in CONNECTION_STRING.

* ``sql_timeout=SECONDS``
  on command line)

Optional. Default: ``3600``

Can only be specified in configuration files.

Sets the number of seconds after which SQLAlchemy should reconnect to the
datastore if no activity has been made on the connection.

Configuring Notifications
-------------------------

Glance can optionally generate notifications to be logged or sent to
a RabbitMQ queue. The configuration options are specified in the
``glance-api.conf`` config file in the section ``[DEFAULT]``.

* ``notifier_strategy``

Optional. Default: ``noop``

Sets the strategy used for notifications. Options are ``logging``,
``rabbit``, ``qpid`` and ``noop``.
For more information :doc:`Glance notifications <notifications>`

* ``rabbit_host``

Optional. Default: ``localhost``

Host to connect to when using ``rabbit`` strategy.

* ``rabbit_port``

Optional. Default: ``5672``

Port to connect to when using ``rabbit`` strategy.

* ``rabbit_use_ssl``

Optional. Default: ``false``

Boolean to use SSL for connecting when using ``rabbit`` strategy.

* ``rabbit_userid``

Optional. Default: ``guest``

Userid to use for connection when using ``rabbit`` strategy.

* ``rabbit_password``

Optional. Default: ``guest``

Password to use for connection when using ``rabbit`` strategy.

* ``rabbit_virtual_host``

Optional. Default: ``/``

Virtual host to use for connection when using ``rabbit`` strategy.

* ``rabbit_notification_exchange``

Optional. Default: ``glance``

Exchange name to use for connection when using ``rabbit`` strategy.

* ``rabbit_notification_topic``

Optional. Default: ``notifications``

Topic to use for connection when using ``rabbit`` strategy.

* ``rabbit_max_retries``

Optional. Default: ``0``

Number of retries on communication failures when using ``rabbit`` strategy.
A value of 0 means to retry forever.

* ``rabbit_retry_backoff``

Optional. Default: ``2``

Number of seconds to wait before reconnecting on failures when using
``rabbit`` strategy.

* ``rabbit_retry_max_backoff``

Optional. Default: ``30``

Maximum seconds to wait before reconnecting on failures when using
``rabbit`` strategy.

* ``rabbit_durable_queues``

Optional. Default: ``False``

Controls durability of exchange and queue when using ``rabbit`` strategy.

* ``qpid_notification_exchange``

Optional. Default: ``glance``

Message exchange to use when using the ``qpid`` notification strategy.

* ``qpid_notification_topic``

Optional. Default: ``glanice_notifications``

This is the topic prefix for notifications when using the ``qpid``
notification strategy. When a notification is sent at the ``info`` priority,
the topic will be ``notifications.info``. The same idea applies for
the ``error`` and ``warn`` notification priorities. To receive all
notifications, you would set up a receiver with a topic of
``notifications.*``.

* ``qpid_host``

Optional. Default: ``localhost``

This is the hostname or IP address of the Qpid broker that will be used
when Glance has been configured to use the ``qpid`` notification strategy.

* ``qpid_port``

Optional. Default: ``5672``

This is the port number to connect to on the Qpid broker, ``qpid_host``,
when using the ``qpid`` notification strategy.

* ``qpid_username``

Optional. Default: None

This is the username that Glance will use to authenticate with the Qpid
broker if using the ``qpid`` notification strategy.

* ``qpid_password``

Optional. Default: None

This is the username that Glance will use to authenticate with the Qpid
broker if using the ``qpid`` notification strategy.

* ``qpid_sasl_mechanisms``

Optional. Default: None

This is a space separated list of SASL mechanisms to use for authentication
with the Qpid broker if using the ``qpid`` notification strategy.

* ``qpid_reconnect_timeout``

Optional. Default: None

This option specifies a timeout in seconds for automatic reconnect attempts
to the Qpid broker if the ``qpid`` notification strategy is used.  In general,
it is safe to leave all of the reconnect timing options not set. In that case,
the Qpid client's default behavior will be used, which is to attempt to
reconnect to the broker at exponential back-off intervals (in 1 second, then 2
seconds, then 4, 8, 16, etc).

* ``qpid_reconnect_limit``

Optional. Default: None

This option specifies a maximum number of reconnect attempts to the Qpid
broker if the ``qpid`` notification strategy is being used.  Normally the
Qpid client will continue attempting to reconnect until successful.

* ``qpid_reconnect_interval_min``

Optional. Default: None

This option specifies the minimum number of seconds between reconnection
attempts if the ``qpid`` notification strategy is being used.

* ``qpid_reconnect_interval_max``

Optional. Default: None

This option specifies the maximum number of seconds between reconnection
attempts if the ``qpid`` notification strategy is being used.

* ``qpid_reconnect_interval``

This option specifies the exact number of seconds between reconnection
attempts if the ``qpid`` notification strategy is being used. Setting
this option is equivalent to setting ``qpid_reconnect_interval_max`` and
``qpid_reconnect_interval_min`` to the same value.

* ``qpid_heartbeat``

Optional. Default: ``5``

This option is used to specify the number of seconds between heartbeat messages
exchanged between the Qpid client and Qpid broker if the ``qpid`` notification
strategy is being used.  Heartbeats are used to more quickly detect that a
connection has been lost.

* ``qpid_protocol``

Optional. Default: ``tcp``

This option is used to specify the transport protocol to use if using the
``qpid`` notification strategy. To enable SSL, set this option to ``ssl``.

* ``qpid_tcp_nodelay``

Optional. Default: ``True``

This option can be used to disable the TCP NODELAY option. It effectively
disables the Nagle algorithm for the connection to the Qpid broker. This
option only applies if the ``qpid`` notification strategy is used.

Configuring Access Policies
---------------------------

Access rules may be configured using a
:doc:`Policy Configuration file <policies>`. Two configuration options tell
the Glance API server about the policies to use.

* ``policy_file=PATH``

Optional. Default: Looks for a file called ``policy.json`` or
``glance.policy.json`` in standard configuration directories.

Policy file to load when starting the API server

* ``policy_default_rule=RULE``

Optional. Default: "default"

Name of the rule in the policy configuration file to use as the default rule

Configuring Glance Property Protections
---------------------------------------

Access to image meta properties may be configured using a
:doc:`Property Protections Configuration file <property-protections>`.  The
location for this file can be specified in the ``glance-api.conf`` config file
in the section ``[DEFAULT]``. **If an incorrect value is specified, glance api
service will not start.**

* ``property_protection_file=PATH``

Optional. Default: not enabled.

Configuring Glance APIs
-----------------------

The glance-api service implents versions 1 and 2 of the OpenStack
Images API. Disable either version of the Images API using the
following options:

* ``enable_v1_api=<True|False>``

Optional. Default: ``True``

* ``enable_v2_api=<True|False>``

Optional. Default: ``True``

**IMPORTANT NOTE**: The v1 API is implemented on top of the
glance-registry service while the v2 API is not. This means that
in order to use the v2 API, you must copy the necessary sql
configuration from your glance-registry service to your
glance-api configuration file.


text:
"""

RenderPipeline

Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

"""

from panda3d.core import Vec2

from rpcore.render_stage import RenderStage

class ApplyCloudsStage(RenderStage):

    """ This stage raymarchs the cloud voxel grid """

    required_pipes = ["ShadedScene", "GBuffer"]

    def __init__(self, pipeline):
        RenderStage.__init__(self, pipeline)

    @property
    def produced_pipes(self):
        return {"ShadedScene": self.target_apply_clouds.color_tex}

    def create(self):
        self.render_target = self.create_target("RaymarchVoxels")
        self.render_target.size = -2
        self.render_target.add_color_attachment(bits=16, alpha=True)
        self.render_target.prepare_buffer()

        self.upscale_target = self.create_target("UpscaleTarget")
        self.upscale_target.add_color_attachment(bits=16, alpha=True)
        self.upscale_target.prepare_buffer()
        self.upscale_target.set_shader_input("upscaleWeights", Vec2(0.05, 0.2))
        self.upscale_target.set_shader_input("useZAsWeight", False)
        self.upscale_target.set_shader_input("SourceTex", self.render_target.color_tex)

        self.target_apply_clouds = self.create_target("MergeWithScene")
        self.target_apply_clouds.add_color_attachment(bits=16)
        self.target_apply_clouds.prepare_buffer()

        self.target_apply_clouds.set_shader_input(
            "CloudsTex", self.upscale_target.color_tex)

    def reload_shaders(self):
        self.target_apply_clouds.shader = self.load_plugin_shader(
            "apply_clouds.frag.glsl")
        self.render_target.shader = self.load_plugin_shader(
            "render_clouds.frag.glsl")
        self.upscale_target.shader = self.load_plugin_shader(
            "/$$rp/shader/bilateral_upscale.frag.glsl")


text:
package com.example.holo.coolweather.db;

import org.litepal.crud.DataSupport;

/**
 * Created by holo on 2017/6/3.
 */

public class City extends DataSupport{

    private int id;

    private String cityName;

    private int cityCode;

    private int provinceId;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public int getCityCode() {
        return cityCode;
    }

    public void setCityCode(int cityCode) {
        this.cityCode = cityCode;
    }

    public int getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(int provinceId) {
        this.provinceId = provinceId;
    }
}


text:
require 'test_helper'

class ZipEntryTest < MiniTest::Test
  TEST_ZIPFILE = 'someZipFile.zip'
  TEST_COMMENT = 'a comment'
  TEST_COMPRESSED_SIZE = 1234
  TEST_CRC = 325_324
  TEST_EXTRA = 'Some data here'
  TEST_COMPRESSIONMETHOD = ::Zip::Entry::DEFLATED
  TEST_NAME = 'entry name'
  TEST_SIZE = 8432
  TEST_ISDIRECTORY = false
  TEST_TIME = Time.now

  def test_constructor_and_getters
    entry = ::Zip::Entry.new(TEST_ZIPFILE,
                             TEST_NAME,
                             TEST_COMMENT,
                             TEST_EXTRA,
                             TEST_COMPRESSED_SIZE,
                             TEST_CRC,
                             TEST_COMPRESSIONMETHOD,
                             TEST_SIZE,
                             TEST_TIME)

    assert_equal(TEST_COMMENT, entry.comment)
    assert_equal(TEST_COMPRESSED_SIZE, entry.compressed_size)
    assert_equal(TEST_CRC, entry.crc)
    assert_instance_of(::Zip::ExtraField, entry.extra)
    assert_equal(TEST_COMPRESSIONMETHOD, entry.compression_method)
    assert_equal(TEST_NAME, entry.name)
    assert_equal(TEST_SIZE, entry.size)
    assert_equal(TEST_TIME, entry.time)
  end

  def test_is_directory_and_is_file
    assert(::Zip::Entry.new(TEST_ZIPFILE, 'hello').file?)
    assert(!::Zip::Entry.new(TEST_ZIPFILE, 'hello').directory?)

    assert(::Zip::Entry.new(TEST_ZIPFILE, 'dir/hello').file?)
    assert(!::Zip::Entry.new(TEST_ZIPFILE, 'dir/hello').directory?)

    assert(::Zip::Entry.new(TEST_ZIPFILE, 'hello/').directory?)
    assert(!::Zip::Entry.new(TEST_ZIPFILE, 'hello/').file?)

    assert(::Zip::Entry.new(TEST_ZIPFILE, 'dir/hello/').directory?)
    assert(!::Zip::Entry.new(TEST_ZIPFILE, 'dir/hello/').file?)
  end

  def test_equality
    entry1 = ::Zip::Entry.new('file.zip', 'name', 'isNotCompared',
                              'something extra', 123, 1234,
                              ::Zip::Entry::DEFLATED, 10_000)
    entry2 = ::Zip::Entry.new('file.zip', 'name', 'isNotComparedXXX',
                              'something extra', 123, 1234,
                              ::Zip::Entry::DEFLATED, 10_000)
    entry3 = ::Zip::Entry.new('file.zip', 'name2', 'isNotComparedXXX',
                              'something extra', 123, 1234,
                              ::Zip::Entry::DEFLATED, 10_000)
    entry4 = ::Zip::Entry.new('file.zip', 'name2', 'isNotComparedXXX',
                              'something extraXX', 123, 1234,
                              ::Zip::Entry::DEFLATED, 10_000)
    entry5 = ::Zip::Entry.new('file.zip', 'name2', 'isNotComparedXXX',
                              'something extraXX', 12, 1234,
                              ::Zip::Entry::DEFLATED, 10_000)
    entry6 = ::Zip::Entry.new('file.zip', 'name2', 'isNotComparedXXX',
                              'something extraXX', 12, 123,
                              ::Zip::Entry::DEFLATED, 10_000)
    entry7 = ::Zip::Entry.new('file.zip', 'name2', 'isNotComparedXXX',
                              'something extraXX', 12, 123,
                              ::Zip::Entry::STORED, 10_000)
    entry8 = ::Zip::Entry.new('file.zip', 'name2', 'isNotComparedXXX',
                              'something extraXX', 12, 123,
                              ::Zip::Entry::STORED, 100_000)

    assert_equal(entry1, entry1)
    assert_equal(entry1, entry2)

    assert(entry2 != entry3)
    assert(entry3 != entry4)
    assert(entry4 != entry5)
    assert(entry5 != entry6)
    assert(entry6 != entry7)
    assert(entry7 != entry8)

    assert(entry7 != 'hello')
    assert(entry7 != 12)
  end

  def test_compare
    assert_equal(0, (::Zip::Entry.new('zf.zip', 'a') <=> ::Zip::Entry.new('zf.zip', 'a')))
    assert_equal(1, (::Zip::Entry.new('zf.zip', 'b') <=> ::Zip::Entry.new('zf.zip', 'a')))
    assert_equal(-1, (::Zip::Entry.new('zf.zip', 'a') <=> ::Zip::Entry.new('zf.zip', 'b')))

    entries = [
      ::Zip::Entry.new('zf.zip', '5'),
      ::Zip::Entry.new('zf.zip', '1'),
      ::Zip::Entry.new('zf.zip', '3'),
      ::Zip::Entry.new('zf.zip', '4'),
      ::Zip::Entry.new('zf.zip', '0'),
      ::Zip::Entry.new('zf.zip', '2')
    ]

    entries.sort!
    assert_equal('0', entries[0].to_s)
    assert_equal('1', entries[1].to_s)
    assert_equal('2', entries[2].to_s)
    assert_equal('3', entries[3].to_s)
    assert_equal('4', entries[4].to_s)
    assert_equal('5', entries[5].to_s)
  end

  def test_parent_as_string
    entry1 = ::Zip::Entry.new('zf.zip', 'aa')
    entry2 = ::Zip::Entry.new('zf.zip', 'aa/')
    entry3 = ::Zip::Entry.new('zf.zip', 'aa/bb')
    entry4 = ::Zip::Entry.new('zf.zip', 'aa/bb/')
    entry5 = ::Zip::Entry.new('zf.zip', 'aa/bb/cc')
    entry6 = ::Zip::Entry.new('zf.zip', 'aa/bb/cc/')

    assert_equal(nil, entry1.parent_as_string)
    assert_equal(nil, entry2.parent_as_string)
    assert_equal('aa/', entry3.parent_as_string)
    assert_equal('aa/', entry4.parent_as_string)
    assert_equal('aa/bb/', entry5.parent_as_string)
    assert_equal('aa/bb/', entry6.parent_as_string)
  end

  def test_entry_name_cannot_start_with_slash
    assert_raises(::Zip::EntryNameError) { ::Zip::Entry.new('zf.zip', '/hej/der') }
  end

  def test_store_file_without_compression
    File.delete('/tmp/no_compress.zip') if File.exist?('/tmp/no_compress.zip')
    files = Dir[File.join('test/data/globTest', '**', '**')]

    Zip.setup do |z|
      z.write_zip64_support = false
    end

    zipfile = Zip::File.open('/tmp/no_compress.zip', Zip::File::CREATE)
    mimetype_entry = Zip::Entry.new(zipfile,                # @zipfile
                                    'mimetype',             # @name
                                    '',                     # @comment
                                    '',                     # @extra
                                    0,                      # @compressed_size
                                    0,                      # @crc
                                    Zip::Entry::STORED)     # @comppressed_method

    zipfile.add(mimetype_entry, 'test/data/mimetype')

    files.each do |file|
      zipfile.add(file.sub('test/data/globTest/', ''), file)
    end
    zipfile.close

    f = File.open('/tmp/no_compress.zip', 'rb')
    first_100_bytes = f.read(100)
    f.close

    assert_match(/mimetypeapplication\/epub\+zip/, first_100_bytes)
  end
end


text:
{{ partial "header.html" . }}

        {{ partial "new-header-product.html" . }}

{{ .Params.Header.headline }}

{{ .Params.Header.desc }}

Rakam answers these questions in a seamless way and lets you drill-down these metrics so that you can
                understand how your users are behaving.

                {{ range $name := .Params.Questions }}

{{ $name }}

                {{ end }}

        {{ partial "industry_roles.html" . }}

        {{ partial "call_to_action.html" }}

{{ partial "new-footer-product.html" . }}


text:
class AdmissionController < ApplicationController
  def fees
  end

  def application
  end
end


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

<title>G-Index</title>
<meta name="date" content="2014-05-02">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C D E G H I L M N O R S T U W

G

GenericProgressBackground - Static variable in class com.felina.photographer.R.style

GenericProgressIndicator - Static variable in class com.felina.photographer.R.style

getDeviceUUID() - Method in class com.felina.photographer.UUIDFactory

Returns a unique UUID for the current android device.

greentick - Static variable in class com.felina.photographer.R.drawable

A B C D E G H I L M N O R S T U W

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


text:
getmetrics.py <host> <metric type> <parameter> <treshold>

# Dependancies

- paramiko (voor SSH)
- SSH private key voor remote host (voor passwordless ssh naar andere hosts) als bestandsnaam 'key' in script root

# Uitvoer

Als waarde beneden treshold, TRUE, anders FALSE

# Metric types

- load - load average <0 current, 1 5 min avg, 2 15 min avg)
- diskfree - % ruimte vrij op disk op <parameter>
- inodefree - % inodes vrij op disk <parameter>
- swapinuse - % swap in use (0 as parameter)
- iops - IOPS on disk param
- netload - mb/sec on nic <parameter>
- test - maakt verbinding met host en geeft altijd TRUE (en de parameter) als een commando kan worden uitgevoerd op de host. Dit is om te testen of de host kan worden bereikt en dat de ssh key e.a. werkt


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

namespace Arch.CFramework.AppInternals.Components
{
    /// <summary>
    /// Component类
    /// </summary>
    public class Component : ComponentBase
    {
        public string Name { get; set; }
        public string Url { get; set; }
        public DateTime LastModifyTime { get; set; }
    }

    /// <summary>
    /// Component List 类
    /// </summary>
    public class ComponentCollection : ComponentBase
    {
        List<Component> coms = new List<Component>();
        public string Name { get; set; }
        public List<Component> Components { get { return coms; } set { coms = value; } }
    }
}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>所有类 (tcp 1.0.0 API)</title>
<meta name="date" content="2018-10-22">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

所有类

Tcp