text:
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["MYUN"] = factory();
	else
		root["MYUN"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}

/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	    value: true
	});

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

	var _actions = __webpack_require__(1);

	var _actions2 = _interopRequireDefault(_actions);

	var _timeline = __webpack_require__(11);

	var _timeline2 = _interopRequireDefault(_timeline);

	var _dispatcher = __webpack_require__(2);

	var _dispatcher2 = _interopRequireDefault(_dispatcher);

	var _store = __webpack_require__(13);

	var _store2 = _interopRequireDefault(_store);

	var MYUN = Object.defineProperties({
	    Actions: _actions2['default'],
	    Store: _store2['default'],
	    Dispatcher: _dispatcher2['default']
	}, {
	    fps: {
	        get: function get() {
	            return _timeline2['default'].fps;
	        },
	        set: function set(fps) {
	            _timeline2['default'].fps = fps;
	        },
	        configurable: true,
	        enumerable: true
	    }
	});

	exports['default'] = MYUN;
	module.exports = exports['default'];

/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	    value: true
	});

	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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

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

	var _dispatcher = __webpack_require__(2);

	var _dispatcher2 = _interopRequireDefault(_dispatcher);

	var _timeline = __webpack_require__(11);

	var _timeline2 = _interopRequireDefault(_timeline);

	var Actions = (function () {
	    function Actions() {
	        _classCallCheck(this, Actions);
	    }

	    _createClass(Actions, [{
	        key: 'start',
	        value: function start() {
	            _dispatcher2['default'].enable();
	            _timeline2['default'].start();
	        }
	    }, {
	        key: 'stop',
	        value: function stop() {
	            _dispatcher2['default'].disable();
	            _timeline2['default'].stop();
	        }
	    }, {
	        key: 'getStore',
	        value: function getStore(name) {
	            return _dispatcher2['default'].getStore(name);
	        }
	    }, {
	        key: 'dispatch',
	        value: function dispatch(eventName, payload) {
	            _dispatcher2['default'].dispatch(eventName, payload);
	        }
	    }, {
	        key: 'setTimeout',
	        value: function setTimeout(func, ms, context) {
	            return _timeline2['default'].setTimeout(func, ms, context);
	        }
	    }, {
	        key: 'setInterval',
	        value: function setInterval(func, ms, context) {
	            return _timeline2['default'].setInterval(func, ms, context);
	        }
	    }, {
	        key: 'clearInterval',
	        value: function clearInterval(id) {
	            _timeline2['default'].clearInterval(id);
	        }
	    }, {
	        key: 'setTimeoutFrame',
	        value: function setTimeoutFrame(func, context) {
	            return _timeline2['default'].setTimeoutFrame(func, context);
	        }
	    }, {
	        key: 'setIntervalFrame',
	        value: function setIntervalFrame(func, context) {
	            return _timeline2['default'].setIntervalFrame(func, context);
	        }
	    }, {
	        key: 'clearIntervalFrame',
	        value: function clearIntervalFrame(id) {
	            _timeline2['default'].clearIntervalFrame(id);
	        }
	    }]);

	    return Actions;
	})();

	exports['default'] = Actions;
	module.exports = exports['default'];

/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	    value: true
	});

	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; }; })();

	var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

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

	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; }

	var _lodashForin = __webpack_require__(3);

	var _lodashForin2 = _interopRequireDefault(_lodashForin);

	var _eventemitter3 = __webpack_require__(9);

	var _eventemitter32 = _interopRequireDefault(_eventemitter3);

	var _utilsPrivates = __webpack_require__(10);

	var _utilsPrivates2 = _interopRequireDefault(_utilsPrivates);

	var p = new _utilsPrivates2['default']();

	var Dispatcher = (function (_EventEmitter) {
	    _inherits(Dispatcher, _EventEmitter);

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

	        _get(Object.getPrototypeOf(Dispatcher.prototype), 'constructor', this).call(this);
	        p(this).stores = {};
	        p(this).enable = true;
	    }

	    // export instance

	    _createClass(Dispatcher, [{
	        key: 'enable',
	        value: function enable() {
	            p(this).enable = true;
	        }
	    }, {
	        key: 'disable',
	        value: function disable() {
	            p(this).enable = false;
	        }
	    }, {
	        key: 'addStore',
	        value: function addStore(name, store) {
	            p(this).stores[name] = store;
	        }
	    }, {
	        key: 'getStore',
	        value: function getStore(name) {
	            return p(this).stores[name];
	        }
	    }, {
	        key: 'dispatch',
	        value: function dispatch(eventName, payload) {
	            if (!p(this).enable) {
	                return false;
	            }
	            this.emit(eventName, payload);
	            return true;
	        }
	    }]);

	    return Dispatcher;
	})(_eventemitter32['default']);

	exports['default'] = new Dispatcher();
	module.exports = exports['default'];

