text:
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("babylonjs"));
	else if(typeof define === 'function' && define.amd)
		define("babylonjs-procedural-textures", ["babylonjs"], factory);
	else if(typeof exports === 'object')
		exports["babylonjs-procedural-textures"] = factory(require("babylonjs"));
	else
		root["PROCEDURALTEXTURES"] = factory(root["BABYLON"]);
})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
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] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = 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;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./legacy/legacy-cloud.ts");
/******/ })
/************************************************************************/
/******/ ({

/***/ "../../node_modules/tslib/tslib.es6.js":
/*!***********************************************************!*\
  !*** D:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***!
  \***********************************************************/
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */

var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return extendStatics(d, b);
};

function __extends(d, b) {
    extendStatics(d, b);
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}

var __assign = function() {
    __assign = Object.assign || function __assign(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    }
    return __assign.apply(this, arguments);
}

function __rest(s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
            t[p[i]] = s[p[i]];
    return t;
}

function __decorate(decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
}

function __param(paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
}

function __metadata(metadataKey, metadataValue) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}

function __awaiter(thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
}

function __generator(thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
}

function __exportStar(m, exports) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}

function __values(o) {
    var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
    if (m) return m.call(o);
    return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
}

function __read(o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
}

function __spread() {
    for (var ar = [], i = 0; i < arguments.length; i++)
        ar = ar.concat(__read(arguments[i]));
    return ar;
}

function __await(v) {
    return this instanceof __await ? (this.v = v, this) : new __await(v);
}

function __asyncGenerator(thisArg, _arguments, generator) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var g = generator.apply(thisArg, _arguments || []), i, q = [];
    return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
    function fulfill(value) { resume("next", value); }
    function reject(value) { resume("throw", value); }
    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}

function __asyncDelegator(o) {
    var i, p;
    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}

function __asyncValues(o) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var m = o[Symbol.asyncIterator], i;
    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}

function __makeTemplateObject(cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};

function __importStar(mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result.default = mod;
    return result;
}

function __importDefault(mod) {
    return (mod && mod.__esModule) ? mod : { default: mod };
}

/***/ }),

/***/ "../../node_modules/webpack/buildin/global.js":
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

var g;

// This works in non-strict mode
g = (function() {
	return this;
})();

try {
	// This works if eval is allowed (see CSP)
	g = g || new Function("return this")();
} catch (e) {
	// This works if the window reference is available
	if (typeof window === "object") g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;

/***/ }),

/***/ "./cloud/cloudProceduralTexture.fragment.ts":
/*!**************************************************!*\
  !*** ./cloud/cloudProceduralTexture.fragment.ts ***!
  \**************************************************/
/*! exports provided: cloudProceduralTexturePixelShader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloudProceduralTexturePixelShader", function() { return cloudProceduralTexturePixelShader; });
/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);

var name = 'cloudProceduralTexturePixelShader';
var shader = "precision highp float;\nvarying vec2 vUV;\nuniform vec4 skyColor;\nuniform vec4 cloudColor;\nfloat rand(vec2 n) {\nreturn fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);\n}\nfloat noise(vec2 n) {\nconst vec2 d=vec2(0.0,1.0);\nvec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));\nreturn mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);\n}\nfloat fbm(vec2 n) {\nfloat total=0.0,amplitude=1.0;\nfor (int i=0; i<4; i++) {\ntotal+=noise(n)*amplitude;\nn+=n;\namplitude*=0.5;\n}\nreturn total;\n}\nvoid main() {\nvec2 p=vUV*12.0;\nvec4 c=mix(skyColor,cloudColor,fbm(p));\ngl_FragColor=c;\n}\n";
babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader;
/** @hidden */
var cloudProceduralTexturePixelShader = { name: name, shader: shader };

/***/ }),

/***/ "./cloud/cloudProceduralTexture.ts":
/*!*****************************************!*\
  !*** ./cloud/cloudProceduralTexture.ts ***!
  \*****************************************/
/*! exports provided: CloudProceduralTexture */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CloudProceduralTexture", function() { return CloudProceduralTexture; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _cloudProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cloudProceduralTexture.fragment */ "./cloud/cloudProceduralTexture.fragment.ts");

var CloudProceduralTexture = /** @class */ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CloudProceduralTexture, _super);
    function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
        var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
        _this._skyColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color4"](0.15, 0.68, 1.0, 1.0);
        _this._cloudColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color4"](1, 1, 1, 1.0);
        _this.updateShaderUniforms();
        return _this;
    }
    CloudProceduralTexture.prototype.updateShaderUniforms = function () {
        this.setColor4("skyColor", this._skyColor);
        this.setColor4("cloudColor", this._cloudColor);
    };
    Object.defineProperty(CloudProceduralTexture.prototype, "skyColor", {
        get: function () {
            return this._skyColor;
        },
        set: function (value) {
            this._skyColor = value;
            this.updateShaderUniforms();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CloudProceduralTexture.prototype, "cloudColor", {
        get: function () {
            return this._cloudColor;
        },
        set: function (value) {
            this._cloudColor = value;
            this.updateShaderUniforms();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Serializes this cloud procedural texture
     * @returns a serialized cloud procedural texture object
     */
    CloudProceduralTexture.prototype.serialize = function () {
        var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this, _super.prototype.serialize.call(this));
        serializationObject.customType = "BABYLON.CloudProceduralTexture";
        return serializationObject;
    };
    /**
     * Creates a Cloud Procedural Texture from parsed cloud procedural texture data
     * @param parsedTexture defines parsed texture data
     * @param scene defines the current scene
     * @param rootUrl defines the root URL containing cloud procedural texture information
     * @returns a parsed Cloud Procedural Texture
     */
    CloudProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
        var texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new CloudProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
        return texture;
    };
    tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
        Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor4"])()
    ], CloudProceduralTexture.prototype, "skyColor", null);
    tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
        Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor4"])()
    ], CloudProceduralTexture.prototype, "cloudColor", null);
    return CloudProceduralTexture;
}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["ProceduralTexture"]));

babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.CloudProceduralTexture"] = CloudProceduralTexture;

/***/ }),

/***/ "./cloud/index.ts":
/*!************************!*\
  !*** ./cloud/index.ts ***!
  \************************/
/*! exports provided: CloudProceduralTexture */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _cloudProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cloudProceduralTexture */ "./cloud/cloudProceduralTexture.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CloudProceduralTexture", function() { return _cloudProceduralTexture__WEBPACK_IMPORTED_MODULE_0__["CloudProceduralTexture"]; });

/***/ }),

/***/ "./legacy/legacy-cloud.ts":
/*!********************************!*\
  !*** ./legacy/legacy-cloud.ts ***!
  \********************************/
/*! exports provided: CloudProceduralTexture */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _cloud_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cloud/index */ "./cloud/index.ts");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CloudProceduralTexture", function() { return _cloud_index__WEBPACK_IMPORTED_MODULE_0__["CloudProceduralTexture"]; });

