text
stringlengths
2
6.14k
version https://git-lfs.github.com/spec/v1 oid sha256:f09386339b7a083e92b706c491817eb6f328805c49481a614f996a194d761fdc size 1848
if (typeof (QP) == "undefined" || !QP) { var QP = {} }; (function() { /* Draws the lines linking nodes in query plan diagram. root - The document element in which the diagram is contained. */ QP.drawLines = function(root) { if (root === null || root === undefined) { // Try and find it ourselves root = $(".qp-root").parent(); } else { // Make sure the object passed is jQuery wrapped root = $(root); } internalDrawLines(root); }; /* Internal implementaiton of drawLines. */ function internalDrawLines(root) { var canvas = getCanvas(root); var canvasElm = canvas[0]; // Check for browser compatability if (canvasElm.getContext !== null && canvasElm.getContext !== undefined) { // Chrome is usually too quick with document.ready window.setTimeout(function() { var context = canvasElm.getContext("2d"); // The first root node may be smaller than the full query plan if using overflow var firstNode = $(".qp-tr", root); canvasElm.width = firstNode.outerWidth(true); canvasElm.height = firstNode.outerHeight(true); var offset = canvas.offset(); $(".qp-tr", root).each(function() { var from = $("> * > .qp-node", $(this)); $("> * > .qp-tr > * > .qp-node", $(this)).each(function() { drawLine(context, offset, from, $(this)); }); }); context.stroke(); }, 1); } } /* Locates or creates the canvas element to use to draw lines for a given root element. */ function getCanvas(root) { var returnValue = $("canvas", root); if (returnValue.length == 0) { root.prepend($("<canvas></canvas>") .css("position", "absolute") .css("top", 0).css("left", 0) ); returnValue = $("canvas", root); } return returnValue; } /* Draws a line between two nodes. context - The canvas context with which to draw. offset - Canvas offset in the document. from - The document jQuery object from which to draw the line. to - The document jQuery object to which to draw the line. */ function drawLine(context, offset, from, to) { var fromOffset = from.offset(); fromOffset.top += from.outerHeight() / 2; fromOffset.left += from.outerWidth(); var toOffset = to.offset(); toOffset.top += to.outerHeight() / 2; var midOffsetLeft = fromOffset.left / 2 + toOffset.left / 2; context.moveTo(fromOffset.left - offset.left, fromOffset.top - offset.top); context.lineTo(midOffsetLeft - offset.left, fromOffset.top - offset.top); context.lineTo(midOffsetLeft - offset.left, toOffset.top - offset.top); context.lineTo(toOffset.left - offset.left, toOffset.top - offset.top); } })();
/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v1.1.0-rc4-master-c81f9f1 */ goog.provide('ng.material.components.swipe'); goog.require('ng.material.core'); /** * @ngdoc module * @name material.components.swipe * @description Swipe module! */ /** * @ngdoc directive * @module material.components.swipe * @name mdSwipeLeft * * @restrict A * * @description * The md-swipe-left directive allows you to specify custom behavior when an element is swiped * left. * * @usage * <hljs lang="html"> * <div md-swipe-left="onSwipeLeft()">Swipe me left!</div> * </hljs> */ /** * @ngdoc directive * @module material.components.swipe * @name mdSwipeRight * * @restrict A * * @description * The md-swipe-right directive allows you to specify custom behavior when an element is swiped * right. * * @usage * <hljs lang="html"> * <div md-swipe-right="onSwipeRight()">Swipe me right!</div> * </hljs> */ /** * @ngdoc directive * @module material.components.swipe * @name mdSwipeUp * * @restrict A * * @description * The md-swipe-up directive allows you to specify custom behavior when an element is swiped * up. * * @usage * <hljs lang="html"> * <div md-swipe-up="onSwipeUp()">Swipe me up!</div> * </hljs> */ /** * @ngdoc directive * @module material.components.swipe * @name mdSwipeDown * * @restrict A * * @description * The md-swipe-down directive allows you to specify custom behavior when an element is swiped * down. * * @usage * <hljs lang="html"> * <div md-swipe-down="onSwipDown()">Swipe me down!</div> * </hljs> */ angular.module('material.components.swipe', ['material.core']) .directive('mdSwipeLeft', getDirective('SwipeLeft')) .directive('mdSwipeRight', getDirective('SwipeRight')) .directive('mdSwipeUp', getDirective('SwipeUp')) .directive('mdSwipeDown', getDirective('SwipeDown')); function getDirective(name) { var directiveName = 'md' + name; var eventName = '$md.' + name.toLowerCase(); DirectiveFactory.$inject = ["$parse"]; return DirectiveFactory; /* ngInject */ function DirectiveFactory($parse) { return { restrict: 'A', link: postLink }; function postLink(scope, element, attr) { var fn = $parse(attr[directiveName]); element.on(eventName, function(ev) { scope.$apply(function() { fn(scope, { $event: ev }); }); }); } } } ng.material.components.swipe = angular.module("material.components.swipe");
/** * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v18.0.0 * @link http://www.ag-grid.com/ * @license MIT */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var LinkedList = (function () { function LinkedList() { this.first = null; this.last = null; } LinkedList.prototype.add = function (item) { var entry = { item: item, next: null }; if (this.last) { this.last.next = entry; } else { this.first = entry; } this.last = entry; }; LinkedList.prototype.remove = function () { var result = this.first; if (result) { this.first = result.next; if (!this.first) { this.last = null; } } return result.item; }; LinkedList.prototype.isEmpty = function () { return !this.first; }; return LinkedList; }()); exports.LinkedList = LinkedList; var LinkedListItem = (function () { function LinkedListItem() { } return LinkedListItem; }());
/* YUI 3.9.0 (build 5827) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ YUI.add('yui-later', function (Y, NAME) { /** * Provides a setTimeout/setInterval wrapper. This module is a `core` YUI module, * <a href="../classes/YUI.html#method_later">it's documentation is located under the YUI class</a>. * * @module yui * @submodule yui-later */ var NO_ARGS = []; /** * Executes the supplied function in the context of the supplied * object 'when' milliseconds later. Executes the function a * single time unless periodic is set to true. * @for YUI * @method later * @param when {int} the number of milliseconds to wait until the fn * is executed. * @param o the context object. * @param fn {Function|String} the function to execute or the name of * the method in the 'o' object to execute. * @param data [Array] data that is provided to the function. This * accepts either a single item or an array. If an array is provided, * the function is executed with one parameter for each array item. * If you need to pass a single array parameter, it needs to be wrapped * in an array [myarray]. * * Note: native methods in IE may not have the call and apply methods. * In this case, it will work, but you are limited to four arguments. * * @param periodic {boolean} if true, executes continuously at supplied * interval until canceled. * @return {object} a timer object. Call the cancel() method on this * object to stop the timer. */ Y.later = function(when, o, fn, data, periodic) { when = when || 0; data = (!Y.Lang.isUndefined(data)) ? Y.Array(data) : NO_ARGS; o = o || Y.config.win || Y; var cancelled = false, method = (o && Y.Lang.isString(fn)) ? o[fn] : fn, wrapper = function() { // IE 8- may execute a setInterval callback one last time // after clearInterval was called, so in order to preserve // the cancel() === no more runny-run, we have to jump through // an extra hoop. if (!cancelled) { if (!method.apply) { method(data[0], data[1], data[2], data[3]); } else { method.apply(o, data || NO_ARGS); } } }, id = (periodic) ? setInterval(wrapper, when) : setTimeout(wrapper, when); return { id: id, interval: periodic, cancel: function() { cancelled = true; if (this.interval) { clearInterval(id); } else { clearTimeout(id); } } }; }; Y.Lang.later = Y.later; }, '3.9.0', {"requires": ["yui-base"]});
/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.3.1 (2020-05-27) */ (function () { 'use strict'; var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools'); var getNonEditableClass = function (editor) { return editor.getParam('noneditable_noneditable_class', 'mceNonEditable'); }; var getEditableClass = function (editor) { return editor.getParam('noneditable_editable_class', 'mceEditable'); }; var getNonEditableRegExps = function (editor) { var nonEditableRegExps = editor.getParam('noneditable_regexp', []); if (nonEditableRegExps && nonEditableRegExps.constructor === RegExp) { return [nonEditableRegExps]; } else { return nonEditableRegExps; } }; var hasClass = function (checkClassName) { return function (node) { return (' ' + node.attr('class') + ' ').indexOf(checkClassName) !== -1; }; }; var replaceMatchWithSpan = function (editor, content, cls) { return function (match) { var args = arguments, index = args[args.length - 2]; var prevChar = index > 0 ? content.charAt(index - 1) : ''; if (prevChar === '"') { return match; } if (prevChar === '>') { var findStartTagIndex = content.lastIndexOf('<', index); if (findStartTagIndex !== -1) { var tagHtml = content.substring(findStartTagIndex, index); if (tagHtml.indexOf('contenteditable="false"') !== -1) { return match; } } } return '<span class="' + cls + '" data-mce-content="' + editor.dom.encode(args[0]) + '">' + editor.dom.encode(typeof args[1] === 'string' ? args[1] : args[0]) + '</span>'; }; }; var convertRegExpsToNonEditable = function (editor, nonEditableRegExps, e) { var i = nonEditableRegExps.length, content = e.content; if (e.format === 'raw') { return; } while (i--) { content = content.replace(nonEditableRegExps[i], replaceMatchWithSpan(editor, content, getNonEditableClass(editor))); } e.content = content; }; var setup = function (editor) { var editClass, nonEditClass; var contentEditableAttrName = 'contenteditable'; editClass = ' ' + global$1.trim(getEditableClass(editor)) + ' '; nonEditClass = ' ' + global$1.trim(getNonEditableClass(editor)) + ' '; var hasEditClass = hasClass(editClass); var hasNonEditClass = hasClass(nonEditClass); var nonEditableRegExps = getNonEditableRegExps(editor); editor.on('PreInit', function () { if (nonEditableRegExps.length > 0) { editor.on('BeforeSetContent', function (e) { convertRegExpsToNonEditable(editor, nonEditableRegExps, e); }); } editor.parser.addAttributeFilter('class', function (nodes) { var i = nodes.length, node; while (i--) { node = nodes[i]; if (hasEditClass(node)) { node.attr(contentEditableAttrName, 'true'); } else if (hasNonEditClass(node)) { node.attr(contentEditableAttrName, 'false'); } } }); editor.serializer.addAttributeFilter(contentEditableAttrName, function (nodes) { var i = nodes.length, node; while (i--) { node = nodes[i]; if (!hasEditClass(node) && !hasNonEditClass(node)) { continue; } if (nonEditableRegExps.length > 0 && node.attr('data-mce-content')) { node.name = '#text'; node.type = 3; node.raw = true; node.value = node.attr('data-mce-content'); } else { node.attr(contentEditableAttrName, null); } } }); }); }; function Plugin () { global.add('noneditable', function (editor) { setup(editor); }); } Plugin(); }());
import {helper} from 'ember-helper'; import {htmlSafe} from 'ember-string'; import ghostPaths from 'ghost-admin/utils/ghost-paths'; // Handlebars Helper {{gh-path}} // Usage: Assume 'http://www.myghostblog.org/myblog/' // {{gh-path}} or {{gh-path 'blog'}} for Ghost's root (/myblog/) // {{gh-path 'admin'}} for Ghost's admin root (/myblog/ghost/) // {{gh-path 'api'}} for Ghost's api root (/myblog/ghost/api/v0.1/) // {{gh-path 'admin' '/assets/hi.png'}} for resolved url (/myblog/ghost/assets/hi.png) export default helper(function (params) { let paths = ghostPaths(); let [path, url] = params; let base; if (!path) { path = 'blog'; } if (!/^(blog|admin|api)$/.test(path)) { url = path; path = 'blog'; } switch (path.toString()) { case 'blog': base = paths.blogRoot; break; case 'admin': base = paths.adminRoot; break; case 'api': base = paths.apiRoot; break; default: base = paths.blogRoot; break; } // handle leading and trailing slashes base = base[base.length - 1] !== '/' ? `${base}/` : base; if (url && url.length > 0) { if (url[0] === '/') { url = url.substr(1); } base = base + url; } return htmlSafe(base); });
var ccoding_stds_naming = [ [ "Naming Overview", "ccoding_stds_naming.html#cstdsNaming", [ [ "Be Descriptive", "ccoding_stds_naming.html#descript", null ], [ "Prefixes", "ccoding_stds_naming.html#prefix", null ], [ "Component Interfaces", "ccoding_stds_naming.html#cstdsInterComponentInterfaces", null ], [ "Module Interfaces", "ccoding_stds_naming.html#cstdsInterModuleInterfaces", null ] ] ], [ "Files", "ccoding_stds_naming.html#cstdsFiles", null ], [ "Macros", "ccoding_stds_naming.html#cstdsMacros", null ], [ "Types", "ccoding_stds_name_types.html", [ [ "Suffix", "ccoding_stds_name_types.html#cstdsNameSuffix", null ], [ "Prefix", "ccoding_stds_name_types.html#cstdsNameTypesPrefix", null ], [ "Name", "ccoding_stds_name_types.html#cstdsNameType", null ], [ "Cardinal Types", "ccoding_stds_name_types.html#cstdsCardinalTypes", null ], [ "Enumeration Members", "ccoding_stds_name_types.html#cstdsEnumerationMembers", null ], [ "Struct and Union Namespaces", "ccoding_stds_name_types.html#cstdsStructandUnionNamespaces", null ], [ "Struct and Union Members", "ccoding_stds_name_types.html#cstdsStructandUnionMembers", null ] ] ], [ "Functions", "ccoding_stds_name_funcs.html", [ [ "Prefix", "ccoding_stds_name_funcs.html#cstdsFuncsPrefix", null ], [ "Camel Case", "ccoding_stds_name_funcs.html#cstdsCamelCaseName", null ], [ "Verbage", "ccoding_stds_name_funcs.html#cstdsVerbage", null ] ] ], [ "Variables & Function Parameters", "ccoding_stds_param.html", [ [ "Camel Case", "ccoding_stds_param.html#cstdsparamCamelCase", null ], [ "Prefix", "ccoding_stds_param.html#cstdsparamPrefix", null ], [ "Pointers", "ccoding_stds_param.html#cstdsparamPointers", null ], [ "Static Variables", "ccoding_stds_param.html#cstdsparamStaticVariables", null ], [ "Abbreviations", "ccoding_stds_param.html#cstdsparamAbbreviations", null ] ] ] ];
var global = newGlobal(); var arrayIter = (new global.Array())[global.Symbol.iterator](); var ArrayIteratorPrototype = Object.getPrototypeOf(arrayIter); var arrayIterProtoBase = Object.getPrototypeOf(ArrayIteratorPrototype); var IteratorPrototype = arrayIterProtoBase; delete IteratorPrototype.next; var obj = global.eval('({a: 1})') for (var x in obj) {} assertEq(x, "a");
odoo.define('website_sale.s_products_searchbar', function (require) { 'use strict'; const concurrency = require('web.concurrency'); const publicWidget = require('web.public.widget'); const { qweb } = require('web.core'); /** * @todo maybe the custom autocomplete logic could be extract to be reusable */ publicWidget.registry.productsSearchBar = publicWidget.Widget.extend({ selector: '.o_wsale_products_searchbar_form', xmlDependencies: ['/website_sale/static/src/xml/website_sale_utils.xml'], events: { 'input .search-query': '_onInput', 'focusout': '_onFocusOut', 'keydown .search-query': '_onKeydown', }, autocompleteMinWidth: 300, /** * @constructor */ init: function () { this._super.apply(this, arguments); this._dp = new concurrency.DropPrevious(); this._onInput = _.debounce(this._onInput, 400); this._onFocusOut = _.debounce(this._onFocusOut, 100); }, /** * @override */ start: function () { this.$input = this.$('.search-query'); this.order = this.$('.o_wsale_search_order_by').val(); this.limit = parseInt(this.$input.data('limit')); this.displayDescription = !!this.$input.data('displayDescription'); this.displayPrice = !!this.$input.data('displayPrice'); this.displayImage = !!this.$input.data('displayImage'); if (this.limit) { this.$input.attr('autocomplete', 'off'); } return this._super.apply(this, arguments); }, //-------------------------------------------------------------------------- // Private //-------------------------------------------------------------------------- /** * @private */ _fetch: function () { return this._rpc({ route: '/shop/products/autocomplete', params: { 'term': this.$input.val(), 'options': { 'order': this.order, 'limit': this.limit, 'display_description': this.displayDescription, 'display_price': this.displayPrice, 'max_nb_chars': Math.round(Math.max(this.autocompleteMinWidth, parseInt(this.$el.width())) * 0.22), }, }, }); }, /** * @private */ _render: function (res) { var $prevMenu = this.$menu; this.$el.toggleClass('dropdown show', !!res); if (res) { var products = res['products']; this.$menu = $(qweb.render('website_sale.productsSearchBar.autocomplete', { products: products, hasMoreProducts: products.length < res['products_count'], currency: res['currency'], widget: this, })); this.$menu.css('min-width', this.autocompleteMinWidth); this.$el.append(this.$menu); } if ($prevMenu) { $prevMenu.remove(); } }, //-------------------------------------------------------------------------- // Handlers //-------------------------------------------------------------------------- /** * @private */ _onInput: function () { if (!this.limit) { return; } this._dp.add(this._fetch()).then(this._render.bind(this)); }, /** * @private */ _onFocusOut: function () { if (!this.$el.has(document.activeElement).length) { this._render(); } }, /** * @private */ _onKeydown: function (ev) { switch (ev.which) { case $.ui.keyCode.ESCAPE: this._render(); break; case $.ui.keyCode.UP: case $.ui.keyCode.DOWN: ev.preventDefault(); if (this.$menu) { let $element = ev.which === $.ui.keyCode.UP ? this.$menu.children().last() : this.$menu.children().first(); $element.focus(); } break; } }, }); });
#!/usr/bin/env node // // Copyright 2012 Iris Couch, all rights reserved. // // Test displaying DNS records var fs = require('fs') var tap = require('tap') var test = tap.test var util = require('util') var Message = require('../message') test('Display a message', function(t) { var file = 'oreilly.com-response' fs.readFile(__dirname+'/../_test_data/'+file, function(er, data) { if(er) throw er var msg = new Message(data) , str = util.format('%s', msg) , json = JSON.stringify(msg) t.type(str, 'string', 'Message can stringify') var obj = JSON.parse(util.format('%j', msg)) t.equal(obj.id, 45753, 'JSON round-trip: id') t.equal(obj.type, 'response', 'JSON round-trip: type') t.equal(obj.opcode, 'query', 'JSON round-trip: opcode') t.equal(obj.authoritative, true, 'JSON round-trip: authoritative') t.equal(obj.truncated, false, 'JSON round-trip: truncated') t.equal(obj.recursion_desired, true, 'JSON round-trip: recursion_desired') t.equal(obj.recursion_available, true, 'JSON round-trip: recursion_available') t.equal(obj.responseCode, 0, 'JSON round-trip: responseCode') t.end() }) })
//// [topLevelLambda.ts] module M { var f = () => {this.window;} } //// [topLevelLambda.js] var M; (function (M) { var _this = this; var f = function () { _this.window; }; })(M || (M = {}));
define("dojox/editor/plugins/nls/mk/TableDialog", { //begin v1.x content insertTableTitle: "Вметни табела", modifyTableTitle: "Модифицирај табела", rows: "Редови", columns: "Колони", align: "Порамни:", cellPadding: "Дополнување на ќелија:", cellSpacing: "Растојание меѓу ќелии:", tableWidth: "Ширина на табела:", backgroundColor: "Боја на заднина:", borderColor: "Боја на раб:", borderThickness: "Дебелина на раб:", percent: "процент", pixels: "пиксели", "default": "стандардно", left: "лево", center: "центар", right: "десно", buttonSet: "Постави", // translated elsewhere? buttonInsert: "Вметни", buttonCancel: "Откажи", selectTableLabel: "Избери табела", insertTableRowBeforeLabel: "Додај ред пред", insertTableRowAfterLabel: "Додај ред после", insertTableColumnBeforeLabel: "Додај колона пред", insertTableColumnAfterLabel: "Додај колона после", deleteTableRowLabel: "Избриши ред", deleteTableColumnLabel: "Избриши колона", colorTableCellTitle: "Боја на заднина на ќелија на табела", tableContextMenuTitle: "Контекстуално мени на табела" //end v1.x content });
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Contains the third and last part of the {@link CKEDITOR} object * definition. */ // Remove the CKEDITOR.loadFullCore reference defined on ckeditor_basic. delete CKEDITOR.loadFullCore; /** * Holds references to all editor instances created. The name of the properties * in this object correspond to instance names, and their values contains the * {@link CKEDITOR.editor} object representing them. * @type {Object} * @example * alert( <b>CKEDITOR.instances</b>.editor1.name ); // "editor1" */ CKEDITOR.instances = {}; /** * The document of the window holding the CKEDITOR object. * @type {CKEDITOR.dom.document} * @example * alert( <b>CKEDITOR.document</b>.getBody().getName() ); // "body" */ CKEDITOR.document = new CKEDITOR.dom.document( document ); /** * Adds an editor instance to the global {@link CKEDITOR} object. This function * is available for internal use mainly. * @param {CKEDITOR.editor} editor The editor instance to be added. * @example */ CKEDITOR.add = function( editor ) { CKEDITOR.instances[ editor.name ] = editor; editor.on( 'focus', function() { if ( CKEDITOR.currentInstance != editor ) { CKEDITOR.currentInstance = editor; CKEDITOR.fire( 'currentInstance' ); } }); editor.on( 'blur', function() { if ( CKEDITOR.currentInstance == editor ) { CKEDITOR.currentInstance = null; CKEDITOR.fire( 'currentInstance' ); } }); }; /** * Removes an editor instance from the global {@link CKEDITOR} object. This function * is available for internal use only. External code must use {@link CKEDITOR.editor.prototype.destroy} * to avoid memory leaks. * @param {CKEDITOR.editor} editor The editor instance to be removed. * @example */ CKEDITOR.remove = function( editor ) { delete CKEDITOR.instances[ editor.name ]; }; /** * Perform global clean up to free as much memory as possible * when there are no instances left */ CKEDITOR.on( 'instanceDestroyed', function () { if ( CKEDITOR.tools.isEmpty( this.instances ) ) CKEDITOR.fire( 'reset' ); }); // Load the bootstrap script. CKEDITOR.loader.load( 'core/_bootstrap' ); // @Packager.RemoveLine // Tri-state constants. /** * Used to indicate the ON or ACTIVE state. * @constant * @example */ CKEDITOR.TRISTATE_ON = 1; /** * Used to indicate the OFF or NON ACTIVE state. * @constant * @example */ CKEDITOR.TRISTATE_OFF = 2; /** * Used to indicate DISABLED state. * @constant * @example */ CKEDITOR.TRISTATE_DISABLED = 0; /** * The editor which is currently active (have user focus). * @name CKEDITOR.currentInstance * @type CKEDITOR.editor * @see CKEDITOR#currentInstance * @example * function showCurrentEditorName() * { * if ( CKEDITOR.currentInstance ) * alert( CKEDITOR.currentInstance.name ); * else * alert( 'Please focus an editor first.' ); * } */ /** * Fired when the CKEDITOR.currentInstance object reference changes. This may * happen when setting the focus on different editor instances in the page. * @name CKEDITOR#currentInstance * @event * var editor; // Variable to hold a reference to the current editor. * CKEDITOR.on( 'currentInstance' , function( e ) * { * editor = CKEDITOR.currentInstance; * }); */ /** * Fired when the last instance has been destroyed. This event is used to perform * global memory clean up. * @name CKEDITOR#reset * @event */
/** @module breeze **/ var EntityAction = (function () { /** EntityAction is an 'Enum' containing all of the valid actions that can occur to an 'Entity'. @class EntityAction @static **/ var entityActionMethods = { isAttach: function () { return !!this.isAttach; }, isDetach: function () { return !!this.isDetach; }, isModification: function () { return !!this.isModification; } }; var EntityAction = new Enum("EntityAction", entityActionMethods); /** Attach - Entity was attached via an AttachEntity call. @property Attach {EntityAction} @final @static **/ EntityAction.Attach = EntityAction.addSymbol({ isAttach: true}); /** AttachOnQuery - Entity was attached as a result of a query. @property AttachOnQuery {EntityAction} @final @static **/ EntityAction.AttachOnQuery = EntityAction.addSymbol({ isAttach: true}); /** AttachOnImport - Entity was attached as a result of an import. @property AttachOnImport {EntityAction} @final @static **/ EntityAction.AttachOnImport = EntityAction.addSymbol({ isAttach: true}); /** Detach - Entity was detached. @property Detach {EntityAction} @final @static **/ EntityAction.Detach = EntityAction.addSymbol({ isDetach: true }); /** MergeOnQuery - Properties on the entity were merged as a result of a query. @property MergeOnQuery {EntityAction} @final @static **/ EntityAction.MergeOnQuery = EntityAction.addSymbol({ isModification: true }); /** MergeOnImport - Properties on the entity were merged as a result of an import. @property MergeOnImport {EntityAction} @final @static **/ EntityAction.MergeOnImport = EntityAction.addSymbol({ isModification: true }); /** MergeOnSave - Properties on the entity were merged as a result of a save @property MergeOnSave {EntityAction} @final @static **/ EntityAction.MergeOnSave = EntityAction.addSymbol({ isModification: true }); /** PropertyChange - A property on the entity was changed. @property PropertyChange {EntityAction} @final @static **/ EntityAction.PropertyChange = EntityAction.addSymbol({ isModification: true}); /** EntityStateChange - The EntityState of the entity was changed. @property EntityStateChange {EntityAction} @final @static **/ EntityAction.EntityStateChange = EntityAction.addSymbol(); /** AcceptChanges - AcceptChanges was called on the entity, or its entityState was set to Unmodified. @property AcceptChanges {EntityAction} @final @static **/ EntityAction.AcceptChanges = EntityAction.addSymbol(); /** RejectChanges - RejectChanges was called on the entity. @property RejectChanges {EntityAction} @final @static **/ EntityAction.RejectChanges = EntityAction.addSymbol({ isModification: true}); /** Clear - The EntityManager was cleared. All entities detached. @property Clear {EntityAction} @final @static **/ EntityAction.Clear = EntityAction.addSymbol({ isDetach: true}); EntityAction.resolveSymbols(); return EntityAction; })(); breeze.EntityAction = EntityAction;
import util from "../utils"; class ApplicationService { getServiceFramework(controller) { let sf = util.utilities.sf; sf.moduleRoot = "PersonaBar"; sf.controller = controller; return sf; } getGeneralSettings(callback) { const sf = this.getServiceFramework("SEO"); sf.get("GetGeneralSettings", {}, callback); } updateGeneralSettings(payload, callback, failureCallback) { const sf = this.getServiceFramework("SEO"); sf.post("UpdateGeneralSettings", payload, callback, failureCallback); } getRegexSettings(callback) { const sf = this.getServiceFramework("SEO"); sf.get("GetRegexSettings", {}, callback); } updateRegexSettings(payload, callback, failureCallback) { const sf = this.getServiceFramework("SEO"); sf.post("UpdateRegexSettings", payload, callback, failureCallback); } testUrl(pageId, queryString, customPageName, callback) { const sf = this.getServiceFramework("SEO"); sf.get("TestUrl?pageId=" + pageId + "&queryString=" + encodeURIComponent(queryString) + "&customPageName=" + encodeURIComponent(customPageName), {}, callback); } testUrlRewrite(uri, callback) { const sf = this.getServiceFramework("SEO"); sf.get("TestUrlRewrite?uri=" + uri, {}, callback); } getSitemapSettings(callback) { const sf = this.getServiceFramework("SEO"); sf.get("GetSitemapSettings", {}, callback); } updateSitemapSettings(payload, callback, failureCallback) { const sf = this.getServiceFramework("SEO"); sf.post("UpdateSitemapSettings", payload, callback, failureCallback); } getSitemapProviders(callback) { const sf = this.getServiceFramework("SEO"); sf.get("GetSitemapProviders", {}, callback); } updateSitemapProvider(payload, callback, failureCallback) { const sf = this.getServiceFramework("SEO"); sf.post("UpdateSitemapProvider", payload, callback, failureCallback); } createVerification(verification, callback, failureCallback) { const sf = this.getServiceFramework("SEO"); sf.post("CreateVerification?verification=" + verification, {}, callback, failureCallback); } clearCache(callback, failureCallback) { const sf = this.getServiceFramework("SEO"); sf.post("ResetCache", {}, callback, failureCallback); } getExtensionUrlProviders(callback) { const sf = this.getServiceFramework("SEO"); sf.get("GetExtensionUrlProviders", {}, callback); } updateExtensionUrlProviderStatus(payload, callback, failureCallback) { const sf = this.getServiceFramework("SEO"); sf.post("UpdateExtensionUrlProviderStatus", payload, callback, failureCallback); } } const applicationService = new ApplicationService(); export default applicationService;
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ 'use strict'; // THIS CHECK SHOULD BE THE FIRST THING IN THIS FILE // This is to ensure that we catch env issues before we error while requiring other dependencies. const engines = require('./package.json').engines; require('./tools/check-environment')({ requiredNodeVersion: engines.node, requiredNpmVersion: engines.npm, requiredYarnVersion: engines.yarn }); const gulp = require('gulp'); // See `tools/gulp-tasks/README.md` for information about task loading. function loadTask(fileName, taskName) { const taskModule = require('./tools/gulp-tasks/' + fileName); const task = taskName ? taskModule[taskName] : taskModule; return task(gulp); } gulp.task('format:enforce', loadTask('format', 'enforce')); gulp.task('format', loadTask('format', 'format')); gulp.task('build.sh', loadTask('build', 'all')); gulp.task('build.sh:no-bundle', loadTask('build', 'no-bundle')); gulp.task('public-api:enforce', loadTask('public-api', 'enforce')); gulp.task('public-api:update', ['build.sh'], loadTask('public-api', 'update')); gulp.task('lint', ['format:enforce', 'validate-commit-messages', 'tslint']); gulp.task('tslint', ['tools:build'], loadTask('lint')); gulp.task('validate-commit-messages', loadTask('validate-commit-message')); gulp.task('tools:build', loadTask('tools-build')); gulp.task('check-cycle', loadTask('check-cycle')); gulp.task('serve', loadTask('serve', 'default')); gulp.task('serve-examples', loadTask('serve', 'examples')); gulp.task('changelog', loadTask('changelog')); gulp.task('check-env', () => {/* this is a noop because the env test ran already above */});
import { installation as ActionTypes, extension as ExtensionActionTypes } from "constants/actionTypes"; import { InstallationService } from "services"; const installationActions = { parsePackage(file, callback, errorCallback) { return (dispatch) => { InstallationService.parsePackage(file, (data) => { dispatch({ type: ActionTypes.PARSED_INSTALLATION_PACKAGE, payload: JSON.parse(data) }); if (callback) { callback(data); } }, errorCallback); }; }, navigateWizard(wizardStep, callback) { return (dispatch) => { dispatch({ type: ActionTypes.GO_TO_WIZARD_STEP, payload: { wizardStep } }); if (callback) { setTimeout(() => { callback(); }, 0); } }; }, setInstallingAvailablePackage(FileName, PackageType, callback) { return (dispatch) => { dispatch({ type: ActionTypes.INSTALLING_AVAILABLE_PACKAGE, payload: { PackageType, FileName } }); if (callback) { setTimeout(() => { callback(); }, 0); } }; }, notInstallingAvailablePackage(callback) { return (dispatch) => { dispatch({ type: ActionTypes.NOT_INSTALLING_AVAILABLE_PACKAGE }); if (callback) { setTimeout(() => { callback(); }, 0); } }; }, installExtension(file, newExtension, legacyType, isPortalPackage, callback, addToList) { let _newExtension = JSON.parse(JSON.stringify(newExtension)); return (dispatch) => { InstallationService.installPackage(file, legacyType, isPortalPackage, (data) => { dispatch({ type: ActionTypes.INSTALLED_EXTENSION_LOGS, payload: JSON.parse(data) }); if (addToList) { _newExtension.packageId = JSON.parse(data).newPackageId; _newExtension.inUse = "No"; dispatch({ type: ExtensionActionTypes.INSTALLED_EXTENSION, payload: { PackageInfo: _newExtension, logs: JSON.parse(data).logs } }); } if (callback) { callback(data); } }); }; }, clearParsedInstallationPackage(callback) { return (dispatch) => { dispatch({ type: ActionTypes.CLEAR_PARSED_INSTALLATION_PACKAGE }); if (callback) { callback(); } }; }, toggleAcceptLicense(value, callback) { return (dispatch) => { dispatch({ type: ActionTypes.TOGGLE_ACCEPT_LICENSE, payload: value }); if (callback) { callback(); } }; }, setViewingLog(value, callback) { return (dispatch) => { dispatch({ type: ActionTypes.TOGGLE_VIEWING_LOG, payload: value }); if (callback) { callback(); } }; }, setIsPortalPackage(value, callback) { return (dispatch) => { dispatch({ type: ActionTypes.SET_IS_PORTAL_PACKAGE, payload: value }); if (callback) { callback(); } }; } }; export default installationActions;
'use strict'; /* Controllers */ app // Flot Chart controller .controller('FlotChartDemoCtrl', ['$scope', function($scope) { $scope.d = [ [1,6.5],[2,6.5],[3,7],[4,8],[5,7.5],[6,7],[7,6.8],[8,7],[9,7.2],[10,7],[11,6.8],[12,7] ]; $scope.d0_1 = [ [0,7],[1,6.5],[2,12.5],[3,7],[4,9],[5,6],[6,11],[7,6.5],[8,8],[9,7] ]; $scope.d0_2 = [ [0,4],[1,4.5],[2,7],[3,4.5],[4,3],[5,3.5],[6,6],[7,3],[8,4],[9,3] ]; $scope.d1_1 = [ [10, 120], [20, 70], [30, 70], [40, 60] ]; $scope.d1_2 = [ [10, 50], [20, 60], [30, 90], [40, 35] ]; $scope.d1_3 = [ [10, 80], [20, 40], [30, 30], [40, 20] ]; $scope.d2 = []; for (var i = 0; i < 20; ++i) { $scope.d2.push([i, Math.round( Math.sin(i)*100)/100] ); } $scope.d3 = [ { label: "iPhone5S", data: 40 }, { label: "iPad Mini", data: 10 }, { label: "iPad Mini Retina", data: 20 }, { label: "iPhone4S", data: 12 }, { label: "iPad Air", data: 18 } ]; $scope.refreshData = function(){ $scope.d0_1 = $scope.d0_2; }; $scope.getRandomData = function() { var data = [], totalPoints = 150; if (data.length > 0) data = data.slice(1); while (data.length < totalPoints) { var prev = data.length > 0 ? data[data.length - 1] : 50, y = prev + Math.random() * 10 - 5; if (y < 0) { y = 0; } else if (y > 100) { y = 100; } data.push(Math.round(y*100)/100); } // Zip the generated y values with the x values var res = []; for (var i = 0; i < data.length; ++i) { res.push([i, data[i]]) } return res; } $scope.d4 = $scope.getRandomData(); }]);
/* * This file is part of the TYPO3 CMS project. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 * of the License, or any later version. * * For the full copyright and license information, please read the * LICENSE.txt file that was distributed with this source code. * * The TYPO3 project - inspiring people to share! */ /*************************************************** * Color utilities ***************************************************/ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/String', ['TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent'], function (UserAgent) { // Create the ruler if (!document.getElementById('htmlarea-ruler')) { // Insert the css rule in the stylesheet var styleSheet = document.styleSheets[0]; var selector = '#htmlarea-ruler'; var style = 'visibility: hidden; white-space: nowrap;'; var rule = selector + ' { ' + style + ' }'; if (!UserAgent.isIEBeforeIE9) { try { styleSheet.insertRule(rule, styleSheet.cssRules.length); } catch (e) {} } else { styleSheet.addRule(selector, style); } //Insert the ruler on the document var ruler = document.createElement('span'); ruler.setAttribute('id', 'htmlarea-ruler'); document.body.appendChild(ruler); } /** * Get the visual length of a string */ String.prototype.visualLength = function() { var ruler = document.getElementById('htmlarea-ruler'); ruler.innerHTML = this; return ruler.offsetWidth; }; /** * Set an ellipsis on a string */ String.prototype.ellipsis = function(length) { var temp = this; var trimmed = this; if (temp.visualLength() > length) { trimmed += "..."; while (trimmed.visualLength() > length) { temp = temp.substring(0, temp.length-1); trimmed = temp + "..."; } } return trimmed; }; });
/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang("codesnippet","bg",{button:"Въвеждане на блок с код",codeContents:"Съдържание на кода",emptySnippetError:"Блока с код не може да бъде празен.",language:"Език",title:"Блок с код",pathName:"блок с код"});
// Plugin: jQuery.scrollSpeed // Source: github.com/nathco/jQuery.scrollSpeed // Author: Nathan Rutzky // Update: 1.0.2 (function($) { jQuery.scrollSpeed = function(step, speed, easing) { var $document = $(document), $window = $(window), $body = $('html, body'), option = easing || 'default', root = 0, scroll = false, scrollY, scrollX, view; if (window.navigator.msPointerEnabled) return false; $window.on('mousewheel DOMMouseScroll', function(e) { var deltaY = e.originalEvent.wheelDeltaY, detail = e.originalEvent.detail; scrollY = $document.height() > $window.height(); scrollX = $document.width() > $window.width(); scroll = true; if (scrollY) { view = $window.height(); if (deltaY < 0 || detail > 0) root = (root + view) >= $document.height() ? root : root += step; if (deltaY > 0 || detail < 0) root = root <= 0 ? 0 : root -= step; $body.stop().animate({ scrollTop: root }, speed, option, function() { scroll = false; }); } if (scrollX) { view = $window.width(); if (deltaY < 0 || detail > 0) root = (root + view) >= $document.width() ? root : root += step; if (deltaY > 0 || detail < 0) root = root <= 0 ? 0 : root -= step; $body.stop().animate({ scrollLeft: root }, speed, option, function() { scroll = false; }); } return false; }).on('scroll', function() { if (scrollY && !scroll) root = $window.scrollTop(); if (scrollX && !scroll) root = $window.scrollLeft(); }).on('resize', function() { if (scrollY && !scroll) view = $window.height(); if (scrollX && !scroll) view = $window.width(); }); }; jQuery.easing.default = function (x,t,b,c,d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }; })(jQuery);
/* Copyright 2008-2015 Clipperz Srl This file is part of Clipperz, the online password manager. For further information about its features and functionalities please refer to http://www.clipperz.com. * Clipperz is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * Clipperz is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. * You should have received a copy of the GNU Affero General Public License along with Clipperz. If not, see http://www.gnu.org/licenses/. */ Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); //############################################################################# Clipperz.PM.UI.Web.Components.FaviconColumnManager = function(args) { args = args || {}; Clipperz.PM.UI.Web.Components.FaviconColumnManager.superclass.constructor.call(this, args); return this; } //============================================================================= Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.FaviconColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { 'toString': function () { return "Clipperz.PM.UI.Web.Components.FaviconColumnManager component"; }, //------------------------------------------------------------------------- 'renderCell': function(aRowElement, anObject) { var faviconImageElement; var faviconUrl; faviconImageElement = this.getId('favicon'); faviconUrl = anObject[this.name()]; if (faviconUrl == null) { faviconUrl = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); } Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ {tag:'img', id:faviconImageElement, src:faviconUrl} ]}); MochiKit.Signal.connect(faviconImageElement, 'onload', this, 'handleLoadedFaviconImage'); MochiKit.Signal.connect(faviconImageElement, 'onerror', this, 'handleMissingFaviconImage'); MochiKit.Signal.connect(faviconImageElement, 'onabort', this, 'handleMissingFaviconImage'); }, //----------------------------------------------------- 'handleLoadedFaviconImage': function(anEvent) { MochiKit.Signal.disconnectAllTo(anEvent.src()); if (anEvent.src().complete == false) { anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); } }, //----------------------------------------------------- 'handleMissingFaviconImage': function(anEvent) { MochiKit.Signal.disconnectAllTo(anEvent.src()); anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); }, //----------------------------------------------------- '__syntax_fix__' : 'syntax fix' });
/** * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // @codekit-prepend 'third_party/signals.min.js' // @codekit-prepend 'third_party/requestAnimationFrame.js' var CDS = {}; // @codekit-append 'helper/event-publisher.js' // @codekit-append 'helper/util.js' // @codekit-append 'helper/history.js' // @codekit-append 'helper/analytics.js' // @codekit-append 'helper/theme.js' // @codekit-append 'helper/video-embedder.js' // @codekit-append 'components/button.js' // @codekit-append 'components/card.js' // @codekit-append 'components/cards.js' // @codekit-append 'components/toast.js' // @codekit-append 'components/masthead.js' // @codekit-append 'components/schedule.js' // @codekit-append 'bootstrap.js'
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. (async function() { TestRunner.addResult(`Tests that stepInto doesn't pause in InjectedScriptSource.\n`); await TestRunner.loadLegacyModule('sources'); await TestRunner.loadTestModule('sources_test_runner'); await TestRunner.showPanel('sources'); await TestRunner.evaluateInPagePromise(` function testFunction() { debugger; console.log(123); return 239; // stack result should point here } `); SourcesTestRunner.startDebuggerTestPromise(/* quiet */ true) .then(() => SourcesTestRunner.runTestFunctionAndWaitUntilPausedPromise()) .then(() => stepIntoPromise()) .then(() => stepIntoPromise()) .then((callFrames) => SourcesTestRunner.captureStackTrace(callFrames)) .then(() => SourcesTestRunner.completeDebuggerTest()); function stepIntoPromise() { var cb; var p = new Promise(fullfill => cb = fullfill); SourcesTestRunner.stepInto(); SourcesTestRunner.waitUntilResumed(() => SourcesTestRunner.waitUntilPaused(cb)); return p; } })();
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. (async function() { TestRunner.addResult(`Tests Summary view of detailed heap snapshots. The "Show All" button must show all nodes.\n`); await TestRunner.loadTestModule('heap_profiler_test_runner'); await TestRunner.showPanel('heap_profiler'); var instanceCount = 25; function createHeapSnapshot() { return HeapProfilerTestRunner.createHeapSnapshot(instanceCount); } HeapProfilerTestRunner.runHeapSnapshotTestSuite([function testShowAll(next) { HeapProfilerTestRunner.takeAndOpenSnapshot(createHeapSnapshot, step1); function step1() { HeapProfilerTestRunner.switchToView('Summary', step2); } function step2() { var row = HeapProfilerTestRunner.findRow('A'); TestRunner.assertEquals(true, !!row, '"A" row'); HeapProfilerTestRunner.expandRow(row, step3); } function step3(row) { var count = row.data['count']; TestRunner.assertEquals(instanceCount.toString(), count); var buttonsNode = HeapProfilerTestRunner.findButtonsNode(row); TestRunner.assertEquals(true, !!buttonsNode, 'buttons node'); var words = buttonsNode.showAll.textContent.split(' '); for (var i = 0; i < words.length; ++i) { var maybeNumber = parseInt(words[i], 10); if (!isNaN(maybeNumber)) TestRunner.assertEquals( instanceCount - row.dataGrid.defaultPopulateCount(), maybeNumber, buttonsNode.showAll.textContent); } HeapProfilerTestRunner.clickShowMoreButton('showAll', buttonsNode, step4); } function step4(row) { var rowsShown = HeapProfilerTestRunner.countDataRows(row); TestRunner.assertEquals(instanceCount, rowsShown, 'after showAll click'); var buttonsNode = HeapProfilerTestRunner.findButtonsNode(row); TestRunner.assertEquals(false, !!buttonsNode, 'buttons node found when all instances are shown!'); setTimeout(next, 0); } }]); })();
'use strict'; exports.baseTechPath = require.resolve('./level-proto.js');
import { sendMail } from '../functions/sendMail'; import { unsubscribe } from '../functions/unsubscribe'; export const Mailer = { sendMail, unsubscribe, };
/* flatpickr v4.2.1, @license MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (factory((global.sv = {}))); }(this, (function (exports) { 'use strict'; var fp = typeof window !== "undefined" && window.flatpickr !== undefined ? window.flatpickr : { l10ns: {}, }; var Swedish = { firstDayOfWeek: 1, weekAbbreviation: "v", weekdays: { shorthand: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"], longhand: [ "Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag", ], }, months: { shorthand: [ "Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec", ], longhand: [ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December", ], }, ordinal: function () { return "."; }, }; fp.l10ns.sv = Swedish; var sv = fp.l10ns; exports.Swedish = Swedish; exports['default'] = sv; Object.defineProperty(exports, '__esModule', { value: true }); })));
// version 1.0 - original version jQuery(document).ready(function () { var version = jQuery.fn.jquery.split('.'); if (parseFloat(version[1]) < 7) { // use .live as we are on jQuery prior to 1.7 jQuery('.colorpickerField').live('click', function () { if (jQuery(this).attr('id').search("__i__") === -1) { var picker, field = jQuery(this).attr('id').substr(0, 20); jQuery('.s2_colorpicker').hide(); jQuery('.s2_colorpicker').each(function () { if (jQuery(this).attr('id').search(field) !== -1) { picker = jQuery(this).attr('id'); } }); jQuery.farbtastic('#' + picker).linkTo(this); jQuery('#' + picker).slideDown(); } }); } else { // use .on as we are using jQuery 1.7 and up where .live is deprecated jQuery(document).on('focus', '.colorpickerField', function () { if (jQuery(this).is('.s2_initialised') || this.id.search('__i__') !== -1) { return; // exit early, already initialized or not activated } jQuery(this).addClass('s2_initialised'); var picker, field = jQuery(this).attr('id').substr(0, 20); jQuery('.s2_colorpicker').each(function () { if (jQuery(this).attr('id').search(field) !== -1) { picker = jQuery(this).attr('id'); return false; // stop looping } }); jQuery(this).on('focusin', function (event) { jQuery('.s2_colorpicker').hide(); jQuery.farbtastic('#' + picker).linkTo(this); jQuery('#' + picker).slideDown(); }); jQuery(this).on('focusout', function (event) { jQuery('#' + picker).slideUp(); }); jQuery(this).trigger('focus'); // retrigger focus event for plugin to work }); } });
var toArray = require('./toArray'); var find = require('../array/find'); /** * Return first non void argument */ function defaults(var_args){ return find(toArray(arguments), nonVoid); } function nonVoid(val){ return val != null; } module.exports = defaults;
L.Map.include({ addControl: function (control) { control.addTo(this); return this; }, removeControl: function (control) { control.removeFrom(this); return this; }, _initControlPos: function () { var corners = this._controlCorners = {}, l = 'leaflet-', container = this._controlContainer = L.DomUtil.create('div', l + 'control-container', this._container); function createCorner(vSide, hSide) { var className = l + vSide + ' ' + l + hSide; corners[vSide + hSide] = L.DomUtil.create('div', className, container); } createCorner('top', 'left'); createCorner('top', 'right'); createCorner('bottom', 'left'); createCorner('bottom', 'right'); } });
// ------------------------------------ // #POSTCSS - LOAD OPTIONS - OPTIONS // ------------------------------------ 'use strict' /** * * @method options * * @param {Object} options PostCSS Config * * @return {Object} options PostCSS Options */ module.exports = function options (options) { if (options.parser) { options.parser = require(options.parser) } if (options.syntax) { options.syntax = require(options.syntax) } if (options.stringifier) { options.stringifier = require(options.stringifier) } if (options.plugins) { delete options.plugins } return options }
/************************************** { x:0, y:0, width:433, min:1, max:25, step:1, message: "rules/turns" } **************************************/ function Slider(config){ var self = this; self.id = config.id; // Create DOM var dom = document.createElement("div"); dom.className = "slider"; dom.style.left = config.x+"px"; dom.style.top = config.y+"px"; dom.style.width = config.width+"px"; self.dom = dom; // Background var bg = document.createElement("div"); bg.className = "slider_bg"; dom.appendChild(bg); // Knob var knob = document.createElement("div"); knob.className = "slider_knob"; dom.appendChild(knob); // Set value self.value = 0; var _paramToValue = function(param){ var value = config.min + (config.max-config.min)*param; value = Math.round(value/config.step)*config.step; return value; }; var _valueToParam = function(value){ var param = (value-config.min)/(config.max-config.min); // to (0-1) return param; }; self.setParam = function(param){ // Bounds var value = config.min + (config.max-config.min)*param; value = Math.round(value/config.step)*config.step; self.value = value; // DOM knob.style.left = self.value*config.width-15; }; self.setValue = function(value){ // Set self.value = value; // DOM with param var param = _valueToParam(self.value); knob.style.left = param*(config.width-30); }; if(config.message) listen(self, config.message, self.setValue); // Mouse events var _isDragging = false; var _offsetX = 0; var _mouseToParam = function(event){ // Mouse to Param to Value var param = (event.clientX - _offsetX - dom.getBoundingClientRect().left - 8)/(config.width-30); if(param<0) param=0; if(param>1) param=1; var value = _paramToValue(param); // Publish these changes! (only if ACTUALLY changed) if(self.value != value){ if(config.message) publish(config.message, [value]); if(config.onchange) config.onchange(value); } }; var _onDomMouseDown = function(event){ if(config.onselect) config.onselect(); _mouseToParam(event); _isDragging = true; _offsetX = 0; }; var _onKnobMouseDown = function(event){ _isDragging = true; if(config.onselect) config.onselect(); _offsetX = event.clientX - knob.getBoundingClientRect().left; }; var _onWindowMouseMove = function(event){ if(_isDragging) _mouseToParam(event); }; var _onWindowMouseUp = function(){ _isDragging = false; }; dom.addEventListener("mousedown",_onDomMouseDown,false); knob.addEventListener("mousedown",_onKnobMouseDown,false); window.addEventListener("mousemove",_onWindowMouseMove,false); window.addEventListener("mouseup",_onWindowMouseUp,false); // FOR TOUCH var _fakeEventWrapper = function(event){ var fake = {}; fake.clientX = event.changedTouches[0].clientX; fake.clientY = event.changedTouches[0].clientY; return fake; }; dom.addEventListener("touchstart",function(event){ event = _fakeEventWrapper(event); _onDomMouseDown(event); },false); knob.addEventListener("touchstart",function(event){ event = _fakeEventWrapper(event); _onKnobMouseDown(event); },false); window.addEventListener("touchmove",function(event){ event = _fakeEventWrapper(event); _onWindowMouseMove(event); },false); window.addEventListener("touchend",_onWindowMouseUp,false); //////////////////////////////////////// // Add... self.add = function(){ _add(self); }; // Remove... self.remove = function(){ unlisten(self); _remove(self); }; }
M.tool_assignmentupgrade = { init_upgrade_table: function(Y) { Y.use('node', function(Y) { checkboxes = Y.all('td.c0 input'); checkboxes.each(function(node) { node.on('change', function(e) { rowelement = e.currentTarget.get('parentNode').get('parentNode'); if (e.currentTarget.get('checked')) { rowelement.setAttribute('class', 'selectedrow'); } else { rowelement.setAttribute('class', 'unselectedrow'); } }); rowelement = node.get('parentNode').get('parentNode'); if (node.get('checked')) { rowelement.setAttribute('class', 'selectedrow'); } else { rowelement.setAttribute('class', 'unselectedrow'); } }); }); var selectall = Y.one('th.c0 input'); selectall.on('change', function(e) { if (e.currentTarget.get('checked')) { checkboxes = Y.all('td.c0 input'); checkboxes.each(function(node) { rowelement = node.get('parentNode').get('parentNode'); node.set('checked', true); rowelement.setAttribute('class', 'selectedrow'); }); } else { checkboxes = Y.all('td.c0 input'); checkboxes.each(function(node) { rowelement = node.get('parentNode').get('parentNode'); node.set('checked', false); rowelement.setAttribute('class', 'unselectedrow'); }); } }); var batchform = Y.one('.tool_assignmentupgrade_batchform form'); batchform.on('submit', function(e) { checkboxes = Y.all('td.c0 input'); var selectedassignments = []; checkboxes.each(function(node) { if (node.get('checked')) { selectedassignments[selectedassignments.length] = node.get('value'); } }); operation = Y.one('#id_operation'); assignmentsinput = Y.one('input.selectedassignments'); assignmentsinput.set('value', selectedassignments.join(',')); if (selectedassignments.length == 0) { alert(M.str.assign.noassignmentsselected); e.preventDefault(); } }); var perpage = Y.one('#id_perpage'); perpage.on('change', function(e) { window.onbeforeunload = null; Y.one('.tool_assignmentupgrade_paginationform form').submit(); }); } }
(function () { // Append the bind() polyfill var scriptElem = document.createElement('script'); scriptElem.setAttribute('src', 'scripts/android2.3-jscompat.js'); if (document.body) { document.body.appendChild(scriptElem); } else { document.head.appendChild(scriptElem); } }());
/* * Copyright 2013 The Polymer Authors. All rights reserved. * Use of this source code is goverened by a BSD-style * license that can be found in the LICENSE file. */ suite('ChildNodeInterface', function() { function getTree() { var tree = {}; var div = tree.div = document.createElement('div'); div.innerHTML = 'a<b></b>c<d></d>e'; var a = tree.a = div.firstChild; var b = tree.b = a.nextSibling; var c = tree.c = b.nextSibling; var d = tree.d = c.nextSibling; var e = tree.e = d.nextSibling; var sr = tree.sr = div.createShadowRoot(); sr.innerHTML = 'f<g></g>h<content></content>i<j></j>k'; var f = tree.f = sr.firstChild; var g = tree.g = f.nextSibling; var h = tree.h = g.nextSibling; var content = tree.content = h.nextSibling; var i = tree.i = content.nextSibling; var j = tree.j = i.nextSibling; var k = tree.k = j.nextSibling; div.offsetHeight; // trigger rendering return tree; } test('nextElementSibling', function() { var tree = getTree(); assert.equal(tree.b.nextElementSibling, tree.d); assert.equal(tree.d.nextElementSibling, null); assert.equal(tree.g.nextElementSibling, tree.content); assert.equal(tree.content.nextElementSibling, tree.j); assert.equal(tree.j.nextElementSibling, null); }); test('previousElementSibling', function() { var tree = getTree(); assert.equal(tree.b.previousElementSibling, null); assert.equal(tree.d.previousElementSibling, tree.b); assert.equal(tree.g.previousElementSibling, null); assert.equal(tree.content.previousElementSibling, tree.g); assert.equal(tree.j.previousElementSibling, tree.content); }); test('remove', function() { var div = document.createElement('div'); div.innerHTML = '<a></a>'; var a = div.firstChild; a.remove(); assert.equal(div.firstChild, null); assert.equal(a.parentNode, null); // no op. div.remove(); }); });
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Command = require('../ember-cli/lib/models/command'); const test_1 = require("../tasks/test"); const config_1 = require("../models/config"); const common_tags_1 = require("common-tags"); const config = config_1.CliConfig.fromProject() || config_1.CliConfig.fromGlobal(); const testConfigDefaults = config.getPaths('defaults.build', [ 'progress', 'poll' ]); const TestCommand = Command.extend({ name: 'test', aliases: ['t'], description: 'Run unit tests in existing project.', works: 'insideProject', availableOptions: [ { name: 'watch', type: Boolean, aliases: ['w'], description: 'Run build when files change.' }, { name: 'code-coverage', type: Boolean, default: false, aliases: ['cc'], description: 'Coverage report will be in the coverage/ directory.' }, { name: 'config', type: String, aliases: ['c'], description: common_tags_1.oneLine `Use a specific config file. Defaults to the karma config file in .angular-cli.json.` }, { name: 'single-run', type: Boolean, aliases: ['sr'], description: 'Run tests a single time.' }, { name: 'progress', type: Boolean, default: testConfigDefaults['progress'], description: 'Log progress to the console while in progress.' }, { name: 'browsers', type: String, description: 'Override which browsers tests are run against.' }, { name: 'colors', type: Boolean, description: 'Enable or disable colors in the output (reporters and logs).' }, { name: 'log-level', type: String, description: 'Level of logging.' }, { name: 'port', type: Number, description: 'Port where the web server will be listening.' }, { name: 'reporters', type: String, description: 'List of reporters to use.' }, { name: 'sourcemaps', type: Boolean, default: true, aliases: ['sm', 'sourcemap'], description: 'Output sourcemaps.' }, { name: 'poll', type: Number, default: testConfigDefaults['poll'], description: 'Enable and define the file watching poll time period (milliseconds).' }, { name: 'environment', type: String, aliases: ['e'], description: 'Defines the build environment.' }, { name: 'app', type: String, aliases: ['a'], description: 'Specifies app name to use.' } ], run: function (commandOptions) { const testTask = new test_1.default({ ui: this.ui, project: this.project }); if (commandOptions.watch !== undefined && !commandOptions.watch) { // if not watching ensure karma is doing a single run commandOptions.singleRun = true; } return testTask.run(commandOptions); } }); TestCommand.overrideCore = true; exports.default = TestCommand; //# sourceMappingURL=/users/hansl/sources/angular-cli/commands/test.js.map
import Ember from "ember-metal/core"; import EmberObject from "ember-runtime/system/object"; import TargetActionSupport from "ember-runtime/mixins/target_action_support"; var originalLookup; QUnit.module("TargetActionSupport", { setup() { originalLookup = Ember.lookup; }, teardown() { Ember.lookup = originalLookup; } }); QUnit.test("it should return false if no target or action are specified", function() { expect(1); var obj = EmberObject.createWithMixins(TargetActionSupport); ok(false === obj.triggerAction(), "no target or action was specified"); }); QUnit.test("it should support actions specified as strings", function() { expect(2); var obj = EmberObject.createWithMixins(TargetActionSupport, { target: EmberObject.create({ anEvent() { ok(true, "anEvent method was called"); } }), action: 'anEvent' }); ok(true === obj.triggerAction(), "a valid target and action were specified"); }); QUnit.test("it should invoke the send() method on objects that implement it", function() { expect(3); var obj = EmberObject.createWithMixins(TargetActionSupport, { target: EmberObject.create({ send(evt, context) { equal(evt, 'anEvent', "send() method was invoked with correct event name"); equal(context, obj, "send() method was invoked with correct context"); } }), action: 'anEvent' }); ok(true === obj.triggerAction(), "a valid target and action were specified"); }); QUnit.test("it should find targets specified using a property path", function() { expect(2); var Test = {}; Ember.lookup = { Test: Test }; Test.targetObj = EmberObject.create({ anEvent() { ok(true, "anEvent method was called on global object"); } }); var myObj = EmberObject.createWithMixins(TargetActionSupport, { target: 'Test.targetObj', action: 'anEvent' }); ok(true === myObj.triggerAction(), "a valid target and action were specified"); }); QUnit.test("it should use an actionContext object specified as a property on the object", function() { expect(2); var obj = EmberObject.createWithMixins(TargetActionSupport, { action: 'anEvent', actionContext: {}, target: EmberObject.create({ anEvent(ctx) { ok(obj.actionContext === ctx, "anEvent method was called with the expected context"); } }) }); ok(true === obj.triggerAction(), "a valid target and action were specified"); }); QUnit.test("it should find an actionContext specified as a property path", function() { expect(2); var Test = {}; Ember.lookup = { Test: Test }; Test.aContext = {}; var obj = EmberObject.createWithMixins(TargetActionSupport, { action: 'anEvent', actionContext: 'Test.aContext', target: EmberObject.create({ anEvent(ctx) { ok(Test.aContext === ctx, "anEvent method was called with the expected context"); } }) }); ok(true === obj.triggerAction(), "a valid target and action were specified"); }); QUnit.test("it should use the target specified in the argument", function() { expect(2); var targetObj = EmberObject.create({ anEvent() { ok(true, "anEvent method was called"); } }); var obj = EmberObject.createWithMixins(TargetActionSupport, { action: 'anEvent' }); ok(true === obj.triggerAction({ target: targetObj }), "a valid target and action were specified"); }); QUnit.test("it should use the action specified in the argument", function() { expect(2); var obj = EmberObject.createWithMixins(TargetActionSupport, { target: EmberObject.create({ anEvent() { ok(true, "anEvent method was called"); } }) }); ok(true === obj.triggerAction({ action: 'anEvent' }), "a valid target and action were specified"); }); QUnit.test("it should use the actionContext specified in the argument", function() { expect(2); var context = {}; var obj = EmberObject.createWithMixins(TargetActionSupport, { target: EmberObject.create({ anEvent(ctx) { ok(context === ctx, "anEvent method was called with the expected context"); } }), action: 'anEvent' }); ok(true === obj.triggerAction({ actionContext: context }), "a valid target and action were specified"); }); QUnit.test("it should allow multiple arguments from actionContext", function() { expect(3); var param1 = 'someParam'; var param2 = 'someOtherParam'; var obj = EmberObject.createWithMixins(TargetActionSupport, { target: EmberObject.create({ anEvent(first, second) { ok(first === param1, "anEvent method was called with the expected first argument"); ok(second === param2, "anEvent method was called with the expected second argument"); } }), action: 'anEvent' }); ok(true === obj.triggerAction({ actionContext: [param1, param2] }), "a valid target and action were specified"); }); QUnit.test("it should use a null value specified in the actionContext argument", function() { expect(2); var obj = EmberObject.createWithMixins(TargetActionSupport, { target: EmberObject.create({ anEvent(ctx) { ok(null === ctx, "anEvent method was called with the expected context (null)"); } }), action: 'anEvent' }); ok(true === obj.triggerAction({ actionContext: null }), "a valid target and action were specified"); });
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; import {BatchedBridge} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface'; // TODO @sema: Adjust types import type {ReactNativeType} from './ReactNativeTypes'; let ReactFabric; if (__DEV__) { ReactFabric = require('../implementations/ReactFabric-dev'); } else { ReactFabric = require('../implementations/ReactFabric-prod'); } BatchedBridge.registerCallableModule('ReactFabric', ReactFabric); module.exports = (ReactFabric: ReactNativeType);
// ----------------------------------------------------------------------------- // Globals // Major version of Flash required var requiredMajorVersion = 8; // Minor version of Flash required var requiredMinorVersion = 0; // Minor version of Flash required var requiredRevision = 0; // the version of javascript supported var jsVersion = 1.0; // ----------------------------------------------------------------------------- var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false; jsVersion = 1.1; // JavaScript helper required to detect Flash Player PlugIn version information function JSGetSwfVer(i){ // NS/Opera version >= 3 check for Flash plugin in plugin array if (navigator.plugins != null && navigator.plugins.length > 0) { if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; descArray = flashDescription.split(" "); tempArrayMajor = descArray[2].split("."); versionMajor = tempArrayMajor[0]; versionMinor = tempArrayMajor[1]; if ( descArray[3] != "" ) { tempArrayMinor = descArray[3].split("r"); } else { tempArrayMinor = descArray[4].split("r"); } versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0; flashVer = versionMajor + "." + versionMinor + "." + versionRevision; } else { flashVer = -1; } } // MSN/WebTV 2.6 supports Flash 4 else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4; // WebTV 2.5 supports Flash 3 else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3; // older WebTV supports Flash 2 else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2; // Can't detect in all other cases else { flashVer = -1; } return flashVer; } // When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) { reqVer = parseFloat(reqMajorVer + "." + reqRevision); // loop backwards through the versions until we find the newest version for (i=25;i>0;i--) { if (isIE && isWin && !isOpera) { versionStr = VBGetSwfVer(i); } else { versionStr = JSGetSwfVer(i); } if (versionStr == -1 ) { return false; } else if (versionStr != 0) { if(isIE && isWin && !isOpera) { tempArray = versionStr.split(" "); tempString = tempArray[1]; versionArray = tempString .split(","); } else { versionArray = versionStr.split("."); } versionMajor = versionArray[0]; versionMinor = versionArray[1]; versionRevision = versionArray[2]; versionString = versionMajor + "." + versionRevision; // 7.0r24 == 7.24 versionNum = parseFloat(versionString); // is the major.revision >= requested major.revision AND the minor version >= requested minor if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) { return true; } else { return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false ); } } } }
version https://git-lfs.github.com/spec/v1 oid sha256:ac03974d85317d75edc2dc62eb1c40e9514aae0dcfe5e69e3a62c6d419484632 size 887
version https://git-lfs.github.com/spec/v1 oid sha256:98117aa63db915fed8f72d5c0c414049013e63982817c75864b5e01bb3997090 size 17927
"use strict";import"../../Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js";
var class_mix_e_r_p_1_1_net_1_1_core_1_1_modules_1_1_sales_1_1_setup_1_1_bonus_slabs = [ [ "OnControlLoad", "class_mix_e_r_p_1_1_net_1_1_core_1_1_modules_1_1_sales_1_1_setup_1_1_bonus_slabs.html#ab16b782e4c9f10ebbbc47fd52dbc6ae1", null ], [ "ScrudPlaceholder", "class_mix_e_r_p_1_1_net_1_1_core_1_1_modules_1_1_sales_1_1_setup_1_1_bonus_slabs.html#a3402588f607d9920f295a38336e9ca8d", null ] ];
var class_mix_e_r_p_1_1_net_1_1_entities_1_1_core_1_1_late_fee = [ [ "AccountId", "class_mix_e_r_p_1_1_net_1_1_entities_1_1_core_1_1_late_fee.html#aa5f13daf52f6212580695248d62ed83d", null ], [ "AuditTs", "class_mix_e_r_p_1_1_net_1_1_entities_1_1_core_1_1_late_fee.html#a95210c8ea60bb4107cb1a76b0617e58a", null ], [ "AuditUserId", "class_mix_e_r_p_1_1_net_1_1_entities_1_1_core_1_1_late_fee.html#ad3b75c8f461c7ebc2756c1fddca8991d", null ], [ "IsFlatAmount", "class_mix_e_r_p_1_1_net_1_1_entities_1_1_core_1_1_late_fee.html#a7f09ea80a18909ebaeb1f2c561a63e77", null ], [ "LateFeeCode", "class_mix_e_r_p_1_1_net_1_1_entities_1_1_core_1_1_late_fee.html#af38567944abc8be98c7ac91c30d4f1f5", null ], [ "LateFeeId", "class_mix_e_r_p_1_1_net_1_1_entities_1_1_core_1_1_late_fee.html#a95fd529069d0e5705260329f8d895e5c", null ], [ "LateFeeName", "class_mix_e_r_p_1_1_net_1_1_entities_1_1_core_1_1_late_fee.html#a770c2823bf447fb41c54062fef2334ba", null ], [ "Rate", "class_mix_e_r_p_1_1_net_1_1_entities_1_1_core_1_1_late_fee.html#ab6a4512cbe1dcde39c2ec00be539acbf", null ] ];
var class_peta_poco_1_1_factory = [ [ "ProviderName", "class_peta_poco_1_1_factory.html#ab3fd0d733879b1a810f8d5e3731c721b", null ] ];
// 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. // Copyright 2006 Google Inc. All Rights Reserved. /** * @fileoverview Anchored viewport positioning class with both adjust and * resize options for the popup. * */ goog.provide('goog.positioning.MenuAnchoredPosition'); goog.require('goog.math.Box'); goog.require('goog.math.Coordinate'); goog.require('goog.math.Size'); goog.require('goog.positioning'); goog.require('goog.positioning.AnchoredViewportPosition'); goog.require('goog.positioning.Corner'); goog.require('goog.positioning.CornerBit'); goog.require('goog.positioning.Overflow'); goog.require('goog.positioning.OverflowStatus'); /** * Encapsulates a popup position where the popup is anchored at a corner of * an element. The positioning behavior changes based on the values of * opt_adjust and opt_resize. * * When using this positioning object it's recommended that the movable element * be absolutely positioned. * * @param {Element} anchorElement Element the movable element should be * anchored against. * @param {goog.positioning.Corner} corner Corner of anchored element the * movable element should be positioned at. * @param {boolean} opt_adjust Whether the positioning should be adjusted until * the element fits inside the viewport even if that means that the anchored * corners are ignored. * @param {boolean} opt_resize Whether the positioning should be adjusted until * the element fits inside the viewport on the X axis and it's heigh is * resized so if fits in the viewport. This take precedence over * opt_adjust. * @constructor * @extends {goog.positioning.AnchoredViewportPosition} */ goog.positioning.MenuAnchoredPosition = function(anchorElement, corner, opt_adjust, opt_resize) { goog.positioning.AnchoredViewportPosition.call(this, anchorElement, corner, opt_adjust); /** * Whether the positioning should be adjusted until the element fits inside * the viewport even if that means that the anchored corners are ignored. * @type {boolean|undefined} * @private */ this.resize_ = opt_resize; }; goog.inherits(goog.positioning.MenuAnchoredPosition, goog.positioning.AnchoredViewportPosition); /** * Repositions the movable element. * * @param {Element} movableElement Element to position. * @param {goog.positioning.Corner} movableCorner Corner of the movable element * that should be positioned adjacent to the anchored element. * @param {goog.math.Box} opt_margin A margin specifin pixels. * @param {goog.math.Size} opt_preferredSize Preferred size of the * moveableElement. */ goog.positioning.MenuAnchoredPosition.prototype.reposition = function(movableElement, movableCorner, opt_margin, opt_preferredSize) { if (this.resize_) { goog.positioning.positionAtAnchor(this.element, this.corner, movableElement, movableCorner, null, opt_margin, goog.positioning.Overflow.ADJUST_X | goog.positioning.Overflow.RESIZE_HEIGHT, opt_preferredSize); } else { goog.positioning.MenuAnchoredPosition.superClass_.reposition.call( this, movableElement, movableCorner, opt_margin, opt_preferredSize); } };
let x = { a: (b ? 1 : 2)};
angular.module('examples', []) .factory('formPostData', ['$document', function($document) { return function(url, fields) { var form = angular.element('<form style="display: none;" method="post" action="' + url + '" target="_blank"></form>'); angular.forEach(fields, function(value, name) { var input = angular.element('<input type="hidden" name="' + name + '">'); input.attr('value', value); form.append(input); }); $document.find('body').append(form); form[0].submit(); form.remove(); }; }]) .factory('openPlunkr', ['formPostData', '$http', '$q', function(formPostData, $http, $q) { return function(exampleFolder) { var exampleName = 'AngularJS Example'; // Load the manifest for the example $http.get(exampleFolder + '/manifest.json') .then(function(response) { return response.data; }) .then(function(manifest) { var filePromises = []; // Build a pretty title for the Plunkr var exampleNameParts = manifest.name.split('-'); exampleNameParts.unshift('AngularJS'); angular.forEach(exampleNameParts, function(part, index) { exampleNameParts[index] = part.charAt(0).toUpperCase() + part.substr(1); }); exampleName = exampleNameParts.join(' - '); angular.forEach(manifest.files, function(filename) { filePromises.push($http.get(exampleFolder + '/' + filename, { transformResponse: [] }) .then(function(response) { // The manifests provide the production index file but Plunkr wants // a straight index.html if (filename === "index-production.html") { filename = "index.html" } return { name: filename, content: response.data }; })); }); return $q.all(filePromises); }) .then(function(files) { var postData = {}; angular.forEach(files, function(file) { postData['files[' + file.name + ']'] = file.content; }); postData['tags[0]'] = "angularjs"; postData['tags[1]'] = "example"; postData.private = true; postData.description = exampleName; formPostData('http://plnkr.co/edit/?p=preview', postData); }); }; }]);
/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'autoembed', 'pl', { embeddingInProgress: 'Osadzanie wklejonego adresu URL...', embeddingFailed: 'Ten adres URL multimediów nie może być automatycznie osadzony.' } );
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * Operator --x uses [[Default Value]] * * @path ch11/11.4/11.4.5/S11.4.5_A2.2_T1.js * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) */ //CHECK#1 var object = {valueOf: function() {return 1}}; if (--object !== 1 - 1) { $ERROR('#1: var object = {valueOf: function() {return 1}}; --object === 1 - 1. Actual: ' + (--object)); } else { if (object !== 1 - 1) { $ERROR('#1: var object = {valueOf: function() {return 1}}; --object; object === 1 - 1. Actual: ' + (object)); } } //CHECK#2 var object = {valueOf: function() {return 1}, toString: function() {return 0}}; if (--object !== 1 - 1) { $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; --object === 1 - 1. Actual: ' + (--object)); } else { if (object !== 1 - 1) { $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; --object; object === 1 - 1. Actual: ' + (object)); } } //CHECK#3 var object = {valueOf: function() {return 1}, toString: function() {return {}}}; if (--object !== 1 - 1) { $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; --object === 1 - 1. Actual: ' + (--object)); } else { if (object !== 1 - 1) { $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; --object; object === 1 - 1. Actual: ' + (object)); } } //CHECK#4 try { var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; if (--object !== 1 - 1) { $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; --object === 1 - 1. Actual: ' + (--object)); } else { if (object !== 1 - 1) { $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; --object; object === 1 - 1. Actual: ' + (object)); } } } catch (e) { if (e === "error") { $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; --object not throw "error"'); } else { $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; --object not throw Error. Actual: ' + (e)); } } //CHECK#5 var object = {toString: function() {return 1}}; if (--object !== 1 - 1) { $ERROR('#5.1: var object = {toString: function() {return 1}}; --object === 1 - 1. Actual: ' + (--object)); } else { if (object !== 1 - 1) { $ERROR('#5.2: var object = {toString: function() {return 1}}; --object; object === 1 - 1. Actual: ' + (object)); } } //CHECK#6 var object = {valueOf: function() {return {}}, toString: function() {return 1}} if (--object !== 1 - 1) { $ERROR('#6.1: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; --object === 1 - 1. Actual: ' + (--object)); } else { if (object !== 1 - 1) { $ERROR('#6.2: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; --object; object === 1 - 1. Actual: ' + (object)); } } //CHECK#7 try { var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; --object; $ERROR('#7.1: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; --object throw "error". Actual: ' + (--object)); } catch (e) { if (e !== "error") { $ERROR('#7.2: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; --object throw "error". Actual: ' + (e)); } } //CHECK#8 try { var object = {valueOf: function() {return {}}, toString: function() {return {}}}; --object; $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; --object throw TypeError. Actual: ' + (--object)); } catch (e) { if ((e instanceof TypeError) !== true) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; --object throw TypeError. Actual: ' + (e)); } }
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * The production x *= y is the same as the production x = x * y * * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.6.js * @description Type(x) is different from Type(y) and both types vary between primitive String (primitive or object) and Undefined */ //CHECK#1 x = "1"; x *= undefined; if (isNaN(x) !== true) { $ERROR('#1: x = "1"; x *= undefined; x === Not-a-Number. Actual: ' + (x)); } //CHECK#2 x = undefined; x *= "1"; if (isNaN(x) !== true) { $ERROR('#2: x = undefined; x *= "1"; x === Not-a-Number. Actual: ' + (x)); } //CHECK#3 x = new String("1"); x *= undefined; if (isNaN(x) !== true) { $ERROR('#3: x = new String("1"); x *= undefined; x === Not-a-Number. Actual: ' + (x)); } //CHECK#4 x = undefined; x *= new String("1"); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x *= new String("1"); x === Not-a-Number. Actual: ' + (x)); }
'use strict'; // There's an example D script here to showcase a "slow" handler where it's // wildcard'd by the route name. In "real life" you'd probably start with a // d script that breaks down the route -start and -done, and then you'd want // to see which handler is taking longest from there. // // $ node demo.js // $ curl localhost:9080/foo/bar // $ sudo ./handler-timing.d // ^C // // handler-6 // value ------------- Distribution ------------- count // -1 | 0 // 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 // 1 | 0 // // parseAccept // value ------------- Distribution ------------- count // -1 | 0 // 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 // 1 | 0 // // parseAuthorization // value ------------- Distribution ------------- count // -1 | 0 // 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 // 1 | 0 // // parseDate // value ------------- Distribution ------------- count // -1 | 0 // 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 // 1 | 0 // // parseQueryString // value ------------- Distribution ------------- count // -1 | 0 // 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 // 1 | 0 // // parseUrlEncodedBody // value ------------- Distribution ------------- count // -1 | 0 // 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 // 1 | 0 // // sendResult // value ------------- Distribution ------------- count // 1 | 0 // 2 |@@@@ 1 // 4 | 0 // 8 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 // 16 | 0 // // slowHandler // value ------------- Distribution ------------- count // 64 | 0 // 128 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 // 256 |@@@@ 1 // 512 | 0 // // getfoo // value ------------- Distribution ------------- count // 64 | 0 // 128 |@@@@ 1 // 256 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 // 512 | 0 var restify = require('../../lib'); var Logger = require('bunyan'); ///--- Globals var NAME = 'exampleapp'; ///--- Mainline var log = new Logger({ name: NAME, level: 'trace', service: NAME, serializers: restify.bunyan.serializers }); var server = restify.createServer({ name: NAME, Logger: log, formatters: { 'application/foo': function (req, res, body, cb) { if (body instanceof Error) { body = body.stack; } else if (Buffer.isBuffer(body)) { body = body.toString('base64'); } else { switch (typeof body) { case 'boolean': case 'number': case 'string': body = body.toString(); break; case 'undefined': body = ''; break; default: body = body === null ? '' : 'Demoing application/foo formatter; ' + JSON.stringify(body); break; } } return cb(null, body); } } }); server.use(restify.acceptParser(server.acceptable)); server.use(restify.authorizationParser()); server.use(restify.dateParser()); server.use(restify.queryParser()); server.use(restify.urlEncodedBodyParser()); server.use(function slowHandler(req, res, next) { setTimeout(function () { next(); }, 250); }); server.get({url: '/foo/:id', name: 'GetFoo'}, function (req, res, next) { next(); }, function sendResult(req, res, next) { res.contentType = 'application/foo'; res.send({ hello: req.params.id }); next(); }); server.head('/foo/:id', function (req, res, next) { res.send({ hello: req.params.id }); next(); }); server.put('/foo/:id', function (req, res, next) { res.send({ hello: req.params.id }); next(); }); server.post('/foo/:id', function (req, res, next) { res.json(201, req.params); next(); }); server.del('/foo/:id', function (req, res, next) { res.send(204); next(); }); server.on('after', function (req, res, name) { req.log.info('%s just finished: %d.', name, res.code); }); server.on('NotFound', function (req, res) { res.send(404, req.url + ' was not found'); }); server.listen(9080, function () { log.info('listening: %s', server.url); });
var names = Alloy.Collections.name; function green(str) { return '\x1B[32m' + str + '\x1B[39m'; } function red(str) { return '\x1B[31m' + str + '\x1B[39m'; } // show the info from the selected model function showInfo(e) { // get the model id from the list item var modelId = e.section.getItemAt(e.itemIndex).properties.modelId; // fetch a specific model based on the given id var model = Alloy.createModel('info'); model.fetch({ id: modelId }); // assert we got the right data back var pass = JSON.stringify(model.attributes) === JSON.stringify({ id: modelId, info: 'info ' + modelId }); Ti.API.info('Assert single info model returned with "{id:' + modelId + '}": ' + (pass ? green('OK') : red('FAIL'))); } // fetch the data to update the UI names.fetch(); // open the window $.index.open();
//// [tests/cases/compiler/extendingClassFromAliasAndUsageInIndexer.ts] //// //// [extendingClassFromAliasAndUsageInIndexer_backbone.ts] export class Model { public someData: string; } //// [extendingClassFromAliasAndUsageInIndexer_moduleA.ts] import Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); export class VisualizationModel extends Backbone.Model { // interesting stuff here } //// [extendingClassFromAliasAndUsageInIndexer_moduleB.ts] import Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); export class VisualizationModel extends Backbone.Model { // different interesting stuff here } //// [extendingClassFromAliasAndUsageInIndexer_main.ts] import Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); import moduleA = require("./extendingClassFromAliasAndUsageInIndexer_moduleA"); import moduleB = require("./extendingClassFromAliasAndUsageInIndexer_moduleB"); interface IHasVisualizationModel { VisualizationModel: typeof Backbone.Model; } var moduleATyped: IHasVisualizationModel = moduleA; var moduleMap: { [key: string]: IHasVisualizationModel } = { "moduleA": moduleA, "moduleB": moduleB }; var moduleName: string; var visModel = new moduleMap[moduleName].VisualizationModel(); //// [extendingClassFromAliasAndUsageInIndexer_backbone.js] "use strict"; var Model = (function () { function Model() { } return Model; }()); exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { _super.apply(this, arguments); } return VisualizationModel; }(Backbone.Model)); exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); function VisualizationModel() { _super.apply(this, arguments); } return VisualizationModel; }(Backbone.Model)); exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_main.js] "use strict"; var moduleA = require("./extendingClassFromAliasAndUsageInIndexer_moduleA"); var moduleB = require("./extendingClassFromAliasAndUsageInIndexer_moduleB"); var moduleATyped = moduleA; var moduleMap = { "moduleA": moduleA, "moduleB": moduleB }; var moduleName; var visModel = new moduleMap[moduleName].VisualizationModel();
import getCompletions from "./get-completions" // Add an autosuggest completer export const addAutosuggestionCompleters = (ori, system) => (context) => { return ori(context).concat([{ getCompletions(...args) { // Add `context`, then `system` as the last args return getCompletions(...args, context, system) } }]) }
var foo = arr.map(v => ({ x: v.bar, y: v.bar * 2 })); var fn = () => ({}).key;
// Copyright 2008 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS-IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * @fileoverview Generator for unique element IDs. * */ goog.provide('goog.ui.IdGenerator'); /** * Creates a new id generator. * @constructor */ goog.ui.IdGenerator = function() { }; goog.addSingletonGetter(goog.ui.IdGenerator); /** * Next unique ID to use * @type {number} * @private */ goog.ui.IdGenerator.prototype.nextId_ = 0; /** * Gets the next unique ID. * @return {string} The next unique identifier. */ goog.ui.IdGenerator.prototype.getNextUniqueId = function() { return ':' + (this.nextId_++).toString(36); }; /** * Default instance for id generation. Done as an instance instead of statics * so it's possible to inject a mock for unit testing purposes. * @type {goog.ui.IdGenerator} * @deprecated Use goog.ui.IdGenerator.getInstance() instead and do not refer * to goog.ui.IdGenerator.instance anymore. */ goog.ui.IdGenerator.instance = goog.ui.IdGenerator.getInstance();
version https://git-lfs.github.com/spec/v1 oid sha256:df5a7287a63d8b28fe1df2552b7f2deaa719327f8aa49fef192f5fb72bbbbaad size 4023
'use strict'; var path = require('path'); var mergeTrees = require('broccoli-merge-trees'); var SassCompiler = require('../broccoli-sass'); function SASSPlugin() { this.name = 'ember-cli-sass'; this.ext = ['scss', 'sass']; } SASSPlugin.prototype.toTree = function(tree, inputPath, outputPath, inputOptions) { var options = inputOptions; var inputTrees = [tree]; if (options.includePaths) { inputTrees = inputTrees.concat(options.includePaths); } var ext = options.extension || 'scss'; var paths = options.outputPaths; var trees = Object.keys(paths).map(function(file) { var input = path.join(inputPath, file + '.' + ext); var output = paths[file]; return new SassCompiler(inputTrees, input, output, options); }); return mergeTrees(trees); }; module.exports = { name: 'ember-cli-sass', setupPreprocessorRegistry: function(type, registry) { registry.add('css', new SASSPlugin()); }, };
declare class X { a: number; static b: number; c: number; }
// eSpeak and other code here are under the GNU GPL. function generateSpeech(text, args) { var self = { text: text, args: args, ret: null }; (function() {
/******/ (function() { // webpackBootstrap /******/ "use strict"; /******/ /******/ /******/ })() ;
/** * * SugarCRM Community Edition is a customer relationship management program developed by * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. * * SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd. * Copyright (C) 2011 - 2018 SalesAgility Ltd. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by the * Free Software Foundation with the addition of the following permission added * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not * reasonably feasible for technical reasons, the Appropriate Legal Notices must * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". */ var aclviewer = function () { var lastDisplay = ''; return { view: function (role_id, role_module) { YAHOO.util.Connect.asyncRequest('POST', 'index.php', { 'success': aclviewer.display, 'failure': aclviewer.failed }, 'module=ACLRoles&action=EditRole&record=' + role_id + '&category_name=' + role_module); ajaxStatus.showStatus(SUGAR.language.get('app_strings', 'LBL_REQUEST_PROCESSED')); }, save: function (form_name) { var formObject = document.getElementById(form_name); YAHOO.util.Connect.setForm(formObject); YAHOO.util.Connect.asyncRequest('POST', 'index.php', { 'success': aclviewer.postSave, 'failure': aclviewer.failed }); ajaxStatus.showStatus(SUGAR.language.get('app_strings', 'LBL_SAVING')); }, postSave: function (o) { SUGAR.util.globalEval(o.responseText); aclviewer.view(result['role_id'], result['module']); }, display: function (o) { aclviewer.lastDisplay = ''; ajaxStatus.flashStatus('Done'); document.getElementById('category_data').innerHTML = o.responseText; }, failed: function () { ajax.flashStatus('Could Not Connect'); }, toggleDisplay: function (id) { if (aclviewer.lastDisplay != '' && typeof(aclviewer.lastDisplay) != 'undefined') { aclviewer.hideDisplay(aclviewer.lastDisplay); } if (aclviewer.lastDisplay != id) { aclviewer.showDisplay(id); aclviewer.lastDisplay = id; } else { aclviewer.lastDisplay = ''; } }, hideDisplay: function (id) { document.getElementById(id).style.display = 'none'; document.getElementById(id + 'link').style.display = ''; }, showDisplay: function (id) { document.getElementById(id).style.display = ''; document.getElementById(id + 'link').style.display = 'none'; } }; }();
/** * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ !(function(document, $) { "use strict"; function initMinicolorsField (event) { $(event.target).find('.minicolors').each(function() { $(this).minicolors({ control: $(this).attr('data-control') || 'hue', format: $(this).attr('data-validate') === 'color' ? 'hex' : ($(this).attr('data-format') === 'rgba' ? 'rgb' : $(this).attr('data-format')) || 'hex', keywords: $(this).attr('data-keywords') || '', opacity: $(this).attr('data-format') === 'rgba', position: $(this).attr('data-position') || 'default', swatches: $(this).attr('data-colors') ? $(this).attr('data-colors').split(",") : [], theme: 'bootstrap' }); }); } /** * Initialize at an initial page load */ document.addEventListener("DOMContentLoaded", initMinicolorsField); /** * Initialize when a part of the page was updated */ document.addEventListener("joomla:updated", initMinicolorsField); })(document, jQuery);
/** * Plugin that highlights matched word partials in a given element. * TODO: Add a function for restoring the previous text. * TODO: Accept mappings for converting shortcuts like WP: to Wikipedia:. */ ( function ( $ ) { $.highlightText = { // Split our pattern string at spaces and run our highlight function on the results splitAndHighlight: function ( node, pat ) { var i, patArray = pat.split( ' ' ); for ( i = 0; i < patArray.length; i++ ) { if ( patArray[i].length === 0 ) { continue; } $.highlightText.innerHighlight( node, patArray[i] ); } return node; }, // scans a node looking for the pattern and wraps a span around each match innerHighlight: function ( node, pat ) { var i, match, pos, spannode, middlebit, middleclone; // if this is a text node if ( node.nodeType === 3 ) { // TODO - need to be smarter about the character matching here. // non latin characters can make regex think a new word has begun: do not use \b // http://stackoverflow.com/questions/3787072/regex-wordwrap-with-utf8-characters-in-js // look for an occurrence of our pattern and store the starting position match = node.data.match( new RegExp( "(^|\\s)" + $.escapeRE( pat ), "i" ) ); if ( match ) { pos = match.index + match[1].length; // include length of any matched spaces // create the span wrapper for the matched text spannode = document.createElement( 'span' ); spannode.className = 'highlight'; // shave off the characters preceding the matched text middlebit = node.splitText( pos ); // shave off any unmatched text off the end middlebit.splitText( pat.length ); // clone for appending to our span middleclone = middlebit.cloneNode( true ); // append the matched text node to the span spannode.appendChild( middleclone ); // replace the matched node, with our span-wrapped clone of the matched node middlebit.parentNode.replaceChild( spannode, middlebit ); } // if this is an element with childnodes, and not a script, style or an element we created } else if ( node.nodeType === 1 && node.childNodes && !/(script|style)/i.test( node.tagName ) && !( node.tagName.toLowerCase() === 'span' && node.className.match( /\bhighlight/ ) ) ) { for ( i = 0; i < node.childNodes.length; ++i ) { // call the highlight function for each child node $.highlightText.innerHighlight( node.childNodes[i], pat ); } } } }; $.fn.highlightText = function ( matchString ) { return this.each( function () { var $el = $( this ); $el.data( 'highlightText', { originalText: $el.text() } ); $.highlightText.splitAndHighlight( this, matchString ); } ); }; }( jQuery ) );
odoo.define('web.domain_tests', function (require) { "use strict"; var Domain = require('web.Domain'); QUnit.module('core', {}, function () { QUnit.module('domain'); QUnit.test("basic", function (assert) { assert.expect(3); var fields = { a: 3, group_method: 'line', select1: 'day', rrule_type: 'monthly', }; assert.ok(new Domain([['a', '=', 3]]).compute(fields)); assert.ok(new Domain([['group_method','!=','count']]).compute(fields)); assert.ok(new Domain([['select1','=','day'], ['rrule_type','=','monthly']]).compute(fields)); }); QUnit.test("or", function (assert) { assert.expect(3); var web = { section_id: null, user_id: null, member_ids: null, }; var currentDomain = [ '|', ['section_id', '=', 42], '|', ['user_id', '=', 3], ['member_ids', 'in', [3]] ]; assert.ok(new Domain(currentDomain).compute(_.extend({}, web, {section_id: 42}))); assert.ok(new Domain(currentDomain).compute(_.extend({}, web, {user_id: 3}))); assert.ok(new Domain(currentDomain).compute(_.extend({}, web, {member_ids: 3}))); }); QUnit.test("not", function (assert) { assert.expect(2); var fields = { a: 5, group_method: 'line', }; assert.ok(new Domain(['!', ['a', '=', 3]]).compute(fields)); assert.ok(new Domain(['!', ['group_method','=','count']]).compute(fields)); }); QUnit.test("domains initialized with a number", function (assert) { assert.expect(2); assert.ok(new Domain(1).compute({})); assert.notOk(new Domain(0).compute({})); }); }); });
/* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'elementspath', 'ca', { eleLabel: 'Ruta dels elements', eleTitle: '%1 element' } );
var colors = require('../safe'); console.log(colors.yellow('First some yellow text')); console.log(colors.yellow.underline('Underline that text')); console.log(colors.red.bold('Make it bold and red')); console.log(colors.rainbow('Double Raindows All Day Long')); console.log(colors.trap('Drop the bass')); console.log(colors.rainbow(colors.trap('DROP THE RAINBOW BASS'))); // styles not widely supported console.log(colors.bold.italic.underline.red('Chains are also cool.')); // styles not widely supported console.log(colors.green('So ') + colors.underline('are') + ' ' + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); console.log(colors.zebra('Zebras are so fun!')); console.log('This is ' + colors.strikethrough('not') + ' fun.'); console.log(colors.black.bgWhite('Background color attack!')); console.log(colors.random('Use random styles on everything!')); console.log(colors.america('America, Heck Yeah!')); console.log(colors.brightCyan('Blindingly ') + colors.brightRed('bright? ') + colors.brightYellow('Why ') + colors.brightGreen('not?!')); console.log('Setting themes is useful'); // // Custom themes // // console.log('Generic logging theme as JSON'.green.bold.underline); // Load theme with JSON literal colors.setTheme({ silly: 'rainbow', input: 'blue', verbose: 'cyan', prompt: 'grey', info: 'green', data: 'grey', help: 'cyan', warn: 'yellow', debug: 'blue', error: 'red', }); // outputs red text console.log(colors.error('this is an error')); // outputs yellow text console.log(colors.warn('this is a warning')); // outputs blue text console.log(colors.input('this is an input')); // console.log('Generic logging theme as file'.green.bold.underline); // Load a theme from file colors.setTheme(require(__dirname + '/../themes/generic-logging.js')); // outputs red text console.log(colors.error('this is an error')); // outputs yellow text console.log(colors.warn('this is a warning')); // outputs grey text console.log(colors.input('this is an input')); // console.log(colors.zalgo("Don't summon him"))
// Copyright 2009 the Sputnik authors. All rights reserved. /** * Operator x ? y : z uses GetValue * * @path ch11/11.12/S11.12_A2.1_T3.js * @description If ToBoolean(x) is true and GetBase(y) is null, throw ReferenceError */ //CHECK#1 try { true ? y : false; $ERROR('#1.1: true ? y : false throw ReferenceError. Actual: ' + (true ? y : false)); } catch (e) { if ((e instanceof ReferenceError) !== true) { $ERROR('#1.2: true ? y : false throw ReferenceError. Actual: ' + (e)); } }
//// [invalidThisEmitInContextualObjectLiteral.ts] interface IDef { p1: (e:string) => void; p2: () => (n: number) => any; } class TestController { public m(def: IDef) { } public p = this.m({ p1: e => { }, p2: () => { return vvvvvvvvv => this; }, }); } //// [invalidThisEmitInContextualObjectLiteral.js] var TestController = (function () { function TestController() { var _this = this; this.p = this.m({ p1: function (e) { }, p2: function () { return function (vvvvvvvvv) { return _this; }; } }); } TestController.prototype.m = function (def) { }; return TestController; }());
/** * Add your manual test filenames and display names below. **/ var tests = [ { href: "test-add.html", name: "Add Events" }, { href: "test-delete.html", name: "Delete Events" }, { href: "test-tracks.html", name: "Add Tracks" }, { href: "test-vimeo.html", name: "Change Media to Vimeo" }, { href: "test-youtube.html", name: "Change Media to YouTube" }, { href: "test-save.html", name: "Save and Load" }, { href: "test-share.html", name: "Share HTML5 project" }, { href: "test-sharevimeo.html", name: "Share Vimeo project" }, { href: "test-shareyoutube.html", name: "Share YouTube project" }, { href: "test-export.html", name: "Export HTML5 project" } ].reverse();
/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Horizontal Page Break */ // Register a plugin named "pagebreak". CKEDITOR.plugins.add( 'pagebreak', { init : function( editor ) { // Register the command. editor.addCommand( 'pagebreak', CKEDITOR.plugins.pagebreakCmd ); // Register the toolbar button. editor.ui.addButton( 'PageBreak', { label : editor.lang.pagebreak, command : 'pagebreak' }); // Add the style that renders our placeholder. editor.addCss( 'img.cke_pagebreak' + '{' + 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/pagebreak.gif' ) + ');' + 'background-position: center center;' + 'background-repeat: no-repeat;' + 'clear: both;' + 'display: block;' + 'float: none;' + 'width: 100%;' + 'border-top: #999999 1px dotted;' + 'border-bottom: #999999 1px dotted;' + 'height: 5px;' + '}' ); }, afterInit : function( editor ) { // Register a filter to displaying placeholders after mode change. var dataProcessor = editor.dataProcessor, dataFilter = dataProcessor && dataProcessor.dataFilter; if ( dataFilter ) { dataFilter.addRules( { elements : { div : function( element ) { var attributes = element.attributes, style = attributes && attributes.style, child = style && element.children.length == 1 && element.children[ 0 ], childStyle = child && ( child.name == 'span' ) && child.attributes.style; if ( childStyle && ( /page-break-after\s*:\s*always/i ).test( style ) && ( /display\s*:\s*none/i ).test( childStyle ) ) return editor.createFakeParserElement( element, 'cke_pagebreak', 'div' ); } } }); } }, requires : [ 'fakeobjects' ] }); CKEDITOR.plugins.pagebreakCmd = { exec : function( editor ) { // Create the element that represents a print break. var breakObject = CKEDITOR.dom.element.createFromHtml( '<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>' ); // Creates the fake image used for this element. breakObject = editor.createFakeElement( breakObject, 'cke_pagebreak', 'div' ); var ranges = editor.getSelection().getRanges(); for ( var range, i = 0 ; i < ranges.length ; i++ ) { range = ranges[ i ]; if ( i > 0 ) breakObject = breakObject.clone( true ); range.splitBlock( 'p' ); range.insertNode( breakObject ); } } };
define(["dojo/_base/declare","./AnalogIndicatorBase"], function(declare, AnalogIndicatorBase) { return declare("dojox.gauges.AnalogArrowIndicator", [AnalogIndicatorBase],{ // summary: // An indicator for the AnalogGauge that draws an arrow. The arrow is drawn on the angle that corresponds // to the value of the indicator. _getShapes: function(group){ // summary: // Override of dojox.gauges.AnalogLineIndicator._getShapes if(!this._gauge){ return null; } var color = this.color ? this.color : 'black'; var strokeColor = this.strokeColor ? this.strokeColor : color; var stroke = { color: strokeColor, width: 1}; if (this.color.type && !this.strokeColor){ stroke.color = this.color.colors[0].color; } var x = Math.floor(this.width/2); var head = this.width * 5; var odd = (this.width & 1); var shapes = []; var points = [{x:-x, y:0}, {x:-x, y:-this.length+head}, {x:-2*x, y:-this.length+head}, {x:0, y:-this.length}, {x:2*x+odd,y:-this.length+head}, {x:x+odd, y:-this.length+head}, {x:x+odd, y:0}, {x:-x, y:0}]; shapes[0] = group.createPolyline(points) .setStroke(stroke) .setFill(color); shapes[1] = group.createLine({ x1:-x, y1: 0, x2: -x, y2:-this.length+head }) .setStroke({color: this.highlight}); shapes[2] = group.createLine({ x1:-x-3, y1: -this.length+head, x2: 0, y2:-this.length }) .setStroke({color: this.highlight}); shapes[3] = group.createCircle({cx: 0, cy: 0, r: this.width}) .setStroke(stroke) .setFill(color); return shapes; } }); });
/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'save', 'af', { toolbar: 'Bewaar' } );
define( //begin v1.x content { "field-sat-relative+0": "เสาร์นี้", "field-sat-relative+1": "เสาร์หน้า", "field-dayperiod": "ช่วงวัน", "field-sun-relative+-1": "อาทิตย์ที่แล้ว", "field-mon-relative+-1": "จันทร์ที่แล้ว", "field-minute": "นาที", "field-day-relative+-1": "เมื่อวาน", "field-weekday": "วันในสัปดาห์", "field-day-relative+-2": "เมื่อวานซืน", "months-standAlone-narrow": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13" ], "field-era": "สมัย", "field-hour": "ชั่วโมง", "field-sun-relative+0": "อาทิตย์นี้", "field-sun-relative+1": "อาทิตย์หน้า", "months-standAlone-abbr": [ "เมสเคอเรม", "เตเกมท", "เฮดาร์", "ทาฮ์ซัส", "เทอร์", "เยคาทิท", "เมกาบิต", "เมียเซีย", "เจนบอต", "เซเน", "ฮัมเล", "เนแฮซ", "พากูเมน" ], "field-wed-relative+-1": "พุธที่แล้ว", "field-day-relative+0": "วันนี้", "field-day-relative+1": "พรุ่งนี้", "field-day-relative+2": "มะรืนนี้", "field-tue-relative+0": "อังคารนี้", "field-zone": "เขตเวลา", "field-tue-relative+1": "อังคารหน้า", "field-week-relative+-1": "สัปดาห์ที่แล้ว", "field-year-relative+0": "ปีนี้", "field-year-relative+1": "ปีหน้า", "field-sat-relative+-1": "เสาร์ที่แล้ว", "field-year-relative+-1": "ปีที่แล้ว", "field-year": "ปี", "field-fri-relative+0": "ศุกร์นี้", "field-fri-relative+1": "ศุกร์หน้า", "months-standAlone-wide": [ "เมสเคอเรม", "เตเกมท", "เฮดาร์", "ทาฮ์ซัส", "เทอร์", "เยคาทิท", "เมกาบิต", "เมียเซีย", "เจนบอต", "เซเน", "ฮัมเล", "เนแฮซ", "พากูเมน" ], "field-week": "สัปดาห์", "field-week-relative+0": "สัปดาห์นี้", "field-week-relative+1": "สัปดาห์หน้า", "months-format-abbr": [ "เมสเคอเรม", "เตเกมท", "เฮดาร์", "ทาฮ์ซัส", "เทอร์", "เยคาทิท", "เมกาบิต", "เมียเซีย", "เจนบอต", "เซเน", "ฮัมเล", "เนแฮซ", "พากูเมน" ], "field-month-relative+0": "เดือนนี้", "field-month": "เดือน", "field-month-relative+1": "เดือนหน้า", "field-fri-relative+-1": "ศุกร์ที่แล้ว", "field-second": "วินาที", "field-tue-relative+-1": "อังคารที่แล้ว", "field-day": "วัน", "months-format-narrow": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13" ], "field-mon-relative+0": "จันทร์นี้", "field-mon-relative+1": "จันทร์หน้า", "field-thu-relative+0": "พฤหัสนี้", "field-second-relative+0": "ขณะนี้", "field-thu-relative+1": "พฤหัสหน้า", "months-format-wide": [ "เมสเคอเรม", "เตเกมท", "เฮดาร์", "ทาฮ์ซัส", "เทอร์", "เยคาทิท", "เมกาบิต", "เมียเซีย", "เจนบอต", "เซเน", "ฮัมเล", "เนแฮซ", "พากูเมน" ], "field-wed-relative+0": "พุธนี้", "field-wed-relative+1": "พุธหน้า", "field-month-relative+-1": "เดือนที่แล้ว", "field-thu-relative+-1": "พฤหัสที่แล้ว" } //end v1.x content );
/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */ /** * @class The Yahoo global namespace */ var YAHOO = function() { return { /** * Yahoo presentation platform utils namespace */ util: {}, /** * Yahoo presentation platform widgets namespace */ widget: {}, /** * Yahoo presentation platform examples namespace */ example: {}, /** * Returns the namespace specified and creates it if it doesn't exist * * YAHOO.namespace("property.package"); * YAHOO.namespace("YAHOO.property.package"); * * Either of the above would create YAHOO.property, then * YAHOO.property.package * * @param {String} sNameSpace String representation of the desired * namespace * @return {Object} A reference to the namespace object */ namespace: function( sNameSpace ) { if (!sNameSpace || !sNameSpace.length) { return null; } var levels = sNameSpace.split("."); var currentNS = YAHOO; // YAHOO is implied, so it is ignored if it is included for (var i=(levels[0] == "YAHOO") ? 1 : 0; i<levels.length; ++i) { currentNS[levels[i]] = currentNS[levels[i]] || {}; currentNS = currentNS[levels[i]]; } return currentNS; } }; } ();
// Generated by CoffeeScript 1.12.0 /* ExternalEditor Kevin Gravier <kevin@mrkmg.com> MIT */ (function() { var ReadFileError, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; ReadFileError = (function(superClass) { extend(ReadFileError, superClass); ReadFileError.prototype.message = 'Failed to read temporary file'; function ReadFileError(original_error) { this.original_error = original_error; } return ReadFileError; })(Error); module.exports = ReadFileError; }).call(this);
//// [classDeclarationBlockScoping1.ts] class C { } { class C { } } //// [classDeclarationBlockScoping1.js] var C = (function () { function C() { } return C; }()); { var C_1 = (function () { function C_1() { } return C_1; }()); }
(function (factory) { if (typeof define === 'function' && define.amd) { define(['jquery'], factory); } else if (typeof module === 'object' && typeof module.exports === 'object') { factory(require('jquery')); } else { factory(jQuery); } }(function (jQuery) { // Amharic jQuery.timeago.settings.strings = { prefixAgo: null, prefixFromNow: null, suffixAgo: "በፊት", suffixFromNow: "በኋላ", seconds: "ከአንድ ደቂቃ በታች", minute: "ከአንድ ደቂቃ ገደማ", minutes: "ከ%d ደቂቃ", hour: "ከአንድ ሰዓት ገደማ", hours: "ከ%d ሰዓት ገደማ", day: "ከአንድ ቀን", days: "ከ%d ቀን", month: "ከአንድ ወር ገደማ", months: "ከ%d ወር", year: "ከአንድ ዓመት ገደማ", years: "ከ%d ዓመት", wordSeparator: " ", numbers: [] }; }));
import { changeProperties } from './property_events'; import { set } from './property_set'; /** Set a list of properties on an object. These properties are set inside a single `beginPropertyChanges` and `endPropertyChanges` batch, so observers will be buffered. ```javascript let anObject = Ember.Object.create(); anObject.setProperties({ firstName: 'Stanley', lastName: 'Stuart', age: 21 }); ``` @method setProperties @param obj @param {Object} properties @return properties @public */ export default function setProperties(obj, properties) { if (!properties || typeof properties !== 'object') { return properties; } changeProperties(() => { let props = Object.keys(properties); let propertyName; for (let i = 0; i < props.length; i++) { propertyName = props[i]; set(obj, propertyName, properties[propertyName]); } }); return properties; }
var five = require("../lib/johnny-five.js"); var board = new five.Board(); board.on("ready", function() { var temperature = new five.Temperature({ controller: "MPL115A2" }); temperature.on("data", function() { console.log("temperature"); console.log(" celsius : ", this.celsius); console.log(" fahrenheit : ", this.fahrenheit); console.log(" kelvin : ", this.kelvin); console.log("--------------------------------------"); }); }); // @markdown // - [MPL115A2 - I2C Barometric Pressure/Temperature Sensor](https://www.adafruit.com/product/992) // @markdown
/* Norwegian initialisation for the jQuery UI date picker plugin. */ /* Written by Naimdjon Takhirov (naimdjon@gmail.com). */ jQuery(function($){ $.datepicker.regional['no'] = { closeText: 'Lukk', prevText: '&laquo;Forrige', nextText: 'Neste&raquo;', currentText: 'I dag', monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'], monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'], dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'], dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'], dayNamesMin: ['sø','ma','ti','on','to','fr','lø'], weekHeader: 'Uke', dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: '' }; $.datepicker.setDefaults($.datepicker.regional['no']); });
/** * @fileoverview Rule to check for tabs inside a file * @author Gyandeep Singh */ "use strict"; //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ const regex = /\t/; //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ module.exports = { meta: { docs: { description: "disallow all tabs", category: "Stylistic Issues", recommended: false }, schema: [] }, create(context) { return { Program(node) { context.getSourceLines().forEach((line, index) => { const match = regex.exec(line); if (match) { context.report({ node, loc: { line: index + 1, column: match.index + 1 }, message: "Unexpected tab character." }); } }); } }; } };
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var cordovaConfig = require("./cordova-config"); describe('parseConfig function', function () { it('should return {} when the config does not contain a widget', function () { var result = cordovaConfig.parseConfig({}); expect(result).toEqual({}); }); it('should return a CordovaProject without id or version if config.$ does not exist', function () { var result = cordovaConfig.parseConfig({ widget: { name: ['thename'], } }); expect(result).toEqual({ name: 'thename', }); }); it('should return a CordovaProject on success', function () { var result = cordovaConfig.parseConfig({ widget: { name: ['thename'], $: { id: 'theid', version: 'theversion' } } }); expect(result).toEqual({ name: 'thename', id: 'theid', version: 'theversion' }); }); }); /* describe('buildCordovaConfig', () => { it('should read the config.xml file', (done) => { let fs: any = jest.genMockFromModule('fs'); fs.readFile = jest.fn().mockReturnValue('blah'); jest.mock('xml2js', function() { return { Parser: function() { return { parseString: function (data, cb) { cb(null, 'parseConfigData'); } }; } }; }); function daCallback() { expect(fs.readfile).toHaveBeenCalledWith('config.xml'); done(); } cordovaConfig.buildCordovaConfig(daCallback, daCallback); }); }); */
define(["./_base", "dojo/_base/lang", "./matrix"], function (g, lang, m){ function eq(/* Number */ a, /* Number */ b){ // summary: // compare two FP numbers for equality return Math.abs(a - b) <= 1e-6 * (Math.abs(a) + Math.abs(b)); // Boolean } function calcFromValues(/* Number */ r1, /* Number */ m1, /* Number */ r2, /* Number */ m2){ // summary: // uses two close FP ration and their original magnitudes to approximate the result if(!isFinite(r1)){ return r2; // Number }else if(!isFinite(r2)){ return r1; // Number } m1 = Math.abs(m1); m2 = Math.abs(m2); return (m1 * r1 + m2 * r2) / (m1 + m2); // Number } function transpose(matrix){ // matrix: dojox/gfx/matrix.Matrix2D // a 2D matrix-like object var M = new m.Matrix2D(matrix); return lang.mixin(M, {dx: 0, dy: 0, xy: M.yx, yx: M.xy}); // dojox/gfx/matrix.Matrix2D } function scaleSign(/* dojox/gfx/matrix.Matrix2D */ matrix){ return (matrix.xx * matrix.yy < 0 || matrix.xy * matrix.yx > 0) ? -1 : 1; // Number } function eigenvalueDecomposition(matrix){ // matrix: dojox/gfx/matrix.Matrix2D // a 2D matrix-like object var M = m.normalize(matrix), b = -M.xx - M.yy, c = M.xx * M.yy - M.xy * M.yx, d = Math.sqrt(b * b - 4 * c), l1 = -(b + (b < 0 ? -d : d)) / 2, l2 = c / l1, vx1 = M.xy / (l1 - M.xx), vy1 = 1, vx2 = M.xy / (l2 - M.xx), vy2 = 1; if(eq(l1, l2)){ vx1 = 1, vy1 = 0, vx2 = 0, vy2 = 1; } if(!isFinite(vx1)){ vx1 = 1, vy1 = (l1 - M.xx) / M.xy; if(!isFinite(vy1)){ vx1 = (l1 - M.yy) / M.yx, vy1 = 1; if(!isFinite(vx1)){ vx1 = 1, vy1 = M.yx / (l1 - M.yy); } } } if(!isFinite(vx2)){ vx2 = 1, vy2 = (l2 - M.xx) / M.xy; if(!isFinite(vy2)){ vx2 = (l2 - M.yy) / M.yx, vy2 = 1; if(!isFinite(vx2)){ vx2 = 1, vy2 = M.yx / (l2 - M.yy); } } } var d1 = Math.sqrt(vx1 * vx1 + vy1 * vy1), d2 = Math.sqrt(vx2 * vx2 + vy2 * vy2); if(!isFinite(vx1 /= d1)){ vx1 = 0; } if(!isFinite(vy1 /= d1)){ vy1 = 0; } if(!isFinite(vx2 /= d2)){ vx2 = 0; } if(!isFinite(vy2 /= d2)){ vy2 = 0; } return { // Object value1: l1, value2: l2, vector1: {x: vx1, y: vy1}, vector2: {x: vx2, y: vy2} }; } function decomposeSR(/* dojox/gfx/matrix.Matrix2D */ M, /* Object */ result){ // summary: // decomposes a matrix into [scale, rotate]; no checks are done. var sign = scaleSign(M), a = result.angle1 = (Math.atan2(M.yx, M.yy) + Math.atan2(-sign * M.xy, sign * M.xx)) / 2, cos = Math.cos(a), sin = Math.sin(a); result.sx = calcFromValues(M.xx / cos, cos, -M.xy / sin, sin); result.sy = calcFromValues(M.yy / cos, cos, M.yx / sin, sin); return result; // Object } function decomposeRS(/* dojox/gfx/matrix.Matrix2D */ M, /* Object */ result){ // summary: // decomposes a matrix into [rotate, scale]; no checks are done var sign = scaleSign(M), a = result.angle2 = (Math.atan2(sign * M.yx, sign * M.xx) + Math.atan2(-M.xy, M.yy)) / 2, cos = Math.cos(a), sin = Math.sin(a); result.sx = calcFromValues(M.xx / cos, cos, M.yx / sin, sin); result.sy = calcFromValues(M.yy / cos, cos, -M.xy / sin, sin); return result; // Object } return g.decompose = function(matrix){ // summary: // Decompose a 2D matrix into translation, scaling, and rotation components. // description: // This function decompose a matrix into four logical components: // translation, rotation, scaling, and one more rotation using SVD. // The components should be applied in following order: // | [translate, rotate(angle2), scale, rotate(angle1)] // matrix: dojox/gfx/matrix.Matrix2D // a 2D matrix-like object var M = m.normalize(matrix), result = {dx: M.dx, dy: M.dy, sx: 1, sy: 1, angle1: 0, angle2: 0}; // detect case: [scale] if(eq(M.xy, 0) && eq(M.yx, 0)){ return lang.mixin(result, {sx: M.xx, sy: M.yy}); // Object } // detect case: [scale, rotate] if(eq(M.xx * M.yx, -M.xy * M.yy)){ return decomposeSR(M, result); // Object } // detect case: [rotate, scale] if(eq(M.xx * M.xy, -M.yx * M.yy)){ return decomposeRS(M, result); // Object } // do SVD var MT = transpose(M), u = eigenvalueDecomposition([M, MT]), v = eigenvalueDecomposition([MT, M]), U = new m.Matrix2D({xx: u.vector1.x, xy: u.vector2.x, yx: u.vector1.y, yy: u.vector2.y}), VT = new m.Matrix2D({xx: v.vector1.x, xy: v.vector1.y, yx: v.vector2.x, yy: v.vector2.y}), S = new m.Matrix2D([m.invert(U), M, m.invert(VT)]); decomposeSR(VT, result); S.xx *= result.sx; S.yy *= result.sy; decomposeRS(U, result); S.xx *= result.sx; S.yy *= result.sy; return lang.mixin(result, {sx: S.xx, sy: S.yy}); // Object }; });
// This file contains methods responsible for removing a node. import { hooks } from "./lib/removal-hooks"; export function remove() { this._assertUnremoved(); this.resync(); if (this._callRemovalHooks()) { this._markRemoved(); return; } this.shareCommentsWithSiblings(); this._remove(); this._markRemoved(); } export function _callRemovalHooks() { for (let fn of (hooks: Array<Function>)) { if (fn(this, this.parentPath)) return true; } } export function _remove() { if (Array.isArray(this.container)) { this.container.splice(this.key, 1); this.updateSiblingKeys(this.key, -1); } else { this._replaceWith(null); } } export function _markRemoved() { this.shouldSkip = true; this.removed = true; this.node = null; } export function _assertUnremoved() { if (this.removed) { throw this.buildCodeFrameError("NodePath has been removed so is read-only."); } }
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var numPings = 0; chrome.extension.onRequest.addListener(function(data) { if (data != "ping") chrome.test.fail("Unexpected request: " + JSON.stringify(data)); if (++numPings == 2) chrome.test.notifyPass(); }); chrome.test.getConfig(function(config) { var test_file_url = "http://localhost:PORT/files/extensions/test_file.html" .replace(/PORT/, config.testServer.port); // Add a window. var w = window.open(test_file_url); // Add an iframe. var iframe = document.createElement("iframe"); iframe.src = test_file_url; document.getElementById("iframeContainer").appendChild(iframe); });
exports.setupMockScopes = function (nock) { var scopes = []; var scope; scope = nock('https://login.live.com:443') .post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-145565886-1510793020-2797717260-1526195933-3912359816-44086043-2211002316&client_secret=FF9yfJLxSH3uI32wNKGye643bAZ4zBz7&scope=notify.windows.com") .reply(200, "{\"token_type\":\"bearer\",\"access_token\":\"EgAaAQMAAAAEgAAACoAAnbulrnfYRgTGFe6tudBvFCf/ng+gabEI1++PZpSEktmcoU3/Tj9tEKuZj4Q1eV+UJhR4DWtNgnpVgBq9CkTQfEyCqZ/kUWtlAk98dwXfsmFJMI5FL/AvPnD2CCNiXtuTNCs/HB10Hbr1ZTemjbdby5Ht8AIhQqr9Cz7KI6sZM5eJAFoAiQAAAAAAaoEORO9LJFHvSyRR60gEAA0ANjcuMTg1LjE0OC44AAAAAABcAG1zLWFwcDovL3MtMS0xNS0yLTE0NTU2NTg4Ni0xNTEwNzkzMDIwLTI3OTc3MTcyNjAtMTUyNjE5NTkzMy0zOTEyMzU5ODE2LTQ0MDg2MDQzLTIyMTEwMDIzMTYA\",\"expires_in\":86400}", { 'cache-control': 'no-store', 'content-length': '436', 'content-type': 'application/json', server: 'Microsoft-IIS/7.5', ppserver: 'PPV: 30 H: BAYIDSLGN1I33 V: 0', date: 'Wed, 20 Feb 2013 04:07:10 GMT', connection: 'close' }); scopes.push(scope);scope = nock('https://bn1.notify.windows.com:443') .post('/?token=AgYAAACFGdWBiRCTypHebfvngI7DuNBXWuGjdiczDOZ7bSgkbCRrD2M1b10CpzCmipzknHbU4nLzapQbooXzJ%2fVwHAfSl%2fWMk8OsetohEVMlsIicoLP99rDg7g2AdENA99DZoAU%3d', "<tile><visual><binding template=\"TileWideSmallImageAndText01\"><image id=\"1\" src=\"http://textParam1.com\" alt=\"http://textParam2.com\"/><text id=\"1\">http://textParam3.com</text></binding></visual></tile>") .reply(200, "", { 'content-length': '0', 'x-wns-notificationstatus': 'received', 'x-wns-msg-id': '72C92964293B8020', 'x-wns-debug-trace': 'BN1WNS1011837', date: 'Wed, 20 Feb 2013 04:07:12 GMT' }); scopes.push(scope);return scopes; };
export default function absFloor(number) { if (number < 0) { // -0 -> 0 return Math.ceil(number) || 0; } else { return Math.floor(number); } }
var knex = require('knex'), config = require('../../config'), dbConfig = config.database, knexInstance; function configureDriver(client) { var pg; if (client === 'pg' || client === 'postgres' || client === 'postgresql') { try { pg = require('pg'); } catch (e) { pg = require('pg.js'); } // By default PostgreSQL returns data as strings along with an OID that identifies // its type. We're setting the parser to convert OID 20 (int8) into a javascript // integer. pg.types.setTypeParser(20, function (val) { return val === null ? null : parseInt(val, 10); }); } } if (!knexInstance && dbConfig && dbConfig.client) { configureDriver(dbConfig.client); knexInstance = knex(dbConfig); } module.exports = knexInstance;
'use strict'; function registerExports(gulpInst, tasks) { var taskNames = Object.keys(tasks); if (taskNames.length) { taskNames.forEach(register); } function register(taskName) { var task = tasks[taskName]; if (typeof task !== 'function') { return; } gulpInst.task(taskName, task); } } module.exports = registerExports;
/** * @license * Copyright 2014 The Lovefield Project Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ goog.provide('lf.proc.QueryTask'); goog.require('goog.Promise'); goog.require('lf.TransactionType'); goog.require('lf.cache.Journal'); goog.require('lf.proc.PhysicalQueryPlan'); goog.require('lf.proc.Task'); goog.require('lf.query.SelectContext'); goog.require('lf.service'); /** * A QueryTask represents a collection of queries that should be executed as * part of a single transaction. * @implements {lf.proc.Task} * @constructor * @struct * * @param {!lf.Global} global * @param {!Array<!lf.proc.TaskItem>} items */ lf.proc.QueryTask = function(global, items) { /** @protected {!lf.Global} */ this.global = global; /** @private {!lf.BackStore} */ this.backStore_ = global.getService(lf.service.BACK_STORE); /** @protected {!Array<!lf.query.Context>} */ this.queries = items.map(function(item) { return item.context; }); /** @private {!Array<!lf.proc.PhysicalQueryPlan>} */ this.plans_ = items.map(function(item) { return item.plan; }); /** @private {!lf.structs.Set<!lf.schema.Table>} */ this.combinedScope_ = lf.proc.PhysicalQueryPlan.getCombinedScope(this.plans_); /** @private {!lf.TransactionType} */ this.txType_ = this.detectType_(); /** @private {!goog.promise.Resolver.<!Array<!lf.proc.Relation>>} */ this.resolver_ = goog.Promise.withResolver(); }; /** * @return {!lf.TransactionType} * @private */ lf.proc.QueryTask.prototype.detectType_ = function() { var txType = this.queries.some( function(query) { return !(query instanceof lf.query.SelectContext); }) ? lf.TransactionType.READ_WRITE : lf.TransactionType.READ_ONLY; return txType; }; /** @override */ lf.proc.QueryTask.prototype.exec = function() { var journal = new lf.cache.Journal(this.global, this.combinedScope_); var results = []; var remainingPlans = this.plans_.slice(); var queries = this.queries; /** @return {!IThenable} */ var sequentiallyExec = function() { var plan = remainingPlans.shift(); if (plan) { var queryContext = queries[results.length]; return plan.getRoot().exec(journal, queryContext).then( function(relations) { results.push(relations[0]); return sequentiallyExec(); }); } return goog.Promise.resolve(); }; return sequentiallyExec().then(function() { var tx = this.backStore_.createTx(this.txType_, journal); return tx.commit(); }.bind(this)).then(function() { this.onSuccess(results); return results; }.bind(this), function(e) { journal.rollback(); throw e; }); }; /** @override */ lf.proc.QueryTask.prototype.getType = function() { return this.txType_; }; /** @override */ lf.proc.QueryTask.prototype.getScope = function() { return this.combinedScope_; }; /** @override */ lf.proc.QueryTask.prototype.getResolver = function() { return this.resolver_; }; /** @override */ lf.proc.QueryTask.prototype.getId = function() { return goog.getUid(this); }; /** @override */ lf.proc.QueryTask.prototype.getPriority = goog.abstractMethod; /** * Executes after all queries have finished successfully. Default implementation * is a no-op. Subclasses should override this method as necessary. * @param {!Array<!lf.proc.Relation>} results The results of all queries run by * this task. * @protected */ lf.proc.QueryTask.prototype.onSuccess = function(results) { // Default implementation is a no-op. };
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt wn.pages['latest-updates'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, title: wn._('Latest Updates'), single_column: true }); var parent = $(wrapper).find(".layout-main"); parent.html('<div class="progress progress-striped active">\ <div class="progress-bar" style="width: 100%;"></div></div>') return wn.call({ method:"home.page.latest_updates.latest_updates.get", callback: function(r) { parent.empty(); $("<p class='help'>"+wn._("Report issues at")+ "<a href='https://github.com/webnotes/erpnext/issues'>"+wn._("GitHub Issues")+"</a></p>\ <hr><h3>"+wn._("Commit Log")+"</h3>") .appendTo(parent); var $tbody = $('<table class="table table-bordered"><tbody></tbody></table>') .appendTo(parent).find("tbody"); $.each(r.message, function(i, log) { if(log.message.indexOf("minor")===-1 && log.message.indexOf("docs")===-1 && log.message.indexOf("[")!==-1) { log.message = log.message.replace(/(\[[^\]]*\])/g, function(match, p1, offset, string) { match = match.toLowerCase(); var color_class = ""; $.each(["bug", "fix"], function(i, v) { if(!color_class && match.indexOf(v)!==-1) color_class = "label-danger"; }); return '<span class="label ' + color_class +'">' + p1.slice(1,-1) + '</span> ' }); log.repo = log.repo==="lib" ? "wnframework" : "erpnext"; $(repl('<tr>\ <td><b><a href="https://github.com/webnotes/%(repo)s/commit/%(commit)s" \ target="_blank">%(message)s</b>\ <br><span class="text-muted">By %(author)s on %(date)s</span></td></tr>', log)).appendTo($tbody); } }) } }) };
/** @license MIT License (c) copyright B Cavalier & J Hann */ /** * wire/dojo/events plugin * wire plugin that can connect event handlers after an object is * initialized, and disconnect them when an object is destroyed. * This implementation uses dojo.connect and dojo.disconnect to do * the work of connecting and disconnecting event handlers. * * wire is part of the cujo.js family of libraries (http://cujojs.com/) * * Licensed under the MIT License at: * http://www.opensource.org/licenses/mit-license.php */ define(['when', '../lib/connection', 'dojo', 'dojo/_base/event'], function(when, connection, events) { return { wire$plugin: function eventsPlugin(/*, options*/) { var connectHandles = []; function handleConnection(source, eventName, handler) { connectHandles.push(events.connect(source, eventName, handler)); } function connect(source, connect, options, wire) { return connection.parse(source, connect, options, wire, handleConnection); } /* Function: connectFacet Setup connections for each specified in the connects param. Each key in connects is a reference, and the corresponding value is an object whose keys are event names, and whose values are methods of object to invoke. For example: connect: { "refToOtherThing": { "eventOrMethodOfOtherThing": "myOwnMethod" }, "dom!myButton": { "onclick": "_handleButtonClick" }, "dijit!myWidget": { "onChange": "_handleValueChange" } "myOwnEventOrMethod": { "refToOtherThing": "methodOfOtherThing" } } Parameters: factory - wiring factory object - object being wired, will be the target of connected events connects - specification of events to connect, see examples above. */ function connectFacet(wire, facet) { var promises, connects; promises = []; connects = facet.options; for(var ref in connects) { promises.push(connect(facet, ref, connects[ref], wire)); } return when.all(promises); } return { context: { destroy: function(resolver) { for (var i = connectHandles.length - 1; i >= 0; i--){ events.disconnect(connectHandles[i]); } resolver.resolve(); } }, facets: { connect: { connect: function(resolver, facet, wire) { resolver.resolve(connectFacet(wire, facet)); } } } }; } }; });
var vows = require("vows"), load = require("../load"), assert = require("../assert"); var suite = vows.describe("d3.layout.tree"); suite.addBatch({ "tree": { topic: load("layout/tree").expression("d3.layout.tree"), "computes a simple tree layout": function(tree) { var t = tree(); assert.deepEqual(t.nodes({ name: "1", children: [ {name: "1-1"}, {name: "1-2"}, {name: "1-3"} ] }).map(layout), [ {name: "1", depth: 0, x: 0.5, y: 0}, {name: "1-1", depth: 1, x: 0.16666666666666666, y: 1}, {name: "1-2", depth: 1, x: 0.5, y: 1}, {name: "1-3", depth: 1, x: 0.8333333333333333, y: 1} ]); }, "can handle an empty children array": function(tree) { var t = tree(); assert.deepEqual(t.nodes({children: []}).map(layout), [ {depth: 0, x: 0.5, y: 0} ]); assert.deepEqual(t.nodes({children: [ {children: []}, {children: [{}]}, {children: [{}]} ]}).map(layout), [ {depth: 0, x: 0.5, y: 0}, {depth: 1, x: 0.125, y: 0.5}, {depth: 1, x: 0.375, y: 0.5}, {depth: 2, x: 0.375, y: 1}, {depth: 1, x: 0.875, y: 0.5}, {depth: 2, x: 0.875, y: 1} ]); }, "can handle a single node": function(tree) { var t = tree(); assert.deepEqual(t.nodes({}).map(layout), [ {depth: 0, x: 0.5, y: 0} ]); } } }); function layout(node) { delete node.children; delete node.parent; return node; } suite.export(module);
// Copyright JS Foundation and other contributors, http://js.foundation // // 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. var sum = 0; for (var i = 0; i < 10; i++) for (var j = 0; j < 20; j++) { if (j > 9) continue; sum += 1; } assert(sum === 100);
'use strict'; /** * @description * Private service to sanitize uris for links and images. Used by $compile and $sanitize. */ function $$SanitizeUriProvider() { var aHrefSanitizationWhitelist = /^\s*(https?|ftp|mailto|tel|file):/, imgSrcSanitizationWhitelist = /^\s*(https?|ftp|file):|data:image\//; /** * @description * Retrieves or overrides the default regular expression that is used for whitelisting of safe * urls during a[href] sanitization. * * The sanitization is a security measure aimed at prevent XSS attacks via html links. * * Any url about to be assigned to a[href] via data-binding is first normalized and turned into * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist` * regular expression. If a match is found, the original url is written into the dom. Otherwise, * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. * * @param {RegExp=} regexp New regexp to whitelist urls with. * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for * chaining otherwise. */ this.aHrefSanitizationWhitelist = function(regexp) { if (isDefined(regexp)) { aHrefSanitizationWhitelist = regexp; return this; } return aHrefSanitizationWhitelist; }; /** * @description * Retrieves or overrides the default regular expression that is used for whitelisting of safe * urls during img[src] sanitization. * * The sanitization is a security measure aimed at prevent XSS attacks via html links. * * Any url about to be assigned to img[src] via data-binding is first normalized and turned into * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist` * regular expression. If a match is found, the original url is written into the dom. Otherwise, * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. * * @param {RegExp=} regexp New regexp to whitelist urls with. * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for * chaining otherwise. */ this.imgSrcSanitizationWhitelist = function(regexp) { if (isDefined(regexp)) { imgSrcSanitizationWhitelist = regexp; return this; } return imgSrcSanitizationWhitelist; }; this.$get = function() { return function sanitizeUri(uri, isImage) { var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist; var normalizedVal; // NOTE: urlResolve() doesn't support IE < 8 so we don't sanitize for that case. if (!msie || msie >= 8 ) { normalizedVal = urlResolve(uri).href; if (normalizedVal !== '' && !normalizedVal.match(regex)) { return 'unsafe:'+normalizedVal; } } return uri; }; }; }
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareLaptopMac = (props) => ( <SvgIcon {...props}> <path d="M20 18c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2H0c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2h-4zM4 5h16v11H4V5zm8 14c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/> </SvgIcon> ); HardwareLaptopMac = pure(HardwareLaptopMac); HardwareLaptopMac.displayName = 'HardwareLaptopMac'; HardwareLaptopMac.muiName = 'SvgIcon'; export default HardwareLaptopMac;