text
stringlengths
2
6.14k
// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var repl = require('./helper-debugger-repl.js'); repl.startDebugger('breakpoints.js'); var addTest = repl.addTest; // Next addTest('n', [ /break in .*:11/, /9/, /10/, /11/, /12/, /13/ ]); // Watch addTest('watch("\'x\'")'); // Continue addTest('c', [ /break in .*:5/, /Watchers/, /0:\s+'x' = "x"/, /()/, /3/, /4/, /5/, /6/, /7/ ]); // Show watchers addTest('watchers', [ /0:\s+'x' = "x"/ ]); // Unwatch addTest('unwatch("\'x\'")'); // Step out addTest('o', [ /break in .*:12/, /10/, /11/, /12/, /13/, /14/ ]); // Continue addTest('c', [ /break in .*:5/, /3/, /4/, /5/, /6/, /7/ ]); // Set breakpoint by function name addTest('sb("setInterval()", "!(setInterval.flag++)")', [ /1/, /2/, /3/, /4/, /5/, /6/, /7/, /8/, /9/, /10/ ]); // Continue addTest('c', [ /break in node.js:\d+/, /\d/, /\d/, /\d/, /\d/, /\d/ ]); addTest('quit', []);
$(function () { // popups for Storage setting input fields $("#sitemapDb") .popover({ title: 'Database for sitemap storage', html: true, content: "CouchDB database url<br /> http://example.com/scraper-sitemaps/", placement: 'bottom' }) .blur(function () { $(this).popover('hide'); }); $("#dataDb") .popover({ title: 'Database for scraped data', html: true, content: "CouchDB database url. For each sitemap a new DB will be created.<br />http://example.com/", placement: 'bottom' }) .blur(function () { $(this).popover('hide'); }); // switch between configuration types $("select[name=storageType]").change(function () { var type = $(this).val(); if (type === 'couchdb') { $(".form-group.couchdb").show(); } else { $(".form-group.couchdb").hide(); } }); // Extension configuration var config = new Config(); // load previously synced data config.loadConfiguration(function () { $("#storageType").val(config.storageType); $("#sitemapDb").val(config.sitemapDb); $("#dataDb").val(config.dataDb); $("select[name=storageType]").change(); }); // Sync storage settings $("form#storage_configuration").submit(function () { var sitemapDb = $("#sitemapDb").val(); var dataDb = $("#dataDb").val(); var storageType = $("#storageType").val(); var newConfig; if (storageType === 'local') { newConfig = { storageType: storageType, sitemapDb: ' ', dataDb: ' ' } } else { newConfig = { storageType: storageType, sitemapDb: sitemapDb, dataDb: dataDb } } config.updateConfiguration(newConfig); return false; }); });
({ setup: function (cmp) { cmp.set('v.initialState', { initialCmpCount : $A.componentService.countComponents(), dataSetSize : cmp.get('m.tenValues').length }); }, run: function (cmp, event) { var testData = cmp.get('m.tenValues').slice(0); var testDataBatch = $A.util.map(testData, function (i) { return $A.util.copy(i); }); cmp.set('v.iterationItems', testData); cmp.set('v.iterationItems', testDataBatch); }, postProcessing: function (cmp, event) { var dataSetSize = cmp.get('v.initialState.dataSetSize'); var results = event.getParam('arguments').results; var common = results.commonMetrics; var deltaCmps = common.finalComponentCount - common.initialComponentCount; results.customMetrics.leakedComponents = deltaCmps - dataSetSize; console.log('Leaked cmps: ', results.customMetrics.leakedComponents); } })
//// [noImplicitReturnsInAsync1.ts] async function test(isError: boolean = false) { if (isError === true) { return; } let x = await Promise.resolve("The test is passed without an error."); } //// [noImplicitReturnsInAsync1.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; function test(isError = false) { return __awaiter(this, void 0, void 0, function* () { if (isError === true) { return; } let x = yield Promise.resolve("The test is passed without an error."); }); }
//// [tests/cases/conformance/jsdoc/declarations/jsDeclarationsTypeReassignmentFromDeclaration.ts] //// //// [some-mod.d.ts] interface Item { x: string; } declare const items: Item[]; export = items; //// [index.js] /** @type {typeof import("/some-mod")} */ const items = []; module.exports = items; //// [index.js] /** @type {typeof import("/some-mod")} */ var items = []; module.exports = items; //// [index.d.ts] export = items; /** @type {typeof import("/some-mod")} */ declare const items: typeof import("/some-mod");
// backend for alarm app with just accelerometers var autobahn = require('autobahn'); var connection = new autobahn.Connection({ url: "ws://192.168.1.134:8080/ws", // replace with the url of your crossbar instance realm: "iot_cookbook" }); connection.onopen = function (session, details) { console.log("connected!"); // alarm active state and procedures // var alarm_active = false; function get_alarm_active () { return alarm_active; } session.register("io.crossbar.examples.iotcookbook.alarmapp.get_alarm_active", get_alarm_active).then( function () { console.log("registered get_alarm_active"); }, function (e) { console.log(e); } ); function set_alarm_active (args) { var active = args[0]; console.log("set_alarm_active", alarm_active, active); if (alarm_active != active) { alarm_active = active; session.publish("io.crossbar.examples.iotcookbook.alarmapp.on_alarm_active", [alarm_active]) } return alarm_active; } session.register("io.crossbar.examples.iotcookbook.alarmapp.set_alarm_active", set_alarm_active).then( function () { console.log("registered set_alarm_active"); }, function (e) { console.log(e); } ); // alarm armed state and procedures // var alarm_armed = false; function get_alarm_armed () { return alarm_armed; } session.register("io.crossbar.examples.iotcookbook.alarmapp.get_alarm_armed", get_alarm_armed).then( function () { console.log("registered get_alarm_armed"); }, function (e) { console.log(e); } ); var th_tessel = 0.1; // threshold for tessel var th_yun = 80; // threshold for yun function on_accelerometer (args) { var device = args[0]; var data = args[1]; var trigger = null; if (device === "tessel") { trigger = (Math.abs(0 - data.x) > th_tessel) || (Math.abs(0 - data.y) > th_tessel) || (Math.abs(1 - data.z) > th_tessel); } else if (device === "yun") { trigger = data.x > 550 + th_yun || data.x < 550 - th_yun || data.y > 550 + th_yun || data.y < 550 - th_yun; } else { console.log("received accelerometer data from unknown device class"); } if (trigger) { if (alarm_armed) { set_alarm_active([true]); } } } var accel_subscription = null; var accel_subscription_yun = null; function set_alarm_armed (args) { var active = args[0]; console.log("set_alarm_armed", alarm_armed, active); if (alarm_armed != active) { alarm_armed = active; if (alarm_armed) { session.subscribe("io.crossbar.examples.iotcookbook.alarmapp.on_accelerometer_data", on_accelerometer).then( function (sub) { console.log("subcribed to on_accelerometer") accel_subscription = sub; }, function (e) { console.log(e); } ); } else { if (accel_subscription) { accel_subscription.unsubscribe().then( function () { console.log("unsubscribed from on_accelerometer") }, function (e) { console.log(e); } ); } } session.publish("io.crossbar.examples.iotcookbook.alarmapp.on_alarm_armed", [alarm_armed]) } return alarm_armed; } session.register("io.crossbar.examples.iotcookbook.alarmapp.set_alarm_armed", set_alarm_armed).then( function () { console.log("registered set_alarm_armed"); }, function (e) { console.log(e); } ); }; connection.onclose = function (reason, details) { console.log("Connection lost: " + reason); } connection.open();
/* * This file is part of the Soletta Project * * Copyright (C) 2015 Intel Corporation. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * 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 node = { in: [ { name:'IN_BOOLEAN', type:'boolean', process: function(v) { sendPacket("OUT_BOOLEAN", v); } }, { name:'IN_BYTE', type:'byte', process: function(v) { sendPacket("OUT_BYTE", v); } }, { name:'IN_FLOAT', type:'float', process: function(v) { sendPacket("OUT_FLOAT", v); } }, { name:'IN_INT', type:'int', process: function(v) { sendPacket("OUT_INT", v); } }, { name:'IN_RGB', type:'rgb', process: function(v) { sendPacket("OUT_RGB", v); } }, { name:'IN_STRING', type:'string', process: function(v) { sendPacket("OUT_STRING", v); } }, { name:'IN_BLOB', type:'blob', process: function(v) { sendPacket("OUT_BLOB", v); } }, { name:'IN_LOCATION', type:'location', process: function(v) { sendPacket("OUT_LOCATION", v); } }, { name:'IN_TIMESTAMP', type:'timestamp', process: function(v) { sendPacket("OUT_TIMESTAMP", v); } }, { name:'IN_DIRECTION_VECTOR', type:'direction-vector', process: function(v) { sendPacket("OUT_DIRECTION_VECTOR", v); } }, { name:'IN_JSON_OBJECT', type:'json-object', process: function(v) { sendPacket("OUT_JSON_OBJECT", v); } }, { name:'IN_JSON_ARRAY', type:'json-array', process: function(v) { sendPacket("OUT_JSON_ARRAY", v); } }, { name:'IN_HTTP_RESPONSE', type:'http-response', process: function(v) { sendPacket("OUT_HTTP_RESPONSE", v); } }, { name:'IN_COMPOSED', type:'composed:string,int', process: function(v) { sendPacket("OUT_COMPOSED", v); } } ], out: [ { name:'OUT_BOOLEAN', type:'boolean' }, { name:'OUT_BYTE', type:'byte' }, { name:'OUT_FLOAT', type:'float' }, { name:'OUT_INT', type:'int' }, { name:'OUT_RGB', type:'rgb' }, { name:'OUT_STRING', type:'string' }, { name:'OUT_BLOB', type:'blob' }, { name:'OUT_LOCATION', type:'location' }, { name:'OUT_TIMESTAMP', type:'timestamp' }, { name:'OUT_DIRECTION_VECTOR', type:'direction-vector' }, { name:'OUT_JSON_OBJECT', type:'json-object' }, { name:'OUT_JSON_ARRAY', type:'json-array' }, { name:'OUT_HTTP_RESPONSE', type:'http-response' }, { name:'OUT_COMPOSED', type:'composed:string,int' } ] };
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating // requestAnimationFrame polyfill by Erik Möller // fixes from Paul Irish and Tino Zijdel (function() { var lastTime = 0; var vendors = ['ms', 'moz', 'webkit', 'o']; for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; } if (!window.requestAnimationFrame) window.requestAnimationFrame = function(callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function(id) { clearTimeout(id); }; }()); if (!Function.prototype.bind) { Function.prototype.bind = function (oThis) { var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () {}, fBound = function () { return fToBind.apply(this instanceof fNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); }; fNOP.prototype = this.prototype; fBound.prototype = new fNOP(); return fBound; }; }
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React, { Component, createElement } from 'react'; import PropTypes from 'prop-types'; class BuiltEmitter extends Component { static propTypes = { feature: PropTypes.func.isRequired, }; componentDidMount() { const { feature } = this.props; // Class components must call this.props.onReady when they're ready for the test. // We will assume functional components are ready immediately after mounting. if (!Component.isPrototypeOf(feature)) { this.handleReady(); } } handleReady() { document.dispatchEvent(new Event('ReactFeatureDidMount')); } render() { const { props: { feature }, handleReady } = this; return ( <div> {createElement(feature, { onReady: handleReady, })} </div> ); } } class App extends Component { constructor(props) { super(props); this.state = { feature: null }; this.setFeature = this.setFeature.bind(this); } componentDidMount() { const feature = window.location.hash.slice(1); switch (feature) { case 'array-destructuring': import('./features/syntax/ArrayDestructuring').then(f => this.setFeature(f.default) ); break; case 'array-spread': import('./features/syntax/ArraySpread').then(f => this.setFeature(f.default) ); break; case 'async-await': import('./features/syntax/AsyncAwait').then(f => this.setFeature(f.default) ); break; case 'class-properties': import('./features/syntax/ClassProperties').then(f => this.setFeature(f.default) ); break; case 'computed-properties': import('./features/syntax/ComputedProperties').then(f => this.setFeature(f.default) ); break; case 'css-inclusion': import('./features/webpack/CssInclusion').then(f => this.setFeature(f.default) ); break; case 'custom-interpolation': import('./features/syntax/CustomInterpolation').then(f => this.setFeature(f.default) ); break; case 'default-parameters': import('./features/syntax/DefaultParameters').then(f => this.setFeature(f.default) ); break; case 'destructuring-and-await': import('./features/syntax/DestructuringAndAwait').then(f => this.setFeature(f.default) ); break; case 'file-env-variables': import('./features/env/FileEnvVariables').then(f => this.setFeature(f.default) ); break; case 'generators': import('./features/syntax/Generators').then(f => this.setFeature(f.default) ); break; case 'image-inclusion': import('./features/webpack/ImageInclusion').then(f => this.setFeature(f.default) ); break; case 'json-inclusion': import('./features/webpack/JsonInclusion').then(f => this.setFeature(f.default) ); break; case 'linked-modules': import('./features/webpack/LinkedModules').then(f => this.setFeature(f.default) ); break; case 'node-path': import('./features/env/NodePath').then(f => this.setFeature(f.default)); break; case 'no-ext-inclusion': import('./features/webpack/NoExtInclusion').then(f => this.setFeature(f.default) ); break; case 'object-destructuring': import('./features/syntax/ObjectDestructuring').then(f => this.setFeature(f.default) ); break; case 'object-spread': import('./features/syntax/ObjectSpread').then(f => this.setFeature(f.default) ); break; case 'promises': import('./features/syntax/Promises').then(f => this.setFeature(f.default) ); break; case 'public-url': import('./features/env/PublicUrl').then(f => this.setFeature(f.default) ); break; case 'rest-and-default': import('./features/syntax/RestAndDefault').then(f => this.setFeature(f.default) ); break; case 'rest-parameters': import('./features/syntax/RestParameters').then(f => this.setFeature(f.default) ); break; case 'shell-env-variables': import('./features/env/ShellEnvVariables').then(f => this.setFeature(f.default) ); break; case 'svg-inclusion': import('./features/webpack/SvgInclusion').then(f => this.setFeature(f.default) ); break; case 'template-interpolation': import('./features/syntax/TemplateInterpolation').then(f => this.setFeature(f.default) ); break; case 'unknown-ext-inclusion': import('./features/webpack/UnknownExtInclusion').then(f => this.setFeature(f.default) ); break; default: throw new Error(`Missing feature "${feature}"`); } } setFeature(feature) { this.setState({ feature }); } render() { const { feature } = this.state; if (feature !== null) { return <BuiltEmitter feature={feature} />; } return null; } } export default App;
export default { el: { colorpicker: { confirm: 'V redu', clear: 'Počisti' }, datepicker: { now: 'Zdaj', today: 'Danes', cancel: 'Prekliči', clear: 'Počisti', confirm: 'Potrdi', selectDate: 'Izberi datum', selectTime: 'Izberi čas', startDate: 'Začetni datum', startTime: 'Začetni čas', endDate: 'Končni datum', endTime: 'Končni čas', year: 'Leto', month1: 'Jan', month2: 'Feb', month3: 'Mar', month4: 'Apr', month5: 'Maj', month6: 'Jun', month7: 'Jul', month8: 'Avg', month9: 'Sep', month10: 'Okt', month11: 'Nov', month12: 'Dec', week: 'teden', weeks: { sun: 'Ned', mon: 'Pon', tue: 'Tor', wed: 'Sre', thu: 'Čet', fri: 'Pet', sat: 'Sob' }, months: { jan: 'Jan', feb: 'Feb', mar: 'Mar', apr: 'Apr', may: 'Maj', jun: 'Jun', jul: 'Jul', aug: 'Avg', sep: 'Sep', oct: 'Okt', nov: 'Nov', dec: 'Dec' } }, select: { loading: 'Nalaganje', noMatch: 'Ni ustreznih podatkov', noData: 'Ni podatkov', placeholder: 'Izberi' }, cascader: { noMatch: 'Ni ustreznih podatkov', loading: 'Nalaganje', placeholder: 'Izberi' }, pagination: { goto: 'Pojdi na', pagesize: '/page', total: 'Skupno {total}', pageClassifier: '' }, messagebox: { title: 'Sporočilo', confirm: 'V redu', cancel: 'Prekliči', error: 'Nedovoljen vnos' }, upload: { delete: 'Izbriši', preview: 'Predogled', continue: 'Nadaljuj' }, table: { emptyText: 'Ni podatkov', confirmFilter: 'Potrdi', resetFilter: 'Ponastavi', clearFilter: 'Vse', sumText: 'Skupno' }, tree: { emptyText: 'Ni podatkov' }, transfer: { noMatch: 'Ni ustreznih podatkov', noData: 'Ni podatkov', titles: ['Seznam 1', 'Seznam 2'], filterPlaceholder: 'Vnesi ključno besedo', noCheckedFormat: '{total} elementov', hasCheckedFormat: '{checked}/{total} izbranih' } } };
'use strict'; angular.module('copayApp.controllers').controller('termsController', function($scope, $log, $state, appConfigService, uxLanguage, profileService, externalLinkService, gettextCatalog) { $scope.lang = uxLanguage.currentLanguage; $scope.confirm = function() { profileService.setDisclaimerAccepted(function(err) { if (err) $log.error(err); else { $state.go('tabs.home', { fromOnboarding: true }); } }); }; $scope.openExternalLink = function() { var url = appConfigService.disclaimerUrl; var optIn = true; var title = gettextCatalog.getString('View Terms of Service'); var message = gettextCatalog.getString('The official English Terms of Service are available on the BitPay website.'); var okText = gettextCatalog.getString('Open Website'); var cancelText = gettextCatalog.getString('Go Back'); externalLinkService.open(url, optIn, title, message, okText, cancelText); }; });
const downloadFileFromGithub = require('./download-file-from-github') const fs = require('fs-extra') const os = require('os') const path = require('path') const {spawnSync} = require('child_process') module.exports = function (filesToSign) { if (!process.env.ATOM_WIN_CODE_SIGNING_CERT_DOWNLOAD_URL && !process.env.ATOM_WIN_CODE_SIGNING_CERT_PATH) { console.log('Skipping code signing because the ATOM_WIN_CODE_SIGNING_CERT_DOWNLOAD_URL environment variable is not defined'.gray) return } let certPath = process.env.ATOM_WIN_CODE_SIGNING_CERT_PATH if (!certPath) { certPath = path.join(os.tmpdir(), 'win.p12') downloadFileFromGithub(process.env.ATOM_WIN_CODE_SIGNING_CERT_DOWNLOAD_URL, certPath) } try { for (const fileToSign of filesToSign) { console.log(`Code-signing executable at ${fileToSign}`) signFile(fileToSign) } } finally { if (!process.env.ATOM_WIN_CODE_SIGNING_CERT_PATH) { fs.removeSync(certPath) } } function signFile (fileToSign) { const signCommand = path.resolve(__dirname, '..', 'node_modules', 'electron-winstaller', 'vendor', 'signtool.exe') const args = [ 'sign', `/f ${certPath}`, // Signing cert file `/p ${process.env.ATOM_WIN_CODE_SIGNING_CERT_PASSWORD}`, // Signing cert password '/fd sha256', // File digest algorithm '/tr http://timestamp.digicert.com', // Time stamp server '/td sha256', // Times stamp algorithm `"${fileToSign}"` ] const result = spawnSync(signCommand, args, {stdio: 'inherit', shell: true}) if (result.status !== 0) { // Ensure we do not dump the signing password into the logs if something goes wrong throw new Error(`Command ${signCommand} ${args.map(a => a.replace(process.env.ATOM_WIN_CODE_SIGNING_CERT_PASSWORD, '******')).join(' ')} exited with code ${result.status}`) } } }
/** * @private */ Ext.define('Ext.grid.locking.RowSynchronizer', { constructor: function (view, rowEl) { var me = this, rowTpl; me.view = view; me.rowEl = rowEl; me.els = {}; me.add('data', view.rowSelector); for (rowTpl = view.rowTpl; rowTpl; rowTpl = rowTpl.nextTpl) { if (rowTpl.beginRowSync) { rowTpl.beginRowSync(me); } } }, add: function (name, selector) { var el = Ext.fly(this.rowEl).down(selector, true); if (el) { this.els[name] = { el: el }; } }, finish: function (other) { var me = this, els = me.els, otherEls = other.els, otherEl, growth = 0, otherGrowth = 0, delta, name, otherHeight; for (name in els) { otherEl = otherEls[name]; // Partnet RowSynchronizer may not have the element. // For example, group summary may not be wanted in locking side. otherHeight = otherEl ? otherEl.height : 0; delta = otherHeight - els[name].height; if (delta > 0) { growth += delta; Ext.fly(els[name].el).setHeight(otherHeight); } else { otherGrowth -= delta; } } // Compare the growth to both rows and see if this row is lacking. otherHeight = other.rowHeight + otherGrowth; //<feature legacyBrowser> // IE9 uses content box sizing on table, so height must not include border if (Ext.isIE9 && me.view.ownerGrid.rowLines) { otherHeight--; } //</feature> if (me.rowHeight + growth < otherHeight) { Ext.fly(me.rowEl).setHeight(otherHeight); } }, measure: function () { var me = this, els = me.els, name; me.rowHeight = me.rowEl.offsetHeight; for (name in els) { els[name].height = els[name].el.offsetHeight; } }, reset: function () { var els = this.els, name; this.rowEl.style.height = ''; for (name in els) { els[name].el.style.height = ''; } } });
// Copyright (c) 2012 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. function watchForTag(tagName, cb) { if (!document.body) return; function findChildTags(queryNode) { $Array.forEach(queryNode.querySelectorAll(tagName), function(node) { cb(node); }); } // Query tags already in the document. findChildTags(document.body); // Observe the tags added later. var documentObserver = new MutationObserver(function(mutations) { $Array.forEach(mutations, function(mutation) { $Array.forEach(mutation.addedNodes, function(addedNode) { if (addedNode.nodeType == Node.ELEMENT_NODE) { if (addedNode.tagName == tagName) cb(addedNode); findChildTags(addedNode); } }); }); }); documentObserver.observe(document, {subtree: true, childList: true}); } // Expose a function to watch the |tagName| introduction via mutation observer. // // We employee mutation observer to watch on any introduction of |tagName| // within document so that we may handle it accordingly (either creating it or // reporting error due to lack of permission). // Think carefully about when to call this. On one hand, mutation observer // functions on document, so we need to make sure document is finished // parsing. To satisfy this, document.readyState has to be "interactive" or // after. On the other hand, we intend to do this as early as possible so that // developer would have no chance to bring in any conflicted property. To meet // this requirement, we choose "readystatechange" event of window and use // capturing way. function addTagWatcher(tagName, cb) { var useCapture = true; window.addEventListener('readystatechange', function listener(event) { if (document.readyState == 'loading') return; watchForTag(tagName, cb); window.removeEventListener(event.type, listener, useCapture); }, useCapture); } exports.$set('addTagWatcher', addTagWatcher);
// Backbone.js Page Object Factory: Certificates /*global define, RequireJS */ ;(function(define){ 'use strict'; define([ 'jquery', 'js/certificates/views/certificate_whitelist', 'js/certificates/models/certificate_exception', 'js/certificates/views/certificate_whitelist_editor', 'js/certificates/collections/certificate_whitelist' ], function($, CertificateWhiteListListView, CertificateExceptionModel, CertificateWhiteListEditorView , CertificateWhiteListCollection){ return function(certificate_white_list_json, certificate_exception_url){ var certificateWhiteList = new CertificateWhiteListCollection(JSON.parse(certificate_white_list_json), { parse: true, canBeEmpty: true, url: certificate_exception_url }); new CertificateWhiteListListView({ collection: certificateWhiteList }).render(); new CertificateWhiteListEditorView({ collection: certificateWhiteList }).render(); }; } ); }).call(this, define || RequireJS.define);
var id = "bx"; var reason = document.getElementById("reason"); var body = document.body; var verdict = document.getElementById("verdict"); function hook(id, result, message){}; function pass(message) { hook(id, "pass", reason); document.title = "PASS"; body.style.background = "green"; verdict.innerHTML = "PASS"; reason.innerHTML = message; } function fail(message) { hook(id, "fail", reason); document.title = "FAIL"; body.style.background = "red"; verdict.innerHTML = "FAIL"; reason.innerHTML = message; } function propEquals(prop, value) { try { if (window.widget) { if (window.widget[prop] === value) { var msg = "Test "+id+" passed because property "+prop+" was equal to "+value pass(msg); return; } fail("Test "+id+" failed because property "+prop+" was not equal to "+value + ". The property '" + prop + "' returned '" + window.widget[prop] + "'"); } } catch (e) { fail("Test "+id+" failed because "+e.message); } } propEquals("name", "PASS");
'use strict' var locate = require('../locate/escape') module.exports = escape escape.locator = locate var lineFeed = '\n' var backslash = '\\' function escape(eat, value, silent) { var self = this var character var node if (value.charAt(0) === backslash) { character = value.charAt(1) if (self.escape.indexOf(character) !== -1) { /* istanbul ignore if - never used (yet) */ if (silent) { return true } if (character === lineFeed) { node = {type: 'break'} } else { node = {type: 'text', value: character} } return eat(backslash + character)(node) } } }
var channel = new MessageChannel(); var channel2 = new MessageChannel(); var channel3 = new MessageChannel(); postMessage("noport"); postMessage("zero ports", []); postMessage("two ports", [channel2.port1, channel2.port2]); // Now test various failure cases try { postMessage("null port", [channel3.port1, null, channel3.port2]); testFailed("posting a null port did not throw"); } catch (e) { testPassed("posting a null port did throw: " + e); } try { postMessage("notAPort", [channel3.port1, {}, channel3.port2]); testFailed("posting a non-port did not throw"); } catch (e) { testPassed("posting a non-port did throw: " + e); } try { postMessage("failed ports", [channel3.port1, channel3.port2]); } catch (e) { testFailed("reposting ports threw an exception: " + e); } try { postMessage("notASequence", [{length: 3}]); testFailed("posting a non-sequence should throw"); } catch (e) { testPassed("posting a non-sequence did throw: " + e); } postMessage("done", [channel.port2]); channel.port1.postMessage("done"); function testFailed(msg) { postMessage("FAIL"+msg); } function testPassed(msg) { postMessage("PASS"+msg); }
var createHash = require('./create-hash') var zeroBuffer = new Buffer(128) zeroBuffer.fill(0) module.exports = Hmac function Hmac (alg, key) { if(!(this instanceof Hmac)) return new Hmac(alg, key) this._opad = opad this._alg = alg var blocksize = (alg === 'sha512') ? 128 : 64 key = this._key = !Buffer.isBuffer(key) ? new Buffer(key) : key if(key.length > blocksize) { key = createHash(alg).update(key).digest() } else if(key.length < blocksize) { key = Buffer.concat([key, zeroBuffer], blocksize) } var ipad = this._ipad = new Buffer(blocksize) var opad = this._opad = new Buffer(blocksize) for(var i = 0; i < blocksize; i++) { ipad[i] = key[i] ^ 0x36 opad[i] = key[i] ^ 0x5C } this._hash = createHash(alg).update(ipad) } Hmac.prototype.update = function (data, enc) { this._hash.update(data, enc) return this } Hmac.prototype.digest = function (enc) { var h = this._hash.digest() return createHash(this._alg).update(this._opad).update(h).digest(enc) }
module.exports = '1.0.1';
/* * Ext JS Library 0.30 * Copyright(c) 2006-2009, Ext JS, LLC. * licensing@extjs.com * * http://extjs.com/license */ tx.ReminderManager = function(){ var table; var run = function(){ var rs = table.selectBy('where completed = 0 AND reminder <> \'\' AND reminder <= ?', [new Date()]); for(var i = 0, len = rs.length; i < len; i++){ showReminder.defer(10, window, [rs[i]]); } }; var showReminder = function(task){ var o; if (o = tx.data.tasks.getById(task.taskId)) { // if currently loaded o.set('reminder', ''); } else { // else update db directly table.update({ taskId: task.taskId, reminder: '' }); } Ext.air.NativeWindowManager.getReminderWindow(task.taskId); } return { init : function(){ table = tx.data.conn.getTable('task', 'taskId'); setInterval(run, 10000); } } }();
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ //@ts-check 'use strict'; const bootstrapWindow = require('../../../../bootstrap-window'); bootstrapWindow.load(['vs/code/electron-browser/processExplorer/processExplorerMain'], function (processExplorer, configuration) { processExplorer.startup(configuration.data); }, { forceEnableDeveloperKeybindings: true });
$_L(["java.util.IllegalFormatException"],"java.util.UnknownFormatConversionException",null,function(){ c$=$_C(function(){ this.s=null; $_Z(this,arguments); },java.util,"UnknownFormatConversionException",java.util.IllegalFormatException); $_K(c$, function(s){ $_R(this,java.util.UnknownFormatConversionException,[]); this.s=s; },"~S"); $_M(c$,"getConversion", function(){ return this.s; }); $_V(c$,"getMessage", function(){ return"Conversion='" + this.s + "'"; }); });
/************************************************************* * * MathJax/jax/output/HTML-CSS/fonts/STIX-Web/Marks/Italic/Main.js * * Copyright (c) 2013 The MathJax Consortium * * 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. */ MathJax.OutputJax['HTML-CSS'].FONTDATA.FONTS['STIXMathJax_Marks-italic'] = { directory: 'Marks/Italic', family: 'STIXMathJax_Marks', style: 'italic', testString: '\u00A0\u02B0\u02B1\u02B2\u02B3\u02B4\u02B5\u02B6\u02B7\u02B8\u02BB\u02C0\u02C1\u02DB\u02DD', 0x20: [0,0,250,0,0], 0xA0: [0,0,250,0,0], 0x2B0: [838,-326,378,7,391], 0x2B1: [838,-326,378,7,414], 0x2B2: [851,-199,300,44,350], 0x2B3: [690,-345,320,2,320], 0x2B4: [690,-345,320,0,318], 0x2B5: [690,-163,320,0,335], 0x2B6: [684,-345,390,6,462], 0x2B7: [690,-327,500,15,515], 0x2B8: [693,-202,330,16,357], 0x2BB: [686,-443,333,79,236], 0x2C0: [690,-295,326,30,307], 0x2C1: [690,-295,326,23,343], 0x2DB: [40,169,333,-20,200], 0x2DD: [664,-494,333,93,486], 0x2E0: [684,-218,315,23,335], 0x2E1: [837,-333,220,41,214], 0x2E2: [691,-335,300,16,290], 0x2E3: [691,-333,380,4,379], 0x2E4: [847,-333,318,8,345], 0x2EC: [70,147,320,15,305], 0x2ED: [665,-507,405,10,395], 0x2F7: [-113,220,333,-94,233], 0x2010: [257,-191,333,49,282], 0x2011: [257,-191,333,49,282], 0x2012: [258,-192,500,-8,508], 0x201A: [101,129,333,44,183], 0x201B: [666,-436,333,169,290], 0x201E: [101,129,556,57,405], 0x201F: [666,-436,556,169,499], 0x2022: [444,-59,523,70,455], 0x2030: [706,19,1117,80,1067], 0x2031: [706,19,1479,80,1429], 0x2039: [403,-37,333,51,281], 0x203A: [403,-37,333,52,282], 0x20D0: [760,-627,0,-453,-17], 0x20D1: [760,-627,0,-426,10], 0x20D2: [662,156,0,-300,-234], 0x20D6: [760,-548,0,-453,-17], 0x20DB: [622,-523,0,-453,44], 0x20DC: [622,-523,0,-582,114], 0x20DD: [725,221,0,-723,223], 0x20E1: [760,-548,0,-453,25], 0x20E4: [1023,155,0,-970,490], 0x20E5: [662,156,0,-430,-24], 0x20E6: [662,156,0,-351,-86], 0x20E7: [725,178,0,-595,221], 0x20E8: [-119,218,0,-462,35], 0x20E9: [681,-538,0,-478,55], 0x20EA: [419,-87,0,-793,153], 0x20EC: [-119,252,0,27,463], 0x20ED: [-119,252,0,27,463], 0x20EE: [-40,252,0,-453,-17], 0x20EF: [-40,252,0,-453,-17] }; MathJax.Callback.Queue( ["initFont",MathJax.OutputJax["HTML-CSS"],"STIXMathJax_Marks-italic"], ["loadComplete",MathJax.Ajax,MathJax.OutputJax["HTML-CSS"].fontDir+"/Marks/Italic/Main.js"] );
/** * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'pt', { euro: 'Símbolo do Euro', lsquo: 'Aspa esquerda simples', rsquo: 'Aspa direita simples', ldquo: 'Aspa esquerda dupla', rdquo: 'Aspa direita dupla', ndash: 'Travessão Simples', mdash: 'Travessão Longo', iexcl: 'Ponto de exclamação invertido', cent: 'Símbolo do Cêntimo', pound: 'Símbolo da Libra', curren: 'Símbolo de Moeda', yen: 'Símbolo do Iene', brvbar: 'Barra quebrada', sect: 'Símbolo de Secção', uml: 'Trema', copy: 'Símbolo dos Direitos de Autor', ordf: 'Indicador ordinal feminino', laquo: 'Aspa esquerda ângulo duplo', not: 'Não Símbolo', reg: 'Símbolo de Registado', macr: 'Mácron', deg: 'Símbolo de Grau', sup2: 'Expoente 2', sup3: 'Expoente 3', acute: 'Acento agudo', micro: 'Símbolo de Micro', para: 'Símbolo de Parágrafo', middot: 'Ponto do Meio', cedil: 'Cedilha', sup1: 'Expoente 1', ordm: 'Indicador ordinal masculino', raquo: 'Aspas ângulo duplo pra Direita', frac14: 'Fração vulgar 1/4', frac12: 'Fração vulgar 1/2', frac34: 'Fração vulgar 3/4', iquest: 'Ponto de interrugação invertido', Agrave: 'Letra maiúscula latina A com acento grave', Aacute: 'Letra maiúscula latina A com acento agudo', Acirc: 'Letra maiúscula latina A com circunflexo', Atilde: 'Letra maiúscula latina A com til', Auml: 'Letra maiúscula latina A com trema', Aring: 'Letra maiúscula latina A com sinal diacrítico', AElig: 'Letra Maiúscula Latina Æ', Ccedil: 'Letra maiúscula latina C com cedilha', Egrave: 'Letra maiúscula latina E com acento grave', Eacute: 'Letra maiúscula latina E com acento agudo', Ecirc: 'Letra maiúscula latina E com circunflexo', Euml: 'Letra maiúscula latina E com trema', Igrave: 'Letra maiúscula latina I com acento grave', Iacute: 'Letra maiúscula latina I com acento agudo', Icirc: 'Letra maiúscula latina I com cincunflexo', Iuml: 'Letra maiúscula latina I com trema', ETH: 'Letra maiúscula latina Eth (Ðð)', Ntilde: 'Letra maiúscula latina N com til', Ograve: 'Letra maiúscula latina O com acento grave', Oacute: 'Letra maiúscula latina O com acento agudo', Ocirc: 'Letra maiúscula latina I com circunflexo', Otilde: 'Letra maiúscula latina O com til', Ouml: 'Letra maiúscula latina O com trema', times: 'Símbolo de Multiplicação', Oslash: 'Letra maiúscula O com barra', Ugrave: 'Letra maiúscula latina U com acento grave', Uacute: 'Letra maiúscula latina U com acento agudo', Ucirc: 'Letra maiúscula latina U com circunflexo', Uuml: 'Letra maiúscula latina E com trema', Yacute: 'Letra maiúscula latina Y com acento agudo', THORN: 'Letra maiúscula latina Rúnico', szlig: 'Letra minúscula latina s forte', agrave: 'Letra minúscula latina a com acento grave', aacute: 'Letra minúscula latina a com acento agudo', acirc: 'Letra minúscula latina a com circunflexo', atilde: 'Letra minúscula latina a com til', auml: 'Letra minúscula latina a com trema', aring: 'Letra minúscula latina a com sinal diacrítico', aelig: 'Letra minúscula latina æ', ccedil: 'Letra minúscula latina c com cedilha', egrave: 'Letra minúscula latina e com acento grave', eacute: 'Letra minúscula latina e com acento agudo', ecirc: 'Letra minúscula latina e com circunflexo', euml: 'Letra minúscula latina e com trema', igrave: 'Letra minúscula latina i com acento grave', iacute: 'Letra minúscula latina i com acento agudo', icirc: 'Letra minúscula latina i com circunflexo', iuml: 'Letra pequena latina i com trema', eth: 'Letra minúscula latina eth', ntilde: 'Letra minúscula latina n com til', ograve: 'Letra minúscula latina o com acento grave', oacute: 'Letra minúscula latina o com acento agudo', ocirc: 'Letra minúscula latina o com circunflexo', otilde: 'Letra minúscula latina o com til', ouml: 'Letra minúscula latina o com trema', divide: 'Símbolo de Divisão', oslash: 'Letra minúscula latina o com barra', ugrave: 'Letra minúscula latina u com acento grave', uacute: 'Letra minúscula latina u com acento agudo', ucirc: 'Letra minúscula latina u com circunflexo', uuml: 'Letra minúscula latina u com trema', yacute: 'Letra minúscula latina y com acento agudo', thorn: 'Letra minúscula latina Rúnico', yuml: 'Letra minúscula latina y com trema', OElig: 'Ligadura maiúscula latina OE', oelig: 'Ligadura minúscula latina oe', '372': 'Letra maiúscula latina W com circunflexo', '374': 'Letra maiúscula latina Y com circunflexo', '373': 'Letra minúscula latina w com circunflexo', '375': 'Letra minúscula latina y com circunflexo', sbquo: 'Aspa Simples inferior-9', '8219': 'Aspa Simples superior invertida-9', bdquo: 'Aspa Duplas inferior-9', hellip: 'Elipse Horizontal ', trade: 'Símbolo de Marca Registada', '9658': 'Ponteiro preto direito', bull: 'Marca', rarr: 'Seta para a direita', rArr: 'Seta dupla para a direita', hArr: 'Seta dupla direita esquerda', diams: 'Naipe diamante preto', asymp: 'Quase igual a ' } );
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'scayt', 'mk', { about: 'About SCAYT', // MISSING aboutTab: 'About', // MISSING addWord: 'Add Word', // MISSING allCaps: 'Ignore All-Caps Words', // MISSING dic_create: 'Create', // MISSING dic_delete: 'Delete', // MISSING dic_field_name: 'Dictionary name', // MISSING dic_info: 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING dic_rename: 'Rename', // MISSING dic_restore: 'Restore', // MISSING dictionariesTab: 'Dictionaries', // MISSING disable: 'Disable SCAYT', // MISSING emptyDic: 'Dictionary name should not be empty.', // MISSING enable: 'Enable SCAYT', // MISSING ignore: 'Ignore', // MISSING ignoreAll: 'Ignore All', // MISSING ignoreDomainNames: 'Ignore Domain Names', // MISSING langs: 'Languages', // MISSING languagesTab: 'Languages', // MISSING mixedCase: 'Ignore Words with Mixed Case', // MISSING mixedWithDigits: 'Ignore Words with Numbers', // MISSING moreSuggestions: 'More suggestions', // MISSING opera_title: 'Not supported by Opera', // MISSING options: 'Options', // MISSING optionsTab: 'Options', // MISSING title: 'Spell Check As You Type', // MISSING toggle: 'Toggle SCAYT', // MISSING noSuggestions: 'No suggestion' });
var rollupBabel7StepOverForOfArray = (function () { 'use strict'; // Babel will optimize this for..of because it call tell the value is an array. function root() { console.log("pause here"); var _arr = [1, 2]; for (var _i = 0; _i < _arr.length; _i++) { var val = _arr[_i]; console.log("pause again", val); } console.log("done"); } return root; }()); //# sourceMappingURL=step-over-for-of-array.js.map
'use strict'; exports.b = require("a").c;
// (C) Copyright 2015 Martin Dougiamas // // 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. angular.module('mm.addons.mod_imscp') /** * Mod imscp prefetch handler. * * @module mm.addons.mod_imscp * @ngdoc service * @name $mmaModImscpPrefetchHandler */ .factory('$mmaModImscpPrefetchHandler', function($mmaModImscp, mmaModImscpComponent) { var self = {}; self.component = mmaModImscpComponent; /** * Get the download size of a module. * * @module mm.addons.mod_imscp * @ngdoc method * @name $mmaModImscpPrefetchHandler#getDownloadSize * @param {Object} module Module to get the size. * @return {Number} Size. */ self.getDownloadSize = function(module) { var size = 0; angular.forEach(module.contents, function(content) { if ($mmaModImscp.isFileDownloadable(content) && content.filesize) { size = size + content.filesize; } }); return size; }; /** * Whether or not the module is enabled for the site. * * @module mm.addons.mod_imscp * @ngdoc method * @name $mmaModImscpPrefetchHandler#isEnabled * @return {Boolean} */ self.isEnabled = function() { return $mmaModImscp.isPluginEnabled(); }; /** * Prefetch the module. * * @module mm.addons.mod_imscp * @ngdoc method * @name $mmaModImscpPrefetchHandler#prefetch * @param {Object} module The module object returned by WS. * @param {Number} courseId Course ID the module belongs to. * @param {Boolean} single True if we're downloading a single module, false if we're downloading a whole section. * @return {Promise} Promise resolved when all files have been downloaded. Data returned is not reliable. */ self.prefetch = function(module, courseId, single) { return $mmaModImscp.prefetchContent(module); }; return self; });
/** * The slide menu widget * * @class Widgets.com.mcongrove.slideMenu */ var sections = []; var nodes = []; var color; /** * Initializes the slide menu * @param {Object} _params * @param {Array} _params.nodes The nodes (menu items) to show in the side menu as defined by the JSON configuration file * @param {Object} _params.color The colors for the menu * @param {String} _params.color.headingBackground The background color for menu headers * @param {String} _params.color.headingText The text color for menu headers */ $.init = function(_params) { sections = []; nodes = []; color = typeof _params.color !== "undefined" ? _params.color : null; // Creates a TableViewSection for each tab with a menuHeader property buildSections(_params.nodes); if(sections.length > 0) { var currentSection = -1; } for(var i = 0; i < _params.nodes.length; i++) { // Iterates through the created sections if(_params.nodes[i].menuHeader) { currentSection++; } var tab = Ti.UI.createTableViewRow({ id: _params.nodes[i].id, height: "47dp", backgroundcolor: "#111", backgroundSelectedColor: "#222", selectedBackgroundColor: "#222" }); var label = Ti.UI.createLabel({ text: _params.nodes[i].title, top: "0dp", left: "47dp", right: "13dp", height: "46dp", font: { fontSize: "16dp", fontFamily: "HelveticaNeue-Light" }, color: "#FFF", touchEnabled: false }); if(_params.nodes[i].image) { var icon = Ti.UI.createImageView({ image: _params.nodes[i].image, width: "21dp", height: "21dp", top: "13dp", left: "13dp", touchEnabled: false, preventDefaultImage: true }); tab.add(icon); } tab.add(label); if(sections.length > 0) { sections[currentSection].add(tab); // If the last tab has been created and added to a section or // the next tab is a new header, append the current section to the TableView if(i + 1 !== _params.nodes.length) { if(_params.nodes[i + 1].menuHeader) { $.Nodes.appendSection(sections[currentSection]); } } else { $.Nodes.appendSection(sections[currentSection]); } } else { nodes.push(tab); } } if(nodes.length > 0) { $.Nodes.setData(nodes); } // We have to remove before adding to make sure we're not duplicating $.Nodes.removeEventListener("click", handleClick); $.Nodes.addEventListener("click", handleClick); }; /** * Handles a click event on the nodes container * @param {Object} _event The event */ function handleClick(_event) { if(typeof _event.index !== "undefined") { $.setIndex(_event.index); } }; /** * Builds out the table sections * @param {Object} _nodes The tab items to show in the side menu * @private */ function buildSections(_nodes) { for(var i = 0; i < _nodes.length; i++) { // Assigns special menuHeader styling if(_nodes[i].menuHeader) { var header = Ti.UI.createView({ top: "0dp", height: "20dp", width: Ti.UI.FILL, backgroundColor: color.headingBackground }); var headerText = Ti.UI.createLabel({ text: _nodes[i].menuHeader, top: "2dp", left: "13dp", font: { fontSize: "12dp", fontWeight: "HelveticaNeue-Light" }, color: color.headingText, touchEnabled: false, verticalAlignment: Titanium.UI.TEXT_VERTICAL_ALIGNMENT_CENTER, isHeader: true }); header.add(headerText); var section = Ti.UI.createTableViewSection({ headerView: header }); sections.push(section); } } }; /** * Clears all items from the side menu */ $.clear = function() { $.Nodes.setData([]); $.Nodes.removeAllChildren(); }; /** * Sets the indexed item as active * @param {Object} _index The index of the item to show as active */ $.setIndex = function(_index) { $.Nodes.selectRow(_index); }; // Move the UI down if iOS7+ if(OS_IOS && parseInt(Ti.Platform.version.split(".")[0], 10) >= 7) { $.Nodes.top = "20dp"; }
// Copyright 2018 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. const KB = 1024; const MB = KB * KB; const GB = MB * KB; const kMillis2Seconds = 1 / 1000; function formatBytes(bytes) { const units = ['B', 'KiB', 'MiB', 'GiB']; const divisor = 1024; let index = 0; while (index < units.length && bytes >= divisor) { index++; bytes /= divisor; } return bytes.toFixed(2) + units[index]; } function formatSeconds(millis) { return (millis * kMillis2Seconds).toFixed(2) + 's'; }
var bufferClone = require('./bufferClone'); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', numberTag = '[object Number]', regexpTag = '[object RegExp]', stringTag = '[object String]'; var arrayBufferTag = '[object ArrayBuffer]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return bufferClone(object); case boolTag: case dateTag: return new Ctor(+object); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: var buffer = object.buffer; return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); case numberTag: case stringTag: return new Ctor(object); case regexpTag: var result = new Ctor(object.source, reFlags.exec(object)); result.lastIndex = object.lastIndex; } return result; } module.exports = initCloneByTag;
/** * @class Ext.ux.form.field.TinyMCEWindowManager * @extends tinymce.WindowManager * * @author Harald Hanek (c) 2011-2012 * @license http://harrydeluxe.mit-license.org */ Ext.define("Ext.ux.form.field.TinyMCEWindowManager", { extend: tinymce.WindowManager, constructor: function(config) { tinymce.WindowManager.call(this, config.editor); }, alert: function(txt, cb, s) { Ext.MessageBox.alert("", txt, function() { if (!Ext.isEmpty(cb)) { cb.call(this); } }, s); }, confirm: function(txt, cb, s) { Ext.MessageBox.confirm("", txt, function(btn) { if (!Ext.isEmpty(cb)) { cb.call(this, btn == "yes"); } }, s); }, open: function(s, p) { s = s || {}; p = p || {}; if (!s.type) { this.bookmark = this.editor.selection.getBookmark('simple'); } s.width = parseInt(s.width || 320); s.height = parseInt(s.height || 240) + (tinymce.isIE ? 8 : 0); s.min_width = parseInt(s.min_width || 150); s.min_height = parseInt(s.min_height || 100); s.max_width = parseInt(s.max_width || 2000); s.max_height = parseInt(s.max_height || 2000); s.movable = true; s.resizable = true; p.mce_width = s.width; p.mce_height = s.height; p.mce_inline = true; this.features = s; this.params = p; var win = Ext.create("Ext.window.Window", { title: s.name, width: s.width, height: s.height, minWidth: s.min_width, minHeight: s.min_height, resizable: true, maximizable: s.maximizable, minimizable: s.minimizable, modal: true, stateful: false, constrain: true, //border: false, layout: "fit", items: [Ext.create("Ext.Component", { autoEl: { tag: 'iframe', border: '0', frameborder: '0', src: s.url || s.file }, style: 'border-width: 0px;' })] }); p.mce_window_id = win.getId(); win.show(null, function() { if (this.editor.fullscreen_is_enabled) win.zIndexManager.setBase(200000); if (s.left && s.top) win.setPagePosition(s.left, s.top); var pos = win.getPosition(); s.left = pos[0]; s.top = pos[1]; this.onOpen.dispatch(this, s, p); }, this); win.toFront(true); return win; }, close: function(win) { // Probably not inline if (!win.tinyMCEPopup || !win.tinyMCEPopup.id) { tinymce.WindowManager.prototype.close.call(this, win); return; } var w = Ext.getCmp(win.tinyMCEPopup.id); if (w) { this.onClose.dispatch(this); w.close(); } }, setTitle: function(win, ti) { if (!win.tinyMCEPopup || !win.tinyMCEPopup.id) { tinymce.WindowManager.prototype.setTitle.call(this, win, ti); return; } var w = Ext.getCmp(win.tinyMCEPopup.id); if (w) w.setTitle(ti); }, resizeBy: function(dw, dh, id) { var w = Ext.getCmp(id); if (w) { var size = w.getSize(); w.setSize(size.width + dw, size.height + dh); } }, focus: function(id) { //var w = Ext.getCmp(id); //if(w) //w.setActive(true); } });
/* Copyright (c) 2004-2006, The Dojo Foundation All Rights Reserved. Licensed under the Academic Free License version 2.1 or above OR the modified BSD license. For more information on Dojo licensing, see: http://dojotoolkit.org/community/licensing.shtml */ ({"displayName":"ユーロ","symbol":"€"})
//// [declarationEmitIdentifierPredicates01.ts] export function f(x: any): x is number { return typeof x === "number"; } //// [declarationEmitIdentifierPredicates01.js] "use strict"; exports.__esModule = true; function f(x) { return typeof x === "number"; } exports.f = f; //// [declarationEmitIdentifierPredicates01.d.ts] export declare function f(x: any): x is number;
/** * @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 */ import { isPromise } from '../src/facade/lang'; import { Inject, Injectable, OpaqueToken, Optional } from './di'; /** * A function that will be executed when an application is initialized. * @experimental */ export const APP_INITIALIZER = new OpaqueToken('Application Initializer'); export class ApplicationInitStatus { constructor(appInits) { this._done = false; const asyncInitPromises = []; if (appInits) { for (let i = 0; i < appInits.length; i++) { const initResult = appInits[i](); if (isPromise(initResult)) { asyncInitPromises.push(initResult); } } } this._donePromise = Promise.all(asyncInitPromises).then(() => { this._done = true; }); if (asyncInitPromises.length === 0) { this._done = true; } } get done() { return this._done; } get donePromise() { return this._donePromise; } } /** @nocollapse */ ApplicationInitStatus.decorators = [ { type: Injectable }, ]; /** @nocollapse */ ApplicationInitStatus.ctorParameters = [ { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional },] }, ]; //# sourceMappingURL=application_init.js.map
function array_splice(arr, offst, lgth, replacement) { // discuss at: http://phpjs.org/functions/array_splice/ // original by: Brett Zamir (http://brett-zamir.me) // input by: Theriault // note: Order does get shifted in associative array input with numeric indices, // note: since PHP behavior doesn't preserve keys, but I understand order is // note: not reliable anyways // note: Note also that IE retains information about property position even // note: after being supposedly deleted, so use of this function may produce // note: unexpected results in IE if you later attempt to add back properties // note: with the same keys that had been deleted // depends on: is_int // example 1: input = {4: "red", 'abc': "green", 2: "blue", 'dud': "yellow"}; // example 1: array_splice(input, 2); // returns 1: {0: "blue", 'dud': "yellow"} // example 2: input = ["red", "green", "blue", "yellow"]; // example 2: array_splice(input, 3, 0, "purple"); // returns 2: [] // example 3: input = ["red", "green", "blue", "yellow"] // example 3: array_splice(input, -1, 1, ["black", "maroon"]); // returns 3: ["yellow"] var _checkToUpIndices = function (arr, ct, key) { // Deal with situation, e.g., if encounter index 4 and try to set it to 0, but 0 exists later in loop (need to // increment all subsequent (skipping current key, since we need its value below) until find unused) if (arr[ct] !== undefined) { var tmp = ct; ct += 1; if (ct === key) { ct += 1; } ct = _checkToUpIndices(arr, ct, key); arr[ct] = arr[tmp]; delete arr[tmp]; } return ct; }; if (replacement && typeof replacement !== 'object') { replacement = [replacement]; } if (lgth === undefined) { lgth = offst >= 0 ? arr.length - offst : -offst; } else if (lgth < 0) { lgth = (offst >= 0 ? arr.length - offst : -offst) + lgth; } if (Object.prototype.toString.call(arr) !== '[object Array]') { /*if (arr.length !== undefined) { // Deal with array-like objects as input delete arr.length; }*/ var lgt = 0, ct = -1, rmvd = [], rmvdObj = {}, repl_ct = -1, int_ct = -1; var returnArr = true, rmvd_ct = 0, rmvd_lgth = 0, key = ''; // rmvdObj.length = 0; for (key in arr) { // Can do arr.__count__ in some browsers lgt += 1; } offst = (offst >= 0) ? offst : lgt + offst; for (key in arr) { ct += 1; if (ct < offst) { if (this.is_int(key)) { int_ct += 1; if (parseInt(key, 10) === int_ct) { // Key is already numbered ok, so don't need to change key for value continue; } // Deal with situation, e.g., _checkToUpIndices(arr, int_ct, key); // if encounter index 4 and try to set it to 0, but 0 exists later in loop arr[int_ct] = arr[key]; delete arr[key]; } continue; } if (returnArr && this.is_int(key)) { rmvd.push(arr[key]); // PHP starts over here too rmvdObj[rmvd_ct++] = arr[key]; } else { rmvdObj[key] = arr[key]; returnArr = false; } rmvd_lgth += 1; // rmvdObj.length += 1; if (replacement && replacement[++repl_ct]) { arr[key] = replacement[repl_ct]; } else { delete arr[key]; } } // Make (back) into an array-like object // arr.length = lgt - rmvd_lgth + (replacement ? replacement.length : 0); return returnArr ? rmvd : rmvdObj; } if (replacement) { replacement.unshift(offst, lgth); return Array.prototype.splice.apply(arr, replacement); } return arr.splice(offst, lgth); }
/* * Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ /* ---------------------------------------------------------------------------- * Class * ------------------------------------------------------------------------- */ export default class Collapse { /** * Expand or collapse navigation on toggle * * @constructor * * @property {HTMLElement} el_ - Navigation list * * @param {(string|HTMLElement)} el - Selector or HTML element */ constructor(el) { const ref = (typeof el === "string") ? document.querySelector(el) : el if (!(ref instanceof HTMLElement)) throw new ReferenceError this.el_ = ref } /** * Animate expand and collapse smoothly * * Internet Explorer 11 is very slow at recognizing changes on the dataset * which results in the menu not expanding or collapsing properly. THerefore, * for reasons of compatibility, the attribute accessors are used. */ update() { const current = this.el_.getBoundingClientRect().height /* Expanded, so collapse */ if (current) { this.el_.style.maxHeight = `${current}px` requestAnimationFrame(() => { this.el_.setAttribute("data-md-state", "animate") this.el_.style.maxHeight = "0px" }) /* Collapsed, so expand */ } else { this.el_.setAttribute("data-md-state", "expand") this.el_.style.maxHeight = "" /* Read height and unset pseudo-toggled state */ const height = this.el_.getBoundingClientRect().height this.el_.removeAttribute("data-md-state") /* Set initial state and animate */ this.el_.style.maxHeight = "0px" requestAnimationFrame(() => { this.el_.setAttribute("data-md-state", "animate") this.el_.style.maxHeight = `${height}px` }) } /* Remove state on end of transition */ const end = ev => { const target = ev.target if (!(target instanceof HTMLElement)) throw new ReferenceError /* Reset height and state */ target.removeAttribute("data-md-state") target.style.maxHeight = "" /* Only fire once, so directly remove event listener */ target.removeEventListener("transitionend", end) } this.el_.addEventListener("transitionend", end, false) } /** * Reset height and pseudo-toggled state */ reset() { this.el_.dataset.mdState = "" this.el_.style.maxHeight = "" } }
var ffmpeg = require('../index'); // make sure you set the correct path to your video file var proc = ffmpeg('rtmp://path/to/live/stream', { timeout: 432000 }) // set video bitrate .videoBitrate(1024) // set h264 preset .addOption('preset','superfast') // set target codec .videoCodec('libx264') // set audio bitrate .audioBitrate('128k') // set audio codec .audioCodec('libfaac') // set number of audio channels .audioChannels(2) // set hls segments time .addOption('-hls_time', 10) // include all the segments in the list .addOption('-hls_list_size',0) // setup event handlers .on('end', function() { console.log('file has been converted succesfully'); }) .on('error', function(err) { console.log('an error happened: ' + err.message); }) // save to file .save('/path/to/your_target.m3u8');
/* YUI 3.18.1 (build f7e7bcb) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add("datasource-polling",function(e,t){function n(){this._intervals={}}n.prototype={_intervals:null,setInterval:function(t,n){var r=e.later(t,this,this.sendRequest,[n],!0);return this._intervals[r.id]=r,e.later(0,this,this.sendRequest,[n]),r.id},clearInterval:function(e,t){e=t||e,this._intervals[e]&&(this._intervals[e].cancel(),delete this._intervals[e])},clearAllIntervals:function(){e.each(this._intervals,this.clearInterval,this)}},e.augment(e.DataSource.Local,n)},"3.18.1",{requires:["datasource-local"]});
'use strict'; // Root-only test cases test.only('#Root-Suite, should run this tdd test-case #1', function () { (true).should.equal(true); }); test('#Root-Suite, should not run this tdd test-case #2', function () { (false).should.equal(true); }); test('#Root-Suite, should not run this tdd test-case #3', function () { (false).should.equal(true); });
var classgui_1_1component_1_1ComponentBase = [ [ "__new__", "d1/db2/classgui_1_1component_1_1ComponentBase.html#a1e1e9e905348b74b46c8bfddc0fb078d", null ], [ "__new__", "d1/db2/classgui_1_1component_1_1ComponentBase.html#a1e1e9e905348b74b46c8bfddc0fb078d", null ] ];
var __extends = this.__extends || function (d, b) { function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var M; (function (M) { var C = (function (_super) { __extends(C, _super); function C() { _super.apply(this, arguments); } return C; })(M.I); M.C = C; })(M || (M = {}));
exports.translations = { commands: { /* * Battle Commands */ reloadteams: {'s': 'Equipos actualizados', 'e': 'Un error ha hecho que sea imposble la lectura de los equipos'}, blockchallenges: { 'b': 'Retos bloqueados', 'nb': 'Retos desbloqueados' }, move: {'notbattle': 'Esto solo puede ser usado en batallas'}, jointours: { 'notchat': 'Este comando solo está disponible para las salas de chat', 'ad': 'Modo "tour autojoin" ya estaba deshabilitado para la sala', 'd': 'Modo "tour autojoin" deshabilitado para la sala', 'ae': 'Modo "tour autojoin" ya estaba habilitado para la sala', 'e': 'Modo "tour autojoin" habilitado para la sala' }, searchbattle: { 'e1': 'Debes especificar un formato', 'e21': 'El formato', 'e22': 'no es válido para buscar batallas en ladder', 'e31': 'No tengo equipos para buscar batalla en el formato', 'e32': 'Use el comando "team add" para agregar más equipos' }, ladderstart: { 'stop': 'La búsqueda de batallas se ha detenido', 'start': 'Buscando batallas en formato', 'e1': 'Debes especificar un formato', 'e21': 'El formato', 'e22': 'no es válido para buscar batallas en ladder', 'e31': 'No tengo equipos para buscar batalla en el formato', 'e32': 'Use el comando "team add" para agregar más equipos' }, challenge: { 'e11': 'Uso Correcto:', 'e12': '[usuario], [formato]', 'e21': 'El formato', 'e22': 'no es válido para retos', 'e31': 'No tengo equipos para retar en el formato', 'e32': 'Use el comando "team add" para agregar más equipos' }, jointour: { 'notchat': 'Este comando solo está disponible para las salas de chat', 'e1': 'No hay ningún torneo en esta sala', 'e2': 'Ya estaba participando en el torneo', 'e3': 'El torneo ya ha empezado', 'e41': 'No tengo equipos para unirme a un torneo en formato', 'e42': 'Use el comando "team add" para agregar más equipos' }, leavetour: { 'notchat': 'Este comando solo está disponible para las salas de chat', 'e1': 'No hay ningún torneo en esta sala', 'e2': 'No estaba participando en el torneo' }, team: { 'u1': 'Uso correcto', 'u2': '[add/delete/get/check]', 'u3': 'add, [nombre], [formato], [Exportable en Hastebin]', 'u4': 'delete, [nombre]', 'u5': 'get, [nombre]', 'u6': 'check, [nombre], (usuario)', 'format': 'El formato', 'notexists': 'no existe', 'download': 'Descargando y procesando equipo', 'team': 'El equipo', 'added': 'ha sido agregado correctamente a la lista de equipos', 'err': 'Error: no se ha podido subir el equipo a hastebin', 'err1': 'Error: No se ha encontrado el documento de Hastebin', 'err2': 'Error: El formato encontrado no era válido', 'err3': 'Error: Ya existe otro equipo con el mismo nombre, use otro nombre o elimine dicho equipo', 'err4': 'Error: Error en la conexión con Hastebin', 'removed': 'ha sido eliminado correctamente de la lista de equipos' }, teamlist: { 'list': 'Lista de equipos', 'empty': 'La lista de equipos está vacía', 'id': 'Id', 'format': 'Formato', 'pokemon': 'Pokemon', 'err': 'Error: no se ha podido subir la lista de equipos a hastebin' } }, battle: { 'battlefound': 'Batalla encontrada en ladder' } };
/** * @author sunag / http://www.sunag.com.br/ */ import { InputNode } from '../core/InputNode.js'; function BoolNode( value ) { InputNode.call( this, 'b' ); this.value = Boolean( value ); } BoolNode.prototype = Object.create( InputNode.prototype ); BoolNode.prototype.constructor = BoolNode; BoolNode.prototype.nodeType = "Bool"; BoolNode.prototype.generateReadonly = function ( builder, output, uuid, type/*, ns, needsUpdate */ ) { return builder.format( this.value, type, output ); }; BoolNode.prototype.copy = function ( source ) { InputNode.prototype.copy.call( this, source ); this.value = source.value; return this; }; BoolNode.prototype.toJSON = function ( meta ) { var data = this.getJSONNode( meta ); if ( ! data ) { data = this.createJSONNode( meta ); data.value = this.value; if ( this.readonly === true ) data.readonly = true; } return data; }; export { BoolNode };
/** * @author TristanVALCKE / https://github.com/Itee * @author Anonymous */ /* global QUnit */ import { runStdGeometryTests } from '../../qunit-utils'; import { SphereGeometry, SphereBufferGeometry } from '../../../../src/geometries/SphereGeometry'; export default QUnit.module( 'Geometries', () => { QUnit.module( 'SphereGeometry', ( hooks ) => { var geometries = undefined; hooks.beforeEach( function () { const parameters = { radius: 10, widthSegments: 20, heightSegments: 30, phiStart: 0.5, phiLength: 1.0, thetaStart: 0.4, thetaLength: 2.0, }; geometries = [ new SphereGeometry(), new SphereGeometry( parameters.radius ), new SphereGeometry( parameters.radius, parameters.widthSegments ), new SphereGeometry( parameters.radius, parameters.widthSegments, parameters.heightSegments ), new SphereGeometry( parameters.radius, parameters.widthSegments, parameters.heightSegments, parameters.phiStart ), new SphereGeometry( parameters.radius, parameters.widthSegments, parameters.heightSegments, parameters.phiStart, parameters.phiLength ), new SphereGeometry( parameters.radius, parameters.widthSegments, parameters.heightSegments, parameters.phiStart, parameters.phiLength, parameters.thetaStart ), new SphereGeometry( parameters.radius, parameters.widthSegments, parameters.heightSegments, parameters.phiStart, parameters.phiLength, parameters.thetaStart, parameters.thetaLength ), ]; } ); // INHERITANCE QUnit.todo( "Extending", ( assert ) => { assert.ok( false, "everything's gonna be alright" ); } ); // INSTANCING QUnit.todo( "Instancing", ( assert ) => { assert.ok( false, "everything's gonna be alright" ); } ); // OTHERS QUnit.test( 'Standard geometry tests', ( assert ) => { runStdGeometryTests( assert, geometries ); } ); } ); QUnit.module( 'SphereBufferGeometry', ( hooks ) => { var geometries = undefined; hooks.beforeEach( function () { const parameters = { radius: 10, widthSegments: 20, heightSegments: 30, phiStart: 0.5, phiLength: 1.0, thetaStart: 0.4, thetaLength: 2.0, }; geometries = [ new SphereBufferGeometry(), new SphereBufferGeometry( parameters.radius ), new SphereBufferGeometry( parameters.radius, parameters.widthSegments ), new SphereBufferGeometry( parameters.radius, parameters.widthSegments, parameters.heightSegments ), new SphereBufferGeometry( parameters.radius, parameters.widthSegments, parameters.heightSegments, parameters.phiStart ), new SphereBufferGeometry( parameters.radius, parameters.widthSegments, parameters.heightSegments, parameters.phiStart, parameters.phiLength ), new SphereBufferGeometry( parameters.radius, parameters.widthSegments, parameters.heightSegments, parameters.phiStart, parameters.phiLength, parameters.thetaStart ), new SphereBufferGeometry( parameters.radius, parameters.widthSegments, parameters.heightSegments, parameters.phiStart, parameters.phiLength, parameters.thetaStart, parameters.thetaLength ), ]; } ); // INHERITANCE QUnit.todo( "Extending", ( assert ) => { assert.ok( false, "everything's gonna be alright" ); } ); // INSTANCING QUnit.todo( "Instancing", ( assert ) => { assert.ok( false, "everything's gonna be alright" ); } ); // OTHERS QUnit.test( 'Standard geometry tests', ( assert ) => { runStdGeometryTests( assert, geometries ); } ); } ); } );
/** * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Defines the {@link CKEDITOR.plugins} object, which is used to * manage plugins registration and loading. */ /** * Manages plugins registration and loading. * * @class * @extends CKEDITOR.resourceManager * @singleton */ CKEDITOR.plugins = new CKEDITOR.resourceManager( 'plugins/', 'plugin' ); // PACKAGER_RENAME( CKEDITOR.plugins ) CKEDITOR.plugins.load = CKEDITOR.tools.override( CKEDITOR.plugins.load, function( originalLoad ) { var initialized = {}; return function( name, callback, scope ) { var allPlugins = {}; var loadPlugins = function( names ) { originalLoad.call( this, names, function( plugins ) { CKEDITOR.tools.extend( allPlugins, plugins ); var requiredPlugins = []; for ( var pluginName in plugins ) { var plugin = plugins[ pluginName ], requires = plugin && plugin.requires; if ( !initialized[ pluginName ] ) { // Register all icons eventually defined by this plugin. if ( plugin.icons ) { var icons = plugin.icons.split( ',' ); for ( var ic = 0 ; ic < icons.length ; ic++ ) { CKEDITOR.skin.addIcon( icons[ ic ], plugin.path + 'icons/' + icons[ ic ] + '.png' ); } } initialized[ pluginName ] = 1; } if ( requires ) { // Trasnform it into an array, if it's not one. if ( requires.split ) requires = requires.split( ',' ); for ( var i = 0; i < requires.length; i++ ) { if ( !allPlugins[ requires[ i ] ] ) requiredPlugins.push( requires[ i ] ); } } } if ( requiredPlugins.length ) loadPlugins.call( this, requiredPlugins ); else { // Call the "onLoad" function for all plugins. for ( pluginName in allPlugins ) { plugin = allPlugins[ pluginName ]; if ( plugin.onLoad && !plugin.onLoad._called ) { // Make it possible to return false from plugin::onLoad to disable it. if ( plugin.onLoad() === false ) delete allPlugins[ pluginName ]; plugin.onLoad._called = 1; } } // Call the callback. if ( callback ) callback.call( scope || window, allPlugins ); } }, this ); }; loadPlugins.call( this, name ); }; }); /** * Loads a specific language file, or auto detect it. A callback is * then called when the file gets loaded. * * CKEDITOR.plugins.setLang( 'myPlugin', 'en', { * title: 'My plugin', * selectOption: 'Please select an option' * } ); * * @param {String} pluginName The name of the plugin to which the provided translation * should be attached. * @param {String} languageCode The code of the language translation provided. * @param {Object} languageEntries An object that contains pairs of label and * the respective translation. */ CKEDITOR.plugins.setLang = function( pluginName, languageCode, languageEntries ) { var plugin = this.get( pluginName ), pluginLangEntries = plugin.langEntries || ( plugin.langEntries = {} ), pluginLang = plugin.lang || ( plugin.lang = [] ); if ( pluginLang.split ) pluginLang = pluginLang.split( ',' ); if ( CKEDITOR.tools.indexOf( pluginLang, languageCode ) == -1 ) pluginLang.push( languageCode ); pluginLangEntries[ languageCode ] = languageEntries; };
//// [tests/cases/compiler/systemDefaultImportCallable.ts] //// //// [core-js.d.ts] declare module core { var String: { repeat(text: string, count: number): string; }; } declare module "core-js/fn/string/repeat" { var repeat: typeof core.String.repeat; export default repeat; } //// [greeter.ts] import repeat from "core-js/fn/string/repeat"; const _: string = repeat(new Date().toUTCString() + " ", 2); //// [greeter.js] System.register(["core-js/fn/string/repeat"], function (exports_1, context_1) { "use strict"; var repeat_1, _; var __moduleName = context_1 && context_1.id; return { setters: [ function (repeat_1_1) { repeat_1 = repeat_1_1; } ], execute: function () { _ = repeat_1["default"](new Date().toUTCString() + " ", 2); } }; });
/* * virtual-interfacesv2.js Implementation of Rackspace os-virtual-interfacesv2 extension * * (C) 2013 Rackspace * Ken Perkins * MIT LICENSE * * */ var Server = require('../../server').Server, urlJoin = require('url-join'), _ = require('underscore'); var _servers = 'servers', _extension = 'os-virtual-interfacesv2'; /** * client.getVirtualInterfaces * * @description get the virtual interfaces for a specific instance * * @param {String|object} server the server or serverId to get the interfaces for * @param {Function} callback f(err, interfaces) where interfaces is an array of interfaces * @returns {*} */ exports.getVirtualInterfaces = function (server, callback) { var serverId = server instanceof Server ? server.id : server; return this._request({ path: urlJoin(_servers, serverId, _extension) }, function (err, body) { return err ? callback(err) : callback(null, body.virtual_interfaces); }); }; /** * client.createVirtualInterface * * @description Create a new virtual interface for a provided instance and network * * @param {String|object} server the server or serverId to add the interface to * @param {String|object} network The network or networkId * @param callback */ exports.createVirtualInterface = function (server, network, callback) { var serverId = server instanceof Server ? server.id : server, networkId = (typeof network === 'object') ? network.id : network; return this._request({ method: 'POST', path: urlJoin(_servers, serverId, _extension), body: { virtual_interface: { network_id: networkId } } }, function (err, body) { return err ? callback(err) : callback(null, body.virtual_interfaces); }); }; /** * client.deleteVirtualInterface * * @description Delete a virtual interface from a server * * @param {String|object} server the server or serverId to delete the interface from * @param {String|object} network The network or networkId * @param {Function} callback * @returns {*} */ exports.deleteVirtualInterface = function deleteNetwork(server, network, callback) { var serverId = server instanceof Server ? server.id : server, networkId = (typeof network === 'object') ? network.id : network; return this._request({ path: urlJoin(_servers, serverId, _extension, networkId), method: 'DELETE' }, function (err) { return callback(err); }); };
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ 'use strict'; var models = require('./index'); var util = require('util'); /** * @class * Initializes a new instance of the ResourceCollection class. * @constructor * @member {object} [productresource] * * @member {string} [productresource.pname] * * @member {number} [productresource.lsize] * * @member {string} [productresource.provisioningState] * * @member {array} [arrayofresources] * * @member {object} [dictionaryofresources] * */ function ResourceCollection() { } /** * Defines the metadata of ResourceCollection * * @returns {object} metadata of ResourceCollection * */ ResourceCollection.prototype.mapper = function () { return { required: false, serializedName: 'ResourceCollection', type: { name: 'Composite', className: 'ResourceCollection', modelProperties: { productresource: { required: false, serializedName: 'productresource', type: { name: 'Composite', className: 'FlattenedProduct' } }, arrayofresources: { required: false, serializedName: 'arrayofresources', type: { name: 'Sequence', element: { required: false, serializedName: 'FlattenedProductElementType', type: { name: 'Composite', className: 'FlattenedProduct' } } } }, dictionaryofresources: { required: false, serializedName: 'dictionaryofresources', type: { name: 'Dictionary', value: { required: false, serializedName: 'FlattenedProductElementType', type: { name: 'Composite', className: 'FlattenedProduct' } } } } } } }; }; module.exports = ResourceCollection;
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var Lint = require("tslint"); var sprintf_js_1 = require("sprintf-js"); var SyntaxKind = require("./util/syntaxKind"); var Rule = (function (_super) { __extends(Rule, _super); function Rule() { return _super !== null && _super.apply(this, arguments) || this; } Rule.prototype.apply = function (sourceFile) { return this.applyWithWalker(new ExpressionCallMetadataWalker(sourceFile, this.getOptions())); }; Rule.metadata = { ruleName: 'no-forward-ref', type: 'maintainability', description: "Disallows usage of forward references for DI.", rationale: "The flow of DI is disrupted by using `forwardRef` and might make code more difficult to understand.", options: null, optionsDescription: "Not configurable.", typescriptOnly: true, }; Rule.FAILURE_IN_CLASS = 'Avoid using forwardRef in class "%s"'; Rule.FAILURE_IN_VARIABLE = 'Avoid using forwardRef in variable "%s"'; return Rule; }(Lint.Rules.AbstractRule)); exports.Rule = Rule; var ExpressionCallMetadataWalker = (function (_super) { __extends(ExpressionCallMetadataWalker, _super); function ExpressionCallMetadataWalker() { return _super !== null && _super.apply(this, arguments) || this; } ExpressionCallMetadataWalker.prototype.visitCallExpression = function (node) { this.validateCallExpression(node); _super.prototype.visitCallExpression.call(this, node); }; ExpressionCallMetadataWalker.prototype.validateCallExpression = function (callExpression) { if (callExpression.expression.text === 'forwardRef') { var currentNode = callExpression; while (currentNode.parent.parent) { currentNode = currentNode.parent; } var failureConfig = []; if (currentNode.kind === SyntaxKind.current().VariableStatement) { failureConfig = [Rule.FAILURE_IN_VARIABLE, currentNode.declarationList.declarations[0].name.text]; } else { failureConfig = [Rule.FAILURE_IN_CLASS, currentNode.name.text]; } this.addFailure(this.createFailure(callExpression.getStart(), callExpression.getWidth(), sprintf_js_1.sprintf.apply(this, failureConfig))); } }; return ExpressionCallMetadataWalker; }(Lint.RuleWalker)); exports.ExpressionCallMetadataWalker = ExpressionCallMetadataWalker;
/** * 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. * * @flow */ export type Source = {| fileName: string, lineNumber: number, |}; export type ReactElement = {| $$typeof: any, type: any, key: any, ref: any, props: any, // ReactFiber _owner: any, // __DEV__ _store: {validated: boolean, ...}, _self: React$Element<any>, _shadowChildren: any, _source: Source, |};
'use strict'; // A sample storage service, metered by max gigabytes of storage, thousand // light API calls and heavy API calls. /* istanbul ignore file */ module.exports = { resource_id: 'object-storage', effective: 1420070400000, plans: [ { plan_id: 'basic', metrics: [ { name: 'storage', prices: [ { country: 'USA', price: 1.00 }, { country: 'EUR', price: 0.7523 }, { country: 'CAN', price: 1.06 }] }, { name: 'thousand_light_api_calls', prices: [ { country: 'USA', price: 0.03 }, { country: 'EUR', price: 0.0226 }, { country: 'CAN', price: 0.0317 }] }, { name: 'heavy_api_calls', prices: [ { country: 'USA', price: 0.15 }, { country: 'EUR', price: 0.1129 }, { country: 'CAN', price: 0.1585 }] }] }, { plan_id: 'standard', metrics: [ { name: 'storage', prices: [ { country: 'USA', price: 0.50 }, { country: 'EUR', price: 0.45 }, { country: 'CAN', price: 0.65 }] }, { name: 'thousand_light_api_calls', prices: [ { country: 'USA', price: 0.04 }, { country: 'EUR', price: 0.04 }, { country: 'CAN', price: 0.05 }] }, { name: 'heavy_api_calls', prices: [ { country: 'USA', price: 0.18 }, { country: 'EUR', price: 0.16 }, { country: 'CAN', price: 0.24 }] }] }] };
/* * @name Load and Play Sound * @description Load sound during preload(). Play a sound when canvas is clicked. * <br><br><em><span class="small"> To run this example locally, you will need the * <a href="http://p5js.org/reference/#/libraries/p5.sound">p5.sound library</a> * a sound file, and a running <a href="https://github.com/processing/p5.js/wiki/Local-server">local server</a>.</span></em> */ var song; function setup() { song = loadSound('assets/lucky_dragons_-_power_melody.mp3'); createCanvas(720, 200); background(255,0,0); } function mousePressed() { if ( song.isPlaying() ) { // .isPlaying() returns a boolean song.stop(); background(255,0,0); } else { song.play(); background(0,255,0); } }
"use strict" const ruleMessages = require("../../utils/ruleMessages") const validateOptions = require("../../utils/validateOptions") const whitespaceChecker = require("../../utils/whitespaceChecker") const mediaQueryListCommaWhitespaceChecker = require("../mediaQueryListCommaWhitespaceChecker") const ruleName = "media-query-list-comma-newline-before" const messages = ruleMessages(ruleName, { expectedBefore: () => "Expected newline before \",\"", expectedBeforeMultiLine: () => "Expected newline before \",\" in a multi-line list", rejectedBeforeMultiLine: () => "Unexpected whitespace before \",\" in a multi-line list", }) const rule = function (expectation) { const checker = whitespaceChecker("newline", expectation, messages) return (root, result) => { const validOptions = validateOptions(result, ruleName, { actual: expectation, possible: [ "always", "always-multi-line", "never-multi-line", ], }) if (!validOptions) { return } mediaQueryListCommaWhitespaceChecker({ root, result, locationChecker: checker.beforeAllowingIndentation, checkedRuleName: ruleName, }) } } rule.ruleName = ruleName rule.messages = messages module.exports = rule
/** * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'magicline', 'nb', { title: 'Sett inn nytt avsnitt her' } );
var foo = { property: true }; export default foo;
'use strict' var convert = require('./convert') module.exports = is is.convert = convert // Assert if `test` passes for `node`. // When a `parent` node is known the `index` of node should also be given. // eslint-disable-next-line max-params function is(node, test, index, parent, context) { var hasParent = parent !== null && parent !== undefined var hasIndex = index !== null && index !== undefined var check = convert(test) if ( hasIndex && (typeof index !== 'number' || index < 0 || index === Infinity) ) { throw new Error('Expected positive finite index or child node') } if (hasParent && (!is(parent) || !parent.children)) { throw new Error('Expected parent node') } if (!node || !node.type || typeof node.type !== 'string') { return false } if (hasParent !== hasIndex) { throw new Error('Expected both parent and index') } return Boolean(check.call(context, node, index, parent)) }
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. // OffscreenCanvas test in a worker:2d.transformation.scale.multiple // Description:Multiple scale()s combine // Note: importScripts("/resources/testharness.js"); importScripts("/html/canvas/resources/canvas-tests.js"); var t = async_test("Multiple scale()s combine"); var t_pass = t.done.bind(t); var t_fail = t.step_func(function(reason) { throw reason; }); t.step(function() { var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); ctx.scale(Math.sqrt(2), Math.sqrt(2)); ctx.scale(Math.sqrt(2), Math.sqrt(2)); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 50, 25); _assertPixel(canvas, 90,40, 0,255,0,255, "90,40", "0,255,0,255"); t.done(); }); done();
if (true) function f1() {}; function f2() { var y = -8; return y % 2; } f2() / 3;
var assert = require('assert'); var transport = require('../../'); var utils = transport.utils; describe('utils', function() { function compare(a, b) { return a - b; } describe('binaryInsert', function() { var binaryInsert = utils.binaryInsert; it('should properly insert items in sequential order', function() { var list = []; binaryInsert(list, 1, compare); binaryInsert(list, 2, compare); binaryInsert(list, 3, compare); binaryInsert(list, 4, compare); assert.deepEqual(list, [ 1, 2, 3, 4 ]); }); it('should properly insert items in reverse order', function() { var list = []; binaryInsert(list, 4, compare); binaryInsert(list, 3, compare); binaryInsert(list, 2, compare); binaryInsert(list, 1, compare); assert.deepEqual(list, [ 1, 2, 3, 4 ]); }); it('should properly insert items in random order', function() { var list = []; binaryInsert(list, 3, compare); binaryInsert(list, 2, compare); binaryInsert(list, 4, compare); binaryInsert(list, 1, compare); assert.deepEqual(list, [ 1, 2, 3, 4 ]); }); }); describe('binarySearch', function() { var binarySearch = utils.binarySearch; it('should return the index of the value', function() { var list = [ 1, 2, 3, 4, 5, 6, 7 ]; for (var i = 0; i < list.length; i++) assert.equal(binarySearch(list, list[i], compare), i); }); it('should return -1 when value is not present in list', function() { var list = [ 1, 2, 3, 5, 6, 7 ]; assert.equal(binarySearch(list, 4, compare), -1); assert.equal(binarySearch(list, 0, compare), -1); assert.equal(binarySearch(list, 8, compare), -1); }); }); describe('priority to weight', function() { var utils = transport.protocol.base.utils; var toWeight = utils.priorityToWeight; var toPriority = utils.weightToPriority; it('should preserve weight=16', function() { var priority = toPriority(16); assert.equal(priority, 3); assert.equal(toWeight(priority), 16); }); }); });
/* Soundfont Builder : 0.1 */ window = {}; // create fake window atob = require('atob'); btoa = require('btoa'); http = require('http'); fs = require('fs'); /// require('./jsmidi.js'); ////////////// var min = window.noteTable["C2"]; var max = window.noteTable["C7"]; var absmin = window.noteTable["A0"]; var absmax = window.noteTable["C8"] + 1; if (false) { var noteEvents = []; for (var key in window.noteTable) { var id = window.noteTable[key]; if (id < absmin || id > absmax) continue; // if (id < min || id > max) continue; var note = { duration: 0, channel: 0, pitch: id, volume: 100 }; noteEvents.push(window.MidiEvent.noteOn(note)); note.duration = 1024 * 0.75 >> 0; noteEvents.push(window.MidiEvent.noteOff(note)); } var track = new window.MidiTrack({ events: noteEvents }); var song = window.MidiWriter({ tracks: [track] }); var decoded = new Buffer(atob(song.b64), 'binary') fs.writeFile('build/SoundFont.midi', decoded, 'binary', function(err) {}); } else { for (var key in window.noteTable) { var id = window.noteTable[key]; if (id < absmin || id > absmax) continue; // if (id < min || id > max) continue; var note = { duration: 0, channel: 0, pitch: id, volume: 85 }; var noteEvents = []; noteEvents.push(window.MidiEvent.noteOn(note)); note.duration = 1024 * 0.75 >> 0; noteEvents.push(window.MidiEvent.noteOff(note)); var track = new window.MidiTrack({ events: noteEvents }); var song = window.MidiWriter({ tracks: [track] }); var decoded = new Buffer(atob(song.b64), 'binary') fs.writeFile('build/' + key + '.midi', decoded, 'binary', function(err) {}); } }
var config = require('./config'); var API = require('../'); var expect = require('expect.js'); describe('api_shop_express', function () { var api = new API(config.appid, config.appsecret); var express = { "delivery_template": { "Name": "testexpress", "Assumer": 0, "Valuation": 0, "TopFee": [ { "Type": 10000027, "Normal": { "StartStandards": 1, "StartFees": 2, "AddStandards": 3, "AddFees": 1 }, "Custom": [ { "StartStandards": 1, "StartFees": 100, "AddStandards": 1, "AddFees": 3, "DestCountry": "中国", "DestProvince": "广东省", "DestCity": "广州市" } ] }, { "Type": 10000028, "Normal": { "StartStandards": 1, "StartFees": 3, "AddStandards": 3, "AddFees": 2 }, "Custom": [ { "StartStandards": 1, "StartFees": 10, "AddStandards": 1, "AddFees": 30, "DestCountry": "中国", "DestProvince": "广东省", "DestCity": "广州市" } ] }, { "Type": 10000029, "Normal": { "StartStandards": 1, "StartFees": 4, "AddStandards": 3, "AddFees": 3 }, "Custom": [ { "StartStandards": 1, "StartFees": 8, "AddStandards": 2, "AddFees": 11, "DestCountry": "中国", "DestProvince": "广东省", "DestCity": "广州市" } ] } ] } }; describe('addExpressTemplate', function () { it('should unauthorized with empty list', function (done) { api.addExpressTemplate(express, function (err, data, res) { expect(err).to.be.ok(); expect(data).to.have.property('errcode', 48001); expect(data).to.have.property('errmsg', 'api unauthorized'); done(); }); }); }); describe('deleteExpressTemplate', function () { it('should unauthorized', function (done) { api.deleteExpressTemplate('tempalte_id', function (err, data, res) { expect(err).to.be.ok(); expect(data).to.have.property('errcode', 48001); expect(data).to.have.property('errmsg', 'api unauthorized'); done(); }); }); }); describe('updateExpressTemplate', function () { it('should unauthorized', function (done) { api.updateExpressTemplate(express, function (err, data, res) { expect(err).to.be.ok(); expect(data).to.have.property('errcode', 48001); expect(data).to.have.property('errmsg', 'api unauthorized'); done(); }); }); }); describe('getExpressTemplateById', function () { it('should unauthorized', function (done) { api.getExpressTemplateById('template_id', function (err, data, res) { expect(err).to.be.ok(); expect(data).to.have.property('errcode', 48001); expect(data).to.have.property('errmsg', 'api unauthorized'); done(); }); }); }); describe('getAllExpressTemplates', function () { it('should unauthorized', function (done) { api.getAllExpressTemplates(function (err, data, res) { expect(err).to.be.ok(); expect(data).to.have.property('errcode', 48001); expect(data).to.have.property('errmsg', 'api unauthorized'); done(); }); }); }); });
var fs = require("fs"), brain = require("brain"), path = require("path"), nomnom = require("nomnom"), utils = require("../../utils"), collect = require("../collect"); var opts = nomnom.options({ pos: { abbr: 'p', list: true, required: true, help: "Directory of cat head images" }, neg: { abbr: 'n', list: true, required: true, help: "Directory of negative images" }, testPos: { list: true, help: "Directory of positive test images" }, testNeg: { list: true, help: "Directory of negative test images" }, outfile: { default: __dirname + "/network.json", help: "file to save network JSON to" }, sample: { flag: true, help: "whether to sub-sample the negative images", hidden: true }, posLimit: { default: 10000, help: "maximum number of positive images to use" }, negLimit: { default: 10000, help: "maximum number of negative images to use" } }).colors().parse(); var params = { HOG: { cellSize: 4, blockSize: 2, blockStride: 1, bins: 6, norm: "L2" }, nn: { hiddenLayers: [10, 10], learningRate: 0.2 }, train: { errorThresh: 0.008, log: true, logPeriod: 1 } }; trainNetwork(params) function trainNetwork(params) { var samples = opts.sample ? 1 : 0; var data = collect.collectData(opts.pos, opts.neg, samples, opts.posLimit, opts.negLimit, params); console.log("training on", data.length); console.log("feature size:", data[0].input.length) var network = new brain.NeuralNetwork(params.nn); var stats = network.train(data, params.train); console.log("stats:", stats); console.log("parameters:", params); var json = JSON.stringify(network.toJSON(), 4) fs.writeFile(opts.outfile, json, function (err) { if (err) throw err; console.log('saved network to', opts.outfile); }); if (opts.testPos && opts.testNeg) { testNetwork(network); } } function testNetwork(network) { var data = collect.collectData(opts.testPos, opts.testNeg, opts.sample ? 1 : 0, undefined, undefined, params); console.log("testing on", data.length); console.log("feature size", data[0].input.length); console.time("TEST"); var stats = network.test(data); console.timeEnd("TEST"); console.log("error: " + stats.error); console.log("precision: " + stats.precision) console.log("recall: " + stats.recall) console.log("accuracy: " + stats.accuracy) console.log(stats.truePos + " true positives"); console.log(stats.trueNeg + " true negatives"); console.log(stats.falsePos + " false positives"); console.log(stats.falseNeg + " false negatives"); console.log(stats.total + " total"); }
/** * @fileoverview Rule to flag when IIFE is not wrapped in parens * @author Ilya Volodin */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = { meta: { docs: { description: "require parentheses around immediate `function` invocations", category: "Best Practices", recommended: false }, schema: [ { enum: ["outside", "inside", "any"] } ] }, create(context) { const style = context.options[0] || "outside"; const sourceCode = context.getSourceCode(); /** * Check if the node is wrapped in () * @param {ASTNode} node node to evaluate * @returns {boolean} True if it is wrapped * @private */ function wrapped(node) { const previousToken = sourceCode.getTokenBefore(node), nextToken = sourceCode.getTokenAfter(node); return previousToken && previousToken.value === "(" && nextToken && nextToken.value === ")"; } return { CallExpression(node) { if (node.callee.type === "FunctionExpression") { const callExpressionWrapped = wrapped(node), functionExpressionWrapped = wrapped(node.callee); if (!callExpressionWrapped && !functionExpressionWrapped) { context.report(node, "Wrap an immediate function invocation in parentheses."); } else if (style === "inside" && !functionExpressionWrapped) { context.report(node, "Wrap only the function expression in parens."); } else if (style === "outside" && !callExpressionWrapped) { context.report(node, "Move the invocation into the parens that contain the function."); } } } }; } };
import { Directive, ElementRef, Renderer } from '@angular/core'; import { Config } from '../../config/config'; import { Ion } from '../ion'; /** * @hidden */ export class ItemDivider extends Ion { /** * @param {?} config * @param {?} elementRef * @param {?} renderer */ constructor(config, elementRef, renderer) { super(config, elementRef, renderer, 'item-divider'); } } ItemDivider.decorators = [ { type: Directive, args: [{ selector: 'ion-item-divider', host: { 'class': 'item-divider' } },] }, ]; /** * @nocollapse */ ItemDivider.ctorParameters = () => [ { type: Config, }, { type: ElementRef, }, { type: Renderer, }, ]; function ItemDivider_tsickle_Closure_declarations() { /** @type {?} */ ItemDivider.decorators; /** * @nocollapse * @type {?} */ ItemDivider.ctorParameters; } //# sourceMappingURL=item-divider.js.map
var baseHasIn = require('./_baseHasIn'), hasPath = require('./_hasPath'); /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b.c'); * // => true * * _.hasIn(object, ['a', 'b', 'c']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn;
module('Ember.String.underscore'); test("with normal string", function() { deepEqual(Ember.String.underscore('my favorite items'), 'my_favorite_items'); if (Ember.EXTEND_PROTOTYPES) { deepEqual('my favorite items'.underscore(), 'my_favorite_items'); } }); test("with dasherized string", function() { deepEqual(Ember.String.underscore('css-class-name'), 'css_class_name'); if (Ember.EXTEND_PROTOTYPES) { deepEqual('css-class-name'.underscore(), 'css_class_name'); } }); test("does nothing with underscored string", function() { deepEqual(Ember.String.underscore('action_name'), 'action_name'); if (Ember.EXTEND_PROTOTYPES) { deepEqual('action_name'.underscore(), 'action_name'); } }); test("with camelcased string", function() { deepEqual(Ember.String.underscore('innerHTML'), 'inner_html'); if (Ember.EXTEND_PROTOTYPES) { deepEqual('innerHTML'.underscore(), 'inner_html'); } });
module.exports = function(grunt) { grunt.registerTask('vjs-version', function() { var version = grunt.vjsVersion.full; grunt.log.writeln(version); return version; }); }
//// [parser509546_2.ts] "use strict"; export class Logger { public } //// [parser509546_2.js] "use strict"; var Logger = (function () { function Logger() { } return Logger; }()); exports.Logger = Logger;
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'fakeobjects', 'mn', { anchor: 'Зангуу', flash: 'Flash Animation', // MISSING hiddenfield: 'Нууц талбар', iframe: 'IFrame', // MISSING unknown: 'Unknown Object' // MISSING } );
/** * Copyright 2017 The AMP HTML 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. */ import {AbstractAmpContext} from './ampcontext'; import {adConfig} from '../ads/_config'; import {computeInMasterFrame} from './3p'; import {dev, user, userAssert} from '../src/log'; import {dict} from '../src/utils/object'; /** * Returns the "master frame" for all widgets of a given type. * This frame should be used to e.g. fetch scripts that can * be reused across frames. * once experiment is removed. * @param {!Window} win * @param {string} type * @return {!Window} */ export function masterSelection(win, type) { type = type.toLowerCase(); const configType = adConfig[type] && adConfig[type]['masterFrameAccessibleType']; // The master has a special name. const masterName = 'frame_' + (configType || type) + '_master'; let master; try { // Try to get the master from the parent. If it does not // exist yet we get a security exception that we catch // and ignore. master = win.parent.frames[masterName]; } catch (expected) { /* ignore */ } if (!master) { // No master yet, rename ourselves to be master. Yaihh. win.name = masterName; master = win; } return master; } export class IntegrationAmpContext extends AbstractAmpContext { /** @override */ isAbstractImplementation_() { return false; } /** * @return {boolean} * @protected */ updateDimensionsEnabled_() { // Only make this available to selected embeds until the generic solution is // available. return ( this.embedType_ === 'facebook' || this.embedType_ === 'twitter' || this.embedType_ === 'github' || this.embedType_ === 'mathml' || this.embedType_ === 'reddit' || this.embedType_ === 'yotpo' || this.embedType_ === 'embedly' ); } /** @return {!Window} */ get master() { return this.master_(); } /** @return {!Window} */ master_() { return masterSelection(this.win_, dev().assertString(this.embedType_)); } /** @return {boolean} */ get isMaster() { return this.isMaster_(); } /** @return {boolean} */ isMaster_() { return this.master == this.win_; } /** * @param {number} width * @param {number} height */ updateDimensions(width, height) { userAssert(this.updateDimensionsEnabled_(), 'Not available.'); this.requestResize(width, height); } /** * Sends bootstrap loaded message. */ bootstrapLoaded() { this.client_.sendMessage('bootstrap-loaded'); } /** * @param {!JsonObject=} opt_data Fields: width, height */ renderStart(opt_data) { this.client_.sendMessage('render-start', opt_data); } /** * Reports the "entity" that was rendered to this frame to the parent for * reporting purposes. * The entityId MUST NOT contain user data or personal identifiable * information. One example for an acceptable data item would be the * creative id of an ad, while the user's location would not be * acceptable. * TODO(alanorozco): Remove duplicate in 3p/integration.js once this * implementation becomes canonical. * @param {string} entityId See comment above for content. */ reportRenderedEntityIdentifier(entityId) { this.client_.sendMessage( 'entity-id', dict({ 'id': user().assertString(entityId), }) ); } /** * Performs a potentially asynchronous task exactly once for all frames of a * given type and the provide the respective value to all frames. * @param {!Window} global Your window * @param {string} taskId Must be not conflict with any other global variable * you use. Must be the same for all callers from all frames that want * the same result. * @param {function(function(*))} work Function implementing the work that * is to be done. Receives a second function that should be called with * the result when the work is done. * @param {function(*)} cb Callback function that is called when the work is * done. The first argument is the result. */ computeInMasterFrame(global, taskId, work, cb) { computeInMasterFrame(global, taskId, work, cb); } }
/// Copyright (c) 2012 Ecma International. All rights reserved. /** * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js * @description Array.prototype.filter throws TypeError if callbackfn is string */ function testcase() { var arr = new Array(10); try { arr.filter("abc"); } catch(e) { if(e instanceof TypeError) return true; } } runTestCase(testcase);
/// Copyright (c) 2012 Ecma International. All rights reserved. /** * This test is actually testing the [[Delete]] internal method (8.12.8). Since the * language provides no way to directly exercise [[Delete]], the tests are placed here. * * @path ch11/11.4/11.4.1/11.4.1-4.a-8-s.js * @description delete operator throws TypeError when deleting a non-configurable data property in strict mode * @onlyStrict */ function testcase() { 'use strict'; // NaN (15.1.1.1) has [[Configurable]] set to false. try { delete fnGlobalObject().NaN; return false; } catch (e) { return (e instanceof TypeError); } } runTestCase(testcase);
/// Copyright (c) 2012 Ecma International. All rights reserved. /** * @path ch10/10.4/10.4.3/10.4.3-1-55-s.js * @description Strict Mode - checking 'this' (Literal getter includes strict directive prologue) * @onlyStrict */ function testcase() { var o = { get foo() { "use strict"; return this; } } return o.foo===o; } runTestCase(testcase);
"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 Observable_1 = require('../Observable'); var ScalarObservable_1 = require('./ScalarObservable'); var EmptyObservable_1 = require('./EmptyObservable'); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var ArrayLikeObservable = (function (_super) { __extends(ArrayLikeObservable, _super); function ArrayLikeObservable(arrayLike, scheduler) { _super.call(this); this.arrayLike = arrayLike; this.scheduler = scheduler; if (!scheduler && arrayLike.length === 1) { this._isScalar = true; this.value = arrayLike[0]; } } ArrayLikeObservable.create = function (arrayLike, scheduler) { var length = arrayLike.length; if (length === 0) { return new EmptyObservable_1.EmptyObservable(); } else if (length === 1) { return new ScalarObservable_1.ScalarObservable(arrayLike[0], scheduler); } else { return new ArrayLikeObservable(arrayLike, scheduler); } }; ArrayLikeObservable.dispatch = function (state) { var arrayLike = state.arrayLike, index = state.index, length = state.length, subscriber = state.subscriber; if (subscriber.closed) { return; } if (index >= length) { subscriber.complete(); return; } subscriber.next(arrayLike[index]); state.index = index + 1; this.schedule(state); }; /** @deprecated internal use only */ ArrayLikeObservable.prototype._subscribe = function (subscriber) { var index = 0; var _a = this, arrayLike = _a.arrayLike, scheduler = _a.scheduler; var length = arrayLike.length; if (scheduler) { return scheduler.schedule(ArrayLikeObservable.dispatch, 0, { arrayLike: arrayLike, index: index, length: length, subscriber: subscriber }); } else { for (var i = 0; i < length && !subscriber.closed; i++) { subscriber.next(arrayLike[i]); } subscriber.complete(); } }; return ArrayLikeObservable; }(Observable_1.Observable)); exports.ArrayLikeObservable = ArrayLikeObservable; //# sourceMappingURL=ArrayLikeObservable.js.map
frappe.ui.form.on("Error Snapshot", "load", function(frm){ frm.set_read_only(true); }); frappe.ui.form.on("Error Snapshot", "refresh", function(frm){ frm.set_df_property("view", "options", frappe.render_template("error_snapshot", {"doc": frm.doc})); if (frm.doc.relapses) { frm.add_custom_button(__('Show Relapses'), function() { frappe.route_options = { parent_error_snapshot: frm.doc.name }; frappe.set_route("List", "Error Snapshot"); }); } });
module.exports = require('./input'); module.exports.PublicKey = require('./publickey'); module.exports.PublicKeyHash = require('./publickeyhash'); module.exports.MultiSigScriptHash = require('./multisigscripthash.js');
define( //begin v1.x content { "field-second": "Second", "field-year-relative+-1": "Last year", "field-week": "Week", "field-month-relative+-1": "Last month", "field-day-relative+-1": "Yesterday", "field-year": "Year", "field-week-relative+0": "This week", "field-week-relative+1": "Next week", "field-minute": "Minute", "field-week-relative+-1": "Last week", "field-day-relative+0": "Today", "field-hour": "Hour", "field-day-relative+1": "Tomorrow", "field-day": "Day", "field-month-relative+0": "This month", "field-month-relative+1": "Next month", "field-dayperiod": "AM/PM", "field-month": "Month", "field-era": "Era", "field-year-relative+0": "This year", "field-year-relative+1": "Next year", "eraAbbr": [ "Before R.O.C.", "Minguo" ], "field-weekday": "Day of the Week", "field-zone": "Time Zone" } //end v1.x content );
define( ({ buttonOk: "Aceptar", buttonCancel: "Cancelar", buttonSave: "Guardar", itemClose: "Cerrar" }) );
( function() { function stripHtml( value ) { // Remove html tags and space chars return value.replace( /<.[^<>]*?>/g, " " ).replace( /&nbsp;|&#160;/gi, " " ) // Remove punctuation .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" ); } $.validator.addMethod( "maxWords", function( value, element, params ) { return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params; }, $.validator.format( "Please enter {0} words or less." ) ); $.validator.addMethod( "minWords", function( value, element, params ) { return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params; }, $.validator.format( "Please enter at least {0} words." ) ); $.validator.addMethod( "rangeWords", function( value, element, params ) { var valueStripped = stripHtml( value ), regex = /\b\w+\b/g; return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ]; }, $.validator.format( "Please enter between {0} and {1} words." ) ); }() );
def(function () { return { name: 'five' }; });
/* GreedyNav.js - https://github.com/lukejacksonn/GreedyNav Licensed under the MIT license - http://opensource.org/licenses/MIT Copyright (c) 2015 Luke Jackson */ $(document).ready(function(){ var $btn = $('nav.greedy-nav button'); var $vlinks = $('nav.greedy-nav .visible-links'); var $hlinks = $('nav.greedy-nav .hidden-links'); var numOfItems = 0; var totalSpace = 0; var closingTime = 1000; var breakWidths = []; // Get initial state $vlinks.children().outerWidth(function(i, w) { totalSpace += w; numOfItems += 1; breakWidths.push(totalSpace); }); var availableSpace, numOfVisibleItems, requiredSpace, timer; function check() { // Get instant state availableSpace = $vlinks.width() - 10; numOfVisibleItems = $vlinks.children().length; requiredSpace = breakWidths[numOfVisibleItems - 1]; // There is not enough space if (requiredSpace > availableSpace) { $vlinks.children().last().prependTo($hlinks); numOfVisibleItems -= 1; check(); // There is more than enough space } else if (availableSpace > breakWidths[numOfVisibleItems]) { $hlinks.children().first().appendTo($vlinks); numOfVisibleItems += 1; check(); } // Update the button accordingly $btn.attr("count", numOfItems - numOfVisibleItems); if (numOfVisibleItems === numOfItems) { $btn.addClass('hidden'); } else $btn.removeClass('hidden'); } // Window listeners $(window).resize(function() { check(); }); $btn.on('click', function() { $hlinks.toggleClass('hidden'); $(this).toggleClass('close'); clearTimeout(timer); }); $hlinks.on('mouseleave', function() { // Mouse has left, start the timer timer = setTimeout(function() { $hlinks.addClass('hidden'); }, closingTime); }).on('mouseenter', function() { // Mouse is back, cancel the timer clearTimeout(timer); }) check(); });
/* YUI 3.5.1 (build 22) Copyright 2012 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add("lang/datatype-date-format_es-CO",function(a){a.Intl.add("datatype-date-format","es-CO",{"a":["dom","lun","mar","mié","jue","vie","sáb"],"A":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"b":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"B":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"c":"%a, %d %b %Y %H:%M:%S %Z","p":["A.M.","P.M."],"P":["a.m.","p.m."],"x":"%d/%m/%y","X":"%H:%M:%S"});},"3.5.1");
// Copyright 2016 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. Object.defineProperty(Number.prototype, "v", {get:constructor}); function foo(b) { return b.v; } foo(2); foo(3); foo(4);
/** * jQuery EasyUI 1.4.2 * * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. * * Licensed under the GPL license: http://www.gnu.org/licenses/gpl.txt * To use it on other terms please contact us at info@jeasyui.com * */ (function($){ function _1(_2){ $(_2).addClass("droppable"); $(_2).bind("_dragenter",function(e,_3){ $.data(_2,"droppable").options.onDragEnter.apply(_2,[e,_3]); }); $(_2).bind("_dragleave",function(e,_4){ $.data(_2,"droppable").options.onDragLeave.apply(_2,[e,_4]); }); $(_2).bind("_dragover",function(e,_5){ $.data(_2,"droppable").options.onDragOver.apply(_2,[e,_5]); }); $(_2).bind("_drop",function(e,_6){ $.data(_2,"droppable").options.onDrop.apply(_2,[e,_6]); }); }; $.fn.droppable=function(_7,_8){ if(typeof _7=="string"){ return $.fn.droppable.methods[_7](this,_8); } _7=_7||{}; return this.each(function(){ var _9=$.data(this,"droppable"); if(_9){ $.extend(_9.options,_7); }else{ _1(this); $.data(this,"droppable",{options:$.extend({},$.fn.droppable.defaults,$.fn.droppable.parseOptions(this),_7)}); } }); }; $.fn.droppable.methods={options:function(jq){ return $.data(jq[0],"droppable").options; },enable:function(jq){ return jq.each(function(){ $(this).droppable({disabled:false}); }); },disable:function(jq){ return jq.each(function(){ $(this).droppable({disabled:true}); }); }}; $.fn.droppable.parseOptions=function(_a){ var t=$(_a); return $.extend({},$.parser.parseOptions(_a,["accept"]),{disabled:(t.attr("disabled")?true:undefined)}); }; $.fn.droppable.defaults={accept:null,disabled:false,onDragEnter:function(e,_b){ },onDragOver:function(e,_c){ },onDragLeave:function(e,_d){ },onDrop:function(e,_e){ }}; })(jQuery);
"use strict"; /** * filesize * * @copyright 2017 Jason Mulligan <jason.mulligan@avoidwork.com> * @license BSD-3-Clause * @version 3.5.6 */ (function (global) { var b = /^(b|B)$/, symbol = { iec: { bits: ["b", "Kib", "Mib", "Gib", "Tib", "Pib", "Eib", "Zib", "Yib"], bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] }, jedec: { bits: ["b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"], bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] } }, fullform = { iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"], jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"] }; /** * filesize * * @method filesize * @param {Mixed} arg String, Int or Float to transform * @param {Object} descriptor [Optional] Flags * @return {String} Readable file size String */ function filesize(arg) { var descriptor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var result = [], val = 0, e = void 0, base = void 0, bits = void 0, ceil = void 0, full = void 0, fullforms = void 0, neg = void 0, num = void 0, output = void 0, round = void 0, unix = void 0, spacer = void 0, standard = void 0, symbols = void 0; if (isNaN(arg)) { throw new Error("Invalid arguments"); } bits = descriptor.bits === true; unix = descriptor.unix === true; base = descriptor.base || 2; round = descriptor.round !== undefined ? descriptor.round : unix ? 1 : 2; spacer = descriptor.spacer !== undefined ? descriptor.spacer : unix ? "" : " "; symbols = descriptor.symbols || descriptor.suffixes || {}; standard = base === 2 ? descriptor.standard || "jedec" : "jedec"; output = descriptor.output || "string"; full = descriptor.fullform === true; fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : []; e = descriptor.exponent !== undefined ? descriptor.exponent : -1; num = Number(arg); neg = num < 0; ceil = base > 2 ? 1000 : 1024; // Flipping a negative number to determine the size if (neg) { num = -num; } // Determining the exponent if (e === -1 || isNaN(e)) { e = Math.floor(Math.log(num) / Math.log(ceil)); if (e < 0) { e = 0; } } // Exceeding supported length, time to reduce & multiply if (e > 8) { e = 8; } // Zero is now a special case because bytes divide by 1 if (num === 0) { result[0] = 0; result[1] = unix ? "" : symbol[standard][bits ? "bits" : "bytes"][e]; } else { val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e)); if (bits) { val = val * 8; if (val >= ceil && e < 8) { val = val / ceil; e++; } } result[0] = Number(val.toFixed(e > 0 ? round : 0)); result[1] = base === 10 && e === 1 ? bits ? "kb" : "kB" : symbol[standard][bits ? "bits" : "bytes"][e]; if (unix) { result[1] = standard === "jedec" ? result[1].charAt(0) : e > 0 ? result[1].replace(/B$/, "") : result[1]; if (b.test(result[1])) { result[0] = Math.floor(result[0]); result[1] = ""; } } } // Decorating a 'diff' if (neg) { result[0] = -result[0]; } // Applying custom symbol result[1] = symbols[result[1]] || result[1]; // Returning Array, Object, or String (default) if (output === "array") { return result; } if (output === "exponent") { return e; } if (output === "object") { return { value: result[0], suffix: result[1], symbol: result[1] }; } if (full) { result[1] = fullforms[e] ? fullforms[e] : fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s"); } return result.join(spacer); } // Partial application for functional programming filesize.partial = function (opt) { return function (arg) { return filesize(arg, opt); }; }; // CommonJS, AMD, script tag if (typeof exports !== "undefined") { module.exports = filesize; } else if (typeof define === "function" && define.amd) { define(function () { return filesize; }); } else { global.filesize = filesize; } })(typeof window !== "undefined" ? window : global);
"use strict"; var helpers = require("../../helpers/helpers"); exports["Etc/GMT-12"] = { };
function initialize_StylesTests() { InspectorTest.waitForStylesheetsOnFrontend = function(styleSheetsCount, callback) { var styleSheets = InspectorTest.cssModel.allStyleSheets(); if (styleSheets.length >= styleSheetsCount) { callback(styleSheets); return; } function onStyleSheetAdded() { var styleSheets = InspectorTest.cssModel.allStyleSheets(); if (styleSheets.length < styleSheetsCount) return; InspectorTest.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, onStyleSheetAdded, this); styleSheets.sort(styleSheetComparator); callback(null, styleSheets); } InspectorTest.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, onStyleSheetAdded, this); } }
/* jshint undef: true, unused: true */ /* global document */ /* global window */ /* global Benchmark */ /* global React */ if (typeof exports == 'undefined') exports = {}; /*http://benchmarkjs.com/docs#options*/ exports.name = 'React.renderComponent single div'; exports.setup = function(){ /*global*/_rootNode = document.createElement('div'); document.body.appendChild(_rootNode); }; exports.fn = function(){ React.renderComponent(React.DOM.div(null, 'lol, perf testing ', this.count), _rootNode); }; exports.teardown = function(){ if (React.unmountAndReleaseReactRootNode) React.unmountAndReleaseReactRootNode(_rootNode); else React.unmountComponentAtNode(_rootNode); };
/** * jquery.unique-element-id.js * * A simple jQuery plugin to get a unique ID for * any HTML element * * Usage: * $('some_element_selector').uid(); * * by Jamie Rumbelow <jamie@jamierumbelow.net> * http://jamieonsoftware.com * Copyright (c)2011 Jamie Rumbelow * * Licensed under the MIT license (http://www.opensource.org/licenses/MIT) */ (function($){ /** * Generate a new unqiue ID */ function generateUniqueId() { // Return a unique ID return "nextend-element-" + Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } /** * Get a unique ID for an element, ensuring that the * element has an id="" attribute */ $.fn.uid = function(){ // We need an element! Check the selector returned something if (!this.length > 0) { return generateUniqueId(); } // Act on only the first element. Also, fetch the element's ID attr var first_element = this.first(); // No? Generate one! id_attr = generateUniqueId(); // And set the ID attribute first_element.attr('id', id_attr); // Return it return id_attr; }; })(njQuery);
(function(jsGrid) { jsGrid.locales.ja = { grid: { noDataContent: "データが見つかりません。", deleteConfirm: "削除しますよろしですか。", pagerFormat: "頁: {first} {prev} {pages} {next} {last} &nbsp;&nbsp; 【{pageIndex}/{pageCount}】", pagePrevText: "前", pageNextText: "次", pageFirstText: "最初", pageLastText: "最後", loadMessage: "しばらくお待ちください…", invalidMessage: "入力されたデータが不正です。" }, loadIndicator: { message: "処理中…" }, fields: { control: { searchModeButtonTooltip: "検索モードへ", insertModeButtonTooltip: "登録モードへ", editButtonTooltip: "編集", deleteButtonTooltip: "削除", searchButtonTooltip: "フィルター", clearFilterButtonTooltip: "クリア", insertButtonTooltip: "登録", updateButtonTooltip: "更新", cancelEditButtonTooltip: "編集戻す" } }, validators: { required: { message: "項目が必要です。" }, rangeLength: { message: "項目の桁数が範囲外です。" }, minLength: { message: "項目の桁数が超過しています。" }, maxLength: { message: "項目の桁数が不足しています。" }, pattern: { message: "項目の値がパターンに一致しません。" }, range: { message: "項目の値が範囲外です。" }, min: { message: "項目の値が超過しています。" }, max: { message: "項目の値が不足しています。" } } }; }(jsGrid, jQuery));
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // MIT License. See license.txt // for license information please see license.txt frappe.provide("frappe.form.formatters"); frappe.form.formatters = { _right: function(value, options) { if(options && options.inline) { return value; } else { return "<div style='text-align: right'>" + value + "</div>"; } }, Data: function(value) { return value==null ? "" : value; }, Select: function(value) { return __(frappe.form.formatters["Data"](value)); }, Float: function(value, docfield, options, doc) { // don't allow 0 precision for Floats, hence or'ing with null var precision = docfield.precision || cint(frappe.boot.sysdefaults.float_precision) || null; if (docfield.options && docfield.options.trim()) { // options points to a currency field, but expects precision of float! docfield.precision = precision; return frappe.form.formatters.Currency(value, docfield, options, doc); } else { // show 1.000000 as 1 if (!is_null(value)) { var temp = cstr(value).split("."); if (temp[1]==undefined || cint(temp[1])===0) { precision = 0; } } return frappe.form.formatters._right( ((value==null || value==="") ? "" : format_number(value, null, precision)), options); } }, Int: function(value, docfield, options) { return frappe.form.formatters._right(value==null ? "" : cint(value), options) }, Percent: function(value, docfield, options) { return frappe.form.formatters._right(flt(value, 2) + "%", options) }, Currency: function(value, docfield, options, doc) { var currency = frappe.meta.get_field_currency(docfield, doc); return frappe.form.formatters._right((value==null || value==="") ? "" : format_currency(value, currency, docfield.precision || null), options); }, Check: function(value) { return value ? "<i class='icon-check'></i>" : "<i class='icon-check-empty'></i>"; }, Link: function(value, docfield, options) { var doctype = docfield._options || docfield.options; if(options && options.for_print) return value; if(!value) return ""; if(docfield && docfield.link_onclick) { return repl('<a onclick="%(onclick)s">%(value)s</a>', {onclick: docfield.link_onclick.replace(/"/g, '&quot;'), value:value}); } else if(docfield && doctype) { return repl('%(icon)s<a href="#Form/%(doctype)s/%(name)s">%(label)s</a>', { doctype: encodeURIComponent(doctype), name: encodeURIComponent(value), label: value, icon: (options && options.no_icon) ? "" : ('<i class="icon-fixed-width '+frappe.boot.doctype_icons[doctype]+'"></i> ') }); } else { return value; } }, Date: function(value) { return value ? dateutil.str_to_user(value) : ""; }, Text: function(value) { if(value) { var tags = ["<p", "<div", "<br"]; var match = false; for(var i=0; i<tags.length; i++) { if(value.match(tags[i])) { match = true; break; } } if(!match) { return replace_newlines(value); } } return frappe.form.formatters.Data(value); }, Tag: function(value) { var html = ""; $.each((value || "").split(","), function(i, v) { if(v) html+= '<span class="label label-info" \ style="margin-right: 7px; cursor: pointer;"\ data-field="_user_tags" data-label="'+v+'">'+v +'</span>'; }); return html; }, Comment: function(value) { var html = ""; $.each(JSON.parse(value || "[]"), function(i, v) { if(v) html+= '<span class="label label-warning" \ style="margin-right: 7px;"\ data-field="_comments" data-label="'+v.name+'">'+v.comment+'</span>'; }); return html; }, Assign: function(value) { var html = ""; $.each(JSON.parse(value || "[]"), function(i, v) { if(v) html+= '<span class="label label-warning" \ style="margin-right: 7px;"\ data-field="_assign">'+v+'</span>'; }); return html; }, SmallText: function(value) { return frappe.form.formatters.Text(value); }, TextEditor: function(value) { return frappe.form.formatters.Text(frappe.utils.remove_script_and_style(value)); }, Code: function(value) { return "<pre>" + (value==null ? "" : $("<div>").text(value).html()) + "</pre>" }, WorkflowState: function(value) { workflow_state = frappe.get_doc("Workflow State", value); if(workflow_state) { return repl("<span class='label label-%(style)s' \ data-workflow-state='%(value)s'\ style='padding-bottom: 4px; cursor: pointer;'>\ <i class='icon-small icon-white icon-%(icon)s'></i> %(value)s</span>", { value: value, style: workflow_state.style.toLowerCase(), icon: workflow_state.icon }); } else { return "<span class='label'>" + value + "</span>"; } } } frappe.form.get_formatter = function(fieldtype) { if(!fieldtype) fieldtype = "Data"; return frappe.form.formatters[fieldtype.replace(/ /g, "")] || frappe.form.formatters.Data; } frappe.format = function(value, df, options, doc) { if(!df) df = {"fieldtype":"Data"}; var fieldtype = df.fieldtype || "Data"; // format Dynamic Link as a Link if(fieldtype==="Dynamic Link") { fieldtype = "Link"; df._options = doc ? doc[df.options] : null; } formatter = df.formatter || frappe.form.get_formatter(fieldtype); return formatter(value, df, options, doc); } frappe.get_format_helper = function(doc) { var helper = { get_formatted: function(fieldname) { var df = frappe.meta.get_docfield(doc.doctype, fieldname); if(!df) { console.log("fieldname not found: " + fieldname); }; return frappe.format(doc[fieldname], df, {inline:1}, doc); } }; $.extend(helper, doc); return helper; }
import { createStore } from 'redux'; import rootReducer from '../reducers'; export default function configureStore(initialState) { return createStore(rootReducer, initialState); }
/** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array ? array.length : 0; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } export default arraySome;
goog.require('ol.Map'); goog.require('ol.View'); goog.require('ol.layer.Tile'); goog.require('ol.proj'); goog.require('ol.source.BingMaps'); var key = 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3'; var imagery = new ol.layer.Tile({ source: new ol.source.BingMaps({key: key, imagerySet: 'Aerial'}) }); var map = new ol.Map({ layers: [imagery], target: 'map', view: new ol.View({ center: ol.proj.fromLonLat([-120, 50]), zoom: 6 }) }); var kernels = { none: [ 0, 0, 0, 0, 1, 0, 0, 0, 0 ], sharpen: [ 0, -1, 0, -1, 5, -1, 0, -1, 0 ], sharpenless: [ 0, -1, 0, -1, 10, -1, 0, -1, 0 ], blur: [ 1, 1, 1, 1, 1, 1, 1, 1, 1 ], shadow: [ 1, 2, 1, 0, 1, 0, -1, -2, -1 ], emboss: [ -2, 1, 0, -1, 1, 1, 0, 1, 2 ], edge: [ 0, 1, 0, 1, -4, 1, 0, 1, 0 ] }; function normalize(kernel) { var len = kernel.length; var normal = new Array(len); var i, sum = 0; for (i = 0; i < len; ++i) { sum += kernel[i]; } if (sum <= 0) { normal.normalized = false; sum = 1; } else { normal.normalized = true; } for (i = 0; i < len; ++i) { normal[i] = kernel[i] / sum; } return normal; } var select = document.getElementById('kernel'); var selectedKernel = normalize(kernels[select.value]); /** * Update the kernel and re-render on change. */ select.onchange = function() { selectedKernel = normalize(kernels[select.value]); map.render(); }; /** * Apply a filter on "postcompose" events. */ imagery.on('postcompose', function(event) { convolve(event.context, selectedKernel); }); /** * Apply a convolution kernel to canvas. This works for any size kernel, but * performance starts degrading above 3 x 3. * @param {CanvasRenderingContext2D} context Canvas 2d context. * @param {Array.<number>} kernel Kernel. */ function convolve(context, kernel) { var canvas = context.canvas; var width = canvas.width; var height = canvas.height; var size = Math.sqrt(kernel.length); var half = Math.floor(size / 2); var inputData = context.getImageData(0, 0, width, height).data; var output = context.createImageData(width, height); var outputData = output.data; for (var pixelY = 0; pixelY < height; ++pixelY) { var pixelsAbove = pixelY * width; for (var pixelX = 0; pixelX < width; ++pixelX) { var r = 0, g = 0, b = 0, a = 0; for (var kernelY = 0; kernelY < size; ++kernelY) { for (var kernelX = 0; kernelX < size; ++kernelX) { var weight = kernel[kernelY * size + kernelX]; var neighborY = Math.min( height - 1, Math.max(0, pixelY + kernelY - half)); var neighborX = Math.min( width - 1, Math.max(0, pixelX + kernelX - half)); var inputIndex = (neighborY * width + neighborX) * 4; r += inputData[inputIndex] * weight; g += inputData[inputIndex + 1] * weight; b += inputData[inputIndex + 2] * weight; a += inputData[inputIndex + 3] * weight; } } var outputIndex = (pixelsAbove + pixelX) * 4; outputData[outputIndex] = r; outputData[outputIndex + 1] = g; outputData[outputIndex + 2] = b; outputData[outputIndex + 3] = kernel.normalized ? a : 255; } } context.putImageData(output, 0, 0); }
/** * @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"; var reflection_capabilities_1 = require('./reflection_capabilities'); var reflector_1 = require('./reflector'); var reflector_2 = require('./reflector'); exports.ReflectionInfo = reflector_2.ReflectionInfo; exports.Reflector = reflector_2.Reflector; /** * The {@link Reflector} used internally in Angular to access metadata * about symbols. */ exports.reflector = new reflector_1.Reflector(new reflection_capabilities_1.ReflectionCapabilities()); //# sourceMappingURL=reflection.js.map
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // MIT License. See license.txt // js inside blog page $(document).ready(function() { // make list of blogs blog.get_list(); $("#next-page").click(function() { blog.get_list(); }) if(get_url_arg("by_name")) { $("#blot-subtitle").html("Posts by " + get_url_arg("by_name")).toggle(true); } if(get_url_arg("category")) { $("#blot-subtitle").html("Posts filed under " + get_url_arg("category")).toggle(true); } }); var blog = { start: 0, get_list: function() { $.ajax({ method: "GET", url: "/", data: { cmd: "website.doctype.blog_post.blog_post.get_blog_list", start: blog.start, by: get_url_arg("by"), category: get_url_arg("category") }, dataType: "json", success: function(data) { $(".progress").toggle(false); if(data.exc) console.log(data.exc); blog.render(data.message); } }); }, render: function(data) { if(!data) data = []; var $wrap = $("#blog-list"); $.each(data, function(i, b) { // comments if(!b.comments) { b.comment_text = 'No comments yet.' } else if (b.comments===1) { b.comment_text = '1 comment.' } else { b.comment_text = b.comments + ' comments.' } b.page_name = encodeURIComponent(b.page_name); $(repl('<div class="row">\ <div class="col-md-1">\ <div class="avatar avatar-medium" style="margin-top: 6px;">\ <img src="%(avatar)s" />\ </div>\ </div>\ <div class="col-md-11">\ <h4><a href="%(page_name)s">%(title)s</a></h4>\ <p>%(content)s</p>\ <p style="color: #aaa; font-size: 90%">\ <a href="blog?by=%(blogger)s&by_name=%(full_name)s">\ %(full_name)s</a> wrote this on %(published)s / %(comment_text)s</p>\ </div>\ </div><hr>', b)).appendTo($wrap); }); blog.start += (data.length || 0); if(!data.length || data.length < 20) { if(blog.start) { $("#next-page").toggle(false) .parent().append("<div class='text-muted'>Nothing more to show.</div>"); } else { $("#next-page").toggle(false) .parent().append("<div class='alert alert-warning'>No blogs written yet.</div>"); } } else { $("#next-page").toggle(true); } } }
/** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap;
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = require('babel-runtime/helpers/createClass'); var _createClass3 = _interopRequireDefault(_createClass2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Reference = function () { function Reference(_ref) { var node = _ref.node, scope = _ref.scope, read = _ref.read, write = _ref.write, type = _ref.type; (0, _classCallCheck3.default)(this, Reference); this.node = node; this.scope = scope; this.read = read; this.write = write; this.type = type; } (0, _createClass3.default)(Reference, [{ key: 'isRead', value: function isRead() { return this.read; } }, { key: 'isWrite', value: function isWrite() { return this.write; } }, { key: 'isReadOnly', value: function isReadOnly() { return this.read && !this.write; } }, { key: 'isWriteOnly', value: function isWriteOnly() { return !this.read && this.write; } }, { key: 'isReadWrite', value: function isReadWrite() { return this.read && this.write; } }]); return Reference; }(); exports.default = Reference; //# sourceMappingURL=Reference.js.map