/**
 * This is the entry point for the UMD module.
 * The entry point for a future ESM package should be index.ts
 */
var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
if (typeof globalObject !== "undefined") {
    for (var key in _cloud_index__WEBPACK_IMPORTED_MODULE_0__) {
        globalObject.BABYLON[key] = _cloud_index__WEBPACK_IMPORTED_MODULE_0__[key];
    }
}

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))

/***/ }),

/***/ "babylonjs/Misc/decorators":
/*!****************************************************************************************************!*\
  !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
  \****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;

/***/ })

/******/ });
});
//# sourceMappingURL=babylon.cloudProceduralTexture.js.map


text:
package android.support.design.internal;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.design.C0006R;
import android.support.v4.view.GravityCompat;
import android.support.v7.widget.LinearLayoutCompat;
import android.support.v8.renderscript.ScriptIntrinsicBLAS;
import android.util.AttributeSet;
import android.view.Gravity;

public class ForegroundLinearLayout extends LinearLayoutCompat {
    private Drawable mForeground;
    boolean mForegroundBoundsChanged;
    private int mForegroundGravity;
    protected boolean mForegroundInPadding;
    private final Rect mOverlayBounds;
    private final Rect mSelfBounds;

    public ForegroundLinearLayout(Context context) {
        this(context, null);
    }

    public ForegroundLinearLayout(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public ForegroundLinearLayout(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        this.mSelfBounds = new Rect();
        this.mOverlayBounds = new Rect();
        this.mForegroundGravity = 119;
        this.mForegroundInPadding = true;
        this.mForegroundBoundsChanged = false;
        TypedArray a = context.obtainStyledAttributes(attrs, C0006R.styleable.ForegroundLinearLayout, defStyle, 0);
        this.mForegroundGravity = a.getInt(C0006R.styleable.ForegroundLinearLayout_android_foregroundGravity, this.mForegroundGravity);
        Drawable d = a.getDrawable(C0006R.styleable.ForegroundLinearLayout_android_foreground);
        if (d != null) {
            setForeground(d);
        }
        this.mForegroundInPadding = a.getBoolean(C0006R.styleable.ForegroundLinearLayout_foregroundInsidePadding, true);
        a.recycle();
    }

    public int getForegroundGravity() {
        return this.mForegroundGravity;
    }

    public void setForegroundGravity(int foregroundGravity) {
        if (this.mForegroundGravity != foregroundGravity) {
            if ((GravityCompat.RELATIVE_HORIZONTAL_GRAVITY_MASK & foregroundGravity) == 0) {
                foregroundGravity |= GravityCompat.START;
            }
            if ((foregroundGravity & ScriptIntrinsicBLAS.TRANSPOSE) == 0) {
                foregroundGravity |= 48;
            }
            this.mForegroundGravity = foregroundGravity;
            if (this.mForegroundGravity == 119 && this.mForeground != null) {
                this.mForeground.getPadding(new Rect());
            }
            requestLayout();
        }
    }

    protected boolean verifyDrawable(Drawable who) {
        return super.verifyDrawable(who) || who == this.mForeground;
    }

    public void jumpDrawablesToCurrentState() {
        super.jumpDrawablesToCurrentState();
        if (this.mForeground != null) {
            this.mForeground.jumpToCurrentState();
        }
    }

    protected void drawableStateChanged() {
        super.drawableStateChanged();
        if (this.mForeground != null && this.mForeground.isStateful()) {
            this.mForeground.setState(getDrawableState());
        }
    }

    public void setForeground(Drawable drawable) {
        if (this.mForeground != drawable) {
            if (this.mForeground != null) {
                this.mForeground.setCallback(null);
                unscheduleDrawable(this.mForeground);
            }
            this.mForeground = drawable;
            if (drawable != null) {
                setWillNotDraw(false);
                drawable.setCallback(this);
                if (drawable.isStateful()) {
                    drawable.setState(getDrawableState());
                }
                if (this.mForegroundGravity == 119) {
                    drawable.getPadding(new Rect());
                }
            } else {
                setWillNotDraw(true);
            }
            requestLayout();
            invalidate();
        }
    }

    public Drawable getForeground() {
        return this.mForeground;
    }

    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);
        this.mForegroundBoundsChanged |= changed;
    }

    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super.onSizeChanged(w, h, oldw, oldh);
        this.mForegroundBoundsChanged = true;
    }

    public void draw(Canvas canvas) {
        super.draw(canvas);
        if (this.mForeground != null) {
            Drawable foreground = this.mForeground;
            if (this.mForegroundBoundsChanged) {
                this.mForegroundBoundsChanged = false;
                Rect selfBounds = this.mSelfBounds;
                Rect overlayBounds = this.mOverlayBounds;
                int w = getRight() - getLeft();
                int h = getBottom() - getTop();
                if (this.mForegroundInPadding) {
                    selfBounds.set(0, 0, w, h);
                } else {
                    selfBounds.set(getPaddingLeft(), getPaddingTop(), w - getPaddingRight(), h - getPaddingBottom());
                }
                Gravity.apply(this.mForegroundGravity, foreground.getIntrinsicWidth(), foreground.getIntrinsicHeight(), selfBounds, overlayBounds);
                foreground.setBounds(overlayBounds);
            }
            foreground.draw(canvas);
        }
    }

    public void drawableHotspotChanged(float x, float y) {
        super.drawableHotspotChanged(x, y);
        if (this.mForeground != null) {
            this.mForeground.setHotspot(x, y);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
/*
 * This source file is part of the bstring string library.  This code was
 * written by Paul Hsieh in 2002-2015, and is covered by the BSD open source
 * license and the GPL. Refer to the accompanying documentation for details
 * on usage and license.
 */

/*
 * bstraux.h
 *
 * This file is not a necessary part of the core bstring library itself, but
 * is just an auxilliary module which includes miscellaneous or trivial
 * functions.
 */

#ifndef BSTRAUX_INCLUDE
#define BSTRAUX_INCLUDE

#include <time.h>
#include "bstrlib.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Safety mechanisms */
#define bstrDeclare(b)               bstring (b) = NULL;
#define bstrFree(b)                  {if ((b) != NULL && (b)->slen >= 0 && (b)->mlen >= (b)->slen) { bdestroy (b); (b) = NULL; }}

/* Backward compatibilty with previous versions of Bstrlib */
#if !defined(BSTRLIB_REDUCE_NAMESPACE_POLLUTION)
#define bAssign(a,b)                 ((bassign)((a), (b)))
#define bSubs(b,pos,len,a,c)         ((breplace)((b),(pos),(len),(a),(unsigned char)(c)))
#define bStrchr(b,c)                 ((bstrchr)((b), (c)))
#define bStrchrFast(b,c)             ((bstrchr)((b), (c)))
#define bCatCstr(b,s)                ((bcatcstr)((b), (s)))
#define bCatBlk(b,s,len)             ((bcatblk)((b),(s),(len)))
#define bCatStatic(b,s)              bcatStatic(b,s)
#define bTrunc(b,n)                  ((btrunc)((b), (n)))
#define bReplaceAll(b,find,repl,pos) ((bfindreplace)((b),(find),(repl),(pos)))
#define bUppercase(b)                ((btoupper)(b))
#define bLowercase(b)                ((btolower)(b))
#define bCaselessCmp(a,b)            ((bstricmp)((a), (b)))
#define bCaselessNCmp(a,b,n)         ((bstrnicmp)((a), (b), (n)))
#define bBase64Decode(b)             (bBase64DecodeEx ((b), NULL))
#define bUuDecode(b)                 (bUuDecodeEx ((b), NULL))
#endif

/* Unusual functions */
extern struct bStream * bsFromBstr (const_bstring b);
extern bstring bTail (bstring b, int n);
extern bstring bHead (bstring b, int n);
extern int bSetCstrChar (bstring a, int pos, char c);
extern int bSetChar (bstring b, int pos, char c);
extern int bFill (bstring a, char c, int len);
extern int bReplicate (bstring b, int n);
extern int bReverse (bstring b);
extern int bInsertChrs (bstring b, int pos, int len, unsigned char c, unsigned char fill);
extern bstring bStrfTime (const char * fmt, const struct tm * timeptr);
#define bAscTime(t) (bStrfTime ("%c\n", (t)))
#define bCTime(t)   ((t) ? bAscTime (localtime (t)) : NULL)

/* Spacing formatting */
extern int bJustifyLeft (bstring b, int space);
extern int bJustifyRight (bstring b, int width, int space);
extern int bJustifyMargin (bstring b, int width, int space);
extern int bJustifyCenter (bstring b, int width, int space);

/* Esoteric standards specific functions */
extern char * bStr2NetStr (const_bstring b);
extern bstring bNetStr2Bstr (const char * buf);
extern bstring bBase64Encode (const_bstring b);
extern bstring bBase64DecodeEx (const_bstring b, int * boolTruncError);
extern struct bStream * bsUuDecode (struct bStream * sInp, int * badlines);
extern bstring bUuDecodeEx (const_bstring src, int * badlines);
extern bstring bUuEncode (const_bstring src);
extern bstring bYEncode (const_bstring src);
extern bstring bYDecode (const_bstring src);

/* Writable stream */
typedef int (* bNwrite) (const void * buf, size_t elsize, size_t nelem, void * parm);

struct bwriteStream * bwsOpen (bNwrite writeFn, void * parm);
int bwsWriteBstr (struct bwriteStream * stream, const_bstring b);
int bwsWriteBlk (struct bwriteStream * stream, void * blk, int len);
int bwsWriteFlush (struct bwriteStream * stream);
int bwsIsEOF (const struct bwriteStream * stream);
int bwsBuffLength (struct bwriteStream * stream, int sz);
void * bwsClose (struct bwriteStream * stream);

/* Security functions */
#define bSecureDestroy(b) {                                             \
bstring bstr__tmp = (b);                                                \
    if (bstr__tmp && bstr__tmp->mlen > 0 && bstr__tmp->data) {          \
        (void) memset (bstr__tmp->data, 0, (size_t) bstr__tmp->mlen);   \
        bdestroy (bstr__tmp);                                           \
    }                                                                   \
}
#define bSecureWriteProtect(t) {                                                  \
    if ((t).mlen >= 0) {                                                          \
        if ((t).mlen > (t).slen)) {                                               \
            (void) memset ((t).data + (t).slen, 0, (size_t) (t).mlen - (t).slen); \
        }                                                                         \
        (t).mlen = -1;                                                            \
    }                                                                             \
}
extern bstring bSecureInput (int maxlen, int termchar,
                             bNgetc vgetchar, void * vgcCtx);