/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {

	/**
	 * lodash 3.0.2 (Custom Build) <https://lodash.com/>
	 * Build: `lodash modern modularize exports="npm" -o ./`
	 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
	 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
	 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
	 * Available under MIT license <https://lodash.com/license>
	 */
	var baseFor = __webpack_require__(4),
	    bindCallback = __webpack_require__(5),
	    keysIn = __webpack_require__(6);

	/**
	 * Creates a function for `_.forIn` or `_.forInRight`.
	 *
	 * @private
	 * @param {Function} objectFunc The function to iterate over an object.
	 * @returns {Function} Returns the new each function.
	 */
	function createForIn(objectFunc) {
	  return function(object, iteratee, thisArg) {
	    if (typeof iteratee != 'function' || thisArg !== undefined) {
	      iteratee = bindCallback(iteratee, thisArg, 3);
	    }
	    return objectFunc(object, iteratee, keysIn);
	  };
	}

	/**
	 * Iterates over own and inherited enumerable properties of an object invoking
	 * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked
	 * with three arguments: (value, key, object). Iteratee functions may exit
	 * iteration early by explicitly returning `false`.
	 *
	 * @static
	 * @memberOf _
	 * @category Object
	 * @param {Object} object The object to iterate over.
	 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
	 * @param {*} [thisArg] The `this` binding of `iteratee`.
	 * @returns {Object} Returns `object`.
	 * @example
	 *
	 * function Foo() {
	 *   this.a = 1;
	 *   this.b = 2;
	 * }
	 *
	 * Foo.prototype.c = 3;
	 *
	 * _.forIn(new Foo, function(value, key) {
	 *   console.log(key);
	 * });
	 * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed)
	 */
	var forIn = createForIn(baseFor);

	module.exports = forIn;

/***/ },
/* 4 */
/***/ function(module, exports) {

	/**
	 * lodash 3.0.2 (Custom Build) <https://lodash.com/>
	 * Build: `lodash modern modularize exports="npm" -o ./`
	 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
	 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
	 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
	 * Available under MIT license <https://lodash.com/license>
	 */

	/**
	 * The base implementation of `baseForIn` and `baseForOwn` which iterates
	 * over `object` properties returned by `keysFunc` invoking `iteratee` for
	 * each property. Iteratee functions may exit iteration early by explicitly
	 * returning `false`.
	 *
	 * @private
	 * @param {Object} object The object to iterate over.
	 * @param {Function} iteratee The function invoked per iteration.
	 * @param {Function} keysFunc The function to get the keys of `object`.
	 * @returns {Object} Returns `object`.
	 */
	var baseFor = createBaseFor();

	/**
	 * Creates a base function for `_.forIn` or `_.forInRight`.
	 *
	 * @private
	 * @param {boolean} [fromRight] Specify iterating from right to left.
	 * @returns {Function} Returns the new base function.
	 */
	function createBaseFor(fromRight) {
	  return function(object, iteratee, keysFunc) {
	    var iterable = toObject(object),
	        props = keysFunc(object),
	        length = props.length,
	        index = fromRight ? length : -1;

	    while ((fromRight ? index-- : ++index < length)) {
	      var key = props[index];
	      if (iteratee(iterable[key], key, iterable) === false) {
	        break;
	      }
	    }
	    return object;
	  };
	}

	/**
	 * Converts `value` to an object if it's not one.
	 *
	 * @private
	 * @param {*} value The value to process.
	 * @returns {Object} Returns the object.
	 */
	function toObject(value) {
	  return isObject(value) ? value : Object(value);
	}

	/**
	 * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
	 * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
	 *
	 * @static
	 * @memberOf _
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
	 * @example
	 *
	 * _.isObject({});
	 * // => true
	 *
	 * _.isObject([1, 2, 3]);
	 * // => true
	 *
	 * _.isObject(1);
	 * // => false
	 */
	function isObject(value) {
	  // Avoid a V8 JIT bug in Chrome 19-20.
	  // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
	  var type = typeof value;
	  return !!value && (type == 'object' || type == 'function');
	}

	module.exports = baseFor;

/***/ },
/* 5 */
/***/ function(module, exports) {

	/**
	 * lodash 3.0.1 (Custom Build) <https://lodash.com/>
	 * Build: `lodash modern modularize exports="npm" -o ./`
	 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
	 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
	 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
	 * Available under MIT license <https://lodash.com/license>
	 */

	/**
	 * A specialized version of `baseCallback` which only supports `this` binding
	 * and specifying the number of arguments to provide to `func`.
	 *
	 * @private
	 * @param {Function} func The function to bind.
	 * @param {*} thisArg The `this` binding of `func`.
	 * @param {number} [argCount] The number of arguments to provide to `func`.
	 * @returns {Function} Returns the callback.
	 */
	function bindCallback(func, thisArg, argCount) {
	  if (typeof func != 'function') {
	    return identity;
	  }
	  if (thisArg === undefined) {
	    return func;
	  }
	  switch (argCount) {
	    case 1: return function(value) {
	      return func.call(thisArg, value);
	    };
	    case 3: return function(value, index, collection) {
	      return func.call(thisArg, value, index, collection);
	    };
	    case 4: return function(accumulator, value, index, collection) {
	      return func.call(thisArg, accumulator, value, index, collection);
	    };
	    case 5: return function(value, other, key, object, source) {
	      return func.call(thisArg, value, other, key, object, source);
	    };
	  }
	  return function() {
	    return func.apply(thisArg, arguments);
	  };
	}

	/**
	 * This method returns the first argument provided to it.
	 *
	 * @static
	 * @memberOf _
	 * @category Utility
	 * @param {*} value Any value.
	 * @returns {*} Returns `value`.
	 * @example
	 *
	 * var object = { 'user': 'fred' };
	 *
	 * _.identity(object) === object;
	 * // => true
	 */
	function identity(value) {
	  return value;
	}

	module.exports = bindCallback;

/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {

	/**
	 * lodash 3.0.8 (Custom Build) <https://lodash.com/>
	 * Build: `lodash modern modularize exports="npm" -o ./`
	 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
	 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
	 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
	 * Available under MIT license <https://lodash.com/license>
	 */
	var isArguments = __webpack_require__(7),
	    isArray = __webpack_require__(8);

	/** Used to detect unsigned integer values. */
	var reIsUint = /^\d+$/;

	/** Used for native method references. */
	var objectProto = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty = objectProto.hasOwnProperty;

	/**
	 * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
	 * of an array-like value.
	 */
	var MAX_SAFE_INTEGER = 9007199254740991;

	/**
	 * Checks if `value` is a valid array-like index.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
	 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
	 */
	function isIndex(value, length) {
	  value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
	  length = length == null ? MAX_SAFE_INTEGER : length;
	  return value > -1 && value % 1 == 0 && value < length;
	}

	/**
	 * Checks if `value` is a valid array-like length.
	 *
	 * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
	 */
	function isLength(value) {
	  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
	}

	/**
	 * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
	 * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
	 *
	 * @static
	 * @memberOf _
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
	 * @example
	 *
	 * _.isObject({});
	 * // => true
	 *
	 * _.isObject([1, 2, 3]);
	 * // => true
	 *
	 * _.isObject(1);
	 * // => false
	 */
	function isObject(value) {
	  // Avoid a V8 JIT bug in Chrome 19-20.
	  // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
	  var type = typeof value;
	  return !!value && (type == 'object' || type == 'function');
	}

	/**
	 * Creates an array of the own and inherited enumerable property names of `object`.
	 *
	 * **Note:** Non-object values are coerced to objects.
	 *
	 * @static
	 * @memberOf _
	 * @category Object
	 * @param {Object} object The object to query.
	 * @returns {Array} Returns the array of property names.
	 * @example
	 *
	 * function Foo() {
	 *   this.a = 1;
	 *   this.b = 2;
	 * }
	 *
	 * Foo.prototype.c = 3;
	 *
	 * _.keysIn(new Foo);
	 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
	 */
	function keysIn(object) {
	  if (object == null) {
	    return [];
	  }
	  if (!isObject(object)) {
	    object = Object(object);
	  }
	  var length = object.length;
	  length = (length && isLength(length) &&
	    (isArray(object) || isArguments(object)) && length) || 0;

	  var Ctor = object.constructor,
	      index = -1,
	      isProto = typeof Ctor == 'function' && Ctor.prototype === object,
	      result = Array(length),
	      skipIndexes = length > 0;

	  while (++index < length) {
	    result[index] = (index + '');
	  }
	  for (var key in object) {
	    if (!(skipIndexes && isIndex(key, length)) &&
	        !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
	      result.push(key);
	    }
	  }
	  return result;
	}

	module.exports = keysIn;

/***/ },
/* 7 */
/***/ function(module, exports) {

	/**
	 * lodash 3.0.4 (Custom Build) <https://lodash.com/>
	 * Build: `lodash modern modularize exports="npm" -o ./`
	 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
	 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
	 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
	 * Available under MIT license <https://lodash.com/license>
	 */

	/**
	 * Checks if `value` is object-like.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
	 */
	function isObjectLike(value) {
	  return !!value && typeof value == 'object';
	}

	/** Used for native method references. */
	var objectProto = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty = objectProto.hasOwnProperty;

	/** Native method references. */
	var propertyIsEnumerable = objectProto.propertyIsEnumerable;

	/**
	 * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
	 * of an array-like value.
	 */
	var MAX_SAFE_INTEGER = 9007199254740991;

	/**
	 * The base implementation of `_.property` without support for deep paths.
	 *
	 * @private
	 * @param {string} key The key of the property to get.
	 * @returns {Function} Returns the new function.
	 */
	function baseProperty(key) {
	  return function(object) {
	    return object == null ? undefined : object[key];
	  };
	}

	/**
	 * Gets the "length" property value of `object`.
	 *
	 * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
	 * that affects Safari on at least iOS 8.1-8.3 ARM64.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @returns {*} Returns the "length" value.
	 */
	var getLength = baseProperty('length');

	/**
	 * Checks if `value` is array-like.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
	 */
	function isArrayLike(value) {
	  return value != null && isLength(getLength(value));
	}

	/**
	 * Checks if `value` is a valid array-like length.
	 *
	 * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
	 */
	function isLength(value) {
	  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
	}

	/**
	 * Checks if `value` is classified as an `arguments` object.
	 *
	 * @static
	 * @memberOf _
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
	 * @example
	 *
	 * _.isArguments(function() { return arguments; }());
	 * // => true
	 *
	 * _.isArguments([1, 2, 3]);
	 * // => false
	 */
	function isArguments(value) {
	  return isObjectLike(value) && isArrayLike(value) &&
	    hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
	}

	module.exports = isArguments;

/***/ },
/* 8 */
/***/ function(module, exports) {

	/**
	 * lodash 3.0.4 (Custom Build) <https://lodash.com/>
	 * Build: `lodash modern modularize exports="npm" -o ./`
	 * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
	 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
	 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
	 * Available under MIT license <https://lodash.com/license>
	 */

	/** `Object#toString` result references. */
	var arrayTag = '[object Array]',
	    funcTag = '[object Function]';

	/** Used to detect host constructors (Safari > 5). */
	var reIsHostCtor = /^\[object .+?Constructor\]$/;

	/**
	 * Checks if `value` is object-like.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
	 */
	function isObjectLike(value) {
	  return !!value && typeof value == 'object';
	}

	/** Used for native method references. */
	var objectProto = Object.prototype;

	/** Used to resolve the decompiled source of functions. */
	var fnToString = Function.prototype.toString;

	/** Used to check objects for own properties. */
	var hasOwnProperty = objectProto.hasOwnProperty;

	/**
	 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
	 * of values.
	 */
	var objToString = objectProto.toString;

	/** Used to detect if a method is native. */
	var reIsNative = RegExp('^' +
	  fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
	  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
	);

	/* Native method references for those with the same name as other `lodash` methods. */
	var nativeIsArray = getNative(Array, 'isArray');

	/**
	 * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
	 * of an array-like value.
	 */
	var MAX_SAFE_INTEGER = 9007199254740991;

	/**
	 * Gets the native function at `key` of `object`.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @param {string} key The key of the method to get.
	 * @returns {*} Returns the function if it's native, else `undefined`.
	 */
	function getNative(object, key) {
	  var value = object == null ? undefined : object[key];
	  return isNative(value) ? value : undefined;
	}

	/**
	 * Checks if `value` is a valid array-like length.
	 *
	 * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
	 */
	function isLength(value) {
	  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
	}

	/**
	 * Checks if `value` is classified as an `Array` object.
	 *
	 * @static
	 * @memberOf _
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
	 * @example
	 *
	 * _.isArray([1, 2, 3]);
	 * // => true
	 *
	 * _.isArray(function() { return arguments; }());
	 * // => false
	 */
	var isArray = nativeIsArray || function(value) {
	  return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
	};

	/**
	 * Checks if `value` is classified as a `Function` object.
	 *
	 * @static
	 * @memberOf _
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
	 * @example
	 *
	 * _.isFunction(_);
	 * // => true
	 *
	 * _.isFunction(/abc/);
	 * // => false
	 */
	function isFunction(value) {
	  // The use of `Object#toString` avoids issues with the `typeof` operator
	  // in older versions of Chrome and Safari which return 'function' for regexes
	  // and Safari 8 equivalents which return 'object' for typed array constructors.
	  return isObject(value) && objToString.call(value) == funcTag;
	}

	/**
	 * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
	 * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
	 *
	 * @static
	 * @memberOf _
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
	 * @example
	 *
	 * _.isObject({});
	 * // => true
	 *
	 * _.isObject([1, 2, 3]);
	 * // => true
	 *
	 * _.isObject(1);
	 * // => false
	 */
	function isObject(value) {
	  // Avoid a V8 JIT bug in Chrome 19-20.
	  // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
	  var type = typeof value;
	  return !!value && (type == 'object' || type == 'function');
	}

	/**
	 * Checks if `value` is a native function.
	 *
	 * @static
	 * @memberOf _
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
	 * @example
	 *
	 * _.isNative(Array.prototype.push);
	 * // => true
	 *
	 * _.isNative(_);
	 * // => false
	 */
	function isNative(value) {
	  if (value == null) {
	    return false;
	  }
	  if (isFunction(value)) {
	    return reIsNative.test(fnToString.call(value));
	  }
	  return isObjectLike(value) && reIsHostCtor.test(value);
	}

	module.exports = isArray;

/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {

	'use strict';

	//
	// We store our EE objects in a plain object whose properties are event names.
	// If `Object.create(null)` is not supported we prefix the event names with a
	// `~` to make sure that the built-in object properties are not overridden or
	// used as an attack vector.
	// We also assume that `Object.create(null)` is available when the event name
	// is an ES6 Symbol.
	//
	var prefix = typeof Object.create !== 'function' ? '~' : false;

	/**
	 * Representation of a single EventEmitter function.
	 *
	 * @param {Function} fn Event handler to be called.
	 * @param {Mixed} context Context for function execution.
	 * @param {Boolean} once Only emit once
	 * @api private
	 */
	function EE(fn, context, once) {
	  this.fn = fn;
	  this.context = context;
	  this.once = once || false;
	}

	/**
	 * Minimal EventEmitter interface that is molded against the Node.js
	 * EventEmitter interface.
	 *
	 * @constructor
	 * @api public
	 */
	function EventEmitter() { /* Nothing to set */ }

	/**
	 * Holds the assigned EventEmitters by name.
	 *
	 * @type {Object}
	 * @private
	 */
	EventEmitter.prototype._events = undefined;

	/**
	 * Return a list of assigned event listeners.
	 *
	 * @param {String} event The events that should be listed.
	 * @param {Boolean} exists We only need to know if there are listeners.
	 * @returns {Array|Boolean}
	 * @api public
	 */
	EventEmitter.prototype.listeners = function listeners(event, exists) {
	  var evt = prefix ? prefix + event : event
	    , available = this._events && this._events[evt];

	  if (exists) return !!available;
	  if (!available) return [];
	  if (available.fn) return [available.fn];

	  for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {
	    ee[i] = available[i].fn;
	  }

	  return ee;
	};

	/**
	 * Emit an event to all registered event listeners.
	 *
	 * @param {String} event The name of the event.
	 * @returns {Boolean} Indication if we've emitted an event.
	 * @api public
	 */
	EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
	  var evt = prefix ? prefix + event : event;

	  if (!this._events || !this._events[evt]) return false;

	  var listeners = this._events[evt]
	    , len = arguments.length
	    , args
	    , i;

	  if ('function' === typeof listeners.fn) {
	    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);

	    switch (len) {
	      case 1: return listeners.fn.call(listeners.context), true;
	      case 2: return listeners.fn.call(listeners.context, a1), true;
	      case 3: return listeners.fn.call(listeners.context, a1, a2), true;
	      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
	      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
	      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
	    }

	    for (i = 1, args = new Array(len -1); i < len; i++) {
	      args[i - 1] = arguments[i];
	    }

	    listeners.fn.apply(listeners.context, args);
	  } else {
	    var length = listeners.length
	      , j;

	    for (i = 0; i < length; i++) {
	      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);

	      switch (len) {
	        case 1: listeners[i].fn.call(listeners[i].context); break;
	        case 2: listeners[i].fn.call(listeners[i].context, a1); break;
	        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
	        default:
	          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
	            args[j - 1] = arguments[j];
	          }

	          listeners[i].fn.apply(listeners[i].context, args);
	      }
	    }
	  }

	  return true;
	};

	/**
	 * Register a new EventListener for the given event.
	 *
	 * @param {String} event Name of the event.
	 * @param {Functon} fn Callback function.
	 * @param {Mixed} context The context of the function.
	 * @api public
	 */
	EventEmitter.prototype.on = function on(event, fn, context) {
	  var listener = new EE(fn, context || this)
	    , evt = prefix ? prefix + event : event;

	  if (!this._events) this._events = prefix ? {} : Object.create(null);
	  if (!this._events[evt]) this._events[evt] = listener;
	  else {
	    if (!this._events[evt].fn) this._events[evt].push(listener);
	    else this._events[evt] = [
	      this._events[evt], listener
	    ];
	  }

	  return this;
	};

	/**
	 * Add an EventListener that's only called once.
	 *
	 * @param {String} event Name of the event.
	 * @param {Function} fn Callback function.
	 * @param {Mixed} context The context of the function.
	 * @api public
	 */
	EventEmitter.prototype.once = function once(event, fn, context) {
	  var listener = new EE(fn, context || this, true)
	    , evt = prefix ? prefix + event : event;

	  if (!this._events) this._events = prefix ? {} : Object.create(null);
	  if (!this._events[evt]) this._events[evt] = listener;
	  else {
	    if (!this._events[evt].fn) this._events[evt].push(listener);
	    else this._events[evt] = [
	      this._events[evt], listener
	    ];
	  }

	  return this;
	};

	/**
	 * Remove event listeners.
	 *
	 * @param {String} event The event we want to remove.
	 * @param {Function} fn The listener that we need to find.
	 * @param {Mixed} context Only remove listeners matching this context.
	 * @param {Boolean} once Only remove once listeners.
	 * @api public
	 */
	EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
	  var evt = prefix ? prefix + event : event;

	  if (!this._events || !this._events[evt]) return this;

	  var listeners = this._events[evt]
	    , events = [];

	  if (fn) {
	    if (listeners.fn) {
	      if (
	           listeners.fn !== fn
	        || (once && !listeners.once)
	        || (context && listeners.context !== context)
	      ) {
	        events.push(listeners);
	      }
	    } else {
	      for (var i = 0, length = listeners.length; i < length; i++) {
	        if (
	             listeners[i].fn !== fn
	          || (once && !listeners[i].once)
	          || (context && listeners[i].context !== context)
	        ) {
	          events.push(listeners[i]);
	        }
	      }
	    }
	  }

	  //
	  // Reset the array, or remove it completely if we have no more listeners.
	  //
	  if (events.length) {
	    this._events[evt] = events.length === 1 ? events[0] : events;
	  } else {
	    delete this._events[evt];
	  }

	  return this;
	};

	/**
	 * Remove all listeners or only the listeners for the specified event.
	 *
	 * @param {String} event The event want to remove all listeners for.
	 * @api public
	 */
	EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
	  if (!this._events) return this;

	  if (event) delete this._events[prefix ? prefix + event : event];
	  else this._events = prefix ? {} : Object.create(null);

	  return this;
	};

	//
	// Alias methods names because people roll like that.
	//
	EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
	EventEmitter.prototype.addListener = EventEmitter.prototype.on;

	//
	// This function doesn't apply anymore.
	//
	EventEmitter.prototype.setMaxListeners = function setMaxListeners() {
	  return this;
	};

	//
	// Expose the prefix.
	//
	EventEmitter.prefixed = prefix;

	//
	// Expose the module.
	//
	if (true) {
	  module.exports = EventEmitter;
	}

