text
stringlengths
2
6.14k
$(document).ready(function () { var plotStyle = { series: {lines: {show: true, fill: true}, points: {show: true, fill: true}}}; $(".plot-container").each(function() { var container = $(this), queryUrl = container.data("query-url"); $.get(queryUrl).success(function(response) { $.plot(container, response, $.extend({ xaxis: { mode: container.data("mode") }}, plotStyle)); }); }); });
v.setCursorPosition(2,8); v.type("private:"); v.enter(); v.type("void ok();"); v.enter(); v.type("public:"); v.enter(); v.type("void ok();"); v.enter(); v.type("protected:"); v.enter(); v.type("void ok();");
/** * Copyright (c) 2014, Oracle and/or its affiliates. * All rights reserved. */ "use strict";var l={"EU":["EU","Avrupa"]};(this?this:window)['DvtBaseMapManager']['_UNPROCESSED_MAPS'][2].push(["europe","continent",l]);
function safeStringify(obj) { var out = null; if (Array.prototype.toJSON != undefined) { var oldToJson = Array.prototype.toJSON; delete Array.prototype.toJSON; out = JSON.stringify(obj); Array.prototype.toJSON = Array.prototype.toJSON; } else { out = JSON.stringify(json); } return out; } function confirmChanges(form, msg) { var ret = confirm(msg); return ret; } function confirmChangesAndEnterVersion(form, msg) { var ret = prompt(msg, ""); if (ret == null) { //The user wished to abort return false; } else if (ret.length == 0) { //The user did not enter a message alert("ERROR: You did not enter a message describing what you changed!"); return false; } else { /* Jenkins is nasty; it decodes the form into a JSON representation * BEFORE handing it over to us. As such, changing the form is useless * and we need to read-in and manipulate the JSON itself. * * Do note though that Prototype.js badly interacts with JSON, so * we need to protect ourselves by unsetting its Array.toJSON method */ if (form.elements.json != null && form.elements.json != undefined) { var json = JSON.parse(form.elements.json.value); //Check if there's a "versionMessageString" in there if (json.versionMessageString != null && json.versionMessageString != undefined) { json.versionMessageString = ret; //Now, copy back the JSON, but make sure that Prototype does not fuck up form.elements.json.value = safeStringify(json); } } return true; } }
//// [funduleUsedAcrossFileBoundary_file1.js] //// [funduleUsedAcrossFileBoundary_file2.js] function promiseWithCancellation(promise) { var deferred = Q.defer(); }
/** * IT lang variables * * Author : Luciano Vernaschi <luciano@virgilio.it> * Last Updated : Oct. 17th, 2006 * TinyMCE Version : 2.0.7 */ tinyMCE.addToLang('xhtmlxtras',{ cite_desc : 'Citazione', abbr_desc : 'Abbreviazione', acronym_desc : 'Acronimo', del_desc : 'Cancellazione', ins_desc : 'Inserimento', attribute_label_title : 'Titolo', attribute_label_id : 'ID', attribute_label_class : 'Classe', attribute_label_style : 'Stile', attribute_label_cite : 'Cita', attribute_label_datetime : 'Data/ora', attribute_label_langdir : 'Direzione del testo', attribute_option_ltr : 'Da sinistra a destra', attribute_option_rtl : 'Da destra a sinistra', attribute_label_langcode : 'Lingua', general_tab : 'Generale', attrib_tab : 'Attributi', events_tab : 'Eventi', fieldset_general_tab : 'Impostazioni generali', fieldset_attrib_tab : 'Attributi dell\'elemento', fieldset_events_tab : 'Eventi dell\'elemento', title_ins_element : 'Inserimento di un elemento', title_del_element : 'Cancellazione di un elemento', title_acronym_element : 'Elemento acronimo', title_abbr_element : 'Elemento abbreviazione', title_cite_element : 'Elemento citazione', remove : 'Rimuovi ', not_set : '--non impostato--' });
'use strict'; import { module } from 'angular'; import './regionFilter.component.less'; import { CORE_PROJECTS_DASHBOARD_REGIONFILTER_REGIONFILTER_SERVICE } from './regionFilter.service'; export const CORE_PROJECTS_DASHBOARD_REGIONFILTER_REGIONFILTER_COMPONENT = 'spinnaker.deck.projects.dashboard.regionFilter.component'; export const name = CORE_PROJECTS_DASHBOARD_REGIONFILTER_REGIONFILTER_COMPONENT; // for backwards compatibility module(CORE_PROJECTS_DASHBOARD_REGIONFILTER_REGIONFILTER_COMPONENT, [ CORE_PROJECTS_DASHBOARD_REGIONFILTER_REGIONFILTER_SERVICE, ]).component('regionFilter', { bindings: { regionFilter: '=', regions: '=', }, templateUrl: require('./regionFilter.component.html'), controller: [ 'regionFilterService', function(regionFilterService) { this.clearFilter = regionFilterService.clearFilter; this.toggleRegion = regionFilterService.toggleRegion; this.sortFilter = regionFilterService.sortFilter; }, ], });
var dependencyObservable = require("ui/core/dependency-observable"); var view = require("ui/core/view"); var proxy = require("ui/core/proxy"); var imageSource = require("image-source"); var enums = require("ui/enums"); var platform = require("platform"); var utils = require("utils/utils"); var types = require("utils/types"); var SRC = "src"; var IMAGE_SOURCE = "imageSource"; var IMAGE = "Image"; var ISLOADING = "isLoading"; var STRETCH = "stretch"; var AffectsLayout = platform.device.os === platform.platformNames.android ? dependencyObservable.PropertyMetadataSettings.None : dependencyObservable.PropertyMetadataSettings.AffectsLayout; function onSrcPropertyChanged(data) { var image = data.object; var value = data.newValue; if (types.isString(value)) { value = value.trim(); image.imageSource = null; image["_url"] = value; image._setValue(Image.isLoadingProperty, true); if (utils.isDataURI(value)) { var base64Data = value.split(",")[1]; if (types.isDefined(base64Data)) { image.imageSource = imageSource.fromBase64(base64Data); image._setValue(Image.isLoadingProperty, false); } } else if (imageSource.isFileOrResourcePath(value)) { image.imageSource = imageSource.fromFileOrResource(value); image._setValue(Image.isLoadingProperty, false); } else { imageSource.fromUrl(value).then(function (r) { if (image["_url"] === value) { image.imageSource = r; image._setValue(Image.isLoadingProperty, false); } }); } } else if (value instanceof imageSource.ImageSource) { image.imageSource = value; } else { image.imageSource = imageSource.fromNativeSource(value); } } var Image = (function (_super) { __extends(Image, _super); function Image(options) { _super.call(this, options); } Object.defineProperty(Image.prototype, "imageSource", { get: function () { return this._getValue(Image.imageSourceProperty); }, set: function (value) { this._setValue(Image.imageSourceProperty, value); }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "src", { get: function () { return this._getValue(Image.srcProperty); }, set: function (value) { this._setValue(Image.srcProperty, value); }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "isLoading", { get: function () { return this._getValue(Image.isLoadingProperty); }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "stretch", { get: function () { return this._getValue(Image.stretchProperty); }, set: function (value) { this._setValue(Image.stretchProperty, value); }, enumerable: true, configurable: true }); Image.prototype._setNativeImage = function (nativeImage) { }; Image.srcProperty = new dependencyObservable.Property(SRC, IMAGE, new proxy.PropertyMetadata(undefined, dependencyObservable.PropertyMetadataSettings.None, onSrcPropertyChanged)); Image.imageSourceProperty = new dependencyObservable.Property(IMAGE_SOURCE, IMAGE, new proxy.PropertyMetadata(undefined, dependencyObservable.PropertyMetadataSettings.None)); Image.isLoadingProperty = new dependencyObservable.Property(ISLOADING, IMAGE, new proxy.PropertyMetadata(false, dependencyObservable.PropertyMetadataSettings.None)); Image.stretchProperty = new dependencyObservable.Property(STRETCH, IMAGE, new proxy.PropertyMetadata(enums.Stretch.aspectFit, AffectsLayout)); return Image; })(view.View); exports.Image = Image;
/* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ <% importScripts.forEach(function (filepath) { %>importScripts('<%- filepath %>'); <% }); %> (function (self) { 'use strict'; // On install, cache resources and skip waiting so the worker won't // wait for clients to be closed before becoming active. self.addEventListener('install', event => event.waitUntil( oghliner.cacheResources() .then(() => self.skipWaiting()) ) ); // On activation, delete old caches and start controlling the clients // without waiting for them to reload. self.addEventListener('activate', event => event.waitUntil( oghliner.clearOtherCaches() .then(() => self.clients.claim()) ) ); // Retrieves the request following oghliner strategy. self.addEventListener('fetch', event => { if (event.request.method === 'GET') { event.respondWith(oghliner.get(event.request)); } else { event.respondWith(self.fetch(event.request)); } }); var oghliner = self.oghliner = { // This is the unique prefix for all the caches controlled by this worker. CACHE_PREFIX: 'offline-cache:<%= cacheId %>:' + (self.registration ? self.registration.scope : '') + ':', // This is the unique name for the cache controlled by this version of the worker. get CACHE_NAME() { return this.CACHE_PREFIX + '<%= cacheVersion %>'; }, // This is a list of resources that will be cached. RESOURCES: [ <% resources.forEach(function (pathAndHash) { %> '<%- pathAndHash.path %>', // <%- pathAndHash.hash %> <% }); %> ], // Adds the resources to the cache controlled by this worker. cacheResources: function () { var now = Date.now(); var baseUrl = self.location; return this.prepareCache() .then(cache => Promise.all(this.RESOURCES.map(resource => { // Bust the request to get a fresh response var url = new URL(resource, baseUrl); var bustParameter = (url.search ? '&' : '') + '__bust=' + now; var bustedUrl = new URL(url.toString()); bustedUrl.search += bustParameter; // But cache the response for the original request var requestConfig = { credentials: 'same-origin' }; var originalRequest = new Request(url.toString(), requestConfig); var bustedRequest = new Request(bustedUrl.toString(), requestConfig); return fetch(bustedRequest) .then(response => { if (response.ok) { return cache.put(originalRequest, response); } console.error('Error fetching ' + url + ', status was ' + response.status); }); }))); }, // Remove the offline caches not controlled by this worker. clearOtherCaches: function () { var outOfDate = cacheName => cacheName.startsWith(this.CACHE_PREFIX) && cacheName !== this.CACHE_NAME; return self.caches.keys() .then(cacheNames => Promise.all( cacheNames .filter(outOfDate) .map(cacheName => self.caches.delete(cacheName)) )); }, // Get a response from the current offline cache or from the network. get: function (request) { return this.openCache() .then(cache => cache.match(() => this.extendToIndex(request))) .then(response => { if (response) { return response; } return self.fetch(request); }); }, // Make requests to directories become requests to index.html extendToIndex: function (request) { var url = new URL(request.url, self.location); var path = url.pathname; if (path[path.length - 1] !== '/') { return request; } url.pathname += 'index.html'; return new Request(url.toString(), request); }, // Prepare the cache for installation, deleting it before if it already exists. prepareCache: function () { return self.caches.delete(this.CACHE_NAME) .then(() => this.openCache()); }, // Open and cache the offline cache promise to improve the performance when // serving from the offline-cache. openCache: function () { if (!this._cache) { this._cache = self.caches.open(this.CACHE_NAME); } return this._cache; } }; }(self));
var searchData= [ ['dsk_5freport',['dsk_report',['../unionevt__handler__struct.html#a0244496baffe591f0bde59fbe5054804',1,'evt_handler_struct']]], ['dtls_5fport',['DTLS_PORT',['../group__zwaveip.html#gab6326f12eafa348fcec7029ee5a5f7f1',1,'libzwaveip.h']]] ];
/// Copyright (c) 2009 Microsoft Corporation /// /// Redistribution and use in source and binary forms, with or without modification, are permitted provided /// that the following conditions are met: /// * Redistributions of source code must retain the above copyright notice, this list of conditions and /// the following disclaimer. /// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and /// the following disclaimer in the documentation and/or other materials provided with the distribution. /// * Neither the name of Microsoft nor the names of its contributors may be used to /// endorse or promote products derived from this software without specific prior written permission. /// /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR /// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS /// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE /// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT /// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, /// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF /// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ES5Harness.registerTest({ id: "15.2.3.5-4-140", path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.js", description: "Object.create - 'configurable' property of one property in 'Properties' is a Boolean object (8.10.5 step 4.b)", test: function testcase() { var newObj = Object.create({}, { prop: { configurable: new Boolean(true) } }); var beforeDeleted = newObj.hasOwnProperty("prop"); delete newObj.prop; var afterDeleted = newObj.hasOwnProperty("prop"); return beforeDeleted === true && afterDeleted === false; }, precondition: function prereq() { return fnExists(Object.create); } });
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ module.exports = { entry: './src/load.js', output: { path: './', filename: 'helium.bundle.js', }, module: { loaders: [ { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules\/(?!(zeppelin-spell|zeppelin-vis|zeppelin-tabledata)\/).*/, query: { presets: [ [ "env", { "targets": { "browsers": ["last 5 version", "> 5%", "edge >= 12", "ie >= 9", "safari 7", "chrome 47", "firefox 31"] } } ] ] }, }, { test: /(\.css)$/, loaders: ['style', 'css?sourceMap&importLoaders=1'], }, { test: /\.woff(\?\S*)?$/, loader: 'url-loader?limit=10000&minetype=application/font-woff', }, { test: /\.woff2(\?\S*)?$/, loader: 'url-loader?limit=10000&minetype=application/font-woff', }, { test: /\.eot(\?\S*)?$/, loader: 'url-loader', }, { test: /\.ttf(\?\S*)?$/, loader: 'url-loader', }, { test: /\.svg(\?\S*)?$/, loader: 'url-loader', }, { test: /\.json$/, loader: 'json-loader' }, ], } }
/** * @author Toru Nagashima * See LICENSE file in root directory for full license. */ "use strict" const { CALL, CONSTRUCT, ReferenceTracker } = require("eslint-utils") const trackMap = { dns: { lookup: { [CALL]: true }, lookupService: { [CALL]: true }, Resolver: { [CONSTRUCT]: true }, getServers: { [CALL]: true }, resolve: { [CALL]: true }, resolve4: { [CALL]: true }, resolve6: { [CALL]: true }, resolveAny: { [CALL]: true }, resolveCname: { [CALL]: true }, resolveMx: { [CALL]: true }, resolveNaptr: { [CALL]: true }, resolveNs: { [CALL]: true }, resolvePtr: { [CALL]: true }, resolveSoa: { [CALL]: true }, resolveSrv: { [CALL]: true }, resolveTxt: { [CALL]: true }, reverse: { [CALL]: true }, setServers: { [CALL]: true }, }, } module.exports = { meta: { docs: { description: 'enforce `require("dns").promises`', category: "Stylistic Issues", recommended: false, url: "https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-promises/dns.md", }, fixable: null, messages: { preferPromises: "Use 'dns.promises.{{name}}()' instead.", preferPromisesNew: "Use 'new dns.promises.{{name}}()' instead.", }, schema: [], type: "suggestion", }, create(context) { return { "Program:exit"() { const scope = context.getScope() const tracker = new ReferenceTracker(scope, { mode: "legacy" }) const references = [ ...tracker.iterateCjsReferences(trackMap), ...tracker.iterateEsmReferences(trackMap), ] for (const { node, path } of references) { const name = path[path.length - 1] const isClass = name[0] === name[0].toUpperCase() context.report({ node, messageId: isClass ? "preferPromisesNew" : "preferPromises", data: { name }, }) } }, } }, }
/* * 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'; /** * The human-readable description of the operation. * */ class LocationBasedServicesOperationsValueItemDisplay { /** * Create a LocationBasedServicesOperationsValueItemDisplay. * @member {string} [provider] Service provider: Microsoft Location Based * Services. * @member {string} [resource] Resource on which the operation is performed. * @member {string} [operation] The action that users can perform, based on * their permission level. * @member {string} [description] The description of the operation. */ constructor() { } /** * Defines the metadata of LocationBasedServicesOperationsValueItemDisplay * * @returns {object} metadata of LocationBasedServicesOperationsValueItemDisplay * */ mapper() { return { required: false, serializedName: 'LocationBasedServicesOperations_valueItem_display', type: { name: 'Composite', className: 'LocationBasedServicesOperationsValueItemDisplay', modelProperties: { provider: { required: false, readOnly: true, serializedName: 'provider', type: { name: 'String' } }, resource: { required: false, readOnly: true, serializedName: 'resource', type: { name: 'String' } }, operation: { required: false, readOnly: true, serializedName: 'operation', type: { name: 'String' } }, description: { required: false, readOnly: true, serializedName: 'description', type: { name: 'String' } } } } }; } } module.exports = LocationBasedServicesOperationsValueItemDisplay;
// @flow /** * The type of (redux) action to update the dropbox access token. * * { * type: UPDATE_DROPBOX_TOKEN, * token: string * } */ export const UPDATE_DROPBOX_TOKEN = 'UPDATE_DROPBOX_TOKEN';
'use strict'; class Statistics { constructor() { this.values = []; this.total = 0; } add(value) { this.values.push(value); this.total += value; return this; } summarize() { const values = this.values; // keeping backward compatibility if (values.length === 0) { return undefined; } values.sort((a, b) => a - b); const middle = Math.floor(values.length / 2); const isEven = values.length % 2 === 0; let median; if (isEven) { median = Number(((values[middle] + values[middle - 1]) / 2).toFixed(0)); } else { median = Number(values[middle].toFixed(0)); } return { min: Number(values[0].toFixed(0)), median, max: Number(values[values.length - 1].toFixed(0)), total: Number(this.total.toFixed(0)), values: values.length }; } } module.exports = { Statistics };
import React from 'react'; import { inject, observer } from 'mobx-react'; import QuickStart from 'components/Tasks/QuickStart'; import Others from 'components/Tasks/Others'; import Delay from 'components/Tasks/Delay'; import Console from 'components/Tasks/Console'; import SensorCamera from 'components/Tasks/SensorCamera'; @inject('store') @observer export default class Tasks extends React.Component { render() { const { options } = this.props; return ( <div className="tasks"> <QuickStart /> <Others /> <Delay /> <Console /> {(options.showVideo && !options.showPNCMonitor) && <SensorCamera />} </div> ); } }
// Generic functions used as arguments for function typed parameters are not used to make inferences from // Using function arguments, no errors expected var ImmediatelyFix; (function (ImmediatelyFix) { var C = (function () { function C() { } C.prototype.foo = function (x) { return x(null); }; return C; })(); var c = new C(); var r = c.foo(function (x) { return ''; }); var r2 = c.foo(function (x) { return ''; }); var r3 = c.foo(function (x) { return ''; }); var C2 = (function () { function C2() { } C2.prototype.foo = function (x) { return x(null); }; return C2; })(); var c2 = new C2(); var ra = c2.foo(function (x) { return 1; }); var r3a = c2.foo(function (x) { return 1; }); })(ImmediatelyFix || (ImmediatelyFix = {})); var WithCandidates; (function (WithCandidates) { var C = (function () { function C() { } C.prototype.foo2 = function (x, cb) { return cb(x); }; return C; })(); var c; var r4 = c.foo2(1, function (a) { return ''; }); var r5 = c.foo2(1, function (a) { return ''; }); var r6 = c.foo2('', function (a) { return 1; }); var C2 = (function () { function C2() { } C2.prototype.foo3 = function (x, cb, y) { return cb(x); }; return C2; })(); var c2; var r7 = c2.foo3(1, function (a) { return ''; }, ''); var r8 = c2.foo3(1, function (a) { return ''; }, ''); var C3 = (function () { function C3() { } C3.prototype.foo3 = function (x, cb, y) { return cb(x); }; return C3; })(); var c3; function other(t, u) { var r10 = c.foo2(1, function (x) { return ''; }); var r10 = c.foo2(1, function (x) { return ''; }); var r11 = c3.foo3(1, function (x) { return ''; }, ''); var r11b = c3.foo3(1, function (x) { return ''; }, 1); var r12 = c3.foo3(1, function (a) { return ''; }, 1); } })(WithCandidates || (WithCandidates = {}));
export const kronDocs = { name: 'kron', category: 'Matrix', syntax: [ 'kron(x, y)' ], description: 'Calculates the kronecker product of 2 matrices or vectors.', examples: [ 'kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])', 'kron([1,1], [2,3,4])' ], seealso: [ 'multiply', 'dot', 'cross' ] }
/******************************************************************************* Copyright (c) 2012, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ***************************************************************************** */ var x; x = "A"; if (true) throw "C"; x = "D";
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2011 Strobe Inc. and contributors. // Portions ©2008-2011 Apple, Inc. All rights reserved. // License: Licensed under MIT license (see license.js) // ========================================================================== /** A delegate for table resize operations. */ SC.TableDelegate = { /** Walk like a duck. */ isTableDelegate: YES, /** Called just before a table resizes a column to a proposed width. You can use this method to constrain the allowed width. The default implementation uses the minWidth and maxWidth of the column object. */ tableShouldResizeColumnTo: function(table, column, proposedWidth) { var min = column.get('minWidth') || 0, max = column.get('maxWidth') || proposedWidth; proposedWidth = Math.max(min, proposedWidth); proposedWidth = Math.min(max, proposedWidth); return proposedWidth; }, tableShouldResizeWidthTo: function(table, proposedWidth) { var min = table.get('minWidth') || 0, max = table.get('maxWidth') || proposedWidth; proposedWidth = Math.max(min, proposedWidth); proposedWidth = Math.min(max, proposedWidth); return proposedWidth; } };
// Copyright 2015 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. 'use strict'; (function() { /** * UI mode for the dialog. * @enum {string} */ const UIState = { PASSWORD: 'password', PROGRESS: 'progress', }; Polymer({ is: 'saml-confirm-password-element', behaviors: [ OobeI18nBehavior, LoginScreenBehavior, MultiStepBehavior, ], properties: { email: String, isManualInput: { type: Boolean, value: false, } }, EXTERNAL_API: ['show'], defaultUIStep() { return UIState.PASSWORD; }, UI_STEPS: UIState, /** * Callback to run when the screen is dismissed. * @type {?function(string)} */ callback_: null, ready() { this.initializeLoginScreen('ConfirmSamlPasswordScreen', { resetAllowed: true, }); cr.ui.LoginUITools.addSubmitListener( this.$.passwordInput, this.submit_.bind(this)); cr.ui.LoginUITools.addSubmitListener( this.$.confirmPasswordInput, this.submit_.bind(this)); }, /** Initial UI State for screen */ getOobeUIInitialState() { return OOBE_UI_STATE.SAML_PASSWORD_CONFIRM; }, /** * Shows the confirm password screen. * @param {string} email The authenticated user's e-mail. * @param {boolean} manualPasswordInput True if no password has been * scrapped and the user needs to set one manually for the device. * @param {number} attemptCount Number of attempts tried, starting at 0. * @param {function(string)} callback The callback to be invoked when the * screen is dismissed. */ show(email, manualPasswordInput, attemptCount, callback) { this.callback_ = callback; this.reset(); this.email = email; this.isManualInput = manualPasswordInput; if (attemptCount > 0) this.$.passwordInput.invalid = true; cr.ui.Oobe.showScreen({id: 'saml-confirm-password'}); }, resetFields() { this.$.passwordInput.invalid = false; this.$.passwordInput.value = ''; if (this.isManualInput) { this.shadowRoot.querySelector('#confirmPasswordInput').invalid = false; this.shadowRoot.querySelector('#confirmPasswordInput').value = ''; } }, reset() { if (this.$.cancelConfirmDlg.open) this.$.cancelConfirmDlg.hideDialog(); this.setUIStep(UIState.PASSWORD); this.resetFields(); }, onCancel_() { this.$.cancelConfirmDlg.showDialog(); }, onCancelNo_() { this.$.cancelConfirmDlg.hideDialog(); }, onCancelYes_() { this.$.cancelConfirmDlg.hideDialog(); cr.ui.Oobe.showScreen({id: 'gaia-signin'}); cr.ui.Oobe.resetSigninUI(true); }, submit_() { if (!this.$.passwordInput.validate()) return; if (this.isManualInput) { // When using manual password entry, both passwords must match. var confirmPasswordInput = this.shadowRoot.querySelector('#confirmPasswordInput'); if (!confirmPasswordInput.validate()) return; if (confirmPasswordInput.value != this.$.passwordInput.value) { this.$.passwordInput.invalid = true; confirmPasswordInput.invalid = true; return; } } this.setUIStep(UIState.PROGRESS); this.callback_(this.$.passwordInput.value); this.resetFields(); }, onDialogOverlayClosed_() { this.disabled = false; }, subtitleText_(locale, manual) { const key = manual ? 'manualPasswordTitle' : 'confirmPasswordTitle'; return this.i18n(key); }, passwordPlaceholder_(locale, manual) { const key = manual ? 'manualPasswordInputLabel' : 'confirmPasswordLabel'; return this.i18n(key); }, passwordErrorText_(locale, manual) { const key = manual ? 'manualPasswordMismatch' : 'confirmPasswordIncorrectPassword'; return this.i18n(key); }, }); })();
var _curry2 = /*#__PURE__*/require('./internal/_curry2'); var _dispatchable = /*#__PURE__*/require('./internal/_dispatchable'); var _xany = /*#__PURE__*/require('./internal/_xany'); /** * Returns `true` if at least one of the elements of the list match the predicate, * `false` otherwise. * * Dispatches to the `any` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` * otherwise. * @see R.all, R.none, R.transduce * @example * * const lessThan0 = R.flip(R.lt)(0); * const lessThan2 = R.flip(R.lt)(2); * R.any(lessThan0)([1, 2]); //=> false * R.any(lessThan2)([1, 2]); //=> true */ var any = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['any'], _xany, function any(fn, list) { var idx = 0; while (idx < list.length) { if (fn(list[idx])) { return true; } idx += 1; } return false; })); module.exports = any;
/* * @constructor * @returns {Trap.WebsocketListenerTransport} */ Trap.Transports.WebsocketListenerTransport = function() { this.WebSocketServer = require('ws').Server; this.wss = null; Trap.AbstractListenerTransport.prototype.constructor.call(this); }; Trap.Transports.WebsocketListenerTransport.prototype = new Trap.AbstractListenerTransport; Trap.Transports.WebsocketListenerTransport.prototype.constructor = Trap.WebsocketListenerTransport; Trap.Transports.WebsocketListenerTransport.prototype.getTransportName = function() { return "websocket"; }; Trap.Transports.WebsocketListenerTransport.prototype.getProtocolName = function() { return "websocket"; }; /** * @param listener * @param context */ Trap.Transports.WebsocketListenerTransport.prototype.listen = function(listener, context) { var mt = this; this.listenerDelegate = listener; this.listenerContext = context; this.port = parseInt(this.getOption("port")); if (isNaN(this.port)) this.port = 10080; wss = new this.WebSocketServer({port: this.port}); wss.on('connection', function(ws) { var t = new Trap.Transports.WebSocket(); t.init(); t.setState(Trap.Transport.State.CONNECTED); t.ws = ws; t._initWS(); t.useBinary = true; listener.ttsIncomingConnection(t, mt, context); }); this.setState(Trap.Transport.State.CONNECTED); }; Trap.Transports.WebsocketListenerTransport.prototype.getClientConfiguration = function(destination, failOnUnreachable) { var hostName = this.getOption("autoconfig.host"); if (hostName == null) hostName = "localhost"; var targetUri = "ws://" + hostName + ":" + this.port ; destination.setOption(this._prefix, "wsuri", targetUri); }; Trap.Transports.WebsocketListenerTransport.prototype.internalDisconnect = function() { wss = null; };
var Boom = require('boom'), Hapi = require('hapi'), anonCouch = require('../../../adapters/couchDB').anonCouch, metrics = require('../../../adapters/metrics')(); module.exports = function getUser (name, next) { var start = Date.now(); anonCouch.get('/_users/org.couchdb.user:' + name, function (er, cr, data) { metrics.metric({ name: 'latency', value: Date.now() - start, type: 'couchdb', browse: 'user ' + name }); if (er || cr && cr.statusCode !== 200 || !data || data.error) { return next(Boom.notFound('Username not found: ' + name)); } return next(null, data); }) }
import value1 from "./module?("; import value2 from "./module?)"; import value3 from "./module?["; import value4 from "./module?]"; import value5 from "./module?{"; import value6 from "./module?}"; it("should not break on name conflicts", function() { expect(value1).toBe("a"); expect(value2).toBe("a"); expect(value3).toBe("a"); expect(value4).toBe("a"); expect(value5).toBe("a"); expect(value6).toBe("a"); });
(function UnusedFunctionExpression() {}); (class UnusedClassExpression {}); var UnusedClassExpression = class UnusedClassExpression {}; var unusedVar; let unusedLet; const unusedConst = 1; function foo() { (function UnusedFunctionExpression() {}); (class UnusedClassExpression {}); var UnusedClassExpression = class UnusedClassExpression {}; var unusedVar; let unusedLet; const unusedConst = 1; console.log("foo"); } foo();
// @flow import type {$Timeout, AngularPromise} from 'angular'; function testTimeout($timeout: $Timeout) { //can be called without arguments $timeout(); //first argument is a function $timeout(() => {}); //$ExpectError takes in only function as first argument $timeout(123); //second argument is number $timeout(() => {}, 123); //$ExpectError takes in only number as second argument $timeout(() => {}, '123'); //third argument is boolean $timeout(() => {}, 123, true); //$ExpectError takes in only number as third argument $timeout(() => {}, 123, 'text'); //fourth argument can be anything $timeout(() => {}, 123, true, 123); $timeout(() => {}, 123, true, 'text'); $timeout(() => {}, 123, true, {}); //returns back angular promise ($timeout(): AngularPromise<*>); }
version https://git-lfs.github.com/spec/v1 oid sha256:ba5156cd0487afb78d7017da01d52903587919e3c46c07a6f3c18ced0e46e4a1 size 271729
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: String.prototype.substring (start, end) es5id: 15.5.4.15_A1_T5 description: > Arguments are null and Function(), and instance is function object, that have overrided valueOf function ---*/ __func.valueOf=function(){return "gnulluna"}; Function.prototype.substring=String.prototype.substring; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (__func.substring(null, Function()) !== "") { $ERROR('#1: __func.valueOf=function(){return "gnulluna"}; Function.prototype.substring=String.prototype.substring; function __func(){}; __func.substring(null, Function()) === "". Actual: '+__func.substring(null, Function()) ); } // ////////////////////////////////////////////////////////////////////////////// function __func(){};
// Cordova Windows API
var fs = require('fs'); module.exports = function pullCSS(data, pathOut) { var rules = {}; data.split(/\s*\}\s*/).forEach(function(chunk) { if(!chunk) return; var parts = chunk.split(/\s*\{\s*/); var selectorList = parts[0]; var rule = parts[1]; // take off ".js-plotly-plot .plotly", which should be on every selector selectorList.split(/,\s*/).forEach(function(selector) { if(!selector.match(/^([\.]js-plotly-plot [\.]plotly|[\.]plotly-notifier)/)) { throw new Error('all plotlyjs-style selectors must start ' + '.js-plotly-plot .plotly or .plotly-notifier\n' + 'found: ' + selectorList); } }); selectorList = selectorList .replace(/[\.]js-plotly-plot [\.]plotly/g, 'X') .replace(/[\.]plotly-notifier/g, 'Y'); // take out newlines in rule, and make sure it ends in a semicolon rule = rule.replace(/;\s*/g, ';').replace(/;?\s*$/, ';'); // omit blank rules (why do we get these occasionally?) if(rule.match(/^[\s;]*$/)) return; rules[selectorList] = rules[selectorList] || '' + rule; }); var rulesStr = JSON.stringify(rules, null, 4).replace(/\"(\w+)\":/g, '$1:'); var outStr = [ '\'use strict\';', '', 'var Lib = require(\'../src/lib\');', 'var rules = ' + rulesStr + ';', '', 'for(var selector in rules) {', ' var fullSelector = selector.replace(/^,/,\' ,\')', ' .replace(/X/g, \'.js-plotly-plot .plotly\')', ' .replace(/Y/g, \'.plotly-notifier\');', ' Lib.addStyleRule(fullSelector, rules[selector]);', '}', '' ].join('\n'); fs.writeFile(pathOut, outStr, function(err) { if(err) throw err; }); };
import { reservedWords, keywords } from "./identifier"; import { types as tt } from "./tokentype"; import { lineBreak } from "./whitespace"; export function Parser(options, input, startPos) { this.options = options; this.isKeyword = keywords[6]; this.isReservedWord = reservedWords[6]; this.input = input; this.loadPlugins(this.options.plugins); // Set up token state // The current position of the tokenizer in the input. if (startPos) { this.pos = startPos; this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)); this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; } else { this.pos = this.lineStart = 0; this.curLine = 1; } // Properties of the current token: // Its type this.type = tt.eof; // For tokens that include more information than their type, the value this.value = null; // Its start and end offset this.start = this.end = this.pos; // And, if locations are used, the {line, column} object // corresponding to those offsets this.startLoc = this.endLoc = this.curPosition(); // Position information for the previous token this.lastTokEndLoc = this.lastTokStartLoc = null; this.lastTokStart = this.lastTokEnd = this.pos; // The context stack is used to superficially track syntactic // context to predict whether a regular expression is allowed in a // given position. this.context = this.initialContext(); this.exprAllowed = true; // Figure out if it's a module code. this.inModule = this.options.sourceType === "module"; this.strict = this.options.strictMode === false ? false : this.inModule; // Used to signify the start of a potential arrow function this.potentialArrowAt = -1; // Flags to track whether we are in a function, a generator. this.inFunction = this.inGenerator = false; // Labels in scope. this.labels = []; // Leading decorators. this.decorators = []; // Token store. this.tokens = []; // Comment store. this.comments = []; // Comment attachment store this.trailingComments = []; this.leadingComments = []; this.bottomRightStack = []; // If enabled, skip leading hashbang line. if (this.pos === 0 && this.input[0] === "#" && this.input[1] === "!") { this.skipLineComment(2); } } Parser.prototype.extend = function (name, f) { this[name] = f(this[name]); }; // Registered plugins export const plugins = {}; Parser.prototype.loadPlugins = function (plugins) { for (let name in plugins) { let plugin = exports.plugins[name]; if (!plugin) throw new Error(`Plugin '${name}' not found`); plugin(this, plugins[name]); } }; Parser.prototype.parse = function () { let file = this.startNode(); let program = this.startNode(); this.nextToken(); return this.parseTopLevel(file, program); };
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2015 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(['jquery.sap.global','./FlexBoxRenderer'],function(q,F){"use strict";var V={};V.render=function(r,c){F.render.apply(this,[r,c]);};return V;},true);
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import capitalize from '../utils/capitalize'; export const styles = theme => ({ /* Styles applied to the root element. */ root: { userSelect: 'none', fontSize: theme.typography.pxToRem(24), width: '1em', height: '1em', // Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541 // To remove at some point. overflow: 'hidden', display: 'inline-block', // allow overflow hidden to take action textAlign: 'center', // support non-square icon flexShrink: 0 }, /* Styles applied to the root element if `color="primary"`. */ colorPrimary: { color: theme.palette.primary.main }, /* Styles applied to the root element if `color="secondary"`. */ colorSecondary: { color: theme.palette.secondary.main }, /* Styles applied to the root element if `color="action"`. */ colorAction: { color: theme.palette.action.active }, /* Styles applied to the root element if `color="error"`. */ colorError: { color: theme.palette.error.main }, /* Styles applied to the root element if `color="disabled"`. */ colorDisabled: { color: theme.palette.action.disabled }, /* Styles applied to the root element if `fontSize="inherit"`. */ fontSizeInherit: { fontSize: 'inherit' }, /* Styles applied to the root element if `fontSize="small"`. */ fontSizeSmall: { fontSize: theme.typography.pxToRem(20) }, /* Styles applied to the root element if `fontSize="large"`. */ fontSizeLarge: { fontSize: theme.typography.pxToRem(36) } }); const Icon = /*#__PURE__*/React.forwardRef(function Icon(props, ref) { const { classes, className, color = 'inherit', component: Component = 'span', fontSize = 'default' } = props, other = _objectWithoutPropertiesLoose(props, ["classes", "className", "color", "component", "fontSize"]); return /*#__PURE__*/React.createElement(Component, _extends({ className: clsx("material-icons notranslate", classes.root, className, color !== 'inherit' && classes[`color${capitalize(color)}`], fontSize !== 'default' && classes[`fontSize${capitalize(fontSize)}`]), "aria-hidden": true, ref: ref }, other)); }); process.env.NODE_ENV !== "production" ? Icon.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the d.ts file and run "yarn proptypes" | // ---------------------------------------------------------------------- /** * The name of the icon font ligature. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. */ classes: PropTypes.object, /** * @ignore */ className: PropTypes.string, /** * The color of the component. It supports those theme colors that make sense for this component. * @default 'inherit' */ color: PropTypes.oneOf(['action', 'disabled', 'error', 'inherit', 'primary', 'secondary']), /** * The component used for the root node. * Either a string to use a HTML element or a component. */ component: PropTypes.elementType, /** * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size. * @default 'default' */ fontSize: PropTypes.oneOf(['default', 'inherit', 'large', 'small']) } : void 0; Icon.muiName = 'Icon'; export default withStyles(styles, { name: 'MuiIcon' })(Icon);
/*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:-- -- Xinha example logic. This javascript is used to auto-generate examples -- as controlled by the options set in full_example-menu.html. it's called -- from full_example-body.html. -- -- $HeadURL$ -- $LastChangedDate$ -- $LastChangedRevision$ -- $LastChangedBy$ --------------------------------------------------------------------------*/ var num = 1; if(window.parent && window.parent != window) { var f = window.parent.menu.document.forms[0]; _editor_lang = f.lang.value; _editor_skin = f.skin.value; num = parseInt(f.num.value); if(isNaN(num)) { num = 1; f.num.value = 1; } xinha_plugins = [ ]; for(var x = 0; x < f.plugins.length; x++) { if(f.plugins[x].checked) xinha_plugins.push(f.plugins[x].value); } } xinha_editors = [ ] for(var x = 0; x < num; x++) { var ta = 'myTextarea' + x; xinha_editors.push(ta); } xinha_config = function() { var config = new HTMLArea.Config(); if(window.parent && window.parent != window) { var f = window.parent.menu.document.forms[0]; if (f.width) config.width = f.width.value; if (f.height) config.height = f.height.value; if (f.sizeIncludesBars) config.sizeIncludesBars = f.sizeIncludesBars.value; if (f.statusBar) config.statusBar = f.statusBar.value; if (f.mozParaHandler) config.mozParaHandler = f.mozParaHandler.value; if (f.undoSteps) config.undoSteps = f.undoSteps.value; if (f.baseHref) config.baseHref = f.baseHref.value; if (f.stripBaseHref) config.stripBaseHref = f.stripBaseHref.value; if (f.stripSelfNamedAnchors) config.stripSelfNamedAnchors = f.stripSelfNamedAnchors.value; if (f.only7BitPrintablesInURLs) config.only7BitPrintablesInURLs = f.only7BitPrintablesInURLs.value; if (f.sevenBitClean) config.sevenBitClean = f.sevenBitClean.value; if (f.killWordOnPaste) config.killWordOnPaste = f.killWordOnPaste.value; if (f.flowToolbars) config.flowToolbars = f.flowToolbars.value; if ((typeof CharacterMap != 'undefined') && (f.CharacterMapMode)) config.CharacterMap.mode = f.CharacterMapMode.value; if ((typeof ListType != 'undefined') && (f.ListTypeMode)) config.ListType.mode = f.ListTypeMode.value; } if(typeof CSS != 'undefined') { config.pageStyle = "@import url(custom.css);"; } if(typeof Stylist != 'undefined') { // We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL // otherwise it won't work! config.stylistLoadStylesheet(document.location.href.replace(/[^\/]*\.html/, 'stylist.css')); // Or we can load styles directly config.stylistLoadStyles('p.red_text { color:red }'); // If you want to provide "friendly" names you can do so like // (you can do this for stylistLoadStylesheet as well) config.stylistLoadStyles('p.pink_text { color:pink }', {'p.pink_text' : 'Pretty Pink'}); } if(typeof DynamicCSS != 'undefined') { config.pageStyle = "@import url(dynamic.css);"; } if(typeof InsertWords != 'undefined') { // Register the keyword/replacement list var keywrds1 = new Object(); var keywrds2 = new Object(); keywrds1['-- Dropdown Label --'] = ''; keywrds1['onekey'] = 'onevalue'; keywrds1['twokey'] = 'twovalue'; keywrds1['threekey'] = 'threevalue'; keywrds2['-- Insert Keyword --'] = ''; keywrds2['Username'] = '%user%'; keywrds2['Last login date'] = '%last_login%'; config.InsertWords = { combos : [ { options: keywrds1, context: "body" }, { options: keywrds2, context: "li" } ] } } // Path for InsertPicture plugin if(typeof InsertPicture != 'undefined') { InsertPicture.PicturePath = '/schmal/pictures/'; } return config; } var f = document.forms[0]; f.method = 'post'; f.action = 'ext_example-dest.php'; f.innerHTML = ''; var lipsum = document.getElementById('lipsum').innerHTML; for(var x = 0; x < num; x++) { var ta = 'myTextarea' + x; var div = document.createElement('div'); div.className = 'area_holder'; var txta = document.createElement('textarea'); txta.id = ta; txta.name = ta; txta.value = lipsum; txta.style.width="100%"; txta.style.height="420px"; div.appendChild(txta); f.appendChild(div); } //check submitted values var submit = document.createElement('input'); submit.type = "submit"; submit.value = "Submit"; f.appendChild(submit); var _oldSubmitHandler = null; if (document.forms[0].onsubmit != null) { _oldSubmitHandler = document.forms[0].onsubmit; } function frame_onSubmit(){ if (_oldSubmitHandler != null) { _oldSubmitHandler(); } } document.forms[0].onsubmit = frame_onSubmit;
/** * NearbySegmentsModifier is responsible of ... */ function NearbySegmentsModifier(jsonSegments, appResources, highLightStravistiXFeature) { this.segments_ = jsonSegments; this.appResources_ = appResources; this.highLightStravistiXFeature_ = highLightStravistiXFeature; } /** * Define prototype */ NearbySegmentsModifier.prototype = { modify: function modify() { var dropDownStyle = '', optionStyle = ''; if (this.highLightStravistiXFeature_) { dropDownStyle = 'background: #fc4c02; color: #333;'; // TODO Make colors global optionStyle = 'background: #fc4c02; color: white;'; // TODO Make colors global } var html = "<div class='module' style='padding-bottom: 10px;'>"; html += "<div class='drop-down-menu' style='width: 100%; background: #fc4c02; color: white;' >"; html += "<div class='selection' style='" + optionStyle + "'><img style='vertical-align:middle' src='" + this.appResources_.trackChangesIcon + "'/> <span>Nearby Cycling+Running Segments</span></div>"; html += "<ul class='options' style='max-height: 800px;" + dropDownStyle + "'>"; var segment; var segmentName; var segmentIconType; for (var i = 0; i < this.segments_.length; i++) { segment = this.segments_[i]; segmentName = segment.name + " <i>@ " + (segment.distance / 1000).toFixed(1) + "k, " + segment.avg_grade.toFixed(1) + "%"; if (segment.climb_category > 0) { segmentName += ", Cat. " + segment.climb_category_desc; } segmentName += '</i>'; if (segment.type === 'cycling') { segmentIconType = "<span class='icon-ride sprite type' style='margin-right: 7px; opacity: 0.3;'/>"; } else if (segment.type === 'running') { segmentIconType = "<span class='icon-run sprite type' style='margin-right: 7px; opacity: 0.3;'/>"; } else { segmentIconType = ""; } html += "<li style='max-width: 600px;'><a href='/segments/" + segment.id + "'>" + segmentIconType + segmentName + "</a></li>"; } html += "</ul>"; html += "</div>"; html += "</div>"; $(html).prependTo('.sidebar.spans5'); } };
/*global document, sinon, Logster, QUnit */ //= require env //= require jquery.debug //= require loader //= require jquery.debug //= require handlebars //= require ember.debug //= require ember-template-compiler //= require ember-qunit //= require ember-shim //= require wizard-application //= require wizard-vendor //= require helpers/assertions //= require_tree ./helpers //= require_tree ./acceptance //= require_tree ./models //= require_tree ./components //= require locales/en //= require fake_xml_http_request //= require route-recognizer //= require pretender //= require ./wizard-pretender // Trick JSHint into allow document.write var d = document; d.write('<div id="ember-testing-container"><div id="ember-testing"></div></div>'); d.write('<style>#ember-testing-container { position: absolute; background: white; bottom: 0; right: 0; width: 640px; height: 384px; overflow: auto; z-index: 9999; border: 1px solid #ccc; } #ember-testing { zoom: 50%; }</style>'); if (window.Logster) { Logster.enabled = false; } else { window.Logster = { enabled: false }; } var createPretendServer = require('wizard/test/wizard-pretender', null, null, false).default; var server; QUnit.testStart(function() { server = createPretendServer(); }); QUnit.testDone(function() { server.shutdown(); }); require('wizard/test/helpers/start-app').default(); var buildResolver = require('discourse-common/resolver').buildResolver; window.setResolver(buildResolver('wizard').create()); Object.keys(requirejs.entries).forEach(function(entry) { if ((/\-test/).test(entry)) { require(entry, null, null, true); } });
var api = require("./../../req"); /** * Retrieves SSID related configuration information for the specified device. * @param {Object} xapi - API credentials * @param {String} xapi.vpcUrl - ACS server to request * @param {String} xapi.ownerId - ACS ownerId * @param {String} xapi.accessToken - ACS accessToken * @param {String} deviceId - The Id of the desired device * @param {Object} devAccount - information about the Aerohive developper account to user * @param {String} devAccount.clientID - Aerohive Developper Account ClientID * @param {String} devAccount.clientSecret - Aerohive Developper Account secret * @param {String} devAccount.redirectURL - Aerohive Developper Account redirectURL * */ module.exports.GET = function (xapi, devAccount, deviceId, callback) { var path = "/beta/configuration/devices/" + deviceId + "/ssids?ownerId=" + xapi.ownerId; api.GET(xapi, path, devAccount, function (err, result) { if (err) { callback(err, null); } else if (result) { callback(null, result); } else { callback(null, null); } }) }; /** * Updates the SSID Configuration for the specified device. * @param {Object} xapi - API credentials * @param {String} xapi.vpcUrl - ACS server to request * @param {String} xapi.ownerId - ACS ownerId * @param {String} xapi.accessToken - ACS accessToken * @param {String} deviceId - The Id of the desired device * @param {Object} changes - The changes to be applied to the SSID Configuration for the specified device. * @param {Object} devAccount - information about the Aerohive developper account to user * @param {String} devAccount.clientID - Aerohive Developper Account ClientID * @param {String} devAccount.clientSecret - Aerohive Developper Account secret * @param {String} devAccount.redirectURL - Aerohive Developper Account redirectURL * */ module.exports.PUT = function (xapi, devAccount, deviceId, changes, callback) { var path = "/beta/configuration/devices/" + deviceId + "/ssids?ownerId=" + xapi.ownerId; api.PUT(xapi, path, changes, devAccount, function (err, result) { if (err) { callback(err, null); } else if (result) { callback(null, result); } else { callback(null, null); } }) };
/* * 2007-2014 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <contact@prestashop.com> * @copyright 2007-2014 PrestaShop SA * @version Release: $Revision$ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ $(document).ready(function(){ if (typeof(homeslider_speed) == 'undefined') homeslider_speed = 500; if (typeof(homeslider_pause) == 'undefined') homeslider_pause = 3000; if (typeof(homeslider_loop) == 'undefined') homeslider_loop = true; if (typeof(homeslider_width) == 'undefined') homeslider_width = 779; $('.homeslider-description').click(function () { window.location.href = $(this).prev('a').prop('href'); }); if ($('#htmlcontent_top').length > 0) $('#homepage-slider').addClass('col-xs-8'); else $('#homepage-slider').addClass('col-xs-12'); if (!!$.prototype.bxSlider) $('#homeslider').bxSlider({ useCSS: false, maxSlides: 1, slideWidth: homeslider_width, infiniteLoop: homeslider_loop, hideControlOnEnd: true, pager: false, autoHover: true, auto: homeslider_loop, speed: parseInt(homeslider_speed), pause: homeslider_pause, controls: true }); });
require('../manifest.json') require.context('_locales', true, /.*\.json/) require.context('assets', false, /icon_.*\.png/) export function getExtensionManifest () { return window.chrome.runtime.getManifest() } export function getExtensionUrl () { return window.chrome.extension.getURL.apply(window.chrome.extension, arguments) } export function getI18nMessage () { return window.chrome.i18n.getMessage.apply(window.chrome.i18n, arguments) } function getStorage () { return window.chrome.storage.sync || window.chrome.storage.local } export function getItems (defaults, callback) { const storage = getStorage() storage.get(defaults, callback) } export function setItems (items, callback) { const storage = getStorage() storage.set(items, callback) } export function onChangeItems (callback) { window.chrome.storage.onChanged.addListener(callback) } export function onBeforeRequest (callback) { const urls = ['<all_urls>'] window.chrome.webRequest.onBeforeRequest.addListener(callback, {urls}, ['blocking']) } export function updateTab (id, url) { url = getExtensionUrl(url) window.chrome.tabs.update(id, {url}) }
'use strict'; /* globals define, socket, app */ define('forum/notifications', ['components', 'notifications', 'forum/infinitescroll'], function(components, notifs, infinitescroll) { var Notifications = {}; Notifications.init = function() { var listEl = $('.notifications-list'); listEl.on('click', '[component="notifications/item/link"]', function() { var nid = $(this).parents('[data-nid]').attr('data-nid'); socket.emit('notifications.markRead', nid, function(err) { if (err) { return app.alertError(err); } }); }); $('.timeago').timeago(); components.get('notifications/mark_all').on('click', function() { socket.emit('notifications.markAllRead', function(err) { if (err) { return app.alertError(err.message); } components.get('notifications/item').removeClass('unread'); notifs.updateNotifCount(0); }); }); infinitescroll.init(loadMoreNotifications); }; function loadMoreNotifications(direction) { if (direction < 0) { return; } var notifList = $('.notifications-list'); infinitescroll.loadMore('notifications.loadMore', { after: notifList.attr('data-nextstart') }, function(data, done) { if (!data) { return done(); } notifList.attr('data-nextstart', data.nextStart); if (!data.notifications || !data.notifications.length) { return done(); } infinitescroll.parseAndTranslate('notifications', 'notifications', {notifications: data.notifications}, function(html) { notifList.append(html); html.find('.timeago').timeago(); done(); }); }); } return Notifications; });
/** * Push top instantiation and action. */ var pushTop = new Menu({ wrapper: '#o-wrapper', type: 'push-top', menuOpenerClass: '.c-button', maskId: '#c-mask' }); var pushTopBtn = document.querySelector('#c-button--push-top'); pushTopBtn.addEventListener('click', function(e) { e.preventDefault; pushTop.open(); });
// // Copyright (c) 2015 Harry Cheung // QUnit.module( "Gate" ); QUnit.test( "Gate.crossed", function( assert ) { var gate = new Gate(GateType.START_FINISH, 1, 37.452602, -122.207069, 32); var a = new Point(37.452414, -122.207193, false, 14.210000038146973, 32.09501647949219, 0, 0, 1 ); var b = new Point(37.452523, -122.207107, false, 14.239999771118164, 32.09501647949219, 0, 0, 2); b.lapDistance = 100.0; b.lapTime = 0.1; var c = new Point(37.45263, -122.207023, false, 14.15999984741211, 32.09501647949219, 0, 0, 3); var cross = gate.crossed(b, c); assert.equal( gate.crossed(a, b), null ); assert.equal( gate.crossed(c, b), null ); assert.equal( cross.generated, true ); assert.equal( cross.latitudeDegrees(), 37.452593 ); assert.equal( cross.longitudeDegrees(), -122.207052 ); assert.close( cross.speed, 14.18, 0.01 ); assert.close( cross.bearing, 31.93, 0.01 ); assert.close( cross.timestamp, 2.64915, 0.00001 ); assert.close( cross.lapDistance, b.lapDistance + b.distanceTo(cross), 0.01 ); assert.close( cross.lapTime, 0.74915, 0.00001 ); assert.close( cross.splitTime, 0.64915, 0.00001 ); });
/* * JavaScript to display and hide comment area in manual audit */ $(document).ready( function() { // hide all comment area $(".audit-result-manual-comment").addClass( "audit-result-manual-comment-hidden" ).removeClass( "audit-result-manual-comment" ); //enable comment area for checked failed radio $('input:radio').each(function() { if ( (($(this).val()) === 'failed') && $(this).is(':checked')) { var commentAreaId = 'commentContainer' + $(this).attr('id').substring(6, $(this).attr('id').length); $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment" ).removeClass( "audit-result-manual-comment-hidden" ); } else if ( (($(this).val()) === 'na') && $(this).is(':checked')) { var commentAreaId = 'commentContainer' + $(this).attr('id').substring(2, $(this).attr('id').length); $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment" ).removeClass( "audit-result-manual-comment-hidden" ); } } ); // bind event to radiobutton $('input:radio').on( 'change', function() { if (($(this).val()) === 'failed') { var commentAreaId = 'commentContainer' + $(this).attr('id').substring(6, $(this).attr('id').length); $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment" ).removeClass( "audit-result-manual-comment-hidden" ); } if (($(this).val()) === 'na') { var commentAreaId = 'commentContainer' + $(this).attr('id').substring(2, $(this).attr('id').length); console.log($(this).attr('id').substring(2, $(this).attr('id').length)); $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment" ).removeClass( "audit-result-manual-comment-hidden" ); } }); $('input:radio').on('change', function() { if ((($(this).val()) === 'passed')) { var commentAreaId = 'commentContainer' + $(this).attr('id').substring(6, $(this).attr('id').length); $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment-hidden" ).removeClass( "audit-result-manual-comment" ); } }); });
(function (mw, $) { "use strict"; var catchUp = mw.tvpapiRequest.extend( { defaultConfig: { "restMethod": "GetEPGLicensedData", "restApiBaseUrl": null, "EPGItemID": 0, "startTime": "0001-01-01T00:00:00", "userIP": "", "refferer": "", "countryCd2": "", "languageCode3": "" }, isDisabled: false, lastSelectedSource: "", setup: function ( ) { this.addBindings(); this.getPlayer().setLive(false); }, addBindings: function () { var _this = this; this.bind("SourceSelected", function(event, source){ //Prevent dispatching request if source haven't change or it's not valid source (assetid is not valid) if ((source.assetid != 0) && (_this.lastSelectedSource != source.assetid)) { _this.lastSelectedSource = source.assetid; _this.getMediaLicenseLink( event, source ); } }); }, getMediaLicenseLink: function(event, source){ var url = this.getRequestUrl(); if (url) { var config = this.getConfig(); var data = { "mediaFileID": source.assetid, "basicLink": source.src, "formatType": 0, "EPGItemID": config.EPGItemID, "startTime": config.startTime, "userIP": config.userIP, "refferer": config.refferer, "countryCd2": config.countryCd2, "languageCode3": config.languageCode3, "initObj": this.getInitObj() }; var getResponseLink = function (res) { return res.mainUrl || ( res.licensed_link && res.licensed_link.main_url ); }; var _this = this; this.doRequest(url, data, {async: false}).then( function (res) { var mediaLink = getResponseLink(res); if (mediaLink) { _this.getPlayer().triggerHelper('tvpapiSubscription', [res]); source.src = mediaLink; } else { _this.getPlayer().triggerHelper('tvpapiNoSubscription', [res]); } }, function (xmlHttpRequest, status) { //TODO:Handle error - dispatch event }, null ); } return false; } }); mw.PluginManager.add( 'tvpapiCatchUp', catchUp); })(window.mw, window.jQuery);
Clazz.declarePackage ("org.jmol.script"); Clazz.load (null, "org.jmol.script.ScriptContext", ["org.jmol.script.ScriptEvaluator", "org.jmol.util.StringXBuilder"], function () { c$ = Clazz.decorateAsClass (function () { this.fullpath = ""; this.scriptFileName = null; this.parallelProcessor = null; this.functionName = null; this.script = null; this.lineNumbers = null; this.lineIndices = null; this.aatoken = null; this.statement = null; this.statementLength = 0; this.pc = 0; this.pcEnd = 2147483647; this.lineEnd = 2147483647; this.iToken = 0; this.outputBuffer = null; this.contextVariables = null; this.isFunction = false; this.isStateScript = false; this.isTryCatch = false; this.errorMessage = null; this.errorMessageUntranslated = null; this.iCommandError = -1; this.errorType = null; this.scriptLevel = 0; this.isSyntaxCheck = false; this.executionStepping = false; this.executionPaused = false; this.scriptExtensions = null; this.contextPath = " >> "; this.parentContext = null; this.token = null; this.mustResumeEval = false; this.isJSThread = false; this.allowJSThreads = false; this.displayLoadErrorsSave = false; this.tryPt = 0; Clazz.instantialize (this, arguments); }, org.jmol.script, "ScriptContext"); Clazz.makeConstructor (c$, function () { }); Clazz.defineMethod (c$, "getContextTrace", function (sb, isTop) { if (sb == null) sb = new org.jmol.util.StringXBuilder (); sb.append (org.jmol.script.ScriptEvaluator.setErrorLineMessage (this.functionName, this.scriptFileName, this.lineNumbers[this.pc], this.pc, org.jmol.script.ScriptEvaluator.statementAsString (this.statement, (isTop ? this.iToken : 9999), false))); if (this.parentContext != null) this.parentContext.getContextTrace (sb, false); return sb; }, "org.jmol.util.StringXBuilder,~B"); });
/* * Copyright 2012 Amadeus s.a.s. * 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. */ /** * Test cases for aria.utils.validators.AlphaInternational */ Aria.classDefinition({ $classpath : "test.aria.utils.validators.AlphaNumInternational", $extends : "aria.jsunit.TestCase", $dependencies : ["aria.utils.validators.AlphaNumInternational"], $prototype : { /** * Test case 1: tests valid use cases. */ test_isValid : function () { var useCases = ["àÀáÁâÂãÃäÄåÅæÆçÇèÈéÉêÊëËìÌíÍîÎïÏðÐñÑòÒóÓôÔõÕöÖøØùÙúÚûÛüÜýÝþÞÿß123abc", "abc", "123"]; var validator = new aria.utils.validators.AlphaNumInternational(); var test; for (var i = 0; i < useCases.length; i++) { test = validator.validate(useCases[i]); // if successful then null is returned. this.assertTrue(test == null, "testing:" + useCases[i] + ":"); } validator.$dispose(); }, /** * Test case 2: tests invalid use cases. */ test_invalid : function () { var useCases = ["/////", ":::::", ":àÀáÁâÂãÃäÄåÅæÆçÇèÈéÉêÊëËìÌíÍîÎïÏðÐñÑòÒóÓôÔõÕöÖøØùÙúÚûÛüÜýÝþÞÿß/"]; var validator = new aria.utils.validators.AlphaNumInternational(); var test; for (var i = 0; i < useCases.length; i++) { test = validator.validate(useCases[i]); // if successful then null is returned. this.assertFalse(test == null, "testing:" + useCases[i] + ":"); } validator.$dispose(); } } });
goog.provide('bigryan.Canvas'); /** * @constructor */ bigryan.Canvas = function() { /** * @type {Object} * @private */ this.context_ = document.getElementById('canvas').getContext('2d'); document.getElementById('canvas').height = bigryan.Constants.mapHeight * bigryan.Constants.BLOCKSIZE; document.getElementById('canvas').width = bigryan.Constants.mapWidth * bigryan.Constants.BLOCKSIZE; }; /** * @return element */ bigryan.Canvas.prototype.setContext = function() { return this.context_; }; /** * @return element */ bigryan.Canvas.prototype.getContext = function() { return this.context_; };
function fun_cancel(form){ form.method.value="cancelAdjustment"; form.action="applyAdjustment.do?method=cancelAdjustment"; form.submit(); } function fn_submit(){ if(document.getElementsByName("method")[0].value=='loadAdjustment'){ /*if(!document.getElementsByName("adjustcheckbox")[0].checked || trim(document.getElementsByName("adjustmentNote")[0].value)==''){ return false; }*/ applyAdjustmentActionForm.method.value="previewAdjustment"; applyAdjustmentActionForm.action="applyAdjustment.do?method=previewAdjustment"; func_disableSubmitBtn("submit_btn"); return true; }else{ applyAdjustmentActionForm.method.value="applyAdjustment"; applyAdjustmentActionForm.action="applyAdjustment.do?method=applyAdjustment"; func_disableSubmitBtn("submit_btn"); return true; } function trim(str) { return str.replace(/^\s*|\s*$/g,""); } }
enyo.kind({ name: "dividers.CollapsDividers", kind: HeaderView, components: [ {kind: "Divider", caption: "EXAMPLES"}, {kind: "ViewItem", className: "enyo-first", viewKind: "dividers.CollapsDivider", title: "collapsible divider", description: "labeled dividers which function as buttons to toggle an associated drawer"}, {kind: "ViewItem", className: "enyo-last", viewKind: "dividers.CollapsIconDivider", title: "collapsible divider with icon", description: "labeled dividers with icons which function as buttons to toggle an associated drawer"} ] }); enyo.kind({ name: "dividers.CollapsDivider", kind: HeaderView, components: [ {kind: "DividerDrawer", caption: "EXAMPLE", open: false, components: [ {kind: "Item", className: "enyo-first", components: [ {content: "Example 1"}, {content: "An example", className: "enyo-item-secondary"}, {content: "Praesent interdum accumsan ante.", className: "enyo-item-ternary"} ]}, {kind: "Item", className: "enyo-last", components: [ {content: "Example 2"}, {content: "An example", className: "enyo-item-secondary"}, {content: "Pallentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.", className: "enyo-item-ternary"} ]}, ]}, {kind: "DividerDrawer", caption: "DIVIDER", open: false, components: [ {kind: "Item", className: "enyo-first", components: [ {content: "Example 3"}, {content: "An example", className: "enyo-item-secondary"} ]}, {kind: "Item", className: "enyo-last", components: [ {content: "Example 4"}, {content: "An example", className: "enyo-item-secondary"} ]} ]} ] }); enyo.kind({ name: "dividers.CollapsIconDivider", kind: HeaderView, components: [ {kind: "DividerDrawer", caption: "EXAMPLE", icon: "images/yahoo-32x32.png", open: false, components: [ {kind: "Item", className: "enyo-first", components: [ {content: "Example 1"}, {content: "An example", className: "enyo-item-secondary"}, {content: "Praesent interdum accumsan ante.", className: "enyo-item-ternary"} ]}, {kind: "Item", className: "enyo-last", components: [ {content: "Example 2"}, {content: "An example", className: "enyo-item-secondary"}, {content: "Pallentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.", className: "enyo-item-ternary"} ]}, ]}, {kind: "DividerDrawer", caption: "DIVIDER", icon: "images/gmail-32x32.png", open: false, components: [ {kind: "Item", className: "enyo-first", components: [ {content: "Example 3"}, {content: "An example", className: "enyo-item-secondary"} ]}, {kind: "Item", className: "enyo-last", components: [ {content: "Example 4"}, {content: "An example", className: "enyo-item-secondary"} ]} ]} ] });
(function(define) { define(function(require, exports, module) { var $CCMM$={"$mod-deps":["ceylon.language\/1.0.0"],"$mod-name":"jsonly","$mod-version":"1.0.0","jsonly":{"$pkg-shared":1,"run":{"$t":{"$md":"ceylon.language","$pk":"$","$nm":"Anything"},"$mt":"m","$an":{"shared":[]},"$nm":"run"}},"$mod-bin":"7.0"}; exports.$CCMM$=function(){return $CCMM$;}; var m$1=require('ceylon/language/1.0.0/ceylon.language-1.0.0'); m$1.$addmod$(m$1,'ceylon.language/1.0.0'); exports.$pkg$ans$jsonly=function(){return[m$1.shared()];}; function run(){ m$1.print("jsonly"); } exports.run=run; run.$crtmm$=function(){return{mod:$CCMM$,$t:{t:m$1.Anything},$ps:[],$an:function(){return[m$1.shared()];},d:['jsonly','run']};}; exports.$mod$ans$=function(){return[m$1.doc("A test"),m$1.by(["The Ceylon Team"].reifyCeylonType({Element$Iterable:{t:m$1.String},Absent$Iterable:{t:m$1.Null}})),m$1.license("Apache Software License")];}; }); }(typeof define==='function' && define.amd ? define : function (factory) { if (typeof exports!=='undefined') { factory(require, exports, module); } else { throw 'no module loader'; } }));
// -*- mode: java; c-basic-offset: 2; -*- // Copyright 2012 Massachusetts Institute of Technology. All rights reserved. /** * @license * @fileoverview Visual blocks editor for App Inventor * @author mckinney@mit.edu (Andrew F. McKinney) */ 'use strict'; goog.provide('Blockly.language_switch'); goog.require('Blockly.Msg.en'); goog.require('Blockly.Msg.zh_cn'); goog.require('Blockly.Msg.zh_tw'); goog.require('Blockly.Msg.es_es'); goog.require('Blockly.Msg.it_it'); goog.require('Blockly.Msg.ru'); goog.require('Blockly.Msg.ko_kr'); goog.require('Blockly.Msg.sv'); Blockly.language_switch = { // Switch between languages switchLanguage: function (language) { if (Blockly.mainWorkspace) { var xml = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace); Blockly.mainWorkspace.clear(); } switch (language) { case 'ko_KR': Blockly.Msg.ko_kr.switch_language_to_korean.init(); break; case 'es_ES': Blockly.Msg.es_es.switch_language_to_spanish_es.init(); break; case 'zh_TW': Blockly.Msg.zh_tw.switch_language_to_chinese_tw.init(); break; case 'zh_CN': Blockly.Msg.zh_cn.switch_language_to_chinese_cn.init(); break; case 'fr_FR': Blockly.Msg.fr_fr.switch_language_to_french.init(); break; case 'it_IT': Blockly.Msg.it_it.switch_language_to_italian.init() break; case 'ru': Blockly.Msg.ru.switch_language_to_russian.init(); break; case 'en_US': Blockly.Msg.en.switch_language_to_english.init(); break; case 'en': default: Blockly.Msg.en.switch_language_to_english.init(); break; case 'sv': Blockly.Msg.sv.switch_language_to_swedish.init(); } if (Blockly.mainWorkspace) { Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, xml); } } }; //switch language before blocks are generated var language = window.parent.__gwt_Locale; // console.log("Language = " + language); Blockly.language_switch.switchLanguage(language);
cordova.define("org.apache.cordova.device-motion.AccelerometerProxy", function(require, exports, module) { /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. * */ /*global Windows:true */ var cordova = require('cordova'), Acceleration = require('org.apache.cordova.device-motion.Acceleration'); /* This is the actual implementation part that returns the result on Windows 8 */ module.exports = { onDataChanged:null, start:function(win,lose){ var accel = Windows.Devices.Sensors.Accelerometer.getDefault(); if(!accel) { lose && lose("No accelerometer found"); } else { var self = this; accel.reportInterval = Math.max(16,accel.minimumReportInterval); // store our bound function this.onDataChanged = function(e) { var a = e.reading; win(new Acceleration(a.accelerationX, a.accelerationY, a.accelerationZ), {keepCallback: true}); }; accel.addEventListener("readingchanged",this.onDataChanged); setTimeout(function(){ var a = accel.getCurrentReading(); win(new Acceleration(a.accelerationX, a.accelerationY, a.accelerationZ), {keepCallback: true}); },0); // async do later } }, stop:function(win,lose){ win = win || function(){}; var accel = Windows.Devices.Sensors.Accelerometer.getDefault(); if(!accel) { lose && lose("No accelerometer found"); } else { accel.removeEventListener("readingchanged",this.onDataChanged); this.onDataChanged = null; accel.reportInterval = 0; // back to the default win(); } } }; require("cordova/exec/proxy").add("Accelerometer",module.exports); });
// Copyright 2012 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Debug = debug.Debug var breaks = 0; var exception = false; function listener(event, exec_state, event_data, data) { try { if (event == Debug.DebugEvent.Break) { var line = event_data.sourceLineText(); print('break: ' + line); assertEquals(-1, line.indexOf('NOBREAK'), "should not break on unexpected lines") assertEquals('BREAK ' + breaks, line.substr(-7)); breaks++; if (breaks < 4) exec_state.prepareStep(Debug.StepAction.StepNext); } } catch (e) { print(e); exception = true; } } // Add the debug event listener. Debug.setListener(listener); function a(f) { if (f) { // NOBREAK: should not break here! try { f(); } catch(e) { } } } // BREAK 2 function b() { c(); // BREAK 0 } // BREAK 1 function c() { a(); } // Set a break point and call to invoke the debug event listener. Debug.setBreakPoint(b, 0, 0); a(b); a(); // BREAK 3 assertFalse(exception);
/** * * (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function() { 'use strict'; angular .module('horizon.framework.widgets.form') .factory('horizon.framework.widgets.form.ModalFormService', service); service.$inject = [ '$uibModal', 'horizon.framework.widgets.basePath' ]; /** * @ngDoc factory * @name horizon.framework.widgets.form.ModalFormService * * @Description * Loads a Schema-Form (see modal-form.html) in a modal and returns the modal result promise. */ function service( $uibModal, widgetsBasePath ) { var service = { open: open }; return service; ///////////////// function open(config) { var modalConfig = { backdrop: 'static', size: 'lg', resolve: { context: function() { return { title: config.title, submitText: config.submitText || gettext("Submit"), submitIcon: config.submitIcon || "check", schema: config.schema, form: config.form, model: config.model }; } }, controller: 'horizon.framework.widgets.form.ModalFormController as ctrl', templateUrl: widgetsBasePath + 'form/modal-form.html' }; return $uibModal.open(modalConfig).result; } } })();
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ const _css = ` .weex-textarea { font-size: 0.426667rem } .weex-textarea:focus { outline: none; } ` function getTextarea (weex) { const { extractComponentStyle, createEventMap } = weex const { inputCommon } = weex.mixins const { extend, mapFormEvents } = weex.utils return { name: 'weex-textarea', mixins: [inputCommon], props: { value: String, placeholder: String, disabled: { type: [String, Boolean], default: false }, autofocus: { type: [String, Boolean], default: false }, rows: { type: [String, Number], default: 2 }, returnKeyType: String }, render (createElement) { /* istanbul ignore next */ // if (process.env.NODE_ENV === 'development') { // validateStyles('textarea', this.$vnode.data && this.$vnode.data.staticStyle) // } const events = extend(createEventMap(this), mapFormEvents(this)) return createElement('html:textarea', { attrs: { 'weex-type': 'textarea', value: this.value, disabled: (this.disabled !== 'false' && this.disabled !== false), autofocus: (this.autofocus !== 'false' && this.autofocus !== false), placeholder: this.placeholder, rows: this.rows, 'return-key-type': this.returnKeyType }, domProps: { value: this.value }, on: this.createKeyboardEvent(events), staticClass: 'weex-textarea weex-el', staticStyle: extractComponentStyle(this) }) }, _css } } export default { init (weex) { weex.registerComponent('textarea', getTextarea(weex)) } }
/* Copyright 2010 Google Inc. 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 STATE_BEFORE_START = 'before start'; var STATE_PLAYING = 'playing'; var STATE_GAME_OVER = 'game over'; var INITIAL_PLAYER_SEPARATION = 200; // Key codes var KEY_SPACE=32; var KEY_W=87; var KEY_A=65; var KEY_S=83; var KEY_D=68; var KEY_X=88; var KEY_R=82; var KEY_ESC=27; var KEY_O=79; var KEY_T=84; var KEY_P=80; var KEY_COMMA=188; var KEY_PERIOD=190; var KEY_LEFT=37; var KEY_RIGHT=39; var KEY_UP=38; var KEY_DOWN=40; var ACTION_IDLE = 'idle'; var ACTION_PAIN = 'pain'; var ACTION_PUNCH = 'punch'; var ACTION_BLOCK = 'block'; var ACTION_THROW = 'throw'; var ACTION_THROWN = 'thrown'; var DEBUG = false; var PIT_DAMAGE = .1; var win; // The window (I'd call it window but that's a reserved word) var keys; var player1; var player2; var interval; var level; var lastTimeStamp = 0; var JUMP_TIME_MS = 800; // jump time in milliseconds var JUMP_HEIGHT = 100; // in pixels function resetGameState() { level = new Level(); win.reset(); var player_offset = win.width/2 - INITIAL_PLAYER_SEPARATION; player1 = new Player(player_offset, 'character.png', true); player2 = new Player(win.right() - player_offset, 'character_2.png', false); player1.other_player = player2; player2.other_player = player1; keys = new KeyWatcher(); lastTimeStamp = 0; game_state = STATE_BEFORE_START; setTimeout(startRound, 1000); } function startRound() { game_state = STATE_PLAYING; win.startGame(); } function handleInput() { if (keys.isPressed(KEY_R)) { player1.punch(); } if (keys.isPressed(KEY_T)) { player1.throw_em(); } player1.block(false); if (keys.isPressed(KEY_A)) { player1.moveLeft(); player1.block(player1.facing_right); } if (keys.isPressed(KEY_D)) { player1.moveRight(); player1.block(!player1.facing_right); } if (keys.isPressed(KEY_COMMA)) { player2.punch(); } if (keys.isPressed(KEY_PERIOD)) { player2.throw_em(); } player2.block(false); if (keys.isPressed(KEY_LEFT)) { player2.moveLeft(); player2.block(player2.facing_right); } if (keys.isPressed(KEY_RIGHT)) { player2.moveRight(); player2.block(!player2.facing_right); } } function update() { var now = new Date().getTime(); if (lastTimeStamp == 0) { var dt = 0; } else { dt = now - lastTimeStamp; } lastTimeStamp = now; if (game_state == STATE_PLAYING) { handleInput(); player1.update(dt); player2.update(dt); if (player1.y < -100) { player1.health -= dt * PIT_DAMAGE; } if (player2.y < -100) { player2.health -= dt * PIT_DAMAGE; } if (!player1.isAlive() || !player2.isAlive()) { //alert("Game Over. Reset..."); game_state = STATE_GAME_OVER; win.gameOver(); setTimeout(resetGameState, 2000); } } win.update(dt); win.draw(); if (DEBUG) { $('#debug').html('Debug:<br>Key: ' + keys.lastKey); } } function KeyWatcher() { this.keys = {} this.lastKey = undefined; this.down = function(key) { this.keys[key] = true; this.lastKey = key; } this.up = function(key) { this.keys[key] = false; } this.isPressed = function(key) { return this.keys[key]; } } $(document).ready(function() { win = new Window(800, 600); resetGameState(); $(document).keydown(function(event) { // What a horrible hack, only allow the players to when the key is pressed // down and ignore hold down jump keys. if (event.which == KEY_W && !keys.isPressed(KEY_W)) { player1.jump(); } if (event.which == KEY_UP && !keys.isPressed(KEY_UP)) { player2.jump(); } keys.down(event.which); if (event.which == KEY_P) { DEBUG=!DEBUG; $('#debug').text(''); } if (event.which == KEY_O) { win.should_scroll = !win.should_scroll; } //if (event.which == KEY_X) { // Suicide, for testing "game over" // player1.health = -1; //} if (event.which == KEY_ESC) { // Stop the game (helpful when developing) clearInterval(interval); } }); $(document).keyup(function(event) { keys.up(event.which); }); interval = setInterval(update, 30); });
/* Copyright 2014 Space Dynamics Laboratory - Utah State University Research Foundation. * * Licensed under the Apache License, Version 2.0 (the 'License'); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an 'AS IS' BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // FUNCTION function attribFilter(checkB, expResults) { element(by.id(checkB)).click(); browser.driver.sleep(1800); // ***** NOTE: ***** switch from element.all(by.repeater('item in data')) to by.css('.results-content') !!! expect(element.all(by.css('.results-content')).count()).toEqual(expResults); element(by.id(checkB)).click(); browser.driver.sleep(1500); } describe('search_Filters_by_Attribute', function() { it('Get to search results', function () { // FILTER BY ATTRIBUTE browser.ignoreSynchronization = false; browser.get(theSite, 15000); browser.driver.sleep(3000); // Search ALL element.all(by.css('.btn.btn-primary.pull-right')).get(2).click(); // Wait for it to sync, a bit slower on the VPN browser.driver.sleep(14000); // Expand "DI2E Evaluation Level" element.all(by.css('.overflow-pair-right')).get(1).click(); browser.driver.sleep(1000); }); var checkB0 = 'DI2E Evaluation Level_LEVEL0'; var expResults0 = 37; it('Filter By Attribute- ' + checkB0 + ' gives ' + expResults0 + ' results', function() { attribFilter(checkB0, expResults0); }, 63000); var checkB1 = 'DI2E Evaluation Level_LEVEL1'; var expResults1 = 5; it('Filter By Attribute- ' + checkB1 + ' gives ' + expResults1 + ' results', function() { attribFilter(checkB1, expResults1); }, 45000); var checkBNA = 'DI2E Evaluation Level_NA'; var expResultsNA = 18; it('Filter By Attribute- ' + checkBNA + ' gives ' + expResultsNA + ' results', function() { attribFilter(checkBNA, expResultsNA); }, 45000); });
var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var AppSettings = require("application-settings"); var observable = require("data/observable"); var observableArray = require("data/observable-array"); var Everlive = require("../lib/everlive.all.min"); var activityItemViewModel = require("./activity-item-view-model"); var ActivityViewModel = (function (_super) { __extends(ActivityViewModel , _super); function ActivityViewModel (source) { _super.call(this); this._activity = new observable.Observable(); this._comments = new observableArray.ObservableArray(); this._isLoading = false; } Object.defineProperty(ActivityViewModel.prototype, "isLoading", { get: function () { return this._isLoading; }, set: function(value) { this._isLoading = value; this.notify({ object: this, eventName: observable.Observable.propertyChangeEvent, propertyName: "isLoading", value: value }); }, enumerable: true, configurable: true }); Object.defineProperty(ActivityViewModel.prototype, "activity", { get: function () { return this._activity; }, set: function(value) { if (this._activity !== value) { this._activity = value; this.notify({ object: this, eventName: observable.Observable.propertyChangeEvent, propertyName: "activity", value: value }); } } }); Object.defineProperty(ActivityViewModel.prototype, "comments", { get: function () { this.isLoading = true; var that = this; var commentsData = EVERLIVE.data("Comments"); var query = new Everlive.Query(); query.where().eq("ActivityId", that._activity.Id); query.orderDesc("CreatedAt"); var expandExp = { "UserId":{ "ReturnAs":"User", "TargetTypeName":"Users", "Expand":{ "Picture":{ "TargetTypeName":"System.Files" } } } }; commentsData.expand(expandExp).get(query) .then(function(data) { if (data && data.count !== 0) { for (i = 0; i < data.count; i++) { var activityItem = new activityItemViewModel.ActivityItemViewModel(data.result[i]); data.result[i] = activityItem; } that._comments.push(data.result); } that.isLoading = false; }, function(error) { alert(JSON.stringify(error)); that.isLoading = false; }); return this._comments; }, enumerable: true, configurable: true }); Object.defineProperty(ActivityViewModel.prototype, "activityDateFormatted", { get: function () { var m_names = new Array("JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"); var d = new Date(this._activity.CreatedAt); var curr_date = d.getDate(); var curr_month = d.getMonth(); var curr_year = d.getFullYear(); var dateString = m_names[curr_month] + " " + curr_date + ", " + curr_year; return dateString; } }); Object.defineProperty(ActivityViewModel.prototype, "userCanDeleteActivity", { get: function () { var userId = AppSettings.getString(USER_ID); return this._activity.User.Id === userId; } }); ActivityViewModel.prototype.deleteActivity = function () { var that = this; return new Promise(function (resolve, reject) { var activities = EVERLIVE.data("Activities"); activities.destroySingle({ Id: that._activity.Id }, function(){ return resolve(); }, function(error){ alert(JSON.stringify(error)); return reject(); } ); }); }; return ActivityViewModel; })(observable.Observable); exports.ActivityViewModel = ActivityViewModel;
// JS -> Dart export var typeMapping = { 'number': 'num', 'boolean': 'bool', 'string': 'String', 'any': 'dynamic', 'Promise': 'Future', 'Observable': 'Stream', 'ObservableController': 'StreamController', 'Date': 'DateTime', 'StringMap': 'Map' };
(function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['exports', 'echarts'], factory); } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { // CommonJS factory(exports, require('echarts')); } else { // Browser globals factory({}, root.echarts); } }(this, function (exports, echarts) { var log = function (msg) { if (typeof console !== 'undefined') { console && console.error && console.error(msg); } }; if (!echarts) { log('ECharts is not Loaded'); return; } echarts.registerTheme('vintage', { color: ['#d87c7c','#919e8b', '#d7ab82', '#6e7074','#61a0a8','#efa18d', '#787464', '#cc7e63', '#724e58', '#4b565b'], backgroundColor: '#fef8ef' }); }));
// Copyright (c) 2012 Ecma International. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- es5id: 15.2.3.6-3-145 description: > Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) ---*/ var obj = {}; var dateObj = new Date(); dateObj.value = "Date"; Object.defineProperty(obj, "property", dateObj); assert.sameValue(obj.property, "Date", 'obj.property');
// > [5.1.1. Stream Identifiers](http://tools.ietf.org/html/draft-ietf-httpbis-http2-06#section-5.1.1) // > // > Streams are identified with an unsigned 31-bit integer. Streams // > initiated by a client MUST use odd-numbered stream identifiers; those // > initiated by the server MUST use even-numbered stream identifiers. A // > stream identifier of zero (0x0) is used for connection control // > message; the stream identifier zero MUST NOT be used to establish a // > new stream. // > // > ... // > // > [6.6. PUSH_PROMISE](http://tools.ietf.org/html/draft-ietf-httpbis-http2-06#section-6.6) // > // > ... a receiver MUST // > treat the receipt of a PUSH_PROMISE that promises an illegal stream // > identifier (Section 5.1.1) (that is, an identifier for a stream that // > is not currently in the "idle" state) as a connection error // > (Section 5.4.1) of type PROTOCOL_ERROR, unless the receiver recently // > sent a RST_STREAM frame to cancel the associated stream (see // > Section 5.1). // // This tests sends an promised stream ID that is in the peer's ID space. The peer should reset the // connection with PROTOCOL_ERROR. var invalidPromiseIdTest = require('./invalid-promised-id-1-test'); module.exports = function(socket, log, callback) { invalidPromiseIdTest(socket, log, callback, [5]); };
var a = { b: function() {} } exports.b = a.b;
'use strict'; angular.module('angularify.semantic.sidebar', []) .directive('sidebar', function () { return { restrict: "E", replace: true, transclude: true, template: '<div class="ui sidebar" ng-transclude></div>', scope: { buttonClass : '=' }, link: function(scope, element, attrs){ debugger; element.sidebar('attach events', scope.buttonClass); } } });
var parent = require('../../../actual/string/virtual/includes'); module.exports = parent;
/* Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'colorbutton', 'en', { auto: 'Automatic', bgColorTitle: 'Background Color', colors: { '000': 'Black', '800000': 'Maroon', '8B4513': 'Saddle Brown', '2F4F4F': 'Dark Slate Gray', '008080': 'Teal', '000080': 'Navy', '4B0082': 'Indigo', '696969': 'Dark Gray', B22222: 'Fire Brick', A52A2A: 'Brown', DAA520: 'Golden Rod', '006400': 'Dark Green', '40E0D0': 'Turquoise', '0000CD': 'Medium Blue', '800080': 'Purple', '808080': 'Gray', F00: 'Red', FF8C00: 'Dark Orange', FFD700: 'Gold', '008000': 'Green', '0FF': 'Cyan', '00F': 'Blue', EE82EE: 'Violet', A9A9A9: 'Dim Gray', FFA07A: 'Light Salmon', FFA500: 'Orange', FFFF00: 'Yellow', '00FF00': 'Lime', AFEEEE: 'Pale Turquoise', ADD8E6: 'Light Blue', DDA0DD: 'Plum', D3D3D3: 'Light Grey', FFF0F5: 'Lavender Blush', FAEBD7: 'Antique White', FFFFE0: 'Light Yellow', F0FFF0: 'Honeydew', F0FFFF: 'Azure', F0F8FF: 'Alice Blue', E6E6FA: 'Lavender', FFF: 'White', '1ABC9C': 'Strong Cyan', '2ECC71': 'Emerald', '3498DB': 'Bright Blue', '9B59B6': 'Amethyst', '4E5F70': 'Grayish Blue', 'F1C40F': 'Vivid Yellow', '16A085': 'Dark Cyan', '27AE60': 'Dark Emerald', '2980B9': 'Strong Blue', '8E44AD': 'Dark Violet', '2C3E50': 'Desaturated Blue', 'F39C12': 'Orange', 'E67E22': 'Carrot', 'E74C3C': 'Pale Red', 'ECF0F1': 'Bright Silver', '95A5A6': 'Light Grayish Cyan', 'DDD': 'Light Gray', 'D35400': 'Pumpkin', 'C0392B': 'Strong Red', 'BDC3C7': 'Silver', '7F8C8D': 'Grayish Cyan', '999': 'Dark Gray' }, more: 'More Colors...', panelTitle: 'Colors', textColorTitle: 'Text Color' } );
define(["dojox/charting/Theme"], function(Theme){ return function(colorInfo) { var color1 = colorInfo.stops[colorInfo.stops.length - 1].color; var color2 = colorInfo.stops[0].color; var theme = new Theme({ axis:{ stroke: { // the axis itself color: "#888c76", width: 1 }, tick: { // used as a foundation for all ticks color: "#888c76", position: "center", font: "normal normal normal 7pt Verdana, Arial, sans-serif", // labels on axis fontColor: "#888c76" // color of labels } }, series: { stroke: {width: 2.5, color: "#fff"}, outline: null, fontColor: "#131313" }, marker: { stroke: {width: 1.25, color: "#131313"}, outline: {width: 1.25, color: "#131313"}, fontColor: "#131313" }, seriesThemes: [ {fill: color1 }, {fill: color2 } ], markerThemes: [ {fill: color1, stroke: {color: "#fff"}}, {fill: color2, stroke: {color: "#fff"}} ] }); theme.next = function(elementType, mixin, doPost){ var isLine = elementType == "line", s, theme; if(isLine || elementType == "area"){ // custom processing for lines: substitute colors s = this.seriesThemes[this._current % this.seriesThemes.length]; var m = this.markerThemes[this._current % this.markerThemes.length]; s.fill.space = "plot"; if(isLine){ s.stroke = { width: 4, color: s.fill.colors[0].color}; } m.outline = { width: 1.25, color: m.fill }; theme = Theme.prototype.next.apply(this, arguments); // cleanup delete s.outline; delete s.stroke; s.fill.space = "shape"; return theme; } else if(elementType == "candlestick") { s = this.seriesThemes[this._current % this.seriesThemes.length]; s.fill.space = "plot"; s.stroke = { width: 1, color: s.fill.colors[0].color}; theme = Theme.prototype.next.apply(this, arguments); return theme; } return Theme.prototype.next.apply(this, arguments); }; theme.post = function(theme, elementType){ theme = Theme.prototype.post.apply(this, arguments); if((elementType == "slice" || elementType == "circle") && theme.series.fill && theme.series.fill.type == "radial"){ theme.series.fill = gradutils.reverse(theme.series.fill); } return theme; }; return theme; } });
var util = require('util'), extendWithGettersAndSetters = require('../util/extendWithGettersAndSetters'), Relation = require('./Relation'); function CacheManifestEntry(config) { Relation.call(this, config); } util.inherits(CacheManifestEntry, Relation); extendWithGettersAndSetters(CacheManifestEntry.prototype, { get href() { return this.node.tokens[this.node.tokens.length - 1]; }, set href(href) { // In the CACHE section and NETWORK sections there's only one token per entry, // in FALLBACK there's the online url followed by the offline url (the one we want). // Just overwrite the last token with the url: if (this.sectionName === 'FALLBACK') { this.node.tokens[1] = href; } else { this.node.tokens[0] = href; } }, inline: function () { throw new Error('CacheManifestEntry.inline(): Not supported.'); }, attach: function (asset, position, adjacentRelation) { this.from = asset; if (!this.sectionName) { this.sectionName = 'CACHE'; } // FIXME: Doesn't work with FALLBACK entries where there're two tokens. this.node = { tokens: [] }; if (!(this.sectionName in asset.parseTree)) { asset.parseTree[this.sectionName] = []; } asset.parseTree[this.sectionName].push(this.node); this.refreshHref(); return Relation.prototype.attach.call(this, asset, position, adjacentRelation); }, detach: function () { var indexInSection = this.from.parseTree[this.sectionName].indexOf(this.node); if (indexInSection === -1) { throw new Error('CacheManifestEntry.detach: Relation not found in the ' + this.sectionName + ' section'); } this.from.parseTree[this.sectionName].splice(indexInSection, 1); return Relation.prototype.detach.call(this); } }); module.exports = CacheManifestEntry;
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; };
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.use = exports.t = exports.setDefaultNamespace = exports.on = exports.off = exports.loadResources = exports.loadNamespaces = exports.loadLanguages = exports.init = exports.getFixedT = exports.exists = exports.dir = exports.createInstance = exports.cloneInstance = exports.changeLanguage = undefined; var _i18next = require('./i18next'); var _i18next2 = _interopRequireDefault(_i18next); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _i18next2.default; var changeLanguage = exports.changeLanguage = _i18next2.default.changeLanguage.bind(_i18next2.default); var cloneInstance = exports.cloneInstance = _i18next2.default.cloneInstance.bind(_i18next2.default); var createInstance = exports.createInstance = _i18next2.default.createInstance.bind(_i18next2.default); var dir = exports.dir = _i18next2.default.dir.bind(_i18next2.default); var exists = exports.exists = _i18next2.default.exists.bind(_i18next2.default); var getFixedT = exports.getFixedT = _i18next2.default.getFixedT.bind(_i18next2.default); var init = exports.init = _i18next2.default.init.bind(_i18next2.default); var loadLanguages = exports.loadLanguages = _i18next2.default.loadLanguages.bind(_i18next2.default); var loadNamespaces = exports.loadNamespaces = _i18next2.default.loadNamespaces.bind(_i18next2.default); var loadResources = exports.loadResources = _i18next2.default.loadResources.bind(_i18next2.default); var off = exports.off = _i18next2.default.off.bind(_i18next2.default); var on = exports.on = _i18next2.default.on.bind(_i18next2.default); var setDefaultNamespace = exports.setDefaultNamespace = _i18next2.default.setDefaultNamespace.bind(_i18next2.default); var t = exports.t = _i18next2.default.t.bind(_i18next2.default); var use = exports.use = _i18next2.default.use.bind(_i18next2.default);
//引入组件库 var d1 = require("deviceone"); var do_App = d1.sm("do_App"); do_App.on("loaded", function () { //全屏方式打开主界面 do_App.openPage({ source:"source://view/start.ui", statusBarState:"transparent", animationType: "fade" }); });
$(function () { 'use strict'; var $image = $(window.createCropperImage()); $image.cropper({ ready: function () { QUnit.test('options#viewMode: 0', function (assert) { var canvasData = { left: 100, top: 100, width: 160, height: 90 }; var changedCanvasData = $image.cropper('setCanvasData', canvasData).cropper('getCanvasData'); assert.equal(changedCanvasData.left, canvasData.left); assert.equal(changedCanvasData.top, canvasData.top); assert.equal(changedCanvasData.width, canvasData.width); assert.equal(changedCanvasData.height, canvasData.height); }); } }); (function () { var $image = $(window.createCropperImage()); $image.cropper({ viewMode: 1, ready: function () { QUnit.test('options#viewMode: 1', function (assert) { var canvasData = $image.cropper('zoom', -0.5).cropper('getCanvasData'); var cropBoxData = $image.cropper('getCropBoxData'); assert.ok(canvasData.width >= cropBoxData.width); assert.ok(canvasData.height >= cropBoxData.height); }); } }); })(); (function () { var $image = $(window.createCropperImage()); $image.cropper({ viewMode: 2, ready: function () { QUnit.test('options#viewMode: 2', function (assert) { var canvasData = $image.cropper('zoom', -0.5).cropper('getCanvasData'); var containerData = $image.cropper('getContainerData'); assert.ok(canvasData.width >= containerData.width || canvasData.height >= containerData.height); }); } }); })(); (function () { var $image = $(window.createCropperImage()); $image.cropper({ viewMode: 3, ready: function () { QUnit.test('options#viewMode: 3', function (assert) { var canvasData = $image.cropper('zoom', -0.5).cropper('getCanvasData'); var containerData = $image.cropper('getContainerData'); assert.ok(canvasData.width >= containerData.width); assert.ok(canvasData.height >= containerData.height); }); } }); })(); });
/*! * Module dependencies. */ var PhoneGapBuild = require('../lib/phonegap-build'), phonegapbuild; /*! * PhoneGapBuild specification. */ describe('phonegapbuild', function() { beforeEach(function() { phonegapbuild = new PhoneGapBuild(); }); it('should have a login action', function() { expect(phonegapbuild.login).toEqual(jasmine.any(Function)); }); it('should have a logout action', function() { expect(phonegapbuild.logout).toEqual(jasmine.any(Function)); }); it('should have a create action', function() { expect(phonegapbuild.create).toEqual(jasmine.any(Function)); }); it('should have a build action', function() { expect(phonegapbuild.build).toEqual(jasmine.any(Function)); }); it('should support global events', function(done) { phonegapbuild.on('log', function() { done(); }); phonegapbuild.emit('log', 'hello world'); }); it('should not throw "error" events', function(done) { phonegapbuild.on('error', function() { done(); }); expect(function() { phonegapbuild.emit('error', new Error('hello world')); }).not.toThrow(); }); });
var Prom = require('es6-promise').Promise; function delay (t) { function wait (fulfill, reject) { if (t < 1) { throw new Error('Delay must be greater than zero.'); } setTimeout(function () { console.log('Resolving after', t); fulfill(t); }, t); } return new Prom(wait); } Prom .all([delay(0), delay(400)]) .then(function (result) { throw new Error('I dislike the result!'); }) .catch(function (err) { console.log(err.message); });
'use strict'; const common = require('../common'); /** * This test is for https://github.com/nodejs/node/issues/24203 */ let count = 50; const time = 1.00000000000001; const exec = common.mustCall(() => { if (--count === 0) { return; } setTimeout(exec, time); }, count); exec();
module.exports = { // Attributes. ATTRIBUTE_AUTOSIZE: 'autosize', ATTRIBUTE_MAXHEIGHT: 'maxheight', ATTRIBUTE_MAXWIDTH: 'maxwidth', ATTRIBUTE_MINHEIGHT: 'minheight', ATTRIBUTE_MINWIDTH: 'minwidth', ATTRIBUTE_NAME: 'name', ATTRIBUTE_PARTITION: 'partition', ATTRIBUTE_SRC: 'src', ATTRIBUTE_HTTPREFERRER: 'httpreferrer', ATTRIBUTE_NODEINTEGRATION: 'nodeintegration', ATTRIBUTE_PLUGINS: 'plugins', ATTRIBUTE_DISABLEWEBSECURITY: 'disablewebsecurity', ATTRIBUTE_ALLOWPOPUPS: 'allowpopups', ATTRIBUTE_PRELOAD: 'preload', ATTRIBUTE_USERAGENT: 'useragent', ATTRIBUTE_BLINKFEATURES: 'blinkfeatures', ATTRIBUTE_DISABLEBLINKFEATURES: 'disableblinkfeatures', // Internal attribute. ATTRIBUTE_INTERNALINSTANCEID: 'internalinstanceid', // Error messages. ERROR_MSG_ALREADY_NAVIGATED: 'The object has already navigated, so its partition cannot be changed.', ERROR_MSG_CANNOT_INJECT_SCRIPT: '<webview>: ' + 'Script cannot be injected into content until the page has loaded.', ERROR_MSG_INVALID_PARTITION_ATTRIBUTE: 'Invalid partition attribute.', ERROR_MSG_INVALID_PRELOAD_ATTRIBUTE: 'Only "file:" protocol is supported in "preload" attribute.' }
var test = require('tap').test; var browserify = require('browserify'); var vm = require('vm'); var fs = require('fs'); var path = require('path'); var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); if (false) test('path.join', function (t) { t.plan(1); var b = browserify(); b.add(__dirname + '/files/path_join.js'); b.transform(path.dirname(__dirname)); b.bundle(function (err, src) { if (err) t.fail(err); vm.runInNewContext(src, { console: { log: log } }); }); function log (msg) { t.equal(html, msg); } });
/* Tabulator v4.0.4 (c) Oliver Folkerd */ var FrozenRows = function FrozenRows(table) { this.table = table; //hold Tabulator object this.topElement = document.createElement("div"); this.rows = []; this.displayIndex = 0; //index in display pipeline }; FrozenRows.prototype.initialize = function () { this.rows = []; this.topElement.classList.add("tabulator-frozen-rows-holder"); // this.table.columnManager.element.append(this.topElement); this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); }; FrozenRows.prototype.setDisplayIndex = function (index) { this.displayIndex = index; }; FrozenRows.prototype.getDisplayIndex = function () { return this.displayIndex; }; FrozenRows.prototype.isFrozen = function () { return !!this.rows.length; }; //filter frozen rows out of display data FrozenRows.prototype.getRows = function (rows) { var self = this, frozen = [], output = rows.slice(0); this.rows.forEach(function (row) { var index = output.indexOf(row); if (index > -1) { output.splice(index, 1); } }); return output; }; FrozenRows.prototype.freezeRow = function (row) { if (!row.modules.frozen) { row.modules.frozen = true; this.topElement.appendChild(row.getElement()); row.initialize(); row.normalizeHeight(); this.table.rowManager.adjustTableSize(); this.rows.push(row); this.table.rowManager.refreshActiveData("display"); this.styleRows(); } else { console.warn("Freeze Error - Row is already frozen"); } }; FrozenRows.prototype.unfreezeRow = function (row) { var index = this.rows.indexOf(row); if (row.modules.frozen) { row.modules.frozen = false; var rowEl = row.getElement(); rowEl.parentNode.removeChild(rowEl); this.table.rowManager.adjustTableSize(); this.rows.splice(index, 1); this.table.rowManager.refreshActiveData("display"); if (this.rows.length) { this.styleRows(); } } else { console.warn("Freeze Error - Row is already unfrozen"); } }; FrozenRows.prototype.styleRows = function (row) { var self = this; this.rows.forEach(function (row, i) { self.table.rowManager.styleRow(row, i); }); }; Tabulator.prototype.registerModule("frozenRows", FrozenRows);
/* * grunt-contrib-stylus * http://gruntjs.com/ * * Copyright (c) 2012 Eric Woroshow, contributors * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { function testPlugin() { return function(style){ style.define('test-plugin', 'yep'); }; } // Project configuration. grunt.initConfig({ jshint: { all: [ 'Gruntfile.js', 'tasks/*.js', '<%= nodeunit.tests %>' ], options: { jshintrc: '.jshintrc' } }, // Before generating any new files, remove any previously-created files. clean: { test: ['tmp'] }, // Configuration to be run (and then tested). stylus: { compile: { files: { 'tmp/stylus.css': ['test/fixtures/stylus.styl'], 'tmp/concat.css': ['test/fixtures/stylus.styl', 'test/fixtures/stylus2.styl'] }, options: { paths: ['test/fixtures/include'], compress: true } }, nib: { files: { 'tmp/nib_.css': 'test/fixtures/nib_/nib_.styl' }, options: { paths: ['test/fixtures/include'] } }, autocompress: { files: { 'tmp/autocompress.css': 'test/fixtures/stylus.styl', }, options: { paths: ['test/fixtures/include'] } }, plugin: { files: { 'tmp/plugin.css': 'test/fixtures/plugin/plugin.styl' }, options: { use: [ testPlugin ] } }, embedurl: { files: { 'tmp/embedurl.css': 'test/fixtures/embedurl/embedurl.styl' }, options: { urlfunc: 'embedurl' } }, relative: { files: { 'tmp/relative.css': 'test/fixtures/relative/relative.styl' } }, define: { files: { 'tmp/define.css': 'test/fixtures/define/define.styl' }, options: { define: { var1: 42, var2: 'Helvetica' } } }, import: { files: { 'tmp/import.css': 'test/fixtures/import/import.styl' }, options: { paths: ['test/fixtures/'], import: [ 'include/variables', 'nib' ] } } }, // Unit tests. nodeunit: { tests: ['test/*_test.js'] } }); // Actually load this plugin's task(s). grunt.loadTasks('tasks'); // These plugins provide necessary tasks. grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-nodeunit'); grunt.loadNpmTasks('grunt-contrib-internal'); // Whenever the "test" task is run, first clean the "tmp" dir, then run this // plugin's task(s), then test the result. grunt.registerTask('test', ['clean', 'stylus', 'nodeunit']); // By default, lint and run all tests. grunt.registerTask('default', ['jshint', 'test', 'build-contrib']); };
var testCase = function (actual, expected, message) { if (actual !== expected) { throw message + ". Expected '" + expected + "', but was '" + actual + "'"; } }; var txtMsg = 'Error: arguments is not lexically binded inside of the arrow function '; var text_value = 'function_global_scope'; var arguments = text_value; var arr = a => arguments; noInline(arr); for (let i=0; i<10000; i++) { let value = arr(i); testCase(value, text_value, txtMsg + "#1"); } function afFactory0() { return a => arguments; } var af0 = afFactory0('ABC', 'DEF'); noInline(af0); for (var i=0; i<10000; i++) { var arr = af0(i); testCase(arr.length, 2, txtMsg + "#2"); testCase(arr[0],'ABC', txtMsg + "#3"); testCase(arr[1],'DEF', txtMsg + "#4"); testCase(typeof arr[2], 'undefined', txtMsg + "#5"); } var innerUseStrict = function () { 'use strict'; var createArrow = function (a, b, c) { return (x, y) => arguments[0] + arguments[1] + arguments[2] + x + y; }; let af = createArrow('A', 'B', 'C'); noInline(af); for (var i=0; i<10000; i++) { let arr = af('D', 'E'); testCase(arr, 'ABCDE', txtMsg + "#6"); } }; innerUseStrict(); var obj = function (value) { this.id = value; }; var arr_nesting = () => () => () => new obj('data'); for (var i=0; i<10000; i++) { testCase(arr_nesting()()().id, 'data'); } class A { constructor() { this.list = []; } }; class B extends A { addObj(obj) { this.list.push(obj); this.result = 0; } runAll() { for (let i = 0; i < this.list.length; i++) { this.result += this.list[i].operand(1); } } }; function test() { let b = new B(); function runTest () { b.addObj({ operand : (value) => value + value }); b.addObj({ operand : (value) => value + value }); } for (var i = 0; i < 10000; i++) { runTest(); } b.runAll(); testCase(b.result, 40000, txtMsg + "#7"); } test();
var sal = new Activity("sal") sal.screen = 0 sal.wallpaperPlugin = 'image' sal.wallpaperMode = 'SingleImage' sal.name = templateName sal.writeConfig("PackageManager", "kpackagekit") sal.reloadConfig()
/* * Copyright (C) 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Regression test for https://bugs.webkit.org/show_bug.cgi?id=144152 // The bug in 144152 needs 3 conditions to manifest: // 1. The branch test value in the inlined function is of useKind ObjectOrOtherUse. // 2. The branch test value is proven to be a known useKind. // 3. The masqueradesAsUndefined watchpoint is no longer valid. // With the bug fixed, this test should not crash on debug builds. function inlinedFunction(x) { if (x) // Conditional branch that will assert on a debug build if the bug is present. new Object; } function foo(x) { if (x) // Testing x before calling the inlined function sets up condition 2. inlinedFunction(x); } makeMasquerader(); // Invalidates the masqueradesAsUndefined watchpoint for condition 3. for (var i = 0; i < 10000; i++) foo({}); // Pass an object argument to set up condition 1.
Drupal.behaviors.galleryformatter = function (context) { $('.galleryformatter:not(.gallery-processed)', context).each(function(){ Drupal.galleryformatter.prepare(this); }).addClass('gallery-processed'); }; Drupal.galleryformatter = Drupal.galleryformatter || {}; // setting up the main behaviour Drupal.galleryformatter.prepare = function(el) { // var $settings = Drupal.settings.galleryformatter; var $el = $(el); var $slides = $('li.gallery-slide', $el); var $thumbs = $('.gallery-thumbs', $el); var $thumbsLi = $('li', $thumbs); var thumbWidth = $thumbsLi.filter(':first').width() + 'px'; var liWidth = $thumbsLi.outerWidth(); // includes padding /* * Only start the thumbs carrousel if needed */ if (($thumbsLi.size() * liWidth) > $thumbs.width()) { $('ul', $thumbs).width('99999px'); $thumbs.infiniteCarousel(); $thumbsLi = $('li', $thumbs); // we need to reselect because infiniteCarousel inserts new empty li elements if necessary } $thumbsLi.each(function(){ $(this).css({ width: thumbWidth }); }); var $thumbslinks = $('a', $thumbsLi); /* * @TODO: * figure out how to get this into proper functions reusing selections */ $thumbslinks.click(function(e){ var $hash = $(this.hash); if(!$hash.is(':visible')){ $thumbsLi.removeClass('active'); $(this).parent().addClass('active'); $slides.filter(':visible').fadeOut('slow'); $hash.fadeIn('slow'); /* * @FIXME * Need to figure out a way to update the location bar of the browser, for bookmarking etc, without making the scroll jump * window.location.hash = this.hash; solution below does update the location, but makes the scroll jump. */ // window.location.hash = this.hash; // not sure if this is the best way to do it. } e.preventDefault(); }); /* * Startup behaviour (when the page first loads) */ $slides.hide(); // hide all slides var $locationHash = window.location.hash; // if we are being deeplinked to a specific slide, capture that function showFirstSlide(){ $slides.filter(':first').show(); // show the first one $thumbsLi.filter('.slide-0:not("cloned")').addClass('active'); // activate the first thumbnail } // if we have a hash in the url if ($locationHash) { var $slideToShow = $slides.filter($locationHash); // if the hash corresponds to one of our slides if ($slideToShow.length > 0) { $slideToShow.show(); // show that slide $thumbsLi.not($(".cloned")).find("a[href="+$locationHash+"]").parent().addClass('active'); // activate that thumbnail } // otherwise the default else { showFirstSlide(); } } // otherwise the default else { showFirstSlide(); } };
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'font', 'mk', { fontSize: { label: 'Size', voiceLabel: 'Font Size', panelTitle: 'Font Size' }, label: 'Font', // MISSING panelTitle: 'Font Name', // MISSING voiceLabel: 'Font' // MISSING } );
'use strict'; exports.__esModule = true; exports['default'] = combineAll; var _combineLatestSupport = require('./combineLatest-support'); /** * Takes an Observable of Observables, and collects all observables from it. Once the outer observable * completes, it subscribes to all collected observables and "combines" their values, such that: * - every time an observable emits, the returned observable emits * - when the returned observable emits, it emits all of the most recent values by: * - if a `project` function is provided, it is called with each recent value from each observable in whatever order they arrived, * and the result of the `project` function is what is emitted by the returned observable * - if there is no `project` function, an array of all of the most recent values is emitted by the returned observable. * @param {function} [project] an optional function to map the most recent values from each observable into a new result. Takes each of the * most recent values from each collected observable as arguments, in order. * @returns {Observable} an observable of projected results or arrays of recent values. */ function combineAll(project) { return this.lift(new _combineLatestSupport.CombineLatestOperator(project)); } module.exports = exports['default'];
require([ 'require-config', 'run-instance-admin' ]);
og.editMembers = {}; og.editMembers.showHideOptions = function(id, mem_id, show) { var el = Ext.get(id); if (el) { el.dom.style.opacity = show ? '1.0' : '0.25'; el.dom.style.filter = 'alpha(opacity='+ (show ? '100' : '25') +')'; var container = Ext.get("abm-members-item-container-"+mem_id); if (container) { container.dom.style.fontWeight = show ? 'bold' : 'normal'; if (show) container.addClass('dashAltRow'); else container.removeClass('dashAltRow'); } } } og.editMembers.expandCollapseDim = function(id, expand) { var el = Ext.get(id); if (el) { if (expand) el.slideIn('t', {useDisplay:true}); else el.slideOut('t', {useDisplay:true}); var exp = Ext.get(id.replace('dimension', 'expander')); if (exp) { if (expand) exp.replaceClass('toggle_collapsed', 'toggle_expanded'); else exp.replaceClass('toggle_expanded', 'toggle_collapsed'); exp.dom.onclick = function() {og.editMembers.expandCollapseDim(id, !expand)}; } } }
/* * /MathJax/jax/output/HTML-CSS/fonts/Gyre-Termes/Shapes/Regular/Main.js * * Copyright (c) 2009-2015 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.GyreTermesMathJax_Shapes = { directory: "Shapes/Regular", family: "GyreTermesMathJax_Shapes", testString: "\u00A0\u2422\u2423\u2500\u2502\u251C\u2524\u252C\u2534\u253C\u2581\u2588\u2591\u2592\u2593", 32: [0, 0, 250, 0, 0], 160: [0, 0, 250, 0, 0], 9250: [683, 10, 500, 3, 468], 9251: [160, 106, 500, 40, 460], 9472: [276, -224, 500, 0, 500], 9474: [650, 150, 500, 224, 276], 9500: [650, 150, 500, 224, 500], 9508: [650, 150, 500, 0, 276], 9516: [276, 150, 500, 0, 500], 9524: [650, -224, 500, 0, 500], 9532: [650, 150, 500, 0, 500], 9601: [100, 0, 800, 0, 800], 9608: [800, 0, 800, 0, 800], 9617: [800, 0, 800, 0, 800], 9618: [800, 0, 800, 0, 800], 9619: [800, 0, 800, 0, 800], 9642: [400, -100, 460, 80, 380], 9643: [400, -100, 460, 80, 380], 9644: [375, -125, 660, 80, 580], 9645: [375, -125, 660, 80, 580], 9655: [601, 101, 768, 80, 688], 9665: [601, 101, 768, 80, 688], 9675: [568, 68, 796, 80, 716], 9679: [568, 68, 796, 80, 716], 9702: [400, -100, 460, 80, 380], 9828: [668, 0, 796, 80, 716], 9829: [668, 0, 760, 80, 680], 9830: [670, 0, 782, 80, 702], 9831: [668, 0, 822, 80, 742], 9834: [662, 14, 600, 66, 556], 9901: [475, -25, 500, -117, 617], 9902: [700, 200, 500, -171, 671], 11012: [470, -30, 1091, 80, 1011], 11013: [470, -30, 1030, 80, 950], 11014: [690, 180, 600, 80, 520], 11015: [680, 190, 600, 80, 520], 11020: [470, -30, 1040, 80, 960], 11021: [690, 190, 600, 80, 520], 11034: [702, 202, 1008, 52, 956], 11057: [830, 330, 850, 80, 770], 11059: [430, -70, 1170, 80, 1090] }; MathJax.Callback.Queue( ["initFont", MathJax.OutputJax["HTML-CSS"], "GyreTermesMathJax_Shapes"], ["loadComplete", MathJax.Ajax, MathJax.OutputJax["HTML-CSS"].fontDir + "/Shapes/Regular/Main.js"] );
model.jsonModel = { services: [ { name: "alfresco/services/LoggingService", config: { loggingPreferences: { enabled: true, all: true } } }, "alfresco/services/DocumentService" ], widgets:[ { name: "alfresco/search/AlfSearchListView", config: { id: "SEARCH_RESULTS", currentData: { items: [ { nodeRef: "workspace://SpacesStore/f8394454-0651-48a5-b583-d067c7d03339", type: "folder", displayName: "Normal result", title: "Normal result title", modifiedBy: "Barry Smith", modifiedOn: "13th December 2010", modifiedByUser: "bsmith", description: "Normal result description", site: { title: "Normal result site title", shortName: "normalResult" }, path: "/one/two/three/four", size: 283746, highlight: "normal" } ] }, widgetsForHeader: [ { name: "alfresco/lists/views/layouts/HeaderCell", config: { id: "THUMBNAIL_HEADER", label: "Thumbnail column" } }, { name: "alfresco/lists/views/layouts/HeaderCell", config: { id: "DETAIL_HEADER", label: "Detail column" } }, { name: "alfresco/lists/views/layouts/HeaderCell", config: { id: "ACTIONS_HEADER", label: "Actions column" } } ], widgets:[ { name: "alfresco/search/AlfSearchResult", config: { pubSubScope: "AlfSearchResultScope", enableContextMenu: true, showMoreInfo: false, additionalDocumentAndFolderActions: [ "dummy-action-for-test" ], widgetsAbove: [ { name: "alfresco/renderers/Banner", config: { bannerMessage: "Lookout Below!" } } ], widgetsBelow: [ { name: "alfresco/renderers/Banner", config: { bannerMessage: "Lookout Above!" } } ], showSearchTermHighlights: true, highlightProperty: "highlight" } } ] } }, { name: "aikauTesting/mockservices/PdfJsMockXhr", config: { } }, { name: "alfresco/logging/DebugLog" } ] };
/** * @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 */ export default []; //# sourceMappingURL=dyo.js.map
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 App = require('app'); var preInstallChecksController; describe('App.PreInstallChecksController', function () { beforeEach(function () { preInstallChecksController = App.PreInstallChecksController.create(); }); describe('#loadStep', function () { beforeEach(function () { preInstallChecksController.set('preInstallChecksWhereRun', true); }); it('should set `preInstallChecksWhereRun` to false', function () { preInstallChecksController.loadStep(); expect(preInstallChecksController.get('preInstallChecksWhereRun')).to.be.false; }); }); describe('#runPreInstallChecks', function () { it('should set `preInstallChecksWhereRun` to true', function () { preInstallChecksController.runPreInstallChecks(); expect(preInstallChecksController.get('preInstallChecksWhereRun')).to.be.true; }); }); describe('#notRunChecksWarnPopup', function () { it('should throw error', function () { expect(function () { preInstallChecksController.notRunChecksWarnPopup() }).to.throw('`afterChecksCallback` should be a function'); }); describe('popup', function () { var popup; beforeEach(function () { popup = preInstallChecksController.notRunChecksWarnPopup(Em.K); sinon.spy(preInstallChecksController, 'runPreInstallChecks'); }); afterEach(function () { preInstallChecksController.runPreInstallChecks.restore(); }); it('#onPrimary', function (done) { preInstallChecksController.notRunChecksWarnPopup(done).onPrimary(); }); it('#onSecondary', function () { popup.onSecondary(); expect(preInstallChecksController.runPreInstallChecks.calledOnce).to.be.true; }); }); }); });
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 App = require('app'); /* sign will be compared like: <clusterSelectedStackVersion> sign <stackVersionNumber> if true use this baseStackFolder Example: { "stackName": "PHD", "stackVersionNumber": "3.0", "sign": "<", "baseStackFolder": "HDP2" } This rule will work for any PHD version number that is lower than 3.0 (2.9,2.8, e.t.c) */ module.exports = [ { "stackName": "PHD", "stackVersionNumber": "3.3", "sign": "=", "baseStackFolder": "HDP2.3" }, { "stackName": "PHD", "stackVersionNumber": "3.0", "sign": "=", "baseStackFolder": "HDP2.2" }, { "stackName": "PHD", "stackVersionNumber": "3.0", "sign": "<", "baseStackFolder": "HDP2" } ];
define( ({ instruction: "Definējiet saturu, kas tiek rādīts jūsu aplikācijas uzplaiksnījuma ekrānā. Uzplaiksnījuma ekrāns tiek rādīts pirms aplikācijas ielādes. ", defaultContent: "Pievienojiet tekstu, saites un nelielus grafikus šeit.", requireConfirm: "Pieprasīt apstiprinājumu, lai turpinātu", noRequireConfirm: "Nepieprasīt apstiprinājumu, lai turpinātu", optionText: "Nodrošināt opciju atkārtoti rādīt vai nerādīt uzplaiksnījuma ekrānu", confirmLabel: "Apstiprinājuma teksti: ", defaultConfirmText: "Piekrītu iepriekš norādītajiem noteikumiem un nosacījumiem", confirmOption: "Vienmēr rādīt šo uzplaiksnījuma ekrānu ikreiz, kad tiek palaista lietotne", backgroundColor: "Fona krāsa" }) );
module.exports = function(config) { config.set({ // Base path, that will be used to resolve files and exclude basePath: '', // Frameworks to use frameworks: ['jasmine'], // List of files / patterns to load in the browser files: [ 'bower_components/jquery/dist/jquery.js', 'bower_components/angular/angular.js', 'bower_components/angular-sanitize/angular-sanitize.js', 'bower_components/angular-mocks/angular-mocks.js', 'dist/json-formatter.js', 'dist/json-formatter.css', 'test/**/*.spec.js' ], // List of files to exclude exclude: [], // Web server port port: 9876, // Level of logging // possible values: config.LOG_DISABLE || config.LOG_ERROR // || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG logLevel: config.LOG_INFO, // Enable / disable watching file and executing tests whenever any file changes autoWatch: true, // Start these browsers, currently available: // - Chrome // - ChromeCanary // - Firefox // - Opera // - Safari (only Mac) // - PhantomJS // - IE (only Windows) browsers: [process.env.TRAVIS ? 'Firefox' : 'Chrome'], // Continuous Integration mode // if true, it capture browsers, run tests and exit singleRun: false }); };
/// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the /// "Use Terms"). Any redistribution of this code must retain the above /// copyright and this notice and otherwise comply with the Use Terms. /** * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js * @description Array.prototype.indexOf returns 0 if fromIndex is null */ function testcase() { var a = [1,2,3]; if (a.indexOf(1,null) === 0 ) { // null resolves to 0 return true; } } runTestCase(testcase);
// Copyright 2017 The Oppia Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS-IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * @fileoverview Service to retrieve information of learner dashboard from the * backend. */ oppia.factory('LearnerDashboardBackendApiService', ['$http', function($http) { var _fetchLearnerDashboardData = function() { return $http.get('/learnerdashboardhandler/data'); }; return { fetchLearnerDashboardData: _fetchLearnerDashboardData }; }]);
/* global document */ import { Modal, message } from 'antd' import React from 'react' import ReactDOM from 'react-dom' import classnames from 'classnames' import styles from './layer.less' const { info, success, error, warning, confirm } = Modal const layer = { prefixCls: 'ant-layer', index: 1, info, success, error, warning, confirm, } layer.close = index => new Promise((resolve, reject) => { const { prefixCls } = layer let div = document.getElementById(`${prefixCls}-reference-${index}`) if (index === undefined) { const references = document.querySelectorAll(`.${prefixCls}-reference`) div = references[references.length - 1] } if (!div) { message.error('关闭失败,未找到Dom') return } const unmountResult = ReactDOM.unmountComponentAtNode(div) if (unmountResult && div.parentNode) { div.parentNode.removeChild(div) resolve(index) } else { reject(index) } }) layer.closeAll = () => { const { prefixCls } = layer const references = document.querySelectorAll(`.${prefixCls}-reference`) let i = 0 while (i < references.length) { layer.close() i += 1 } } layer.open = (config) => { const props = Object.assign({}, config) const { content, ...modalProps } = props const { className, wrapClassName = '', verticalCenter = true } = modalProps const { prefixCls } = layer layer.index += 1 const index = layer.index let div = document.createElement('div') div.id = `${prefixCls}-reference-${index}` div.className = `${prefixCls}-reference` document.body.appendChild(div) ReactDOM.render( <Modal visible title="Title" transitionName="zoom" maskTransitionName="fade" onCancel={() => { layer.close(index) }} onOk={() => { layer.close(index) }} {...modalProps} wrapClassName={classnames({ [styles.verticalCenter]: verticalCenter, [wrapClassName]: true })} className={classnames(prefixCls, className, [`${prefixCls}-${index}`])} > <div className={`${prefixCls}-body-wrapper`} style={{ maxHeight: document.body.clientHeight - 256 }}> {content} </div> </Modal>, div) return index } export default layer
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: '<json:package.json>', meta: { banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %> */' }, concat_sourcemap : { 'build/epub_no_underscore.js': ['<banner>', 'libs/rsvp/rsvp.js', 'src/*.js', 'libs/mime-types/mime-types.js'], 'build/epub.js': ['<banner>', 'libs/underscore/underscore-min.js', 'libs/rsvp/rsvp.js', 'src/*.js', 'libs/mime-types/mime-types.js'], 'build/reader.js': ['<banner>', 'reader_src/reader.js', 'reader_src/controllers/*.js'], 'build/hooks.js': ['<banner>', 'hooks/default/*.js'], }, uglify: { my_target: { options: { preserveComments: 'some', sourceMap: true }, files: { 'build/epub.min.js': ['build/epub.js'], 'build/reader.min.js': ['build/reader.js'], 'build/hooks.min.js': ['build/hooks.js'], 'build/libs/zip.min.js': ['libs/jszip/jszip.min.js'], 'build/libs/localforage.min.js': ['libs/localforage/localforage.min.js'] } } }, copy: { main: { files: [ {src: 'build/epub.js', dest: 'reader/js/epub.min.js'}, {src: 'build/hooks.min.js', dest: 'reader/js/hooks.min.js'}, {src: 'build/reader.min.js', dest: 'reader/js/reader.min.js'}, {src: 'build/epub.min.map', dest: 'reader/js/epub.js.map'}, {src: 'build/hooks.min.map', dest: 'reader/js/hooks.js.map'}, {src: 'build/reader.js.map', dest: 'reader/js/hooks.js.map'}, {src: 'build/libs/zip.min.js', dest: 'reader/js/libs/zip.min.js'}, // {src: 'build/libs/zip.min.js', dest: 'reader/js/libs/zip.min.map'}, {src: 'libs/jquery/jquery-2.1.0.min.js', dest:'reader/js/libs/jquery-2.1.0.min.js'}, {src: 'libs/screenfull.min.js', dest: 'reader/js/libs/screenfull.min.js'}, {src: 'reader_src/plugins/search.js', dest: 'reader/js/plugins/search.js'}, {src: 'reader_src/plugins/hypothesis.js', dest: 'reader/js/plugins/hypothesis.js'}, {src: 'hooks/extensions/highlight.js', dest: 'reader/js/hooks/extensions/highlight.js'} ] }, }, jshint: { all: ['src/**/*.js'],//, 'reader/**/*.js'] options : { // Environments "browser": true, "devel": true, "worker": true, // Enforcing //"maxlen": 80, //"quotmark": "single", "trailing": true, "strict": false, // Relaxing "boss": true, "funcscope": true, "globalstrict": true, "loopfunc": true, "maxerr": 1000, "nonstandard": true, "sub": true, "validthis": true, "globals": { "_": false, "define" : false, "module" : false } } }, watch: { scripts: { files: ['src/**/*.js', 'reader/**/*.js', 'reader_src/**/*.js'], tasks: ['concat_sourcemap', 'uglify'], options: { interrupt: true, } }, } }); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-concat-sourcemap'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-watch'); // Default task(s). grunt.registerTask('default', ['jshint', 'concat_sourcemap', 'uglify', 'copy']); };