#ifdef __cplusplus
}
#endif

#endif


text:
using namespace std;

int main(int argc, char *argv[])
{
	chip8 emulator;
	emulator.run();
	return 0;
}


text:
import os
import tempfile
from os.path import abspath, dirname, join, normcase, sep

from django.core.exceptions import SuspiciousFileOperation
from django.utils.encoding import force_text

# For backwards-compatibility in Django 2.0
abspathu = abspath

def upath(path):
    """Always return a unicode path (did something for Python 2)."""
    return path

def npath(path):
    """
    Always return a native path, that is unicode on Python 3 and bytestring on
    Python 2. Noop for Python 3.
    """
    return path

def safe_join(base, *paths):
    """
    Joins one or more path components to the base path component intelligently.
    Returns a normalized, absolute version of the final path.

    The final path must be located inside of the base path component (otherwise
    a ValueError is raised).
    """
    base = force_text(base)
    paths = [force_text(p) for p in paths]
    final_path = abspath(join(base, *paths))
    base_path = abspath(base)
    # Ensure final_path starts with base_path (using normcase to ensure we
    # don't false-negative on case insensitive operating systems like Windows),
    # further, one of the following conditions must be true:
    #  a) The next character is the path separator (to prevent conditions like
    #     safe_join("/dir", "/../d"))
    #  b) The final path must be the same as the base path.
    #  c) The base path must be the most root path (meaning either "/" or "C:\\")
    if (not normcase(final_path).startswith(normcase(base_path + sep)) and
            normcase(final_path) != normcase(base_path) and
            dirname(normcase(base_path)) != normcase(base_path)):
        raise SuspiciousFileOperation(
            'The joined path ({}) is located outside of the base path '
            'component ({})'.format(final_path, base_path))
    return final_path

def symlinks_supported():
    """
    A function to check if creating symlinks are supported in the
    host platform and/or if they are allowed to be created (e.g.
    on Windows it requires admin permissions).
    """
    tmpdir = tempfile.mkdtemp()
    original_path = os.path.join(tmpdir, 'original')
    symlink_path = os.path.join(tmpdir, 'symlink')
    os.makedirs(original_path)
    try:
        os.symlink(original_path, symlink_path)
        supported = True
    except (OSError, NotImplementedError, AttributeError):
        supported = False
    else:
        os.remove(symlink_path)
    finally:
        os.rmdir(original_path)
        os.rmdir(tmpdir)
        return supported


text:
namespace NorthwindWindowsStore.Utils
{
    using Newtonsoft.Json;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net.Http;
    using System.Net.Http.Headers;
    using System.Reflection;
    using System.Threading.Tasks;