/***/ },
/* 10 */
/***/ function(module, exports) {

	"use strict";

	Object.defineProperty(exports, "__esModule", {
	    value: true
	});

	exports["default"] = function () {
	    var wm = new WeakMap();
	    return function (k) {
	        return wm.get(k) || wm.set(k, {}).get(k);
	    };
	};

	module.exports = exports["default"];

/***/ },
/* 11 */
/***/ function(module, exports, __webpack_require__) {

	// doesn't work on browser lodash.clone@3.0.3
	// `global is undefined`
	//import clone from 'lodash.clone'; // maybe crashed
	'use strict';

	Object.defineProperty(exports, '__esModule', {
	    value: true
	});

	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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

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

	var _utilsClone = __webpack_require__(12);

	var _utilsClone2 = _interopRequireDefault(_utilsClone);

	var _utilsPrivates = __webpack_require__(10);

	var _utilsPrivates2 = _interopRequireDefault(_utilsPrivates);

	var STATE_PLAYING = 1; //  1: running
	var STATE_STOPPING = -1; // -1: stopping
	var STATE_STOPPED = 0; //  0: stopped

	var timelineFps = 1000 / 10;
	var p = new _utilsPrivates2['default']();

	var Timeline = (function () {
	    function Timeline() {
	        var _this = this;

	        _classCallCheck(this, Timeline);

	        p(this).eventList = {};
	        p(this).stackList = [];
	        p(this).state = STATE_STOPPED;

	        p(this).createId = (function () {
	            var id = 0;
	            return function () {
	                return id++;
	            };
	        })();

	        p(this).registList = function (timeEvent) {
	            // 必要な情報を収集
	            var id = timeEvent.id;
	            var frames = timeEvent.frames;

	            // Event Listに登録
	            //if (!p(this).eventList[id]) {
	            p(_this).eventList[id] = timeEvent;
	            //}

	            // Stack Listに登録
	            if (!Array.isArray(p(_this).stackList[frames])) {
	                p(_this).stackList[frames] = [];
	            }
	            p(_this).stackList[frames].push(id);
	        };

	        p(this).animate = function () {

	            var state = p(_this).state;
	            if (state === STATE_STOPPING) {
	                p(_this).state = STATE_STOPPED;
	                return;
	            }

	            var eventIds = p(_this).stackList.shift();
	            if (eventIds) {

	                eventIds.forEach(function (eventId) {
	                    // eventの取得
	                    var timeEvent = p(this).eventList[eventId];

	                    // 削除されていなければ実行
	                    if (typeof timeEvent.func === 'function') {
	                        timeEvent.func.call(timeEvent.context);
	                    }

	                    // interval設定がされていれば再登録
	                    if (timeEvent.interval === true) {

	                        // msが設定されていれば再計算
	                        if (timeEvent.ms) {
	                            timeEvent.frames = Math.floor(timeEvent.ms / timelineFps);
	                        }

	                        // 最後に改めて存在を確認
	                        // このifがないとうまくいかないです
	                        if (p(this).eventList[eventId]) {
	                            p(this).registList(timeEvent);
	                        }
	                    }
	                }, _this);
	            }

	            // animationの再実行
	            setTimeout(p(_this).animate, timelineFps);
	        };
	    }

	    // export instance

	    _createClass(Timeline, [{
	        key: 'start',
	        value: function start() {
	            switch (p(this).state) {
	                case STATE_STOPPED:
	                    p(this).animate();
	                    p(this).state = STATE_PLAYING;
	                    break;
	                default: /* do nothing */
	            }
	            return p(this).state;
	        }
	    }, {
	        key: 'stop',
	        value: function stop() {
	            switch (p(this).state) {
	                case STATE_PLAYING:
	                    p(this).state = STATE_STOPPING;
	                    break;
	                default: /* do nothing */
	            }
	            return p(this).state;
	        }
	    }, {
	        key: 'setTimeout',
	        value: function setTimeout(func, ms, context) {
	            // need to wait how frames
	            var frames = Math.floor(ms / timelineFps);
	            var timeEvent = {};
	            timeEvent.id = p(this).createId();
	            timeEvent.interval = false;
	            timeEvent.frames = frames;
	            timeEvent.ms = ms;
	            timeEvent.func = func;
	            timeEvent.context = context;

	            p(this).registList(timeEvent);
	            return timeEvent.id;
	        }
	    }, {
	        key: 'setInterval',
	        value: function setInterval(func, ms, context) {

	            var frames = Math.floor(ms / timelineFps);
	            var timeEvent = {};
	            timeEvent.id = p(this).createId();
	            timeEvent.interval = true;
	            timeEvent.frames = frames;
	            timeEvent.ms = ms;
	            timeEvent.func = func;
	            timeEvent.context = context;

	            p(this).registList(timeEvent);
	            return timeEvent.id;
	        }
	    }, {
	        key: 'setNextFrame',
	        value: function setNextFrame(func, context) {

	            var frames = 0;
	            var timeEvent = {};
	            timeEvent.id = p(this).createId();
	            timeEvent.interval = false;
	            timeEvent.frames = frames;
	            timeEvent.func = func;
	            timeEvent.context = context;

	            p(this).registList(timeEvent);
	            return timeEvent.id;
	        }
	    }, {
	        key: 'setIntervalFrame',
	        value: function setIntervalFrame(func, context) {

	            var frames = 0;
	            var timeEvent = {};
	            timeEvent.id = p(this).createId();
	            timeEvent.interval = true;
	            timeEvent.frames = frames;
	            timeEvent.func = func;
	            timeEvent.context = context;

	            p(this).registList(timeEvent);
	            return timeEvent.id;
	        }
	    }, {
	        key: 'clearInterval',
	        value: function clearInterval(id) {
	            delete p(this).eventList[id];
	        }
	    }, {
	        key: 'clearIntervalFrame',
	        value: function clearIntervalFrame(id) {
	            return clearInterval(id);
	        }
	    }, {
	        key: 'fps',
	        set: function set(num) {
	            var _num = num | 0;
	            timelineFps = 1000 / (_num || 30);
	        },
	        get: function get() {
	            return Math.round(1000 / timelineFps);
	        }
	    }]);

	    return Timeline;
	})();

	exports['default'] = new Timeline();
	module.exports = exports['default'];

/***/ },
/* 12 */
/***/ function(module, exports) {

	"use strict";

	Object.defineProperty(exports, "__esModule", {
	    value: true
	});
	exports["default"] = clone;

	function clone(object) {
	    return (function copy(object) {
	        if (typeof object !== object) {
	            return object;
	        }
	        if (object instanceof Array) {
	            return object.concat();
	        }
	        if (object instanceof Date) {
	            return new Date(object.getTime());
	        }
	        if (object instanceof Object) {
	            var clone = {};
	            Object.keys(object).forEach(function (key) {
	                clone[key] = copy(object[key]);
	            });
	            return clone;
	        }
	    })(object);
	}

	;
	module.exports = exports["default"];

/***/ },
/* 13 */
/***/ function(module, exports, __webpack_require__) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	    value: true
	});

	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; }; })();

	var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

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

	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; }

	var _lodashForin = __webpack_require__(3);

	var _lodashForin2 = _interopRequireDefault(_lodashForin);

	var _eventemitter3 = __webpack_require__(9);

	var _eventemitter32 = _interopRequireDefault(_eventemitter3);

	var _dispatcher = __webpack_require__(2);

	var _dispatcher2 = _interopRequireDefault(_dispatcher);

	var Store = (function (_EventEmitter) {
	    _inherits(Store, _EventEmitter);

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

	        _get(Object.getPrototypeOf(Store.prototype), 'constructor', this).call(this);
	        this.store = {};
	    }

	    _createClass(Store, [{
	        key: 'bindAction',
	        value: function bindAction(name, func) {
	            _dispatcher2['default'].on(name, func.bind(this));
	        }
	    }, {
	        key: 'bindActions',
	        value: function bindActions(events) {
	            (0, _lodashForin2['default'])(events, function (func, name) {
	                if (typeof func !== 'function') {
	                    return;
	                }
	                _dispatcher2['default'].on(name, func.bind(this));
	            }, this);
	        }
	    }]);

	    return Store;
	})(_eventemitter32['default']);

	exports['default'] = Store;
	module.exports = exports['default'];

