text
stringlengths
2
6.14k
::%DebugPrint(null)
cordova.define('cordova/plugin_list', function(require, exports, module) { module.exports = [ { "id": "cordova-plugin-device.device", "file": "plugins/cordova-plugin-device/www/device.js", "pluginId": "cordova-plugin-device", "clobbers": [ "device" ] }, { "id": "cordova-plugin-splashscreen.SplashScreen", "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js", "pluginId": "cordova-plugin-splashscreen", "clobbers": [ "navigator.splashscreen" ] }, { "id": "cordova-plugin-statusbar.statusbar", "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", "pluginId": "cordova-plugin-statusbar", "clobbers": [ "window.StatusBar" ] }, { "id": "ionic-plugin-keyboard.keyboard", "file": "plugins/ionic-plugin-keyboard/www/ios/keyboard.js", "pluginId": "ionic-plugin-keyboard", "clobbers": [ "cordova.plugins.Keyboard" ], "runs": true }, { "id": "cordova-plugin-console.console", "file": "plugins/cordova-plugin-console/www/console-via-logger.js", "pluginId": "cordova-plugin-console", "clobbers": [ "console" ] }, { "id": "cordova-plugin-console.logger", "file": "plugins/cordova-plugin-console/www/logger.js", "pluginId": "cordova-plugin-console", "clobbers": [ "cordova.logger" ] }, { "id": "cordova-plugin-geolocation.Coordinates", "file": "plugins/cordova-plugin-geolocation/www/Coordinates.js", "pluginId": "cordova-plugin-geolocation", "clobbers": [ "Coordinates" ] }, { "id": "cordova-plugin-geolocation.PositionError", "file": "plugins/cordova-plugin-geolocation/www/PositionError.js", "pluginId": "cordova-plugin-geolocation", "clobbers": [ "PositionError" ] }, { "id": "cordova-plugin-geolocation.Position", "file": "plugins/cordova-plugin-geolocation/www/Position.js", "pluginId": "cordova-plugin-geolocation", "clobbers": [ "Position" ] }, { "id": "cordova-plugin-geolocation.geolocation", "file": "plugins/cordova-plugin-geolocation/www/geolocation.js", "pluginId": "cordova-plugin-geolocation", "clobbers": [ "navigator.geolocation" ] } ]; module.exports.metadata = // TOP OF METADATA { "cordova-plugin-device": "1.1.4", "cordova-plugin-splashscreen": "4.0.3", "cordova-plugin-statusbar": "2.2.2", "cordova-plugin-whitelist": "1.3.1", "ionic-plugin-keyboard": "2.2.1", "cordova-plugin-console": "1.0.7", "cordova-plugin-compat": "1.1.0", "cordova-plugin-geolocation": "2.4.3" }; // BOTTOM OF METADATA });
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ export type GitHubIssue = {| title: string, url: string, |}; const GITHUB_ISSUES_API = 'https://api.github.com/search/issues'; export function searchGitHubIssuesURL(message: string): string { // Remove Fiber IDs from error message (as those will be unique). message = message.replace(/"[0-9]+"/g, ''); const filters = [ 'in:title', 'is:issue', 'is:open', 'is:public', 'label:"Component: Developer Tools"', 'repo:facebook/react', ]; return ( GITHUB_ISSUES_API + '?q=' + encodeURIComponent(message) + '%20' + filters.map(encodeURIComponent).join('%20') ); } export async function searchGitHubIssues( message: string, ): Promise<GitHubIssue | null> { const response = await fetch(searchGitHubIssuesURL(message)); const data = await response.json(); if (data.items.length > 0) { const item = data.items[0]; return { title: item.title, url: item.html_url, }; } else { return null; } }
(function() { var form = $('form'); var email = $('[name="emails[]"]'); var cfg = { fields: { emails: { group: true, trigger: 'keyup', validators: { provePattern: { debug: false, regex: '[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,63}', message: 'Invalid email address.' //optional, passed to decorator }, proveUnique: { debug: true, //uniqueTo: '[name="others"]', message: 'Not unique value.' //optional, passed to decorator } } } } }; //form plugins form.prove(cfg); form.decorate('bootstrap'); })();
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: > The [[Prototype]] property of the newly constructed object is set to the original Error prototype object, the one that is the initial value of Error.prototype (15.11.3.1) es5id: 15.11.1.1_A2_T1 description: Checking prototype of the newly constructed Error object ---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var err1=Error('msg1'); if(!Error.prototype.isPrototypeOf(err1)){ $ERROR('#1: var err1=Error(\'msg1\'); Error.prototype.isPrototypeOf(err1) return true. Actual: '+Error.prototype.isPrototypeOf(err1)); } // //////////////////////////////////////////////////////////////////////////////
module.exports = { tokenkey: 'X-Auth-Token' }
/** Chakram Expectation @module chakram-expectation @desc Extends the {@link http://chaijs.com/api/bdd/ chai.expect} object with additional HTTP matchers. */ module.exports = [ require('./statuscode.js'), require('./header.js'), require('./cookie.js'), require('./schema.js'), require('./json.js'), require('./compression.js'), require('./comprise.js') ];
import test from 'tape'; import {locationHistory} from '../../src/adapters/history'; test('locationHistory', t => { t.ok(locationHistory instanceof Function, 'should be function'); t.end(); });
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: The parseFloat property has the attribute DontEnum es5id: 15.1.2.3_A7.5 description: Checking use propertyIsEnumerable, for-in ---*/ //CHECK#1 if (this.propertyIsEnumerable('parseFloat') !== false) { $ERROR('#1:this.propertyIsEnumerable(\'parseFloat\') === false. Actual: ' + (this.propertyIsEnumerable('parseFloat'))); } //CHECK#2 var result = true; for (var p in this){ if (p === "parseFloat") { result = false; } } if (result !== true) { $ERROR('#2: result = true; for (p in this) { if (p === "parseFloat") result = false; } result === true;'); }
/** * @license Highmaps JS v7.2.0 (2019-09-03) * @module highcharts/modules/tilemap * @requires highcharts * @requires highcharts/modules/map * * Tilemap module * * (c) 2010-2019 Highsoft AS * * License: www.highcharts.com/license */ 'use strict'; import '../../modules/tilemap.src.js';
import Application from '@ember/application'; import { run } from '@ember/runloop'; import { initialize } from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>'; import { module, test } from 'qunit'; import destroyApp from '../../helpers/destroy-app'; module('<%= friendlyTestName %>', { beforeEach() { run(() => { this.application = Application.create(); this.application.deferReadiness(); }); }, afterEach() { destroyApp(this.application); } }); // Replace this with your real tests. test('it works', function(assert) { initialize(this.application); // you would normally confirm the results of the initializer here assert.ok(true); });
require([ 'oroui/js/mediator', 'oroui/js/app/controllers/base/controller' ], function(mediator, BaseController) { 'use strict'; /** * Init messenger's handlers */ BaseController.loadBeforeAction([ 'oroui/js/messenger' ], function(messenger) { mediator.setHandler('addMessage', messenger.addMessage, messenger); mediator.setHandler('showMessage', messenger.notificationMessage, messenger); mediator.setHandler('showFlashMessage', messenger.notificationFlashMessage, messenger); mediator.setHandler('showErrorMessage', messenger.showErrorMessage, messenger); }); });
/*global jQuery*/ (function (app, $) { function Controller() { this.$addButton = $('[data-button="add"]'); this.$addButton.attr('disabled', 'disabled'); } Controller.prototype.changeState = function () { this.$addButton.attr('disabled', 'disabled'); $.each($('[data-observable]'), $.proxy(function (index, checkbox) { if (checkbox.checked) { this.$addButton.removeAttr('disabled'); } }, this)); }; Controller.prototype.preventClick = function (event) { event.preventDefault(); $(this).parents('[data-entity]') .find('[data-observable]') .trigger('click'); }; Controller.prototype.getParameterByName = function (name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); }; Controller.prototype.selectAll = function () { var $total = $('[data-observable]'), $checked = $('[data-observable]:checked'); if ($total.length > $checked.length) { $.each($total, function (index, checkbox) { var $checkbox = $(checkbox); if (!checkbox.checked) { $checkbox.trigger('click'); } if ($checkbox.parent().is('.gg-check')) { $checkbox.parent().addClass('hover'); } }); } else { $.each($total, function (index, checkbox) { var $checkbox = $(checkbox); if (checkbox.checked) { $checkbox.trigger('click') .removeAttr('checked'); } if ($checkbox.parent().is('.gg-check')) { $checkbox.parent().removeClass('hover'); } }); } }; Controller.prototype.add = function (event) { event.preventDefault(); var button = event.currentTarget, resources = [], request = app.Ajax.Post({ module: 'galleries', action: 'attach' }); $.each($('[data-observable]:checked'), function (index, checkbox) { var $entity = app.Common.getParentEntity($(checkbox)); resources.push({ id: $entity.data('entity-id'), type: $entity.data('entity-type') }); }); request.add('resources', resources); request.add('gallery_id', this.getParameterByName('gallery_id')); request.send(function (response, request) { /*if (!response.error) { window.location.href = button.href; }*/ if (response.message) { $.jGrowl(response.message); } }); }; $(document).ready(function () { var queryString = new URI().query(true), controller; if (queryString.module !== 'galleries' || queryString.action !== 'addImages') { return; } controller = new Controller(); $('[data-entity-type="folder"] a').on('click', controller.preventClick); $('[data-observable]').on('click', $.proxy(controller.changeState, controller)); $('#gg-btn-select').on('click', $.proxy(controller.selectAll, controller)); $('[data-button="add"]').on('click', $.proxy(controller.add, controller)); }); }(window.SupsysticGallery = window.SupsysticGallery || {}, jQuery));
var image={ title:"Image Effects Shortcode", id :'oscitas-form-image', pluginName: 'image' }; (function() { _create_tinyMCE_options(image); })(); function ebs_return_html_image(pluginObj){ var form = jQuery('<div id="'+pluginObj.id+'" class="oscitas-container" title="'+pluginObj.title+'"><table id="oscitas-table" class="form-table">\ <tr><th><label for="oscitas-label-content">'+ebsjstrans.upload+' '+ebsjstrans.image+':</label></th>\ <td id="osc_image_upload"><input id="oscitas-image-src" type="hidden" name="oscitas-thumbnail-src" value="" />\ <input id="_btn" class="upload_image_button" type="button" value="'+ebsjstrans.upload+' '+ebsjstrans.image+'" />\ </td>\ </tr>\ <tr>\ <th><label for="oscitas-image-shape">'+ebsjstrans.image+' '+ebsjstrans.shape+':</label></th>\ <td><select name="oscitas-image-shape" id="oscitas-image-shape">\ <option value="img-rounded">'+ebsjstrans.rounded+'</option>\ <option value="img-circle">'+ebsjstrans.circle+'</option>\ <option value="img-thumbnail">'+ebsjstrans.thumbnail+'</option>\ </select>\ </td>\ </tr>\ <tr>\ <th><label for="oscitas-image-class">'+ebsjstrans.customclass+':</label></th>\ <td><input type="text" name="line" id="oscitas-image-class" value=""/><br />\ </td>\ </tr>\ </table>\ <p class="submit">\ <input type="button" id="oscitas-image-submit" class="button-primary" value="'+ebsjstrans.insert+' '+ebsjstrans.image+'" name="submit" />\ </p>\ </div>'); return form; } function create_oscitas_image(pluginObj){ var form=jQuery(pluginObj.hashId); var table = form.find('table'); form.find('.upload_image_button').click(function() { jQuery('body').addClass('ebs_plugin_shown_now'); jQuery('.ui-widget-overlay, .ui-dialog').css('z-index',100); jQuery('html').addClass('Image'); formfield = jQuery(this).prev().attr('id'); tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true'); return false; }); window.original_send_to_editor = window.send_to_editor; window.send_to_editor = function(html) { if (formfield) { if (jQuery(html).find('img').length) { fileurl = jQuery('img', html).attr('src'); } else if (jQuery(html).attr('src')) { fileurl = jQuery(html).attr('src'); } jQuery('#' + formfield).val(fileurl); tb_remove(); form.find('#osc_image_upload img').remove(); form.find('#osc_image_upload').append('<img src="'+fileurl+'">') jQuery('body').removeClass('ebs_plugin_shown_now'); jQuery('html').removeClass('Image'); } else { window.original_send_to_editor(html); jQuery('body').removeClass('ebs_plugin_shown_now'); } }; // handles the click event of the submit button form.find('#oscitas-image-submit').click(function(){ var shortcode=''; var shape=form.find('#oscitas-image-shape').val(); var cusclass=''; if(table.find('#oscitas-image-class').val()!=''){ cusclass= ' class="'+table.find('#oscitas-image-class').val()+'"'; } if(form.find('#oscitas-image-src').val()!=''){ shortcode = '['+$ebs_prefix+'image'+cusclass+' src="'+form.find('#oscitas-image-src').val()+'" shape="'+shape+'"]'; } // inserts the shortcode into the active editor tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode); // closes Dialoguebox close_dialogue(pluginObj.hashId); }); }
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'pagebreak', 'eu', { alt: 'Orrialde-jauzia', toolbar: 'Txertatu orrialde-jauzia inprimatzean' } );
'use strict'; var isImplemented = require( '../../../number/is-finite/is-implemented' ); module.exports = function( a ) { a( isImplemented(), true ); };
fwEvents.on('fw-builder:'+ 'form-builder' +':register-items', function(builder){ var currentItemType = 'textarea'; var localized = window['fw_form_builder_item_type_'+ currentItemType]; var ItemView = builder.classes.ItemView.extend({ template: _.template( '<div class="fw-form-builder-item-style-default fw-form-builder-item-type-'+ currentItemType +'">'+ '<div class="fw-form-item-controls fw-row">'+ '<div class="fw-form-item-controls-left fw-col-xs-7">'+ '<div class="fw-form-item-width"></div>'+ '</div>'+ '<div class="fw-form-item-controls-right fw-col-xs-5 fw-text-right">'+ '<div class="fw-form-item-control-buttons">'+ '<a class="fw-form-item-control-required dashicons<% if (required) { %> required<% } %>" data-hover-tip="<%- toggle_required %>" href="#" onclick="return false;" >*</a>'+ '<a class="fw-form-item-control-edit dashicons dashicons-admin-generic" data-hover-tip="<%- edit %>" href="#" onclick="return false;" ></a>'+ '<a class="fw-form-item-control-remove dashicons dashicons-no" data-hover-tip="<%- remove %>" href="#" onclick="return false;" ></a>'+ '</div>'+ '</div>'+ '</div>'+ '<div class="fw-form-item-preview">'+ '<div class="fw-form-item-preview-label">'+ '<div class="fw-form-item-preview-label-wrapper"><label data-hover-tip="<%- edit_label %>"><%- label %></label> <span <% if (required) { %>class="required"<% } %>>*</span></div>'+ '<div class="fw-form-item-preview-label-edit"><!-- --></div>'+ '</div>'+ '<div class="fw-form-item-preview-input"><input type="text" placeholder="<%- placeholder %>" value="<%- default_value %>"></div>'+ '</div>'+ '</div>' ), events: { 'click': 'onWrapperClick', 'click .fw-form-item-control-edit': 'openEdit', 'click .fw-form-item-control-remove': 'removeItem', 'click .fw-form-item-preview .fw-form-item-preview-label label': 'openLabelEditor', 'click .fw-form-item-control-required': 'toggleRequired' }, initialize: function(){ this.defaultInitialize(); // prepare edit options modal { this.modal = new fw.OptionsModal({ title: localized.l10n.item_title, options: this.model.modalOptions, values: this.model.get('options'), size: 'medium' }); this.listenTo(this.modal, 'change:values', function(modal, values) { this.model.set('options', values); }); this.listenTo(this.model, 'change', function() { this.modal.set( 'values', this.model.get('options') ); }); } this.widthChangerView = new FwBuilderComponents.ItemView.WidthChanger({ model: this.model, view: this }); this.labelInlineEditor = new FwBuilderComponents.ItemView.InlineTextEditor({ model: this.model, editAttribute: 'options/label' }); }, render: function () { this.defaultRender({ label: fw.opg('label', this.model.get('options')) || localized.l10n.item_title, placeholder: fw.opg('placeholder', this.model.get('options')), required: fw.opg('required', this.model.get('options')), default_value: fw.opg('default_value', this.model.get('options')), edit: localized.l10n.edit, remove: localized.l10n.delete, edit_label: localized.l10n.edit_label, toggle_required: localized.l10n.toggle_required }); if (this.widthChangerView) { this.$('.fw-form-item-width').append( this.widthChangerView.$el ); this.widthChangerView.delegateEvents(); } if (this.labelInlineEditor) { this.$('.fw-form-item-preview-label-edit').append( this.labelInlineEditor.$el ); this.labelInlineEditor.delegateEvents(); } }, openEdit: function() { this.modal.open(); }, removeItem: function() { this.remove(); this.model.collection.remove(this.model); }, openLabelEditor: function() { this.$('.fw-form-item-preview-label-wrapper').hide(); this.labelInlineEditor.show(); this.listenToOnce(this.labelInlineEditor, 'hide', function() { this.$('.fw-form-item-preview-label-wrapper').show(); }); }, toggleRequired: function() { var values = _.clone( // clone to not modify by reference, else model.set() will not trigger the 'change' event this.model.get('options') ); values.required = !values.required; this.model.set('options', values); }, onWrapperClick: function(e) { if (!this.$el.parent().length) { // The element doesn't exist in DOM. This listener was executed after the item was deleted return; } if (!fw.elementEventHasListenerInContainer(jQuery(e.srcElement), 'click', this.$el)) { this.openEdit(); } } }); var Item = builder.classes.Item.extend({ defaults: function() { var defaults = _.clone(localized.defaults); defaults.shortcode = fwFormBuilder.uniqueShortcode(defaults.type +'_'); return defaults; }, initialize: function() { this.defaultInitialize(); /** * get options from wp_localize_script() variable */ this.modalOptions = localized.options; this.view = new ItemView({ id: 'fw-builder-item-'+ this.cid, model: this }); } }); builder.registerItemClass(Item); });
var path = require("path"); var fs = require("fs"); var csv = require("csv"); var async = require("async"); module.exports = function (grunt) { grunt.registerTask("_exportLangFiles", function () { var next = this.async(); grunt.file.mkdir("languagefiles/"+grunt.config("translate.masterLang")); formatExport(); function formatExport () { var filename = "export"; switch (grunt.config("translate.format")) { case "json": _exportRaw(filename); break; case "csv": default: _exportCSV(filename); break; } } function _exportCSV (filename) { var inputs = global.translate.exportTextData.reduce(function (prev, current) { if (!prev.hasOwnProperty(current.file)) { prev[current.file] = []; } prev[current.file].push([current.file+'/'+current.id+current.path, current.value]); return prev; }, {}); var options = { quotedString: true, delimiter: grunt.config("translate.csvDelimiter") }; var fileNames = Object.keys(inputs); async.each(fileNames, _saveFile, _cb); function _saveFile (name, _cb) { csv.stringify(inputs[name], options, function (error, output) { if (error) { _cb(error); } else { var src = path.join("languagefiles", grunt.config("translate.masterLang"), name+".csv"); grunt.file.write(src, "\ufeff" + output); _cb(); } }); } function _cb (error) { if (error) { throw grunt.util.error("Error saving CSV files."); } next(); } } function _exportRaw (filename) { grunt.file.write(path.join("languagefiles", grunt.config("translate.masterLang"), filename+".json"), JSON.stringify(global.translate.exportTextData," ", 4)); next(); } }); };
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt frappe.provide("erpnext"); cur_frm.email_field = "email_id"; erpnext.LeadController = frappe.ui.form.Controller.extend({ setup: function() { this.frm.fields_dict.customer.get_query = function(doc, cdt, cdn) { return { query: "erpnext.controllers.queries.customer_query" } } }, onload: function() { if(cur_frm.fields_dict.lead_owner.df.options.match(/^User/)) { cur_frm.fields_dict.lead_owner.get_query = function(doc, cdt, cdn) { return { query: "frappe.core.doctype.user.user.user_query" } } } if(cur_frm.fields_dict.contact_by.df.options.match(/^User/)) { cur_frm.fields_dict.contact_by.get_query = function(doc, cdt, cdn) { return { query: "frappe.core.doctype.user.user.user_query" } } } }, refresh: function() { var doc = this.frm.doc; erpnext.toggle_naming_series(); frappe.dynamic_link = {doc: doc, fieldname: 'name', doctype: 'Lead'} if(!doc.__islocal && doc.__onload && !doc.__onload.is_customer) { this.frm.add_custom_button(__("Customer"), this.create_customer, __("Make")); this.frm.add_custom_button(__("Opportunity"), this.create_opportunity, __("Make")); this.frm.add_custom_button(__("Quotation"), this.make_quotation, __("Make")); } if(!this.frm.doc.__islocal) { frappe.contacts.render_address_and_contact(cur_frm); } else { frappe.contacts.clear_address_and_contact(cur_frm); } }, create_customer: function() { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.lead.lead.make_customer", frm: cur_frm }) }, create_opportunity: function() { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.lead.lead.make_opportunity", frm: cur_frm }) }, make_quotation: function() { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.lead.lead.make_quotation", frm: cur_frm }) }, organization_lead: function() { if (this.frm.doc.organization_lead == 1) { this.frm.set_df_property('company_name', 'reqd', 1); } else { this.frm.set_df_property('company_name', 'reqd', 0); } }, company_name: function() { if (this.frm.doc.organization_lead == 1) { this.frm.set_value("lead_name", this.frm.doc.company_name); } }, contact_date: function() { if (this.frm.doc.contact_date) { let d = moment(this.frm.doc.contact_date); d.add(1, "hours"); this.frm.set_value("ends_on", d.format(frappe.defaultDatetimeFormat)); } } }); $.extend(cur_frm.cscript, new erpnext.LeadController({frm: cur_frm}));
/** Simple js animation @author Dyan Galih Nugroho Wicaksi(galih_xp@yahoo.com) @version 1.0 @copyright 2008 **/ function janime(){ var DOMCapable; var heightnow = 0; var interval = null; var opacity; var xNow; var yNow; this.interval = 10; this.speed = 10; this.minHeight = 0; this.maxHeight = 50; this.element; document.getElementById ? DOMCapable = true : DOMCapable = false; slideDownOpen = function(speed,maxheight,element){ obj = document.getElementById(element); if((element != null) && (maxheight != undefined)){ if(DOMCapable){ for(i=0;i<speed;i++){ if(heightnow<maxheight){ heightnow += 1; obj.style.height = heightnow+"px"; }else{ clearInterval(interval); return; } } } }else{ clearInterval(interval); alert('no object to slide down'); return; } } slideDownClose = function(speed,minheight,element){ obj = document.getElementById(element); if(DOMCapable){ for(i=0;i<speed;i++){ if(heightnow>minheight){ heightnow -= 1; obj.style.height = heightnow+"px"; }else{ clearInterval(interval); return; } } } } moveMeTo = function(x,y,element){ obj = document.getElementById(element); nbr = Math.floor((xNow - x)/3); if(Math.abs(nbr) != 0){ xNow = xNow - nbr; }else{ xNow = x; } obj.style.left = xNow+"px"; obj.style.top = y+"px"; if(x == xNow){ clearInterval(interval); return; }; } setOpacity = function(opacity,element){ //write by Johan Känngård and modified by me var o=document.getElementById(element).style; opacityValue = (opacity/100); o.opacity=opacityValue; //Opera o.MozOpacity=opacityValue; //Mozilla+Firefox o.KhtmlOpacity=opacityValue; //Konqueror o.filter="alpha(opacity="+opacity+")"; //IE return true; } jFadeOut = function(speed,element){ for(i=0;i<speed;i++){ opacity--; setOpacity(opacity,element); if(opacity<=0){ clearInterval(interval); return; } } } jFadeIn = function(speed,element){ for(i=0;i<speed;i++){ opacity++; setOpacity(opacity,element); if(opacity>=100){ clearInterval(interval); return; } } } this.slideOpen = function(){ clearInterval(interval); slideStart = 'slideDownOpen('+this.speed+','+this.maxHeight+',"'+this.element+'")'; interval = setInterval(slideStart,this.interval); }; this.slideClose = function(){ clearInterval(interval); slideStart = 'slideDownClose('+this.speed+','+this.minHeight+',"'+this.element+'")'; interval = setInterval(slideStart,this.interval); }; this.alpha = function (opacity){ return setOpacity(opacity,this.element); }; this.moveTo = function(x,y){ obj = document.getElementById(this.element); xNow = (obj.style.left).substring(0,(obj.style.left).length-2); yNow = (obj.style.top).substring(0,(obj.style.top).length-2); xNow = new Number(xNow); yNow = new Number(yNow); //moveMeTo(x,y); clearInterval(interval); interval = setInterval('moveMeTo('+x+','+y+',"'+this.element+'")',this.interval); }; this.fadeOut = function(){ opacity = 100; clearInterval(interval); interval = setInterval('jFadeOut('+this.speed+',"'+this.element+'")',this.interval); //$("div").filter("."+this.element).fadeOut(this.speed); }; this.fadeIn = function(){ opacity = 0; clearInterval(interval); interval = setInterval('jFadeIn('+this.speed+',"'+this.element+'")',this.interval); //$("div").filter("."+this.element).fadeIn(this.speed); }; this.setContent = function(content){ var el = document.getElementById(this.element); el.innerHTML = content; } }
/* Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dijit._editor.plugins.Print"]){ dojo._hasResource["dijit._editor.plugins.Print"]=true; dojo.provide("dijit._editor.plugins.Print"); dojo.require("dijit._editor._Plugin"); dojo.require("dijit.form.Button"); dojo.require("dojo.i18n"); dojo.requireLocalization("dijit._editor","commands",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw"); dojo.declare("dijit._editor.plugins.Print",dijit._editor._Plugin,{_initButton:function(){ var _1=dojo.i18n.getLocalization("dijit._editor","commands"); this.button=new dijit.form.Button({label:_1["print"],showLabel:false,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"Print",tabIndex:"-1",onClick:dojo.hitch(this,"_print")}); },setEditor:function(_2){ this.editor=_2; this._initButton(); this.editor.onLoadDeferred.addCallback(dojo.hitch(this,function(){ if(!this.editor.iframe.contentWindow["print"]){ this.button.attr("disabled",true); } })); },_print:function(){ var _3=this.editor.iframe; if(_3.contentWindow["print"]){ if(!dojo.isOpera&&!dojo.isChrome){ dijit.focus(_3); _3.contentWindow.print(); }else{ var _4=this.editor.document; var _5=this.editor.attr("value"); _5="<html><head><meta http-equiv='Content-Type' "+"content='text/html; charset='UTF-8'></head><body>"+_5+"</body></html>"; var _6=window.open("javascript: ''","","status=0,menubar=0,location=0,toolbar=0,"+"width=1,height=1,resizable=0,scrollbars=0"); _6.document.open(); _6.document.write(_5); _6.document.close(); var _7=[]; var _8=_4.getElementsByTagName("style"); if(_8){ var i; for(i=0;i<_8.length;i++){ var _9=_8[i].innerHTML; var _a=_6.document.createElement("style"); _a.appendChild(_6.document.createTextNode(_9)); _6.document.getElementsByTagName("head")[0].appendChild(_a); } } _6.print(); _6.close(); } } }}); dojo.subscribe(dijit._scopeName+".Editor.getPlugin",null,function(o){ if(o.plugin){ return; } var _b=o.args.name.toLowerCase(); if(_b==="print"){ o.plugin=new dijit._editor.plugins.Print({command:"print"}); } }); }
({ block : 'i-bem', elem : 'html', mustDeps : [ { elem : 'i18n', mod : 'dummy', val : 'yes' } ] })
import React from 'react'; import cx from 'classnames'; import {Link, State} from 'react-router'; export default React.createClass( { mixins: [ State ], activeClassForTo( to ) { return cx( { active: this.isActive( to ) } ); }, render() { return ( <li className={this.activeClassForTo(this.props.to)}><Link {...this.props}>{this.props.children}</Link></li> ); } } );
'use strict'; // designed to give info to browser users, who are disturbed // when they see http errors in the console module.exports = function explainError(status, str) { if ('console' in global && 'info' in console) { console.info('The above ' + status + ' is totally normal. ' + str); } };
/* * Copyright 2011-2012 the original author or authors. * * 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 vertx = vertx || {}; if (!vertx.Buffer) { vertx.Buffer = function(p) { return new org.vertx.java.core.buffer.Buffer(p); } }
export type Action = { type: 'PUSH_NEW_ROUTE', route: string } | { type: 'POP_ROUTE' } | { type: 'POP_TO_ROUTE', route: string } | { type: 'REPLACE_ROUTE', route: string } | { type: 'REPLACE_OR_PUSH_ROUTE', route: string } | { type: 'OPEN_DRAWER'} | { type: 'CLOSE_DRAWER'} export type Dispatch = (action:Action | Array<Action>) => any; export type GetState = () => Object; export type PromiseAction = Promise<Action>;
(function( factory ) { if ( typeof define === "function" && define.amd ) { define( ["jquery", "../jquery.validate"], factory ); } else if (typeof module === "object" && module.exports) { module.exports = factory( require( "jquery" ) ); } else { factory( jQuery ); } }(function( $ ) { /* * Translated default messages for the jQuery validation plugin. * Locale: MY (Malay; Melayu) */ $.extend( $.validator.messages, { required: "Medan ini diperlukan.", remote: "Sila betulkan medan ini.", email: "Sila masukkan alamat emel yang betul.", url: "Sila masukkan URL yang betul.", date: "Sila masukkan tarikh yang betul.", dateISO: "Sila masukkan tarikh(ISO) yang betul.", number: "Sila masukkan nombor yang betul.", digits: "Sila masukkan nilai digit sahaja.", creditcard: "Sila masukkan nombor kredit kad yang betul.", equalTo: "Sila masukkan nilai yang sama semula.", extension: "Sila masukkan nilai yang telah diterima.", maxlength: $.validator.format( "Sila masukkan tidak lebih dari {0} aksara." ), minlength: $.validator.format( "Sila masukkan sekurang-kurangnya {0} aksara." ), rangelength: $.validator.format( "Sila masukkan antara {0} dan {1} panjang aksara." ), range: $.validator.format( "Sila masukkan nilai antara {0} dan {1} aksara." ), max: $.validator.format( "Sila masukkan nilai yang kurang atau sama dengan {0}." ), min: $.validator.format( "Sila masukkan nilai yang lebih atau sama dengan {0}." ) } ); return $; }));
define( ({ label1: "Olen demovidin.", label2: "See on seadistatav." }) );
// Copyright 2011, 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. /** * @author api.anash@gmail.com (Anash P. Oommen) */ /** * @fileoverview Defines AdsClient, a common base type for Ads services. */ goog.provide('google.ads.common.AuthToken'); goog.require('google.ads.common.AdsException'); goog.require('google.ads.common.AuthTokenErrorCode'); goog.require('google.ads.common.AuthTokenException'); goog.require('google.ads.common.CommonErrorMessages'); goog.require('google.system.core.ArgumentNullException'); goog.require('google.system.net.HttpWebTransportFactory'); /** * This class wraps the ClientLogin API. See * http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html * for details. * * @param {AppConfigBase} config Configuration. * @param {string} service Service name. * @param {string} email Email address. * @param {string} password Password. * @constructor */ google.ads.common.AuthToken = function(config, service, email, password) { if (goog.isNull(config)) { throw new google.system.core.ArgumentNullException('config'); } /** * Service name to include in the request. * @type {string} * @private */ this.service_ = service; /** * Account email address. * @type {string} * @private */ this.email_ = email; /** * Account password. * @type {string} * @private */ this.password_ = password; /** * Library configuration. Used to obtain the library configured Http * transport. * @type {string} * @private */ this.config_ = config; /** * Source to report request the token. * @type {string} * @private */ this.SOURCE_ = 'Google-' + this.config_.getSignature(); }; /** * Url endpoint for ClientLogin API. * * @private */ google.ads.common.AuthToken.prototype.URL_ = 'https://www.google.com/accounts/ClientLogin'; /** * The prefix to be appended for captcha urls. * * @private */ google.ads.common.AuthToken.prototype.CAPTCHA_URL_PREFIX_ = 'http://www.google.com/accounts/'; /** * Account type to be used with ClientLogin API. * * @private */ google.ads.common.AuthToken.prototype.ACCOUNT_TYPE_ = 'GOOGLE'; /** * Obtains a ClientLogin token for use with various Ads APIs. * * @param {function} onSuccess Callback function to be invoked in case of * success. The authtoken gets passed to the function. * @param {function} onError Callback function to be invoked in case of * error. The authentication exception is passed to the function. */ google.ads.common.AuthToken.prototype.getToken = function( onSuccess, onError) { var postParams = 'accountType=' + encodeURIComponent(this.ACCOUNT_TYPE_) + '&Email=' + encodeURIComponent(this.email_) + '&Passwd=' + encodeURIComponent(this.password_) + '&service=' + encodeURIComponent(this.service_) + '&source=' + encodeURIComponent(this.SOURCE_); var transport = google.system.net.HttpWebTransportFactory.create( this.config_.getHttpWebTransport(), this.config_.getHttpWebTransportSettings()); if (!goog.isNull(transport)) { transport.send(this.URL_, 'POST', postParams, null, 0, goog.bind( function(response) { var objResponse = this.parseResponse_(response); if (onSuccess != null) { onSuccess(objResponse['Auth']); } }, this), goog.bind(function(response) { var authException = this.extractException_(response); if (onError != null) { onError(authException); } }, this) ); } else { onError(new google.ads.common.AdsException('Can\'t instanciate web ' + 'transport ' + this.config_.getHttpWebTransport())); } }; /** * Extracts a ClientLogin failure and wraps it into an AuthTokenException. * * @param {string} response The Http web response. * @return {google.ads.common.AuthTokenException} An AuthTokenException * that corresponds to the parsed error response. * @private */ google.ads.common.AuthToken.prototype.extractException_ = function( response) { var tblResponse = this.parseResponse_(response); var url = tblResponse['Url']; var errCode = tblResponse['Error']; var info = tblResponse['Info']; var captchaToken = tblResponse['CaptchaToken']; var captchaUrl = this.CAPTCHA_URL_PREFIX_ + tblResponse['CaptchaUrl']; return new google.ads.common.AuthTokenException(errCode, info, url, captchaToken, captchaUrl, google.ads.common.CommonErrorMessages.AuthTokenLoginFailed); }; /** * Parses a ClientLogin response into a hashtable. * * @param {string} response The Http web response. * @return {Object} The parsed response as an object. * @private */ google.ads.common.AuthToken.prototype.parseResponse_ = function( response) { var tblResponse = {}; var splits = response.split('\n'); for (var i = 0; i < splits.length; i++) { var subsplits = splits[i].split('=', 2); if (subsplits.length == 2) { tblResponse[subsplits[0]] = subsplits[1]; } } return tblResponse; };
"use strict"; var jwt = require( 'jwt-simple' ), debug = require( 'debug' )( 'user-model' ); function getCredentials( req ) { var token = req.signedCookies[ req.app.get( 'authentication cookie name' ) ], creds = ( token ) ? jwt.decode( token, req.app.get( 'encryption key' ) ) : null; return creds; } module.exports = { getCredentials: getCredentials };
// Copyright (c) 2012 Ecma International. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- es5id: 12.10.1-3-s description: > with statement in strict mode throws SyntaxError (nested strict function) flags: [noStrict] ---*/ assert.throws(SyntaxError, function() { // wrapping it in eval since this needs to be a syntax error. The // exception thrown must be a SyntaxError exception. eval("\ function foo() {\ function f() {\ \'use strict\'; \ var o = {}; \ with (o) {};\ }\ }\ "); });
/* * Author: Zoltán Lajos Kis <zoltan.lajos.kis@ericsson.com> */ "use strict"; (function() { var util = require('util'); var ofp = require('../ofp.js'); var packet = require('../../packet.js'); var offsets = ofp.offsets.ofp_action_mpls_label; module.exports = { "unpack" : function(buffer, offset) { var action = { "header" : {"type" : 'OFPAT_SET_MPLS_LABEL'}, "body" : {} }; var len = buffer.readUInt16BE(offset + offsets.len, true); if (len != ofp.sizes.ofp_action_mpls_label) { return { "error" : { "desc" : util.format('%s action at offset %d has invalid length (%d).', action.header.type, offset, len), "type" : 'OFPET_BAD_ACTION', "code" : 'OFPBAC_BAD_LEN' } } } action.body.mpls_label = buffer.readUInt32BE(offset + offsets.mpls_label, true); if (action.body.mpls_label > packet.MPLS_LABEL_MAX) { return { "action" : action, "warnings" : [{ "desc" : util.format('%s action at offset %d has invalid label (%d).', action.header.type, offset, action.body.mpls_label), "type" : 'OFPET_BAD_ACTION', "code" : 'OFPBAC_BAD_OUT_ARGUMENT' }], "offset" : offset + len } } return { "action" : action, "offset" : offset + len } }, "pack" : function(action, buffer, offset) { if (buffer.length < offset + ofp.sizes.ofp_action_mpls_label) { return { error : { desc : util.format('%s action at offset %d does not fit the buffer.', action.header.type, offset)} } } buffer.writeUInt16BE(ofp.ofp_action_type.OFPAT_SET_MPLS_LABEL, offset + offsets.type, true); buffer.writeUInt16BE(ofp.sizes.ofp_action_mpls_label, offset + offsets.len, true); buffer.writeUInt32BE(action.body.mpls_label, offset + offsets.mpls_label, true); if (action.body.mpls_label > packet.MPLS_LABEL_MAX) { return { warnings: [{ desc: util.format('%s action at offset %d has invalid mpls label (%d).', action.header.type, offset, action.body.mpls_label) }], offset : offset + ofp.sizes.ofp_action_mpls_label } } return { offset : offset + ofp.sizes.ofp_action_mpls_label } } } })();
/** * Created by bivihoba on 22/01/14. */ "use strict"; module.exports = { Technology: function(bundle){ var Parent = new (require('./less.js').Technology)(bundle), _ = require('underscore'), fs = require('fs'); var technology = { name: 'less.ie9', fileExtension: 'less' }; var tech = _.extend({}, Parent, technology); return tech; } }
requirejs.config({ map : { "*" : { 'tquery.tvset' : 'plugins/tvset/tquery.tvset', } }, shim : { 'plugins/tvset/tquery.tvset' : [ 'three.js/examples/js/loaders/ColladaLoader', ] } });
export { SebmGoogleMap } from './directives/google-map'; export { SebmGoogleMapCircle } from './directives/google-map-circle'; export { SebmGoogleMapInfoWindow } from './directives/google-map-info-window'; export { SebmGoogleMapMarker } from './directives/google-map-marker'; export { SebmGoogleMapPolygon } from './directives/google-map-polygon'; export { SebmGoogleMapPolyline } from './directives/google-map-polyline'; export { SebmGoogleMapPolylinePoint } from './directives/google-map-polyline-point'; //# sourceMappingURL=directives.js.map
"use strict"; var Message_1 = require("../Message"); var SigninCard = (function () { function SigninCard(session) { this.session = session; this.data = { contentType: 'application/vnd.microsoft.card.signin', content: {} }; } SigninCard.prototype.text = function (prompts) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } if (prompts) { this.data.content.text = Message_1.fmtText(this.session, prompts, args); } return this; }; SigninCard.prototype.button = function (title, url) { if (title && url) { this.data.content.buttons = [{ type: 'signin', title: Message_1.fmtText(this.session, title), value: url }]; } return this; }; SigninCard.prototype.toAttachment = function () { return this.data; }; return SigninCard; }()); exports.SigninCard = SigninCard;
// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. const assert = require('assert'); assert.notStrictEqual(module, require.main); assert.notStrictEqual(module, process.mainModule);
'use strict'; exports.__esModule = true; var LIMIT = 200; exports.default = function (displayName) { var generatedClasses = {}; var warningSeen = false; return function (className) { if (!warningSeen) { generatedClasses[className] = true; if (Object.keys(generatedClasses).length >= LIMIT) { // Unable to find latestRule in test environment. /* eslint-disable no-console, prefer-template */ console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. ' + 'Consider using style property for frequently changed styles.\n' + 'Example:\n' + ' const StyledComp = styled.div`width: 100%;`\n' + ' <StyledComp style={{ background: background }} />'); warningSeen = true; generatedClasses = {}; } } }; }; module.exports = exports['default'];
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ 'use strict'; const models = require('./index'); /** * Network model. * * @extends models['Resource'] */ class Network extends models['Resource'] { /** * Create a Network. * @member {object} [properties] The Network Properties. * @member {string} [properties.fabricType] The Fabric Type. * @member {array} [properties.subnets] The List of subnets. * @member {string} [properties.friendlyName] The Friendly Name. * @member {string} [properties.networkType] The Network Type. */ constructor() { super(); } /** * Defines the metadata of Network * * @returns {object} metadata of Network * */ mapper() { return { required: false, serializedName: 'Network', type: { name: 'Composite', className: 'Network', modelProperties: { id: { required: false, readOnly: true, serializedName: 'id', type: { name: 'String' } }, name: { required: false, readOnly: true, serializedName: 'name', type: { name: 'String' } }, type: { required: false, readOnly: true, serializedName: 'type', type: { name: 'String' } }, location: { required: false, serializedName: 'location', type: { name: 'String' } }, properties: { required: false, serializedName: 'properties', type: { name: 'Composite', className: 'NetworkProperties' } } } } }; } } module.exports = Network;
(function (global, factory) { if (typeof define === "function" && define.amd) { define('element/locale/ua', ['module', 'exports'], factory); } else if (typeof exports !== "undefined") { factory(module, exports); } else { var mod = { exports: {} }; factory(mod, mod.exports); global.ELEMENT.lang = global.ELEMENT.lang || {}; global.ELEMENT.lang.ua = mod.exports; } })(this, function (module, exports) { 'use strict'; exports.__esModule = true; exports.default = { el: { colorpicker: { confirm: 'Обрати', clear: 'Очистити' }, datepicker: { now: 'Зараз', today: 'Сьогодні', cancel: 'Відміна', clear: 'Очистити', confirm: 'OK', selectDate: 'Вибрати дату', selectTime: 'Вибрати час', startDate: 'Дата початку', startTime: 'Час початку', endDate: 'Дата завершення', endTime: 'Час завершення', prevYear: 'Попередній Рік', nextYear: 'Наступний Рік', prevMonth: 'Попередній Місяць', nextMonth: 'Наступний Місяць', year: '', month1: 'Січень', month2: 'Лютий', month3: 'Березень', month4: 'Квітень', month5: 'Травень', month6: 'Червень', month7: 'Липень', month8: 'Серпень', month9: 'Вересень', month10: 'Жовтень', month11: 'Листопад', month12: 'Грудень', week: 'тиждень', weeks: { sun: 'Нд', mon: 'Пн', tue: 'Вт', wed: 'Ср', thu: 'Чт', fri: 'Пт', sat: 'Сб' }, months: { jan: 'Січ', feb: 'Лют', mar: 'Бер', apr: 'Кві', may: 'Тра', jun: 'Чер', jul: 'Лип', aug: 'Сер', sep: 'Вер', oct: 'Жов', nov: 'Лис', dec: 'Гру' } }, select: { loading: 'Завантаження', noMatch: 'Співпадінь не знайдено', noData: 'Немає даних', placeholder: 'Обрати' }, cascader: { noMatch: 'Співпадінь не знайдено', loading: 'Завантаження', placeholder: 'Обрати', noData: 'Немає даних' }, pagination: { goto: 'Перейти', pagesize: 'на сторінці', total: 'Всього {total}', pageClassifier: '' }, messagebox: { title: 'Повідомлення', confirm: 'OK', cancel: 'Відміна', error: 'Неприпустимий ввід даних' }, upload: { deleteTip: 'натисніть кнопку щоб видалити', delete: 'Видалити', preview: 'Перегляд', continue: 'Продовжити' }, table: { emptyText: 'Немає даних', confirmFilter: 'Підтвердити', resetFilter: 'Скинути', clearFilter: 'Все', sumText: 'Сума' }, tree: { emptyText: 'Немає даних' }, transfer: { noMatch: 'Співпадінь не знайдено', noData: 'Обрати', titles: ['Список 1', 'Список 2'], filterPlaceholder: 'Введіть ключове слово', noCheckedFormat: '{total} пунктів', hasCheckedFormat: '{checked}/{total} вибрано' }, image: { error: 'ПОМИЛКА' }, pageHeader: { title: 'Назад' }, popconfirm: { confirmButtonText: 'Так', cancelButtonText: 'Ні' } } }; module.exports = exports['default']; });
'use strict'; angular.module('angularPassportApp', [ 'ngCookies', 'ngResource', 'ngSanitize', 'ngRoute', 'http-auth-interceptor', 'ui.bootstrap', 'ui.scroll' ]) .config(function ($routeProvider, $locationProvider) { $routeProvider .when('/', { templateUrl: 'partials/main.html', controller: 'MainCtrl' }) .when('/blogs', { templateUrl: 'partials/blogs/list.html', controller: 'BlogsCtrl' }) .when('/blogs/create', { templateUrl: 'partials/blogs/create.html', controller: 'BlogsCtrl' }) .when('/blogs/:blogId/edit', { templateUrl: 'partials/blogs/edit.html', controller: 'BlogsCtrl' }) .when('/blogs/:blogId', { templateUrl: 'partials/blogs/view.html', controller: 'BlogsCtrl' }) .when('/login', { templateUrl: 'partials/login.html', controller: 'LoginCtrl' }) .when('/signup', { templateUrl: 'partials/signup.html', controller: 'SignupCtrl' }) .when('/playnow', { templateUrl: 'partials/playnow.html', controller: 'PlaynowCtrl' }) .when('/guide', { templateUrl: 'partials/guide.html', controller: 'GuideCtrl' }) .when('/contactus', { templateUrl: 'partials/contactus.html', controller: 'ContactusCtrl' }) .otherwise({ redirectTo: '/' }); $locationProvider.html5Mode(true); }) .run(function ($rootScope, $location, Auth) { //watching the value of the currentUser variable. $rootScope.$watch('currentUser', function(currentUser) { // if no currentUser and on a page that requires authorization then try to update it // will trigger 401s if user does not have a valid session if (!currentUser && (['/', '/login', '/logout', '/signup'].indexOf($location.path()) == -1 )) { Auth.currentUser(); } }); // On catching 401 errors, redirect to the login page. $rootScope.$on('event:auth-loginRequired', function() { $location.path('/login'); return false; }); });
module.exports = Base function Base() {} Base.prototype._getAll = function (mw) { return mw.stack.map(function (fn) { return fn.$of }) } Base.prototype._disableAll = function (mw) { mw.stack.forEach(function (fn) { fn.$of.disable() }) return this } Base.prototype._remove = function (mw, name) { var item = this._searchInStack(mw, name) if (item) { mw.remove(item) return true } return false } Base.prototype._callMethod = function (mw, action, name) { var item = this._searchInStack(mw, name) if (item) { return item.$of[action]() } return false } Base.prototype._getDirective = function (mw, name) { var item = this._searchInStack(mw, name) if (item) { return item.$of || item } return null } Base.prototype._searchInStack = function (mw, name) { var stack = mw.stack for (var i = 0, l = stack.length; i < l; i += 1) { var node = stack[i] if (node.$name === name || node.$of === name || node.name === name || node === name) { return node } } return false }
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.wst.jsdt.internal.compiler.util; import org.eclipse.wst.jsdt.core.compiler.CharOperation; /** * Hashtable of {char[] --> Object } */ public final class HashtableOfObject implements Cloneable { // to avoid using Enumerations, walk the individual tables skipping nulls public char[] keyTable[]; public Object valueTable[]; public int elementSize; // number of elements in the table int threshold; public HashtableOfObject() { this(13); } public HashtableOfObject(int size) { this.elementSize = 0; this.threshold = size; // size represents the expected number of elements int extraRoom = (int) (size * 1.75f); if (this.threshold == extraRoom) extraRoom++; this.keyTable = new char[extraRoom][]; this.valueTable = new Object[extraRoom]; } public Object clone() throws CloneNotSupportedException { HashtableOfObject result = (HashtableOfObject) super.clone(); result.elementSize = this.elementSize; result.threshold = this.threshold; int length = this.keyTable.length; result.keyTable = new char[length][]; System.arraycopy(this.keyTable, 0, result.keyTable, 0, length); length = this.valueTable.length; result.valueTable = new Object[length]; System.arraycopy(this.valueTable, 0, result.valueTable, 0, length); return result; } public boolean containsKey(char[] key) { int index = CharOperation.hashCode(key) % valueTable.length; int keyLength = key.length; char[] currentKey; while ((currentKey = keyTable[index]) != null) { if (currentKey.length == keyLength && CharOperation.equals(currentKey, key)) return true; index = (index + 1) % keyTable.length; } return false; } public Object get(char[] key) { int index = CharOperation.hashCode(key) % valueTable.length; int keyLength = key.length; char[] currentKey; while ((currentKey = keyTable[index]) != null) { if (currentKey.length == keyLength && CharOperation.equals(currentKey, key)) return valueTable[index]; index = (index + 1) % keyTable.length; } return null; } public Object put(char[] key, Object value) { int index = CharOperation.hashCode(key) % valueTable.length; int keyLength = key.length; char[] currentKey; while ((currentKey = keyTable[index]) != null) { if (currentKey.length == keyLength && CharOperation.equals(currentKey, key)) return valueTable[index] = value; index = (index + 1) % keyTable.length; } keyTable[index] = key; valueTable[index] = value; // assumes the threshold is never equal to the size of the table if (++elementSize > threshold) rehash(); return value; } public Object removeKey(char[] key) { int index = CharOperation.hashCode(key) % valueTable.length; int keyLength = key.length; char[] currentKey; while ((currentKey = keyTable[index]) != null) { if (currentKey.length == keyLength && CharOperation.equals(currentKey, key)) { Object value = valueTable[index]; elementSize--; keyTable[index] = null; valueTable[index] = null; rehash(); return value; } index = (index + 1) % keyTable.length; } return null; } private void rehash() { HashtableOfObject newHashtable = new HashtableOfObject(elementSize * 2); // double the number of expected elements char[] currentKey; for (int i = keyTable.length; --i >= 0;) if ((currentKey = keyTable[i]) != null) newHashtable.put(currentKey, valueTable[i]); this.keyTable = newHashtable.keyTable; this.valueTable = newHashtable.valueTable; this.threshold = newHashtable.threshold; } public int size() { return elementSize; } public String toString() { String s = ""; //$NON-NLS-1$ Object object; for (int i = 0, length = valueTable.length; i < length; i++) if ((object = valueTable[i]) != null) s += new String(keyTable[i]) + " -> " + object.toString() + "\n"; //$NON-NLS-2$ //$NON-NLS-1$ return s; } }
var T = require("./timbre.debug.js"); var assert = require("chai").assert; describe('T("timeout")', function() { it("new", function() { assert.equal(T("timeout").toString(), "TimeoutNode"); }); it("default properties", function() { var t = T("timeout"); assert.equal(t.timeout, 1000); assert.equal(t.currentTime, 0); }); it("fixed control-rate", function() { var t = T("timeout"); assert.isTrue(t.isKr ); assert.isFalse(t.isAr); t.ar(); assert.isTrue(t.isKr ); assert.isFalse(t.isAr); }); it("process() / emit 'ended' when timeout", function(done) { T("timeout", {timeout:100}).on("ended", function() { this.stop(); done(); }).start(); }); it("bang() reset timer", function(done) { var t = T("timeout", {timeout:50}, function() { assert(false); }).start(); T("interval", {interval:10, timeout:200}, function(count) { t.bang(); }).on("ended", function() { t.stop(); this.stop(); done(); }).start(); t.start(); }); after(function() { assert.equal(timbre.isPlaying, false); }); });
'use strict'; var async = require('async'); var db = require('../../database'); var user = require('../../user'); var sessionController = {}; sessionController.revoke = function(req, res, next) { if (!req.params.hasOwnProperty('uuid')) { return next(); } var _id; async.waterfall([ function (next) { db.getSortedSetRange('uid:' + req.uid + ':sessions', 0, -1, next); }, function (sids, done) { async.eachSeries(sids, function(sid, next) { db.sessionStore.get(sid, function(err, sessionObj) { if (err) { return next(err); } if (sessionObj && sessionObj.meta && sessionObj.meta.uuid === req.params.uuid) { _id = sid; done(); } else { next(); } }); }, next); }, function (next) { if (!_id) { return next(new Error('[[error:no-session-found]]')); } user.auth.revokeSession(_id, req.uid, next); } ], function(err) { if (err) { return res.status(500).send(err.message); } else { return res.sendStatus(200); } }); }; module.exports = sessionController;
/** @odoo-module **/ import FavoriteMenuLegacy from 'web.FavoriteMenu'; import CustomFavoriteItemLegacy from 'web.CustomFavoriteItem'; import { registry } from "@web/core/registry"; /** * Remove all components contained in the favorite menu registry except the CustomFavoriteItem * component for only the project sharing feature. */ export function prepareFavoriteMenuRegister() { let customFavoriteItemKey = 'favorite-generator-menu'; const keys = FavoriteMenuLegacy.registry.keys().filter(key => key !== customFavoriteItemKey); FavoriteMenuLegacy.registry = Object.assign(FavoriteMenuLegacy.registry, { map: {}, _scoreMapping: {}, _sortedKeys: null, }); FavoriteMenuLegacy.registry.add(customFavoriteItemKey, CustomFavoriteItemLegacy, 0); // notify the listeners, we keep only one key in this registry. for (const key of keys) { for (const callback of FavoriteMenuLegacy.registry.listeners) { callback(key, undefined); } } customFavoriteItemKey = 'custom-favorite-item'; const favoriteMenuRegistry = registry.category("favoriteMenu"); for (const [key, _] of favoriteMenuRegistry.getEntries()) { if (key !== customFavoriteItemKey) { favoriteMenuRegistry.remove(key); } } }
/** @odoo-module */ import options from 'web_editor.snippets.options'; options.registry.MasonryLayout = options.registry.SelectTemplate.extend({ /** * @constructor */ init() { this._super(...arguments); this.containerSelector = '> .container, > .container-fluid, > .o_container_small'; this.selectTemplateWidgetName = 'masonry_template_opt'; }, });
var g1 = newGlobal(); schedulegc(g1); gcslice(1); function testEq(b) { var a = deserialize(serialize(b)); } testEq(Array(1024).join(Array(1024).join((false))));
{ "a":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"] ,"A":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] ,"b":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"] ,"B":["January","February","March","April","May","June","July","August","September","October","November","December"] ,"c":"%a, %b %d, %Y %l:%M:%S %p %Z" ,"p":["AM","PM"] ,"P":["am","pm"] ,"x":"%y-%m-%d" ,"X":"%l:%M:%S %p" }
/** * An Ext.data.Types extension for portal.csw.OnlineResource * * See http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.Types */ Ext.define('portal.csw.OnlineResourceType', { singleton: true, requires: ['Ext.data.SortTypes', 'Ext.data.Types'] }, function() { Ext.apply(portal.csw.OnlineResourceType, { convert: function(v, data) { if (Ext.isArray(v)) { var newArray = []; for (var i = 0; i < v.length; i++) { newArray.push(this.convert(v[i])); } return newArray; } else if (v instanceof portal.csw.OnlineResource) { return v; }else if (Ext.isObject(v)) { return Ext.create('portal.csw.OnlineResource', v); } return null; }, sortType: Ext.data.SortTypes.none, type: 'portal.csw.OnlineResource' }); });
/// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the /// "Use Terms"). Any redistribution of this code must retain the above /// copyright and this notice and otherwise comply with the Use Terms. /** * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-2.js * @description Object.defineProperties will update [[Value]] attribute of indexed data property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false but not when both are false (8.12.9 - step Note & 10.a.ii.1) */ function testcase() { var obj = {}; Object.defineProperty(obj, "0", { value: 1001, writable: false, configurable: true }); Object.defineProperty(obj, "1", { value: 1003, writable: false, configurable: false }); try { Object.defineProperties(obj, { 0: { value: 1002 }, 1: { value: 1004 } }); return false; } catch (e) { return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true) && dataPropertyAttributesAreCorrect(obj, "1", 1003, false, false, false); } } runTestCase(testcase);
//// [typeOfSuperCall.ts] class C { } class D extends C { constructor() { var x: void = super(); } } //// [typeOfSuperCall.js] var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var C = /** @class */ (function () { function C() { } return C; }()); var D = /** @class */ (function (_super) { __extends(D, _super); function D() { var _this = this; var x = _this = _super.call(this) || this; return _this; } return D; }(C));
const React = require('react-native'); const { StyleSheet } = React; export default { container: { backgroundColor: '#FFF', }, mb10: { marginBottom: 10, }, mb35: { marginBottom: 35, }, };
'use strict'; const statusTextMap = { '100': 'Continue', '101': 'Switching Protocols', '102': 'Processing', '200': 'OK', '201': 'Created', '202': 'Accepted', '203': 'Non-Authoritative Information', '204': 'No Content', '205': 'Reset Content', '206': 'Partial Content', '207': 'Multi-Status', '208': 'Already Reported', '226': 'IM Used', '300': 'Multiple Choices', '301': 'Moved Permanently', '302': 'Found', '303': 'See Other', '304': 'Not Modified', '305': 'Use Proxy', '307': 'Temporary Redirect', '308': 'Permanent Redirect', '400': 'Bad Request', '401': 'Unauthorized', '402': 'Payment Required', '403': 'Forbidden', '404': 'Not Found', '405': 'Method Not Allowed', '406': 'Not Acceptable', '407': 'Proxy Authentication Required', '408': 'Request Timeout', '409': 'Conflict', '410': 'Gone', '411': 'Length Required', '412': 'Precondition Failed', '413': 'Payload Too Large', '414': 'URI Too Long', '415': 'Unsupported Media Type', '416': 'Range Not Satisfiable', '417': 'Expectation Failed', '418': 'I\'m a teapot', '421': 'Misdirected Request', '422': 'Unprocessable Entity', '423': 'Locked', '424': 'Failed Dependency', '425': 'Unordered Collection', '426': 'Upgrade Required', '428': 'Precondition Required', '429': 'Too Many Requests', '431': 'Request Header Fields Too Large', '451': 'Unavailable For Legal Reasons', '500': 'Internal Server Error', '501': 'Not Implemented', '502': 'Bad Gateway', '503': 'Service Unavailable', '504': 'Gateway Timeout', '505': 'HTTP Version Not Supported', '506': 'Variant Also Negotiates', '507': 'Insufficient Storage', '508': 'Loop Detected', '509': 'Bandwidth Limit Exceeded', '510': 'Not Extended', '511': 'Network Authentication Required' }; module.exports = statusTextMap;
/// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the /// "Use Terms"). Any redistribution of this code must retain the above /// copyright and this notice and otherwise comply with the Use Terms. /** * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-15.js * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e+20) */ function testcase() { return String.prototype.trim.call(1e+20) === "100000000000000000000"; } runTestCase(testcase);
// 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 { setPermissionOnObject, deletePermissionFromObject } from '../actions'; describe('Permissions Actions', () => { describe('deleting roles', () => { it('throws if a role is not in permissions', () => { const p = { admins: { names: ['abc'], roles: [] }, members: { names: [], roles: [] } }; expect(() => { deletePermissionFromObject(p, 'admins', 'names', 'pizza'); }).toThrow(); }); it('deletes roles', () => { const p = { admins: { names: ['abc', 'furbie'], roles: [] }, members: { names: [], roles: [] } }; const res = deletePermissionFromObject(p, 'admins', 'names', 'abc'); expect(res).toEqual({ admins: { names: ['furbie'], roles: [] }, members: { names: [], roles: [] } }); }); }); describe('adding roles', () => { it('throws if a role is already in permissions', () => { const p = { admins: { names: ['abc'], roles: [] }, members: { names: [], roles: [] } }; expect(() => { setPermissionOnObject(p, 'admins', 'names', 'abc'); }).toThrow(); }); it('adds if not already present', () => { const p = { admins: { names: ['abc'], roles: [] }, members: { names: [], roles: [] } }; const res = setPermissionOnObject(p, 'admins', 'names', 'test123'); expect(res).toEqual({ admins: { names: ['abc', 'test123'], roles: [] }, members: { names: [], roles: [] } }); }); }); });
import {mount} from 'enzyme'; import * as Preact from '#preact'; import {useRenderer} from '#preact/component/renderer'; describes.sandboxed('useRenderer', {}, (env) => { function Component({data, render}) { const value = useRenderer(render, data); return <div>{value}</div>; } it('should render a sync renderer', () => { const render = env.sandbox.stub().callsFake((data) => data.value); const data = {value: 'one'}; const props = {data, render}; const wrapper = mount(<Component {...props} />); expect(wrapper.html()).to.equal('<div>one</div>'); expect(render).to.be.calledOnce.calledWith(data); // Empty re-render with old data. wrapper.setProps({...props, inc: 1}); expect(wrapper.html()).to.equal('<div>one</div>'); // no change. expect(render).to.be.calledOnce; // no change. // Re-render with new data. wrapper.setProps({...props, data: {value: 'two'}}); expect(wrapper.html()).to.equal('<div>two</div>'); expect(render).to.be.calledTwice; }); it('should render an async renderer', () => { let renderCallback; const render = env.sandbox.stub().callsFake((data) => ({ then(callback) { renderCallback = () => callback(data.value); }, })); function resolve() { renderCallback(); renderCallback = null; wrapper.update(); } const data = {value: 'one'}; const props = {data, render}; // First render: start. const wrapper = mount(<Component {...props} />); expect(wrapper.html()).to.equal('<div></div>'); expect(render).to.be.calledOnce.calledWith(data); // First render: complete. resolve(); expect(wrapper.html()).to.equal('<div>one</div>'); expect(render).to.be.calledOnce; // no change. // Empty re-render with old data. wrapper.setProps({...props, inc: 1}); expect(wrapper.html()).to.equal('<div>one</div>'); // no change. expect(render).to.be.calledOnce; // no change. // Re-render: start. wrapper.setProps({...props, data: {value: 'two'}}); expect(wrapper.html()).to.equal('<div>one</div>'); // no change. expect(render).to.be.calledTwice; // Re-render: end. resolve(); expect(wrapper.html()).to.equal('<div>two</div>'); expect(render).to.be.calledTwice; }); it('should supersede an async renderer', () => { const renderCallbacks = []; const render = env.sandbox.stub().callsFake((data) => ({ then(callback) { renderCallbacks.push(() => callback(data.value)); }, })); function resolve(renderCallback) { renderCallback(); renderCallback = null; wrapper.update(); } const data = {value: 'one'}; const props = {data, render}; // First render: start. const wrapper = mount(<Component {...props} />); expect(wrapper.html()).to.equal('<div></div>'); expect(render).to.be.calledOnce; // Re-render: start. wrapper.setProps({...props, data: {value: 'two'}}); expect(wrapper.html()).to.equal('<div></div>'); // no change. expect(render).to.be.calledTwice; // Re-render: end. resolve(renderCallbacks[1]); expect(wrapper.html()).to.equal('<div>two</div>'); expect(render).to.be.calledTwice; // First render: end. resolve(renderCallbacks[0]); expect(wrapper.html()).to.equal('<div>two</div>'); expect(render).to.be.calledTwice; // no change. }); });
// test abs var assert = require('assert'); var math = require('../../../index'); describe('abs', function () { it('should return the abs value of a boolean', function () { assert.strictEqual(math.abs(true), 1); assert.strictEqual(math.abs(false), 0); }); it('should return the abs value of null', function () { assert.strictEqual(math.abs(null), 0); }); it('should return the abs value of a number', function () { assert.strictEqual(math.abs(-4.2), 4.2); assert.strictEqual(math.abs(-3.5), 3.5); assert.strictEqual(math.abs(100), 100); assert.strictEqual(math.abs(0), 0); }); it('should return the absolute value of a big number', function () { assert.deepEqual(math.abs(math.bignumber(-2.3)), math.bignumber(2.3)); assert.deepEqual(math.abs(math.bignumber('5e500')), math.bignumber('5e500')); assert.deepEqual(math.abs(math.bignumber('-5e500')), math.bignumber('5e500')); }); it('should return the absolute value of a complex number', function () { assert.equal(math.abs(math.complex(3, -4)), 5); assert.equal(math.abs(math.complex(1e200, -4e200)), 4.12310562561766e+200); }); it('should return the absolute value of a fraction', function () { var a = math.fraction('-1/3'); assert.equal(math.abs(a).toString(), '0.(3)'); assert.equal(a.toString(), '-0.(3)'); assert.equal(math.abs(math.fraction('1/3')).toString(), '0.(3)'); }); it('should convert a string to a number', function() { assert.strictEqual(math.abs('-2'), 2); }); it('should return the absolute value of all elements in an Array', function () { var a1 = math.abs([1,-2,3]); assert.ok(Array.isArray(a1)); assert.deepEqual(a1, [1,2,3]); a1 = math.abs([-2,-1,0,1,2]); assert.ok(Array.isArray(a1)); assert.deepEqual(a1, [2,1,0,1,2]); }); it('should return the absolute number of a complex number with zero', function () { assert.equal(math.abs(math.complex(1, 0)), 1); assert.equal(math.abs(math.complex(0, 1)), 1); assert.equal(math.abs(math.complex(0, 0)), 0); assert.equal(math.abs(math.complex(-1, 0)), 1); assert.equal(math.abs(math.complex(0, -1)), 1); }); it('should return the absolute value of all elements in a matrix', function () { var a1 = math.abs(math.matrix([1,-2,3])); assert.ok(a1 instanceof math.type.Matrix); assert.deepEqual(a1.size(), [3]); assert.deepEqual(a1.valueOf(), [1,2,3]); a1 = math.abs(math.matrix([-2,-1,0,1,2])); assert.ok(a1 instanceof math.type.Matrix); assert.deepEqual(a1.size(), [5]); assert.deepEqual(a1.valueOf(), [2,1,0,1,2]) }); it('should return the absolute value of a unit', function () { var u = math.abs(math.unit('5 m')); assert.equal(u.toString(), '5 m'); u = math.abs(math.unit('-5 m')); assert.equal(u.toString(), '5 m'); u = math.abs(math.unit('-283.15 degC')); assert.equal(u.toString(), '-263.15 degC'); }); it('should throw an error in case of invalid number of arguments', function() { assert.throws(function () {math.abs()}, /TypeError: Too few arguments/); assert.throws(function () {math.abs(1, 2)}, /TypeError: Too many arguments/); }); it('should throw an error in case of unsupported types', function () { assert.throws(function () {math.abs(new Date());}, /TypeError: Unexpected type of argument/); assert.throws(function () {math.abs(undefined);}, /TypeError: Unexpected type of argument/); }); it('should LaTeX abs', function () { var expression = math.parse('abs(-1)'); assert.equal(expression.toTex(),'\\left|-1\\right|'); }); });
var Alloy = require("alloy"), _ = require("alloy/underscore")._; Alloy.Collections = {}; Alloy.globals = {}; Alloy.CFG = require("alloy/CFG"); Alloy.createController("index");
angular.module('merchello.models').factory('productOptionUseCountBuilder', ['genericModelBuilder', 'entityUseCountBuilder' , 'ProductOptionUseCount', function(genericModelBuilder, entityUseCountBuilder, ProductOptionUseCount) { var Constructor = ProductOptionUseCount; return { createDefault: function() { return new Constructor(); }, transform: function(jsonResult) { var result = this.createDefault(); result.option = entityUseCountBuilder.transform(jsonResult.option); result.choices = entityUseCountBuilder.transform(jsonResult.choices); return result; } }; }]);
if (Meteor.isServer) { Meteor.publish('Counts.has', function (testId) { Counts.publish(this, 'posts' + testId, Posts.find({ testId: testId })); }); } if (Meteor.isClient) { var hasCount = function hasCount (testId) { return Counts.has('posts' + testId); } Tinytest.add('Counts.has: - when count is not published, return false', function (test, done) { test.isFalse(Counts.has('posts'), 'found unexpected count "posts"'); }); Tinytest.add('Counts.has: - when count is published but not subscribed, return false', function (test, done) { test.isFalse(hasCount(test.id), 'found unexpected count "posts' + test.id + '"'); }); Tinytest.addAsync('Counts.has: - when count is published and subscribed, return true', function (test, done) { Meteor.subscribe('Counts.has', test.id, function () { test.isTrue(hasCount(test.id), 'missing expected count "posts' + test.id + '"'); done(); }); }); }
$('#add_reward').click(function(e){ e.preventDefault() var new_reward = '<div class="reward">' + $($('.reward')[0]).html() + '</div>' new_reward = new_reward.replace(/\_0\_/g, '_' + rewards_id + '_') new_reward = new_reward.replace(/\[0\]/g, '[' + rewards_id + ']') new_reward = $(new_reward) new_reward.find('input').val(null) new_reward.find('textarea').html(null) new_reward.find('input').numeric(false) new_reward.find('input, textarea').removeClass('ok').removeClass('error') $('#rewards_wrapper').append(new_reward) new_reward.find('textarea').focus() rewards_count++ rewards_id++ }) var video_valid = null everything_ok = function(){ var all_ok = true if(video_valid == null) { all_ok = false verify_video() } if(!ok('#project_name')) all_ok = false if(!video_ok()) all_ok = false if(!ok('#project_about')) all_ok = false if(!headline_ok()) all_ok = false if(!ok('#project_category_id')) all_ok = false if(!goal_ok()) all_ok = false if(!expires_at_ok()) all_ok = false if(!rewards_ok()) all_ok = false if(!accepted_terms()) all_ok = false if(all_ok){ $('#project_submit').attr('disabled', false) } else { $('#project_submit').attr('disabled', true) } } ok = function(id){ var value = $(id).val() if(value && value.length > 0){ $(id).addClass("ok").removeClass("error") return true } else { $(id).addClass("error").removeClass("ok") return false } } verify_video = function(){ video_valid = false if(/http:\/\/(www\.)?vimeo.com\/(\d+)/.test($('#project_video_url').val())) { $('#project_video_url').removeClass("ok").removeClass("error").addClass('loading') $.get('/projects/vimeo/?url='+$('#project_video_url').val(), function(r){ $('#project_video_url').removeClass("loading") if(r.id==false){ video_valid = false } else { video_valid = true } everything_ok() }) } everything_ok() } video_ok = function(){ if(video_valid){ $('#project_video_url').addClass("ok").removeClass("error") return true } else { if(!$('#project_video_url').hasClass('loading')) $('#project_video_url').addClass("error").removeClass("ok") return false } } headline_ok = function(){ var value = $('#project_headline').val() if(value && value.length > 0 && value.length <= 140){ $('#project_headline').addClass("ok").removeClass("error") return true } else { $('#project_headline').addClass("error").removeClass("ok") return false } } goal_ok = function(){ var value = $('#project_goal').val() if(/^(\d+)$/.test(value) && parseInt(value) > 0){ $('#project_goal').addClass("ok").removeClass("error") return true } else { $('#project_goal').addClass("error").removeClass("ok") return false } } expires_at_ok = function(){ var value = /^(\d{2})\/(\d{2})\/(\d{4})?$/.exec($('#project_expires_at').val()) if(value && value.length == 4) { var year = parseFloat(value[3]) var month = parseFloat(value[2])-1 var day = parseFloat(value[1]) var date = new Date(year, month, day) var current_date = new Date() if(((day==date.getDate()) && (month==date.getMonth()) && (year==date.getFullYear())) && date > current_date){ $('#project_expires_at').addClass("ok").removeClass("error") return true } else { $('#project_expires_at').addClass("error").removeClass("ok") return false } } else { $('#project_expires_at').addClass("error").removeClass("ok") return false } } rewards_ok = function(){ var okey = true $('.reward input').each(function(){ if(/^(\d+)$/.test($(this).val())){ if(/minimum_value/.test($(this).attr('id'))){ if(parseInt($(this).val()) > 0) { $(this).addClass("ok").removeClass("error") } else { $(this).addClass("error").removeClass("ok") okey = false } } else { $(this).addClass("ok").removeClass("error") } } else { if(/maximum_backers/.test($(this).attr('id')) && (!$(this).val())){ $(this).addClass("ok").removeClass("error") } else { $(this).addClass("error").removeClass("ok") okey = false } } }) $('.reward textarea').each(function(){ if($(this).val() && $(this).val().length > 0){ $(this).addClass("ok").removeClass("error") } else { $(this).addClass("error").removeClass("ok") okey = false } }) return okey } accepted_terms = function(){ return $('#accept').is(':checked') } $('#project_name').keyup(everything_ok) $('#project_video_url').keyup(function(){ video_valid = false; everything_ok() }) $('#project_video_url').timedKeyup(verify_video) $('#project_about').keyup(everything_ok) $('#project_category_id').change(everything_ok) $('#project_goal').keyup(everything_ok) $('#project_expires_at').keyup(everything_ok) $('#project_headline').keyup(everything_ok) $('#accept').click(everything_ok) $('.reward input,.reward textarea').live('keyup', everything_ok) $('#project_goal').numeric(false) $('.reward input').numeric(false) $('#project_expires_at').datepicker({ altFormat: 'dd/mm/yy', onSelect: everything_ok }) $('input,textarea,select').live('focus', function(){ $('p.inline-hints').hide() $(this).next('p.inline-hints').show() }) $('.reward').live('mouseover', function(){ $('.remove_reward').hide() if(rewards_count > 1){ $(this).find('.remove_reward').show() } }) $('.reward').live('mouseout', function(){ $(this).find('.remove_reward').hide() }) $('.remove_reward').live('click', function(e){ e.preventDefault() if(rewards_count > 1){ reward = $(this).parentsUntil('.reward').parent() reward.remove() rewards_count-- } }) $('#project_name').focus() $('textarea').maxlength()
'use strict'; import * as db from 'data'; export function seed() { db.add({ name: 'Pesho', age: 15 }); db.add({ name: 'Mariya', age: 33 }); db.add({ name: 'Gosho', age: 38 }); };
module.exports = function( grunt ) { 'use strict'; grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: { options: { banner: '/*!\n' + '* <%= pkg.name %>\n' + '* v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + '* (c) <%= pkg.author.name %>;' + ' <%= _.pluck(pkg.licenses, "type").join(", ") %> License\n' + '*/', stripBanners: true }, dist: { files: { 'dist/getUserMedia.js': ['lib/getUserMedia.js'], 'dist/getUserMedia.noFallback.js': ['lib/getUserMedia.noFallback.js'] } } }, uglify: { options: { report: 'gzip', banner: '<%= concat.options.banner %>' }, dist: { files: { 'dist/getUserMedia.min.js': ['dist/getUserMedia.js'], 'dist/getUserMedia.noFallback.min.js': ['dist/getUserMedia.noFallback.js'] } } }, watch: { scripts: { files: '<%= jshint.all %>', tasks: ['test'] } }, connect: { server: { options: { base: '.', port: 8080 } } }, jshint: { options: { curly: true, eqeqeq: true, immed: true, latedef: true, newcap: true, noarg: true, sub: true, undef: true, boss: true, eqnull: true, node: true }, globals: { exports: true, module: true }, all: ['Gruntfile.js', 'lib/getUserMedia.js', 'lib/getUserMedia.noFallback.js'] } }); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-watch'); // Release grunt.registerTask('default', ['jshint','concat', 'uglify']); };
/* ------------------------------------------------------------------------------ * * # Stepy wizard * * Specific JS code additions for wizard_stepy.html page * * Version: 1.0 * Latest update: Aug 1, 2015 * * ---------------------------------------------------------------------------- */ $(function() { // Override defaults $.fn.stepy.defaults.legend = false; $.fn.stepy.defaults.transition = 'fade'; $.fn.stepy.defaults.duration = 150; $.fn.stepy.defaults.backLabel = '<i class="icon-arrow-left13 position-left"></i> Back'; $.fn.stepy.defaults.nextLabel = 'Next <i class="icon-arrow-right14 position-right"></i>'; // Wizard examples // ------------------------------ // Basic wizard setup $(".stepy-wizard").stepy({ "finishButton":true }); // Initialize plugins // ------------------------------ // Apply "Back" and "Next" button styling $('.stepy-step').find('.button-next').addClass('btn btn-primary'); $('.stepy-step').find('.button-back').addClass('btn btn-default'); // Select2 selects $('.select').select2(); // Styled checkboxes and radios $('.styled').uniform({ radioClass: 'choice' }); // Styled file input $('.file-styled').uniform({ wrapperClass: 'bg-warning', fileButtonHtml: '<i class="icon-googleplus5"></i>' }); });
var Reflux = require('reflux'); var Actions = require('../actions/actions'); var AuthStore = Reflux.createStore({ listenables: Actions, init: function () { this._githubtoken = window.localStorage.getItem('githubtoken') || false; }, onLogin: function (token) { this._githubtoken = token; window.localStorage.setItem('githubtoken', token); this.trigger(token); }, onLogout: function () { window.localStorage.clear(); this._githubtoken = false; this.trigger(this.authStatus()); }, authStatus: function () { return this._githubtoken; } }); module.exports = AuthStore;
define('lodash/lang/isArguments', ['exports', 'lodash/internal/isArrayLike', 'lodash/internal/isObjectLike'], function (exports, _lodashInternalIsArrayLike, _lodashInternalIsObjectLike) { 'use strict'; /** Used for native method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Native method references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is classified as an `arguments` object. * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ function isArguments(value) { return (0, _lodashInternalIsObjectLike['default'])(value) && (0, _lodashInternalIsArrayLike['default'])(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); } exports['default'] = isArguments; });
// Define list of available attributes for stroke and fill SVG._stroke = ['color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset'] SVG._fill = ['color', 'opacity', 'rule'] // Prepend correct color prefix var _colorPrefix = function(type, attr) { return attr == 'color' ? type : type + '-' + attr } /* Add sugar for fill and stroke */ ;['fill', 'stroke'].forEach(function(method) { var extension = {} extension[method] = function(o) { var indexOf if (typeof o == 'string' || SVG.Color.isRgb(o) || (o && typeof o.fill === 'function')) this.attr(method, o) else /* set all attributes from _fillAttr and _strokeAttr list */ for (index = SVG['_' + method].length - 1; index >= 0; index--) if (o[SVG['_' + method][index]] != null) this.attr(_colorPrefix(method, SVG['_' + method][index]), o[SVG['_' + method][index]]) return this } SVG.extend(SVG.Shape, SVG.FX, extension) }) SVG.extend(SVG.Element, SVG.FX, { // Rotation rotate: function(deg, x, y) { return this.transform({ rotation: deg || 0 , cx: x , cy: y }) } // Skew , skew: function(x, y) { return this.transform({ skewX: x || 0 , skewY: y || 0 }) } // Scale , scale: function(x, y) { return this.transform({ scaleX: x , scaleY: y == null ? x : y }) } // Translate , translate: function(x, y) { return this.transform({ x: x , y: y }) } // Matrix , matrix: function(m) { return this.transform({ matrix: m }) } // Opacity , opacity: function(value) { return this.attr('opacity', value) } }) if (SVG.Text) { SVG.extend(SVG.Text, SVG.FX, { // Set font font: function(o) { for (var key in o) key == 'anchor' ? this.attr('text-anchor', o[key]) : _styleAttr.indexOf(key) > -1 ? this.attr('font-'+ key, o[key]) : this.attr(key, o[key]) return this } }) }
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); var _exportNames = { listItemSecondaryActionClasses: true }; Object.defineProperty(exports, "default", { enumerable: true, get: function () { return _ListItemSecondaryAction.default; } }); Object.defineProperty(exports, "listItemSecondaryActionClasses", { enumerable: true, get: function () { return _listItemSecondaryActionClasses.default; } }); var _ListItemSecondaryAction = _interopRequireDefault(require("./ListItemSecondaryAction")); var _listItemSecondaryActionClasses = _interopRequireWildcard(require("./listItemSecondaryActionClasses")); Object.keys(_listItemSecondaryActionClasses).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _listItemSecondaryActionClasses[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _listItemSecondaryActionClasses[key]; } }); });
export const applicationSchema = { type: "object", properties: { name: { type: "string", title: "Name", description: "Name of application (displayed to users)." }, descrition: { type: "string", title: "Description", description: "Optional. Description of the application (displayed to users)." }, website_url: { type: "string", title: "Website URL", description: "URL of your application (displayed to users)." }, redirect_uris: { type: "string", title: "URL of your application (displayed to users).", description: "One redirect URI per line. This is your application's authorization callback URLs. HTTPS must be used for all hosts except localhost (for testing purposes)." }, client_type: { type: "string", title: "Description", description: "Select confidential if your application is capable of keeping the issued client secret confidential (e.g. a web application), select public if your application cannot (e.g. a browser-based JavaScript application). If you select public, your application MUST validate the redirect URI.", enum: ["Confidential", "Public"] } } }; export const tokenSchema = { type: "object", title: "Personal access token", properties: { name: { type: "string", title: "Name", description: "Give a name to your personal access token." } // "scopes": { // "type": "string", // "title": "Scopes", // "description": "Scopes assign permissions to your personal access token. A personal access token works just like a normal OAuth access token for authentication against the API.", // "enum": [ // "deposit:actions", // "deposit:write", // "user::email" // ] // } }, required: ["name"] };
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'find', 'tr', { find: 'Bul', findOptions: 'Seçenekleri Bul', findWhat: 'Aranan:', matchCase: 'Büyük/küçük harf duyarlı', matchCyclic: 'Eşleşen döngü', matchWord: 'Kelimenin tamamı uysun', notFoundMsg: 'Belirtilen yazı bulunamadı.', replace: 'Değiştir', replaceAll: 'Tümünü Değiştir', replaceSuccessMsg: '%1 bulunanlardan değiştirildi.', replaceWith: 'Bununla değiştir:', title: 'Bul ve Değiştir' } );
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const serializer_1 = require("./serializer"); const schema_tree_1 = require("./schema-tree"); const error_1 = require("./error"); require("./mimetypes"); class InvalidJsonPath extends error_1.JsonSchemaErrorBase { } exports.InvalidJsonPath = InvalidJsonPath; // The schema tree node property of the SchemaClass. const kSchemaNode = Symbol('schema-node'); // The value property of the SchemaClass. const kOriginalRoot = Symbol('schema-value'); /** * Splits a JSON path string into fragments. Fragments can be used to get the value referenced * by the path. For example, a path of "a[3].foo.bar[2]" would give you a fragment array of * ["a", 3, "foo", "bar", 2]. * @param path The JSON string to parse. * @returns {string[]} The fragments for the string. * @private */ function _parseJsonPath(path) { const fragments = (path || '').split(/\./g); const result = []; while (fragments.length > 0) { const fragment = fragments.shift(); const match = fragment.match(/([^\[]+)((\[.*\])*)/); if (!match) { throw new InvalidJsonPath(); } result.push(match[1]); if (match[2]) { const indices = match[2].slice(1, -1).split(']['); result.push(...indices); } } return result.filter(fragment => !!fragment); } /** Get a SchemaTreeNode from the JSON path string. */ function _getSchemaNodeForPath(rootMetaData, path) { let fragments = _parseJsonPath(path); // TODO: make this work with union (oneOf) schemas return fragments.reduce((md, current) => { return md && md.children && md.children[current]; }, rootMetaData); } class SchemaClassBase { constructor(schema, value, ...fallbacks) { this[kOriginalRoot] = value; const forward = fallbacks.length > 0 ? (new SchemaClassBase(schema, fallbacks.pop(), ...fallbacks).$$schema()) : null; this[kSchemaNode] = new schema_tree_1.RootSchemaTreeNode(this, { forward, value, schema }); } $$root() { return this; } $$schema() { return this[kSchemaNode]; } $$originalRoot() { return this[kOriginalRoot]; } /** Sets the value of a destination if the value is currently undefined. */ $$alias(source, destination) { let sourceSchemaTreeNode = _getSchemaNodeForPath(this.$$schema(), source); if (!sourceSchemaTreeNode) { return false; } const fragments = _parseJsonPath(destination); const maybeValue = fragments.reduce((value, current) => { return value && value[current]; }, this.$$originalRoot()); if (maybeValue !== undefined) { sourceSchemaTreeNode.set(maybeValue); return true; } return false; } /** Destroy all links between schemas to allow for GC. */ $$dispose() { this.$$schema().dispose(); } /** Get a value from a JSON path. */ $$get(path) { const node = _getSchemaNodeForPath(this.$$schema(), path); return node ? node.get() : undefined; } /** Set a value from a JSON path. */ $$set(path, value) { const node = _getSchemaNodeForPath(this.$$schema(), path); if (node) { node.set(value); } else { // This might be inside an object that can have additionalProperties, so // a TreeNode would not exist. const splitPath = _parseJsonPath(path); if (!splitPath) { return undefined; } const parent = splitPath .slice(0, -1) .reduce((parent, curr) => parent && parent[curr], this); if (parent) { parent[splitPath[splitPath.length - 1]] = value; } } } /** Get the Schema associated with a path. */ $$typeOf(path) { const node = _getSchemaNodeForPath(this.$$schema(), path); return node ? node.type : null; } $$defined(path) { const node = _getSchemaNodeForPath(this.$$schema(), path); return node ? node.defined : false; } $$delete(path) { const node = _getSchemaNodeForPath(this.$$schema(), path); if (node) { node.destroy(); } } /** Serialize into a string. */ $$serialize(mimetype = 'application/json', ...options) { let str = ''; const serializer = serializer_1.Serializer.fromMimetype(mimetype, (s) => str += s, ...options); serializer.start(); this.$$schema().serialize(serializer); serializer.end(); return str; } } /** * Create a class from a JSON SCHEMA object. Instanciating that class with an object * allows for extended behaviour. * This is the base API to access the Configuration in the CLI. * @param schema * @returns {GeneratedSchemaClass} * @constructor */ function SchemaClassFactory(schema) { class GeneratedSchemaClass extends SchemaClassBase { constructor(value, ...fallbacks) { super(schema, value, ...fallbacks); } } return GeneratedSchemaClass; } exports.SchemaClassFactory = SchemaClassFactory; //# sourceMappingURL=/users/hans/sources/angular-cli/src/schema-class-factory.js.map
export * from './dist/npm/es6/src';
/* * jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz * * Copyright (c) 2013 Michael Pratt * * is released under the MIT License http://www.opensource.org/licenses/mit-license.php * * Spread the word, link to us if you can. */ jQuery.extend(jQuery.fn.socialSharePrivacy.settings.services.delicious, { 'txt_info' : 'Dos Clics para mayor privacidad: Al dar clic, se activar&aacute; el bot&oacute;n y podr&aacute; guardar sus favoritos en Delicious. Una vez activado, datos ser&aacute;n enviados a Delicious. Para mayor informaci&oacute;n ver el icono <em>i</em>', 'txt_off' : 'sin conexion a Delicious', 'txt_on' : 'connectado a Delicious', 'txt_button' : 'Guardar' });
var config = require('../../config/authorities.config'); /** * 查询权限 * @param {Object} req * @param {Object} res */ module.exports = function (req, res) { res.status(200).json(config); };
/** * Copyright (C) 2005-2016 Alfresco Software Limited. * * This file is part of Alfresco * * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Alfresco is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Alfresco. If not, see <http://www.gnu.org/licenses/>. */ /** * This extends the regular paginating list to support the ability to simulate that a request is in progress. * * @module aikauTesting/widgets/lists/BlockableSortablePaginatedList * @extends module:alfresco/lists/AlfSortablePaginatedList * @author Dave Draper * @since 1.0.75 */ define(["dojo/_base/declare", "alfresco/lists/AlfSortablePaginatedList", "dojo/_base/lang"], function(declare, AlfSortablePaginatedList, lang) { return declare([AlfSortablePaginatedList], { /** * Called after properties mixed into instance * * @instance */ postMixInProperties: function aikauTesting_widgets_lists_BlockableSortablePaginatedList__postMixInProperties() { this.inherited(arguments); // Set up a subscription to block requests... this.alfSubscribe("BLOCK_REQUESTS", lang.hitch(this, function(payload) { this.requestInProgress = payload.value; })); } }); });
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum } attributes * * @path ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T3.js * @description Checking DontEnum attribute */ if (Date.UTC.propertyIsEnumerable('length')) { $ERROR('#1: The Date.UTC.length property has the attribute DontEnum'); } for(x in Date.UTC) { if(x === "length") { $ERROR('#2: The Date.UTC.length has the attribute DontEnum'); } }
<b>{1}</b>
/* * Globalize Culture be-BY * * 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 */ (function( window, undefined ) { var Globalize; if ( typeof require !== "undefined" && typeof exports !== "undefined" && typeof module !== "undefined" ) { // Assume CommonJS Globalize = require( "globalize" ); } else { // Global variable Globalize = window.Globalize; } Globalize.addCultureInfo( "be-BY", "default", { name: "be-BY", englishName: "Belarusian (Belarus)", nativeName: "Беларускі (Беларусь)", language: "be", numberFormat: { ",": " ", ".": ",", percent: { ",": " ", ".": "," }, currency: { pattern: ["-n $","n $"], ",": " ", ".": ",", symbol: "р." } }, calendars: { standard: { "/": ".", firstDay: 1, days: { names: ["нядзеля","панядзелак","аўторак","серада","чацвер","пятніца","субота"], namesAbbr: ["нд","пн","аў","ср","чц","пт","сб"], namesShort: ["нд","пн","аў","ср","чц","пт","сб"] }, months: { names: ["Студзень","Люты","Сакавік","Красавік","Май","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Снежань",""], namesAbbr: ["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне",""] }, monthsGenitive: { names: ["студзеня","лютага","сакавіка","красавіка","мая","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","снежня",""], namesAbbr: ["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне",""] }, AM: null, PM: null, patterns: { d: "dd.MM.yyyy", D: "d MMMM yyyy", t: "H:mm", T: "H:mm:ss", f: "d MMMM yyyy H:mm", F: "d MMMM yyyy H:mm:ss", M: "d MMMM", Y: "MMMM yyyy" } } } }); }( this ));
/** * 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. * * @flow */ 'use strict'; const BananaSlugAbstractNodeMeasurer = require('./BananaSlugAbstractNodeMeasurer'); import type { Measurement, } from './BananaSlugTypes'; const DUMMY = { bottom: 0, expiration: 0, height: 0, id: '', left: 0, right: 0, scrollX: 0, scrollY: 0, top: 0, width: 0, }; class BananaSlugWebNodeMeasurer extends BananaSlugAbstractNodeMeasurer { measureImpl(node: any): Measurement { if (!node || typeof node.getBoundingClientRect !== 'function') { return DUMMY; } var rect = node.getBoundingClientRect(); var scrollX = Math.max( document.body ? document.body.scrollLeft : 0, document.documentElement.scrollLeft, window.pageXOffset || 0, window.scrollX || 0, ); var scrollY = Math.max( document.body ? document.body.scrollTop : 0, document.documentElement.scrollTop, window.pageYOffset || 0, window.scrollY || 0, ); return { bottom: rect.bottom, expiration: 0, height: rect.height, id: '', left: rect.left, right: rect.right, scrollX, scrollY, top: rect.top, width: rect.width, }; } } module.exports = BananaSlugWebNodeMeasurer;
"use strict"; const mediaQueryListCommaWhitespaceChecker = require("../mediaQueryListCommaWhitespaceChecker"); const ruleMessages = require("../../utils/ruleMessages"); const validateOptions = require("../../utils/validateOptions"); const whitespaceChecker = require("../../utils/whitespaceChecker"); const ruleName = "media-query-list-comma-space-after"; const messages = ruleMessages(ruleName, { expectedAfter: () => 'Expected single space after ","', rejectedAfter: () => 'Unexpected whitespace after ","', expectedAfterSingleLine: () => 'Expected single space after "," in a single-line list', rejectedAfterSingleLine: () => 'Unexpected whitespace after "," in a single-line list' }); const rule = function(expectation) { const checker = whitespaceChecker("space", expectation, messages); return (root, result) => { const validOptions = validateOptions(result, ruleName, { actual: expectation, possible: ["always", "never", "always-single-line", "never-single-line"] }); if (!validOptions) { return; } mediaQueryListCommaWhitespaceChecker({ root, result, locationChecker: checker.after, checkedRuleName: ruleName }); }; }; rule.ruleName = ruleName; rule.messages = messages; module.exports = rule;
#!/usr/bin/env node var amqp = require('amqplib'); amqp.connect('amqp://localhost').then(function(conn) { return conn.createChannel().then(function(ch) { var q = 'hello'; var msg = 'Hello World!'; var ok = ch.assertQueue(q, {durable: false}); return ok.then(function(_qok) { // NB: `sentToQueue` and `publish` both return a boolean // indicating whether it's OK to send again straight away, or // (when `false`) that you should wait for the event `'drain'` // to fire before writing again. We're just doing the one write, // so we'll ignore it. ch.sendToQueue(q, Buffer.from(msg)); console.log(" [x] Sent '%s'", msg); return ch.close(); }); }).finally(function() { conn.close(); }); }).catch(console.warn);
'use strict'; var utils = require('../utils'); /** * Delete a value from `app`. * * ```json * # delete a value from package.json config (e.g. `verb` object) * $ app --del=config.foo * # delete a value from in-memory options * $ app --del=option.foo * # delete a property from the global config store * $ app --del=globals.foo * ``` * @name del * @api public */ module.exports = function(app) { return function(prop, key, config, next) { if (typeof prop === 'undefined') { next(); return; } if (utils.isObject(prop)) { var temp = prop; for (var k in temp) { if (temp.hasOwnProperty(k)) { prop = k + ':' + temp[k]; } } } var keys = prop.split('.'); var init = keys.shift(); utils.assertPlugins(app, init); prop = keys.join('.'); switch (init) { case 'pkg': app.pkg.del(prop); app.pkg.save(); break; case 'config': app.pkg.del(app._name, prop); app.pkg.save(); break; case 'globals': app.globals.del(prop); break; case 'store': app.store.del(prop); break; case 'hints': if (typeof app.questions !== 'undefined') { app.questions.hints.del(Object.keys(app.questions.hints.data)); } break; case 'option': app.del(['options', prop]); break; case 'data': app.del(['cache.data', prop]); break; default: app.del(prop); break; } next(); }; };
import React from 'react' import renderer from 'react-test-renderer' import FlowRow from '../../../components/FlowTable/FlowRow' import { TFlow } from '../../ducks/tutils' describe('FlowRow Component', () => { let tFlow = new TFlow(), selectFn = jest.fn(), flowRow = renderer.create(<FlowRow flow={tFlow} onSelect={selectFn}/>), tree = flowRow.toJSON() it('should render correctly', () => { expect(tree).toMatchSnapshot() }) it('should handle click', () => { tree.props.onClick() expect(selectFn).toBeCalledWith(tFlow.id) }) })
var test = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
import React, {Component, PropTypes} from 'react'; import { Step, Stepper, StepLabel, StepContent, } from 'src/Stepper'; import RaisedButton from 'src/RaisedButton'; import FlatButton from 'src/FlatButton'; class VerticalLinearStepper extends Component { static contextTypes = { muiTheme: PropTypes.object.isRequired, }; state = { finished: false, stepIndex: 0, }; handleNext = () => { const {stepIndex} = this.state; this.setState({stepIndex: stepIndex + 1}); }; handlePrev = () => { const {stepIndex} = this.state; this.setState({stepIndex: stepIndex - 1}); }; renderStepActions(step) { const {stepIndex} = this.state; return ( <div style={{margin: '12px 0'}}> <RaisedButton label={stepIndex === 2 ? 'Finish' : 'Next'} disableTouchRipple={true} disableFocusRipple={true} primary={true} onTouchTap={this.handleNext} style={{marginRight: 12}} /> {step > 0 && ( <FlatButton label="Back" disabled={stepIndex === 0} disableTouchRipple={true} disableFocusRipple={true} onTouchTap={this.handlePrev} /> )} </div> ); } render() { const {stepIndex} = this.state; return ( <Stepper activeStep={stepIndex} orientation="vertical" style={{width: 380, margin: 'auto'}}> <Step> <StepLabel>Select campaign settings</StepLabel> <StepContent transitionDuration={10}> <p data-test-content={0}> For each ad campaign that you create, you can control how much you're willing to spend on clicks and conversions, which networks and geographical locations you want your ads to show on, and more. </p> {this.renderStepActions(0)} </StepContent> </Step> <Step> <StepLabel>Create an ad group</StepLabel> <StepContent transitionDuration={10}> <p data-test-content={1}>An ad group contains one or more ads which target a shared set of keywords.</p> {this.renderStepActions(1)} </StepContent> </Step> <Step> <StepLabel>Create an ad</StepLabel> <StepContent transitionDuration={10}> <p data-test-content={2}> Try out different ad text to see what brings in the most customers, and learn how to enhance your ads using features like ad extensions. If you run into any problems with your ads, find out how to tell if they're running and how to resolve approval issues. </p> {this.renderStepActions(2)} </StepContent> </Step> </Stepper> ); } } export default VerticalLinearStepper;
import { settings } from '../../settings'; settings.addGroup('OTR', function() { this.add('OTR_Enable', true, { type: 'boolean', i18nLabel: 'Enabled', public: true, }); });
/*! * OOUI v0.27.4 * https://www.mediawiki.org/wiki/OOUI * * Copyright 2011–2018 OOUI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * * Date: 2018-06-27T17:25:08Z */ ( function ( OO ) { 'use strict'; /** * @class * @extends OO.ui.Theme * * @constructor */ OO.ui.WikimediaUITheme = function OoUiWikimediaUITheme() { // Parent constructor OO.ui.WikimediaUITheme.parent.call( this ); }; /* Setup */ OO.inheritClass( OO.ui.WikimediaUITheme, OO.ui.Theme ); /* Methods */ /** * @inheritdoc */ OO.ui.WikimediaUITheme.prototype.getElementClasses = function ( element ) { // Parent method var variant, isFramed, isActive, isToolOrGroup, variants = { warning: false, invert: false, progressive: false, destructive: false }, // Parent method classes = OO.ui.WikimediaUITheme.parent.prototype.getElementClasses.call( this, element ); if ( element instanceof OO.ui.IconWidget && element.$element.hasClass( 'oo-ui-checkboxInputWidget-checkIcon' ) ) { // Icon on CheckboxInputWidget variants.invert = true; } else if ( element.supports( [ 'hasFlag' ] ) ) { isFramed = element.supports( [ 'isFramed' ] ) && element.isFramed(); isActive = element.supports( [ 'isActive' ] ) && element.isActive(); isToolOrGroup = // Check if the class exists, as classes that are not in the 'core' module may not be loaded ( OO.ui.Tool && element instanceof OO.ui.Tool ) || ( OO.ui.ToolGroup && element instanceof OO.ui.ToolGroup ); if ( // Button with a dark background isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) || // Toolbar with a dark background isToolOrGroup && element.hasFlag( 'primary' ) ) { // … use white icon / indicator, regardless of other flags variants.invert = true; } else if ( !isFramed && element.isDisabled() ) { // Frameless disabled button, always use black icon / indicator regardless of other flags variants.invert = false; } else if ( !element.isDisabled() ) { // Any other kind of button, use the right colored icon / indicator if available variants.progressive = element.hasFlag( 'progressive' ) || // Active tools/toolgroups ( isToolOrGroup && isActive ) || // Pressed or selected outline/menu option widgets ( ( element instanceof OO.ui.MenuOptionWidget || // Check if the class exists, as classes that are not in the 'core' module may not be loaded ( OO.ui.OutlineOptionWidget && element instanceof OO.ui.OutlineOptionWidget ) ) && ( element.isPressed() || element.isSelected() ) ); variants.destructive = element.hasFlag( 'destructive' ); variants.warning = element.hasFlag( 'warning' ); } } for ( variant in variants ) { classes[ variants[ variant ] ? 'on' : 'off' ].push( 'oo-ui-image-' + variant ); } return classes; }; /** * @inheritdoc */ OO.ui.WikimediaUITheme.prototype.getDialogTransitionDuration = function () { return 250; }; /* Instantiation */ OO.ui.theme = new OO.ui.WikimediaUITheme(); }( OO ) ); //# sourceMappingURL=oojs-ui-wikimediaui.js.map.json
if (typeof window !== 'undefined') { var waitSeconds = 100; var head = document.getElementsByTagName('head')[0]; // get all link tags in the page var links = document.getElementsByTagName('link'); var linkHrefs = []; for (var i = 0; i < links.length; i++) { linkHrefs.push(links[i].href); } var isWebkit = !!window.navigator.userAgent.match(/AppleWebKit\/([^ ;]*)/); var webkitLoadCheck = function(link, callback) { setTimeout(function() { for (var i = 0; i < document.styleSheets.length; i++) { var sheet = document.styleSheets[i]; if (sheet.href == link.href) return callback(); } webkitLoadCheck(link, callback); }, 10); } var noop = function() {} var loadCSS = function(url) { return new Promise(function(resolve, reject) { var timeout = setTimeout(function() { reject('Unable to load CSS'); }, waitSeconds * 1000); var _callback = function() { clearTimeout(timeout); link.onload = noop; setTimeout(function() { resolve(''); }, 7); } var link = document.createElement('link'); link.type = 'text/css'; link.rel = 'stylesheet'; link.href = url; if (!isWebkit) link.onload = _callback; else webkitLoadCheck(link, _callback); head.appendChild(link); }); } exports.fetch = function(load) { // dont reload styles loaded in the head for (var i = 0; i < linkHrefs.length; i++) if (load.address == linkHrefs[i]) return ''; return loadCSS(load.address); } } else { // setting format = 'defined' means we're managing our own output exports.translate = function(load) { load.metadata.format = 'defined'; } exports.bundle = function(loads, opts) { var loader = this; if (loader.buildCSS === false) return ''; return loader.import('./css-builder', { name: module.id }).then(function(builder) { return builder.call(loader, loads, opts); }); } }
'use strict'; var async = require('async'); var batch = require('../../batch'); var db = require('../../database'); module.exports = { name: 'Fix topics in categories per user if they were moved', timestamp: Date.UTC(2018, 0, 22), method: function (callback) { var progress = this.progress; batch.processSortedSet('topics:tid', function (tids, next) { async.eachLimit(tids, 500, function (tid, _next) { progress.incr(); var topicData; async.waterfall([ function (next) { db.getObjectFields('topic:' + tid, ['cid', 'tid', 'uid', 'oldCid', 'timestamp'], next); }, function (_topicData, next) { topicData = _topicData; if (!topicData.cid || !topicData.oldCid) { return _next(); } db.isSortedSetMember('cid:' + topicData.oldCid + ':uid:' + topicData.uid, topicData.tid, next); }, function (isMember, next) { if (isMember) { async.series([ function (next) { db.sortedSetRemove('cid:' + topicData.oldCid + ':uid:' + topicData.uid + ':tids', tid, next); }, function (next) { db.sortedSetAdd('cid:' + topicData.cid + ':uid:' + topicData.uid + ':tids', topicData.timestamp, tid, next); }, ], function (err) { next(err); }); } else { next(); } }, ], _next); }, next); }, { progress: progress, batch: 500, }, callback); }, };
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //----------------------------------------------------------------------------- var BUGNUMBER = 463259; var summary = 'Do not assert: VALUE_IS_FUNCTION(cx, fval)'; var actual = ''; var expect = ''; printBugNumber(BUGNUMBER); printStatus (summary); try { (function(){ eval("(function(){ for (var j=0;j<4;++j) if (j==3) undefined(); })();"); })(); } catch(ex) { } reportCompare(expect, actual, summary);
define([ 'jquery', 'backbone', 'teams/js/collections/team', 'teams/js/views/teams', 'teams/js/spec_helpers/team_spec_helpers' ], function($, Backbone, TeamCollection, TeamsView, TeamSpecHelpers) { 'use strict'; var createTeamsView; describe('Teams View', function() { beforeEach(function() { setFixtures('<div class="teams-container"></div>'); }); createTeamsView = function(options) { var MockTeamsView = TeamsView.extend({ // eslint-disable-next-line no-unused-vars getTopic: function(topicId) { return $.Deferred().resolve(TeamSpecHelpers.createMockTopic({ id: topicId, name: 'teamset-name-' + topicId, })); }, }); return new MockTeamsView({ el: '.teams-container', collection: options.teams || TeamSpecHelpers.createMockTeams(), showActions: true, showTeamset: options.showTeamset, context: TeamSpecHelpers.testContext }).render(); }; it('can render itself', function() { var testTeamData = TeamSpecHelpers.createMockTeamData(1, 5), teamsView = createTeamsView({ teams: TeamSpecHelpers.createMockTeams({ results: testTeamData }) }); var footerEl = teamsView.$('.teams-paging-footer'); expect(teamsView.$('.teams-paging-header').text()).toMatch('Showing 1-5 out of 6 total'); expect(footerEl.text()).toMatch('1\\s+out of\\s+\/\\s+2'); // eslint-disable-line no-useless-escape expect(footerEl).not.toHaveClass('hidden'); TeamSpecHelpers.verifyCards(teamsView, testTeamData, false); }); it('forwards the showTeamset option to loaded team cards)', function() { var testTeamData = TeamSpecHelpers.createMockTeamData(1, 5), teamsView = createTeamsView({ teams: TeamSpecHelpers.createMockTeams({ results: testTeamData }), showTeamset: true, }); TeamSpecHelpers.verifyCards(teamsView, testTeamData, true); }); }); });
import Feature from '../../../../src/ol/Feature.js'; import Map from '../../../../src/ol/Map.js'; import Point from '../../../../src/ol/geom/Point.js'; import VectorTileLayer from '../../../../src/ol/layer/VectorTile.js'; import VectorTileSource from '../../../../src/ol/source/VectorTile.js'; import View from '../../../../src/ol/View.js'; import {Circle, Fill, Stroke, Style} from '../../../../src/ol/style.js'; import {createXYZ} from '../../../../src/ol/tilegrid.js'; const points = [[0, 0]]; const vectorTileSource = new VectorTileSource({ tileGrid: createXYZ({ extent: [-20000000, -10000000, 10000000, 20000000], tileSize: 512, }), tileUrlFunction: (tileCoord) => tileCoord, tileLoadFunction(tile, tileCoord) { const features = points.map( (corner) => new Feature({ geometry: new Point(corner), tileCoord, }) ); tile.setFeatures(features); }, }); const vectorTileLayer = new VectorTileLayer({ declutter: true, source: vectorTileSource, style: new Style({ image: new Circle({ radius: 100, fill: new Fill({ color: 'rgba(255, 0, 0, 0.5)', }), stroke: new Stroke({ width: 1, color: 'black', }), }), }), }); new Map({ target: 'map', layers: [vectorTileLayer], view: new View({ center: [0, 0], zoom: 4, multiWorld: true, }), }); render({ message: 'Vector tile source tile grid different from render tile grid, with decluttering', });
define(["require", "exports", './publishReplay'], function (require, exports, publishReplay_1) { function shareReplay(bufferSize, windowTime, scheduler) { if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; } if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; } return publishReplay_1.default.call(this, bufferSize, windowTime, scheduler).refCount(); } Object.defineProperty(exports, "__esModule", { value: true }); exports.default = shareReplay; }); //# sourceMappingURL=shareReplay.js.map
var TOC = { load: function () { $('#toc_button').click(TOC.toggle); }, toggle: function () { if ($('#sphinxsidebar').toggle().is(':hidden')) { $('div.document').css('left', "0px"); $('toc_button').removeClass("open"); } else { $('div.document').css('left', "281px"); $('#toc_button').addClass("open"); } return $('#sphinxsidebar'); } }; $(function () { TOC.load(); // make header fixed on scrolling $(window).scroll(function () { if ($(this).scrollTop() >= $('#body').offset().top) { $('section.subnav').addClass('subnav-fixed'); $('section.main').addClass('main-with-subnav'); } else { $('section.subnav').removeClass('subnav-fixed'); $('section.main').removeClass('main-with-subnav'); } }); }); // monkey patch for text highlighting highlightText_patched = jQuery.fn.highlightText; jQuery.fn.highlightText = function () { highlightText_patched.apply(this, arguments); // go to highlighted text if found var highlighted_text = $('.document .highlighted')[0]; if (highlighted_text) { var scrolling_pos = $(highlighted_text).offset().top - $('section.subnav').height() - 10; $(window).scrollTop(scrolling_pos); } }
/* flatpickr v4.4.7, @license MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (factory((global.kz = {}))); }(this, (function (exports) { 'use strict'; var fp = typeof window !== "undefined" && window.flatpickr !== undefined ? window.flatpickr : { l10ns: {} }; var Kazakh = { weekdays: { shorthand: ["Жс", "Дс", "Сc", "Ср", "Бс", "Жм", "Сб"], longhand: ["Жексенбi", "Дүйсенбi", "Сейсенбi", "Сәрсенбi", "Бейсенбi", "Жұма", "Сенбi"] }, months: { shorthand: ["Қаң", "Ақп", "Нау", "Сәу", "Мам", "Мау", "Шiл", "Там", "Қыр", "Қаз", "Қар", "Жел"], longhand: ["Қаңтар", "Ақпан", "Наурыз", "Сәуiр", "Мамыр", "Маусым", "Шiлде", "Тамыз", "Қыркүйек", "Қазан", "Қараша", "Желтоқсан"] }, firstDayOfWeek: 1, ordinal: function ordinal() { return ""; }, rangeSeparator: " — ", weekAbbreviation: "Апта", scrollTitle: "Үлкейту үшін айналдырыңыз", toggleTitle: "Ауыстыру үшін басыңыз", amPM: ["ТД", "ТК"], yearAriaLabel: "Жыл" }; fp.l10ns.kz = Kazakh; var kz = fp.l10ns; exports.Kazakh = Kazakh; exports.default = kz; Object.defineProperty(exports, '__esModule', { value: true }); })));
export default 'OK'
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { refType } from '@material-ui/utils'; import SwitchBase from '../internal/SwitchBase'; import RadioButtonIcon from './RadioButtonIcon'; import { alpha } from '../styles/colorManipulator'; import capitalize from '../utils/capitalize'; import createChainedFunction from '../utils/createChainedFunction'; import withStyles from '../styles/withStyles'; import useRadioGroup from '../RadioGroup/useRadioGroup'; export const styles = theme => ({ /* Styles applied to the root element. */ root: { color: theme.palette.text.secondary }, /* Pseudo-class applied to the root element if `checked={true}`. */ checked: {}, /* Pseudo-class applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `color="primary"`. */ colorPrimary: { '&$checked': { color: theme.palette.primary.main, '&:hover': { backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } } }, '&$disabled': { color: theme.palette.action.disabled } }, /* Styles applied to the root element if `color="secondary"`. */ colorSecondary: { '&$checked': { color: theme.palette.secondary.main, '&:hover': { backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } } }, '&$disabled': { color: theme.palette.action.disabled } } }); const defaultCheckedIcon = /*#__PURE__*/React.createElement(RadioButtonIcon, { checked: true }); const defaultIcon = /*#__PURE__*/React.createElement(RadioButtonIcon, null); const Radio = /*#__PURE__*/React.forwardRef(function Radio(props, ref) { const { checked: checkedProp, classes, color = 'secondary', name: nameProp, onChange: onChangeProp, size = 'medium' } = props, other = _objectWithoutPropertiesLoose(props, ["checked", "classes", "color", "name", "onChange", "size"]); const radioGroup = useRadioGroup(); let checked = checkedProp; const onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange); let name = nameProp; if (radioGroup) { if (typeof checked === 'undefined') { checked = radioGroup.value === props.value; } if (typeof name === 'undefined') { name = radioGroup.name; } } return /*#__PURE__*/React.createElement(SwitchBase, _extends({ color: color, type: "radio", icon: /*#__PURE__*/React.cloneElement(defaultIcon, { fontSize: size === 'small' ? 'small' : 'default' }), checkedIcon: /*#__PURE__*/React.cloneElement(defaultCheckedIcon, { fontSize: size === 'small' ? 'small' : 'default' }), classes: { root: clsx(classes.root, classes[`color${capitalize(color)}`]), checked: classes.checked, disabled: classes.disabled }, name: name, checked: checked, onChange: onChange, ref: ref }, other)); }); process.env.NODE_ENV !== "production" ? Radio.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the d.ts file and run "yarn proptypes" | // ---------------------------------------------------------------------- /** * If `true`, the component is checked. */ checked: PropTypes.bool, /** * The icon to display when the component is checked. */ checkedIcon: PropTypes.node, /** * Override or extend the styles applied to the component. */ classes: PropTypes.object, /** * The color of the component. It supports those theme colors that make sense for this component. * @default 'secondary' */ color: PropTypes.oneOf(['default', 'primary', 'secondary']), /** * If `true`, the radio is disabled. */ disabled: PropTypes.bool, /** * If `true`, the ripple effect is disabled. */ disableRipple: PropTypes.bool, /** * The icon to display when the component is unchecked. */ icon: PropTypes.node, /** * The id of the `input` element. */ id: PropTypes.string, /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. */ inputProps: PropTypes.object, /** * Pass a ref to the `input` element. */ inputRef: refType, /** * Name attribute of the `input` element. */ name: PropTypes.string, /** * Callback fired when the state is changed. * * @param {object} event The event source of the callback. * You can pull out the new value by accessing `event.target.value` (string). * You can pull out the new checked state by accessing `event.target.checked` (boolean). */ onChange: PropTypes.func, /** * If `true`, the `input` element is required. */ required: PropTypes.bool, /** * The size of the radio. * `small` is equivalent to the dense radio styling. * @default 'medium' */ size: PropTypes.oneOf(['medium', 'small']), /** * The value of the component. The DOM API casts this to a string. */ value: PropTypes.any } : void 0; export default withStyles(styles, { name: 'MuiRadio' })(Radio);
exports.valid = { fullName: "John Doe", age: 47, state: "Massachusetts", city: "Boston", zip: 16417, married: false, dozen: 12, dozenOrBakersDozen: 13, favoriteEvenNumber: 14, topThreeFavoriteColors: [ "red", "blue", "green" ], favoriteSingleDigitWholeNumbers: [ 7 ], favoriteFiveLetterWord: "coder", emailAddresses: [ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@letters-in-local.org", "01234567890@numbers-in-local.net", "&'*+-./=?^_{}~@other-valid-characters-in-local.net", "mixed-1234-in-{+^}-local@sld.net", "a@single-character-in-local.org", "\"quoted\"@sld.com", "\"\\e\\s\\c\\a\\p\\e\\d\"@sld.com", "\"quoted-at-sign@sld.org\"@sld.com", "\"escaped\\\"quote\"@sld.com", "\"back\\slash\"@sld.com", "one-character-third-level@a.example.com", "single-character-in-sld@x.org", "local@dash-in-sld.com", "letters-in-sld@123.com", "one-letter-sld@x.org", "uncommon-tld@sld.museum", "uncommon-tld@sld.travel", "uncommon-tld@sld.mobi", "country-code-tld@sld.uk", "country-code-tld@sld.rw", "local@sld.newTLD", "the-total-length@of-an-entire-address.cannot-be-longer-than-two-hundred-and-fifty-four-characters.and-this-address-is-254-characters-exactly.so-it-should-be-valid.and-im-going-to-add-some-more-words-here.to-increase-the-lenght-blah-blah-blah-blah-bla.org", "the-character-limit@for-each-part.of-the-domain.is-sixty-three-characters.this-is-exactly-sixty-three-characters-so-it-is-valid-blah-blah.com", "local@sub.domains.com" ], ipAddresses: [ "127.0.0.1", "24.48.64.2", "192.168.1.1", "209.68.44.3", "2.2.2.2" ] } exports.invalid = { fullName: null, age: -1, state: 47, city: false, zip: [null], married: "yes", dozen: 50, dozenOrBakersDozen: "over 9000", favoriteEvenNumber: 15, topThreeFavoriteColors: [ "red", 5 ], favoriteSingleDigitWholeNumbers: [ 78, 2, 999 ], favoriteFiveLetterWord: "codernaut", emailAddresses: [], ipAddresses: [ "999.0.099.1", "294.48.64.2346", false, "2221409.64214128.42414.235233", "124124.12412412" ] } exports.schema = { // from cosmic thingy name: "test", type: "object", additionalProperties: false, required: ["fullName", "age", "zip", "married", "dozen", "dozenOrBakersDozen", "favoriteEvenNumber", "topThreeFavoriteColors", "favoriteSingleDigitWholeNumbers", "favoriteFiveLetterWord", "emailAddresses", "ipAddresses"], properties: { fullName: { type: "string" }, age: { type: "integer", minimum: 0 }, optionalItem: { type: "string" }, state: { type: "string" }, city: { type: "string" }, zip: { type: "integer", minimum: 0, maximum: 99999 }, married: { type: "boolean" }, dozen: { type: "integer", minimum: 12, maximum: 12 }, dozenOrBakersDozen: { type: "integer", minimum: 12, maximum: 13 }, favoriteEvenNumber: { type: "integer", multipleOf: 2 }, topThreeFavoriteColors: { type: "array", minItems: 3, maxItems: 3, uniqueItems: true, items: { type: "string" }}, favoriteSingleDigitWholeNumbers: { type: "array", minItems: 1, maxItems: 10, uniqueItems: true, items: { type: "integer", minimum: 0, maximum: 9 }}, favoriteFiveLetterWord: { type: "string", minLength: 5, maxLength: 5 }, emailAddresses: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", format: "email" }}, ipAddresses: { type: "array", uniqueItems: true, items: { type: "string", format: "ipv4" }}, } }
/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * JDK-8025312: parseInt should convert 'radix' argument to ToInt32 even if empty string is parsed * * @test * @run */ parseInt("", { valueOf: function() { print("inside valueOf of 'radix'"); } });