    public static class ContentManager
    {
        public static async Task<List<O>> GetContent<I, O>(String webPath)
            where I : class, new()
            where O : class, new()
        {
            List<O> output = new List<O>();
            using (var client = new HttpClient())
            {
                client.BaseAddress = new Uri("http://localhost:36764/");
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

                var result = await client.GetStreamAsync(webPath).ConfigureAwait(continueOnCapturedContext: false);

                HttpResponseMessage response = await client.GetAsync(webPath);
                if (response.IsSuccessStatusCode)
                {
                    var json = response.Content.ReadAsStringAsync().Result;
                    List<I> serviceVM = JsonConvert.DeserializeObject<List<I>>(json);
                    ConstructorInfo ci = null;
                    var info = typeof(O).GetTypeInfo();
                    foreach (var ctor in info.DeclaredConstructors)
                    {
                        if (ctor.GetParameters().Count() > 0)
                        {
                            if (ctor.GetParameters()[0].ParameterType.Name.Equals(typeof(I).Name))
                            {
                                ci = ctor;
                            }
                        }
                    }
                    foreach (var item in serviceVM)
                    {
                        if (item != null)
                        {
                            O obj = ci.Invoke(new object[] { item }) as O;
                            if (obj != null)
                            {
                                output.Add(obj);
                            }
                        }
                    }
                }
            }
            return output;
        }
    }
}


text: dconf dump /com/gexperts/Tilix/ > tilix.dconf


text:
package gr.uoi.cs.daintiness.hecate.differencedetection;

import gr.uoi.cs.daintiness.hecate.metrics.tables.ChangeType;
import gr.uoi.cs.daintiness.hecate.sql.Attribute;
import gr.uoi.cs.daintiness.hecate.sql.Schema;
import gr.uoi.cs.daintiness.hecate.sql.SqlItem;
import gr.uoi.cs.daintiness.hecate.sql.Table;
import gr.uoi.cs.daintiness.hecate.transitions.Deletion;
import gr.uoi.cs.daintiness.hecate.transitions.Insersion;
import gr.uoi.cs.daintiness.hecate.transitions.Update;

import java.util.ArrayList;
import java.util.Iterator;

import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader.Array;

/**
 * This class is responsible for performing the diff algorithm between two SQL
 * schemas. It then stores some metrics about the performed diff.
 *
 * @author giskou
 *
 */
public class DifferencesAlgorithmSkoulis implements DifferencesAlgorithm {

	// refactoring customizations the idea is to put them global so we can
	// refactor
	private String oldTableKey = null, newTableKey = null;
	private String oldAttrKey = null, newAttrKey = null;
	private SchemataDifferencesHelper differencesHelper;
	private final String insertAction = "insert";
	private final String deleteAction = "delete";
	private Table oldTable;
	private Table newTable;
	public Insersion in;
	public Deletion out;
	public Update up;

	public Iterator<String> oldAttributeKeys;
	public Iterator<Attribute> oldAttributeValues;

	public Iterator<String> newAttributeKeys;
	public Iterator<Attribute> newAttributeValues;

	public Iterator<String> oldTableKeys;
	public Iterator<Table> oldTableValues;
	public Iterator<String> newTableKeys;
	public Iterator<Table> newTableValues;
	public DifferencesResult results;

	@Override
	public DifferencesResult getDifferencesBetweenTwoSchemata(Schema schemaA, Schema schemaB) {

		setUp(schemaA, schemaB);

		if (oldTableKeys.hasNext() && newTableKeys.hasNext()) {
			moveTableKeyIterators();
			moveTableValueIterators();
			while (true) {
				in = null;
				out = null;
				up = null;
				if (oldTableKey.compareTo(newTableKey) == 0) { // ** Matched
																// tables
					match(oldTable, newTable);

					findSameTablesDifferences(oldTable, newTable);

					if (oldTableKeys.hasNext() && newTableKeys.hasNext()) { // move
																			// both
																			// tables
						moveTableKeyIterators();
						moveTableValueIterators();
						continue;
					} else { // one list is empty
						break;
					}
				} else if (oldTableKey.compareTo(newTableKey) < 0) { // ** Table
																		// Deleted
					deleteTable(oldTable);
					if (oldTableKeys.hasNext()) { // move old only
						oldTableKey = oldTableKeys.next();
						oldTable = (Table) oldTableValues.next();
						continue;
					} else {
						insertTable(newTable);
						break;
					}
				} else { // ** Table Inserted
					insertTable(newTable);
					if (newTableKeys.hasNext()) { // move new only
						newTableKey = newTableKeys.next();
						newTable = (Table) newTableValues.next();
						continue;
					} else {
						deleteTable(oldTable);
						break;
					}
				}
			}
		}

		checkRemainingTableKeys(oldTableKeys, oldTableValues, "delete");
		checkRemainingTableKeys(newTableKeys, newTableValues, "insert");

		return results;
	}

	private void moveTableValueIterators() {
		oldTable = (Table) oldTableValues.next();
		newTable = (Table) newTableValues.next();
	}

	private void moveTableKeyIterators() {
		oldTableKey = oldTableKeys.next();
		newTableKey = newTableKeys.next();
	}

	/**
	 * @param oldTable
	 * @param newTable
	 */
	public void findSameTablesDifferences(Table oldTable, Table newTable) {
		initializeAttributesKeys(oldTable, newTable);

		initializeAttributesValues(oldTable, newTable);

		computeAttributesDifferences(oldTable, newTable);
		// check remaining attributes
		while (oldAttributeKeys.hasNext()) { // delete remaining old (not found
												// in new)

			updateAttributesInList(newTable, oldAttributeKeys, oldAttributeValues, deleteAction);
		}
		while (newAttributeKeys.hasNext()) { // insert remaining new (not found
												// in old)
			// updateAttributesInList(oldTable);
			updateAttributesInList(oldTable, newAttributeKeys, newAttributeValues, insertAction);

		}
		// ** Done with attributes **
		if (newTable.getMode() == SqlItem.UPDATED) {
			alterTable(newTable);
		}
	}

