text
stringlengths
2
6.14k
import $ from 'jquery'; import EditFileWidget from 'girder/views/widgets/EditFileWidget'; import FileCollection from 'girder/collections/FileCollection'; import FileInfoWidget from 'girder/views/widgets/FileInfoWidget'; import UploadWidget from 'girder/views/widgets/UploadWidget'; import View from 'girder/views/View'; import { AccessType } from 'girder/constants'; import { confirm } from 'girder/dialog'; import { formatSize } from 'girder/misc'; import events from 'girder/events'; import FileListTemplate from 'girder/templates/widgets/fileList.pug'; /** * This widget shows a list of files in a given item. */ var FileListWidget = View.extend({ events: { 'click a.g-show-more-files': function () { this.collection.fetchNextPage(); }, 'click a.g-show-info': function (e) { var cid = $(e.currentTarget).attr('file-cid'); new FileInfoWidget({ el: $('#g-dialog-container'), model: this.collection.get(cid), parentItem: this.parentItem, parentView: this }).render(); }, 'click a.g-update-contents': function (e) { var cid = $(e.currentTarget).parent().attr('file-cid'); this.uploadDialog(cid); }, 'click a.g-update-info': function (e) { var cid = $(e.currentTarget).parent().attr('file-cid'); this.editFileDialog(cid); }, 'click a.g-delete-file': function (e) { var cid = $(e.currentTarget).parent().attr('file-cid'); var file = this.collection.get(cid); confirm({ text: 'Are you sure you want to delete the file <b>' + file.escape('name') + '</b>?', yesText: 'Delete', escapedHtml: true, confirmCallback: () => { file.once('g:deleted', function () { events.trigger('g:alert', { icon: 'ok', type: 'success', text: 'File deleted.', timeout: 4000 }); this.render(); }, this).once('g:error', function () { events.trigger('g:alert', { icon: 'cancel', text: 'Failed to delete file.', type: 'danger', timeout: 4000 }); }).destroy(); } }); } }, initialize: function (settings) { this.upload = settings.upload; this.fileEdit = settings.fileEdit; this.checked = []; this.collection = new FileCollection(); this.collection.altUrl = 'item/' + (settings.itemId || settings.item.get('_id')) + '/files'; this.collection.append = true; // Append, don't replace pages this.collection.on('g:changed', function () { this.render(); this.trigger('g:changed'); }, this).fetch(); this.parentItem = settings.item; }, editFileDialog: function (cid) { this.editFileWidget = new EditFileWidget({ el: $('#g-dialog-container'), file: this.collection.get(cid), parentView: this }).off('g:saved', null, this).on('g:saved', function () { this.render(); }, this); this.editFileWidget.render(); }, uploadDialog: function (cid) { new UploadWidget({ el: $('#g-dialog-container'), title: 'Replace file contents', parent: this.collection.get(cid), parentType: 'file', parentView: this }).on('g:uploadFinished', function () { events.trigger('g:alert', { icon: 'ok', text: 'File contents updated.', type: 'success', timeout: 4000 }); }, this).render(); }, render: function () { this.checked = []; this.$el.html(FileListTemplate({ files: this.collection.toArray(), hasMore: this.collection.hasNextPage(), AccessType: AccessType, formatSize: formatSize, parentItem: this.parentItem })); if (this.fileEdit) { this.editFileDialog(this.fileEdit); this.fileEdit = false; } else if (this.upload) { this.uploadDialog(this.upload); this.upload = false; } return this; }, /** * Insert a file into the collection and re-render it. */ insertFile: function (file) { this.collection.add(file); this.render(); this.trigger('g:changed'); } }); export default FileListWidget;
/** * @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 */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gulp-tasks/cldr/extract.js export default []; //# sourceMappingURL=tzm.js.map
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'it', { euro: 'Simbolo Euro', lsquo: 'Virgoletta singola sinistra', rsquo: 'Virgoletta singola destra', ldquo: 'Virgolette aperte', rdquo: 'Virgolette chiuse', ndash: 'Trattino', mdash: 'Trattino lungo', iexcl: 'Punto esclavamativo invertito', cent: 'Simbolo Cent', pound: 'Simbolo Sterlina', curren: 'Simbolo Moneta', yen: 'Simbolo Yen', brvbar: 'Barra interrotta', sect: 'Simbolo di sezione', uml: 'Dieresi', copy: 'Simbolo Copyright', ordf: 'Indicatore ordinale femminile', laquo: 'Virgolette basse aperte', not: 'Nessun segno', reg: 'Simbolo Registrato', macr: 'Macron', deg: 'Simbolo Grado', sup2: 'Apice Due', sup3: 'Apice Tre', acute: 'Accento acuto', micro: 'Simbolo Micro', para: 'Simbolo Paragrafo', middot: 'Punto centrale', cedil: 'Cediglia', sup1: 'Apice Uno', ordm: 'Indicatore ordinale maschile', raquo: 'Virgolette basse chiuse', frac14: 'Frazione volgare un quarto', frac12: 'Frazione volgare un mezzo', frac34: 'Frazione volgare tre quarti', iquest: 'Punto interrogativo invertito', Agrave: 'Lettera maiuscola latina A con accento grave', Aacute: 'Lettera maiuscola latina A con accento acuto', Acirc: 'Lettera maiuscola latina A con accento circonflesso', Atilde: 'Lettera maiuscola latina A con tilde', Auml: 'Lettera maiuscola latina A con dieresi', Aring: 'Lettera maiuscola latina A con anello sopra', AElig: 'Lettera maiuscola latina AE', Ccedil: 'Lettera maiuscola latina C con cediglia', Egrave: 'Lettera maiuscola latina E con accento grave', Eacute: 'Lettera maiuscola latina E con accento acuto', Ecirc: 'Lettera maiuscola latina E con accento circonflesso', Euml: 'Lettera maiuscola latina E con dieresi', Igrave: 'Lettera maiuscola latina I con accento grave', Iacute: 'Lettera maiuscola latina I con accento acuto', Icirc: 'Lettera maiuscola latina I con accento circonflesso', Iuml: 'Lettera maiuscola latina I con dieresi', ETH: 'Lettera maiuscola latina Eth', Ntilde: 'Lettera maiuscola latina N con tilde', Ograve: 'Lettera maiuscola latina O con accento grave', Oacute: 'Lettera maiuscola latina O con accento acuto', Ocirc: 'Lettera maiuscola latina O con accento circonflesso', Otilde: 'Lettera maiuscola latina O con tilde', Ouml: 'Lettera maiuscola latina O con dieresi', times: 'Simbolo di moltiplicazione', Oslash: 'Lettera maiuscola latina O barrata', Ugrave: 'Lettera maiuscola latina U con accento grave', Uacute: 'Lettera maiuscola latina U con accento acuto', Ucirc: 'Lettera maiuscola latina U con accento circonflesso', Uuml: 'Lettera maiuscola latina U con accento circonflesso', Yacute: 'Lettera maiuscola latina Y con accento acuto', THORN: 'Lettera maiuscola latina Thorn', szlig: 'Lettera latina minuscola doppia S', agrave: 'Lettera minuscola latina a con accento grave', aacute: 'Lettera minuscola latina a con accento acuto', acirc: 'Lettera minuscola latina a con accento circonflesso', atilde: 'Lettera minuscola latina a con tilde', auml: 'Lettera minuscola latina a con dieresi', aring: 'Lettera minuscola latina a con anello superiore', aelig: 'Lettera minuscola latina ae', ccedil: 'Lettera minuscola latina c con cediglia', egrave: 'Lettera minuscola latina e con accento grave', eacute: 'Lettera minuscola latina e con accento acuto', ecirc: 'Lettera minuscola latina e con accento circonflesso', euml: 'Lettera minuscola latina e con dieresi', igrave: 'Lettera minuscola latina i con accento grave', iacute: 'Lettera minuscola latina i con accento acuto', icirc: 'Lettera minuscola latina i con accento circonflesso', iuml: 'Lettera minuscola latina i con dieresi', eth: 'Lettera minuscola latina eth', ntilde: 'Lettera minuscola latina n con tilde', ograve: 'Lettera minuscola latina o con accento grave', oacute: 'Lettera minuscola latina o con accento acuto', ocirc: 'Lettera minuscola latina o con accento circonflesso', otilde: 'Lettera minuscola latina o con tilde', ouml: 'Lettera minuscola latina o con dieresi', divide: 'Simbolo di divisione', oslash: 'Lettera minuscola latina o barrata', ugrave: 'Lettera minuscola latina u con accento grave', uacute: 'Lettera minuscola latina u con accento acuto', ucirc: 'Lettera minuscola latina u con accento circonflesso', uuml: 'Lettera minuscola latina u con dieresi', yacute: 'Lettera minuscola latina y con accento acuto', thorn: 'Lettera minuscola latina thorn', yuml: 'Lettera minuscola latina y con dieresi', OElig: 'Legatura maiuscola latina OE', oelig: 'Legatura minuscola latina oe', '372': 'Lettera maiuscola latina W con accento circonflesso', '374': 'Lettera maiuscola latina Y con accento circonflesso', '373': 'Lettera minuscola latina w con accento circonflesso', '375': 'Lettera minuscola latina y con accento circonflesso', sbquo: 'Singola virgoletta bassa low-9', '8219': 'Singola virgoletta bassa low-9 inversa', bdquo: 'Doppia virgoletta bassa low-9', hellip: 'Ellissi orizzontale', trade: 'Simbolo TM', '9658': 'Puntatore nero rivolto verso destra', bull: 'Punto', rarr: 'Freccia verso destra', rArr: 'Doppia freccia verso destra', hArr: 'Doppia freccia sinistra destra', diams: 'Simbolo nero diamante', asymp: 'Quasi uguale a' });
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin'); var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); var _svgIcon = require('../../svg-icon'); var _svgIcon2 = _interopRequireDefault(_svgIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var ContentNextWeek = _react2.default.createClass({ displayName: 'ContentNextWeek', mixins: [_reactAddonsPureRenderMixin2.default], render: function render() { return _react2.default.createElement( _svgIcon2.default, this.props, _react2.default.createElement('path', { d: 'M20 7h-4V5c0-.55-.22-1.05-.59-1.41C15.05 3.22 14.55 3 14 3h-4c-1.1 0-2 .9-2 2v2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zM10 5h4v2h-4V5zm1 13.5l-1-1 3-3-3-3 1-1 4 4-4 4z' }) ); } }); exports.default = ContentNextWeek; module.exports = exports['default'];
/** * Copyright 2013-2021 the original author or authors from the JHipster project. * * This file is part of the JHipster project, see https://www.jhipster.tech/ * for more information. * * 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 * * https://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 defaultApplicationOptions = require('../jdl/jhipster/default-application-options'); const applicationOptions = require('../jdl/jhipster/application-options'); const { MONOLITH } = require('../jdl/jhipster/application-types'); const binaryOptions = require('../jdl/jhipster/binary-options'); const optionNames = applicationOptions.OptionNames; const defaultNewApplicationOptions = defaultApplicationOptions.getConfigForApplicationType(); const defaultMonolithOptions = defaultApplicationOptions.getConfigForApplicationType(MONOLITH); /** Required config for prompts to be skipped */ const appRequiredConfig = { applicationType: defaultMonolithOptions[optionNames.APPLICATION_TYPE], }; const appDefaultConfig = { ...appRequiredConfig, skipClient: defaultNewApplicationOptions[optionNames.SKIP_CLIENT], skipServer: defaultNewApplicationOptions[optionNames.SKIP_SERVER], skipUserManagement: defaultMonolithOptions[optionNames.SKIP_USER_MANAGEMENT], skipCheckLengthOfIdentifier: false, skipFakeData: false, jhiPrefix: defaultNewApplicationOptions[optionNames.JHI_PREFIX], entitySuffix: defaultNewApplicationOptions[optionNames.ENTITY_SUFFIX], dtoSuffix: defaultNewApplicationOptions[optionNames.DTO_SUFFIX], get testFrameworks() { return []; }, get blueprints() { return []; }, get otherModules() { return []; }, get pages() { return []; }, }; /** Required config for prompts to be skipped */ const serverRequiredConfig = { packageName: defaultNewApplicationOptions[optionNames.PACKAGE_NAME], cacheProvider: defaultNewApplicationOptions[optionNames.CACHE_PROVIDER], websocket: defaultNewApplicationOptions[optionNames.WEBSOCKET], databaseType: defaultNewApplicationOptions[optionNames.DATABASE_TYPE], prodDatabaseType: defaultNewApplicationOptions[optionNames.PROD_DATABASE_TYPE], devDatabaseType: defaultNewApplicationOptions[optionNames.DEV_DATABASE_TYPE], searchEngine: defaultNewApplicationOptions[optionNames.SEARCH_ENGINE], buildTool: defaultNewApplicationOptions[optionNames.BUILD_TOOL], }; const serverDefaultConfig = { ...serverRequiredConfig, serverPort: defaultMonolithOptions[optionNames.SERVER_PORT], authenticationType: defaultMonolithOptions[optionNames.AUTHENTICATION_TYPE], serviceDiscoveryType: defaultMonolithOptions[optionNames.SERVICE_DISCOVERY_TYPE], enableHibernateCache: true, reactive: defaultNewApplicationOptions[optionNames.REACTIVE], enableGradleEnterprise: false, }; /** Required config for prompts to be skipped */ const clientRequiredConfig = { clientFramework: defaultMonolithOptions[optionNames.CLIENT_FRAMEWORK], }; const clientDefaultConfig = { ...clientRequiredConfig, clientPackageManager: defaultNewApplicationOptions[optionNames.CLIENT_PACKAGE_MANAGER], clientTheme: defaultMonolithOptions[optionNames.CLIENT_THEME], clientThemeVariant: defaultMonolithOptions[optionNames.CLIENT_THEME_VARIANT], withAdminUi: defaultMonolithOptions[optionNames.WITH_ADMIN_UI], }; const translationDefaultConfig = { enableTranslation: defaultNewApplicationOptions[optionNames.ENABLE_TRANSLATION], nativeLanguage: 'en', get languages() { return ['en', 'fr']; }, }; /** Required config for prompts to be skipped, baseName is missing */ const requiredDefaultConfig = { ...appRequiredConfig, ...serverRequiredConfig, ...clientRequiredConfig, }; const defaultConfig = { ...appDefaultConfig, ...serverDefaultConfig, ...clientDefaultConfig, ...translationDefaultConfig, }; const defaultConfigMicroservice = { ...appDefaultConfig, ...serverDefaultConfig, ...translationDefaultConfig, }; const entityDefaultConfig = { pagination: binaryOptions.DefaultValues[binaryOptions.Options.PAGINATION], validation: false, dto: binaryOptions.DefaultValues[binaryOptions.Options.DTO], service: binaryOptions.DefaultValues[binaryOptions.Options.SERVICE], jpaMetamodelFiltering: false, readOnly: false, embedded: false, entityAngularJSSuffix: '', fluentMethods: true, clientRootFolder: '', get fields() { return []; }, get relationships() { return []; }, }; module.exports = { appDefaultConfig, serverDefaultConfig, clientDefaultConfig, defaultConfig, defaultConfigMicroservice, requiredDefaultConfig, entityDefaultConfig, translationDefaultConfig, };
/** * Copyright 2014 IBM Corp. * * 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 should = require("should"); var sinon = require("sinon"); var when = require("when"); var request = require('supertest'); var nock; if (!process.version.match(/^v0\.[0-9]\./)) { // only set nock for node >= 0.10 try { nock = require('nock'); } catch (err) { // nevermind, will skip nock tests nock = null; } } var RED = require("../../red/red.js"); var redNodes = require("../../red/nodes"); var flows = require("../../red/nodes/flows"); var credentials = require("../../red/nodes/credentials"); var comms = require("../../red/comms.js"); var log = require("../../red/log.js"); var http = require('http'); var express = require('express'); var app = express(); var address = '127.0.0.1'; var listenPort = 0; // use ephemeral port var port; var url; var logSpy; var server; function helperNode(n) { RED.nodes.createNode(this, n); } module.exports = { load: function(testNode, testFlows, testCredentials, cb) { logSpy = sinon.spy(log,"log"); logSpy.FATAL = log.FATAL; logSpy.ERROR = log.ERROR; logSpy.WARN = log.WARN; logSpy.INFO = log.INFO; logSpy.DEBUG = log.DEBUG; logSpy.TRACE = log.TRACE; logSpy.METRIC = log.METRIC; if (typeof testCredentials === 'function') { cb = testCredentials; testCredentials = {}; } var storage = { getFlows: function() { var defer = when.defer(); defer.resolve(testFlows); return defer.promise; }, getCredentials: function() { var defer = when.defer(); defer.resolve(testCredentials); return defer.promise; }, saveCredentials: function() { // do nothing }, }; var settings = { available: function() { return false; } }; redNodes.init(settings, storage); credentials.init(storage); RED.nodes.registerType("helper", helperNode); if (Array.isArray(testNode)) { for (var i = 0; i < testNode.length; i++) { testNode[i](RED); } } else { testNode(RED); } flows.load().then(function() { should.deepEqual(testFlows, flows.getFlows()); cb(); }); }, unload: function() { // TODO: any other state to remove between tests? redNodes.clearRegistry(); logSpy.restore(); return flows.stopFlows(); }, getNode: function(id) { return flows.get(id); }, credentials: credentials, clearFlows: function() { return flows.stopFlows(); }, request: function() { return request(RED.httpAdmin); }, startServer: function(done) { server = http.createServer(function(req,res){app(req,res);}); RED.init(server, { logging:{console:{level:'off'}} }); server.listen(listenPort, address); server.on('listening', function() { port = server.address().port; url = 'http://' + address + ':' + port; comms.start(); done(); }); }, //TODO consider saving TCP handshake/server reinit on start/stop/start sequences stopServer: function(done) { if(server) { server.close(done); } }, url: function() { return url; }, nock: nock, log: function() { return logSpy;} };
//// [privacyTopLevelAmbientExternalModuleImportWithoutExport_require.js] define(["require", "exports"], function(require, exports) { // Public elements var c_public = (function () { function c_public() { } return c_public; })(); exports.c_public = c_public; }); //// [privacyTopLevelAmbientExternalModuleImportWithoutExport_require1.js] define(["require", "exports"], function(require, exports) { var c_public = (function () { function c_public() { } return c_public; })(); exports.c_public = c_public; }); //// [privacyTopLevelAmbientExternalModuleImportWithoutExport_core.js] define(["require", "exports", "m", "m2", "privacyTopLevelAmbientExternalModuleImportWithoutExport_require"], function(require, exports, im_private_mi_private, im_private_mu_private, im_private_mi_public) { // Usage of privacy error imports var privateUse_im_private_mi_private = new im_private_mi_private.c_private(); exports.publicUse_im_private_mi_private = new im_private_mi_private.c_private(); var privateUse_im_private_mu_private = new im_private_mu_private.c_private(); exports.publicUse_im_private_mu_private = new im_private_mu_private.c_private(); var privateUse_im_private_mi_public = new im_private_mi_public.c_public(); exports.publicUse_im_private_mi_public = new im_private_mi_public.c_public(); var privateUse_im_private_mi_public = new im_private_mi_public.c_public(); exports.publicUse_im_private_mi_public = new im_private_mi_public.c_public(); });
if (getrtmm$$(this.tipo) && get_model(getrtmm$$(this.tipo)) && get_model(getrtmm$$(this.tipo)).$set) { return OpenSetter(this); } return null;
/*jshint bitwise: false*/ 'use strict'; angular.module('ontimeApp') .service('Base64', function () { var keyStr = 'ABCDEFGHIJKLMNOP' + 'QRSTUVWXYZabcdef' + 'ghijklmnopqrstuv' + 'wxyz0123456789+/' + '='; this.encode = function (input) { var output = '', chr1, chr2, chr3 = '', enc1, enc2, enc3, enc4 = '', i = 0; while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4); chr1 = chr2 = chr3 = ''; enc1 = enc2 = enc3 = enc4 = ''; } return output; }; this.decode = function (input) { var output = '', chr1, chr2, chr3 = '', enc1, enc2, enc3, enc4 = '', i = 0; // remove all characters that are not A-Z, a-z, 0-9, +, /, or = input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); while (i < input.length) { enc1 = keyStr.indexOf(input.charAt(i++)); enc2 = keyStr.indexOf(input.charAt(i++)); enc3 = keyStr.indexOf(input.charAt(i++)); enc4 = keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 !== 64) { output = output + String.fromCharCode(chr2); } if (enc4 !== 64) { output = output + String.fromCharCode(chr3); } chr1 = chr2 = chr3 = ''; enc1 = enc2 = enc3 = enc4 = ''; } }; }) .factory('StorageService', function ($window) { return { get: function (key) { return JSON.parse($window.localStorage.getItem(key)); }, save: function (key, data) { $window.localStorage.setItem(key, JSON.stringify(data)); }, remove: function (key) { $window.localStorage.removeItem(key); }, clearAll : function () { $window.localStorage.clear(); } }; });
/* global define */ define([ 'underscore', 'backbone', 'marionette', '../../core', './base' ], function(_, Backbone, Marionette, c, base) { var SelectionListItem = Marionette.ItemView.extend({ template: function() {}, tagName: 'option', modelEvents: { 'change:selected': 'render' }, onRender: function() { var label = this.model.get('label'); if (label === '') { this.$el.text('(empty)'); } else if (label === 'null') { this.$el.text('(null)'); } else { this.$el.text(label); } this.$el.attr('value', this.model.get('value')); this.$el.attr('selected', this.model.get('selected')); } }); // Renders a dropdown of items allowing for selection of a single item // from the list. var SingleSelectionList = base.ControlCompositeView.extend({ className: 'selection-list', template: 'controls/select/list', itemView: SelectionListItem, itemViewOptions: function(model) { return { model: model }; }, itemViewContainer: '.items', ui: { items: '.items' }, events: { 'change .items': 'onSelectionChange' }, collectionEvents: { 'reset': 'onCollectionSync' }, initialize: function() { var limit; this.wait(); if (!this.collection) { this.collection = new Backbone.Collection(); // This is a hack to prevent a 500 error that occurs in // Serrano prior to 2.3.1 if limit is set to 0. The assumption // here is that if this type of control is being used for // selecting a value, it is unlikely to be rendering a large // number of values due to its poor usability. The field search // control is more appropriate for a large number of values. if (c.isSupported('2.3.1')) { limit = 0; } else { limit = 1000; } var _this = this; this.model.values({limit: limit}).done(function(resp) { _this.collection.reset(resp.values); return _this.ready(); }); } this.on('ready', function() { // Since the first item is selected immediately by the very // nature of a drow down list without a placeholder, we need to // call the change method when the control originally renders // so the value is set to the default selected option in the // dropdown and the apply(or update) filter button becomes // activated. this.change(); }); }, onCollectionSync: function() { this.render(); }, onSelectionChange: function() { this.change(); }, getField: function() { return this.model.id; }, getOperator: function() { return 'exact'; }, getValue: function() { return this.ui.items.val(); }, setValue: function(value) { this.ui.items.val(value); }, validate: function(attrs) { if (_.isNull(attrs.value) || _.isUndefined(attrs.value)) { return 'An option must be selected'; } } }); var MultiSelectionList = SingleSelectionList.extend({ onCollectionSync: function() { this.render(); }, onSelectionChange: function() { var _this = this; this.ui.items.children().each(function(i, el) { _this.collection.models[i].set('selected', el.selected); }); this.change(); }, onRender: function() { this.ui.items.attr('multiple', true); }, getOperator: function() { return 'in'; }, getValue: function() { return _.map(this.collection.where({selected: true}), function(model) { return model.get('value'); }); }, setValue: function(values) { if (!values) { values = []; } this.collection.each(function(model) { model.set('selected', (values.indexOf(model.get('value')) >= 0)); }); }, validate: function(attrs) { if (!attrs.value || !attrs.value.length) { return 'At least one option must be selected'; } } }); return { SingleSelectionList: SingleSelectionList, MultiSelectionList: MultiSelectionList }; });
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule SegmentedControlIOS * @flow */ 'use strict'; const NativeMethodsMixin = require('NativeMethodsMixin'); const React = require('React'); const PropTypes = require('prop-types'); const StyleSheet = require('StyleSheet'); const ViewPropTypes = require('ViewPropTypes'); const createReactClass = require('create-react-class'); const requireNativeComponent = require('requireNativeComponent'); type DefaultProps = { values: Array<string>, enabled: boolean, }; const SEGMENTED_CONTROL_REFERENCE = 'segmentedcontrol'; type Event = Object; /** * Use `SegmentedControlIOS` to render a UISegmentedControl iOS. * * #### Programmatically changing selected index * * The selected index can be changed on the fly by assigning the * selectedIndex prop to a state variable, then changing that variable. * Note that the state variable would need to be updated as the user * selects a value and changes the index, as shown in the example below. * * ```` * <SegmentedControlIOS * values={['One', 'Two']} * selectedIndex={this.state.selectedIndex} * onChange={(event) => { * this.setState({selectedIndex: event.nativeEvent.selectedSegmentIndex}); * }} * /> * ```` */ const SegmentedControlIOS = createReactClass({ displayName: 'SegmentedControlIOS', mixins: [NativeMethodsMixin], propTypes: { ...ViewPropTypes, /** * The labels for the control's segment buttons, in order. */ values: PropTypes.arrayOf(PropTypes.string), /** * The index in `props.values` of the segment to be (pre)selected. */ selectedIndex: PropTypes.number, /** * Callback that is called when the user taps a segment; * passes the segment's value as an argument */ onValueChange: PropTypes.func, /** * Callback that is called when the user taps a segment; * passes the event as an argument */ onChange: PropTypes.func, /** * If false the user won't be able to interact with the control. * Default value is true. */ enabled: PropTypes.bool, /** * Accent color of the control. */ tintColor: PropTypes.string, /** * If true, then selecting a segment won't persist visually. * The `onValueChange` callback will still work as expected. */ momentary: PropTypes.bool }, getDefaultProps: function(): DefaultProps { return { values: [], enabled: true }; }, _onChange: function(event: Event) { this.props.onChange && this.props.onChange(event); this.props.onValueChange && this.props.onValueChange(event.nativeEvent.value); }, render: function() { return ( <RCTSegmentedControl {...this.props} ref={SEGMENTED_CONTROL_REFERENCE} style={[styles.segmentedControl, this.props.style]} onChange={this._onChange} /> ); } }); const styles = StyleSheet.create({ segmentedControl: { height: 28, }, }); const RCTSegmentedControl = requireNativeComponent( 'RCTSegmentedControl', SegmentedControlIOS ); module.exports = SegmentedControlIOS;
describe('ui.grid.edit GridCellDirective', function () { var gridUtil; var scope; var element; var uiGridConstants; var recompile; var $timeout; beforeEach(module('ui.grid.edit')); beforeEach(inject(function ($rootScope, $compile, $controller, _gridUtil_, $templateCache, gridClassFactory, uiGridEditService, _uiGridConstants_, _$timeout_) { gridUtil = _gridUtil_; uiGridConstants = _uiGridConstants_; $timeout = _$timeout_; $templateCache.put('ui-grid/uiGridCell', '<div class="ui-grid-cell-contents">{{COL_FIELD CUSTOM_FILTERS}}</div>'); $templateCache.put('ui-grid/cellEditor', '<div><input ng-model="MODEL_COL_FIELD" ui-grid-editor /></div>'); scope = $rootScope.$new(); var grid = gridClassFactory.createGrid(); grid.options.columnDefs = [ {name: 'col1', enableCellEdit: true} ]; grid.options.data = [ {col1: 'val', col2:'col2val'} ]; uiGridEditService.initializeGrid(grid); grid.buildColumns(); grid.modifyRows(grid.options.data); scope.grid = grid; scope.col = grid.columns[0]; scope.row = grid.rows[0]; scope.getCellValue = function(row,col){return 'val';}; $timeout(function(){ recompile = function () { $compile(element)(scope); $rootScope.$digest(); }; }); $timeout.flush(); })); describe('ui.grid.edit uiGridCell start editing', function () { var displayHtml; beforeEach(function () { element = angular.element('<div ui-grid-cell/>'); recompile(); displayHtml = element.html(); expect(element.text()).toBe('val'); }); it('startEdit on "a"', function () { //stop edit var event = jQuery.Event("keydown"); event.keyCode = 65; element.trigger(event); expect(element.find('input')).toBeDefined(); }); it('not start edit on tab', function () { //stop edit var event = jQuery.Event("keydown"); event.keyCode = uiGridConstants.keymap.TAB; element.trigger(event); expect(element.html()).toEqual(displayHtml); }); }); describe('ui.grid.edit uiGridCell and uiGridEditor full workflow', function () { var displayHtml; beforeEach(function () { element = angular.element('<div ui-grid-cell/>'); recompile(); displayHtml = element.html(); expect(element.text()).toBe('val'); //invoke edit element.dblclick(); expect(element.find('input')).toBeDefined(); expect(element.find('input').val()).toBe('val'); }); it('should stop editing on enter', function () { //stop edit var event = jQuery.Event("keydown"); event.keyCode = uiGridConstants.keymap.ENTER; element.find('input').trigger(event); //back to beginning expect(element.html()).toBe(displayHtml); }); it('should stop editing on esc', function () { //stop edit var event = jQuery.Event("keydown"); event.keyCode = uiGridConstants.keymap.ESC; element.find('input').trigger(event); //back to beginning expect(element.html()).toBe(displayHtml); }); it('should stop editing on tab', function () { //stop edit var event = jQuery.Event("keydown"); event.keyCode = uiGridConstants.keymap.TAB; element.find('input').trigger(event); //back to beginning expect(element.html()).toBe(displayHtml); }); it('should stop when grid scrolls', function () { //stop edit scope.grid.api.core.raise.scrollBegin(); scope.$digest(); //back to beginning expect(element.html()).toBe(displayHtml); }); it('should fire public event', inject(function ($timeout) { var edited = false; scope.grid.api.edit.on.afterCellEdit(scope,function(rowEntity, colDef, newValue, oldValue){ edited = true; scope.$apply(); }); //stop edit $timeout(function(){ var event = jQuery.Event("keydown"); event.keyCode = uiGridConstants.keymap.ENTER; element.find('input').trigger(event); }); $timeout.flush(); expect(edited).toBe(true); })); }); describe('ui.grid.edit should override bound value when using editModelField', function () { var displayHtml; beforeEach(function () { element = angular.element('<div ui-grid-cell/>'); //bind the edit to another column. This could be any property on the entity scope.grid.options.columnDefs[0].editModelField = 'col2'; recompile(); displayHtml = element.html(); expect(element.text()).toBe('val'); //invoke edit element.dblclick(); expect(element.find('input')).toBeDefined(); expect(element.find('input').val()).toBe('col2val'); }); }); });
declare module 'react-toggled' { declare export type ToggledProps = { on: boolean, getTogglerProps<P>(props?: P): { ...P, 'aria-expanded': boolean, tabIndex: 0, onClick(): void }, getInputTogglerProps<P>(props?: P): { ...P, 'aria-expanded': boolean, tabIndex: 0, onKeyUp(): void, onClick(): void }, getElementTogglerProps<P>(props?: P): { ...P, 'aria-expanded': boolean, tabIndex: 0, onKeyUp(): void, onClick(): void }, setOn(): void, setOff(): void, toggle(): void }; declare type ReactToggledProps = { defaultOn?: boolean, onToggle?: (on: boolean, p: ToggledProps) => void, on?: boolean, children: React$Node | ((ToggledProps) => React$Node) }; declare module.exports: React$ComponentType<ReactToggledProps>; }
// Copyright 2013 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS-IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * @fileoverview Unit tests for goog.labs.userAgent.device. */ goog.provide('goog.labs.userAgent.deviceTest'); goog.require('goog.labs.userAgent.device'); goog.require('goog.labs.userAgent.testAgents'); goog.require('goog.testing.PropertyReplacer'); goog.require('goog.testing.jsunit'); goog.setTestOnly('goog.labs.userAgent.deviceTest'); var propertyReplacer = new goog.testing.PropertyReplacer(); function setUp() { // disable memoization propertyReplacer.set(goog.memoize, 'ENABLE_MEMOIZE', false); } function tearDown() { propertyReplacer.reset(); } function setGlobalUAString(uaString) { var mockGlobal = { 'navigator': { 'userAgent': uaString } }; propertyReplacer.set(goog, 'global', mockGlobal); } function testMobile() { assertIsMobile(goog.labs.userAgent.testAgents.ANDROID_BROWSER_235); assertIsMobile(goog.labs.userAgent.testAgents.CHROME_ANDROID); assertIsMobile(goog.labs.userAgent.testAgents.SAFARI_IPHONE); } function testTablet() { assertIsTablet(goog.labs.userAgent.testAgents.CHROME_ANDROID_TABLET); assertIsTablet(goog.labs.userAgent.testAgents.KINDLE_FIRE); assertIsTablet(goog.labs.userAgent.testAgents.IPAD_6); } function testDesktop() { assertIsDesktop(goog.labs.userAgent.testAgents.CHROME_25); assertIsDesktop(goog.labs.userAgent.testAgents.OPERA_10); assertIsDesktop(goog.labs.userAgent.testAgents.FIREFOX_19); assertIsDesktop(goog.labs.userAgent.testAgents.IE_9); assertIsDesktop(goog.labs.userAgent.testAgents.IE_10); assertIsDesktop(goog.labs.userAgent.testAgents.IE_11); } function assertIsMobile(uaString) { setGlobalUAString(uaString); assertTrue(goog.labs.userAgent.device.isMobile()); assertFalse(goog.labs.userAgent.device.isTablet()); assertFalse(goog.labs.userAgent.device.isDesktop()); } function assertIsTablet(uaString) { setGlobalUAString(uaString); assertTrue(goog.labs.userAgent.device.isTablet()); assertFalse(goog.labs.userAgent.device.isMobile()); assertFalse(goog.labs.userAgent.device.isDesktop()); } function assertIsDesktop(uaString) { setGlobalUAString(uaString); assertTrue(goog.labs.userAgent.device.isDesktop()); assertFalse(goog.labs.userAgent.device.isMobile()); assertFalse(goog.labs.userAgent.device.isTablet()); }
/** * Label.js * * Copyright, Moxiecode Systems AB * Released under LGPL License. * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ /** * This class creates a label element. A label is a simple text control * that can be bound to other controls. * * @-x-less Label.less * @class tinymce.ui.Label * @extends tinymce.ui.Widget */ define("tinymce/ui/Label", [ "tinymce/ui/Widget" ], function(Widget) { "use strict"; return Widget.extend({ /** * Constructs a instance with the specified settings. * * @constructor * @param {Object} settings Name/value object with settings. * @param {Boolean} multiline Multiline label. */ init: function(settings) { var self = this; self._super(settings); self.addClass('widget'); self.addClass('label'); self.canFocus = false; if (settings.multiline) { self.addClass('autoscroll'); } if (settings.strong) { self.addClass('strong'); } }, /** * Initializes the current controls layout rect. * This will be executed by the layout managers to determine the * default minWidth/minHeight etc. * * @method initLayoutRect * @return {Object} Layout rect instance. */ initLayoutRect: function() { var self = this, layoutRect = self._super(); if (self.settings.multiline) { // Check if the text fits within maxW if not then try word wrapping it if (self.getEl().offsetWidth > layoutRect.maxW) { layoutRect.minW = layoutRect.maxW; self.addClass('multiline'); } self.getEl().style.width = layoutRect.minW + 'px'; layoutRect.startMinH = layoutRect.h = layoutRect.minH = Math.min(layoutRect.maxH, self.getEl().offsetHeight); } return layoutRect; }, /** * Sets/gets the disabled state on the control. * * @method disabled * @param {Boolean} state Value to set to control. * @return {Boolean/tinymce.ui.Label} Current control on a set operation or current state on a get. */ disabled: function(state) { var self = this, undef; if (state !== undef) { self.toggleClass('label-disabled', state); if (self._rendered) { self.getEl()[0].className = self.classes(); } } return self._super(state); }, /** * Repaints the control after a layout operation. * * @method repaint */ repaint: function() { var self = this; if (!self.settings.multiline) { self.getEl().style.lineHeight = self.layoutRect().h + 'px'; } return self._super(); }, /** * Sets/gets the current label text. * * @method text * @param {String} [text] New label text. * @return {String|tinymce.ui.Label} Current text or current label instance. */ text: function(text) { var self = this; if (self._rendered && text) { self.getEl().innerHTML = self.encode(text); } return self._super(text); }, /** * Renders the control as a HTML string. * * @method renderHtml * @return {String} HTML representing the control. */ renderHtml: function() { var self = this, forId = self.settings.forId; return ( '<label id="' + self._id + '" class="' + self.classes() + '"' + (forId ? ' for="' + forId : '') + '">' + self.encode(self._text) + '</label>' ); } }); });
version https://git-lfs.github.com/spec/v1 oid sha256:9738f048decc584df95ea00e16568353882ca111bb1f728ddd670c13ca697f3e size 4242
// UUID // https://gist.github.com/LeverOne/1308368 /* jshint ignore:start */ function uuid(a,b){for(b=a='';a++<36;b+=a*51&52?(a^15?8^Math.random()*(a^20?16:4):4).toString(16):'-');return b} /* jshint ignore:end */ module.exports = { // Empties properties __empty: function(doc) { this.each(doc, function(value, key) { delete doc[key]; }); }, // Copies properties from an object to another __update: function(dest, src) { this.each(src, function(value, key) { dest[key] = value; }); }, // Removes an item from an array __remove: function(array, item) { var index = this.indexOf(array, item); if (index != -1) array.splice(index, 1); }, __id: function() { var id = this.id || 'id'; return id; }, getById: function(collection, id) { var self = this; return this.find(collection, function(doc) { return doc[self.__id()] === id; }); }, createId: function(collection, doc) { return uuid(); }, insert: function(collection, doc) { if (doc[this.__id()]) { // id is set var d = this.getById(collection, doc[this.__id()]); if (d) { // replace properties of existing object this.__empty(d); this.extend(d, doc); } else { // push new object collection.push(doc); } } else { // create id and push new object doc[this.__id()] = this.createId(collection, doc); collection.push(doc); } return doc; }, updateById: function(collection, id, attrs) { var doc = this.getById(collection, id); if (doc) this.__update(doc, attrs); return doc; }, updateWhere: function(collection, whereAttrs, attrs) { var self = this; var docs = this.where(collection, whereAttrs); docs.forEach(function(doc) { self.__update(doc, attrs); }); return docs; }, removeById: function(collection, id) { var doc = this.getById(collection, id); this.__remove(collection, doc); return doc; }, removeWhere: function(collection, attrs) { var self = this; var docs = this.where(collection, attrs); docs.forEach(function(doc) { self.__remove(collection, doc); }); return docs; } };
"use strict"; var common_1 = require('@angular/common'); var core_1 = require('@angular/core'); var bar_component_1 = require('./bar.component'); var progress_directive_1 = require('./progress.directive'); var progressbar_component_1 = require('./progressbar.component'); var progressbar_config_1 = require('./progressbar.config'); var ProgressbarModule = (function () { function ProgressbarModule() { } ProgressbarModule.forRoot = function () { return { ngModule: ProgressbarModule, providers: [progressbar_config_1.ProgressbarConfig] }; }; ProgressbarModule.decorators = [ { type: core_1.NgModule, args: [{ imports: [common_1.CommonModule], declarations: [progress_directive_1.ProgressDirective, bar_component_1.BarComponent, progressbar_component_1.ProgressbarComponent], exports: [progress_directive_1.ProgressDirective, bar_component_1.BarComponent, progressbar_component_1.ProgressbarComponent] },] }, ]; /** @nocollapse */ ProgressbarModule.ctorParameters = function () { return []; }; return ProgressbarModule; }()); exports.ProgressbarModule = ProgressbarModule;
import React from 'react' export default function NotFound() { return ( <div className="container"> <h1>Doh! 404!</h1> <p>These are <em>not</em> the droids you are looking for!</p> </div> ) }
import { Curve } from './Curve.js'; import * as Curves from '../curves/Curves.js'; /************************************************************** * Curved Path - a curve path is simply a array of connected * curves, but retains the api of a curve **************************************************************/ class CurvePath extends Curve { constructor() { super(); this.type = 'CurvePath'; this.curves = []; this.autoClose = false; // Automatically closes the path } add( curve ) { this.curves.push( curve ); } closePath() { // Add a line curve if start and end of lines are not connected const startPoint = this.curves[ 0 ].getPoint( 0 ); const endPoint = this.curves[ this.curves.length - 1 ].getPoint( 1 ); if ( ! startPoint.equals( endPoint ) ) { this.curves.push( new Curves[ 'LineCurve' ]( endPoint, startPoint ) ); } } // To get accurate point with reference to // entire path distance at time t, // following has to be done: // 1. Length of each sub path have to be known // 2. Locate and identify type of curve // 3. Get t for the curve // 4. Return curve.getPointAt(t') getPoint( t, optionalTarget ) { const d = t * this.getLength(); const curveLengths = this.getCurveLengths(); let i = 0; // To think about boundaries points. while ( i < curveLengths.length ) { if ( curveLengths[ i ] >= d ) { const diff = curveLengths[ i ] - d; const curve = this.curves[ i ]; const segmentLength = curve.getLength(); const u = segmentLength === 0 ? 0 : 1 - diff / segmentLength; return curve.getPointAt( u, optionalTarget ); } i ++; } return null; // loop where sum != 0, sum > d , sum+1 <d } // We cannot use the default THREE.Curve getPoint() with getLength() because in // THREE.Curve, getLength() depends on getPoint() but in THREE.CurvePath // getPoint() depends on getLength getLength() { const lens = this.getCurveLengths(); return lens[ lens.length - 1 ]; } // cacheLengths must be recalculated. updateArcLengths() { this.needsUpdate = true; this.cacheLengths = null; this.getCurveLengths(); } // Compute lengths and cache them // We cannot overwrite getLengths() because UtoT mapping uses it. getCurveLengths() { // We use cache values if curves and cache array are same length if ( this.cacheLengths && this.cacheLengths.length === this.curves.length ) { return this.cacheLengths; } // Get length of sub-curve // Push sums into cached array const lengths = []; let sums = 0; for ( let i = 0, l = this.curves.length; i < l; i ++ ) { sums += this.curves[ i ].getLength(); lengths.push( sums ); } this.cacheLengths = lengths; return lengths; } getSpacedPoints( divisions = 40 ) { const points = []; for ( let i = 0; i <= divisions; i ++ ) { points.push( this.getPoint( i / divisions ) ); } if ( this.autoClose ) { points.push( points[ 0 ] ); } return points; } getPoints( divisions = 12 ) { const points = []; let last; for ( let i = 0, curves = this.curves; i < curves.length; i ++ ) { const curve = curves[ i ]; const resolution = ( curve && curve.isEllipseCurve ) ? divisions * 2 : ( curve && ( curve.isLineCurve || curve.isLineCurve3 ) ) ? 1 : ( curve && curve.isSplineCurve ) ? divisions * curve.points.length : divisions; const pts = curve.getPoints( resolution ); for ( let j = 0; j < pts.length; j ++ ) { const point = pts[ j ]; if ( last && last.equals( point ) ) continue; // ensures no consecutive points are duplicates points.push( point ); last = point; } } if ( this.autoClose && points.length > 1 && ! points[ points.length - 1 ].equals( points[ 0 ] ) ) { points.push( points[ 0 ] ); } return points; } copy( source ) { super.copy( source ); this.curves = []; for ( let i = 0, l = source.curves.length; i < l; i ++ ) { const curve = source.curves[ i ]; this.curves.push( curve.clone() ); } this.autoClose = source.autoClose; return this; } toJSON() { const data = super.toJSON(); data.autoClose = this.autoClose; data.curves = []; for ( let i = 0, l = this.curves.length; i < l; i ++ ) { const curve = this.curves[ i ]; data.curves.push( curve.toJSON() ); } return data; } fromJSON( json ) { super.fromJSON( json ); this.autoClose = json.autoClose; this.curves = []; for ( let i = 0, l = json.curves.length; i < l; i ++ ) { const curve = json.curves[ i ]; this.curves.push( new Curves[ curve.type ]().fromJSON( curve ) ); } return this; } } export { CurvePath };
angular.module('ngCordova.plugins.camera', []) .factory('$cordovaCamera', ['$q', function($q) { return { getPicture: function(options) { var q = $q.defer(); if(!navigator.camera) { q.resolve(null); return q.promise; } navigator.camera.getPicture(function(imageData) { q.resolve(imageData); }, function(err) { q.reject(err); }, options); return q.promise; }, cleanup: function(options) { var q = $q.defer(); navigator.camera.cleanup(function() { q.resolve(arguments); }, function(err) { q.reject(err); }); return q.promise; } } }]);
var sfw; function cartWizard(){ sfw = $(".wizard-validation").stepFormWizard({ height: "auto", theme: 'sky', rtl: $('body').hasClass('rtl') ? true : false, finishBtn: $('<input class="finish-btn sf-right sf-btn" type="submit" value="Confirm Payment"/>'), onNext: function(i, wizard) { return $('.wizard-validation', wizard).parsley().validate('block' + i); }, onFinish: function(i, wizard) { return $('.wizard-validation', wizard).parsley().validate(); } }); } $(document).ready(function() { setTimeout(function(){ cartWizard(); },100); $('.wizard-validation').on('click', '.sf-btn', function(){ setTimeout(function () { $(window).resize(); $(window).trigger('resize'); }, 0); }); /* Remove Elements */ $(".shopping-cart-table .icons-office-52").on('click', function(){ $(this).closest('tr').fadeOut(200, function(){ $(this).closest('tr').remove(); var total = 0; $('.item-total').each(function(){ total += +($(this).text()); }); $('.total p').text(total+'.00'); }); }); /* Update total on quantity change */ $(".shopping-cart-table .quantity").on('change', function(){ var quantity = $(this).val(); var itemPrice = $(this).closest('tr').find('.item-price').text(); var itemTotal = quantity * itemPrice; $(this).closest('tr').find('.item-total').text(itemTotal+'.00'); var total = 0; $('.item-total').each(function(){ total += +($(this).text()); }); $('.total p').text(total+'.00'); }); });
// I am going to use a system where a sequence object has two methods: // // * next(), which returns a boolean indicating whether there are more // elements in the sequence, and moves it forward to the next // element when there are. // // * current(), which returns the current element, and should only be // called after next() has returned true at least once. function logFive(sequence) { for (var i = 0; i < 5; i++) { if (!sequence.next()) break; console.log(sequence.current()); } } function ArraySeq(array) { this.pos = -1; this.array = array; } ArraySeq.prototype.next = function() { if (this.pos >= this.array.length - 1) return false; this.pos++; return true; }; ArraySeq.prototype.current = function() { return this.array[this.pos]; }; function RangeSeq(from, to) { this.pos = from - 1; this.to = to; } RangeSeq.prototype.next = function() { if (this.pos >= this.to) return false; this.pos++; return true; }; RangeSeq.prototype.current = function() { return this.pos; }; logFive(new ArraySeq([1, 2])); // → 1 // → 2 logFive(new RangeSeq(100, 1000)); // → 100 // → 101 // → 102 // → 103 // → 104 // This alternative approach represents the empty sequence as null, // and gives non-empty sequences two methods: // // * head() returns the element at the start of the sequence. // // * rest() returns the rest of the sequence, or null if there are no // elemements left. // // Because a JavaScript constructor can not return null, we add a make // function to constructors of this type of sequence, which constructs // a sequence, or returns null if the resulting sequence would be // empty. function logFive2(sequence) { for (var i = 0; i < 5 && sequence != null; i++) { console.log(sequence.head()); sequence = sequence.rest(); } } function ArraySeq2(array, offset) { this.array = array; this.offset = offset; } ArraySeq2.prototype.rest = function() { return ArraySeq2.make(this.array, this.offset + 1); }; ArraySeq2.prototype.head = function() { return this.array[this.offset]; }; ArraySeq2.make = function(array, offset) { if (offset == null) offset = 0; if (offset >= array.length) return null; else return new ArraySeq2(array, offset); }; function RangeSeq2(from, to) { this.from = from; this.to = to; } RangeSeq2.prototype.rest = function() { return RangeSeq2.make(this.from + 1, this.to); }; RangeSeq2.prototype.head = function() { return this.from; }; RangeSeq2.make = function(from, to) { if (from > to) return null; else return new RangeSeq2(from, to); }; logFive2(ArraySeq2.make([1, 2])); // → 1 // → 2 logFive2(RangeSeq2.make(100, 1000)); // → 100 // → 101 // → 102 // → 103 // → 104
/** * Given a string, attempts to generate the equivalent HTMLElement * * @param {string} string HTML string * @return {HTMLElement} Element object representing string */ export default function( string ) { let wrapper; if ( document.implementation && document.implementation.createHTMLDocument ) { wrapper = document.implementation.createHTMLDocument( '' ).body; } else if ( 'undefined' !== typeof DOMParser ) { try { return ( new DOMParser() ).parseFromString( string, 'text/html' ).body.firstChild; } catch ( e ) {} // eslint-disable-line no-empty } wrapper = wrapper || document.createElement( 'div' ); wrapper.innerHTML = string; return wrapper.firstChild; }
/*! * VisualEditor ContentEditable CenterNode class. * * @copyright 2011-2015 VisualEditor Team and others; see http://ve.mit-license.org */ /** * ContentEditable center node. * * @class * @extends ve.ce.BranchNode * @constructor * @param {ve.dm.CenterNode} model Model to observe * @param {Object} [config] Configuration options */ ve.ce.CenterNode = function VeCeCenterNode() { // Parent constructor ve.ce.CenterNode.super.apply( this, arguments ); }; /* Inheritance */ OO.inheritClass( ve.ce.CenterNode, ve.ce.BranchNode ); /* Static Properties */ ve.ce.CenterNode.static.name = 'center'; ve.ce.CenterNode.static.tagName = 'center'; /* Registration */ ve.ce.nodeFactory.register( ve.ce.CenterNode );
'use strict'; module.exports = function (grunt) { // Project Configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), qunit: { all: ['test/test.html'] }, uglify: { demo: { files: { 'demo/MonthPicker.min.js': 'src/MonthPicker.js' } } }, cssmin: { demo: { files: { 'demo/MonthPicker.min.css': 'src/MonthPicker.css' } } }, 'gh-pages': { options: { base: 'demo', add: true }, src: ['**'] } }); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-gh-pages'); grunt.registerTask('default', ['qunit', 'uglify', 'cssmin']); grunt.registerTask('test', ['qunit']); };
import { CONST_EXPR } from 'angular2/src/facade/lang'; import { Provider } from 'angular2/src/core/di'; import { Console } from 'angular2/src/core/console'; import { Reflector, reflector } from './reflection/reflection'; import { ReflectorReader } from './reflection/reflector_reader'; import { TestabilityRegistry } from 'angular2/src/core/testability/testability'; import { PLATFORM_CORE_PROVIDERS } from './application_ref'; function _reflector() { return reflector; } /** * A default set of providers which should be included in any Angular platform. */ export const PLATFORM_COMMON_PROVIDERS = CONST_EXPR([ PLATFORM_CORE_PROVIDERS, new Provider(Reflector, { useFactory: _reflector, deps: [] }), new Provider(ReflectorReader, { useExisting: Reflector }), TestabilityRegistry, Console ]);
lang['Open']='เปิด'; lang['Close'] = 'ปิด'; lang['Save'] = 'บันทึก'; lang['Save As'] = 'บันทึกเป็น';
/* * Globalize Culture fil * * http://github.com/jquery/globalize * * Copyright Software Freedom Conservancy, Inc. * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * This file was generated by the Globalize Culture Generator * Translation: bugs found in this file need to be fixed in the generator */ ample.locale.addCultureInfo("fil", "default", { name: "fil", englishName: "Filipino", nativeName: "Filipino", language: "fil", numberFormat: { currency: { symbol: "PhP" } }, calendars: { standard: { days: { names: ["Linggo","Lunes","Martes","Mierkoles","Huebes","Biernes","Sabado"], namesAbbr: ["Lin","Lun","Mar","Mier","Hueb","Bier","Saba"], namesShort: ["L","L","M","M","H","B","S"] }, months: { names: ["Enero","Pebrero","Marso","Abril","Mayo","Hunyo","Hulyo","Agosto","Septyembre","Oktubre","Nobyembre","Disyembre",""], namesAbbr: ["En","Peb","Mar","Abr","Mayo","Hun","Hul","Agos","Sept","Okt","Nob","Dis",""] }, eras: [{"name":"Anno Domini","start":null,"offset":0}] } } });
"use strict"; function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var Declaration = require('../declaration'); var GridStart = /*#__PURE__*/function (_Declaration) { _inheritsLoose(GridStart, _Declaration); var _super = _createSuper(GridStart); function GridStart() { return _Declaration.apply(this, arguments) || this; } var _proto = GridStart.prototype; /** * Do not add prefix for unsupported value in IE */ _proto.check = function check(decl) { var value = decl.value; return !value.includes('/') || value.includes('span'); } /** * Return a final spec property */ ; _proto.normalize = function normalize(prop) { return prop.replace('-start', ''); } /** * Change property name for IE */ ; _proto.prefixed = function prefixed(prop, prefix) { var result = _Declaration.prototype.prefixed.call(this, prop, prefix); if (prefix === '-ms-') { result = result.replace('-start', ''); } return result; }; return GridStart; }(Declaration); _defineProperty(GridStart, "names", ['grid-row-start', 'grid-column-start']); module.exports = GridStart;
/*! * WeX5 v3 (htttp://www.justep.com) * Copyright 2015 Justep, Inc. * Licensed under Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ define(function() { //main api object var wAPI = {}; wAPI.normalize = function(name, normalize) { return normalize(name); } wAPI.load = function(cssId, req, load, config) { load(); } return wAPI; });
/* * angular-markdown-directive v0.1.0 * (c) 2013 Brian Ford http://briantford.com * License: MIT */ 'use strict'; angular.module('btford.markdown', []). directive('btfMarkdown', function () { var converter = new Showdown.converter(); return { restrict: 'AE', link: function (scope, element, attrs) { if (attrs.btfMarkdown) { scope.$watch(attrs.btfMarkdown, function (newVal) { var html = converter.makeHtml(newVal); element.html(html); }); } else { var html = converter.makeHtml(element.text()); element.html(html); } } }; });
/** * @license * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ CLASS({ name: 'IDConfig', package: 'foam.navigator.dao', properties: [ { name: 'getModelName', defaultValue: function(id) { if ( id.id ) id = id.id; return id.split(':')[0]; } }, { name: 'getIDPart', defaultValue: function(id) { if ( id.id ) id = id.id; return id.split(':').slice(1).join(':'); } }, { name: 'decorateID', defaultValue: function(data, id) { return data.name + ':' + id; } }, { name: 'dedecorateID', defaultValue: function(id) { return this.getIDPart(id); } } ] });
define(function (require) { var _ = require('lodash'); var pluckDisabled = function (filter) { return _.get(filter, 'meta.disabled'); }; /** * Checks to see if only disabled filters have been changed * @returns {bool} Only disabled filters */ return function (newFilters, oldFilters) { return _.every(newFilters.concat(oldFilters), function (newFilter) { return pluckDisabled(newFilter); }); }; });
// Copyright 2015 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import {size} from './resourcecardcolumnsizer'; /** * Controller for the resource card component. See resource card list for documentation. * @final */ export class ResourceCardHeaderColumnsController { constructor() { /** * Initialized from require just before $onInit is called. * @export {!./resourcecardlist_component.ResourceCardListController} */ this.resourceCardListCtrl; /** * @private {!Array<!./resourcecardheadercolumn_component.ResourceCardHeaderColumnController>} */ this.columns_ = []; } /** * @export */ $onInit() { this.resourceCardListCtrl.setHeaderColumns(this); } /** * @param {!./resourcecardheadercolumn_component.ResourceCardHeaderColumnController} columnCtrl */ addAndSizeHeaderColumn(columnCtrl, columnElement) { size(columnElement, columnCtrl.size, columnCtrl.grow); this.columns_.push(columnCtrl); } /** * @param {!angular.JQLite} columnElement * @param {number} index */ sizeBodyColumn(columnElement, index) { if (this.columns_.length <= index) { throw new Error( 'Not enough header columns registered. ' + 'Try adding kd-resource-card-header-column to the list.'); } size(columnElement, this.columns_[index].size, this.columns_[index].grow); } } /** * Resource card header columns component. See resource card list for documentation. * @type {!angular.Component} */ export const resourceCardHeaderColumnsComponent = { templateUrl: 'common/components/resourcecard/resourcecardheadercolumns.html', transclude: true, require: { 'resourceCardListCtrl': '^kdResourceCardList', }, controller: ResourceCardHeaderColumnsController, };
/** * @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=ti-ER.js.map
/*================================================== * Exhibit.Database Spanish localization *================================================== */ if (!("l10n" in Exhibit.Database)) { Exhibit.Database.l10n = {}; } Exhibit.Database.l10n.itemType = { label: "Elemento", pluralLabel: "Elementos" }; Exhibit.Database.l10n.labelProperty = { label: "etiqueta", pluralLabel: "etiquetas", reverseLabel: "etiqueta de", reversePluralLabel: "etiquetas de" }; Exhibit.Database.l10n.typeProperty = { label: "tipo", pluralLabel: "tipos", reverseLabel: "tipo de", reversePluralLabel: "tipos de" }; Exhibit.Database.l10n.uriProperty = { label: "URI", pluralLabel: "URIs", reverseLabel: "URI de", reversePluralLabel: "URIs de" }; Exhibit.Database.l10n.sortLabels = { "text": { ascending: "a - z", descending: "z - a" }, "number": { ascending: "menor primero", descending: "mayor primero" }, "date": { ascending: "la más antigua primero", descending: "la más reciente primero" }, "boolean": { ascending: "falso primero", descending: "verdadero primero" }, "item": { ascending: "a - z", descending: "z - a" } };
require("../env"); var vows = require("vows"), assert = require("../env-assert"); var suite = vows.describe("d3.layout.partition"); suite.addBatch({ "partition": { topic: function() { return d3.layout.partition; }, "ignores zero values": function(partition) { var p = partition().size([3, 3]); assert.deepEqual(p.nodes({children: [{value: 1}, {value: 0}, {value: 2}, {children: [{value: 0}, {value: 0}]}]}).map(metadata), [ {x: 0, y: 0, dx: 3, dy: 1}, {x: 2, y: 1, dx: 1, dy: 1}, {x: 3, y: 1, dx: 0, dy: 1}, {x: 0, y: 1, dx: 2, dy: 1}, {x: 3, y: 1, dx: 0, dy: 1}, {x: 3, y: 2, dx: 0, dy: 1}, {x: 3, y: 2, dx: 0, dy: 1} ]); }, "can handle an empty children array": function(partition) { var p = partition(); assert.deepEqual(p.nodes({children: []}).map(metadata), [ {x: 0, y: 0, dx: 1, dy: 1} ]); assert.deepEqual(p.nodes({children: [{children: []}, {value: 1}]}).map(metadata), [ {x: 0, y: 0, dx: 1, dy: 0.5}, {x: 1, y: 0.5, dx: 0, dy: 0.5}, {x: 0, y: 0.5, dx: 1, dy: 0.5} ]); } } }); function metadata(node) { var metadata = {}; if ("x" in node) metadata.x = node.x; if ("y" in node) metadata.y = node.y; if ("dx" in node) metadata.dx = node.dx; if ("dy" in node) metadata.dy = node.dy; return metadata; } suite.export(module);
exports.BattleFormats = { pokemon: { effectType: 'Banlist', validateSet: function (set, format) { var template = this.getTemplate(set.species); var problems = []; if (set.species === set.name) delete set.name; if (template.gen > this.gen) { problems.push(set.species + ' does not exist in gen ' + this.gen + '.'); } else if (template.isNonstandard) { problems.push(set.species + ' is not a real Pokemon.'); } var hasHP = false; if (set.item) { var item = this.getItem(set.item); if (item.gen > this.gen) { problems.push(item.name + ' does not exist in gen ' + this.gen + '.'); } else if (item.isNonstandard) { problems.push(item.name + ' is not a real item.'); } } if (set.moves) { for (var i = 0; i < set.moves.length; i++) { var move = this.getMove(set.moves[i]); if (move.gen > this.gen) { problems.push(move.name + ' does not exist in gen ' + this.gen + '.'); } else if (move.isNonstandard) { problems.push(move.name + ' is not a real move.'); } if (move.id === 'hiddenpower') hasHP = true; } } if (set.moves && set.moves.length > 4) { problems.push((set.name || set.species) + ' has more than four moves.'); } // Automatically set ability to None set.ability = 'None'; // In gen 2, there's no advantage on having subpar EVs and you could max all of them set.evs = {hp: 255, atk: 255, def: 255, spa: 255, spd: 255, spe: 255}; // Check if there's Hidden Power if (hasHP) { // All IVs to 31 forces correct Hidden Power from Typecharts in the engine set.ivs = {hp: 31, atk: 31, def: 31, spa: 31, spd: 31, spe: 31}; // There's no good shiny Pokémon with good HPs set.shiny = false; } else { // IVs still maxed at 30 on Gen 2 if (!set.ivs) { set.ivs = {hp: 30, atk: 30, def: 30, spa: 30, spd: 30, spe: 30}; } else { for (var iv in set.ivs) { // Since Gen 2 has 0-15 DVs that increase 2 points, we only want pair numbers if (set.ivs[iv] % 2 !== 0) set.ivs[iv]--; // This shouldn't even be possible if (set.ivs[iv] > 30) set.ivs[iv] = 30; } // Special is one IV, we use spa for spa and spd. set.ivs.spd = set.ivs.spa; } // Calculate all the IV oddness on gen 2. // Don't run shinies, they fuck your IVs if (set.shiny) { set.ivs.def = 20; set.ivs.spe = 20; set.ivs.spa = 20; set.ivs.spd = 20; // Attack can vary, so let's check it if (!(set.ivs.atk in {4:1, 6:1, 12:1, 14:1, 20:1, 22:1, 28:1, 30:1})) { set.ivs.atk = 30; } } // Deal with female IVs. if (!template.gender) { set.gender = 'M'; // 0001 (1 DV = 2 IV) Gender value 1:7 if (template.genderRatio && template.genderRatio.F === 0.125 && set.ivs.atk < 3) { set.gender = 'F'; } // 0010 (2 DV = 4 IV) Gender value 1:3 if (template.genderRatio && template.genderRatio.F === 0.25 && set.ivs.atk < 5) { set.gender = 'F'; } // 0011 (3 DV = 6 IV) Gender value 1:1 if (!template.genderRatio && set.ivs.atk < 7) { set.gender = 'F'; } // 0100 (4 DV = 8 IV) Gender value 3:1 if (template.genderRatio && template.genderRatio.F === 0.75 && set.ivs.atk < 9) { set.gender = 'F'; } } // The HP IV is calculated with the last bit of every value. Do this last. set.ivs.hp = (((set.ivs.atk / 2) % 2 * 8) + ((set.ivs.def / 2) % 2 * 4) + ((set.ivs.spe / 2) % 2 * 2) + ((set.ivs.spa / 2) % 2 * 1)) * 2; } // They all also get a useless nature, since that didn't exist set.nature = 'Serious'; return problems; } }, standard: { effectType: 'Banlist', ruleset: ['Sleep Clause Mod', 'Species Clause', 'OHKO Clause', 'Evasion Moves Clause'], banlist: ['Unreleased', 'Illegal'], validateSet: function (set) { // limit one of each move in Standard var moves = []; if (set.moves) { var hasMove = {}; for (var i = 0; i < set.moves.length; i++) { var move = this.getMove(set.moves[i]); var moveid = move.id; if (hasMove[moveid]) continue; hasMove[moveid] = true; moves.push(set.moves[i]); } } set.moves = moves; } } };
/* Template Name: Color Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.3.2 Version: 1.6.0 Author: Sean Ngu Website: http://www.seantheme.com/color-admin-v1.6/admin/ */var handleDataTableScroller=function(){"use strict";if($("#data-table").length!==0){$("#data-table").DataTable({ajax:"assets/plugins/DataTables/json/scroller-demo.json",deferRender:true,dom:"frtiS",scrollY:320,scrollCollapse:true})}};var TableManageScroller=function(){"use strict";return{init:function(){handleDataTableScroller()}}}()
import { assign, getOwner } from 'ember-utils'; import { get } from 'ember-metal'; import { Error as EmberError } from 'ember-debug'; const ALL_PERIODS_REGEX = /\./g; export function routeArgs(targetRouteName, models, queryParams) { let args = []; if (typeof targetRouteName === 'string') { args.push(`${targetRouteName}`); } args.push(...models); args.push({ queryParams }); return args; } export function getActiveTargetName(router) { let handlerInfos = router.activeTransition ? router.activeTransition.state.handlerInfos : router.state.handlerInfos; return handlerInfos[handlerInfos.length - 1].name; } export function stashParamNames(router, handlerInfos) { if (handlerInfos._namesStashed) { return; } // This helper exists because router.js/route-recognizer.js awkwardly // keeps separate a handlerInfo's list of parameter names depending // on whether a URL transition or named transition is happening. // Hopefully we can remove this in the future. let targetRouteName = handlerInfos[handlerInfos.length - 1].name; let recogHandlers = router._routerMicrolib.recognizer.handlersFor(targetRouteName); let dynamicParent = null; for (let i = 0; i < handlerInfos.length; ++i) { let handlerInfo = handlerInfos[i]; let names = recogHandlers[i].names; if (names.length) { dynamicParent = handlerInfo; } handlerInfo._names = names; let route = handlerInfo.handler; route._stashNames(handlerInfo, dynamicParent); } handlerInfos._namesStashed = true; } function _calculateCacheValuePrefix(prefix, part) { // calculates the dot separated sections from prefix that are also // at the start of part - which gives us the route name // given : prefix = site.article.comments, part = site.article.id // - returns: site.article (use get(values[site.article], 'id') to get the dynamic part - used below) // given : prefix = site.article, part = site.article.id // - returns: site.article. (use get(values[site.article], 'id') to get the dynamic part - used below) let prefixParts = prefix.split('.'); let currPrefix = ''; for (let i = 0; i < prefixParts.length; i++) { let currPart = prefixParts.slice(0, i + 1).join('.'); if (part.indexOf(currPart) !== 0) { break; } currPrefix = currPart; } return currPrefix; } /* Stolen from Controller */ export function calculateCacheKey(prefix, parts = [], values) { let suffixes = ''; for (let i = 0; i < parts.length; ++i) { let part = parts[i]; let cacheValuePrefix = _calculateCacheValuePrefix(prefix, part); let value; if (values) { if (cacheValuePrefix && cacheValuePrefix in values) { let partRemovedPrefix = (part.indexOf(cacheValuePrefix) === 0) ? part.substr(cacheValuePrefix.length + 1) : part; value = get(values[cacheValuePrefix], partRemovedPrefix); } else { value = get(values, part); } } suffixes += `::${part}:${value}`; } return prefix + suffixes.replace(ALL_PERIODS_REGEX, '-'); } /* Controller-defined query parameters can come in three shapes: Array queryParams: ['foo', 'bar'] Array of simple objects where value is an alias queryParams: [ { 'foo': 'rename_foo_to_this' }, { 'bar': 'call_bar_this_instead' } ] Array of fully defined objects queryParams: [ { 'foo': { as: 'rename_foo_to_this' }, } { 'bar': { as: 'call_bar_this_instead', scope: 'controller' } } ] This helper normalizes all three possible styles into the 'Array of fully defined objects' style. */ export function normalizeControllerQueryParams(queryParams) { let qpMap = {}; for (let i = 0; i < queryParams.length; ++i) { accumulateQueryParamDescriptors(queryParams[i], qpMap); } return qpMap; } function accumulateQueryParamDescriptors(_desc, accum) { let desc = _desc; let tmp; if (typeof desc === 'string') { tmp = {}; tmp[desc] = { as: null }; desc = tmp; } for (let key in desc) { if (!desc.hasOwnProperty(key)) { return; } let singleDesc = desc[key]; if (typeof singleDesc === 'string') { singleDesc = { as: singleDesc }; } tmp = accum[key] || { as: null, scope: 'model' }; assign(tmp, singleDesc); accum[key] = tmp; } } /* Check if a routeName resembles a url instead @private */ function resemblesURL(str) { return typeof str === 'string' && (str === '' || str.charAt(0) === '/'); } /* Returns an arguments array where the route name arg is prefixed based on the mount point @private */ export function prefixRouteNameArg(route, args) { let routeName = args[0]; let owner = getOwner(route); let prefix = owner.mountPoint; // only alter the routeName if it's actually referencing a route. if (owner.routable && typeof routeName === 'string') { if (resemblesURL(routeName)) { throw new EmberError('Programmatic transitions by URL cannot be used within an Engine. Please use the route name instead.'); } else { routeName = `${prefix}.${routeName}`; args[0] = routeName; } } return args; }
/* */ "format cjs"; "use strict"; exports.__esModule = true; exports.Parser = Parser; var _identifier = require("./identifier"); var _tokentype = require("./tokentype"); function Parser(options, input, startPos) { this.options = options; this.loadPlugins(this.options.plugins); this.sourceFile = this.options.sourceFile || null; this.isKeyword = _identifier.keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; this.isReservedWord = _identifier.reservedWords[this.options.ecmaVersion]; this.input = input; // 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(_tokentype.lineBreak).length; } else { this.pos = this.lineStart = 0; this.curLine = 1; } // Properties of the current token: // Its type this.type = _tokentype.types.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 = null; // 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 = []; this.decorators = []; // If enabled, skip leading hashbang line. if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); } Parser.prototype.extend = function (name, f) { this[name] = f(this[name]); }; // Registered plugins var plugins = {}; exports.plugins = plugins; Parser.prototype.loadPlugins = function (plugins) { for (var _name in plugins) { var plugin = exports.plugins[_name]; if (!plugin) throw new Error("Plugin '" + _name + "' not found"); plugin(this, plugins[_name]); } };
"use strict"; module.exports = Service; // extends Namespace var Namespace = require("./namespace"); ((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = "Service"; var Method = require("./method"), util = require("./util"), rpc = require("./rpc"); /** * Constructs a new service instance. * @classdesc Reflected service. * @extends NamespaceBase * @constructor * @param {string} name Service name * @param {Object.<string,*>} [options] Service options * @throws {TypeError} If arguments are invalid */ function Service(name, options) { Namespace.call(this, name, options); /** * Service methods. * @type {Object.<string,Method>} */ this.methods = {}; // toJSON, marker /** * Cached methods as an array. * @type {Method[]|null} * @private */ this._methodsArray = null; } /** * Service descriptor. * @interface IService * @extends INamespace * @property {Object.<string,IMethod>} methods Method descriptors */ /** * Constructs a service from a service descriptor. * @param {string} name Service name * @param {IService} json Service descriptor * @returns {Service} Created service * @throws {TypeError} If arguments are invalid */ Service.fromJSON = function fromJSON(name, json) { var service = new Service(name, json.options); /* istanbul ignore else */ if (json.methods) for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i) service.add(Method.fromJSON(names[i], json.methods[names[i]])); if (json.nested) service.addJSON(json.nested); service.comment = json.comment; return service; }; /** * Converts this service to a service descriptor. * @param {IToJSONOptions} [toJSONOptions] JSON conversion options * @returns {IService} Service descriptor */ Service.prototype.toJSON = function toJSON(toJSONOptions) { var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; return util.toObject([ "options" , inherited && inherited.options || undefined, "methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {}, "nested" , inherited && inherited.nested || undefined, "comment" , keepComments ? this.comment : undefined ]); }; /** * Methods of this service as an array for iteration. * @name Service#methodsArray * @type {Method[]} * @readonly */ Object.defineProperty(Service.prototype, "methodsArray", { get: function() { return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); } }); function clearCache(service) { service._methodsArray = null; return service; } /** * @override */ Service.prototype.get = function get(name) { return this.methods[name] || Namespace.prototype.get.call(this, name); }; /** * @override */ Service.prototype.resolveAll = function resolveAll() { var methods = this.methodsArray; for (var i = 0; i < methods.length; ++i) methods[i].resolve(); return Namespace.prototype.resolve.call(this); }; /** * @override */ Service.prototype.add = function add(object) { /* istanbul ignore if */ if (this.get(object.name)) throw Error("duplicate name '" + object.name + "' in " + this); if (object instanceof Method) { this.methods[object.name] = object; object.parent = this; return clearCache(this); } return Namespace.prototype.add.call(this, object); }; /** * @override */ Service.prototype.remove = function remove(object) { if (object instanceof Method) { /* istanbul ignore if */ if (this.methods[object.name] !== object) throw Error(object + " is not a member of " + this); delete this.methods[object.name]; object.parent = null; return clearCache(this); } return Namespace.prototype.remove.call(this, object); }; /** * Creates a runtime service using the specified rpc implementation. * @param {RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed. */ Service.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) { var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited); for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) { var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, ""); rpcService[methodName] = util.codegen(["r","c"], util.isReserved(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({ m: method, q: method.resolvedRequestType.ctor, s: method.resolvedResponseType.ctor }); } return rpcService; };
jQuery(document).ready(function() { /* Fullscreen background */ $.backstretch("assets/img/backgrounds/1.jpg"); $('#top-navbar-1').on('shown.bs.collapse', function(){ $.backstretch("resize"); }); $('#top-navbar-1').on('hidden.bs.collapse', function(){ $.backstretch("resize"); }); /* Form */ $('.registration-form fieldset:first-child').fadeIn('slow'); $('.registration-form input[type="text"], .registration-form input[type="password"], .registration-form textarea').on('focus', function() { $(this).removeClass('input-error'); }); // next step $('.registration-form .btn-next').on('click', function() { var parent_fieldset = $(this).parents('fieldset'); var next_step = true; parent_fieldset.find('input[type="text"], input[type="password"], textarea').each(function() { if( $(this).val() == "" ) { $(this).addClass('input-error'); next_step = false; } else { $(this).removeClass('input-error'); } }); if( next_step ) { parent_fieldset.fadeOut(400, function() { $(this).next().fadeIn(); }); } }); // previous step $('.registration-form .btn-previous').on('click', function() { $(this).parents('fieldset').fadeOut(400, function() { $(this).prev().fadeIn(); }); }); // submit $('.registration-form').on('submit', function(e) { $(this).find('input[type="text"], input[type="password"], textarea').each(function() { if( $(this).val() == "" ) { e.preventDefault(); $(this).addClass('input-error'); } else { $(this).removeClass('input-error'); } }); }); });
/* jshint node: true */ 'use strict'; var Writer = require('broccoli-writer'); var walkSync = require('walk-sync'); var path = require('path'); var css = require('css'); var fs = require('fs'); var HAS_SELF_SELECTOR = /&|:--component/; var guid = function fn(n) { return n ? (n ^ Math.random() * 16 >> n/4).toString(16) : ('10000000'.replace(/[018]/g, fn)); }; // Define different processors based on file extension var processors = { css: function(fileContents, podGuid) { var parsedCss = css.parse(fileContents); var transformedParsedCSS = transformCSS(podGuid, parsedCss); return css.stringify(transformedParsedCSS); }, styl: indentStyles, sass: indentStyles, scss: wrapStyles, less: wrapStyles }; function indentStyles(fileContents, podGuid) { fileContents = fileContents.replace(/:--component/g, '&'); fileContents = '.' + podGuid + '\n' + fileContents; // Indent styles for scoping and make sure it ends with a // newline that is not indented return fileContents.replace(/\n/g, '\n ') + '\n'; } function wrapStyles(fileContents, podGuid) { // Replace instances of :--component with '&' fileContents = fileContents.replace(/:--component/g, '&'); // Wrap the styles inside the generated class return '.' + podGuid + '{' + fileContents + '}'; } function transformCSS(podGuid, parsedCss) { var rules = parsedCss.stylesheet.rules; rules.forEach(function(rule) { rule.selectors = rule.selectors.map(function(selector) { var selfSelectorMatch = HAS_SELF_SELECTOR.exec(selector); if (selfSelectorMatch) { return selector.replace(selfSelectorMatch[0], '.' + podGuid); } else { return '.' + podGuid + ' ' + selector; } }); }); return parsedCss; } function BrocComponentCssPreprocessor(inputTree, options) { this.inputTree = inputTree; this.options = options; this.guidCache = {}; } BrocComponentCssPreprocessor.prototype = Object.create(Writer.prototype); BrocComponentCssPreprocessor.prototype.constructor = BrocComponentCssPreprocessor; BrocComponentCssPreprocessor.prototype.write = function (readTree, destDir) { var pod = this.options.pod; var guidCache = this.guidCache; return readTree(this.inputTree).then(function(srcDir) { var paths = walkSync(srcDir); var buffer = []; var filepath; for (var i = 0, l = paths.length; i < l; i++) { filepath = paths[i]; // Check that it's not a directory if (filepath[filepath.length-1] !== '/') { if (!pod.extension || pod.extension === 'css') { pod.extension = filepath.substr(filepath.lastIndexOf('.') + 1); } var podPath = filepath.split('/').slice(0, -1); // Handle pod-formatted components that are in the 'components' directory if (podPath[0] === 'components') { podPath.shift(); } // Get cached podGuid or create a new one var podClassName = podPath.join('--'); var podGuid; if (podClassName in guidCache) { podGuid = guidCache[podClassName]; } else { podGuid = guidCache[podClassName] = podClassName + '-' + guid(); } var fileContents = fs.readFileSync(path.join(srcDir, filepath)).toString(); buffer.push(processors[pod.extension](fileContents, podGuid)); pod.lookup[podPath.join('/')] = podGuid; } } pod.styles = buffer.join(''); fs.writeFileSync(path.join(destDir, 'pod-styles.' + pod.extension), pod.styles); }); }; module.exports = BrocComponentCssPreprocessor;
var run = require('tape') var escape = require('escape-string-regexp') var concat = require('../') run('it combines string and regexp objects', function(test) { var expected = /([a-z0-9]{12,16})[f-x]{2}/ var result = concat( /([a-z0-9]{12,16})/, '[f-x]{2}' ) test.equal( result.toString(), expected.toString(), expected.toString() ) test.end() }) run('it adds modifiers', function(test) { var examples = [ { input: concat('^', /[a-z]{2}$/, 'i'), output: /^[a-z]{2}$/i }, { input: concat(/^[a-z]{2}/, /$/i), output: /^[a-z]{2}$/i }, { input: concat(escape('example.com')), output: /example\.com/ }, { input: concat(escape('example.org')), output: /example\.org/ }, { input: concat(/a/i, 'g'), output: /a/ig } ] examples.forEach(function(example) { test.equal( example.input.toString(), example.output.toString(), example.output.toString() ) }) test.end() }) run('it doesn’t treat forward slashes in strings as pattern boundaries', function(test) { test.deepEqual( concat('', '/a/').source, '/a/', '/a/' ) test.notOk( concat('', '/a/i').test('/A/'), 'and it avoids false-positive modifiers' ) test.ok( concat('', '/a/', 'i').test('/A/'), 'and it avoids false-positive modifiers' ) test.end() })
import * as React from 'react'; import createSvgIcon from '../../utils/createSvgIcon'; /** * @ignore - internal component. */ import { jsx as _jsx } from "react/jsx-runtime"; export default createSvgIcon( /*#__PURE__*/_jsx("path", { d: "M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z" }), 'CheckCircle');
import { isPresent, isBlank } from 'angular2/src/core/facade/lang'; import { WrappedException } from 'angular2/src/core/facade/exceptions'; import { isListLikeIterable } from 'angular2/src/core/facade/collection'; class _ArrayLogger { constructor() { this.res = []; } log(s) { this.res.push(s); } logError(s) { this.res.push(s); } logGroup(s) { this.res.push(s); } logGroupEnd() { } ; } /** * Provides a hook for centralized exception handling. * * The default implementation of `ExceptionHandler` prints error messages to the `Console`. To * intercept error handling, * write a custom exception handler that replaces this default as appropriate for your app. * * # Example * * ```javascript * * class MyExceptionHandler implements ExceptionHandler { * call(error, stackTrace = null, reason = null) { * // do something with the exception * } * } * * bootstrap(MyApp, [provide(ExceptionHandler, {useClass: MyExceptionHandler})]) * * ``` */ export class ExceptionHandler { constructor(_logger, _rethrowException = true) { this._logger = _logger; this._rethrowException = _rethrowException; } static exceptionToString(exception, stackTrace = null, reason = null) { var l = new _ArrayLogger(); var e = new ExceptionHandler(l, false); e.call(exception, stackTrace, reason); return l.res.join("\n"); } call(exception, stackTrace = null, reason = null) { var originalException = this._findOriginalException(exception); var originalStack = this._findOriginalStack(exception); var context = this._findContext(exception); this._logger.logGroup(`EXCEPTION: ${this._extractMessage(exception)}`); if (isPresent(stackTrace) && isBlank(originalStack)) { this._logger.logError("STACKTRACE:"); this._logger.logError(this._longStackTrace(stackTrace)); } if (isPresent(reason)) { this._logger.logError(`REASON: ${reason}`); } if (isPresent(originalException)) { this._logger.logError(`ORIGINAL EXCEPTION: ${this._extractMessage(originalException)}`); } if (isPresent(originalStack)) { this._logger.logError("ORIGINAL STACKTRACE:"); this._logger.logError(this._longStackTrace(originalStack)); } if (isPresent(context)) { this._logger.logError("ERROR CONTEXT:"); this._logger.logError(context); } this._logger.logGroupEnd(); // We rethrow exceptions, so operations like 'bootstrap' will result in an error // when an exception happens. If we do not rethrow, bootstrap will always succeed. if (this._rethrowException) throw exception; } /** @internal */ _extractMessage(exception) { return exception instanceof WrappedException ? exception.wrapperMessage : exception.toString(); } /** @internal */ _longStackTrace(stackTrace) { return isListLikeIterable(stackTrace) ? stackTrace.join("\n\n-----async gap-----\n") : stackTrace.toString(); } /** @internal */ _findContext(exception) { try { if (!(exception instanceof WrappedException)) return null; return isPresent(exception.context) ? exception.context : this._findContext(exception.originalException); } catch (e) { // exception.context can throw an exception. if it happens, we ignore the context. return null; } } /** @internal */ _findOriginalException(exception) { if (!(exception instanceof WrappedException)) return null; var e = exception.originalException; while (e instanceof WrappedException && isPresent(e.originalException)) { e = e.originalException; } return e; } /** @internal */ _findOriginalStack(exception) { if (!(exception instanceof WrappedException)) return null; var e = exception; var stack = exception.originalStack; while (e instanceof WrappedException && isPresent(e.originalException)) { e = e.originalException; if (e instanceof WrappedException && isPresent(e.originalException)) { stack = e.originalStack; } } return stack; } } //# sourceMappingURL=exception_handler.js.map
var config = require('lib/config') var client = {} config.client.forEach(function (key) { if (!config.hasOwnProperty(key)) { throw new Error('Config key "' + key + '" non existent.') } client[key] = config[key] }) if (client.hasOwnProperty('jwtSecret')) { throw new Error('"jwtSecret" config key should never be sended to the client.') } module.exports = client
var searchData= [ ['scroll_5fdirection',['SCROLL_DIRECTION',['../_m_d___parola___h_scroll_8cpp.html#ac57ad019d72404c773895c527fd12c77',1,'MD_Parola_HScroll.cpp']]], ['sfx',['SFX',['../_m_d___parola_8cpp.html#ad54e2a00e5f8efd51a0acb7f1d239dd7',1,'MD_Parola.cpp']]], ['start_5fposition',['START_POSITION',['../_m_d___parola___h_scroll_8cpp.html#a3a8e077835d0dfe86f6c1197738357c9',1,'MD_Parola_HScroll.cpp']]] ];
var files = require("./files"); var child = require("child_process"); var q = require("q"); function exec(cmd, quiet, args, env, callback) { var output = q.defer(); var c = child.spawn(cmd, args, { stdio: [process.stdin, quiet ? "pipe" : process.stdout, process.stderr], env: env }).on("exit", function(code) { if (code > 0) { if (quiet) { output.promise.then(function(buf) { process.stderr.write(buf.toString("utf-8")); callback(new Error("Subcommand terminated with error code " + code), code); }); } else { callback(new Error("Subcommand terminated with error code " + code), code); } } else { if (quiet) { output.promise.then(function(r) { callback(null, r.toString("utf-8")); }); } else { callback(null); } } }).on("error", function(err) { if (err.code === "ENOENT") { // On Windows: if executable wasn't found, try adding .cmd if (process.platform == "win32") { if (!cmd.match(/\.cmd$/i)) { exec(cmd + ".cmd", quiet, args, env, callback) } else { var bareCmd = cmd.substr(0, cmd.length - 4) callback(new Error("`" + bareCmd + "` executable not found. (nor `" + cmd + "`)")); } } else { callback(new Error("`" + cmd + "` executable not found.")); } } }); if (quiet) { c.stdout.pipe(require("concat-stream")(function(data) { output.resolve(data); })); } } module.exports.psc = function(deps, ffi, args, env, callback) { var allArgs = args.concat(deps).concat([].concat.apply([], ffi.map(function(path) { return ["--ffi", path]; }))); exec("psc", true, allArgs, env, callback); }; module.exports.pscBundle = function(dir, args, env, callback) { files.resolve(dir, function(err, deps) { if (err) { callback(err); } else { var allArgs = args.concat(deps); exec("psc-bundle", true, allArgs, env, callback); } }); }; module.exports.exec = exec;
//// [emitCodeBeforeSuperCall.ts] // TODO: With false, master is correct for `Test` but incorrect for `Sub`. // `Test` is correct because classic emit doesn't emit for definition and `Test` // doesn't need to emit any code for initialisation because it's already // part of the user code class Base { } class Sub extends Base { // @ts-ignore constructor(public p: number) { console.log('hi'); super(); } field = 0; } class Test extends Base { prop: number; // @ts-ignore constructor(public p: number) { 1; // Any statements here break it super(); this.prop = 1; } } //// [emitCodeBeforeSuperCall.js] // TODO: With false, master is correct for `Test` but incorrect for `Sub`. // `Test` is correct because classic emit doesn't emit for definition and `Test` // doesn't need to emit any code for initialisation because it's already // part of the user code class Base { } class Sub extends Base { // @ts-ignore constructor(p) { console.log('hi'); super(); this.p = p; this.field = 0; } } class Test extends Base { // @ts-ignore constructor(p) { 1; // Any statements here break it super(); this.p = p; this.prop = 1; } }
/** * @author mr.doob / http://mrdoob.com/ * based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Plane.as */ var Plane = function ( width, height, segments_width, segments_height ) { THREE.Geometry.call( this ); var ix, iy, width_half = width / 2, height_half = height / 2, gridX = segments_width || 1, gridY = segments_height || 1, gridX1 = gridX + 1, gridY1 = gridY + 1, segment_width = width / gridX, segment_height = height / gridY; for( iy = 0; iy < gridY1; iy++ ) { for( ix = 0; ix < gridX1; ix++ ) { var x = ix * segment_width - width_half; var y = iy * segment_height - height_half; this.vertices.push( new THREE.Vertex( new THREE.Vector3( x, - y, 0 ) ) ); } } for( iy = 0; iy < gridY; iy++ ) { for( ix = 0; ix < gridX; ix++ ) { var a = ix + gridX1 * iy; var b = ix + gridX1 * ( iy + 1 ); var c = ( ix + 1 ) + gridX1 * ( iy + 1 ); var d = ( ix + 1 ) + gridX1 * iy; this.faces.push( new THREE.Face4( a, b, c, d ) ); this.uvs.push( [ new THREE.UV( ix / gridX, iy / gridY ), new THREE.UV( ix / gridX, ( iy + 1 ) / gridY ), new THREE.UV( ( ix + 1 ) / gridX, ( iy + 1 ) / gridY ), new THREE.UV( ( ix + 1 ) / gridX, iy / gridY ) ] ); } } this.computeCentroids(); this.computeNormals(); } Plane.prototype = new THREE.Geometry(); Plane.prototype.constructor = Plane;
/* * Copyright (c) 2012-2015 S-Core Co., Ltd. * * 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. */ 'use strict'; var fsMgr = require('./lib/fs-manager'); fsMgr.doAddNewFS(100000, 'xkADkKcOW', function (err, fsinfo) { if (err || !fsinfo) { console.log('Creating webida FS for template engine failed.'); process.exit(1); } else { fsMgr.doAddNewFS(100000, 'gJmDsuhUN', function (err, fsinfo) { if (err || !fsinfo) { console.log('Creating webida FS for wikidia failed.'); process.exit(1); } else { console.log('FS server is initialized successfully'); process.exit(); } }); } });
define([ './getAccessorByteStride', './getComponentReader', './numberOfComponentsForType', '../../Core/arrayFill', '../../Core/ComponentDatatype', '../../Core/defined' ], function( getAccessorByteStride, getComponentReader, numberOfComponentsForType, arrayFill, ComponentDatatype, defined) { 'use strict'; /** * Finds the min and max values of the accessor. * * @param {Object} gltf A javascript object containing a glTF asset. * @param {Object} accessor The accessor object from the glTF asset to read. * @returns {{min: Array, max: Array}} min holding the array of minimum values and max holding the array of maximum values. * * @private */ function findAccessorMinMax(gltf, accessor) { var bufferViews = gltf.bufferViews; var buffers = gltf.buffers; var bufferViewId = accessor.bufferView; var numberOfComponents = numberOfComponentsForType(accessor.type); // According to the spec, when bufferView is not defined, accessor must be initialized with zeros if (!defined(accessor.bufferView)) { return { min: arrayFill(new Array(numberOfComponents), 0.0), max: arrayFill(new Array(numberOfComponents), 0.0) }; } var min = arrayFill(new Array(numberOfComponents), Number.POSITIVE_INFINITY); var max = arrayFill(new Array(numberOfComponents), Number.NEGATIVE_INFINITY); var bufferView = bufferViews[bufferViewId]; var bufferId = bufferView.buffer; var buffer = buffers[bufferId]; var source = buffer.extras._pipeline.source; var count = accessor.count; var byteStride = getAccessorByteStride(gltf, accessor); var byteOffset = accessor.byteOffset + bufferView.byteOffset + source.byteOffset; var componentType = accessor.componentType; var componentTypeByteLength = ComponentDatatype.getSizeInBytes(componentType); var dataView = new DataView(source.buffer); var components = new Array(numberOfComponents); var componentReader = getComponentReader(componentType); for (var i = 0; i < count; i++) { componentReader(dataView, byteOffset, numberOfComponents, componentTypeByteLength, components); for (var j = 0; j < numberOfComponents; j++) { var value = components[j]; min[j] = Math.min(min[j], value); max[j] = Math.max(max[j], value); } byteOffset += byteStride; } return { min: min, max: max }; } return findAccessorMinMax; });
// Copyright JS Foundation and other contributors, http://js.foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. function dummy () { "D" + "a"; } var p1Handler = { getOwnPropertyDescriptor: dummy }; var p1 = new Proxy({}, p1Handler); function dummyString () { return "a"; } var p2Handler = { deleteProperty: dummyString }; var p2 = new Proxy(p1, p2Handler); var result = (delete p2[1]); assert (result);
import { moduleForModel, test } from 'ember-qunit'; moduleForModel('preprint-provider', 'Unit | Serializer | preprint provider', { needs: [ 'serializer:preprint-provider', 'model:taxonomy', 'model:preprint', 'model:license' ] }); // Replace this with your real tests. test('it serializes records', function(assert) { let record = this.subject(); let serializedRecord = record.serialize(); assert.ok(serializedRecord); });
'use strict'; /** * Module dependencies. */ var cluster = require('cluster'); var os = require('os'); /** * Cluster setup. */ // Setup the cluster to use app.js cluster.setupMaster({ exec: 'app.js' }); // Listen for dying workers cluster.on('exit', function(worker) { console.log('Worker ' + worker.id + ' died'); // Replace the dead worker cluster.fork(); }); // Fork a worker for each available CPU for (var i = 0; i < os.cpus().length; i++) { cluster.fork(); }
version https://git-lfs.github.com/spec/v1 oid sha256:57a75a80bc1e33a91d27e00fed511d43d8cf5ce358746579d8b79ee93e35d984 size 6315
var express = require('express'); var bodyParser = require('body-parser'); var path = require('path'); var conf = require('./config/config')(); var log = require('./lib/log')(conf); var kue = require('kue'); // TODO: move this? this is needed for the server to be able to track bundles process.env.FREIGHT_PASSWORD = conf.get('password'); var index = require('./routes/index')(log, conf); var bundleDelete = require('./routes/bundle_delete')(log, conf); var bundleDownload = require('./routes/bundle_download')(log, conf); var freightRoutes = require('./routes/freight')(log, conf); var freightAuth = require('./lib/auth')(log, conf); var app = express(); app.conf = conf; app.log = log; app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); var bodyParserOptions = { limit: conf.get('limit') + 'kb' }; app.use(bodyParser.json(bodyParserOptions)); app.use(bodyParser.urlencoded(bodyParserOptions)); app.post('/freight/check', freightRoutes.check); app.post('/freight/download', freightRoutes.download); app.post('/freight/track', freightRoutes.track); app.use('/static', express.static(path.join(__dirname, 'static'))); app.get('/storage/*', freightAuth.middleware, bundleDownload); app.get('/', freightAuth.middleware, index); // TODO: temporary, quick way to add delete app.get('/ui/delete/:file', freightAuth.middleware, bundleDelete); app.use(freightAuth.middleware); app.use('/freights', kue.app); /// catch 404 and forward to error handler app.use(function (req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); }); if (app.get('env') === 'development') { app.use(function (err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: err }); }); } app.use(function (err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: {} }); }); module.exports = app;
/** * Helper function that finds the href of the fiven selector and updates the location. * * @param {String} selector */ export default (selector) => { const link = document.querySelector(selector).getAttribute('href'); if (link) { window.location = link; } };
/* * /MathJax/jax/element/mml/optable/GeneralPunctuation.js * * Copyright (c) 2012 Design Science, Inc. * * Part of the MathJax library. * See http://www.mathjax.org for details. * * Licensed under the Apache License, Version 2.0; * you may not use this file except in compliance with the License. * * http://www.apache.org/licenses/LICENSE-2.0 */ (function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2016":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2018":[0,0,b.OPEN,{fence:true}],"\u201C":[0,0,b.OPEN,{fence:true}]},postfix:{"\u2016":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2019":[0,0,b.CLOSE,{fence:true}],"\u201D":[0,0,b.CLOSE,{fence:true}]}}});MathJax.Ajax.loadComplete(a.optableDir+"/GeneralPunctuation.js")})(MathJax.ElementJax.mml);
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'iframe', 'mn', { border: 'Show frame border', // MISSING noUrl: 'Please type the iframe URL', // MISSING scrolling: 'Enable scrollbars', // MISSING title: 'IFrame Properties', // MISSING toolbar: 'IFrame' // MISSING });
var pipeworks = require('../pipeworks'); var numberPipe = pipeworks() .fit(function(env, next) { console.log('zero:', env.zero); env.one = '1'; next(env); }) .fit(function(env, next) { console.log('one:', env.one); env.two = '2'; hijacker.siphon(env, next); }) .fit(function(env, next) { console.log('two:', env.two); env.a = 'a'; next(env); }) var letterPipe = pipeworks() .fit(function(env, next) { console.log('a:', env.a); env.b = 'b'; next(env); }) .fit(function(env, next) { console.log('b:', env.b); env.c = 'c'; next(env); }) .fit(function(env, next) { console.log('c:', env.c); next(env); }); var hijacker = pipeworks() .fit(function(env, next) { console.log('hijacked!'); env.hijacked = true; next(env); }) .fit(function(env, next) { console.log(env); next(env); }); numberPipe.join(letterPipe).flow({ zero: 0 });
var commander = require("commander"); var readdir = require("fs-readdir-recursive"); var index = require("./index"); var babel = require("babel-core"); var util = require("babel-core").util; var path = require("path"); var fs = require("fs"); var _ = require("lodash"); exports.readdirFilter = function (filename) { return readdir(filename).filter(function (filename) { return util.canCompile(filename); }); }; exports.readdir = readdir; exports.canCompile = util.canCompile; exports.shouldIgnore = function (loc) { return util.shouldIgnore(loc, index.opts.ignore, index.opts.only); }; exports.addSourceMappingUrl = function (code, loc) { return code + "\n//# sourceMappingURL=" + path.basename(loc); }; exports.transform = function (filename, code, opts) { opts = _.defaults(opts || {}, index.opts); opts.filename = filename; opts.ignore = null; opts.only = null; var result = babel.transform(code, opts); result.filename = filename; result.actual = code; return result; }; exports.compile = function (filename, opts) { try { var code = fs.readFileSync(filename, "utf8"); return exports.transform(filename, code, opts); } catch (err) { if (commander.watch) { console.error(err.stack); return { ignored: true }; } else { throw err; } } };
var Server = require('./server'); var utils = require('./utils'); var events = require('events'); /** * Constructor for a Jayson Client * @class Client * @extends require('events').EventEmitter * @param {Server} server An instance of Server * @param {Object} [options] * @param {Function} [options.reviver] Reviver function for JSON * @param {Function} [options.replacer] Replacer function for JSON * @param {Number} [options.version=2] JSON-RPC version to use (1|2) * @param {Function} [options.generator] Function to use for generating request IDs * @return {Client} * @api public */ var Client = function(server, options) { if(!(server instanceof Server) && arguments.length === 1) { options = server; server = null; } if(!(this instanceof Client)) return new Client(server, options); var defaults = { reviver: null, replacer: null, generator: utils.generateId, version: 2 }; this.options = utils.merge(defaults, options || {}); if(server) this.server = server; }; require('util').inherits(Client, events.EventEmitter); module.exports = Client; /** * HTTP client constructor * @type ClientHttp * @static */ Client.http = require('./client/http'); /** * HTTPS client constructor * @type ClientHttps * @static */ Client.https = require('./client/https'); /** * TCP client constructor * @type ClientTcp * @static */ Client.tcp = require('./client/tcp'); /** * TLS client constructor * @type ClientTls * @static */ Client.tls = require('./client/tls'); /** * Creates a request and dispatches it if given a callback. * @param {String|Array} method A batch request if passed an Array, or a method name if passed a String * @param {Array|Object} params Parameters for the method * @param {String|Number} [id] Optional id. If undefined an id will be generated. If null it creates a notification request * @param {Function} [callback] Request callback. If specified, executes the request rather than only returning it. * @throws {TypeError} Invalid parameters * @return {Object} JSON-RPC 1.0 or 2.0 compatible request * @api public */ Client.prototype.request = function(method, params, id, callback) { var self = this; // is this a batch request? var isBatch = Array.isArray(method) && typeof(params) === 'function'; // JSON-RPC 1.0 doesn't support batching if (this.options.version === 1 && isBatch) { throw new TypeError('JSON-RPC 1.0 does not support batching') } // is this a raw request? var isRaw = !isBatch && method && typeof(method) === 'object' && typeof(params) === 'function'; if(isBatch || isRaw) { callback = params; request = method; } else { if(typeof(id) === 'function') { callback = id; id = undefined; // specifically undefined because "null" is a notification request } var hasCallback = typeof(callback) === 'function'; try { var request = utils.request(method, params, id, { generator: this.options.generator, version: this.options.version }); } catch(err) { if(hasCallback) return callback(err); throw err; } // no callback means we should just return a raw request if(!hasCallback) { return request; } } this.emit('request', request); this._request(request, function(err, response) { self.emit('response', request, response); self._parseResponse(err, response, callback); }); // always return the raw request return request; }; /** * Executes a request on server bound directly * @param {Object} request A JSON-RPC 1.0 or 2.0 request * @param {Function} callback Request callback that will receive the server response as the second argument * @api private */ Client.prototype._request = function(request, callback) { var self = this; // serializes the request as a JSON string so that we get a copy and can run the replacer as intended utils.JSON.stringify(request, this.options, function(err, message) { if(err) throw err; self.server.call(message, function(error, success) { var response = error || success; callback(null, response); }); }); }; /** * Parses a response from a server * @param {Object} err Error to pass on that is unrelated to the actual response * @param {Object} response JSON-RPC 1.0 or 2.0 response * @param {Function} callback Callback that will receive different arguments depending on the amount of parameters * @api private */ Client.prototype._parseResponse = function(err, response, callback) { if(err) return callback(err); if(!response || typeof(response) !== 'object') { return callback(); } if(callback.length === 3) { // split callback arguments on error and response // is batch response? if(Array.isArray(response)) { // neccesary to split strictly on validity according to spec here var isError = function(res) { return typeof(res.error) !== 'undefined'; }; var isNotError = function(res) { return !isError(res); } callback(null, response.filter(isError), response.filter(isNotError)); } else { // split regardless of validity return callback(null, response.error, response.result); } } else { return callback(null, response); } };
PolymerExpressions.prototype.first = function(arr){ return arr[0]; } PolymerExpressions.prototype.last = function(arr){ return arr[arr.length-1]; }
/* Author: Tristan Denyer (based on Charlie Griefer's original clone code, and some great help from Dan - see his comments in blog post) Plugin repo: https://github.com/tristandenyer/Clone-section-of-form-using-jQuery Demo at http://tristandenyer.com/using-jquery-to-duplicate-a-section-of-a-form-maintaining-accessibility/ Ver: 0.9.4.1 Last updated: Sep 24, 2014 The MIT License (MIT) Copyright (c) 2011 Tristan Denyer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ $(function () { $('#btnAdd').click(function () { var num = $('.clonedInput').length, // Checks to see how many "duplicatable" input fields we currently have newNum = new Number(num + 1), // The numeric ID of the new input field being added, increasing by 1 each time newElem = $('#entry' + num).clone().attr('id', 'entry' + newNum).fadeIn('slow'); // create the new element via clone(), and manipulate it's ID using newNum value /* This is where we manipulate the name/id values of the input inside the new, cloned element Below are examples of what forms elements you can clone, but not the only ones. There are 2 basic structures below: one for an H2, and one for form elements. To make more, you can copy the one for form elements and simply update the classes for its label and input. Keep in mind that the .val() method is what clears the element when it gets cloned. Radio and checkboxes need .val([]) instead of .val(''). */ // H2 - section newElem.find('.heading-reference').attr('id', 'ID' + newNum + '_reference').attr('name', 'ID' + newNum + '_reference').html('Entry #' + newNum); // Title - select newElem.find('.label_ttl').attr('for', 'ID' + newNum + '_title'); newElem.find('.select_ttl').attr('id', 'ID' + newNum + '_title').attr('name', 'ID' + newNum + '_title').val(''); // First name - text newElem.find('.label_fn').attr('for', 'ID' + newNum + '_first_name'); newElem.find('.input_fn').attr('id', 'ID' + newNum + '_first_name').attr('name', 'ID' + newNum + '_first_name').val(''); // Last name - text newElem.find('.label_ln').attr('for', 'ID' + newNum + '_last_name'); newElem.find('.input_ln').attr('id', 'ID' + newNum + '_last_name').attr('name', 'ID' + newNum + '_last_name').val(''); // Color - checkbox newElem.find('.label_checkboxitem').attr('for', 'ID' + newNum + '_checkboxitem'); newElem.find('.input_checkboxitem').attr('id', 'ID' + newNum + '_checkboxitem').attr('name', 'ID' + newNum + '_checkboxitem').val([]); // Skate - radio newElem.find('.label_radio').attr('for', 'ID' + newNum + '_radioitem'); newElem.find('.input_radio').attr('id', 'ID' + newNum + '_radioitem').attr('name', 'ID' + newNum + '_radioitem').val([]); // Email - text newElem.find('.label_email').attr('for', 'ID' + newNum + '_email_address'); newElem.find('.input_email').attr('id', 'ID' + newNum + '_email_address').attr('name', 'ID' + newNum + '_email_address').val(''); // Twitter handle (for Bootstrap demo) - append and text newElem.find('.label_twt').attr('for', 'ID' + newNum + '_twitter_handle'); newElem.find('.input_twt').attr('id', 'ID' + newNum + '_twitter_handle').attr('name', 'ID' + newNum + '_twitter_handle').val(''); // Insert the new element after the last "duplicatable" input field $('#entry' + num).after(newElem); $('#ID' + newNum + '_title').focus(); // Enable the "remove" button. This only shows once you have a duplicated section. $('#btnDel').attr('disabled', false); // Right now you can only add 4 sections, for a total of 5. Change '5' below to the max number of sections you want to allow. if (newNum == 5) $('#btnAdd').attr('disabled', true).prop('value', "You've reached the limit"); // value here updates the text in the 'add' button when the limit is reached }); $('#btnDel').click(function () { // Confirmation dialog box. Works on all desktop browsers and iPhone. if (confirm("Are you sure you wish to remove this section? This cannot be undone.")) { var num = $('.clonedInput').length; // how many "duplicatable" input fields we currently have $('#entry' + num).slideUp('slow', function () {$(this).remove(); // if only one element remains, disable the "remove" button if (num -1 === 1) $('#btnDel').attr('disabled', true); // enable the "add" button $('#btnAdd').attr('disabled', false).prop('value', "add section");}); } return false; // Removes the last section you added }); // Enable the "add" button $('#btnAdd').attr('disabled', false); // Disable the "remove" button $('#btnDel').attr('disabled', true); });
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var prefix = 'fas'; var iconName = 'chevron-down'; var width = 448; var height = 512; var ligatures = []; var unicode = 'f078'; var svgPathData = 'M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z'; exports.definition = { prefix: prefix, iconName: iconName, icon: [ width, height, ligatures, unicode, svgPathData ]}; exports.faChevronDown = exports.definition; exports.prefix = prefix; exports.iconName = iconName; exports.width = width; exports.height = height; exports.ligatures = ligatures; exports.unicode = unicode; exports.svgPathData = svgPathData;
/* * PLUGIN MEDIAINFO * * Polish language file. * * Author: */ theUILang.mediainfo = "Media Info";
// Copyright 2015 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import componentsModule from 'common/components/components_module'; describe('Labels directive', () => { /** @type {!angular.Scope} */ let scope; /** @type {function(!angular.Scope):!angular.JQLite} */ let compileFn; beforeEach(() => { angular.mock.module(componentsModule.name); angular.mock.inject(($rootScope, $compile) => { scope = $rootScope.$new(); compileFn = $compile('<kd-labels labels="labels"></kd-labels>'); }); }); it('should render 3 labels', () => { // given scope.labels = { app: 'app', version: 'version', testLabel: 'test', }; // when let element = compileFn(scope); scope.$digest(); // then let labels = element.find('span'); expect(labels.length).toEqual(3); angular.forEach( (key, value, index) => { expect(labels.eq(index).text()).toBe(`${key}=${value}`); }); }); });
var remove = [ ]; var insert = [ ["CH","\u1E96"], ["Ch","CH"], ["ch","Ch"], ["DZ","ḓ"], ["Dz","DZ"], ["dz","Dz"], ["DŽ","dz"], ["Dž","DŽ"], ["dž","Dž"] ]; module.exports.remove = remove; module.exports.insert = insert;
/* Copyright (c) 2006-2015 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ /** * @requires OpenLayers/Symbolizer.js */ /** * Class: OpenLayers.Symbolizer.Line * A symbolizer used to render line features. */ OpenLayers.Symbolizer.Line = OpenLayers.Class(OpenLayers.Symbolizer, { /** * APIProperty: strokeColor * {String} Color for line stroke. This is a RGB hex value (e.g. "#ff0000" * for red). * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ /** * APIProperty: strokeOpacity * {Number} Stroke opacity (0-1). * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ /** * APIProperty: strokeWidth * {Number} Pixel stroke width. * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ /** * APIProperty: strokeLinecap * {String} Stroke cap type ("butt", "round", or "square"). * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ /** * APIProperty: strokeDashstyle * {String} Stroke dash style according to the SLD spec. Note that the * OpenLayers values for strokeDashstyle ("dot", "dash", "dashdot", * "longdash", "longdashdot", or "solid") will not work in SLD, but * most SLD patterns will render correctly in OpenLayers. * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ /** * Constructor: OpenLayers.Symbolizer.Line * Create a symbolizer for rendering lines. * * Parameters: * config - {Object} An object containing properties to be set on the * symbolizer. Any documented symbolizer property can be set at * construction. * * Returns: * A new line symbolizer. */ initialize: function(config) { OpenLayers.Symbolizer.prototype.initialize.apply(this, arguments); }, CLASS_NAME: "OpenLayers.Symbolizer.Line" });
define([], function() { /* Native method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Creates an array that is the composition of partially applied arguments, * placeholders, and provided arguments into a single array of arguments. * * @private * @param {Array|Object} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @returns {Array} Returns the new array of composed arguments. */ function composeArgs(args, partials, holders) { var holdersLength = holders.length, argsIndex = -1, argsLength = nativeMax(args.length - holdersLength, 0), leftIndex = -1, leftLength = partials.length, result = Array(argsLength + leftLength); while (++leftIndex < leftLength) { result[leftIndex] = partials[leftIndex]; } while (++argsIndex < holdersLength) { result[holders[argsIndex]] = args[argsIndex]; } while (argsLength--) { result[leftIndex++] = args[argsIndex++]; } return result; } return composeArgs; });
import React, {Component, PropTypes} from 'react'; import ClockNumber from './ClockNumber'; import ClockPointer from './ClockPointer'; import {getTouchEventOffsetValues, rad2deg} from './timeUtils'; class ClockMinutes extends Component { static propTypes = { initialMinutes: PropTypes.number, onChange: PropTypes.func, }; static defaultProps = { initialMinutes: new Date().getMinutes(), onChange: () => {}, }; static contextTypes = { muiTheme: PropTypes.object.isRequired, }; componentDidMount() { const clockElement = this.refs.mask; this.center = { x: clockElement.offsetWidth / 2, y: clockElement.offsetHeight / 2, }; this.basePoint = { x: this.center.x, y: 0, }; } isMousePressed(event) { if (typeof event.buttons === 'undefined') { return event.nativeEvent.which; } return event.buttons; } handleUp = (event) => { event.preventDefault(); this.setClock(event.nativeEvent, true); }; handleMove = (event) => { event.preventDefault(); if (this.isMousePressed(event) !== 1 ) return; this.setClock(event.nativeEvent, false); }; handleTouch = (event) => { event.preventDefault(); this.setClock(event.changedTouches[0], false); }; setClock(event, finish) { if (typeof event.offsetX === 'undefined') { const offset = getTouchEventOffsetValues(event); event.offsetX = offset.offsetX; event.offsetY = offset.offsetY; } const minutes = this.getMinutes(event.offsetX, event.offsetY); this.props.onChange(minutes, finish); } getMinutes(offsetX, offsetY) { const step = 6; const x = offsetX - this.center.x; const y = offsetY - this.center.y; const cx = this.basePoint.x - this.center.x; const cy = this.basePoint.y - this.center.y; const atan = Math.atan2(cx, cy) - Math.atan2(x, y); let deg = rad2deg(atan); deg = Math.round(deg / step ) * step; deg %= 360; const value = Math.floor(deg / step) || 0; return value; } getMinuteNumbers() { const minutes = []; for (let i = 0; i < 12; i++) { minutes.push(i * 5); } const selectedMinutes = this.props.initialMinutes; let hasSelected = false; const numbers = minutes.map((minute) => { const isSelected = selectedMinutes === minute; if (isSelected) hasSelected = true; return ( <ClockNumber key={minute} isSelected={isSelected} type="minute" value={minute} /> ); }); return { numbers: numbers, hasSelected: hasSelected, selected: selectedMinutes, }; } render() { const styles = { root: { height: '100%', width: '100%', borderRadius: '100%', position: 'relative', pointerEvents: 'none', boxSizing: 'border-box', }, hitMask: { height: '100%', width: '100%', pointerEvents: 'auto', }, }; const {prepareStyles} = this.context.muiTheme; const minutes = this.getMinuteNumbers(); return ( <div ref="clock" style={prepareStyles(styles.root)} > <ClockPointer value={minutes.selected} type="minute" /> {minutes.numbers} <div ref="mask" style={prepareStyles(styles.hitMask)} hasSelected={minutes.hasSelected} onTouchMove={this.handleTouch} onTouchEnd={this.handleTouch} onMouseUp={this.handleUp} onMouseMove={this.handleMove} /> </div> ); } } export default ClockMinutes;
import Link from 'next/link' const Page = ({ loaded }) => { const link = ( <Link href="/another"> <a id="to-another" style={{ marginLeft: 5000, width: 95000, display: 'block', }} > to another </a> </Link> ) if (typeof window !== 'undefined') { window.didHydrate = true } if (loaded) { return ( <> <div style={{ width: 10000, height: 10000, background: 'orange', }} /> {link} <div id="end-el">the end</div> </> ) } return link } export default Page export const getServerSideProps = () => { return { props: { loaded: true, }, } }
; (function() { window.require(["ace/snippets/scheme"], function(m) { if (typeof module == "object" && typeof exports == "object" && module) { module.exports = m; } }); })();
// Copyright (c) 2015, Frappe Technologies and contributors // For license information, please see license.txt cur_frm.add_fetch('fee_structure', 'total_amount', 'amount'); frappe.ui.form.on("Program", "refresh", function(frm) { });
define("dojox/editor/plugins/nls/bs/BidiSupport", { //begin v1.x content "ltr": "Smjer teksta s lijeva na desno", "rtl": "Smjer tekst s desna na lijevo" //end v1.x content });
/* * blueimp Gallery Demo JS * https://github.com/blueimp/Gallery * * Copyright 2013, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT */ /* global blueimp, $ */ $(function () { 'use strict'; // Load demo images from flickr: $.ajax({ // Flickr API is SSL only: // https://code.flickr.net/2014/04/30/flickr-api-going-ssl-only-on-june-27th-2014/ url: 'https://api.flickr.com/services/rest/', data: { format: 'json', method: 'flickr.interestingness.getList', api_key: '7617adae70159d09ba78cfec73c13be3' // jshint ignore:line }, dataType: 'jsonp', jsonp: 'jsoncallback' }).done(function (result) { var carouselLinks = [], linksContainer = $('#links'), baseUrl; // Add the demo images as links with thumbnails to the page: $.each(result.photos.photo, function (index, photo) { baseUrl = 'https://farm' + photo.farm + '.static.flickr.com/' + photo.server + '/' + photo.id + '_' + photo.secret; $('<a/>') .append($('<img>').prop('src', baseUrl + '_s.jpg')) .prop('href', baseUrl + '_b.jpg') .prop('title', photo.title) .attr('data-gallery', '') .appendTo(linksContainer); carouselLinks.push({ href: baseUrl + '_c.jpg', title: photo.title }); }); // Initialize the Gallery as image carousel: blueimp.Gallery(carouselLinks, { container: '#blueimp-image-carousel', carousel: true }); }); // Initialize the Gallery as video carousel: blueimp.Gallery([ { title: 'Sintel', href: 'https://archive.org/download/Sintel/sintel-2048-surround_512kb.mp4', type: 'video/mp4', poster: 'https://i.imgur.com/MUSw4Zu.jpg' }, { title: 'Big Buck Bunny', href: 'https://upload.wikimedia.org/wikipedia/commons/7/75/' + 'Big_Buck_Bunny_Trailer_400p.ogg', type: 'video/ogg', poster: 'https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/' + 'Big.Buck.Bunny.-.Opening.Screen.png/' + '800px-Big.Buck.Bunny.-.Opening.Screen.png' }, { title: 'Elephants Dream', href: 'https://upload.wikimedia.org/wikipedia/commons/transcoded/8/83/' + 'Elephants_Dream_%28high_quality%29.ogv/' + 'Elephants_Dream_%28high_quality%29.ogv.360p.webm', type: 'video/webm', poster: 'https://upload.wikimedia.org/wikipedia/commons/thumb/9/90/' + 'Elephants_Dream_s1_proog.jpg/800px-Elephants_Dream_s1_proog.jpg' }, { title: 'LES TWINS - An Industry Ahead', type: 'text/html', youtube: 'zi4CIXpx7Bg' }, { title: 'KN1GHT - Last Moon', type: 'text/html', vimeo: '73686146', poster: 'https://secure-a.vimeocdn.com/ts/448/835/448835699_960.jpg' } ], { container: '#blueimp-video-carousel', carousel: true }); });
/* * Copyright (C) 2013 salesforce.com, 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. */ ({ handleCurrentPageChange: function (cmp) { // Tell the grid to fetch new items from the dataProvider. cmp.find('grid').getEvent('refresh').fire(); }, replaceData : function(cmp, evt, hlp) { cmp.find("data").set("v.empty", false); cmp.find("data").getEvent("provide").fire(); }, emptyData : function(cmp, evt, hlp) { cmp.find("data").set("v.empty", true); cmp.find("data").getEvent("provide").fire(); }, initColumns : function(cmp, evt, helper) { var grid = cmp.find("grid"); $A.newCmpAsync( this, function(newCmp) { grid.set("v.columns", [newCmp]); }, { "componentDef": "markup://ui:dataGridColumn", "attributes": { "values": { label: "Id", name: "id", sortable: true } } }/*,{ "componentDef": "markup://ui:dataGridColumn", "attributes": { "values": { label: "Name", name: "who.name" } } }]*/ ); }, insertNewColumns : function(cmp, evt, helper) { var grid = cmp.find("grid"); $A.newCmpAsync( this, function(newCmp) { var cols = grid.get("v.columns"); cols.push(newCmp); grid.set("v.columns", cols); }, { "componentDef": "markup://ui:dataGridColumn", "attributes": { "values": { label: "Subject", name: "subject" } } }/*,{ "componentDef": "markup://ui:dataGridColumn", "attributes": { "values": { label: "Related To", name: "what.name" } } }]*/ ); }, removeColumns : function(cmp, evt, helper) { var grid = cmp.find("grid"), newCols = grid.get("v.columns").splice(1, 1); grid.set("v.columns", newCols); }, switchColumn : function(cmp, evt, hlp) { var grid = cmp.find("grid"); var columns = grid.get("v.columns"); var column = columns[5]; if (column.get("v.name") === "activityDate") { $A.newCmpAsync( this, function(newCmp) { var oldCmp = columns[5]; columns[5] = newCmp; grid.set("v.columns", columns); oldCmp.destroy(); }, { "componentDef": "markup://ui:dataGridColumn", "attributes": { "values": { label: "Name", name: "who.name" } } } ); } else { $A.newCmpAsync( this, function(newCmp) { var oldCmp = columns[5]; columns[5] = newCmp; grid.set("v.columns", columns); oldCmp.destroy(); }, { "componentDef": "markup://ui:dataGridColumn", "attributes": { "values": { label: "Due Date", name: "activityDate" } } } ); } } })
//// [identicalGenericConditionalsWithInferRelated.ts] function f<X>(arg: X) { type Cond1 = X extends [infer A] ? A : never; type Cond2 = X extends [infer A] ? A : never; let x: Cond1 = null as any; let y: Cond2 = null as any; x = y; // is err, should be ok y = x; // is err, should be ok } // repro from https://github.com/microsoft/TypeScript/issues/26627 export type Constructor<T> = new (...args: any[]) => T export type MappedResult<T> = T extends Boolean ? boolean : T extends Number ? number : T extends String ? string : T interface X { decode<C extends Constructor<any>>(ctor: C): MappedResult<C extends Constructor<infer T> ? T : never> } class Y implements X { decode<C extends Constructor<any>>(ctor: C): MappedResult<C extends Constructor<infer T> ? T : never> { throw new Error() } } //// [identicalGenericConditionalsWithInferRelated.js] "use strict"; exports.__esModule = true; function f(arg) { var x = null; var y = null; x = y; // is err, should be ok y = x; // is err, should be ok } var Y = /** @class */ (function () { function Y() { } Y.prototype.decode = function (ctor) { throw new Error(); }; return Y; }());
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule DatePickerIOS * @flow * * This is a controlled component version of RCTDatePickerIOS */ 'use strict'; var NativeMethodsMixin = require('NativeMethodsMixin'); var PropTypes = require('ReactPropTypes'); var React = require('React'); var RCTDatePickerIOSConsts = require('NativeModules').UIManager.RCTDatePicker.Constants; var StyleSheet = require('StyleSheet'); var View = require('View'); var requireNativeComponent = require('requireNativeComponent'); var DATEPICKER = 'datepicker'; type DefaultProps = { mode: 'date' | 'time' | 'datetime'; }; type Event = Object; /** * Use `DatePickerIOS` to render a date/time picker (selector) on iOS. This is * a controlled component, so you must hook in to the `onDateChange` callback * and update the `date` prop in order for the component to update, otherwise * the user's change will be reverted immediately to reflect `props.date` as the * source of truth. */ var DatePickerIOS = React.createClass({ mixins: [NativeMethodsMixin], propTypes: { ...View.propTypes, /** * The currently selected date. */ date: PropTypes.instanceOf(Date).isRequired, /** * Date change handler. * * This is called when the user changes the date or time in the UI. * The first and only argument is a Date object representing the new * date and time. */ onDateChange: PropTypes.func.isRequired, /** * Maximum date. * * Restricts the range of possible date/time values. */ maximumDate: PropTypes.instanceOf(Date), /** * Minimum date. * * Restricts the range of possible date/time values. */ minimumDate: PropTypes.instanceOf(Date), /** * The date picker mode. */ mode: PropTypes.oneOf(['date', 'time', 'datetime']), /** * The interval at which minutes can be selected. */ minuteInterval: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30]), /** * Timezone offset in minutes. * * By default, the date picker will use the device's timezone. With this * parameter, it is possible to force a certain timezone offset. For * instance, to show times in Pacific Standard Time, pass -7 * 60. */ timeZoneOffsetInMinutes: PropTypes.number, }, getDefaultProps: function(): DefaultProps { return { mode: 'datetime', }; }, _onChange: function(event: Event) { var nativeTimeStamp = event.nativeEvent.timestamp; this.props.onDateChange && this.props.onDateChange( new Date(nativeTimeStamp) ); this.props.onChange && this.props.onChange(event); // We expect the onChange* handlers to be in charge of updating our `date` // prop. That way they can also disallow/undo/mutate the selection of // certain values. In other words, the embedder of this component should // be the source of truth, not the native component. var propsTimeStamp = this.props.date.getTime(); if (nativeTimeStamp !== propsTimeStamp) { this.refs[DATEPICKER].setNativeProps({ date: propsTimeStamp, }); } }, render: function() { var props = this.props; return ( <View style={props.style}> <RCTDatePickerIOS ref={DATEPICKER} style={styles.datePickerIOS} date={props.date.getTime()} maximumDate={ props.maximumDate ? props.maximumDate.getTime() : undefined } minimumDate={ props.minimumDate ? props.minimumDate.getTime() : undefined } mode={props.mode} minuteInterval={props.minuteInterval} timeZoneOffsetInMinutes={props.timeZoneOffsetInMinutes} onChange={this._onChange} /> </View> ); } }); var styles = StyleSheet.create({ datePickerIOS: { height: RCTDatePickerIOSConsts.ComponentHeight, width: RCTDatePickerIOSConsts.ComponentWidth, }, }); var RCTDatePickerIOS = requireNativeComponent('RCTDatePicker', DatePickerIOS, { nativeOnly: { onChange: true }, }); module.exports = DatePickerIOS;
'use strict'; var React = require('react/addons'); var PureRenderMixin = React.addons.PureRenderMixin; var SvgIcon = require('../../svg-icon'); var ActionSettingsOverscan = React.createClass({ displayName: 'ActionSettingsOverscan', mixins: [PureRenderMixin], render: function render() { return React.createElement( SvgIcon, this.props, React.createElement('path', { d: 'M12.01 5.5L10 8h4l-1.99-2.5zM18 10v4l2.5-1.99L18 10zM6 10l-2.5 2.01L6 14v-4zm8 6h-4l2.01 2.5L14 16zm7-13H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z' }) ); } }); module.exports = ActionSettingsOverscan;
version https://git-lfs.github.com/spec/v1 oid sha256:e87cf256ecf15629db01ce202dbfbaa17047cc253a9d58066f491a7cacdac3b0 size 11031
/* * /MathJax/localization/fi/HelpDialog.js * * Copyright (c) 2009-2018 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.Localization.addTranslation("fi","HelpDialog",{version:"2.7.4",isLoaded:true,strings:{}});MathJax.Ajax.loadComplete("[MathJax]/localization/fi/HelpDialog.js");
version https://git-lfs.github.com/spec/v1 oid sha256:0566fc5a21f581ebde76370ed97414d377c1b8d34468978e342117e4e0ccec40 size 3233
// Load in dependencies var assert = require('assert'); var ndarray = require('ndarray'); var ndarrayFill = require('ndarray-fill'); var savePixels = require('save-pixels'); // Define our canvas constructor function Canvas(width, height) { // Calculate and save dimensions/data for later var len = width * height * 4; this.width = width; this.height = height; this.data = new global.Uint8ClampedArray(len); this.ndarray = new ndarray(this.data, [width, height, 4]); // Create a store for images this.images = []; } Canvas.defaultFormat = 'png'; Canvas.supportedFormats = ['jpg', 'jpeg', 'png', 'gif']; Canvas.prototype = { addImage: function (img, x, y) { // Save the image for later this.images.push({ img: img, x: x, y: y }); }, 'export': function (options) { // Determine the export format var format = options.format || Canvas.defaultFormat; assert(Canvas.supportedFormats.indexOf(format) !== -1, '`pixelsmith` doesn\'t support exporting "' + format + '". Please use "jpeg", "png", or "gif"'); // If we have a custom background, fill it in (otherwise default is transparent black `rgba(0, 0, 0, 0)`) var ndarray = this.ndarray; if (options.background) { ndarrayFill(ndarray, function fillBackground (i, j, k) { return options.background[k]; }); } // Add each image to the canvas var images = this.images; images.forEach(function getUrlPath (imageObj) { // Iterate over the image's data across its rows // setting the original data at that offset // [1, 2, 0, 0, // 3, 4, 0, 0, // 0, 0, 5, 0, // 0, 0, 0, 6] var img = imageObj.img; var xOffset = imageObj.x; var yOffset = imageObj.y; var colIndex = 0; var colCount = img.width; // DEV: Use `width` for padding for (; colIndex < colCount; colIndex += 1) { var rowIndex = 0; var rowCount = img.height; // DEV: Use `height` for padding for (; rowIndex < rowCount; rowIndex += 1) { var rgbaIndex = 0; var rgbaCount = 4; for (; rgbaIndex < rgbaCount; rgbaIndex += 1) { // If we are working with a 4 dimensional array, ignore the first dimension // DEV: This is a GIF; [frames, width, height, rgba] var val; if (img.shape.length === 4) { val = img.get(0, colIndex, rowIndex, rgbaIndex); // Otherwise, transfer data directly } else { val = img.get(colIndex, rowIndex, rgbaIndex); } ndarray.set(xOffset + colIndex, yOffset + rowIndex, rgbaIndex, val); } } } }); // Concatenate the ndarray into a png return savePixels(ndarray, format, options); } }; // Export Canvas module.exports = Canvas;
/*! * Ext JS Library 3.3.0 * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license */ /* * Simplified Chinese translation * By DavidHu * 09 April 2007 * * update by andy_ghg * 2009-10-22 15:00:57 */ Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">加载中...</div>'; if(Ext.DataView){ Ext.DataView.prototype.emptyText = ""; } if(Ext.grid.GridPanel){ Ext.grid.GridPanel.prototype.ddText = "选择了 {0} 行"; } if(Ext.TabPanelItem){ Ext.TabPanelItem.prototype.closeText = "关闭此标签"; } if(Ext.form.Field){ Ext.form.Field.prototype.invalidText = "输入值非法"; } if (Ext.LoadMask) { Ext.LoadMask.prototype.msg = "读取中..."; } Date.monthNames = [ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" ]; Date.dayNames = [ "日", "一", "二", "三", "四", "五", "六" ]; Date.formatCodes.a = "(this.getHours() < 12 ? '上午' : '下午')"; Date.formatCodes.A = "(this.getHours() < 12 ? '上午' : '下午')"; if(Ext.MessageBox){ Ext.MessageBox.buttonText = { ok : "确定", cancel : "取消", yes : "是", no : "否" }; } if(Ext.util.Format){ Ext.util.Format.date = function(v, format){ if(!v) return ""; if(!(v instanceof Date)) v = new Date(Date.parse(v)); return v.dateFormat(format || "y年m月d日"); }; } if(Ext.DatePicker){ Ext.apply(Ext.DatePicker.prototype, { todayText : "今天", minText : "日期必须大于最小允许日期",//update maxText : "日期必须小于最大允许日期",//update disabledDaysText : "", disabledDatesText : "", monthNames : Date.monthNames, dayNames : Date.dayNames, nextText : '下个月 (Ctrl+Right)', prevText : '上个月 (Ctrl+Left)', monthYearText : '选择一个月 (Control+Up/Down 来改变年份)',//update todayTip : "{0} (空格键选择)", format : "y年m月d日", okText : "确定", cancelText : "取消" }); } if(Ext.PagingToolbar){ Ext.apply(Ext.PagingToolbar.prototype, { beforePageText : "第",//update afterPageText : "页,共 {0} 页",//update firstText : "第一页", prevText : "上一页",//update nextText : "下一页", lastText : "最后页", refreshText : "刷新", displayMsg : "显示 {0} - {1}条,共 {2} 条",//update emptyMsg : '没有数据' }); } if(Ext.form.TextField){ Ext.apply(Ext.form.TextField.prototype, { minLengthText : "该输入项的最小长度是 {0} 个字符", maxLengthText : "该输入项的最大长度是 {0} 个字符", blankText : "该输入项为必输项", regexText : "", emptyText : null }); } if(Ext.form.NumberField){ Ext.apply(Ext.form.NumberField.prototype, { minText : "该输入项的最小值是 {0}", maxText : "该输入项的最大值是 {0}", nanText : "{0} 不是有效数值" }); } if(Ext.form.DateField){ Ext.apply(Ext.form.DateField.prototype, { disabledDaysText : "禁用", disabledDatesText : "禁用", minText : "该输入项的日期必须在 {0} 之后", maxText : "该输入项的日期必须在 {0} 之前", invalidText : "{0} 是无效的日期 - 必须符合格式: {1}", format : "y年m月d日" }); } if(Ext.form.ComboBox){ Ext.apply(Ext.form.ComboBox.prototype, { loadingText : "加载中...", valueNotFoundText : undefined }); } if(Ext.form.VTypes){ Ext.apply(Ext.form.VTypes, { emailText : '该输入项必须是电子邮件地址,格式如: "user@example.com"', urlText : '该输入项必须是URL地址,格式如: "http:/'+'/www.example.com"', alphaText : '该输入项只能包含半角字母和_',//update alphanumText : '该输入项只能包含半角字母,数字和_'//update }); } //add HTMLEditor's tips by andy_ghg if(Ext.form.HtmlEditor){ Ext.apply(Ext.form.HtmlEditor.prototype, { createLinkText : '添加超级链接:', buttonTips : { bold : { title: '粗体 (Ctrl+B)', text: '将选中的文字设置为粗体', cls: 'x-html-editor-tip' }, italic : { title: '斜体 (Ctrl+I)', text: '将选中的文字设置为斜体', cls: 'x-html-editor-tip' }, underline : { title: '下划线 (Ctrl+U)', text: '给所选文字加下划线', cls: 'x-html-editor-tip' }, increasefontsize : { title: '增大字体', text: '增大字号', cls: 'x-html-editor-tip' }, decreasefontsize : { title: '缩小字体', text: '减小字号', cls: 'x-html-editor-tip' }, backcolor : { title: '以不同颜色突出显示文本', text: '使文字看上去像是用荧光笔做了标记一样', cls: 'x-html-editor-tip' }, forecolor : { title: '字体颜色', text: '更改字体颜色', cls: 'x-html-editor-tip' }, justifyleft : { title: '左对齐', text: '将文字左对齐', cls: 'x-html-editor-tip' }, justifycenter : { title: '居中', text: '将文字居中对齐', cls: 'x-html-editor-tip' }, justifyright : { title: '右对齐', text: '将文字右对齐', cls: 'x-html-editor-tip' }, insertunorderedlist : { title: '项目符号', text: '开始创建项目符号列表', cls: 'x-html-editor-tip' }, insertorderedlist : { title: '编号', text: '开始创建编号列表', cls: 'x-html-editor-tip' }, createlink : { title: '转成超级链接', text: '将所选文本转换成超级链接', cls: 'x-html-editor-tip' }, sourceedit : { title: '代码视图', text: '以代码的形式展现文本', cls: 'x-html-editor-tip' } } }); } if(Ext.grid.GridView){ Ext.apply(Ext.grid.GridView.prototype, { sortAscText : "正序",//update sortDescText : "倒序",//update lockText : "锁定列",//update unlockText : "解除锁定",//update columnsText : "列" }); } if(Ext.grid.PropertyColumnModel){ Ext.apply(Ext.grid.PropertyColumnModel.prototype, { nameText : "名称", valueText : "值", dateFormat : "y年m月d日" }); } if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { splitTip : "拖动来改变尺寸.", collapsibleSplitTip : "拖动来改变尺寸. 双击隐藏." }); }
/* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'toolbar', 'fa', { toolbarCollapse: 'بستن نوار ابزار', toolbarExpand: 'بازکردن نوار ابزار', toolbarGroups: { document: 'سند', clipboard: 'حافظه موقت/برگشت', editing: 'در حال ویرایش', forms: 'فرم​ها', basicstyles: 'سبک‌های پایه', paragraph: 'بند', links: 'پیوندها', insert: 'ورود', styles: 'سبک‌ها', colors: 'رنگ​ها', tools: 'ابزارها' }, toolbars: 'نوار ابزارهای ویرایش‌گر' } );
/* * Copyright 2017 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* global PaymentRequest:false */ /** * Launches the PaymentRequest UI with Bob Pay as the only payment method. * * <p>When the developer chooses a single payment method and requests no other * data (no shipping, no email, no phone, ...), Payment Request will apply * the UI skip optimization, skipping its own UI enterily and going directly to * Bob Pay. */ function buy() { // eslint-disable-line no-unused-vars try { new PaymentRequest( [{supportedMethods: 'https://bobpay.com'}], {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}}) .show() .then(function(resp) { resp.complete('success') .then(function() { print( resp.methodName + '<br>' + JSON.stringify(resp.details, undefined, 2)); }) .catch(function(error) { print('complete() rejected<br>' + error); }); }) .catch(function(error) { print('show() rejected<br>' + error); }); } catch (error) { print('exception thrown<br>' + error); } } /** * Launches the PaymentRequest UI with Bob Pay as the only payment method, then * tells the browser that the transaction has failed. */ function buyFail() { // eslint-disable-line no-unused-vars try { new PaymentRequest( [{supportedMethods: 'https://bobpay.com'}], {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}}) .show() .then(function(resp) { resp.complete('fail') .then(function() { print('Transaction failed'); }) .catch(function(error) { print('complete() rejected<br>' + error); }); }) .catch(function(error) { print('show() rejected<br>' + error); }); } catch (error) { print('exception thrown<br>' + error); } } /** * Launches the PaymentRequest UI with Bob Pay as the only payment method but * requesting the payer's email as to disable skip ui. */ function buyWithRequestedEmail() { // eslint-disable-line no-unused-vars try { new PaymentRequest( [{supportedMethods: 'https://bobpay.com'}], {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}}, {requestPayerEmail: true}) .show() .then(function(resp) { resp.complete('success') .then(function() { print( resp.methodName + '<br>' + JSON.stringify(resp.details, undefined, 2)); }) .catch(function(error) { print('complete() rejected<br>' + error); }); }) .catch(function(error) { print('show() rejected<br>' + error); }); } catch (error) { print('exception thrown<br>' + error); } }
/* #export */ function asciiLanguageName() { return 'English'; } /* #export */ function nonAsciiLanguageName() { return 'Ελληνικά'; } function baz() {}
// Generated by Haxe 3.4.0 (function () { "use strict"; var Server = function() { }; Server.main = function() { model_Tasks.init(); }; var model_Tasks = function() { }; model_Tasks.init = function() { model_Tasks.collection = new Mongo.Collection("Tasks"); }; Server.main(); })();
const jsonServer = require('json-server'); const _ = require('lodash'); module.exports = (files) => { let db = {}; for (let file of files) { if (file.match(/db\.json$/gi)) { let data = require(file); db = _.merge(db, data); } } return jsonServer.router(db); };
// to do: add unit test code here
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { CONST } from 'angular2/src/facade/lang'; /** * Defines template and style encapsulation options available for Component's {@link View}. * * See {@link ViewMetadata#encapsulation}. */ export var ViewEncapsulation; (function (ViewEncapsulation) { /** * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host * Element and pre-processing the style rules provided via * {@link ViewMetadata#styles} or {@link ViewMetadata#stylesUrls}, and adding the new Host Element * attribute to all selectors. * * This is the default option. */ ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; /** * Use the native encapsulation mechanism of the renderer. * * For the DOM this means using [Shadow DOM](https://w3c.github.io/webcomponents/spec/shadow/) and * creating a ShadowRoot for Component's Host Element. */ ViewEncapsulation[ViewEncapsulation["Native"] = 1] = "Native"; /** * Don't provide any template or style encapsulation. */ ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None"; })(ViewEncapsulation || (ViewEncapsulation = {})); export var VIEW_ENCAPSULATION_VALUES = [ViewEncapsulation.Emulated, ViewEncapsulation.Native, ViewEncapsulation.None]; /** * Metadata properties available for configuring Views. * * Each Angular component requires a single `@Component` and at least one `@View` annotation. The * `@View` annotation specifies the HTML template to use, and lists the directives that are active * within the template. * * When a component is instantiated, the template is loaded into the component's shadow root, and * the expressions and statements in the template are evaluated against the component. * * For details on the `@Component` annotation, see {@link ComponentMetadata}. * * ### Example * * ``` * @Component({ * selector: 'greet', * template: 'Hello {{name}}!', * directives: [GreetUser, Bold] * }) * class Greet { * name: string; * * constructor() { * this.name = 'World'; * } * } * ``` */ export let ViewMetadata = class ViewMetadata { constructor({ templateUrl, template, directives, pipes, encapsulation, styles, styleUrls } = {}) { this.templateUrl = templateUrl; this.template = template; this.styleUrls = styleUrls; this.styles = styles; this.directives = directives; this.pipes = pipes; this.encapsulation = encapsulation; } }; ViewMetadata = __decorate([ CONST(), __metadata('design:paramtypes', [Object]) ], ViewMetadata);
/* * GET home page. */ var path = require('path'); exports.index = function (req, res) { // var jarrick = new Users({name:'Jarrick' + Math.random() * 1000, sex:'0', phone:'12345678901', // address:{city:'dalian', 'street':'xigang', test:'test'}}); // jarrick.save(function (data) { // console.log(data); // }); // Users.getById('51037e2a8a75b31c53000001'); // Users.getByName('Jarrick678.9289640728384'); var html = path.normalize(__dirname + '/../views/index.html'); res.sendfile(html); // res.render('index', { title:'NJBlog.' }); }; exports.getLoginUser = function (req, res) { res.json(req.session["user"] || {}); };
var deleteService = function deleteService(client, args) { this.args = args var valid = this.validate() if(valid !== true) { throw valid return } var type = args.type var id = args.id delete args.type delete args.id var path = type + '/' + id return client.performStreamingRequest({ method: 'DELETE', path: path, params: args }) } deleteService.prototype.validate = function validate() { var invalid = [] if(typeof this.args.type !== 'string' || this.args.type === '') { invalid.push('type') } if(typeof this.args.id !== 'string' || this.args.type === '') { invalid.push('id') } var missing = '' for(var i=0;i<invalid.length;i++) { missing += (invalid[i] + ', ') } if(invalid.length > 0) { return new Error('fields missing: ' + missing) } return true } module.exports = deleteService
var namespaceCqrs_1_1Akka_1_1Commands = [ [ "AkkaCommandBus", "classCqrs_1_1Akka_1_1Commands_1_1AkkaCommandBus.html", "classCqrs_1_1Akka_1_1Commands_1_1AkkaCommandBus" ], [ "AkkaCommandBusProxy", "classCqrs_1_1Akka_1_1Commands_1_1AkkaCommandBusProxy.html", "classCqrs_1_1Akka_1_1Commands_1_1AkkaCommandBusProxy" ], [ "ConcurrentAkkaCommandPublisher", "classCqrs_1_1Akka_1_1Commands_1_1ConcurrentAkkaCommandPublisher.html", "classCqrs_1_1Akka_1_1Commands_1_1ConcurrentAkkaCommandPublisher" ], [ "IAkkaCommandPublisher", "interfaceCqrs_1_1Akka_1_1Commands_1_1IAkkaCommandPublisher.html", null ], [ "IAkkaCommandPublisherProxy", "interfaceCqrs_1_1Akka_1_1Commands_1_1IAkkaCommandPublisherProxy.html", null ], [ "IConcurrentAkkaCommandPublisher", "interfaceCqrs_1_1Akka_1_1Commands_1_1IConcurrentAkkaCommandPublisher.html", null ] ];
module.exports = require("core-js-pure/stable/object/assign");