/***/ }
/******/ ])
});
;


text:
using WebBlocks.Root.Contracts;

namespace WebBlocks.DataAccess
{
    public class DbWorker : IDbWorker
    {
        public IRepository Create()
        {
            return new Repository(new AppDbContext());
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
//
// file : pair.hpp
// in : file:///home/tim/projects/yaggler/yaggler/tools/pair.hpp
//
// created by : Timothée Feuillet on linux-coincoin.tim
// date: 11/02/2014 08:57:23
//
//
// Copyright (c) 2014-2016 Timothée Feuillet
//
// 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.
//

#ifndef __N_10163000121490696598_1767804787__PAIR_HPP__
# define __N_10163000121490696598_1767804787__PAIR_HPP__

namespace neam
{
  namespace ct
  {
    // a pair of types
    template<typename Type1, typename Type2>
    struct pair
    {
      using type_1 = Type1;
      using first = Type1;
      using type_2 = Type2;
      using second = Type2;
    };
  } // namespace ct
} // namespace neam

#endif /*__N_10163000121490696598_1767804787__PAIR_HPP__*/

// kate: indent-mode cstyle; indent-width 2; replace-tabs on;


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is part of the DITA Open Toolkit project hosted on
    Sourceforge.net. See the accompanying license.txt file for
    applicable licenses.-->
<!-- (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved. -->

<strings xml:lang="da-dk">        <!-- Danish -->

<!-- various labels (not author controlled) -->
<str name="Figure">Figur</str>
<str name="Table">Tabel</str>
<str name="Next topic">Næste emne</str>
<str name="Previous topic">Forrige emne</str>
<str name="Parent topic">Overordnet emne</str>
<str name="Required cleanup">Påkrævet oprydning</str>
<str name="Draft comment">Kommentar til kladde</str>
<str name="Option">Valg</str>
<str name="Description">Beskrivelse</str>
<str name="Optional">Valgfrit</str>
<str name="Required">Påkrævet</str>
<str name="Skip visual syntax diagram">Spring over visuel syntaksdiagram</str>
<str name="Read syntax diagram">Læs syntaksdiagram</str>
<str name="Start of change">Start på ændringer</str>
<str name="End of change">Slut på ændringer</str>
<str name="Index">Stikordsregister</str>
<str name="Special characters">Specialtegn</str>
<str name="Numerics">Numerisk</str>
<str name="End notes">Slutbemærkninger</str>
<str name="Artwork">Illustrationer</str>
<str name="Syntax">Syntaks</str>
<str name="Type">Type</str>
<str name="Value">Værdi</str>
<!-- Text that goes before a link to a topic -->
<str name="intro-to-topic-link"></str>

<!-- peril notice labels -->
<str name="Note">Bemærk</str>
<str name="Notes">Bemærkninger</str>
<str name="Tip">Tip</str>
<str name="Fastpath">Genvej</str>
<str name="Important">Vigtigt</str>
<str name="Attention">Advarsel</str>
<str name="Caution">Pas på</str>
<str name="Danger">Fare!</str>
<str name="Remember">Husk</str>
<str name="Restriction">Begrænsning</str>
<str name="Warning">Advarsel</str>

<!-- default title text for section level generated sections -->
<str name="Contents">Indholdsfortegnelse</str>
<str name="Related concepts">Beslægtede begreber</str>
<str name="Related tasks">Beslægtede opgaver</str>
<str name="Related reference">Beslægtet reference</str>
<str name="Related information">Beslægtede oplysninger</str>

<str name="Prerequisite">Forudsætning</str>
<str name="Prerequisites">Forudsætninger</str>
<str name="or">eller</str>
<str name="figure-number-separator"> </str>

<!--Task section labels -->
<str name="task_context">Om denne opgave</str>
<str name="task_example">Eksempel</str>
<str name="task_postreq">Næste trin</str>
<str name="task_prereq">Inden du begynder</str>
<str name="task_procedure">Fremgangsmåde</str>
<str name="task_procedure_unordered">Fremgangsmåde</str>
<str name="task_results">Resultater</str>

<str name="Copyright">Copyright</str>

<!-- Symbols -->
<str name="OpenQuote">"</str>
<str name="CloseQuote">"</str>
<str name="ColonSymbol">:</str>

</strings>


text:
var Plotly = require('@lib/index');
var createGraph = require('../assets/create_graph_div');
var destroyGraph = require('../assets/destroy_graph_div');
var getBBox = require('../assets/get_bbox');
var mock = require('../../image/mocks/legend_scroll.json');

describe('The legend', function() {
    'use strict';

    var gd, legend;

    function countLegendGroups(gd) {
        return gd._fullLayout._toppaper.selectAll('g.legend').size();
    }

    function countLegendClipPaths(gd) {
        var uid = gd._fullLayout._uid;

        return gd._fullLayout._topdefs.selectAll('#legend' + uid).size();
    }

    describe('when plotted with many traces', function() {
        beforeEach(function() {
            gd = createGraph();
            Plotly.plot(gd, mock.data, mock.layout);
            legend = document.getElementsByClassName('legend')[0];
        });

        afterEach(destroyGraph);

        it('should not exceed plot height', function() {
            var legendHeight = getBBox(legend).height,
                plotHeight = gd._fullLayout.height - gd._fullLayout.margin.t - gd._fullLayout.margin.b;

            expect(+legendHeight).toBe(plotHeight);
        });

        it('should insert a scrollbar', function() {
            var scrollBar = legend.getElementsByClassName('scrollbar')[0];

            expect(scrollBar).toBeDefined();
            expect(scrollBar.getAttribute('x')).not.toBe(null);
        });

        it('should scroll when there\'s a wheel event', function() {
            var scrollBox = legend.getElementsByClassName('scrollbox')[0];

            legend.dispatchEvent(scrollTo(100));

            // Compare against -5 because of a scroll factor of 20
            // ( 100 / 20 === 5 )
            expect(scrollBox.getAttribute('transform')).toBe('translate(0, -5)');
            expect(scrollBox.getAttribute('data-scroll')).toBe('-5');
        });

        it('should constrain scrolling to the contents', function() {
            var scrollBox = legend.getElementsByClassName('scrollbox')[0];

            legend.dispatchEvent(scrollTo(-100));
            expect(scrollBox.getAttribute('transform')).toBe('translate(0, 0)');

            legend.dispatchEvent(scrollTo(100000));
            expect(scrollBox.getAttribute('transform')).toBe('translate(0, -179)');
        });

        it('should scale the scrollbar movement from top to bottom', function() {
            var scrollBar = legend.getElementsByClassName('scrollbar')[0],
                legendHeight = getBBox(legend).height;

            // The scrollbar is 20px tall and has 4px margins

            legend.dispatchEvent(scrollTo(-1000));
            expect(+scrollBar.getAttribute('y')).toBe(4);

            legend.dispatchEvent(scrollTo(10000));
            expect(+scrollBar.getAttribute('y')).toBe(legendHeight - 4 - 20);
        });

        it('should be removed from DOM when \'showlegend\' is relayout\'ed to false', function(done) {
            expect(countLegendGroups(gd)).toBe(1);
            expect(countLegendClipPaths(gd)).toBe(1);

            Plotly.relayout(gd, 'showlegend', false).then(function() {
                expect(countLegendGroups(gd)).toBe(0);
                expect(countLegendClipPaths(gd)).toBe(0);

                done();
            });
        });
    });

    describe('when plotted with few traces', function() {
        var gd;

        beforeEach(function() {
            gd = createGraph();

            var data = [{ x: [1,2,3], y: [2,3,4], name: 'Test' }];
            var layout = { showlegend: true };

            Plotly.plot(gd, data, layout);
        });

        afterEach(destroyGraph);

        it('should not display the scrollbar', function() {
            var scrollBar = document.getElementsByClassName('scrollbar')[0];

            expect(+scrollBar.getAttribute('width')).toBe(0);
            expect(+scrollBar.getAttribute('height')).toBe(0);
        });

        it('should be removed from DOM when \'showlegend\' is relayout\'ed to false', function(done) {
            expect(countLegendGroups(gd)).toBe(1);
            expect(countLegendClipPaths(gd)).toBe(1);

            Plotly.relayout(gd, 'showlegend', false).then(function() {
                expect(countLegendGroups(gd)).toBe(0);
                expect(countLegendClipPaths(gd)).toBe(0);

                done();
            });
        });
    });
});

function scrollTo(delta) {
    return new WheelEvent('wheel', { deltaY: delta });
}


text:
This directory contains end-to-end benchmarks for the Cloud Spanner C++ client
library. The benchmarks execute experiments against the production environment.
You need a working Google Cloud Platform project and Cloud Spanner instance
to run these benchmarks. We recommend that you use an isolated instance, that is
one without any other workloads, to run each experiment, and that you do not run
more than one experiment at a time in said instance.

## Creating an instance

Assuming you have an existing Google Cloud Project you can create a Cloud
Spanner instance using the console or:

```console
GOOGLE_CLOUD_PROJECT=...                      # Your project ID
GOOGLE_CLOUD_CPP_SPANNER_TEST_INSTANCE_ID=benchmarks  # Choose your instance ID
INSTANCE_CONFIG=regional-us-central1          # Choose the instance location(s)
gcloud spanner instances create ${GOOGLE_CLOUD_CPP_SPANNER_TEST_INSTANCE_ID} \
    --config=${INSTANCE_CONFIG} --description="An instance to run Benchmarks" \
    --nodes=3
```

## CPU Overhead Experiment

This experiment measures the CPU overhead of the client library vs. raw gRPC.
This overhead is never expected to be zero, the library is performing useful
work, but we want it to be low, unsurprising, and (once a baseline is
established) to remain stable unless there is good reason to add overhead.

We recommend that you compile and run these experiments on a VM running on the
same region as the spanner instance you will use for the tests. Create and
configure the VM instance, and then install the development tools for whatever
platform you chose. See [doc/packaging.md][packaging-doc-link] for install
instructions for your platform.

### Compiling the library

You must compile both the library and its dependencies with optimization.
The [contributor documentation](/doc/contributor/README.md) has the relevant
information.

### Configuring Authentication

You need to configure the Cloud Spanner client library so it can authenticate
with Cloud Spanner. While covering authentication in detail is beyond the scope
of this README, we assume the reader is familiar with the topic, and refer them
to the [Authentication Overview][authentication-quickstart] if they need a more
in-depth discussion.

Save the credentials you want to use to a file. Then set the
`GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path of this file.

If you are running the benchmarks in a virtual machine, the library can
automatically use the GCE instance service account (when you do **not** set
`GOOGLE_APPLICATION_CREDENTIALS`). You may need to grant this service account
permissions to work with Cloud Spanner. Examine the
[spanner roles][spanner-roles-link] to chose a role for this account, the
principal used to run these benchmark should have (at least) the permissions
granted by the `roles/spanner.databaseAdmin` role.

### Running the benchmark

By default the benchmarks run simple smoke tests, the intention is for these
benchmarks to run as part of the CI build, where we want them to finish quickly.
You must specify some options to control for how long the experiments run, for
example, to perform the experiment measuring the CPU overhead of reading columns
of type `STRING` you would run:

```bash
.build/google/cloud/spanner/benchmarks/multiple_rows_cpu_benchmark \
    --project=${GOOGLE_CLOUD_PROJECT} \
    --instance=${GOOGLE_CLOUD_CPP_SPANNER_TEST_INSTANCE_ID} \
    --table-size=1000000 \
    --maximum-channels=8 \
    --maximum-threads=16 \
    --iteration-duration=5 \
    --samples=60 --experiment=read-string | tee mrcb-read-string.csv
```

The program can run the same experiment with other data types:

```bash
for exp in read-bool read-bytes read-date read-float64 \
           read-int64 read-string read-timestamp; do \
  .build/google/cloud/spanner/benchmarks/multiple_rows_cpu_benchmark \
    --project=${GOOGLE_CLOUD_PROJECT} \
    --instance=${GOOGLE_CLOUD_CPP_SPANNER_TEST_INSTANCE_ID} \
    --table-size=1000000 \
    --maximum-channels=8 \
    --maximum-threads=16 \
    --iteration-duration=5 \
    --samples=60 --experiment=${exp} | tee mrcb-${exp}.csv; \
done
```

### Inspecting the results

At this time we have not developed scripts to analyze the benchmark results,
but some simple R commands can help, start R in your command line and then
issue the following commands:

```R
require(ggplot2) # may require install.packages("ggplot2") the first time
df <- data.frame()
for(file in Sys.glob("mrcb-read-*.csv")) {
    t <- read.csv(file, comment.char='#');
    name <- gsub('mrcb-([a-z-]+).*', '\\1', file);
    t$experiment = factor(name);
    df <- rbind(df, t);
}

df$CpuTimePerRow <- df$CpuTime / df$RowCount

aggregate(CpuTimePerRow ~ UsingStub + experiment, data=df, FUN=mean)

ggplot(data=df, aes(color=UsingStub, x=experiment, y=CpuTime)) + geom_boxplot()
ggsave('read-data-types.png')
```

## Single Row Throughput Experiment

This experiment measures the throughput of either single-row inserts or
single-row reads using different numbers of channels and threads. The objective
is to verify the client library scales well with more threads and those not
introduce bottlenecks.

To run the experiment reading data for approximately 5 minutes use 20 samples
of 15 seconds each:

```bash
.build/google/cloud/spanner/benchmarks/single_row_throughput_benchmark \
    --project=${GOOGLE_CLOUD_PROJECT} \
    --instance=${GOOGLE_CLOUD_CPP_SPANNER_TEST_INSTANCE_ID} \
    --iteration-duration=15 \
    --table-size=10000000 \
    --maximum-channels=32 \
    --maximum-threads=1024 \
    --samples=20 2>&1 \
    --experiment=read | tee srtp-read.csv
```

[authentication-quickstart]: https://cloud.google.com/docs/authentication/getting-started "Authentication Getting Started"
[packaging-doc-link]: /doc/packaging.md
[spanner-roles-link]: https://cloud.google.com/spanner/docs/iam#roles


text:
module Soapforce
  class Client

    attr_reader :client
    attr_reader :headers
    attr_accessor :logger

    # The partner.wsdl is used by default but can be changed by passing in a new :wsdl option.
    # A client_id can be
    def initialize(options={})
      @describe_cache = {}
      @describe_layout_cache = {}
      @headers = {}

      @wsdl = options[:wsdl] || File.dirname(__FILE__) + "/../../resources/partner.wsdl.xml"

      # If a client_id is provided then it needs to be included
      # in the header for every request.  This allows ISV Partners
      # to make SOAP calls in Professional/Group Edition organizations.

      client_id = options[:client_id] || Soapforce.configuration.client_id
      @headers = {"tns:CallOptions" => {"tns:client" => client_id}} if client_id

      @version = options[:version] || Soapforce.configuration.version || 28.0
      @host = options[:host] || "login.salesforce.com"
      @login_url = "https://#{@host}/services/Soap/u/#{@version}"

      @logger = options[:logger] || false
      # Due to recent SSLv3 POODLE vulnerabilty we default to TLSv1
      @ssl_version = options[:ssl_version] || :TLSv1

      @client = Savon.client(
        wsdl: @wsdl,
        soap_header: @headers,
        convert_request_keys_to: :none,
        pretty_print_xml: true,
        logger: @logger,
        log: (@logger != false),
        endpoint: @login_url,
        ssl_version: @ssl_version # Sets ssl_version for HTTPI adapter
        )
    end

    # Public: Get the names of all wsdl operations.
    # List all available operations from the partner.wsdl
    def operations
      @client.operations
    end

    # Public: Get the names of all wsdl operations.
    #
    # Supports a username/password (with token) combination or session_id/server_url pair.
    #
    # Examples
    #
    #   client.login(username: 'test', password: 'password_and_token')
    #   # => {...}
    #
    #   client.login(session_id: 'abcd1234', server_url: 'https://na1.salesforce.com/')
    #   # => {...}
    #
    # Returns Hash of login response and user info
    def login(options={})
      result = nil
      if options[:username] && options[:password]
        response = @client.call(:login) do |locals|
          locals.message :username => options[:username], :password => options[:password]
        end

        result = response.to_hash[:login_response][:result]
        returned_endpoint = result[:server_url]

        @session_id = result[:session_id]
        @server_url = result[:server_url]
      elsif options[:session_id] && options[:server_url]
        @session_id = options[:session_id]
        @server_url = options[:server_url]
      else
        raise ArgumentError.new("Must provide username/password or session_id/server_url.")
      end

      @headers = @headers.merge({"tns:SessionHeader" => {"tns:sessionId" => @session_id}})

      @client = Savon.client(
        wsdl: @wsdl,
        soap_header: @headers,
        convert_request_keys_to: :none,
        logger: @logger,
        log: (@logger != false),
        endpoint: @server_url,
        ssl_version: @ssl_version # Sets ssl_version for HTTPI adapter
      )

      # If a session_id/server_url were passed in then invoke get_user_info for confirmation.
      # Method missing to call_soap_api
      result = self.get_user_info if options[:session_id]

      result
    end
    alias_method :authenticate, :login

    # Public: Get the names of all sobjects on the org.
    #
    # Examples
    #
    #   # get the names of all sobjects on the org
    #   client.list_sobjects
    #   # => ['Account', 'Lead', ... ]
    #
    # Returns an Array of String names for each SObject.
    def list_sobjects
      response = describe_global # method_missing
      response[:sobjects].collect { |sobject| sobject[:name] }
    end

    # Public: Get the current organization's Id.
    #
    # Examples
    #
    #   client.org_id
    #   # => '00Dx0000000BV7z'
    #
    # Returns the String organization Id
    def org_id
      object = query('select id from Organization').first
      if object && object[:id]
        return object[:id].is_a?(Array) ? object[:id].first : object[:id]
      end
    end

    # Public: Returns a detailed describe result for the specified sobject
    #
    # sobject - String name of the sobject.
    #
    # Examples
    #
    #   # get the describe for the Account object
    #   client.describe('Account')
    #   # => { ... }
    #
    #   # get the describe for the Account object
    #   client.describe(['Account', 'Contact'])
    #   # => { ... }
    #
    # Returns the Hash representation of the describe call.
    def describe(sobject_type)
      if sobject_type.is_a?(Array)
        list = sobject_type.map do |type|
          {:sObjectType => type}
        end
        response = call_soap_api(:describe_s_objects, :sObjectType => sobject_type)
      else
        # Cache objects to avoid repeat lookups.
        if @describe_cache[sobject_type].nil?
          response = call_soap_api(:describe_s_object, :sObjectType => sobject_type)
          @describe_cache[sobject_type] = response
        else
          response = @describe_cache[sobject_type]
        end
      end

      response
    end

    # Public: Returns the layout for the specified object
    #
    # sobject - String name of the sobject.
    #
    # Examples
    #
    #   # get layouts for an sobject type
    #   client.describe_layout('Account')
    #   # => { ... }
    #
    #   # get layouts for an sobject type
    #   client.describe_layout('Account', '012000000000000AAA')
    #   # => { ... }
    #
    # Returns the Hash representation of the describe call.
    def describe_layout(sobject_type, layout_id=nil)
      # Cache objects to avoid repeat lookups.
      @describe_layout_cache[sobject_type] ||={}

      # nil key is for full object.
      if @describe_layout_cache[sobject_type][layout_id].nil?
        response = call_soap_api(:describe_layout, :sObjectType => sobject_type, :recordTypeIds => layout_id)
        @describe_layout_cache[sobject_type][layout_id] = response
      else
        response = @describe_layout_cache[sobject_type][layout_id]
      end

      response
    end

    def query(soql)
      result = call_soap_api(:query, {:queryString => soql})
      QueryResult.new(result)
    end

    # Includes deleted (isDeleted) or archived (isArchived) records
    def query_all(soql)
      result = call_soap_api(:query_all, {:queryString => soql})
      QueryResult.new(result)
    end

    def query_more(locator)
      result = call_soap_api(:query_more, {:queryLocator => locator})
      QueryResult.new(result)
    end

    def search(sosl)
      call_soap_api(:search, {:searchString => sosl})
    end

    # Public: Insert a new record.
    #
    # sobject - String name of the sobject.
    # attrs   - Hash of attributes to set on the new record.
    #
    # Examples
    #
    #   # Add a new account
    #   client.create('Account', Name: 'Foobar Inc.')
    #   # => '0016000000MRatd'
    #
    # Returns the String Id of the newly created sobject.
    # Returns false if something bad happens.
    def create(sobject_type, properties)
      create!(sobject_type, properties)
    rescue => e
      false
    end

    # Public: Insert a new record.
    #
    # sobject - String name of the sobject.
    # attrs   - Hash of attributes to set on the new record.
    #
    # Examples
    #
    #   # Add a new account
    #   client.create('Account', Name: 'Foobar Inc.')
    #   # => '0016000000MRatd'
    #
    # Returns the String Id of the newly created sobject.
    # Raises exceptions if an error is returned from Salesforce.
    def create!(sobject_type, properties)
      call_soap_api(:create, sobjects_hash(sobject_type, properties))
    end

    # Public: Update a record.
    #
    # sobject - String name of the sobject.
    # attrs   - Hash of attributes to set on the record.
    #
    # Examples
    #
    #   # Update the Account with Id '0016000000MRatd'
    #   client.update('Account', Id: '0016000000MRatd', Name: 'Whizbang Corp')
    #
    # Returns Hash if the sobject was successfully updated.
    # Returns false if there was an error.
    def update(sobject_type, properties)
      update!(sobject_type, properties)
    rescue => e
      false
    end

    # Public: Update a record.
    #
    # sobject - String name of the sobject.
    # attrs   - Hash of attributes to set on the record.
    #
    # Examples
    #
    #   # Update the Account with Id '0016000000MRatd'
    #   client.update!('Account', Id: '0016000000MRatd', Name: 'Whizbang Corp')
    #
    # Returns Hash if the sobject was successfully updated.
    # Raises an exception if an error is returned from Salesforce
    def update!(sobject_type, properties)
      call_soap_api(:update, sobjects_hash(sobject_type, properties))
    end

    # Public: Update or create a record based on an external ID
    #
    # sobject - The name of the sobject to created.
    # field   - The name of the external Id field to match against.
    # attrs   - Hash of attributes for the record.
    #
    # Examples
    #
    #   # Update the record with external ID of 12
    #   client.upsert!('Account', 'External__c', External__c: 12, Name: 'Foobar')
    #
    # Returns Hash if the record was found and updated or newly created.
    # Raises an exception if an error is returned from Salesforce.
    def upsert(sobject_type, external_id_field_name, objects)
      message = {externalIDFieldName: external_id_field_name}.merge(sobjects_hash(sobject_type, objects))
      call_soap_api(:upsert, message)
    end

    # Public: Delete a record.
    #
    # sobject - String name of the sobject.
    # id      - The Salesforce ID of the record.
    #
    # Examples
    #
    #   # Delete the Account with Id '0016000000MRatd'
    #   client.delete('Account', '0016000000MRatd')
    #
    # Returns true if the sobject was successfully deleted.
    # Returns false if an error is returned from Salesforce.
    def delete(id)
      delete!(id)
    rescue => e
      false
    end
    alias_method :destroy, :delete

    # Public: Delete a record.
    #
    # sobject - String name of the sobject.
    # id      - The Salesforce ID of the record.
    #
    # Examples
    #
    #   # Delete the Account with Id '0016000000MRatd'
    #   client.delete!('Account', '0016000000MRatd')
    #
    # Returns Hash if the sobject was successfully deleted.
    # Raises an exception if an error is returned from Salesforce.
    def delete!(id)
      ids = id.is_a?(Array) ? id : [id]
      call_soap_api(:delete, {:ids => ids})
    end
    alias_method :destroy!, :delete

    # Public: Merges records together
    #
    # sobject       - String name of the sobject
    # master_record - Hash of the master record that other records will be merged into
    # ids           - Array of Salesforce Ids that will be merged into the master record
    #
    # Examples
    #
    #   client.merge('Account', Id: '0016000000MRatd', ['012000000000000AAA'])
    #
    # Returns Hash if the records were merged successfully
    # Raises an exception if an error is returned from Salesforce.
    def merge!(sobject_type, master_record_hash, ids)
      call_soap_api(
        :merge,
        request: {
          masterRecord: master_record_hash.merge(:'@xsi:type' => sobject_type),
          recordToMergeIds: ids
        }
      )
    end

    # Public: Merges records together
    #
    # sobject       - String name of the sobject
    # master_record - Hash of the master record that other records will be merged into
    # ids           - Array of Salesforce Ids that will be merged into the master record
    #
    # Examples
    #
    #   client.merge('Account', Id: '0016000000MRatd', ['012000000000000AAA'])
    #
    # Returns Hash if the records were merged successfully
    # Raises an exception if an error is returned from Salesforce.
    def merge(sobject_type, master_record_hash, ids)
      merge!(sobject_type, master_record_hash, ids)
    rescue => e
      false
    end

    # Public: Finds a single record and returns all fields.
    #
    # sobject - The String name of the sobject.
    # id      - The id of the record. If field is specified, id should be the id
    #           of the external field.
    # field   - External ID field to use (default: nil).
    #
    # Returns Hash of sobject record.
    def find(sobject, id, field=nil)
      if field.nil? || field.downcase == "id"
        retrieve(sobject, id)
      else
        find_by_field(sobject, id, field)
      end
    end

    # Public: Finds record based on where condition and returns all fields.
    #
    # sobject - The String name of the sobject.
    # where   - String where clause or Hash made up of field => value pairs.
    # select  - Optional array of field names to return.
    #
    # Returns Hash of sobject record.
    def find_where(sobject, where={}, select_fields=[])

      if where.is_a?(String)
        where_clause = where
      elsif where.is_a?(Hash)
        conditions = []
        where.each {|k,v|
          # Wrap strings in single quotes.
          v = v.is_a?(String) ? "'#{v}'" : v
          v = 'NULL' if v.nil?

          # Handle IN clauses when value is an array.
          if v.is_a?(Array)
            # Wrap single quotes around String values.
            values = v.map {|s| s.is_a?(String) ? "'#{s}'" : s}.join(", ")
            conditions << "#{k} IN (#{values})"
          else
            conditions << "#{k} = #{v}"
          end
        }
        where_clause = conditions.join(" AND ")

      end

      # Get list of fields if none were specified.
      if select_fields.empty?
        field_names = field_list(sobject)
      else
        field_names = select_fields
      end

      soql = "Select #{field_names.join(", ")} From #{sobject} Where #{where_clause}"
      result = query(soql)
    end

    # Public: Finds a single record and returns all fields.
    #
    # sobject - The String name of the sobject.
    # id      - The id of the record. If field is specified, id should be the id
    #           of the external field.
    # field   - External ID field to use.
    #
    # Returns Hash of sobject record.
    def find_by_field(sobject, id, field_name)
      field_details = field_details(sobject, field_name)
      field_names = field_list(sobject).join(", ")

      if ["int", "currency", "double", "boolean", "percent"].include?(field_details[:type])
        search_value = id
      else
        # default to quoted value
        search_value = "'#{id}'"
      end

      soql = "Select #{field_names} From #{sobject} Where #{field_name} = #{search_value}"
      result = query(soql)
      # Return first query result.
      result ? result.first : nil
    end

    # Public: Finds a single record and returns all fields.
    #
    # sobject - The String name of the sobject.
    # id      - The id of the record. If field is specified, id should be the id
    #           of the external field.
    #
    # Returns Hash of sobject record.
    def retrieve(sobject, id)
      ids = id.is_a?(Array) ? id : [id]
      sobject = call_soap_api(:retrieve, {fieldList: field_list(sobject).join(","), sObjectType: sobject, ids: ids})
      sobject ? SObject.new(sobject) : nil
    end

    # ProcessSubmitRequest
    #   request = {objectId: .., comments: ..., nextApproverIds: [...] }
    # ProcessWorkItemRequest
    #   request = {action: .., workitemId: .., comments: ..., nextApproverIds: [...] }
    #
    # Returns Hash of process status.
    def process(request)

      # approverIds is optional if Approval is configured to auto-assign the approver.
      # Ensure approver ids is an array.
      approver_ids = request[:approverIds] || []
      approver_ids = approver_ids.is_a?(Array) ? approver_ids : [approver_ids]

      request_type = request[:workitemId] ? "ProcessWorkitemRequest" : "ProcessSubmitRequest"

      # Unfortunately had to use XML since I could not figure out
      # how to get Savon2 to include the proper xsi:type attribute
      # on the actions element.
      xml = "<tns:actions xsi:type=\"tns:#{request_type}\">"
      # Account for Submit or Workitem Request
      if request[:objectId]
        xml << "<tns:objectId>#{request[:objectId]}</tns:objectId>"
      else
        xml << "<tns:action>#{request[:action]}</tns:action>"
        xml << "<tns:workitemId>#{request[:workitemId]}</tns:workitemId>"
      end

      xml << "<tns:comments>#{request[:comments]}</tns:comments>"
      approver_ids.each do |aid|
        xml <<  "<tns:nextApproverIds>#{aid}</tns:nextApproverIds>"
      end
      xml << "</tns:actions>"

      call_soap_api(:process, xml)
    end

    # Helpers

    def field_list(sobject)
      description = describe(sobject)
      field_list = description[:fields].collect {|c| c[:name] }
    end

    def field_details(sobject, field_name)
      description = describe(sobject)
      fields = description[:fields]
      fields.find {|f| field_name.downcase == f[:name].downcase }
    end

    # Supports the following No Argument methods:
    #   get_user_info
    #   describe_global
    #   describe_softphone_layout
    #   describe_tabs
    #   logout
    #   get_server_timestamp
    def method_missing(method, *args)
      call_soap_api(method, *args)
    end

    def call_soap_api(method, message_hash={})

      response = @client.call(method.to_sym) do |locals|
        locals.message message_hash
      end
      # Convert SOAP XML to Hash
      response = response.to_hash

      # Get Response Body
      response_body = response["#{method}_response".to_sym]

      # Grab result section if exists.
      result = response_body ? response_body[:result] : nil

      # Raise error when response contains errors
      if result && result.is_a?(Hash) && result[:success] == false && result[:errors]
        raise Savon::Error.new("#{result[:errors][:status_code]}: #{result[:errors][:message]}")
      end

      return result
    end

    def sobjects_hash(sobject_type, sobject_hash)

      if sobject_hash.is_a?(Array)
        sobjects = sobject_hash
      else
        sobjects = [sobject_hash]
      end

      sobjects.map! do |obj|
        {"ins0:type" => sobject_type}.merge(obj)
      end

      {sObjects: sobjects}
    end
  end
end


text:
<?php

namespace Janus\ServiceRegistry\Doctrine\Type;

use DateTime;

use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;

class JanusDateTimeType extends Type
{
    const NAME = 'janusDateTime';

    public function getName()
    {
        return static::NAME;
    }

    public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
    {
        $fieldDeclaration['length'] = 25;
        $fieldDeclaration['fixed'] = true;
        $fieldDeclaration['notnull'] = true;

        return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
    }

    public function convertToPHPValue($value, AbstractPlatform $platform)
    {
        if (empty($value)) {
            return null;
        }

        $timeStamp = strtotime($value);
        if ($timeStamp === false) {
            return null;
        }

        $datetime = new DateTime();
        $datetime->setTimestamp($timeStamp);
        return $datetime;
    }

    public function convertToDatabaseValue($value, AbstractPlatform $platform)
    {
        // @todo make date columns nullable
        if (is_string($value) && empty($value)) {
            return '';
        }

        if ($value instanceof DateTime) {
            return $value->format(DateTime::ATOM);
        }
    }

    public function requiresSQLCommentHint(AbstractPlatform $platform)
    {
        return true;
    }
}


text:
using EdiEngine.Common.Enums;
using EdiEngine.Common.Definitions;
using EdiEngine.Standards.X12_004010.Segments;

namespace EdiEngine.Standards.X12_004010.Maps
{
	public class M_879 : MapLoop
	{
		public M_879() : base(null)
		{
			Content.AddRange(new MapBaseEntity[] {
				new G91() { ReqDes = RequirementDesignator.Mandatory, MaxOccurs = 1 },
				new L_N1(this) { ReqDes = RequirementDesignator.Mandatory, MaxOccurs = 999 },
				new N9() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 10 },
				new G61() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 3 },
				new NTE() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 20 },
				new G36() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 1 },
				new G26() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 99 },
				new G43() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 9999 },
				new G62() { ReqDes = RequirementDesignator.Mandatory, MaxOccurs = 10 },
				new G93() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 50 },
				new G46() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 100 },
				new L_G28(this) { ReqDes = RequirementDesignator.Mandatory, MaxOccurs = 9999 },
			});
		}

		//0100
		public class L_N1 : MapLoop
		{
			public L_N1(MapLoop parentLoop) : base(parentLoop)
			{
				Content.AddRange(new MapBaseEntity[] {
					new N1() { ReqDes = RequirementDesignator.Mandatory, MaxOccurs = 1 },
					new N2() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 1 },
					new N3() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 2 },
					new N4() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 1 },
				});
			}
		}

		//0200
		public class L_G28 : MapLoop
		{
			public L_G28(MapLoop parentLoop) : base(parentLoop)
			{
				Content.AddRange(new MapBaseEntity[] {
					new G28() { ReqDes = RequirementDesignator.Mandatory, MaxOccurs = 1 },
					new G20() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 1 },
					new G69() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 5 },
					new G26() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 99 },
					new G43() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 9999 },
					new G62() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 4 },
					new G46() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 100 },
					new G22() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 1 },
					new SAC() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 10 },
					new L_G40(this) { ReqDes = RequirementDesignator.Optional, MaxOccurs = 100 },
				});
			}
		}

		//0210
		public class L_G40 : MapLoop
		{
			public L_G40(MapLoop parentLoop) : base(parentLoop)
			{
				Content.AddRange(new MapBaseEntity[] {
					new G40() { ReqDes = RequirementDesignator.Mandatory, MaxOccurs = 1 },
					new G46() { ReqDes = RequirementDesignator.Optional, MaxOccurs = 100 },
				});
			}
		}

	}
 }


text:
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <service id="sonata.core.date.moment_format_converter" class="Sonata\CoreBundle\Date\MomentFormatConverter" />
    </services>
</container>


text:
function __processArg(obj, key) {
    var arg = null;
    if (obj) {
        arg = obj[key] || null;
        delete obj[key];
    }
    return arg;
}

function Controller() {
    function login() {
        Alloy.createController("login").getView().open();
    }
    function register() {
        Alloy.createController("register").getView().open();
    }
    require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
    this.__controllerPath = "portal";
    if (arguments[0]) {
        {
            __processArg(arguments[0], "__parentSymbol");
        }
        {
            __processArg(arguments[0], "$model");
        }
        {
            __processArg(arguments[0], "__itemTemplate");
        }
    }
    var $ = this;
    var exports = {};
    var __defers = {};
    $.__views.portal = Ti.UI.createWindow({
        id: "portal"
    });
    $.__views.portal && $.addTopLevelView($.__views.portal);
    $.__views.movableView = Ti.UI.createView({
        top: 0,
        zIndex: 100,
        width: "100%",
        id: "movableView",
        backgroundColor: "white"
    });
    $.__views.portal.add($.__views.movableView);
    $.__views.__alloyId4 = Ti.UI.createButton({
        title: "Iniciar Sesion",
        top: "60dp",
        id: "__alloyId4"
    });
    $.__views.movableView.add($.__views.__alloyId4);
    login ? $.__views.__alloyId4.addEventListener("click", login) : __defers["$.__views.__alloyId4!click!login"] = true;
    $.__views.__alloyId5 = Ti.UI.createButton({
        title: "Registrarse",
        top: "120dp",
        id: "__alloyId5"
    });
    $.__views.movableView.add($.__views.__alloyId5);
    register ? $.__views.__alloyId5.addEventListener("click", register) : __defers["$.__views.__alloyId5!click!register"] = true;
    exports.destroy = function() {};
    _.extend($, $.__views);
    arguments[0] || {};
    $.portal.addEventListener("open", function() {
        var activity = $.portal.activity;
        if (Ti.Platform.Android && Alloy.Globals.Android.Api >= 11) {
            activity.actionBar.title = "Identificacion";
            activity.actionBar.displayHomeAsUp = true;
            activity.actionBar.onHomeIconItemSelected = function() {
                $.portal.close();
                $.portal = null;
            };
        }
    });
    __defers["$.__views.__alloyId4!click!login"] && $.__views.__alloyId4.addEventListener("click", login);
    __defers["$.__views.__alloyId5!click!register"] && $.__views.__alloyId5.addEventListener("click", register);
    _.extend($, exports);
}

var Alloy = require("alloy"), Backbone = Alloy.Backbone, _ = Alloy._;

module.exports = Controller;


text:
package de.onyxbits.geobookmark;

import android.os.Handler;

public class TimeOut implements Runnable {

	private long sleepTime;
	private BookmarkService service;
	private Handler handler;

	public TimeOut(BookmarkService service, long sleepTime) {
		this.sleepTime = sleepTime;
		this.service = service;
		this.handler = new Handler();
	}

	private TimeOut(BookmarkService service) {
		this.service=service;
	}

	@Override
	public void run() {
		if (handler == null) {
			service.timeout();
		}
		else {
			try {
				Thread.sleep(sleepTime);
				handler.post(new TimeOut(service));
			}
			catch (InterruptedException e) {

			}
		}
	}
}


text:
Ext.define('Ifresco.model.MyDocuments', {
    extend: 'Ext.data.Model',
    fields: [
        {name: 'nodeRef', type: 'string'},
        {name: 'nodeType', type: 'string'},
        {name: 'type', type: 'string'},
        {name: 'mimetype', type: 'string'},
        {name: 'isFolder', type: 'string'},
        {name: 'fileName', type: 'string'},
        {name: 'displayName', type: 'string'},
        {name: 'createdOn', type: 'date', dateFormat: 'c'},
        {name: 'createdBy', type: 'string'},
        {name: 'createdByUser', type: 'string'},
        {name: 'modifiedOn', type: 'date', dateFormat: 'c'},
        {name: 'modifiedBy', type: 'string'},
        {name: 'modifiedByUser', type: 'string'},
        {name: 'size', type: 'string'},
        {name: 'contentUrl', type: 'string'},
        {name: 'webdavUrl', type: 'string'},
        {name: 'actionSet', type: 'string'}
    ]
});


text:
namespace TekConf.Tests.UI
{
	public static class ScreenNames
	{
		public static string AddTask = "AddTaskScreen";
		public static string ConferencesList = "ConferencesList";
	}
}


text:
package org.apache.storm.kinesis.spout;

import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;
import org.objenesis.strategy.StdInstantiatorStrategy;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.Serializable;
import java.util.Arrays;

public class KinesisConnectionInfo implements Serializable {
    private final byte[] serializedKinesisCredsProvider;
    private final byte[] serializedkinesisClientConfig;
    private final Integer recordsLimit;
    private final Regions region;

    private transient AWSCredentialsProvider credentialsProvider;
    private transient ClientConfiguration clientConfiguration;

    /**
     *
     * @param credentialsProvider implementation to provide credentials to connect to kinesis
     * @param clientConfiguration client configuration to pass to kinesis client
     * @param region region to connect to
     * @param recordsLimit max records to be fetched in a getRecords request to kinesis
     */
    public KinesisConnectionInfo (AWSCredentialsProvider credentialsProvider, ClientConfiguration clientConfiguration, Regions region, Integer recordsLimit) {
        if (recordsLimit == null || recordsLimit <= 0) {
            throw new IllegalArgumentException("recordsLimit has to be a positive integer");
        }
        if (region == null) {
            throw new IllegalArgumentException("region cannot be null");
        }
        serializedKinesisCredsProvider = getKryoSerializedBytes(credentialsProvider);
        serializedkinesisClientConfig = getKryoSerializedBytes(clientConfiguration);
        this.recordsLimit = recordsLimit;
        this.region = region;
    }

    public Integer getRecordsLimit() {
        return recordsLimit;
    }

    public AWSCredentialsProvider getCredentialsProvider() {
        if (credentialsProvider == null) {
            credentialsProvider = (AWSCredentialsProvider) this.getKryoDeserializedObject(serializedKinesisCredsProvider);
        }
        return credentialsProvider;
    }

    public ClientConfiguration getClientConfiguration() {
        if (clientConfiguration == null) {
            clientConfiguration = (ClientConfiguration) this.getKryoDeserializedObject(serializedkinesisClientConfig);
        }
        return clientConfiguration;
    }

    public Regions getRegion() {
        return region;
    }

    private byte[] getKryoSerializedBytes (final Object obj) {
        final Kryo kryo = new Kryo();
        final ByteArrayOutputStream os = new ByteArrayOutputStream();
        final Output output = new Output(os);
        kryo.setInstantiatorStrategy(new StdInstantiatorStrategy());
        kryo.writeClassAndObject(output, obj);
        output.flush();
        return os.toByteArray();
    }

    private Object getKryoDeserializedObject (final byte[] ser) {
        final Kryo kryo = new Kryo();
        final Input input = new Input(new ByteArrayInputStream(ser));
        kryo.setInstantiatorStrategy(new StdInstantiatorStrategy());
        return kryo.readClassAndObject(input);
    }

    @Override
    public String toString() {
        return "KinesisConnectionInfo{" +
                "serializedKinesisCredsProvider=" + Arrays.toString(serializedKinesisCredsProvider) +
                ", serializedkinesisClientConfig=" + Arrays.toString(serializedkinesisClientConfig) +
                ", region=" + region +
                ", recordsLimit=" + recordsLimit +
                '}';
    }
}


text:
**A horrifying slack-bot that you should probably never use (for a multitude of reasons!)**

![version](https://img.shields.io/badge/version-v0.2.5-blue.svg)

### How to use it
You'll need a bot user key for your slack workspace, and you'll need the bot's user ID

You'll also need an API key for _your_ user account because the channel management for the
bot are written so _incredibly_ not the way they should be done (but it was an interesting
exercise in working around limitations I suppose)

You'll also need the User ID of the User whose API key ends up in this program because they will
(probably) be an admin for the bot and control things like whitelisting and unwhitelisting and adding
the bot to channels via the `channels.invite` api endpoint. The workspace I wrote this app for doesn't
allow my account access to the `channels.kick` command so there's no ability for you to kick this
bot form a channel - you can just sort of, _silence_ it I guess. who knows.

#### Whitelist and admin files
You'll need to create a `whitelist.txt` file and an `admins.txt` file - put your user's ID in the
admins file and the channel id of the DMs channel in the whitelists file (at the very least)

### What is this for
Neko-chan is a lighthearted chat bot that also pulls images from the SFW collection at
[nekos.life](http://nekos.life/). _There are no easter eggs in this project to allow for
someone to get an NSFW image from the API unless they modify the source._ This bot has no
real purpose.

### Why does this exist
No good reason

### License
This bad boy is available to you all under an MIT license.
tl;dr - feel free do to whatever with this so long as you link to this project.

### This project caused me inexplicable pain and unrecoverable injury, who do I talk to?
email me at idontfeelsafe@computerscience.house and I'll promptly ignore you