	/**
	 * @param oldTable
	 * @param newTable
	 */
	private void computeAttributesDifferences(Table oldTable, Table newTable) {
		String oldAttrKey;
		String newAttrKey;
		if (oldAttributeKeys.hasNext() && newAttributeKeys.hasNext()) {
			oldAttrKey = oldAttributeKeys.next();
			Attribute oldAttr = oldAttributeValues.next();
			newAttrKey = newAttributeKeys.next();
			Attribute newAttr = newAttributeValues.next();
			while (true) {

				if (oldAttrKey.compareTo(newAttrKey) == 0) { // possible
																// attribute
																// match
					if (oldAttr.getType().compareTo(newAttr.getType()) == 0) { // check
																				// attribute
																				// type
						if (oldAttr.isKey() == newAttr.isKey()) { // ** Matched
																	// attributes
							match(oldAttr, newAttr);
						} else { // * attribute key changed
							attributeKeyChange(oldAttr, newAttr);
						}
					} else { // attribute type changed
						attributeTypeChange(oldAttr, newAttr);
					}
					// move both attributes
					if (oldAttributeKeys.hasNext() && newAttributeKeys.hasNext()) {
						oldAttrKey = oldAttributeKeys.next();
						oldAttr = oldAttributeValues.next();
						newAttrKey = newAttributeKeys.next();
						newAttr = newAttributeValues.next();
						continue;
					} else { // one of the lists is empty, must process the rest
								// of the other
						break;
					}
				} else if (oldAttrKey.compareTo(newAttrKey) < 0) { // ** Deleted
																	// attributes
					attributeDelete(newTable, oldAttr);
					// move old only attributes
					if (oldAttributeKeys.hasNext()) {
						oldAttrKey = oldAttributeKeys.next();
						oldAttr = oldAttributeValues.next();
						continue;
					} else { // no more old
						attributeInsert(oldTable, newAttr);
						break;
					}
				} else { // ** Inserted attributes
					attributeInsert(oldTable, newAttr);
					// move new only
					if (newAttributeKeys.hasNext()) {
						newAttrKey = newAttributeKeys.next();
						newAttr = newAttributeValues.next();
						continue;
					} else { // no more new
						attributeDelete(newTable, oldAttr);
						break;
					}
				}

			}

		}
	}

	public void setUp(Schema schemaA, Schema schemaB) {
		results = new DifferencesResult();

		results.myMetrics.newRevision();
		results.setVersionNames(schemaA.getName(), schemaB.getName());
		oldTableKeys = schemaA.getTables().keySet().iterator();
		oldTableValues = schemaA.getTables().values().iterator();
		newTableKeys = schemaB.getTables().keySet().iterator();
		newTableValues = schemaB.getTables().values().iterator();
		setOriginalSizes(schemaA.getSize(), schemaB.getSize());

	}

	public void checkRemainingTableKeys(Iterator<String> tableKeys, Iterator<Table> tableValues, String action) {
		String tableKey;
		while (tableKeys.hasNext()) {
			tableKey = (String) tableKeys.next();
			Table table = (Table) tableValues.next();
			if (action.equals(insertAction)) {
				insertTable(table);
			} else if (action.equals(deleteAction)) {
				deleteTable(table);
			}
		}
	}

	public void updateAttributesInList(Table table, Iterator<String> attributeKeys, Iterator<Attribute> attributeValues,
			String action) {
		String attrKey;
		attrKey = (String) attributeKeys.next();
		Attribute attr = attributeValues.next();
		if (action.equals("insert"))
			attributeInsert(table, attr);
		else if (action.equals("delete"))
			attributeDelete(table, attr);
	}

	public void initializeAttributesValues(Table oldTable, Table newTable) {
		oldAttributeValues = oldTable.getAttrs().values().iterator();
		newAttributeValues = newTable.getAttrs().values().iterator();
	}

	public void initializeAttributesKeys(Table oldTable, Table newTable) {
		oldAttributeKeys = oldTable.getAttrs().keySet().iterator();
		newAttributeKeys = newTable.getAttrs().keySet().iterator();
	}

	public void attributeInsert(Table oldTable, Attribute newAttr) {
		results.myMetrics.insertAttr();
		insertItemInList(newAttr);
		newAttr.setMode(SqlItem.INSERTED);
		oldTable.setMode(SqlItem.UPDATED);
		newAttr.getTable().setMode(SqlItem.UPDATED);
		results.tablesInfo.addChange(oldTable.getName(), results.myMetrics.getNumRevisions(), ChangeType.Insertion);
	}

	public void attributeDelete(Table newTable, Attribute oldAttr) {
		results.myMetrics.deleteAttr();
		deleteItem(oldAttr);
		oldAttr.setMode(SqlItem.DELETED);
		oldAttr.getTable().setMode(SqlItem.UPDATED);
		newTable.setMode(SqlItem.UPDATED);
		results.tablesInfo.addChange(newTable.getName(), results.myMetrics.getNumRevisions(), ChangeType.Deletion);
	}

	public void attributeTypeChange(Attribute oldAttr, Attribute newAttr) {
		results.myMetrics.alterAttr();
		updateAttribute(newAttr, "TypeChange");
		oldAttr.getTable().setMode(SqlItem.UPDATED);
		newAttr.getTable().setMode(SqlItem.UPDATED);
		oldAttr.setMode(SqlItem.UPDATED);
		newAttr.setMode(SqlItem.UPDATED);
		results.tablesInfo.addChange(newAttr.getTable().getName(), results.myMetrics.getNumRevisions(),
				ChangeType.AttrTypeChange);
	}

	public void attributeKeyChange(Attribute oldAttr, Attribute newAttr) {
		results.myMetrics.alterKey();
		updateAttribute(newAttr, "KeyChange");
		oldAttr.getTable().setMode(SqlItem.UPDATED);
		newAttr.getTable().setMode(SqlItem.UPDATED);
		oldAttr.setMode(SqlItem.UPDATED);
		newAttr.setMode(SqlItem.UPDATED);
		results.tablesInfo.addChange(newAttr.getTable().getName(), results.myMetrics.getNumRevisions(),
				ChangeType.KeyChange);
	}

	public void deleteTable(Table t) {
		deleteItem(t);
		results.myMetrics.deleteTable();
		markAll(t, SqlItem.DELETED); // mark attributes deleted
	}

	public void insertTable(Table t) {
		insertItemInList(t);
		results.myMetrics.insetTable();
		markAll(t, SqlItem.INSERTED); // mark attributes inserted
	}

	public void alterTable(Table t) {
		results.myMetrics.alterTable();
	}

	public void match(SqlItem oldI, SqlItem newI) {
		oldI.setMode(SqlItem.MACHED);
		newI.setMode(SqlItem.MACHED);
	}

	public void markAll(Table t, int mode) {
		t.setMode(mode);
		for (Iterator<Attribute> i = t.getAttrs().values().iterator(); i.hasNext();) {
			i.next().setMode(mode);
			switch (mode) {
			case SqlItem.INSERTED:
				results.myMetrics.insertTabAttr();
				break;
			case SqlItem.DELETED:
				results.myMetrics.deleteTabAttr();
				break;
			default:
				;
			}
		}
	}

	public void insertItemInList(SqlItem item) {
		if (item.getClass() == Attribute.class) {
			if (in == null) {
				in = new Insersion();
				results.myTransformationList.add(in);
			}
			try {
				in.attribute((Attribute) item);
			} catch (Exception e) {
				e.printStackTrace();
			}
		} else if (item.getClass() == Table.class) {
			in = new Insersion();
			results.myTransformationList.add(in);
			in.table((Table) item);
		}
	}

	public void deleteItem(SqlItem item) {
		if (item.getClass() == Attribute.class) {
			if (out == null) {
				out = new Deletion();
				results.myTransformationList.add(out);
			}
			try {
				out.attribute((Attribute) item);
			} catch (Exception e) {
				e.printStackTrace();
			}
		} else if (item.getClass() == Table.class) {
			out = new Deletion();
			results.myTransformationList.add(out);
			out.table((Table) item);
		}
	}

	public void updateAttribute(Attribute item, String type) {
		if (up == null) {
			up = new Update();
			results.myTransformationList.add(up);
		}
		try {
			up.updateAttribute((Attribute) item, type);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void setOriginalSizes(int[] sizeA, int[] sizeB) {
		results.myMetrics.setOrigTables(sizeA[0]);
		results.myMetrics.setOrigAttrs(sizeA[1]);
		results.myMetrics.setNewTables(sizeB[0]);
		results.myMetrics.setNewAttrs(sizeB[1]);
	}
}


text:
"""
-----------------------------------------------------------------------------
    SublimeText 3 Google Chrome's Tab refresher scripted plugin - 1st part
-----------------------------------------------------------------------------

by Ivano Ras (ivano.ras@gmail.com)

MIT License

"""

import sublime, sublime_plugin
import subprocess, os

# Python 3.3 class
class ChromeTabRefresher (sublime_plugin.EventListener):

	def displayNotification (self, msg):
		cmd = '/usr/local/bin/growlnotify -a "Sublime Text 3" -t "Chrome Tab Refreshing" -m "'+msg+'"'
		subprocess.call (cmd, shell=True)

	def delegateChromeTabRefresh (self):
		cmd = 'python ~/Desktop/system_scripts/chrometabrefresherST3.py'
		subprocess.call (cmd, shell=True)

	def on_post_save (self, view):
		# you can shut up this visual notification by commenting out the 2 lines below.
		#filename = os.path.basename (view.file_name())
		#self.displayNotification (filename)

		# this is the bit that calls the external standalone script which handles the Chrome's remote debugging functionality.
		self.delegateChromeTabRefresh ()


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>tau</groupId>
    <artifactId>ubongo-root</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <jdk.version>1.8</jdk.version>
        <log4j.version>2.5</log4j.version>
    </properties>

    <modules>
        <module>infra</module>
        <module>web-service</module>
        <module>server</module>
        <module>machine</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${log4j.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>


text:
require 'spec_helper'

describe GitWakaTime::Cli do
  before do
    ENV['waka_log'] = 'true'
    stub_request(:get, /wakatime\.com/)
      .with(query: hash_including(:date))
      .to_return(body: File.read('./spec/fixtures/heartbeats.json'), status: 200)

    expect(YAML).to receive(:load_file).with(File.expand_path('~/.wakatime.yml')).and_return(YAML.load_file('./spec/fixtures/wakatime.yml'))
  end

  after do
    ENV['waka_log'] = 'false'
  end

  it 'should be able to be called' do
    ARGV.replace %w(tally --start_on 2012-01-01 --file) << @wdir.to_s
    expect { GitWakaTime::Cli.start }.to output.to_stdout
    # puts GitWakaTime::Cli.start('tally', "--file #{@wdir.to_s}")
  end
end


text:
/**
 * Select Component
 * @author heifade
 */

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import styles from './Select.css';

export default class OptGroup extends PureComponent {
  static displayName = 'Option';

  static defaultProps = {
    children: null,
    label: '',
  };
  // https://facebook.github.io/react/docs/typechecking-with-proptypes.html
  static propTypes = {
    children: PropTypes.arrayOf(PropTypes.element),
    label: PropTypes.string,
  };

  render() {
    const { children, label } = this.props;
    return (

{label}

          {children}

    );
  }
}


text:
package ds.framework.v4.app.dsabar.data;

import android.view.MenuItem;
import ds.framework.v4.app.DSActivity;
import ds.framework.v4.data.DbEntryFilter;

public class ActionBarFilter extends DbEntryFilter {

	private static final long serialVersionUID = 3987733000333968581L;

	private int mBarItemId;
	private int mBarIconRes;
	private String mOverflowTitle;

	public ActionBarFilter(int id, int iconRes, String title,
			String filterBy, String filtered, FilterItem[] extraItems) {
		super(filterBy, filtered, extraItems);

		mBarItemId = id;
		mBarIconRes = iconRes;
		mOverflowTitle = title;
	}

	public ActionBarFilter(int id, int iconRes, String title,
			String filterBy, String filtered,
			String titleColumn, String orderColumn,
			FilterItem[] extraItems) {
		super(filterBy, filtered, titleColumn, orderColumn, extraItems);

		mBarItemId = id;
		mBarIconRes = iconRes;
		mOverflowTitle = title;
	}

	/**
	 *
	 * @return
	 */
	public int getId() {
		return mBarItemId;
	}

	/**
	 * put the filter on the bar/overflow menu<br/>
	 * !note: position is only taken into account if the filter is not already on the bar
	 *
	 * @param activity
	 * @param position
	 */
	public void show(DSActivity activity, Integer position) {
		final MenuItem item = activity.findMenuItem(mBarItemId);
		if (item != null) {

			// already added - just turn it visible
			item.setVisible(true);
			return;
		}
		activity.addMenuItem(mBarItemId, mOverflowTitle, mBarIconRes, position, true);
	}

	/**
	 * hide the menu item for the filter
	 *
	 * @param activity
	 */
	public void hide(DSActivity activity) {
		final MenuItem item = activity.findMenuItem(mBarItemId);
		if (item != null) {
			item.setVisible(false);
			return;
		}
	}

	/**
	 * remove the filter for good
	 *
	 * @param activity
	 */
	public void remove(DSActivity activity) {
		activity.removeMenuItem(mBarItemId);
	}

	/**
	 *
	 * @param activity
	 * @return
	 */
	public boolean isShown(DSActivity activity) {
		final MenuItem item = activity.findMenuItem(mBarItemId);
		return item != null && item.isVisible();
	}
}


text:
<title>Zend Gdata API Documentation</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="css/jquery-ui.css" type="text/css"></link><link rel="stylesheet" href="css/docblox/jquery-ui-1.8.16.custom.css" type="text/css"></link><link rel="stylesheet" href="css/jquery.treeview.css" type="text/css"></link><link rel="stylesheet" href="css/theme.css" type="text/css"></link>

API Documentation

Zend/Gdata/Calendar/Extension/Hidden.php

              Show:
              inherited

                          Classes

\Zend_Gdata_Calendar_Extension_Hidden

              Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.

Category

Zend

Copyright

Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

License

New BSD License

Package

Zend_Gdata

Subpackage

Calendar

Version

$Id: Hidden.php 24593 2012-01-05 20:35:02Z matthew $

\Zend_Gdata_Calendar_Extension_Hidden
jump to top

Package: Zend\Gdata\Calendar
Represents the gCal:hidden element used by the Calendar data API

Parent(s)

\Zend_Gdata_Extension
            <
            \Zend_Gdata_App_Extension
            <
            \Zend_Gdata_App_Base

Category

Zend

Copyright

Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

License

New BSD License

Properties

                 $_rootElement= ''hidden''

Default value'hidden'Details

Type

                 $_rootNamespace= ''gCal''

Default value'gCal'Details

Type

                 $_value= 'null'

Default valuenullDetails

Type

Methods

__construct(
          bool $value
              =
              null
          )

        :
          void

Constructs a new Zend_Gdata_Calendar_Extension_Hidden object.

Parameters

Name
Type
Description

$value
bool

(optional) The value of the element.

__toString(

          )

        :
          void

Magic toString method allows using this directly via echo
Works best in PHP >= 4.2.0

getDOM(
          \DOMDocument $doc
              =
              null,  $majorVersion
              =
              1,  $minorVersion
              =
              null
          )

        :
          \DOMElement

Retrieves a DOMElement which corresponds to this element and all
child properties.  This is used to build an entry back into a DOM
and eventually XML text for sending to the server upon updates, or
for application storage/persistence.

Parameters

Name
Type
Description

$doc
\DOMDocument

The DOMDocument used to construct DOMElements

$majorVersion

$minorVersion

Returns

Type
Description

\DOMElement
The DOMElement representing this element and all child properties.

getValue(

          )

        :
          string

Get the value for this element's value attribute.

Returns

Type
Description

string
The requested attribute.

setValue(
          bool $value
          )

        :
          \Zend_Gdata_Calendar_Extension_Hidden

Set the value for this element's value attribute.

Parameters

Name
Type
Description

$value
bool

The desired value for this attribute.

Returns

Type
Description

\Zend_Gdata_Calendar_Extension_Hidden
The element being modified.

takeAttributeFromDOM(
          \DOMNode $attribute
          )

        :
          void

Given a DOMNode representing an attribute, tries to map the data into
instance members.  If no mapping is defined, the name and value are
stored in an array.

Parameters

Name
Type
Description

$attribute
\DOMNode

The DOMNode attribute needed to be handled

Documentation was generated by DocBlox 0.15.1.


text:
require 'fantasyhub'

module Fantasyhub::Events;end

Gem.find_files("fantasyhub/events/*_event.rb").each { |path| require path }


text:
using chromeos::CellularScanResult;
using chromeos::network_util::NetmaskToPrefixLength;
using chromeos::network_util::PrefixLengthToNetmask;
using chromeos::network_util::ParseCellularScanResults;

typedef testing::Test NetworkUtilTest;

TEST_F(NetworkUtilTest, NetmaskToPrefixLength) {
  // Valid netmasks
  EXPECT_EQ(32, NetmaskToPrefixLength("255.255.255.255"));
  EXPECT_EQ(31, NetmaskToPrefixLength("255.255.255.254"));
  EXPECT_EQ(30, NetmaskToPrefixLength("255.255.255.252"));
  EXPECT_EQ(29, NetmaskToPrefixLength("255.255.255.248"));
  EXPECT_EQ(28, NetmaskToPrefixLength("255.255.255.240"));
  EXPECT_EQ(27, NetmaskToPrefixLength("255.255.255.224"));
  EXPECT_EQ(26, NetmaskToPrefixLength("255.255.255.192"));
  EXPECT_EQ(25, NetmaskToPrefixLength("255.255.255.128"));
  EXPECT_EQ(24, NetmaskToPrefixLength("255.255.255.0"));
  EXPECT_EQ(23, NetmaskToPrefixLength("255.255.254.0"));
  EXPECT_EQ(22, NetmaskToPrefixLength("255.255.252.0"));
  EXPECT_EQ(21, NetmaskToPrefixLength("255.255.248.0"));
  EXPECT_EQ(20, NetmaskToPrefixLength("255.255.240.0"));
  EXPECT_EQ(19, NetmaskToPrefixLength("255.255.224.0"));
  EXPECT_EQ(18, NetmaskToPrefixLength("255.255.192.0"));
  EXPECT_EQ(17, NetmaskToPrefixLength("255.255.128.0"));
  EXPECT_EQ(16, NetmaskToPrefixLength("255.255.0.0"));
  EXPECT_EQ(15, NetmaskToPrefixLength("255.254.0.0"));
  EXPECT_EQ(14, NetmaskToPrefixLength("255.252.0.0"));
  EXPECT_EQ(13, NetmaskToPrefixLength("255.248.0.0"));
  EXPECT_EQ(12, NetmaskToPrefixLength("255.240.0.0"));
  EXPECT_EQ(11, NetmaskToPrefixLength("255.224.0.0"));
  EXPECT_EQ(10, NetmaskToPrefixLength("255.192.0.0"));
  EXPECT_EQ(9, NetmaskToPrefixLength("255.128.0.0"));
  EXPECT_EQ(8, NetmaskToPrefixLength("255.0.0.0"));
  EXPECT_EQ(7, NetmaskToPrefixLength("254.0.0.0"));
  EXPECT_EQ(6, NetmaskToPrefixLength("252.0.0.0"));
  EXPECT_EQ(5, NetmaskToPrefixLength("248.0.0.0"));
  EXPECT_EQ(4, NetmaskToPrefixLength("240.0.0.0"));
  EXPECT_EQ(3, NetmaskToPrefixLength("224.0.0.0"));
  EXPECT_EQ(2, NetmaskToPrefixLength("192.0.0.0"));
  EXPECT_EQ(1, NetmaskToPrefixLength("128.0.0.0"));
  EXPECT_EQ(0, NetmaskToPrefixLength("0.0.0.0"));
  // Invalid netmasks
  EXPECT_EQ(-1, NetmaskToPrefixLength("255.255.255"));
  EXPECT_EQ(-1, NetmaskToPrefixLength("255.255.255.255.255"));
  EXPECT_EQ(-1, NetmaskToPrefixLength("255.255.255.255.0"));
  EXPECT_EQ(-1, NetmaskToPrefixLength("255.255.255.256"));
  EXPECT_EQ(-1, NetmaskToPrefixLength("255.255.255.1"));
  EXPECT_EQ(-1, NetmaskToPrefixLength("255.255.240.255"));
  EXPECT_EQ(-1, NetmaskToPrefixLength("255.0.0.255"));
  EXPECT_EQ(-1, NetmaskToPrefixLength("255.255.255.FF"));
  EXPECT_EQ(-1, NetmaskToPrefixLength("255,255,255,255"));
  EXPECT_EQ(-1, NetmaskToPrefixLength("255 255 255 255"));
}

TEST_F(NetworkUtilTest, PrefixLengthToNetmask) {
  // Valid Prefix Lengths
  EXPECT_EQ("255.255.255.255", PrefixLengthToNetmask(32));
  EXPECT_EQ("255.255.255.254", PrefixLengthToNetmask(31));
  EXPECT_EQ("255.255.255.252", PrefixLengthToNetmask(30));
  EXPECT_EQ("255.255.255.248", PrefixLengthToNetmask(29));
  EXPECT_EQ("255.255.255.240", PrefixLengthToNetmask(28));
  EXPECT_EQ("255.255.255.224", PrefixLengthToNetmask(27));
  EXPECT_EQ("255.255.255.192", PrefixLengthToNetmask(26));
  EXPECT_EQ("255.255.255.128", PrefixLengthToNetmask(25));
  EXPECT_EQ("255.255.255.0", PrefixLengthToNetmask(24));
  EXPECT_EQ("255.255.254.0", PrefixLengthToNetmask(23));
  EXPECT_EQ("255.255.252.0", PrefixLengthToNetmask(22));
  EXPECT_EQ("255.255.248.0", PrefixLengthToNetmask(21));
  EXPECT_EQ("255.255.240.0", PrefixLengthToNetmask(20));
  EXPECT_EQ("255.255.224.0", PrefixLengthToNetmask(19));
  EXPECT_EQ("255.255.192.0", PrefixLengthToNetmask(18));
  EXPECT_EQ("255.255.128.0", PrefixLengthToNetmask(17));
  EXPECT_EQ("255.255.0.0", PrefixLengthToNetmask(16));
  EXPECT_EQ("255.254.0.0", PrefixLengthToNetmask(15));
  EXPECT_EQ("255.252.0.0", PrefixLengthToNetmask(14));
  EXPECT_EQ("255.248.0.0", PrefixLengthToNetmask(13));
  EXPECT_EQ("255.240.0.0", PrefixLengthToNetmask(12));
  EXPECT_EQ("255.224.0.0", PrefixLengthToNetmask(11));
  EXPECT_EQ("255.192.0.0", PrefixLengthToNetmask(10));
  EXPECT_EQ("255.128.0.0", PrefixLengthToNetmask(9));
  EXPECT_EQ("255.0.0.0", PrefixLengthToNetmask(8));
  EXPECT_EQ("254.0.0.0", PrefixLengthToNetmask(7));
  EXPECT_EQ("252.0.0.0", PrefixLengthToNetmask(6));
  EXPECT_EQ("248.0.0.0", PrefixLengthToNetmask(5));
  EXPECT_EQ("240.0.0.0", PrefixLengthToNetmask(4));
  EXPECT_EQ("224.0.0.0", PrefixLengthToNetmask(3));
  EXPECT_EQ("192.0.0.0", PrefixLengthToNetmask(2));
  EXPECT_EQ("128.0.0.0", PrefixLengthToNetmask(1));
  EXPECT_EQ("0.0.0.0", PrefixLengthToNetmask(0));
  // Invalid Prefix Lengths
  EXPECT_EQ("", PrefixLengthToNetmask(-1));
  EXPECT_EQ("", PrefixLengthToNetmask(33));
  EXPECT_EQ("", PrefixLengthToNetmask(255));
}

TEST_F(NetworkUtilTest, ParseScanResults) {
  base::ListValue list;
  std::vector<CellularScanResult> scan_results;

  // Empty list value.
  EXPECT_TRUE(ParseCellularScanResults(list, &scan_results));

  // List contains invalid item.
  list.Append(0);
  EXPECT_FALSE(ParseCellularScanResults(list, &scan_results));

  // Scan result has no network id.
  list.ClearList();
  auto dict_value = std::make_unique<base::DictionaryValue>();
  dict_value->SetString(shill::kStatusProperty, "available");
  list.Append(std::move(dict_value));
  EXPECT_TRUE(ParseCellularScanResults(list, &scan_results));
  EXPECT_TRUE(scan_results.empty());

  // Mixed parse results.
  dict_value = std::make_unique<base::DictionaryValue>();
  dict_value->SetString(shill::kNetworkIdProperty, "000001");
  dict_value->SetString(shill::kStatusProperty, "unknown");
  dict_value->SetString(shill::kTechnologyProperty, "GSM");
  list.Append(std::move(dict_value));

  dict_value = std::make_unique<base::DictionaryValue>();
  dict_value->SetString(shill::kNetworkIdProperty, "000002");
  dict_value->SetString(shill::kStatusProperty, "available");
  dict_value->SetString(shill::kLongNameProperty, "Long Name");
  list.Append(std::move(dict_value));

  EXPECT_TRUE(ParseCellularScanResults(list, &scan_results));
  EXPECT_EQ(static_cast<size_t>(2), scan_results.size());
  EXPECT_EQ("000001", scan_results[0].network_id);
  EXPECT_EQ("unknown", scan_results[0].status);
  EXPECT_EQ("GSM", scan_results[0].technology);
  EXPECT_TRUE(scan_results[0].long_name.empty());
  EXPECT_TRUE(scan_results[0].short_name.empty());

  EXPECT_EQ("000002", scan_results[1].network_id);
  EXPECT_EQ("available", scan_results[1].status);
  EXPECT_EQ("Long Name", scan_results[1].long_name);
  EXPECT_TRUE(scan_results[1].short_name.empty());
  EXPECT_TRUE(scan_results[1].technology.empty());
}


text:
require 'test_helper'

class UsersEditTest < ActionDispatch::IntegrationTest
  # test "the truth" do
  #   assert true
  # end

  def setup
    @user = users(:foobar)
  end

  test "unsuccessfull user edit" do
    log_in_as(@user)
    get edit_user_path(@user)
    assert_template 'users/edit'
    patch user_path(@user), user: { name: "", email: "foobar@invalid",
                    password: "foo", password_confirmation: "bar"}
    assert_template 'users/edit'
  end

  test "successfull user edit" do
    log_in_as(@user)
    get edit_user_path(@user)
    name = "Foo Bar"
    email = "foo@bar.com"
    patch user_path(@user), user: { name: name, email: email,
                    password: "", password_confirmation: ""}
    assert_not flash.empty?
    assert_redirected_to @user
    @user.reload
    assert_equal name, @user.name
    assert_equal email, @user.email
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable

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

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

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

    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!DOCTYPE Test SYSTEM "test.dtd">
<!--
Author: Ilia A. Leviev
Version: $Revision: 1.3 $
-->
<Test
  ID="invokevirtual1404"
  date-of-creation="2005-09-08"
  timeout="1"
  >
  <Author value="Ilia A. Leviev"/>
  <Description>
    Tests invokevirtual java virtual machine instruction.
    Package protected method in class B is accessible to class B if this class contain target method.
   Covered assertions assert_instr26a369 assert_instr26a374 assert_const201 assert_const208 assert_const232
</Description>

  <Source name="invokevirtual1404p.j"/>
  <Runner ID="Runtime">
    <Param name="toRun" value="org.apache.harmony.vts.test.vm.jvms.instructions.invokeReturn.invokevirtual.invokevirtual14.invokevirtual1404.invokevirtual1404p"/>
  </Runner>
</Test>