text
stringlengths 2
6.14k
|
|---|
/**
* Copyright 2016 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {isLayoutSizeDefined} from '../../../src/layout';
import {user} from '../../../src/log';
class AmpSpringboardPlayer extends AMP.BaseElement {
/** @param {!AmpElement} element */
constructor(element) {
super(element);
/** @private {string} */
this.mode_ = '';
/** @private {string} */
this.contentId_ = '';
/** @private {string} */
this.domain_ = '';
/** @private {?HTMLIFrameElement} */
this.iframe_ = null;
}
/**
* @param {boolean=} opt_onLayout
* @override
*/
preconnectCallback(opt_onLayout) {
this.preconnect.url('https://cms.springboardplatform.com', opt_onLayout);
this.preconnect.url('https://www.springboardplatform.com', opt_onLayout);
}
/** @override */
isLayoutSupported(layout) {
return isLayoutSizeDefined(layout);
}
/** @override */
buildCallback() {
this.mode_ = user().assert(
this.element.getAttribute('data-mode'),
'The data-mode attribute is required for <amp-springboard-player> %s',
this.element);
this.contentId_ = user().assert(
this.element.getAttribute('data-content-id'),
'The data-content-id attribute is required for' +
'<amp-springboard-player> %s',
this.element);
this.domain_ = user().assert(
this.element.getAttribute('data-domain'),
'The data-domain attribute is required for <amp-springboard-player> %s',
this.element);
}
/** @override */
layoutCallback() {
const iframe = this.element.ownerDocument.createElement('iframe');
const siteId = user().assert(
this.element.getAttribute('data-site-id'),
'The data-site-id attribute is required for' +
'<amp-springboard-player> %s',
this.element);
const playerId = user().assert(
this.element.getAttribute('data-player-id'),
'The data-player-id attribute is required for' +
'<amp-springboard-player> %s',
this.element);
const items = this.element.getAttribute('data-items') || '10';
iframe.setAttribute('frameborder', '0');
iframe.setAttribute('allowfullscreen', 'true');
iframe.id = playerId + '_' + this.contentId_;
iframe.src = 'https://cms.springboardplatform.com/embed_iframe/' +
encodeURIComponent(siteId) + '/' +
encodeURIComponent(this.mode_) +
'/' + encodeURIComponent(this.contentId_) + '/' +
encodeURIComponent(playerId) + '/' +
encodeURIComponent(this.domain_) +
'/' + encodeURIComponent(items);
this.applyFillContent(iframe);
this.iframe_ = iframe;
this.element.appendChild(iframe);
return this.loadPromise(iframe);
}
/** @override */
pauseCallback() {
if (this.iframe_ && this.iframe_.contentWindow) {
this.iframe_.contentWindow./*OK*/postMessage('ampPause', '*');
}
}
/** @override */
createPlaceholderCallback() {
const placeholder = this.win.document.createElement('amp-img');
placeholder.setAttribute('src',
'https://www.springboardplatform.com/storage/' +
encodeURIComponent(this.domain_) + '/snapshots/' +
encodeURIComponent(this.contentId_) + '.jpg');
/** Show default image for playlist */
if (this.mode_ == 'playlist') {
placeholder.setAttribute('src',
'https://www.springboardplatform.com/storage/default/' +
'snapshots/default_snapshot.png');
}
placeholder.setAttribute('placeholder', '');
placeholder.setAttribute('referrerpolicy', 'origin');
placeholder.setAttribute('layout', 'fill');
return placeholder;
}
}
AMP.extension('amp-springboard-player', '0.1', AMP => {
AMP.registerElement('amp-springboard-player', AmpSpringboardPlayer);
});
|
/*
Copyright (C) NAVER corp.
This library 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 2.1 of the License, or (at your option) any later version.
This library 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 this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*[
* SE_FIT_IFRAME
*
* 스마트에디터 사이즈에 맞게 iframe사이즈를 조절한다.
*
* none
*
---------------------------------------------------------------------------]*/
/**
* @pluginDesc 에디터를 싸고 있는 iframe 사이즈 조절을 담당하는 플러그인
*/
nhn.husky.SE_OuterIFrameControl = $Class({
name : "SE_OuterIFrameControl",
oResizeGrip : null,
$init : function(oAppContainer){
// page up, page down, home, end, left, up, right, down
this.aHeightChangeKeyMap = [-100, 100, 500, -500, -1, -10, 1, 10];
this._assignHTMLObjects(oAppContainer);
//키보드 이벤트
this.$FnKeyDown = $Fn(this._keydown, this);
if(this.oResizeGrip){
this.$FnKeyDown.attach(this.oResizeGrip, "keydown");
}
//마우스 이벤트
if(!!jindo.$Agent().navigator().ie){
this.$FnMouseDown = $Fn(this._mousedown, this);
this.$FnMouseMove = $Fn(this._mousemove, this);
this.$FnMouseMove_Parent = $Fn(this._mousemove_parent, this);
this.$FnMouseUp = $Fn(this._mouseup, this);
if(this.oResizeGrip){
this.$FnMouseDown.attach(this.oResizeGrip, "mousedown");
}
}
},
_assignHTMLObjects : function(oAppContainer){
oAppContainer = jindo.$(oAppContainer) || document;
this.oResizeGrip = cssquery.getSingle(".husky_seditor_editingArea_verticalResizer", oAppContainer);
this.elIFrame = window.frameElement;
this.welIFrame = $Element(this.elIFrame);
},
$ON_MSG_APP_READY : function(){
this.oApp.exec("SE_FIT_IFRAME", []);
},
$ON_MSG_EDITING_AREA_SIZE_CHANGED : function(){
this.oApp.exec("SE_FIT_IFRAME", []);
},
$ON_SE_FIT_IFRAME : function(){
this.elIFrame.style.height = document.body.offsetHeight+"px";
},
$AFTER_RESIZE_EDITING_AREA_BY : function(ipWidthChange, ipHeightChange){
this.oApp.exec("SE_FIT_IFRAME", []);
},
_keydown : function(oEvent){
var oKeyInfo = oEvent.key();
// 33, 34: page up/down, 35,36: end/home, 37,38,39,40: left, up, right, down
if(oKeyInfo.keyCode >= 33 && oKeyInfo.keyCode <= 40){
this.oApp.exec("MSG_EDITING_AREA_RESIZE_STARTED", []);
this.oApp.exec("RESIZE_EDITING_AREA_BY", [0, this.aHeightChangeKeyMap[oKeyInfo.keyCode-33]]);
this.oApp.exec("MSG_EDITING_AREA_RESIZE_ENDED", []);
oEvent.stop();
}
},
_mousedown : function(oEvent){
this.iStartHeight = oEvent.pos().clientY;
this.iStartHeightOffset = oEvent.pos().layerY;
this.$FnMouseMove.attach(document, "mousemove");
this.$FnMouseMove_Parent.attach(parent.document, "mousemove");
this.$FnMouseUp.attach(document, "mouseup");
this.$FnMouseUp.attach(parent.document, "mouseup");
this.iStartHeight = oEvent.pos().clientY;
this.oApp.exec("MSG_EDITING_AREA_RESIZE_STARTED", [this.$FnMouseDown, this.$FnMouseMove, this.$FnMouseUp]);
},
_mousemove : function(oEvent){
var iHeightChange = oEvent.pos().clientY - this.iStartHeight;
this.oApp.exec("RESIZE_EDITING_AREA_BY", [0, iHeightChange]);
},
_mousemove_parent : function(oEvent){
var iHeightChange = oEvent.pos().pageY - (this.welIFrame.offset().top + this.iStartHeight);
this.oApp.exec("RESIZE_EDITING_AREA_BY", [0, iHeightChange]);
},
_mouseup : function(oEvent){
this.$FnMouseMove.detach(document, "mousemove");
this.$FnMouseMove_Parent.detach(parent.document, "mousemove");
this.$FnMouseUp.detach(document, "mouseup");
this.$FnMouseUp.detach(parent.document, "mouseup");
this.oApp.exec("MSG_EDITING_AREA_RESIZE_ENDED", [this.$FnMouseDown, this.$FnMouseMove, this.$FnMouseUp]);
}
});
|
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _reactAddons = require('react/addons');
var _reactAddons2 = _interopRequireDefault(_reactAddons);
var _Autocomplete = require('../Autocomplete');
var _Autocomplete2 = _interopRequireDefault(_Autocomplete);
var _assert = require('assert');
/* eslint func-names:0 */
var TestUtils = _reactAddons2['default'].addons.TestUtils;
describe('react-autocomplete', function () {
it('should have tests', function () {
(0, _assert.ok)(false);
});
});
|
Meteor.startup(function() {
Tracker.autorun(function() {
if (RocketChat.settings.get('AutoTranslate_Enabled') && RocketChat.authz.hasAtLeastOnePermission(['auto-translate'])) {
RocketChat.MessageAction.addButton({
id: 'toggle-language',
icon: 'icon-language',
label: 'Toggle_original_translated',
context: [
'message',
'message-mobile'
],
action() {
const message = this._arguments[1];
const language = RocketChat.AutoTranslate.getLanguage(message.rid);
if ((!message.translations || !message.translations[language])) { //} && !_.find(message.attachments, attachment => { return attachment.translations && attachment.translations[language]; })) {
RocketChat.AutoTranslate.messageIdsToWait[message._id] = true;
RocketChat.models.Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } });
Meteor.call('autoTranslate.translateMessage', message, language);
} else if (message.autoTranslateShowInverse) {
RocketChat.models.Messages.update({ _id: message._id }, { $unset: { autoTranslateShowInverse: true } });
} else {
RocketChat.models.Messages.update({ _id: message._id }, { $set: { autoTranslateShowInverse: true } });
}
},
condition(message) {
return message && message.u && message.u._id !== Meteor.userId();
},
order: 90
});
} else {
RocketChat.MessageAction.removeButton('toggle-language');
}
});
});
|
version https://git-lfs.github.com/spec/v1
oid sha256:3925f11cdd4f4646afabc56c5f294ea3a510ab1615012a4e03f0b89d5f8cd2b5
size 31443
|
YUI.add('button-strong', function(Y) {
'use strict';
var Lang = Y.Lang;
/**
* The ButtonStrong class provides functionality for applying "strong" (bold) style to a text selection.
*
* @class ButtonStrong
*/
var Strong = Y.Base.create('strong', Y.Plugin.Base, [Y.ButtonBase], {
TPL_CONTENT: '<i class="alloy-editor-icon-bold"></i>',
/**
* Applies the style of this button if its current status is pressed
* and removes it otherwise.
*
* @method _onClick
* @protected
* @param {EventFacade} event Event that triggered when user clicked on the button.
*/
_onClick: function(event) {
var editor = this.get('host').get('editor');
editor.execCommand('bold');
}
}, {
NAME: 'strong',
NS: 'strong',
ATTRS: {
/**
* Specifies the element (style) which this button handles.
*
* @attribute element
* @default 'strong'
* @type String
*/
element: {
validator: Lang.isString,
value: 'strong'
},
/**
* Collection of strings used to label elements of the button's UI.
* ButtonStrong provides string properties to specify the label of the button.
*
* @attribute strings
* @default {label: 'Bold'}
* @type Object
*/
strings: {
validator: Lang.isObject,
value: {
label: 'Bold'
}
}
}
});
Y.ButtonStrong = Strong;
}, '', {
requires: ['button-base']
});
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
gTestfile = 'regress-99663.js';
//-----------------------------------------------------------------------------
var UBound = 0;
var BUGNUMBER = 99663;
var summary = 'Regression test for Bugzilla bug 99663';
/*
* This testcase expects error messages containing
* the phrase 'read-only' or something similar -
*/
var READONLY = /read\s*-?\s*only/;
var READONLY_TRUE = 'a "read-only" error';
var READONLY_FALSE = 'Error: ';
var FAILURE = 'NO ERROR WAS GENERATED!';
var status = '';
var actual = '';
var expect= '';
var statusitems = [];
var expectedvalues = [];
var actualvalues = [];
/*
* These MUST be compiled in JS1.2 or less for the test to work - see above
*/
function f1()
{
with (it)
{
for (rdonly in this);
}
}
function f2()
{
for (it.rdonly in this);
}
function f3(s)
{
for (it[s] in this);
}
/*
* Begin testing by capturing actual vs. expected values.
* Initialize to FAILURE; this will get reset if all goes well -
*/
actual = FAILURE;
try
{
f1();
}
catch(e)
{
actual = readOnly(e.message);
}
expect= READONLY_TRUE;
status = 'Section 1 of test - got ' + actual;
addThis();
actual = FAILURE;
try
{
f2();
}
catch(e)
{
actual = readOnly(e.message);
}
expect= READONLY_TRUE;
status = 'Section 2 of test - got ' + actual;
addThis();
actual = FAILURE;
try
{
f3('rdonly');
}
catch(e)
{
actual = readOnly(e.message);
}
expect= READONLY_TRUE;
status = 'Section 3 of test - got ' + actual;
addThis();
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function readOnly(msg)
{
if (msg.match(READONLY))
return READONLY_TRUE;
return READONLY_FALSE + msg;
}
function addThis()
{
statusitems[UBound] = status;
actualvalues[UBound] = actual;
expectedvalues[UBound] = expect;
UBound++;
}
function test()
{
print ('Bug Number ' + bug);
print ('STATUS: ' + summary);
for (var i=0; i<UBound; i++)
{
writeTestCaseResult(expectedvalues[i], actualvalues[i], statusitems[i]);
}
}
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
gTestfile = 'JavaObjectToInt-002-n.js';
/* -*- Mode: java; tab-width: 8 -*-
* Copyright (C) 1997, 1998 Netscape Communications Corporation,
* All Rights Reserved.
*/
/**
* JavaScript to Java type conversion.
*
* This test passes JavaScript number values to several Java methods
* that expect arguments of various types, and verifies that the value is
* converted to the correct value and type.
*
* This tests instance methods, and not static methods.
*
* Running these tests successfully requires you to have
* com.netscape.javascript.qa.liveconnect.DataTypeClass on your classpath.
*
* Specification: Method Overloading Proposal for Liveconnect 3.0
*
* @author: christine@netscape.com
*
*/
var SECTION = "JavaObject to int";
var VERSION = "1_4";
var TITLE = "LiveConnect 3.0 JavaScript to Java Data Type Conversion " +
SECTION;
startTest();
var dt = new DT();
var a = new Array();
var i = 0;
// 1. If the object does not have a doubleValue() method, a runtime error
// occurs.
// 2. Call the object's doubleValue() method
// 3. If result(2) is NaN, a runtime error occurs
// 3. Convert Result(2) to Java numeric type. Round JS number to integral
// value using round-to-negative-infinity mode.
// Numbers with a magnitude too large to be represented in the target
// integral type should result in a runtime error.
DESCRIPTION = "dt.PUB_DOUBLE_REPRESENTATION = NaN ;"+
"dt.setInteger( dt )";
EXPECTED = "error";
a[i++] = new TestObject (
"dt.PUB_DOUBLE_REPRESENTATION = NaN ;"+
"dt.setInteger( dt )",
"dt.PUB_INTEGER",
"dt.getInteger()",
"typeof dt.getInteger()",
"error",
"number" );
for ( i = 0; i < a.length; i++ ) {
new TestCase(
a[i].description +"; "+ a[i].javaFieldName,
a[i].jsValue,
a[i].javaFieldValue );
new TestCase(
a[i].description +"; " + a[i].javaMethodName,
a[i].jsValue,
a[i].javaMethodValue );
new TestCase(
a[i].javaTypeName,
a[i].jsType,
a[i].javaTypeValue );
}
test();
function TestObject( description, javaField, javaMethod, javaType,
jsValue, jsType )
{
eval (description );
this.description = description;
this.javaFieldName = javaField;
this.javaFieldValue = eval( javaField );
this.javaMethodName = javaMethod;
this.javaMethodValue = eval( javaMethod );
this.javaTypeName = javaType,
this.javaTypeValue = typeof this.javaFieldValue;
this.jsValue = jsValue;
this.jsType = jsType;
}
|
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'format', 'oc', {
label: 'Format',
panelTitle: 'Format de paragraf',
tag_address: 'Adreça',
tag_div: 'Division (DIV)',
tag_h1: 'Títol 1',
tag_h2: 'Títol 2',
tag_h3: 'Títol 3',
tag_h4: 'Títol 4',
tag_h5: 'Títol 5',
tag_h6: 'Títol 6',
tag_p: 'Normal',
tag_pre: 'Preformatat'
} );
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is JavaScript Engine testing utilities.
*
* The Initial Developer of the Original Code is
* Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
//-----------------------------------------------------------------------------
var BUGNUMBER = 462407;
var summary = 'Do not assert: !ti->stackTypeMap.matches(ti_other->stackTypeMap)';
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
printStatus (summary);
jit(true);
(function f() { for each (let i in [0, {}, 0, 1.5, {}, 0, 1.5, 0, 0]) { }})();
jit(false);
reportCompare(expect, actual, summary);
|
var helper = require('./helper');
var events = require('./events');
var logger = require('./logger');
var Result = function() {
var startTime = Date.now();
this.total = this.skipped = this.failed = this.success = 0;
this.netTime = this.totalTime = 0;
this.disconnected = this.error = false;
this.totalTimeEnd = function() {
this.totalTime = Date.now() - startTime;
};
};
var Browser = function(id, collection, emitter) {
var log = logger.create(id);
this.id = id;
this.name = id;
this.fullName = null;
this.isReady = true;
this.lastResult = new Result();
this.toString = function() {
return this.name;
};
this.onRegister = function(info) {
this.launchId = info.id;
this.fullName = info.name;
this.name = helper.browserFullNameToShort(this.fullName);
log = logger.create(this.name);
log.info('Connected on socket id ' + this.id);
emitter.emit('browser_register', this);
emitter.emit('browsers_change', collection);
};
this.onError = function(error) {
if (this.isReady) {
return;
}
this.lastResult.error = true;
emitter.emit('browser_error', this, error);
};
this.onInfo = function(info) {
if (this.isReady) {
return;
}
// TODO(vojta): rename to log
if (helper.isDefined(info.dump)) {
emitter.emit('browser_dump', this, info.dump);
}
if (helper.isDefined(info.total)) {
this.lastResult.total = info.total;
}
};
this.onComplete = function(result) {
if (this.isReady) {
return;
}
this.isReady = true;
this.lastResult.totalTimeEnd();
if (!this.lastResult.success) {
this.lastResult.error = true;
}
emitter.emit('browsers_change', collection);
emitter.emit('browser_complete', this, result);
};
this.onDisconnect = function() {
if (!this.isReady) {
this.isReady = true;
this.lastResult.totalTimeEnd();
this.lastResult.disconnected = true;
emitter.emit('browser_complete', this);
}
log.warn('Disconnected');
collection.remove(this);
};
this.onResult = function(result) {
// ignore - probably results from last run (after server disconnecting)
if (this.isReady) {
return;
}
if (result.skipped) {
this.lastResult.skipped++;
} else if (result.success) {
this.lastResult.success++;
} else {
this.lastResult.failed++;
}
this.lastResult.netTime += result.time;
emitter.emit('spec_complete', this, result);
};
this.serialize = function() {
return {
id: this.id,
name: this.name,
isReady: this.isReady
};
};
};
var Collection = function(emitter, browsers) {
browsers = browsers || [];
// Use ecma5 style to make jshint happy
Object.defineProperty(this, 'length', {
get: function(){
return browsers.length;
}
});
this.add = function(browser) {
browsers.push(browser);
emitter.emit('browsers_change', this);
};
this.remove = function(browser) {
var index = browsers.indexOf(browser);
if (index === -1) {
return false;
}
browsers.splice(index, 1);
emitter.emit('browsers_change', this);
return true;
};
this.setAllIsReadyTo = function(value) {
var change = false;
browsers.forEach(function(browser) {
change = change || browser.isReady !== value;
browser.isReady = value;
});
if (change) {
emitter.emit('browsers_change', this);
}
};
this.areAllReady = function(nonReadyList) {
nonReadyList = nonReadyList || [];
browsers.forEach(function(browser) {
if (!browser.isReady) {
nonReadyList.push(browser);
}
});
return nonReadyList.length === 0;
};
this.serialize = function() {
return browsers.map(function(browser) {
return browser.serialize();
});
};
this.getResults = function() {
var results = browsers.reduce(function(previous, current) {
previous.success += current.lastResult.success;
previous.failed += current.lastResult.failed;
previous.error = previous.error || current.lastResult.error;
previous.disconnected = previous.disconnected || current.lastResult.disconnected;
return previous;
}, {success: 0, failed: 0, error: false, disconnected: false, exitCode: 0});
// compute exit status code
results.exitCode = results.failed || results.error || results.disconnected ? 1 : 0;
return results;
};
this.clearResults = function() {
browsers.forEach(function(browser) {
browser.lastResult = new Result();
});
};
this.clone = function() {
return new Collection(emitter, browsers.slice());
};
// Array APIs
this.map = function(callback, context) {
return browsers.map(callback, context);
};
this.forEach = function(callback, context) {
return browsers.forEach(callback, context);
};
};
Collection.$inject = ['emitter'];
exports.Result = Result;
exports.Browser = Browser;
exports.Collection = Collection;
exports.createBrowser = function(socket, collection, emitter) {
var browser = new Browser(socket.id, collection, emitter);
events.bindAll(browser, socket);
collection.add(browser);
return browser;
};
|
// Tests the dropping of a sharded database SERVER-3471 SERVER-1726
var st = new ShardingTest({ name : jsTestName() })
st.stopBalancer()
var mongos = st.s0
var config = mongos.getDB( "config" )
var dbName = "buy"
var dbA = mongos.getDB( dbName )
var dbB = mongos.getDB( dbName + "_201107" )
var dbC = mongos.getDB( dbName + "_201108" )
print( "1: insert some data and colls into all dbs" )
var numDocs = 3000;
var numColls = 10;
for( var i = 0; i < numDocs; i++ ){
dbA.getCollection( "data" + (i % numColls) ).insert({ _id : i })
dbB.getCollection( "data" + (i % numColls) ).insert({ _id : i })
dbC.getCollection( "data" + (i % numColls) ).insert({ _id : i })
}
print( "2: shard the colls ")
for( var i = 0; i < numColls; i++ ){
var key = { _id : 1 }
st.shardColl( dbA.getCollection( "data" + i ), key )
st.shardColl( dbB.getCollection( "data" + i ), key )
st.shardColl( dbC.getCollection( "data" + i ), key )
}
print( "3: drop the non-suffixed db ")
dbA.dropDatabase()
print( "3: ensure only the non-suffixed db was dropped ")
var dbs = mongos.getDBNames()
for( var i = 0; i < dbs.length; i++ ){
assert.neq( dbs, "" + dbA )
}
assert.eq( 0, config.databases.find({ _id : "" + dbA }).toArray().length )
assert.eq( 1, config.databases.find({ _id : "" + dbB }).toArray().length )
assert.eq( 1, config.databases.find({ _id : "" + dbC }).toArray().length )
assert.eq( numColls, config.collections.find({ _id : RegExp( "^" + dbA + "\\..*" ), dropped : true }).toArray().length )
assert.eq( numColls, config.collections.find({ _id : RegExp( "^" + dbB + "\\..*" ), dropped : false }).toArray().length )
assert.eq( numColls, config.collections.find({ _id : RegExp( "^" + dbC + "\\..*" ), dropped : false }).toArray().length )
for( var i = 0; i < numColls; i++ ){
assert.eq( numDocs / numColls, dbB.getCollection( "data" + (i % numColls) ).find().itcount() )
assert.eq( numDocs / numColls, dbC.getCollection( "data" + (i % numColls) ).find().itcount() )
}
// Finish
st.stop()
|
import { Meteor } from "meteor/meteor";
import { Roles } from "meteor/alanning:roles";
Meteor.publish("launchdock-auth", function () {
// only publish Launchdock credentials for logged in admin/owner
if (Roles.userIsInRole(this.userId, ["admin", "owner"])) {
return Meteor.users.find({ _id: this.userId }, {
fields: {
"services.launchdock.userId": 1,
"services.launchdock.username": 1,
"services.launchdock.auth": 1,
"services.launchdock.url": 1,
"services.launchdock.stackId": 1
}
});
}
return this.ready();
});
|
import isFunction from '../utils/is-function';
import extend from '../utils/extend';
import isObject from '../utils/is-object';
import hasOwnProp from '../utils/has-own-prop';
export function set (config) {
var prop, i;
for (i in config) {
prop = config[i];
if (isFunction(prop)) {
this[i] = prop;
} else {
this['_' + i] = prop;
}
}
this._config = config;
// Lenient ordinal parsing accepts just a number in addition to
// number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
// TODO: Remove "ordinalParse" fallback in next major release.
this._dayOfMonthOrdinalParseLenient = new RegExp(
(this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
'|' + (/\d{1,2}/).source);
}
export function mergeConfigs(parentConfig, childConfig) {
var res = extend({}, parentConfig), prop;
for (prop in childConfig) {
if (hasOwnProp(childConfig, prop)) {
if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
res[prop] = {};
extend(res[prop], parentConfig[prop]);
extend(res[prop], childConfig[prop]);
} else if (childConfig[prop] != null) {
res[prop] = childConfig[prop];
} else {
delete res[prop];
}
}
}
for (prop in parentConfig) {
if (hasOwnProp(parentConfig, prop) &&
!hasOwnProp(childConfig, prop) &&
isObject(parentConfig[prop])) {
// make sure changes to properties don't modify parent config
res[prop] = extend({}, res[prop]);
}
}
return res;
}
|
YUI.add('addon-a-x', function(Y, NAME) {
// just needs to exist
});
|
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.pa = {}));
}(this, (function (exports) { 'use strict';
var fp = typeof window !== "undefined" && window.flatpickr !== undefined
? window.flatpickr
: {
l10ns: {},
};
var Punjabi = {
weekdays: {
shorthand: ["ਐਤ", "ਸੋਮ", "ਮੰਗਲ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕਰ", "ਸ਼ਨਿੱਚਰ"],
longhand: [
"ਐਤਵਾਰ",
"ਸੋਮਵਾਰ",
"ਮੰਗਲਵਾਰ",
"ਬੁੱਧਵਾਰ",
"ਵੀਰਵਾਰ",
"ਸ਼ੁੱਕਰਵਾਰ",
"ਸ਼ਨਿੱਚਰਵਾਰ",
],
},
months: {
shorthand: [
"ਜਨ",
"ਫ਼ਰ",
"ਮਾਰ",
"ਅਪ੍ਰੈ",
"ਮਈ",
"ਜੂਨ",
"ਜੁਲਾ",
"ਅਗ",
"ਸਤੰ",
"ਅਕ",
"ਨਵੰ",
"ਦਸੰ",
],
longhand: [
"ਜਨਵਰੀ",
"ਫ਼ਰਵਰੀ",
"ਮਾਰਚ",
"ਅਪ੍ਰੈਲ",
"ਮਈ",
"ਜੂਨ",
"ਜੁਲਾਈ",
"ਅਗਸਤ",
"ਸਤੰਬਰ",
"ਅਕਤੂਬਰ",
"ਨਵੰਬਰ",
"ਦਸੰਬਰ",
],
},
time_24hr: true,
};
fp.l10ns.pa = Punjabi;
var pa = fp.l10ns;
exports.Punjabi = Punjabi;
exports.default = pa;
Object.defineProperty(exports, '__esModule', { value: true });
})));
|
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.ObjectExporter = function () {};
THREE.ObjectExporter.prototype = {
constructor: THREE.ObjectExporter,
parse: function ( object ) {
// console.log( object );
var output = {
metadata: {
version: 4.3,
type: 'object',
generator: 'ObjectExporter'
}
};
//
var geometries = {};
var geometryExporter = new THREE.GeometryExporter();
var parseGeometry = function ( geometry ) {
if ( output.geometries === undefined ) {
output.geometries = [];
}
if ( geometries[ geometry.uuid ] === undefined ) {
var data = {};
data.uuid = geometry.uuid;
if ( geometry.name !== "" ) data.name = geometry.name;
if ( geometry instanceof THREE.PlaneGeometry ) {
data.type = 'PlaneGeometry';
data.width = geometry.width;
data.height = geometry.height;
data.widthSegments = geometry.widthSegments;
data.heightSegments = geometry.heightSegments;
} else if ( geometry instanceof THREE.CubeGeometry ) {
data.type = 'CubeGeometry';
data.width = geometry.width;
data.height = geometry.height;
data.depth = geometry.depth;
data.widthSegments = geometry.widthSegments;
data.heightSegments = geometry.heightSegments;
data.depthSegments = geometry.depthSegments;
} else if ( geometry instanceof THREE.CylinderGeometry ) {
data.type = 'CylinderGeometry';
data.radiusTop = geometry.radiusTop;
data.radiusBottom = geometry.radiusBottom;
data.height = geometry.height;
data.radiusSegments = geometry.radiusSegments;
data.heightSegments = geometry.heightSegments;
data.openEnded = data.openEnded;
} else if ( geometry instanceof THREE.SphereGeometry ) {
data.type = 'SphereGeometry';
data.radius = geometry.radius;
data.widthSegments = geometry.widthSegments;
data.heightSegments = geometry.heightSegments;
data.phiStart = geometry.phiStart;
data.phiLength = geometry.phiLength;
data.thetaStart = geometry.thetaStart;
data.thetaLength = geometry.thetaLength;
} else if ( geometry instanceof THREE.IcosahedronGeometry ) {
data.type = 'IcosahedronGeometry';
data.radius = geometry.radius;
data.detail = geometry.detail;
} else if ( geometry instanceof THREE.TorusGeometry ) {
data.type = 'TorusGeometry';
data.radius = geometry.radius;
data.tube = geometry.tube;
data.radialSegments = geometry.radialSegments;
data.tubularSegments = geometry.tubularSegments;
data.arc = geometry.arc;
} else if ( geometry instanceof THREE.TorusKnotGeometry ) {
data.type = 'TorusKnotGeometry';
data.radius = geometry.radius;
data.tube = geometry.tube;
data.radialSegments = geometry.radialSegments;
data.tubularSegments = geometry.tubularSegments;
data.p = geometry.p;
data.q = geometry.q;
data.heightScale = geometry.heightScale;
} else if ( geometry instanceof THREE.Geometry ) {
data.type = 'Geometry';
data.data = geometryExporter.parse( geometry );
delete data.data.metadata;
}
geometries[ geometry.uuid ] = data;
output.geometries.push( data );
}
return geometry.uuid;
};
//
var materials = {};
var materialExporter = new THREE.MaterialExporter();
var parseMaterial = function ( material ) {
if ( output.materials === undefined ) {
output.materials = [];
}
if ( materials[ material.uuid ] === undefined ) {
var data = materialExporter.parse( material );
delete data.metadata;
materials[ material.uuid ] = data;
output.materials.push( data );
}
return material.uuid;
};
//
var parseObject = function ( object ) {
var data = {};
data.uuid = object.uuid;
if ( object.name !== '' ) data.name = object.name;
if ( JSON.stringify( object.userData ) !== '{}' ) data.userData = object.userData;
if ( object.visible !== true ) data.visible = object.visible;
if ( object instanceof THREE.Scene ) {
data.type = 'Scene';
} else if ( object instanceof THREE.PerspectiveCamera ) {
data.type = 'PerspectiveCamera';
data.fov = object.fov;
data.aspect = object.aspect;
data.near = object.near;
data.far = object.far;
} else if ( object instanceof THREE.OrthographicCamera ) {
data.type = 'OrthographicCamera';
data.left = object.left;
data.right = object.right;
data.top = object.top;
data.bottom = object.bottom;
data.near = object.near;
data.far = object.far;
} else if ( object instanceof THREE.AmbientLight ) {
data.type = 'AmbientLight';
data.color = object.color.getHex();
} else if ( object instanceof THREE.DirectionalLight ) {
data.type = 'DirectionalLight';
data.color = object.color.getHex();
data.intensity = object.intensity;
} else if ( object instanceof THREE.PointLight ) {
data.type = 'PointLight';
data.color = object.color.getHex();
data.intensity = object.intensity;
data.distance = object.distance;
} else if ( object instanceof THREE.SpotLight ) {
data.type = 'SpotLight';
data.color = object.color.getHex();
data.intensity = object.intensity;
data.distance = object.distance;
data.angle = object.angle;
data.exponent = object.exponent;
} else if ( object instanceof THREE.HemisphereLight ) {
data.type = 'HemisphereLight';
data.color = object.color.getHex();
data.groundColor = object.groundColor.getHex();
} else if ( object instanceof THREE.Mesh ) {
data.type = 'Mesh';
data.geometry = parseGeometry( object.geometry );
data.material = parseMaterial( object.material );
} else {
data.type = 'Object3D';
}
data.matrix = object.matrix.toArray();
if ( object.children.length > 0 ) {
data.children = [];
for ( var i = 0; i < object.children.length; i ++ ) {
data.children.push( parseObject( object.children[ i ] ) );
}
}
return data;
}
output.object = parseObject( object );
return output;
}
}
|
var baseIndexOf = require('../internal/baseIndexOf'),
getLength = require('../internal/getLength'),
isArray = require('../lang/isArray'),
isIterateeCall = require('../internal/isIterateeCall'),
isLength = require('../internal/isLength'),
isString = require('../lang/isString'),
values = require('../object/values');
/* Native method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Checks if `target` is in `collection` using
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons. If `fromIndex` is negative, it's used as the offset
* from the end of `collection`.
*
* @static
* @memberOf _
* @alias contains, include
* @category Collection
* @param {Array|Object|string} collection The collection to search.
* @param {*} target The value to search for.
* @param {number} [fromIndex=0] The index to search from.
* @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
* @returns {boolean} Returns `true` if a matching element is found, else `false`.
* @example
*
* _.includes([1, 2, 3], 1);
* // => true
*
* _.includes([1, 2, 3], 1, 2);
* // => false
*
* _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
* // => true
*
* _.includes('pebbles', 'eb');
* // => true
*/
function includes(collection, target, fromIndex, guard) {
var length = collection ? getLength(collection) : 0;
if (!isLength(length)) {
collection = values(collection);
length = collection.length;
}
if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
fromIndex = 0;
} else {
fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
}
return (typeof collection == 'string' || !isArray(collection) && isString(collection))
? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1)
: (!!length && baseIndexOf(collection, target, fromIndex) > -1);
}
module.exports = includes;
|
import React from 'react';
import { RadialBarChart, RadialBar, Cell, Legend, Tooltip, ResponsiveContainer } from 'recharts';
import { changeNumberOfData } from './utils';
import { scaleOrdinal, schemeCategory10 } from 'd3-scale';
const colors = scaleOrdinal(schemeCategory10).range();
const data = [
{ name: '18-24', uv: 31.47, pv: 2400, fill: '#8884d8' },
{ name: '25-29', uv: 26.69, pv: 4500, fill: '#83a6ed' },
{ name: '30-34', uv: 15.69, pv: -1398, fill: '#8dd1e1' },
{ name: '35-39', uv: 8.22, pv: 2800, fill: '#82ca9d' },
{ name: '40-49', uv: 8.63, pv: 1908, fill: '#a4de6c' },
{ name: '50+', uv: 2.63, pv: -2800, fill: '#d0ed57' },
{ name: 'unknow', uv: 6.67, pv: 4800, fill: '#ffc658' },
];
const initilaState = { data };
export default React.createClass({
getInitialState() {
return initilaState;
},
handleChangeData() {
this.setState(() => _.mapValues(initilaState, changeNumberOfData));
},
render () {
const { data } = this.state;
const style = {
lineHeight: '24px',
left: 300,
};
const label = {
orientation: 'outer'
};
return (
<div className='radial-bar-charts'>
<a
href="javascript: void(0);"
className="btn update"
onClick={this.handleChangeData}
>
change data
</a>
<br/>
<p>RadialBarChart</p>
<div className="radial-bar-chart-wrapper">
<RadialBarChart width={500} height={300} cx={150} cy={150} innerRadius={20} outerRadius={140} barSize={10} data={data}>
<RadialBar minAngle={15} label={label} background dataKey="uv">
{
data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={colors[index]}/>
))
}
</RadialBar>
<Legend iconSize={10} width={120} height={140} layout="vertical" verticalAlign="middle" wrapperStyle={style} />
<Tooltip/>
</RadialBarChart>
</div>
<p>RadialBarChart with positive and negative value</p>
<div className="radial-bar-chart-wrapper">
<RadialBarChart width={500} height={300} cx={150} cy={150} innerRadius={20} outerRadius={140} data={data}>
<RadialBar startAngle={90} endAngle={-270} label={label} background dataKey="pv" />
<Legend iconSize={10} width={120} height={140} layout="vertical" verticalAlign="middle" wrapperStyle={style} />
<Tooltip/>
</RadialBarChart>
</div>
<p>RadialBarChart wrapped by ResponsiveContainer</p>
<div className="radial-bar-chart-wrapper">
<ResponsiveContainer>
<RadialBarChart data={data} cx="50%" cy="90%" innerRadius="20%" outerRadius="90%" >
<RadialBar minAngle={15} label={label} background dataKey="uv" />
<Legend iconSize={10} width={120} height={140} layout="vertical" verticalAlign="middle" wrapperStyle={style} />
</RadialBarChart>
</ResponsiveContainer>
</div>
</div>
);
}
});
|
// MAME-JavaScript function mappings
var JSMAME = JSMAME || {};
JSMAME.get_machine = Module.cwrap('_Z14js_get_machinev', 'number');
JSMAME.get_ui = Module.cwrap('_Z9js_get_uiv', 'number');
JSMAME.get_sound = Module.cwrap('_Z12js_get_soundv', 'number');
JSMAME.ui_set_show_fps = Module.cwrap('_ZN15mame_ui_manager12set_show_fpsEb', '', ['number', 'number']);
JSMAME.ui_get_show_fps = Module.cwrap('_ZNK15mame_ui_manager8show_fpsEv', 'number', ['number']);
JSMAME.sound_manager_mute = Module.cwrap('_ZN13sound_manager4muteEbh', '', ['number', 'number', 'number']);
JSMAME.sdl_pauseaudio = Module.cwrap('SDL_PauseAudio', '', ['number']);
JSMAME.sdl_sendkeyboardkey = Module.cwrap('SDL_SendKeyboardKey', '', ['number', 'number']);
var JSMESS = JSMAME;
|
/*
jTable localization file for 'Turkish' language.
Author: Halil İbrahim Kalkan
*/
(function ($) {
$.extend(true, $.hik.jtable.prototype.options.messages, {
serverCommunicationError: 'Sunucu ile iletişim kurulurken bir hata oluştu.',
loadingMessage: 'Kayıtlar yükleniyor...',
noDataAvailable: 'Hiç kayıt bulunmamaktadır!',
addNewRecord: '+ Yeni kayıt ekle',
editRecord: 'Kayıt düzenle',
areYouSure: 'Emin misiniz?',
deleteConfirmation: 'Bu kayıt silinecektir. Emin misiniz?',
save: 'Kaydet',
saving: 'Kaydediyor',
cancel: 'İptal',
deleteText: 'Sil',
deleting: 'Siliyor',
error: 'Hata',
close: 'Kapat',
cannotLoadOptionsFor: '{0} alanı için seçenekler yüklenemedi!',
pagingInfo: 'Toplam {2}, {0} ile {1} arası gösteriliyor',
canNotDeletedRecords: '{1} kayıttan {0} adedi silinemedi!',
deleteProggress: '{1} kayıttan {0} adedi silindi, devam ediliyor...'
});
})(jQuery);
|
var log4js = require('../log4js'),
net = require('net'),
END_MSG = '__LOG4JS__';
/**
* Creates a server, listening on config.loggerPort, config.loggerHost.
* Output goes to config.actualAppender (config.appender is used to
* set up that appender).
*/
function logServer(config) {
/**
* Takes a utf-8 string, returns an object with
* the correct log properties.
*/
function deserializeLoggingEvent(clientSocket, msg) {
var loggingEvent;
try {
loggingEvent = JSON.parse(msg);
loggingEvent.startTime = new Date(loggingEvent.startTime);
loggingEvent.level = log4js.levels.toLevel(loggingEvent.level.levelStr);
} catch (e) {
// JSON.parse failed, just log the contents probably a naughty.
loggingEvent = {
startTime: new Date(),
categoryName: 'log4js',
level: log4js.levels.ERROR,
data: [ 'Unable to parse log:', msg ]
};
}
loggingEvent.remoteAddress = clientSocket.remoteAddress;
loggingEvent.remotePort = clientSocket.remotePort;
return loggingEvent;
}
var actualAppender = config.actualAppender,
server = net.createServer(function serverCreated(clientSocket) {
clientSocket.setEncoding('utf8');
clientSocket.on('connect', function clientConnected() {
var logMessage = '';
function logTheMessage(msg) {
if (logMessage.length > 0) {
actualAppender(deserializeLoggingEvent(clientSocket, msg));
}
}
function chunkReceived(chunk) {
var event;
logMessage += chunk || '';
if (logMessage.indexOf(END_MSG) > -1) {
event = logMessage.substring(0, logMessage.indexOf(END_MSG));
logTheMessage(event);
logMessage = logMessage.substring(event.length + END_MSG.length) || '';
//check for more, maybe it was a big chunk
chunkReceived();
}
}
clientSocket.on('data', chunkReceived);
clientSocket.on('end', chunkReceived);
});
});
server.listen(config.loggerPort || 5000, config.loggerHost || 'localhost');
return actualAppender;
}
function workerAppender(config) {
var canWrite = false,
buffer = [],
socket;
createSocket();
function createSocket() {
socket = net.createConnection(config.loggerPort || 5000, config.loggerHost || 'localhost');
socket.on('connect', function() {
emptyBuffer();
canWrite = true;
});
socket.on('timeout', socket.end.bind(socket));
//don't bother listening for 'error', 'close' gets called after that anyway
socket.on('close', createSocket);
}
function emptyBuffer() {
var evt;
while ((evt = buffer.shift())) {
write(evt);
}
}
function write(loggingEvent) {
socket.write(JSON.stringify(loggingEvent), 'utf8');
socket.write(END_MSG, 'utf8');
}
return function log(loggingEvent) {
if (canWrite) {
write(loggingEvent);
} else {
buffer.push(loggingEvent);
}
};
}
function createAppender(config) {
if (config.mode === 'master') {
return logServer(config);
} else {
return workerAppender(config);
}
}
function configure(config, options) {
var actualAppender;
if (config.appender && config.mode === 'master') {
log4js.loadAppender(config.appender.type);
actualAppender = log4js.appenderMakers[config.appender.type](config.appender, options);
config.actualAppender = actualAppender;
}
return createAppender(config);
}
exports.appender = createAppender;
exports.configure = configure;
|
(function ( $ ) {
/* ===== UItoTop jQuery Plugin 1.1 (http://www.mattvarone.com/web-design/uitotop-jquery-plugin/) ===== */
$.fn.UItoTop = function ( options ) {
var defaults = {
text: 'To Top',
min: 200,
inDelay: 600,
outDelay: 400,
containerID: 'toTop',
containerHoverID: 'toTopHover',
scrollSpeed: 1000,
easingType: 'linear'
};
var settings = $.extend( defaults, options );
var containerIDhash = '#' + settings.containerID;
var containerHoverIDHash = '#' + settings.containerHoverID;
$( 'body' ).append( '<a href="#" id="' + settings.containerID + '">' + settings.text + '</a>' );
$( containerIDhash ).hide().click( function () {
$( 'html, body' ).animate( {scrollTop: 0}, settings.scrollSpeed, settings.easingType );
$( '#' + settings.containerHoverID, this ).stop().animate( {'opacity': 0 }, settings.inDelay, settings.easingType );
return false;
} ).prepend( '<span id="' + settings.containerHoverID + '"></span>' ).hover( function () {
$( containerHoverIDHash, this ).stop().animate( {
'opacity': 1
}, 300, 'linear' );
}, function () {
$( containerHoverIDHash, this ).stop().animate( {
'opacity': 0
}, 300, 'linear' );
} );
$( window ).scroll( function () {
var sd = $( window ).scrollTop();
if ( typeof document.body.style.maxHeight === "undefined" ) {
$( containerIDhash ).css( {
'position': 'absolute',
'top': $( window ).scrollTop() + $( window ).height() - 50
} );
}
if ( sd > settings.min ) {
$( containerIDhash ).fadeIn( settings.inDelay );
} else {
$( containerIDhash ).fadeOut( settings.Outdelay );
}
} );
};
})( jQuery );
|
/**
* @author Toru Nagashima
* @copyright 2016 Toru Nagashima. All rights reserved.
* See LICENSE file in root directory for full license.
*/
"use strict"
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const checkPublish = require("../util/check-publish")
const getAllowModules = require("../util/get-allow-modules")
const getConvertPath = require("../util/get-convert-path")
const getRequireTargets = require("../util/get-require-targets")
const getTryExtensions = require("../util/get-try-extensions")
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* The definition of this rule.
*
* @param {RuleContext} context - The rule context to check.
* @returns {object} The definition of this rule.
*/
function create(context) {
const filePath = context.getFilename()
if (filePath === "<input>") {
return {}
}
return {
"Program:exit"() {
checkPublish(
context,
filePath,
getRequireTargets(context)
)
},
}
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = {
create,
meta: {
docs: {
description: "disallow `require()` expressions for files that npm ignores",
category: "Possible Errors",
recommended: false,
},
fixable: false,
schema: [
{
type: "object",
properties: {
allowModules: getAllowModules.schema,
convertPath: getConvertPath.schema,
tryExtensions: getTryExtensions.schema,
},
additionalProperties: false,
},
],
},
}
|
function gettype(mixed_var) {
// discuss at: http://phpjs.org/functions/gettype/
// original by: Paulo Freitas
// improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// improved by: Douglas Crockford (http://javascript.crockford.com)
// improved by: Brett Zamir (http://brett-zamir.me)
// input by: KELAN
// depends on: is_float
// note: 1.0 is simplified to 1 before it can be accessed by the function, this makes
// note: it different from the PHP implementation. We can't fix this unfortunately.
// example 1: gettype(1);
// returns 1: 'integer'
// example 2: gettype(undefined);
// returns 2: 'undefined'
// example 3: gettype({0: 'Kevin van Zonneveld'});
// returns 3: 'object'
// example 4: gettype('foo');
// returns 4: 'string'
// example 5: gettype({0: function () {return false;}});
// returns 5: 'object'
// example 6: gettype({0: 'test', length: 1, splice: function () {}});
// example 6: gettype(['test']);
// returns 6: 'object'
// returns 6: 'array'
var s = typeof mixed_var,
name;
var getFuncName = function(fn) {
var name = (/\W*function\s+([\w\$]+)\s*\(/)
.exec(fn);
if (!name) {
return '(Anonymous)';
}
return name[1];
};
if (s === 'object') {
if (mixed_var !== null) {
// From: http://javascript.crockford.com/remedial.html
if (typeof mixed_var.length === 'number' && !(mixed_var.propertyIsEnumerable('length')) && typeof mixed_var
.splice === 'function') {
s = 'array';
} else if (mixed_var.constructor && getFuncName(mixed_var.constructor)) {
name = getFuncName(mixed_var.constructor);
if (name === 'Date') {
// not in PHP
s = 'date';
} else if (name === 'RegExp') {
// not in PHP
s = 'regexp';
} else if (name === 'PHPJS_Resource') {
// Check against our own resource constructor
s = 'resource';
}
}
} else {
s = 'null';
}
} else if (s === 'number') {
s = this.is_float(mixed_var) ? 'double' : 'integer';
}
return s;
}
|
//>>built
define("dojox/atom/widget/nls/ro/FeedEntryEditor",({doNew:"[nou]",edit:"[editare]",save:"[salvare]",cancel:"[anulare]"}));
|
/**
* Copyright 2016 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {user} from '../../../src/log';
import {dict} from '../../../src/utils/object';
import {startsWith} from '../../../src/string';
import {isArray, isObject} from '../../../src/types';
/** @const */
const TAG = 'amp-auto-ads';
/**
* @const {!Object<string, boolean>}
*/
const NON_DATA_ATTRIBUTE_WHITELIST = {
'type': true,
};
/**
* @param {!JsonObject} configObj
* @return {!JsonObject<string, string>}
*/
export function getAttributesFromConfigObj(configObj) {
if (!configObj['attributes']) {
return dict();
}
if (!isObject(configObj['attributes']) || isArray(configObj['attributes'])) {
user().warn(TAG, 'attributes property not an object');
return dict();
}
return parseAttributes(configObj['attributes']);
}
/**
* @param {!JsonObject} attributeObject
* @return {!JsonObject<string, string>}
*/
function parseAttributes(attributeObject) {
const attributes = dict();
for (const key in attributeObject) {
if (!NON_DATA_ATTRIBUTE_WHITELIST[key] && !startsWith(key, 'data-')) {
user().warn(TAG, 'Attribute not whitlisted: ' + key);
continue;
}
const valueType = (typeof attributeObject[key]);
if (valueType != 'number' && valueType != 'string' &&
valueType != 'boolean') {
user().warn(TAG, 'Attribute type not supported: ' + valueType);
continue;
}
attributes[key] = String(attributeObject[key]);
}
return attributes;
};
|
/* global settings */
import $ from 'jquery'
import notie from 'notie'
import 'jquery-serializejson'
import FileModel from '../models/file'
import {queryByHook, updateYamlString} from '../util'
export default class {
constructor (opts) {
const file = new FileModel({
user: opts.user,
repoOwner: settings.REPO_OWNER,
repoName: settings.REPO_NAME,
repoBranch: settings.REPO_BRANCH,
filePath: opts.el.data('file-path')
})
const activateBtn = queryByHook('activate-btn')
activateBtn.on('click', (e) => {
const theme = $(e.currentTarget).data('theme')
file.read()
.then((contents) => {
const newContents = updateYamlString(contents, { jkan_theme: theme })
file.save(newContents)
.then((response) => {
const commitUrl = response.commit.html_url
notie.alert('success', `
The configuration has been <a href="${commitUrl}">saved</a>
and the site is regenerating.
`)
}).catch((msg) => {
notie.alert('error', 'There was an error saving the configuration')
console.error(msg)
})
}).catch((err) => console.error(err))
})
}
}
|
/* flatpickr v4.0.3, @license MIT */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.et = {})));
}(this, (function (exports) { 'use strict';
var fp = typeof window !== "undefined" && window.flatpickr !== undefined
? window.flatpickr
: {
l10ns: {},
};
var Estonian = {
weekdays: {
shorthand: ["P", "E", "T", "K", "N", "R", "L"],
longhand: [
"Pühapäev",
"Esmaspäev",
"Teisipäev",
"Kolmapäev",
"Neljapäev",
"Reede",
"Laupäev",
],
},
months: {
shorthand: [
"Jaan",
"Veebr",
"Märts",
"Apr",
"Mai",
"Juuni",
"Juuli",
"Aug",
"Sept",
"Okt",
"Nov",
"Dets",
],
longhand: [
"Jaanuar",
"Veebruar",
"Märts",
"Aprill",
"Mai",
"Juuni",
"Juuli",
"August",
"September",
"Oktoober",
"November",
"Detsember",
],
},
firstDayOfWeek: 1,
ordinal: function () {
return ".";
},
weekAbbreviation: "Näd",
rangeSeparator: " kuni ",
scrollTitle: "Keri, et suurendada",
toggleTitle: "Klõpsa, et vahetada",
};
fp.l10ns.et = Estonian;
var et = fp.l10ns;
exports.Estonian = Estonian;
exports['default'] = et;
Object.defineProperty(exports, '__esModule', { value: true });
})));
|
// placeholder file
|
/// Copyright (c) 2009 Microsoft Corporation
///
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
/// that the following conditions are met:
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
/// the following disclaimer.
/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
/// the following disclaimer in the documentation and/or other materials provided with the distribution.
/// * Neither the name of Microsoft nor the names of its contributors may be used to
/// endorse or promote products derived from this software without specific prior written permission.
///
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ES5Harness.registerTest( {
id: "15.12.3-6-a-1",
path: "TestCases/chapter15/15.12/15.12.3/15.12.3-6-a-1.js",
description: "JSON.stringify treats numeric space arguments greater than 10 the same as a space argument of 10.",
test: function testcase() {
var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
return JSON.stringify(obj,null, 10)=== JSON.stringify(obj,null, 100);
},
precondition: function preq () {
return JSON && fnExists(JSON.stringify);
}
} );
|
//// [instantiatedModule.ts]
// adding the var makes this an instantiated module
module M {
export interface Point { x: number; y: number }
export var Point = 1;
}
// primary expression
var m: typeof M;
var m = M;
var a1: number;
var a1 = M.Point;
var a1 = m.Point;
var p1: { x: number; y: number; }
var p1: M.Point;
// making the point a class instead of an interface
// makes this an instantiated mmodule
module M2 {
export class Point {
x: number;
y: number;
static Origin(): Point {
return { x: 0, y: 0 };
}
}
}
var m2: typeof M2;
var m2 = M2;
// static side of the class
var a2: typeof M2.Point;
var a2 = m2.Point;
var a2 = M2.Point;
var o: M2.Point = a2.Origin();
var p2: { x: number; y: number }
var p2: M2.Point;
var p2 = new m2.Point();
var p2 = new M2.Point();
module M3 {
export enum Color { Blue, Red }
}
var m3: typeof M3;
var m3 = M3;
var a3: typeof M3.Color;
var a3 = m3.Color;
var a3 = M3.Color;
var blue: M3.Color = a3.Blue;
var p3: M3.Color;
var p3 = M3.Color.Red;
var p3 = m3.Color.Blue;
//// [instantiatedModule.js]
// adding the var makes this an instantiated module
var M;
(function (M) {
M.Point = 1;
})(M || (M = {}));
// primary expression
var m;
var m = M;
var a1;
var a1 = M.Point;
var a1 = m.Point;
var p1;
var p1;
// making the point a class instead of an interface
// makes this an instantiated mmodule
var M2;
(function (M2) {
var Point = /** @class */ (function () {
function Point() {
}
Point.Origin = function () {
return { x: 0, y: 0 };
};
return Point;
}());
M2.Point = Point;
})(M2 || (M2 = {}));
var m2;
var m2 = M2;
// static side of the class
var a2;
var a2 = m2.Point;
var a2 = M2.Point;
var o = a2.Origin();
var p2;
var p2;
var p2 = new m2.Point();
var p2 = new M2.Point();
var M3;
(function (M3) {
var Color;
(function (Color) {
Color[Color["Blue"] = 0] = "Blue";
Color[Color["Red"] = 1] = "Red";
})(Color = M3.Color || (M3.Color = {}));
})(M3 || (M3 = {}));
var m3;
var m3 = M3;
var a3;
var a3 = m3.Color;
var a3 = M3.Color;
var blue = a3.Blue;
var p3;
var p3 = M3.Color.Red;
var p3 = m3.Color.Blue;
|
/*!
* Copyright 2019 Hitachi Vantara. 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.
*/
/**
* The File Open and Save Main Module.
*
* The main module used for supporting the file open and save functionality.
**/
define([
"angular",
"./directives/resize/resize.module",
"./directives/edit.directive",
"./directives/key.directive",
"./directives/focus.directive",
"./directives/scrollToFolder.directive",
"./directives/rightClick.directive",
"./directives/context.directive",
"./directives/drag.directive",
"./directives/drop.directive",
"./directives/ngbodyclick.directive",
"./directives/modal.directive"
], function (angular, resizeModule, editDirective, keyDirective, focusDirective, scrollToFolderDirective,
rightClickDirective, contextDirective, dragDirective, dropDirective, bodyClickDirective, modalDirective) {
"use strict";
var module = {
name: "shared"
};
activate();
return module;
/**
* Creates angular module with dependencies.
*
* @private
*/
function activate() {
angular.module(module.name, [resizeModule.name])
.directive(editDirective.name, editDirective.options)
.directive(keyDirective.name, keyDirective.options)
.directive(focusDirective.name, focusDirective.options)
.directive(scrollToFolderDirective.name, scrollToFolderDirective.options)
.directive(rightClickDirective.name, rightClickDirective.options)
.directive(contextDirective.name, contextDirective.options)
.directive(dragDirective.name, dragDirective.options)
.directive(dropDirective.name, dropDirective.options)
.directive(modalDirective.name, modalDirective.options)
.directive(bodyClickDirective.name, bodyClickDirective.options)
}
});
|
jQuery(function ($) {
if ($('.pk-system-messages').children().length) {
$('.js-login').addClass('uk-animation-shake').find('input:password').focus();
}
});
|
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'flash', 'tr', {
access: 'Kod İzni',
accessAlways: 'Herzaman',
accessNever: 'Asla',
accessSameDomain: 'Aynı domain',
alignAbsBottom: 'Tam Altı',
alignAbsMiddle: 'Tam Ortası',
alignBaseline: 'Taban Çizgisi',
alignTextTop: 'Yazı Tepeye',
bgcolor: 'Arka Renk',
chkFull: 'Tam ekrana İzinver',
chkLoop: 'Döngü',
chkMenu: 'Flash Menüsünü Kullan',
chkPlay: 'Otomatik Oynat',
flashvars: 'Flash Değerleri',
hSpace: 'Yatay Boşluk',
properties: 'Flash Özellikleri',
propertiesTab: 'Özellikler',
quality: 'Kalite',
qualityAutoHigh: 'Otomatik Yükseklik',
qualityAutoLow: 'Otomatik Düşüklük',
qualityBest: 'En iyi',
qualityHigh: 'Yüksek',
qualityLow: 'Düşük',
qualityMedium: 'Orta',
scale: 'Boyutlandır',
scaleAll: 'Hepsini Göster',
scaleFit: 'Tam Sığdır',
scaleNoBorder: 'Kenar Yok',
title: 'Flash Özellikleri',
vSpace: 'Dikey Boşluk',
validateHSpace: 'HSpace sayı olmalıdır.',
validateSrc: 'Lütfen köprü URL\'sini yazın',
validateVSpace: 'VSpace sayı olmalıdır.',
windowMode: 'Pencere modu',
windowModeOpaque: 'Opak',
windowModeTransparent: 'Şeffaf',
windowModeWindow: 'Pencere'
} );
|
/*************************************************************
*
* MathJax/localization/cy/MathML.js
*
* Copyright (c) 2009-2016 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
MathJax.Localization.addTranslation("cy","MathML",{
version: "2.7.0",
isLoaded: true,
strings: {
}
});
MathJax.Ajax.loadComplete("[MathJax]/localization/cy/MathML.js");
|
'use strict';
var path = require('path');
var tmp = require('tmp-sync');
var expect = require('chai').expect;
var ember = require('../../helpers/ember');
var convertToJson = require('../../helpers/convert-help-output-to-json');
var Promise = require('../../../lib/ext/promise');
var remove = Promise.denodeify(require('fs-extra').remove);
var root = process.cwd();
var tmproot = path.join(root, 'tmp');
var tmpdir;
describe('Acceptance: ember help --json destroy', function() {
beforeEach(function() {
tmpdir = tmp.in(tmproot);
process.chdir(tmpdir);
});
afterEach(function() {
process.chdir(root);
return remove(tmproot);
});
it('works', function() {
return ember([
'help',
'destroy',
'--json'
])
.then(function(result) {
var json = convertToJson(result.ui.output);
var command = json.commands[0];
expect(command).to.deep.equal({
name: 'destroy',
description: 'Destroys code generated by `generate` command.',
aliases: ['d'],
works: 'insideProject',
availableOptions: [
{
name: 'dry-run',
default: false,
aliases: ['d'],
key: 'dryRun',
required: false
},
{
name: 'verbose',
default: false,
aliases: ['v'],
key: 'verbose',
required: false
},
{
name: 'pod',
default: false,
aliases: ['p'],
key: 'pod',
required: false
},
{
name: 'classic',
default: false,
aliases: ['c'],
key: 'classic',
required: false
},
{
name: 'dummy',
default: false,
aliases: ['dum', 'id'],
key: 'dummy',
required: false
},
{
name: 'in-repo-addon',
default: null,
aliases: ['in-repo', 'ir'],
key: 'inRepoAddon',
required: false
}
],
anonymousOptions: ['<blueprint>']
});
});
});
it('works with alias d', function() {
return ember([
'help',
'd',
'--json'
])
.then(function(result) {
var json = convertToJson(result.ui.output);
var command = json.commands[0];
expect(command.name).to.equal('destroy');
});
});
});
|
define(['knockout'], function (ko) {
var firstName = ko.observable("Planet"),
lastName = ko.observable("Earth");
var fullName = ko.computed(function () {
// Knockout tracks dependencies automatically.
// It knows that fullName depends on firstName and lastName, because these get called when evaluating fullName.
return firstName() + " " + lastName();
});
return {
firstName: firstName,
lastName: lastName,
fullName: fullName
}
});
|
/*global define*/
define([
'../Core/Cartesian3',
'../Core/defaultValue',
'../Core/defined',
'../Core/defineProperties',
'../Core/DeveloperError',
'../Core/Event',
'../Core/ReferenceFrame',
'./PositionProperty'
], function(
Cartesian3,
defaultValue,
defined,
defineProperties,
DeveloperError,
Event,
ReferenceFrame,
PositionProperty) {
"use strict";
/**
* A {@link PositionProperty} whose value does not change in respect to the
* {@link ReferenceFrame} in which is it defined.
*
* @alias ConstantPositionProperty
* @constructor
*
* @param {Cartesian3} [value] The property value.
* @param {ReferenceFrame} [referenceFrame=ReferenceFrame.FIXED] The reference frame in which the position is defined.
*/
var ConstantPositionProperty = function(value, referenceFrame) {
this._definitionChanged = new Event();
this._value = Cartesian3.clone(value);
this._referenceFrame = defaultValue(referenceFrame, ReferenceFrame.FIXED);
};
defineProperties(ConstantPositionProperty.prototype, {
/**
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof ConstantPositionProperty.prototype
*
* @type {Boolean}
* @readonly
*/
isConstant : {
get : function() {
return !defined(this._value) || this._referenceFrame === ReferenceFrame.FIXED;
}
},
/**
* Gets the event that is raised whenever the definition of this property changes.
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof ConstantPositionProperty.prototype
*
* @type {Event}
* @readonly
*/
definitionChanged : {
get : function() {
return this._definitionChanged;
}
},
/**
* Gets the reference frame in which the position is defined.
* @memberof ConstantPositionProperty.prototype
* @type {ReferenceFrame}
* @default ReferenceFrame.FIXED;
*/
referenceFrame : {
get : function() {
return this._referenceFrame;
}
}
});
/**
* Gets the value of the property at the provided time in the fixed frame.
*
* @param {JulianDate} time The time for which to retrieve the value.
* @param {Object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {Object} The modified result parameter or a new instance if the result parameter was not supplied.
*/
ConstantPositionProperty.prototype.getValue = function(time, result) {
return this.getValueInReferenceFrame(time, ReferenceFrame.FIXED, result);
};
/**
* Sets the value of the property.
*
* @param {Cartesian3} value The property value.
* @param {ReferenceFrame} [referenceFrame=this.referenceFrame] The reference frame in which the position is defined.
*/
ConstantPositionProperty.prototype.setValue = function(value, referenceFrame) {
var definitionChanged = false;
if (!Cartesian3.equals(this._value, value)) {
definitionChanged = true;
this._value = Cartesian3.clone(value);
}
if (defined(referenceFrame) && this._referenceFrame !== referenceFrame) {
definitionChanged = true;
this._referenceFrame = referenceFrame;
}
if (definitionChanged) {
this._definitionChanged.raiseEvent(this);
}
};
/**
* Gets the value of the property at the provided time and in the provided reference frame.
*
* @param {JulianDate} time The time for which to retrieve the value.
* @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {Cartesian3} The modified result parameter or a new instance if the result parameter was not supplied.
*/
ConstantPositionProperty.prototype.getValueInReferenceFrame = function(time, referenceFrame, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(time)) {
throw new DeveloperError('time is required.');
}
if (!defined(referenceFrame)) {
throw new DeveloperError('referenceFrame is required.');
}
//>>includeEnd('debug');
return PositionProperty.convertToReferenceFrame(time, this._value, this._referenceFrame, referenceFrame, result);
};
/**
* Compares this property to the provided property and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Property} [other] The other property.
* @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
ConstantPositionProperty.prototype.equals = function(other) {
return this === other ||
(other instanceof ConstantPositionProperty &&
Cartesian3.equals(this._value, other._value) &&
this._referenceFrame === other._referenceFrame);
};
return ConstantPositionProperty;
});
|
define(["dojo","dijit"], function(_dojo){
dojo.sampleFunction = function(a, b, c){
// summary: WTF
return ""; // String
}
});
|
TestHelpers.datepicker = {
addMonths: function(date, offset) {
var maxDay = 32 - new Date(date.getFullYear(), date.getMonth() + offset, 32).getDate();
date.setDate(Math.min(date.getDate(), maxDay));
date.setMonth(date.getMonth() + offset);
return date;
},
equalsDate: function(d1, d2, message) {
if (!d1 || !d2) {
ok(false, message + " - missing date");
return;
}
d1 = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate());
d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate());
equal(d1.toString(), d2.toString(), message);
},
init: function(id, options) {
$.datepicker.setDefaults($.datepicker.regional[""]);
return $(id).datepicker($.extend({showAnim: ""}, options || {}));
},
PROP_NAME: "datepicker"
};
|
tinyMCE.addI18n('hu.advanced',{
style_select:"St\u00EDlusok",
font_size:"Bet\u0171m\u00E9ret",
fontdefault:"Bet\u0171t\u00EDpus",
block:"Form\u00E1tum",
paragraph:"Bekezd\u00E9s",
div:"Div",
address:"C\u00EDm",
pre:"El\u0151form\u00E1zott",
h1:"C\u00EDmsor 1",
h2:"C\u00EDmsor 2",
h3:"C\u00EDmsor 3",
h4:"C\u00EDmsor 4",
h5:"C\u00EDmsor 5",
h6:"C\u00EDmsor 6",
blockquote:"Id\u00E9zet",
code:"K\u00F3d",
samp:"K\u00F3d minta",
dt:"Defini\u00E1lt kifejez\u00E9s a defin\u00EDci\u00F3s list\u00E1ban",
dd:"Defin\u00EDci\u00F3 a defin\u00EDci\u00F3s list\u00E1ban",
bold_desc:"F\u00E9lk\u00F6v\u00E9r (Ctrl+B)",
italic_desc:"D\u0151lt (Ctrl+I)",
underline_desc:"Al\u00E1h\u00FAzott (Ctrl+U)",
striketrough_desc:"\u00C1th\u00FAzott",
justifyleft_desc:"Balra z\u00E1rt",
justifycenter_desc:"K\u00F6z\u00E9pre z\u00E1rt",
justifyright_desc:"Jobbra z\u00E1rt",
justifyfull_desc:"Sorkiz\u00E1rt",
bullist_desc:"Rendezetlen lista",
numlist_desc:"Rendezett lista",
outdent_desc:"Beh\u00FAz\u00E1s cs\u00F6kkent\u00E9se",
indent_desc:"Beh\u00FAz\u00E1s n\u00F6vel\u00E9se",
undo_desc:"Visszavon\u00E1s (Ctrl+Z)",
redo_desc:"M\u00E9gis v\u00E9grehajt (Ctrl+Y)",
link_desc:"Link besz\u00FAr\u00E1sa/szerkeszt\u00E9se",
unlink_desc:"Link megsz\u00FCntet\u00E9se",
image_desc:"K\u00E9p besz\u00FAr\u00E1sa/szerkeszt\u00E9se",
cleanup_desc:"Rendetlen k\u00F3d takar\u00EDt\u00E1sa",
code_desc:"HTML forr\u00E1s szerkeszt\u00E9se",
sub_desc:"Als\u00F3 index",
sup_desc:"Fels\u0151 index",
hr_desc:"V\u00EDzszintes elv\u00E1laszt\u00F3 besz\u00FAr\u00E1sa",
removeformat_desc:"Form\u00E1z\u00E1s elt\u00E1vol\u00EDt\u00E1sa",
custom1_desc:"Az \u00F6n egyedi le\u00EDr\u00E1sa",
forecolor_desc:"Sz\u00F6vegsz\u00EDn v\u00E1laszt\u00E1sa",
backcolor_desc:"H\u00E1tt\u00E9rsz\u00EDn v\u00E1laszt\u00E1sa",
charmap_desc:"Speci\u00E1lis karakter besz\u00FAr\u00E1sa",
visualaid_desc:"Vezet\u0151vonalak/nem l\u00E1that\u00F3 elemek ki-/bekapcsol\u00E1sa",
anchor_desc:"Horgony besz\u00FAr\u00E1sa/szerkeszt\u00E9se",
cut_desc:"Kiv\u00E1g\u00E1s",
copy_desc:"M\u00E1sol\u00E1s",
paste_desc:"Besz\u00FAr\u00E1s",
image_props_desc:"K\u00E9p tulajdons\u00E1gai",
newdocument_desc:"\u00DAj dokumentum",
help_desc:"Seg\u00EDts\u00E9g",
blockquote_desc:"Id\u00E9zet",
clipboard_msg:"A M\u00E1sol\u00E1s/Kiv\u00E1g\u00E1s/Besz\u00FAr\u00E1s funkci\u00F3k nem \u00E9rhet\u0151ek el Mozilla \u00E9s Firefox alatt. K\u00EDv\u00E1n t\u00F6bbet tudni err\u0151l a t\u00E9m\u00E1r\u00F3l?",
path:"\u00DAtvonal",
newdocument:"Biztosan t\u00F6rli az eddigi tartalmat?",
toolbar_focus:"Eszk\u00F6zgombokra ugr\u00E1s - Alt+Q, Szerkeszt\u0151h\u00F6z ugr\u00E1s - Alt-Z, Elem\u00FAtvonalhoz ugr\u00E1s - Alt-X",
more_colors:"T\u00F6bb sz\u00EDn"
});
|
/**
* Copyright (c) 2013-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.
*/
const log = require('npmlog');
const path = require('path');
const uniq = require('lodash').uniq;
const flatten = require('lodash').flatten;
const chalk = require('chalk');
const isEmpty = require('lodash').isEmpty;
const promiseWaterfall = require('./promiseWaterfall');
const registerDependencyAndroid = require('./android/registerNativeModule');
const registerDependencyIOS = require('./ios/registerNativeModule');
const isInstalledAndroid = require('./android/isInstalled');
const isInstalledIOS = require('./ios/isInstalled');
const copyAssetsAndroid = require('./android/copyAssets');
const copyAssetsIOS = require('./ios/copyAssets');
const getProjectDependencies = require('./getProjectDependencies');
const getDependencyConfig = require('./getDependencyConfig');
const pollParams = require('./pollParams');
const commandStub = require('./commandStub');
const promisify = require('./promisify');
log.heading = 'rnpm-link';
const dedupeAssets = (assets) => uniq(assets, asset => path.basename(asset));
const linkDependencyAndroid = (androidProject, dependency) => {
if (!androidProject || !dependency.config.android) {
return null;
}
const isInstalled = isInstalledAndroid(androidProject, dependency.name);
if (isInstalled) {
log.info(chalk.grey(`Android module ${dependency.name} is already linked`));
return null;
}
return pollParams(dependency.config.params).then(params => {
log.info(`Linking ${dependency.name} android dependency`);
registerDependencyAndroid(
dependency.name,
dependency.config.android,
params,
androidProject
);
log.info(`Android module ${dependency.name} has been successfully linked`);
});
};
const linkDependencyIOS = (iOSProject, dependency) => {
if (!iOSProject || !dependency.config.ios) {
return;
}
const isInstalled = isInstalledIOS(iOSProject, dependency.config.ios);
if (isInstalled) {
log.info(chalk.grey(`iOS module ${dependency.name} is already linked`));
return;
}
log.info(`Linking ${dependency.name} ios dependency`);
registerDependencyIOS(dependency.config.ios, iOSProject);
log.info(`iOS module ${dependency.name} has been successfully linked`);
};
const linkAssets = (project, assets) => {
if (isEmpty(assets)) {
return;
}
if (project.ios) {
log.info('Linking assets to ios project');
copyAssetsIOS(assets, project.ios);
}
if (project.android) {
log.info('Linking assets to android project');
copyAssetsAndroid(assets, project.android.assetsPath);
}
log.info('Assets have been successfully linked to your project');
};
/**
* Updates project and linkes all dependencies to it
*
* If optional argument [packageName] is provided, it's the only one that's checked
*/
function link(args, config) {
var project;
try {
project = config.getProjectConfig();
} catch (err) {
log.error(
'ERRPACKAGEJSON',
'No package found. Are you sure it\'s a React Native project?'
);
return Promise.reject(err);
}
const packageName = args[0];
const dependencies = getDependencyConfig(
config,
packageName ? [packageName] : getProjectDependencies()
);
const assets = dedupeAssets(dependencies.reduce(
(assets, dependency) => assets.concat(dependency.config.assets),
project.assets
));
const tasks = flatten(dependencies.map(dependency => [
() => promisify(dependency.config.commands.prelink || commandStub),
() => linkDependencyAndroid(project.android, dependency),
() => linkDependencyIOS(project.ios, dependency),
() => promisify(dependency.config.commands.postlink || commandStub),
]));
tasks.push(() => linkAssets(project, assets));
return promiseWaterfall(tasks).catch(err => {
log.error(
`It seems something went wrong while linking. Error: ${err.message} \n`
+ 'Please file an issue here: https://github.com/facebook/react-native/issues'
);
throw err;
});
}
module.exports = {
func: link,
description: 'links all native dependencies',
name: 'link [packageName]',
};
|
import Ember from 'ember';
export default Ember.Object.extend({
fields: null,
});
|
/* @flow */
import { warn } from './warn'
import Regexp from 'path-to-regexp'
const regexpCompileCache: {
[key: string]: Function
} = Object.create(null)
export function fillParams (
path: string,
params: ?Object,
routeMsg: string
): string {
try {
const filler =
regexpCompileCache[path] ||
(regexpCompileCache[path] = Regexp.compile(path))
return filler(params || {}, { pretty: true })
} catch (e) {
if (process.env.NODE_ENV !== 'production') {
warn(false, `missing param for ${routeMsg}: ${e.message}`)
}
return ''
}
}
|
/**
* @file
* SEARCH AUTOCOMPLETE javascript mechanism.
*
* Sponsored by:
* www.axiomcafe.fr
*/
(function ($) {
function strip(html)
{
var tmp = document.createElement("DIV");
tmp.innerHTML = html;
return tmp.textContent || tmp.innerText || "";
}
// Autocomplete
$.ui.autocomplete.prototype._renderItem = function (ul, item) {
var term = this.term;
var first = ("group" in item) ? 'first' : '';
var innerHTML = '<div class="ui-autocomplete-fields ' + first + '">';
item.value = strip(item.value);
item.label = Drupal.checkPlain(item.label);
if (item.fields) {
$.each(item.fields, function(key, value) {
var regex = new RegExp('(' + $.trim(term) + ')', 'gi');
var output = Drupal.checkPlain(value);
if (value.indexOf('src=') == -1 && value.indexOf('href=') == -1) {
output = output.replace(regex, "<span class='ui-autocomplete-field-term'>$1</span>");
innerHTML += ('<div class="ui-autocomplete-field-' + key + '">' + output + '</div>');
} else {
innerHTML += ('<div class="ui-autocomplete-field-' + key + '">' + value + '</div>');
}
});
} else {
innerHTML += ('<div class="ui-autocomplete-field">' + item.label + '</div>');
}
innerHTML += '</div>';
var group = '';
if ("group" in item) {
groupId = typeof(item.group.group_id) !== 'undefined' ? item.group.group_id : '';
groupName = typeof(item.group.group_name) !== 'undefined' ? item.group.group_name : '';
group += ('<div class="ui-autocomplete-field-group ' + groupId + '">' + groupName + '</div>');
$(group).appendTo(ul);
}
var elem = $("<li class=ui-menu-item-" + first + "></li>" )
.append("<a>" + innerHTML + "</a>");
if (item.value == '') {
elem = $("<li class='ui-state-disabled ui-menu-item-" + first + " ui-menu-item'>" + item.label + "</li>" );
}
elem.data("item.autocomplete", item).appendTo(ul);
Drupal.attachBehaviors(elem);
return elem;
};
$.ui.autocomplete.prototype._resizeMenu = function() {
var ul = this.menu.element;
ul.outerWidth(Math.max(ul.width("").outerWidth() + 5, this.options.position.of == null ? this.element.outerWidth() : this.options.position.of.outerWidth()));
};
Drupal.behaviors.search_autocomplete = {
attach: function(context) {
if (Drupal.settings.search_autocomplete) {
$.each(Drupal.settings.search_autocomplete, function(key, value) {
$(Drupal.settings.search_autocomplete[key].selector).bind("mouseover", function() {
$(Drupal.settings.search_autocomplete[key].selector).addClass('form-autocomplete ui-autocomplete-processed').attr('data-sa-theme', Drupal.settings.search_autocomplete[key].theme).autocomplete({
minLength: Drupal.settings.search_autocomplete[key].minChars,
source: function(request, response) {
$(Drupal.settings.search_autocomplete[key].selector).addClass('throbbing');
// External URL:
if (Drupal.settings.search_autocomplete[key].type == 'external') {
$.getJSON(Drupal.settings.search_autocomplete[key].datas, { q: encodeURIComponent(request.term) }, function (results) {
// Only return the number of values set in the settings.
if (results.length) {
results.slice(0, Drupal.settings.search_autocomplete[key].max_sug);
}
response(results);
});
}
// Internal URL:
else if (Drupal.settings.search_autocomplete[key].type == 'internal' || Drupal.settings.search_autocomplete[key].type == 'view') {
$.getJSON(Drupal.settings.search_autocomplete[key].datas, request, function (results) {
// Only return the number of values set in the settings.
if (results.length) {
results.slice(0, Drupal.settings.search_autocomplete[key].max_sug);
}
response(results);
});
}
// Static resources:
else if (Drupal.settings.search_autocomplete[key].type == 'static') {
var results = $.ui.autocomplete.filter(Drupal.settings.search_autocomplete[key].datas, request.term);
if (results.length) {
results.slice(0, Drupal.settings.search_autocomplete[key].max_sug);
}
response(results);
}
},
open: function(event, ui) {
$(".ui-autocomplete li.ui-menu-item:odd").addClass("ui-menu-item-odd");
$(".ui-autocomplete li.ui-menu-item:even").addClass("ui-menu-item-even");
$(Drupal.settings.search_autocomplete[key].selector).removeClass('throbbing');
},
select: function(event, ui) {
if (Drupal.settings.search_autocomplete[key].auto_redirect == 1 && ui.item.link) {
document.location.href = ui.item.link;
} else if (Drupal.settings.search_autocomplete[key].auto_submit == 1 && ui.item.value) {
$(this).val(ui.item.value);
$(this).closest("form").submit();
}
},
focus: function (event, ui) {
if (typeof ui.item.group != 'undefined') {
if (ui.item.group.group_id == 'no_results' || ui.item.group.group_id == 'all_results') {
event.preventDefault();
}
}
},
appendTo: $(Drupal.settings.search_autocomplete[key].selector).parent()
}).autocomplete("widget").attr("data-sa-theme", Drupal.settings.search_autocomplete[key].theme);
});
$(Drupal.settings.search_autocomplete[key].selector).trigger('mouseover');
});
}
}
};
})(jQuery);
|
describe('explorer', function() {
var lib = require('../lib/explorer');
var data = require('../test/data.js');
describe('convert_to_satoshi', function() {
it('should be able to convert round numbers', function() {
lib.convert_to_satoshi(500, function(amount_sat){
expect(amount_sat).toEqual(50000000000);
});
});
it('should be able to convert decimals above 1', function() {
lib.convert_to_satoshi(500.12564, function(amount_sat){
expect(amount_sat).toEqual(50012564000);
});
});
it('should be able to convert decimals below 1', function() {
lib.convert_to_satoshi(0.0005, function(amount_sat){
expect(amount_sat).toEqual(50000);
});
});
});
describe('is_unique', function() {
var arrayStrMap = [
{'addresses' : 'XsF8k8s5CoS3XATqW2FkuTsznbJJzFAC2U'},
{'addresses' : 'XsF8k8s5C14FbhqW2FkuATsznFACAfVhUn'},
{'addresses' : 'XsF8k8s5CoAF5gTqW2FkuTsznbJJzhkj5A'},
{'addresses' : 'XfuW2K9QiGMSsq5eXgtimEQvTvz9dzBCzb'}
];
var arrayArrMap = [
{'addresses' : ['XsF8k8s5CoS3XATqW2FkuTsznbJJzFAC2U']},
{'addresses' : ['XsF8k8s5C14FbhqW2FkuATsznFACAfVhUn']},
{'addresses' : ['XsF8k8s5CoAF5gTqW2FkuTsznbJJzhkj5A']},
{'addresses' : ['XfuW2K9QiGMSsq5eXgtimEQvTvz9dzBCzb']}
];
it('should return index of matching string object', function() {
lib.is_unique(arrayStrMap, arrayStrMap[2].addresses, function(unique, index){
expect(index).toEqual(2);
expect(unique).toEqual(false);
});
});
it('should return index of matching array object', function() {
lib.is_unique(arrayArrMap, arrayArrMap[2].addresses, function(unique, index){
expect(index).toEqual(2);
expect(unique).toEqual(false);
});
});
it('should return true if no matching string object', function() {
lib.is_unique(arrayStrMap, 'unique', function(unique, index){
expect(index).toEqual(null);
expect(unique).toEqual(true);
});
});
it('should return true if no matching array object', function() {
lib.is_unique(arrayArrMap, ['unique'], function(unique, index){
expect(index).toEqual(null);
expect(unique).toEqual(true);
});
});
});
describe('prepare_vout', function() {
var originalTimeout;
beforeEach(function() {
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
});
it('should ignore nonstandard outputs', function(done) {
lib.prepare_vout(data.txA().vout, data.txA().txid, function(prepared) {
expect(prepared.length).toEqual(152);
done();
});
});
it('should maintain order', function(done) {
lib.prepare_vout(data.txA().vout, data.txA().txid, function(prepared) {
expect(prepared[150].amount).toEqual(2.1006);
expect(prepared[150].addresses).toEqual(['XyPreJfnUxSSY1QbYqQxDXpymc26VFQPDV']);
done();
});
});
afterEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
});
});
describe('calculate_total', function() {
var originalTimeout;
beforeEach(function() {
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
});
it('should calculate correct total', function(done) {
lib.prepare_vout(data.txA().vout, data.txA().txid, function(prepared) {
lib.calculate_total(prepared, function(total) {
expect(total).toEqual(700200000);
done();
});
});
});
afterEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
});
});
describe('prepare_vin', function() {
var originalTimeout;
beforeEach(function() {
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
});
it('should return array of correct length', function(done) {
lib.prepare_vin(data.txB(), function(prepared) {
expect(prepared.length).toEqual(18);
done();
});
});
it('should get correct input addresses', function(done) {
lib.prepare_vin(data.txB(), function(prepared) {
expect(prepared[3].amount).toEqual(10.00000001);
expect(prepared[3].addresses).toEqual('XjYC7q5QwG7dGnytYDoCURhL4CATj6WQhZ');
done();
});
});
afterEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
});
});
});
|
/// Copyright (c) 2012 Ecma International. All rights reserved.
/**
* @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-15.js
* @description Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array-like object
*/
function testcase() {
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
testResult = (prevVal === 0);
}
}
var proto = { 1: 1, 2: 2 };
Object.defineProperty(proto, "0", {
get: function () {
return 0;
},
configurable: true
});
var Con = function () { };
Con.prototype = proto;
var child = new Con();
child.length = 3;
Array.prototype.reduce.call(child, callbackfn);
return testResult;
}
runTestCase(testcase);
|
// Copyright 2011 Google Inc. All rights reserved.
/**
* @path ch13/13.2/S13.2_A8_T1.js
* @description check if "caller" poisoning poisons
* "in" too
* @onlyStrict
*/
"use strict";
'caller' in function() {};
|
// Copyright 2009 the Sputnik authors. All rights reserved.
/**
* If GetBase(x) doesn't have a property GetPropertyName(x), return true
*
* @path ch11/11.4/11.4.1/S11.4.1_A2.2_T2.js
* @description Checking Object object and Function object cases
*/
//CHECK#1
function MyFunction(){}
var MyObject = new MyFunction();
if (delete MyObject.prop !== true) {
$ERROR('#1: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject.prop === true');
}
//CHECK#2
var MyObject = new Object();
if (delete MyObject.prop !== true) {
$ERROR('#2: var MyObject = new Object(); delete MyObject.prop === true');
}
|
module.exports = () => {};
|
var convert = require('./convert'),
func = convert('mergeAll', require('../merge'));
func.placeholder = require('./placeholder');
module.exports = func;
|
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.labelPlugin = factory());
}(this, function () { 'use strict';
function labelPlugin() {
return function (fp) {
return {
onReady: function () {
var id = fp.input.id;
if (!id) {
return;
}
if (fp.mobileInput) {
fp.input.removeAttribute("id");
fp.mobileInput.id = id;
}
else if (fp.altInput) {
fp.input.removeAttribute("id");
fp.altInput.id = id;
}
}
};
};
}
return labelPlugin;
}));
|
version https://git-lfs.github.com/spec/v1
oid sha256:3a4ebac67ebbc43ae58c8be0fca9e78de01e4a563ddd38a36b72383d5f85cf5d
size 3358
|
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v10.0.0
* @link http://www.ag-grid.com/
* @license MIT
*/
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var context_1 = require("../context/context");
var filterManager_1 = require("../filter/filterManager");
var FilterService = (function () {
function FilterService() {
}
FilterService.prototype.filterAccordingToColumnState = function (rowNode) {
var filterActive = this.filterManager.isAnyFilterPresent();
this.filter(rowNode, filterActive);
};
FilterService.prototype.filter = function (rowNode, filterActive) {
var _this = this;
// recursively get all children that are groups to also filter
rowNode.childrenAfterGroup.forEach(function (child) {
if (child.group) {
_this.filter(child, filterActive);
}
});
// result of filter for this node
var filterResult;
if (filterActive) {
filterResult = [];
rowNode.childrenAfterGroup.forEach(function (childNode) {
if (childNode.group) {
// a group is included in the result if it has any children of it's own.
// by this stage, the child groups are already filtered
if (childNode.childrenAfterFilter.length > 0) {
filterResult.push(childNode);
}
}
else {
// a leaf level node is included if it passes the filter
if (_this.filterManager.doesRowPassFilter(childNode)) {
filterResult.push(childNode);
}
}
});
}
else {
// if not filtering, the result is the original list
filterResult = rowNode.childrenAfterGroup;
}
rowNode.childrenAfterFilter = filterResult;
this.setAllChildrenCount(rowNode);
};
FilterService.prototype.setAllChildrenCount = function (rowNode) {
var allChildrenCount = 0;
rowNode.childrenAfterFilter.forEach(function (child) {
if (child.group) {
allChildrenCount += child.allChildrenCount;
}
else {
allChildrenCount++;
}
});
rowNode.setAllChildrenCount(allChildrenCount);
};
return FilterService;
}());
__decorate([
context_1.Autowired('filterManager'),
__metadata("design:type", filterManager_1.FilterManager)
], FilterService.prototype, "filterManager", void 0);
FilterService = __decorate([
context_1.Bean("filterService")
], FilterService);
exports.FilterService = FilterService;
|
module.exports = require('../../es/array/find');
|
module.exports = require('../../../es/string/virtual/pad-end');
|
/** PURE_IMPORTS_START .._operators_repeatWhen PURE_IMPORTS_END */
import { repeatWhen as higherOrder } from '../operators/repeatWhen';
/**
* Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source
* Observable calls `complete`, this method will emit to the Observable returned from `notifier`. If that Observable
* calls `complete` or `error`, then this method will call `complete` or `error` on the child subscription. Otherwise
* this method will resubscribe to the source Observable.
*
* <img src="./img/repeatWhen.png" width="100%">
*
* @param {function(notifications: Observable): Observable} notifier - Receives an Observable of notifications with
* which a user can `complete` or `error`, aborting the repetition.
* @return {Observable} The source Observable modified with repeat logic.
* @method repeatWhen
* @owner Observable
*/
export function repeatWhen(notifier) {
return higherOrder(notifier)(this);
}
//# sourceMappingURL=repeatWhen.js.map
|
/**
* Copyright 2013 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @providesModule PooledClass
*/
"use strict";
/**
* Static poolers. Several custom versions for each potential number of
* arguments. A completely generic pooler is easy to implement, but would
* require accessing the `arguments` object. In each of these, `this` refers to
* the Class itself, not an instance. If any others are needed, simply add them
* here, or in their own files.
*/
var oneArgumentPooler = function(copyFieldsFrom) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, copyFieldsFrom);
return instance;
} else {
return new Klass(copyFieldsFrom);
}
};
var twoArgumentPooler = function(a1, a2) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2);
return instance;
} else {
return new Klass(a1, a2);
}
};
var threeArgumentPooler = function(a1, a2, a3) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3);
return instance;
} else {
return new Klass(a1, a2, a3);
}
};
var fiveArgumentPooler = function(a1, a2, a3, a4, a5) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3, a4, a5);
return instance;
} else {
return new Klass(a1, a2, a3, a4, a5);
}
};
var standardReleaser = function(instance) {
var Klass = this;
if (instance.destructor) {
instance.destructor();
}
if (Klass.instancePool.length < Klass.poolSize) {
Klass.instancePool.push(instance);
}
};
var DEFAULT_POOL_SIZE = 10;
var DEFAULT_POOLER = oneArgumentPooler;
/**
* Augments `CopyConstructor` to be a poolable class, augmenting only the class
* itself (statically) not adding any prototypical fields. Any CopyConstructor
* you give this may have a `poolSize` property, and will look for a
* prototypical `destructor` on instances (optional).
*
* @param {Function} CopyConstructor Constructor that can be used to reset.
* @param {Function} pooler Customizable pooler.
*/
var addPoolingTo = function(CopyConstructor, pooler) {
var NewKlass = CopyConstructor;
NewKlass.instancePool = [];
NewKlass.getPooled = pooler || DEFAULT_POOLER;
if (!NewKlass.poolSize) {
NewKlass.poolSize = DEFAULT_POOL_SIZE;
}
NewKlass.release = standardReleaser;
return NewKlass;
};
var PooledClass = {
addPoolingTo: addPoolingTo,
oneArgumentPooler: oneArgumentPooler,
twoArgumentPooler: twoArgumentPooler,
threeArgumentPooler: threeArgumentPooler,
fiveArgumentPooler: fiveArgumentPooler
};
module.exports = PooledClass;
|
// AMD-ID "dojox/math/random/Secure"
define(["dojo"], function(dojo) {
// Copyright (c) 2005 Tom Wu
// All Rights Reserved.
// See "LICENSE-BigInteger" for details.
// Random number generator - requires a PRNG backend, e.g. prng4.js
dojo.declare("dojox.math.random.Secure", null, {
// summary:
// Super simple implementation of a random number generator,
// which relies on Math.random().
constructor: function(prng, noEvents){
// summary:
// Initializes an instance of a secure random generator.
// prng: Function
// function that returns an instance of PRNG (pseudo random number generator)
// with two methods: init(array) and next(). It should have a property "size"
// to indicate the required pool size.
// noEvents: Boolean?
// if false or absent, onclick and onkeypress event will be used to add
// "randomness", otherwise events will not be used.
this.prng = prng;
// Initialize the pool with junk if needed.
var p = this.pool = new Array(prng.size);
this.pptr = 0;
for(var i = 0, len = prng.size; i < len;) { // extract some randomness from Math.random()
var t = Math.floor(65536 * Math.random());
p[i++] = t >>> 8;
p[i++] = t & 255;
}
this.seedTime();
if(!noEvents){
this.h = [
dojo.connect(dojo.body(), "onclick", this, "seedTime"),
dojo.connect(dojo.body(), "onkeypress", this, "seedTime")
];
}
},
destroy: function(){
// summary:
// Disconnects events, if any, preparing the object for GC.
if(this.h){
dojo.forEach(this.h, dojo.disconnect);
}
},
nextBytes: function(/* Array */ byteArray){
// summary:
// Fills in an array of bytes with random numbers
// byteArray: Array
// array to be filled in with random numbers, only existing
// elements will be filled.
var state = this.state;
if(!state){
this.seedTime();
state = this.state = this.prng();
state.init(this.pool);
for(var p = this.pool, i = 0, len = p.length; i < len; p[i++] = 0);
this.pptr = 0;
//this.pool = null;
}
for(var i = 0, len = byteArray.length; i < len; ++i){
byteArray[i] = state.next();
}
},
seedTime: function() {
// summary:
// Mix in the current time (w/milliseconds) into the pool
this._seed_int(new Date().getTime());
},
_seed_int: function(x) {
// summary:
// Mix in a 32-bit integer into the pool
var p = this.pool, i = this.pptr;
p[i++] ^= x & 255;
p[i++] ^= (x >> 8) & 255;
p[i++] ^= (x >> 16) & 255;
p[i++] ^= (x >> 24) & 255;
if(i >= this.prng.size){
i -= this.prng.size;
}
this.pptr = i;
}
});
return dojox.math.random.Secure;
});
|
define(function (require) {
return require('echarts').extendComponentView({
type: 'bmap',
render: function (bMapModel, ecModel, api) {
var rendering = true;
var bmap = bMapModel.getBMap();
var viewportRoot = api.getZr().painter.getViewportRoot();
var coordSys = bMapModel.coordinateSystem;
var moveHandler = function (type, target) {
if (rendering) {
return;
}
var offsetEl = viewportRoot.parentNode.parentNode.parentNode;
var mapOffset = [
-parseInt(offsetEl.style.left, 10) || 0,
-parseInt(offsetEl.style.top, 10) || 0
];
viewportRoot.style.left = mapOffset[0] + 'px';
viewportRoot.style.top = mapOffset[1] + 'px';
coordSys.setMapOffset(mapOffset);
bMapModel.__mapOffset = mapOffset;
api.dispatchAction({
type: 'bmapRoam'
});
};
function zoomEndHandler() {
if (rendering) {
return;
}
api.dispatchAction({
type: 'bmapRoam'
});
}
bmap.removeEventListener('moving', this._oldMoveHandler);
// FIXME
// Moveend may be triggered by centerAndZoom method when creating coordSys next time
// bmap.removeEventListener('moveend', this._oldMoveHandler);
bmap.removeEventListener('zoomend', this._oldZoomEndHandler);
bmap.addEventListener('moving', moveHandler);
// bmap.addEventListener('moveend', moveHandler);
bmap.addEventListener('zoomend', zoomEndHandler);
this._oldMoveHandler = moveHandler;
this._oldZoomEndHandler = zoomEndHandler;
var roam = bMapModel.get('roam');
if (roam && roam !== 'scale') {
bmap.enableDragging();
}
else {
bmap.disableDragging();
}
if (roam && roam !== 'move') {
bmap.enableScrollWheelZoom();
bmap.enableDoubleClickZoom();
bmap.enablePinchToZoom();
}
else {
bmap.disableScrollWheelZoom();
bmap.disableDoubleClickZoom();
bmap.disablePinchToZoom();
}
var originalStyle = bMapModel.__mapStyle;
var newMapStyle = bMapModel.get('mapStyle') || {};
// FIXME, Not use JSON methods
var mapStyleStr = JSON.stringify(newMapStyle);
if (JSON.stringify(originalStyle) !== mapStyleStr) {
// FIXME May have blank tile when dragging if setMapStyle
if (Object.keys(newMapStyle).length) {
bmap.setMapStyle(newMapStyle);
}
bMapModel.__mapStyle = JSON.parse(mapStyleStr);
}
rendering = false;
}
});
});
|
/*
testem_client.js
================
The client-side script that reports results back to the Testem server via Socket.IO.
It also restarts the tests by refreshing the page when instructed by the server to do so.
*/
function getBrowserName(userAgent){
var regexs = [
/MS(?:(IE) (1?[0-9]\.[0-9]))/,
[/Trident\/.* rv:(1?[0-9]\.[0-9])/, function(m) {
return ['IE', m[1]].join(' ')
}],
[/(OPR)\/([0-9]+\.[0-9]+)/, function(m){
return ['Opera', m[2]].join(' ')
}],
/(Opera).*Version\/([0-9]+\.[0-9]+)/,
/(Chrome)\/([0-9]+\.[0-9]+)/,
/(Firefox)\/([0-9a-z]+\.[0-9a-z]+)/,
/(PhantomJS)\/([0-9]+\.[0-9]+)/,
[/(Android).*Version\/([0-9]+\.[0-9]+).*(Safari)/, function(m){
return [m[1], m[3], m[2]].join(' ')
}],
[/(iPhone).*Version\/([0-9]+\.[0-9]+).*(Safari)/, function(m){
return [m[1], m[3], m[2]].join(' ')
}],
[/(iPad).*Version\/([0-9]+\.[0-9]+).*(Safari)/, function(m){
return [m[1], m[3], m[2]].join(' ')
}],
[/Version\/([0-9]+\.[0-9]+).*(Safari)/, function(m){
return [m[2], m[1]].join(' ')
}]
]
for (var i = 0; i < regexs.length; i++){
var regex = regexs[i]
var pick = function(m){
return m.slice(1).join(' ')
}
if (regex instanceof Array){
pick = regex[1]
regex = regex[0]
}
var match = userAgent.match(regex)
if (match){
return pick(match)
}
}
return userAgent
}
var socket, connectStatus = 'disconnected'
function syncConnectStatus(){
var elm = document.getElementById('__testem_ui__')
if (elm) elm.className = connectStatus
}
function startTests(){
socket.disconnect()
window.location.reload()
}
function initUI(){
var markup = '\
<style>\
#__testem_ui__{\
position: fixed;\
bottom: 5px;\
right: 5px;\
background-color: #444;\
padding: 3px;\
color: #fff;\
font-family: Monaco, monospace;\
text-transform: uppercase;\
opacity: 0.8;\
}\
#__testem_ui__.connected{\
color: #89e583;\
}\
#__testem_ui__.disconnected{\
color: #cc7575;\
}\
</style>\
TEST\u0027EM \u0027SCRIPTS!\
'
var elm = document.createElement('div')
elm.id = '__testem_ui__'
elm.className = connectStatus
elm.innerHTML = markup
document.body.appendChild(elm)
}
function initTestFrameworkHooks(){
if (typeof getJasmineRequireObj === 'function'){
jasmine2Adapter(socket)
}else if (typeof jasmine === 'object'){
jasmineAdapter(socket)
}else if ((typeof mocha).match(/function|object/)){
mochaAdapter(socket)
}else if (typeof QUnit === 'object'){
qunitAdapter(socket)
}else if (typeof buster !== 'undefined'){
busterAdapter(socket)
}
}
var addListener = window.addEventListener ?
function(obj, evt, cb){ obj.addEventListener(evt, cb, false) } :
function(obj, evt, cb){ obj.attachEvent('on' + evt, cb) }
function getId(){
var m = location.pathname.match(/^\/([0-9]+)/)
return m ? m[1] : null
}
function init(){
takeOverConsole()
interceptWindowOnError()
socket = io.connect({ reconnectionDelayMax: 1000 })
var id = getId()
socket.emit('browser-login',
getBrowserName(navigator.userAgent),
id)
socket.on('connect', function(){
connectStatus = 'connected'
syncConnectStatus()
})
socket.on('disconnect', function(){
connectStatus = 'disconnected'
syncConnectStatus()
})
socket.on('reconnect', startTests)
socket.on('start-tests', startTests)
initTestFrameworkHooks()
addListener(window, 'load', initUI)
setupTestStats()
}
function setupTestStats(){
var originalTitle = document.title
var total = 0
var passed = 0
Testem.on('test-result', function(test){
total++
if (test.failed === 0) passed++
updateTitle()
})
function updateTitle(){
if (!total) return
document.title = originalTitle + ' (' + passed + '/' + total + ')'
}
}
function takeOverConsole(){
var console = window.console
if (!console) {
console = window.console = {
log: function () {},
warn: function () {},
error: function () {},
info: function () {}
}
}
function intercept(method){
var original = console[method]
console[method] = function(){
var args = Array.prototype.slice.apply(arguments)
var message = decycle(args).join(' ')
var doDefault = Testem.handleConsoleMessage(message)
if (doDefault !== false){
socket.emit(method, decycle(message))
if (original && original.apply){
// Do this for normal browsers
original.apply(console, arguments)
}else if (original) {
// Do this for IE
original(message)
}
}
}
}
var methods = ['log', 'warn', 'error', 'info']
for (var i = 0; i < methods.length; i++)
intercept(methods[i])
}
function interceptWindowOnError(){
window.onerror = function(msg, url, line){
if (typeof msg === 'string' && typeof url === 'string' && typeof line === 'number'){
socket.emit('top-level-error', msg, url, line)
}
}
}
function emit(){
Testem.emit.apply(Testem, arguments)
}
window.Testem = {
useCustomAdapter: function(adapter){
adapter(socket)
},
emit: function(evt){
var args = Array.prototype.slice.apply(arguments)
var argsWithoutFirst = Array.prototype.slice.call(arguments, 1)
var self = this;
// Workaround IE 8 max instructions
setTimeout(function() {
var decycled = decycle(args);
setTimeout(function() {
socket.emit.apply(socket, decycled);
if (self.evtHandlers && self.evtHandlers[evt]){
var handlers = self.evtHandlers[evt]
for (var i = 0; i < handlers.length; i++){
var handler = handlers[i]
handler.apply(self, argsWithoutFirst)
}
}
}, 0);
}, 0);
},
on: function(evt, callback){
if (!this.evtHandlers){
this.evtHandlers = {}
}
if (!this.evtHandlers[evt]){
this.evtHandlers[evt] = []
}
this.evtHandlers[evt].push(callback)
},
handleConsoleMessage: function(){}
}
init()
|
// Generated by CoffeeScript 1.10.0
var Escaper, Pattern;
Pattern = require('./Pattern');
Escaper = (function() {
var ch;
function Escaper() {}
Escaper.LIST_ESCAPEES = ['\\', '\\\\', '\\"', '"', "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", (ch = String.fromCharCode)(0x0085), ch(0x00A0), ch(0x2028), ch(0x2029)];
Escaper.LIST_ESCAPED = ['\\\\', '\\"', '\\"', '\\"', "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", "\\x18", "\\x19", "\\x1a", "\\e", "\\x1c", "\\x1d", "\\x1e", "\\x1f", "\\N", "\\_", "\\L", "\\P"];
Escaper.MAPPING_ESCAPEES_TO_ESCAPED = (function() {
var i, j, mapping, ref;
mapping = {};
for (i = j = 0, ref = Escaper.LIST_ESCAPEES.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
mapping[Escaper.LIST_ESCAPEES[i]] = Escaper.LIST_ESCAPED[i];
}
return mapping;
})();
Escaper.PATTERN_CHARACTERS_TO_ESCAPE = new Pattern('[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9');
Escaper.PATTERN_MAPPING_ESCAPEES = new Pattern(Escaper.LIST_ESCAPEES.join('|').split('\\').join('\\\\'));
Escaper.PATTERN_SINGLE_QUOTING = new Pattern('[\\s\'":{}[\\],&*#?]|^[-?|<>=!%@`]');
Escaper.requiresDoubleQuoting = function(value) {
return this.PATTERN_CHARACTERS_TO_ESCAPE.test(value);
};
Escaper.escapeWithDoubleQuotes = function(value) {
var result;
result = this.PATTERN_MAPPING_ESCAPEES.replace(value, (function(_this) {
return function(str) {
return _this.MAPPING_ESCAPEES_TO_ESCAPED[str];
};
})(this));
return '"' + result + '"';
};
Escaper.requiresSingleQuoting = function(value) {
return this.PATTERN_SINGLE_QUOTING.test(value);
};
Escaper.escapeWithSingleQuotes = function(value) {
return "'" + value.replace(/'/g, "''") + "'";
};
return Escaper;
})();
module.exports = Escaper;
|
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.0.0-master-19c11fd
*/
function MdDividerDirective(e){return{restrict:"E",link:e}}goog.provide("ng.material.components.divider"),goog.require("ng.material.core"),angular.module("material.components.divider",["material.core"]).directive("mdDivider",MdDividerDirective),MdDividerDirective.$inject=["$mdTheming"],ng.material.components.divider=angular.module("material.components.divider");
|
import Ember from "ember";
export default class RunningTransition {
constructor(transitionMap, versions, animation) {
this.transitionMap = transitionMap;
this.animation = animation || transitionMap.lookup('default');
this.animationContext = publicAnimationContext(this, versions);
}
run() {
if (this._ran) {
return this._ran;
}
this.transitionMap.incrementRunningTransitions();
return this._ran = this._invokeAnimation().catch((err) => {
// If the animation blew up, try to leave the DOM in a
// non-broken state as best we can before rethrowing.
return this.transitionMap.lookup('default').apply(this.animationContext)
.then(function(){ throw err; });
}).finally(() => {
this.transitionMap.decrementRunningTransitions();
});
}
interrupt() {
this.interrupted = true;
this.animationContext.oldElement = null;
this.animationContext.newElement = null;
this.animationContext.older.forEach((entry) => {
entry.element = null;
});
}
_invokeAnimation() {
return this.animation.run(this.animationContext).then(() => {
return this.interrupted;
});
}
}
// This defines the public set of things that user's transition
// implementations can access as `this`.
function publicAnimationContext(rt, versions) {
var c = {};
addPublicVersion(c, 'new', versions[0]);
if (versions[1]) {
addPublicVersion(c, 'old', versions[1]);
}
c.older = versions.slice(2).map((v) => {
var context = {};
addPublicVersion(context, null, v);
return context;
});
// Animations are allowed to look each other up.
c.lookup = function(name) {
return rt.transitionMap.lookup(name);
};
return c;
}
function addPublicVersion(context, prefix, version) {
var props = {
view: version.view,
element: version.view ? version.view.$() : null,
value: version.value
};
for (var key in props) {
var outputKey = key;
if (props.hasOwnProperty(key)) {
if (prefix) {
outputKey = prefix + Ember.String.capitalize(key);
}
context[outputKey] = props[key];
}
}
}
|
/*jshint expr: true*/
describe('getCommandHistory', function() {
before(h.setup());
it('text should be visible after clicking on .btn1', function() {
return this.client.getTitle().click('body').getCommandHistory().then(function(commandList) {
commandList = commandList.slice(-5);
commandList[0].name.should.be.equal('getTitle');
commandList[0].args.should.have.length(0);
commandList[1].name.should.be.equal('title');
commandList[0].args.should.have.length(0);
commandList[2].name.should.be.equal('click');
commandList[2].args[0].should.be.equal('body');
commandList[3].name.should.be.equal('element');
commandList[3].args[0].should.be.equal('body');
commandList[4].name.should.be.equal('elementIdClick');
});
});
});
|
function __processArg(obj, key) {
var arg = null;
if (obj) {
arg = obj[key] || null;
delete obj[key];
}
return arg;
}
function Controller() {
require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
this.__controllerPath = "index";
this.args = arguments[0] || {};
if (arguments[0]) {
{
__processArg(arguments[0], "__parentSymbol");
}
{
__processArg(arguments[0], "$model");
}
{
__processArg(arguments[0], "__itemTemplate");
}
}
var $ = this;
var exports = {};
var __alloyId1 = [];
$.__views.__alloyId3 = Alloy.createWidget("alloy.window", "widget", {
id: "__alloyId3"
});
$.__views.__alloyId2 = Ti.UI.createTab({
window: $.__views.__alloyId3.getViewEx({
recurse: true
}),
title: "tab 1",
id: "__alloyId2"
});
__alloyId1.push($.__views.__alloyId2);
$.__views.__alloyId6 = Ti.UI.createWindow({
backgroundColor: "#fff",
modal: false,
title: "window 2",
id: "__alloyId6"
});
$.__views.__alloyId7 = Ti.UI.createLabel({
height: Ti.UI.SIZE,
width: Ti.UI.SIZE,
color: "#000",
textAlign: "center",
font: {
fontSize: "48dp",
fontWeight: "bold"
},
text: "label 2",
id: "__alloyId7"
});
$.__views.__alloyId6.add($.__views.__alloyId7);
$.__views.__alloyId5 = Ti.UI.createTab({
window: $.__views.__alloyId6,
title: "tab 2",
id: "__alloyId5"
});
__alloyId1.push($.__views.__alloyId5);
$.__views.index = Ti.UI.createTabGroup({
backgroundColor: "#fff",
tabs: __alloyId1,
id: "index"
});
$.__views.index && $.addTopLevelView($.__views.index);
exports.destroy = function() {};
_.extend($, $.__views);
$.index.open();
_.extend($, exports);
}
var Alloy = require("alloy"), Backbone = Alloy.Backbone, _ = Alloy._;
module.exports = Controller;
|
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("uicolor","pt",{title:"Seleção de Cor da IU",options:"Color Options",highlight:"Highlight",selected:"Selected Color",predefined:"Conjuntos de cor predefinidos",config:"Colar este item no seu ficheiro config.js"});
|
/* Copyright 2015-present Samsung Electronics Co., Ltd. and other contributors
*
* 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 EventEmitter = require('events').EventEmitter;
var ee = new EventEmitter();
ee.emit('error');
|
function array_combine(keys, values) {
// discuss at: http://phpjs.org/functions/array_combine/
// original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// improved by: Brett Zamir (http://brett-zamir.me)
// example 1: array_combine([0,1,2], ['kevin','van','zonneveld']);
// returns 1: {0: 'kevin', 1: 'van', 2: 'zonneveld'}
var new_array = {},
keycount = keys && keys.length,
i = 0;
// input sanitation
if (typeof keys !== 'object' || typeof values !== 'object' || // Only accept arrays or array-like objects
typeof keycount !== 'number' || typeof values.length !== 'number' || !keycount) {
// Require arrays to have a count
return false;
}
// number of elements does not match
if (keycount != values.length) {
return false;
}
for (i = 0; i < keycount; i++) {
new_array[keys[i]] = values[i];
}
return new_array;
}
|
describe('back', function() {
before(h.setup());
it('should be able to go backward in history', function(){
return this.client
/**
* first create a history
*/
.click('=two')
.pause(3000)
/**
* go back in history
*/
.back()
.pause(3000)
/**
* did it work?
*/
.getTitle().then(function(title) {
title.should.be.exactly('WebdriverJS Testpage');
});
});
});
|
var combineLatest_support_1 = require('./combineLatest-support');
/**
* Takes an Observable of Observables, and collects all observables from it. Once the outer observable
* completes, it subscribes to all collected observables and "combines" their values, such that:
* - every time an observable emits, the returned observable emits
* - when the returned observable emits, it emits all of the most recent values by:
* - if a `project` function is provided, it is called with each recent value from each observable in whatever order they arrived,
* and the result of the `project` function is what is emitted by the returned observable
* - if there is no `project` function, an array of all of the most recent values is emitted by the returned observable.
* @param {function} [project] an optional function to map the most recent values from each observable into a new result. Takes each of the
* most recent values from each collected observable as arguments, in order.
* @returns {Observable} an observable of projected results or arrays of recent values.
*/
function combineAll(project) {
return this.lift(new combineLatest_support_1.CombineLatestOperator(project));
}
exports.combineAll = combineAll;
//# sourceMappingURL=combineAll.js.map
|
// This is included with the Parsley library itself,
// thus there is no use in adding it to your project.
import Parsley from '../parsley/main';
Parsley.addMessages('sl', {
defaultMessage: "Podatek ne ustreza vpisnim kriterijem.",
type: {
email: "Vpišite pravilen email.",
url: "Vpišite pravilen url naslov.",
number: "Vpišite številko.",
integer: "Vpišite celo število brez decimalnih mest.",
digits: "Vpišite samo cifre.",
alphanum: "Vpišite samo alfanumerične znake (cifre in črke)."
},
notblank: "To polje ne sme biti prazno.",
required: "To polje je obvezno.",
pattern: "Podatek ne ustreza vpisnim kriterijem.",
min: "Vrednost mora biti višja ali enaka kot %s.",
max: "Vrednost mora biti nižja ali enaka kot %s.",
range: "Vrednost mora biti med %s in %s.",
minlength: "Vpis je prekratek. Mora imeti najmanj %s znakov.",
maxlength: "Vpis je predolg. Lahko ima največ %s znakov.",
length: "Število vpisanih znakov je napačno. Število znakov je lahko samo med %s in %s.",
mincheck: "Izbrati morate vsaj %s možnosti.",
maxcheck: "Izberete lahko največ %s možnosti.",
check: "Število izbranih možnosti je lahko samo med %s in %s.",
equalto: "Vnos mora biti enak."
});
Parsley.setLocale('sl');
|
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'link', 'sq', {
acccessKey: 'Sipas ID-së së Elementit',
advanced: 'Të përparuara',
advisoryContentType: 'Lloji i Përmbajtjes Këshillimore',
advisoryTitle: 'Titull',
anchor: {
toolbar: 'Spirancë',
menu: 'Redakto Spirancën',
title: 'Anchor Properties', // MISSING
name: 'Emri i Spirancës',
errorName: 'Ju lutemi shkruani emrin e spirancës',
remove: 'Largo Spirancën'
},
anchorId: 'Sipas ID-së së Elementit',
anchorName: 'Sipas Emrit të Spirancës',
charset: 'Seti i Karaktereve të Burimeve të Nëdlidhura',
cssClasses: 'Klasa stili CSS',
download: 'Force Download', // MISSING
displayText: 'Display Text', // MISSING
emailAddress: 'Posta Elektronike',
emailBody: 'Trupi i Porosisë',
emailSubject: 'Titulli i Porosisë',
id: 'Id',
info: 'Informacione të Nyjes',
langCode: 'Kod gjuhe',
langDir: 'Drejtim teksti',
langDirLTR: 'Nga e majta në të djathë (LTR)',
langDirRTL: 'Nga e djathta në të majtë (RTL)',
menu: 'Redakto Nyjen',
name: 'Emër',
noAnchors: '(Nuk ka asnjë spirancë në dokument)',
noEmail: 'Ju lutemi shkruani postën elektronike',
noUrl: 'Ju lutemi shkruani URL-në e nyjes',
other: '<tjetër>',
popupDependent: 'E Varur (Netscape)',
popupFeatures: 'Karakteristikat e Dritares së Dialogut',
popupFullScreen: 'Ekran i Plotë (IE)',
popupLeft: 'Pozita Majtas',
popupLocationBar: 'Shiriti i Lokacionit',
popupMenuBar: 'Shiriti i Menysë',
popupResizable: 'I ndryshueshëm',
popupScrollBars: 'Shiritat zvarritës',
popupStatusBar: 'Shiriti i Statutit',
popupToolbar: 'Shiriti i Mejteve',
popupTop: 'Top Pozita',
rel: 'Marrëdhëniet',
selectAnchor: 'Përzgjidh një Spirancë',
styles: 'Stil',
tabIndex: 'Indeksi i fletave',
target: 'Objektivi',
targetFrame: '<frame>',
targetFrameName: 'Emri i Kornizës së Synuar',
targetPopup: '<popup window>',
targetPopupName: 'Emri i Dritares së Dialogut',
title: 'Nyja',
toAnchor: 'Lidhu me spirancën në tekst',
toEmail: 'Posta Elektronike',
toUrl: 'URL',
toolbar: 'Nyja',
type: 'Lloji i Nyjes',
unlink: 'Largo Nyjen',
upload: 'Ngarko'
} );
|
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'indent', 'ug', {
indent: 'تارايت',
outdent: 'كەڭەيت'
} );
|
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
goog.require('ol.source.TileWMS');
var wmsSource = new ol.source.TileWMS({
url: 'http://demo.boundlessgeo.com/geoserver/wms',
params: {'LAYERS': 'ne:ne'},
serverType: 'geoserver',
crossOrigin: ''
});
var wmsLayer = new ol.layer.Tile({
source: wmsSource
});
var view = new ol.View({
center: [0, 0],
zoom: 1
});
var map = new ol.Map({
renderer: common.getRendererFromQueryString(),
layers: [wmsLayer],
target: 'map',
view: view
});
map.on('singleclick', function(evt) {
document.getElementById('info').innerHTML = '';
var viewResolution = /** @type {number} */ (view.getResolution());
var url = wmsSource.getGetFeatureInfoUrl(
evt.coordinate, viewResolution, 'EPSG:3857',
{'INFO_FORMAT': 'text/html'});
if (url) {
document.getElementById('info').innerHTML =
'<iframe seamless src="' + url + '"></iframe>';
}
});
map.on('pointermove', function(evt) {
if (evt.dragging) {
return;
}
var pixel = map.getEventPixel(evt.originalEvent);
var hit = map.forEachLayerAtPixel(pixel, function(layer) {
return true;
});
map.getTargetElement().style.cursor = hit ? 'pointer' : '';
});
|
/**
* matchkeys
* https://github.com/jonschlinkert/matchkeys
*
* Copyright (c) 2013 Jon Schlinkert, contributors.
* Licensed under the MIT license.
*/
'use strict';
var resolveDep = require('resolve-dep');
var minimatch = require('minimatch');
var chalk = require('chalk');
var _ = require('lodash');
// Export the matchkeys object.
exports = module.exports = {};
// Ensure config has keywords
function loadPkg(config) {
var result = {}
result.keywords = []
if (typeof config !== 'object') {
config = require(require('path').resolve(process.cwd(), 'package.json'));
}
// populate keywords, if any
if(_.isArray(config.keywords)) {
result.keywords = config.keywords;
} else {
return [];
}
return result;
}
/**
* Compare two arrays of keywords
* @param {Array} a Array of keywords to test against.
* @param {Array} b Array of keywords to search for matches.
* @return {Boolean} Return true if keywords match, otherwise false.
*/
exports.match = function(keywords, a, b) {
if(typeof(keywords) !== 'string') {
b = a;
a = keywords;
keywords = 'keywords';
}
return _.intersection(a[keywords] || [], b[keywords] || []);
};
/**
* Compare two arrays of keywords and return true if ANY keywords match.
* @param {Array} a Array of keywords to test against.
* @param {Array} b Array of keywords to search for matches.
* @return {Boolean} Return true if keywords match, otherwise false.
*/
exports.isMatch = function(keywords, a, b) {
if(typeof(keywords) !== 'string') {
b = a;
a = keywords;
keywords = 'keywords';
}
return _.intersection(a[keywords] || [], b[keywords] || []).length > 0;
};
/**
* Compare an array of keywords against multiple arrays of keywords.
* @param {Array} keys Keywords to test against.
* @param {Array} arrs Multple arrays. More specifically, an array of objects,
* each with a keywords property/array
* @return {Array} Array of matching keywords
*/
exports.matchPkgs = function(keywords, arr, arrs) {
if(typeof(keywords) !== 'string') {
arrs = arr;
arr = keywords;
keywords = 'keywords';
}
return _.filter(arrs, function(arr) {
return _.intersection(arr[keywords] || [], arr[keywords] || []).length > 0;
});
};
/**
* Return any keywords in the given list that match keywords in config.keywords.
* @param {[type]} pattern [description]
* @param {[type]} config [description]
* @return {[type]} [description]
*/
exports.filter = function(pattern, config) {
config = loadPkg(config);
var search = config.keywords;
return minimatch.match(search, pattern, {});
};
/**
* Resolve paths to keywords based on keyword matches
* @param {[type]} keys [description]
* @param {[type]} config [description]
* @return {[type]} [description]
*/
exports.resolve = function (patterns, config) {
config = loadPkg(config);
return _.compact(_.flatten(exports.filter(patterns, config).map(function (pattern) {
return resolveDep.dep(pattern).join();
})));
};
/**
* Return the resolved filepaths to any npm modules that match the given list of keywords.
* @param {[type]} patterns [description]
* @param {[type]} config [description]
* @return {[type]} [description]
*/
exports.resolveDev = function (patterns, config) {
config = loadPkg(config);
return _.compact(_.flatten(exports.filter(patterns, config).map(function (pattern) {
return resolveDep.dev(pattern).join();
})));
};
/**
* Return the resolved filepaths to any npm modules that match the given list of keywords.
* @param {[type]} patterns [description]
* @param {[type]} config [description]
* @return {[type]} [description]
*/
exports.resolveAll = function (patterns, config) {
config = loadPkg(config);
return _.compact(_.flatten(exports.filter(patterns, config).map(function (pattern) {
return resolveDep.all(pattern).join();
})));
};
|
/**
* Gets the cached value for `key`.
*
* @private
* @name get
* @memberOf _.memoize.Cache
* @param {string} key The key of the value to get.
* @returns {*} Returns the cached value.
*/
function mapGet(key) {
return key == '__proto__' ? undefined : this.__data__[key];
}
module.exports = mapGet;
|
/*************************************************************
*
* MathJax/jax/output/HTML-CSS/fonts/Neo-Euler/Script/Regular/Main.js
*
* Copyright (c) 2013-2017 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.OutputJax['HTML-CSS'].FONTDATA.FONTS['NeoEulerMathJax_Script'] = {
directory: 'Script/Regular',
family: 'NeoEulerMathJax_Script',
testString: '\u00A0\u210B\u2110\u2112\u211B\u212C\u2130\u2131\u2133\uD835\uDC9C\uD835\uDC9E\uD835\uDC9F\uD835\uDCA2\uD835\uDCA5\uD835\uDCA6',
0x20: [0,0,333,0,0],
0xA0: [0,0,333,0,0],
0x210B: [690,8,884,33,872],
0x2110: [685,14,430,27,412],
0x2112: [685,7,715,26,613],
0x211B: [712,6,722,33,711],
0x212C: [712,1,761,42,683],
0x2130: [702,12,608,69,528],
0x2131: [699,15,649,38,710],
0x2133: [699,13,982,27,961],
0x1D49C: [694,15,770,-8,736],
0x1D49E: [697,15,602,70,561],
0x1D49F: [716,-4,830,52,764],
0x1D4A2: [697,130,604,72,524],
0x1D4A5: [692,129,506,28,468],
0x1D4A6: [690,12,824,29,794],
0x1D4A9: [706,7,774,28,802],
0x1D4AA: [686,18,707,71,633],
0x1D4AB: [710,11,660,44,638],
0x1D4AC: [694,24,662,72,616],
0x1D4AE: [702,12,542,28,481],
0x1D4AF: [693,6,586,26,660],
0x1D4B0: [699,16,714,25,691],
0x1D4B1: [709,9,664,27,638],
0x1D4B2: [702,5,989,30,963],
0x1D4B3: [706,9,716,50,693],
0x1D4B4: [702,136,595,25,502],
0x1D4B5: [696,11,656,58,632],
0x1D4D0: [711,17,887,10,860],
0x1D4D1: [727,1,864,38,794],
0x1D4D2: [709,15,680,59,644],
0x1D4D3: [727,1,938,28,881],
0x1D4D4: [708,12,687,61,628],
0x1D4D5: [731,14,755,31,802],
0x1D4D6: [705,138,683,52,601],
0x1D4D7: [699,12,999,29,990],
0x1D4D8: [703,18,563,28,506],
0x1D4D9: [701,137,571,31,540],
0x1D4DA: [709,9,931,27,903],
0x1D4DB: [710,12,808,26,741],
0x1D4DC: [710,17,1111,27,1081],
0x1D4DD: [712,13,874,25,889],
0x1D4DE: [707,20,799,45,738],
0x1D4DF: [726,13,746,29,712],
0x1D4E0: [705,42,765,42,725],
0x1D4E1: [732,12,816,29,842],
0x1D4E2: [715,18,598,7,554],
0x1D4E3: [697,11,654,26,735],
0x1D4E4: [709,13,799,9,797],
0x1D4E5: [702,16,751,27,714],
0x1D4E6: [710,8,1119,27,1081],
0x1D4E7: [712,11,811,27,774],
0x1D4E8: [709,135,680,-4,599],
0x1D4E9: [705,14,742,57,714]
};
MathJax.Callback.Queue(
["initFont",MathJax.OutputJax["HTML-CSS"],"NeoEulerMathJax_Script"],
["loadComplete",MathJax.Ajax,MathJax.OutputJax["HTML-CSS"].fontDir+"/Script/Regular/Main.js"]
);
|
define(
"dijit/_editor/nls/id/FontChoice", ({
fontSize: "Ukuran",
fontName: "Font",
formatBlock: "Format",
serif: "serif",
"sans-serif": "sans-serif",
monospace: "monospace",
cursive: "cursive",
fantasy: "fantasy",
noFormat: "None",
p: "Paragraf",
h1: "Judul",
h2: "Sub Judul",
h3: "Sub sub judul",
pre: "Praformat",
1: "xx-kecil",
2: "x-kecil",
3: "kecil",
4: "medium",
5: "besar",
6: "x-besar",
7: "xx-besar"
})
);
|
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // identity function for calling harmory imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/ // define getter function for harmory exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ };
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 240);
/******/ })
/************************************************************************/
/******/ ({
/***/ 160:
/***/ function(module, exports, __webpack_require__) {
var __vue_exports__, __vue_options__
/* styles */
__webpack_require__(96)
/* script */
__vue_exports__ = __webpack_require__(79)
/* template */
var __vue_template__ = __webpack_require__(166)
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
if (
typeof __vue_exports__.default === "object" ||
typeof __vue_exports__.default === "function"
) {
__vue_options__ = __vue_exports__ = __vue_exports__.default
}
if (typeof __vue_options__ === "function") {
__vue_options__ = __vue_options__.options
}
__vue_options__.render = __vue_template__.render
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
module.exports = __vue_exports__
/***/ },
/***/ 166:
/***/ function(module, exports) {
module.exports={render:function (){with(this) {
return _h('a', {
staticClass: "mint-tab-item",
class: {
'is-selected': $parent.value === id
},
on: {
"click": function($event) {
$parent.$emit('input', id)
}
}
}, [_h('div', {
staticClass: "mint-tab-item-icon"
}, [_t("icon")]), " ", _h('div', {
staticClass: "mint-tab-item-label"
}, [_t("default")])])
}},staticRenderFns: []}
/***/ },
/***/ 240:
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(43);
/***/ },
/***/ 43:
/***/ function(module, exports, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_tab_item_vue__ = __webpack_require__(160);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_tab_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__src_tab_item_vue__);
module.exports = __WEBPACK_IMPORTED_MODULE_0__src_tab_item_vue___default.a;
/***/ },
/***/ 79:
/***/ function(module, exports, __webpack_require__) {
"use strict";
//
//
//
//
//
//
//
//
//
/**
* mt-tab-item
* @module components/tab-item
* @desc 搭配 tabbar 或 navbar 使用
* @param {*} id - 选中后的返回值,任意类型
* @param {slot} [icon] - icon 图标
* @param {slot} - 文字
*
* @example
* <mt-tab-item>
* <img slot="icon" src="http://placehold.it/100x100">
* 订单
* </mt-tab-item>
*/
/* harmony default export */ exports["default"] = {
name: 'mt-tab-item',
props: ['id']
};
/***/ },
/***/ 96:
/***/ function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }
/******/ });
|
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule Platform
* @flow
*/
'use strict';
var Platform = {
OS: 'android',
get Version() { return require('NativeModules').AndroidConstants.Version; },
};
module.exports = Platform;
|
// wrapped by build app
define("dojox/wire/ml/Invocation", ["dijit","dojo","dojox","dojo/require!dojox/wire/ml/Action"], function(dijit,dojo,dojox){
dojo.provide("dojox.wire.ml.Invocation");
dojo.require("dojox.wire.ml.Action");
dojo.declare("dojox.wire.ml.Invocation", dojox.wire.ml.Action, {
// summary:
// A widget to invoke a method or publish a topic
// description:
// This widget represents a controller task to invoke a method or
// publish a topic when an event (a function) or a topic is issued.
// object:
// A scope of a method to invoke
object: "",
// method:
// A name of a method to invoke
method: "",
// topic:
// A name of a topic to publish
topic: "",
// parameters:
// Arguments for the method or the topic
parameters: "",
// result:
// A property to store a return value of the method call
result: "",
// error:
// A property to store an error on the method call
error: "",
_run: function(){
// summary:
// Invoke a method or publish a topic
// description:
// If 'topic' is specified, the topic is published with arguments
// specified to 'parameters'.
// If 'method' and 'object' are specified, the method is invoked
// with arguments specified to 'parameters' and set the return
// value to a property specified to 'result'.
// 'object', 'parameters' and 'result' can specify properties of
// a widget or an DOM element with the dotted notation.
// If 'parameters' are omitted, the arguments to this method are
// passed as is.
if(this.topic){
var args = this._getParameters(arguments);
try{
dojo.publish(this.topic, args);
this.onComplete();
}catch(e){
this.onError(e);
}
}else if(this.method){
var scope = (this.object ? dojox.wire.ml._getValue(this.object) : dojo.global);
if(!scope){
return; //undefined
}
var args = this._getParameters(arguments);
var func = scope[this.method];
if(!func){
func = scope.callMethod;
if(!func){
return; //undefined
}
args = [this.method, args];
}
try{
var connected = false;
if(scope.getFeatures){
var features = scope.getFeatures();
if((this.method == "fetch" && features["dojo.data.api.Read"]) ||
(this.method == "save" && features["dojo.data.api.Write"])){
var arg = args[0];
if(!arg.onComplete){
arg.onComplete = function(){};
}
//dojo.connect(arg, "onComplete", this, "onComplete");
this.connect(arg, "onComplete", "onComplete");
if(!arg.onError){
arg.onError = function(){};
}
//dojo.connect(arg, "onError", this, "onError");
this.connect(arg, "onError", "onError");
connected = true;
}
}
var r = func.apply(scope, args);
if(!connected){
if(r && (r instanceof dojo.Deferred)){
var self = this;
r.addCallbacks(
function(result){self.onComplete(result);},
function(error){self.onError(error);}
);
}else{
this.onComplete(r);
}
}
}catch(e){
this.onError(e);
}
}
},
onComplete: function(/*anything*/result){
// summary:
// A function called when the method or the topic publish
// completed
// description:
// If 'result' attribute is specified, the result object also set
// to the specified property.
// result:
// The return value of a method or undefined for a topic
if(this.result){
dojox.wire.ml._setValue(this.result, result);
}
if(this.error){ // clear error
dojox.wire.ml._setValue(this.error, "");
}
},
onError: function(/*anything*/error){
// summary:
// A function called on an error occurs
// description:
// If 'error' attribute is specified, the error object also set to
// the specified property.
// error:
// The exception or error occurred
if(this.error){
if(error && error.message){
error = error.message;
}
dojox.wire.ml._setValue(this.error, error);
}
},
_getParameters: function(/*Array*/args){
// summary:
// Returns arguments to a method or topic to invoke
// description:
// This method retunrs an array of arguments specified by
// 'parameters' attribute, a comma-separated list of IDs and
// their properties in a dotted notation.
// If 'parameters' are omitted, the original arguments are
// used.
// args:
// Arguments to a trigger event or topic
if(!this.parameters){
// use arguments as is
return args; //Array
}
var parameters = [];
var list = this.parameters.split(",");
if(list.length == 1){
var parameter = dojox.wire.ml._getValue(dojo.trim(list[0]), args);
if(dojo.isArray(parameter)){
parameters = parameter;
}else{
parameters.push(parameter);
}
}else{
for(var i in list){
parameters.push(dojox.wire.ml._getValue(dojo.trim(list[i]), args));
}
}
return parameters; //Array
}
});
});
|
/*Arabic language by Charafweb*/
if (typeof (WBBLANG)=="undefined") {WBBLANG = {};}
WBBLANG['ar'] = {
code: "كود:",
bold: "سميك",
italic: "مائل",
underline: "سطر تحت",
strike: "تشطيب",
link: "رابط",
img: "إدراج صورة",
sup: "نص مرتفع",
sub: "نص منخفض",
justifyleft: "محاذاة إلى اليسار",
justifycenter: "محاذاة إلى الوسط",
justifyright: "محاذاة إلى اليمين",
table: "إدراج جدول",
bullist: "• قائمة غير مرتبة",
numlist: "١. قائمة مرتبة",
quote: "إقتباس",
offtop: "خارج عن الموضوع",
code: "كود برمجي",
spoiler: "إخفاء",
fontcolor: "لون الخط",
fontsize: "حجم الخط",
fontfamily: "نوع الخط",
fs_verysmall: "صغير جداً",
fs_small: "صغير",
fs_normal: "عادي",
fs_big: "كبير",
fs_verybig: "كبير جداً",
smilebox: "إدراج تعبير وجهي",
removeFormat: 'إزالة التنسيق',
modal_link_title: "إدراج رابط",
modal_link_text: "عرض النص",
modal_link_url: " رابط",
modal_email_text: "عرض البريد الإلكتروني",
modal_email_url: "البريد الإلكتروني",
modal_link_tab1: "إدراج عنوان URL",
modal_img_title: "إدراج صورة",
modal_img_tab1: "إدراج عنوان URL",
modal_img_tab2: "تحميل الصورة",
modal_imgsrc_text: "أدخل عنوان URL للصورة",
modal_img_btn: "اختر ملف",
add_attach: "إرفاق ملف",
close: "إغلاق",
save: "حفظ",
cancel: "إلغاء الأمر",
remove: "حذف",
validation_err: "البيانات المدخلة غير صحيحة",
error_onupload: "حدث خطأ أثناء تحميل الملف",
fileupload_text1: "إسقاط الملف هنا",
fileupload_text2: "أو",
loading: "جاري التحميل",
auto: "تلقائي",
views: "عدد المشاهدات",
downloads: "التنزيلات",
//smiles
sm1: "ابتسامة",
sm2: "ضحك",
sm3: "غمزة",
sm4: "شكرا",
sm5: "أنب",
sm6: "صدمة",
sm7: "غاضب",
sm8: "ألم",
sm9: "مريض"
};
|
export { default } from './AlertTitle';
|
/* http://keith-wood.name/calendars.html
Azerbaijani localisation for calendars datepicker for jQuery.
Written by Jamil Najafov (necefov33@gmail.com). */
(function($) {
$.calendars.picker.regional['az'] = {
renderer: $.calendars.picker.defaultRenderer,
prevText: '<Geri', prevStatus: 'Əvvəlki ay',
prevJumpText: '<<', prevJumpStatus: 'Əvvəlki il',
nextText: 'İrəli>', nextStatus: 'Sonrakı ay',
nextJumpText: '>>', nextJumpStatus: 'Sonrakı il',
currentText: 'Bugün', currentStatus: 'İndiki ay',
todayText: 'Bugün', todayStatus: 'İndiki ay',
clearText: 'Təmizlə', clearStatus: 'Tarixi sil',
closeText: 'Bağla', closeStatus: 'Təqvimi bağla',
yearStatus: 'Başqa il', monthStatus: 'Başqa ay',
weekText: 'Hf', weekStatus: 'Həftələr',
dayStatus: 'D, M d seçin', defaultStatus: 'Bir tarix seçin',
isRTL: false
};
$.calendars.picker.setDefaults($.calendars.picker.regional['az']);
})(jQuery);
|
define(function() {
/**
* Populate a collection with some data.
*
* @method populateCollection
* @member Statistics.Stores
*
* @param {Backbone.Collection} collection
* @param {Object} payload
* The payload to extract data from. This is what you received by
* hitting the Canvas JSON-API endpoints.
*
* @param {Boolean} [replace=true]
* Consider the incoming data as a replacement for the current one.
* E.g, the collections will be reset instead of just adding the
* new data.
*
*/
return function populateCollection(collection, payload, replace) {
var setter, setterOptions;
if (arguments.length === 2) {
replace = true;
}
setter = replace ? 'reset' : 'add';
setterOptions = replace ?
{ parse: true } :
{ parse: true, merge: true };
collection[setter].call(collection, payload, setterOptions);
};
});
|
/**
* Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between
* {@link ByteBuffer#offset} and {@link ByteBuffer#limit}.
* @param {number|string} value Byte value to fill with. If given as a string, the first character is used.
* @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes
* written if omitted. defaults to {@link ByteBuffer#offset}.
* @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.
* @returns {!ByteBuffer} this
* @expose
* @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes
*/
ByteBufferPrototype.fill = function(value, begin, end) {
//? RELATIVE(undefined, 'begin');
if (typeof value === 'string' && value.length > 0)
value = value.charCodeAt(0);
if (typeof begin === 'undefined') begin = this.offset;
if (typeof end === 'undefined') end = this.limit;
if (!this.noAssert) {
//? ASSERT_INTEGER('value');
//? ASSERT_RANGE();
}
if (begin >= end)
return this; // Nothing to fill
//? if (NODE) {
this.buffer.fill(value, begin, end);
begin = end;
//? } else if (DATAVIEW) {
while (begin < end) this.view.setUint8(begin++, value);
//? } else {
while (begin < end) this.view[begin++] = value;
//? }
if (relative) this.offset = begin;
return this;
};
|
'use strict';
var parseConnection = require('../../lib/util/parse-connection')
var test = require('tape')
test('parses standard connections', function(t) {
t.plan(1)
t.deepEqual(parseConnection('postgres://username:pass@path.to.some-url:6000/testdb'), {
client: 'postgres',
connection: {
user: 'username',
password: 'pass',
host: 'path.to.some-url',
port: '6000',
database: 'testdb'
}
})
})
test('parses maria connections, aliasing database to db', function(t) {
t.plan(3)
var maria = {
client: 'maria',
connection: {
user: 'username',
password: 'pass',
host: 'path.to.some-url',
port: '6000',
db: 'testdb'
}
}
t.deepEqual(parseConnection('maria://username:pass@path.to.some-url:6000/testdb'), maria)
t.deepEqual(parseConnection('mariasql://username:pass@path.to.some-url:6000/testdb'), maria)
t.deepEqual(parseConnection('mariadb://username:pass@path.to.some-url:6000/testdb'), maria)
})
test('assume a path is mysql', function(t) {
t.plan(1)
t.deepEqual(parseConnection('/path/to/file.db'), {
client: 'sqlite3',
connection: {
filename: '/path/to/file.db'
}
})
})
test('#852, ssl param with PG query string', function(t) {
t.plan(1)
t.deepEqual(parseConnection("postgres://user:password@host:0000/database?ssl=true").connection, {
host: "host",
port: "0000",
user: "user",
password: "password",
database: "database",
ssl: true
})
})
|
import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import classNames from 'classnames';
import React from 'react';
import BreadcrumbItem from './BreadcrumbItem';
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
var Breadcrumb = function (_React$Component) {
_inherits(Breadcrumb, _React$Component);
function Breadcrumb() {
_classCallCheck(this, Breadcrumb);
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
Breadcrumb.prototype.render = function render() {
var _props = this.props,
className = _props.className,
props = _objectWithoutProperties(_props, ['className']);
var _splitBsProps = splitBsProps(props),
bsProps = _splitBsProps[0],
elementProps = _splitBsProps[1];
var classes = getClassSet(bsProps);
return React.createElement('ol', _extends({}, elementProps, {
role: 'navigation',
'aria-label': 'breadcrumbs',
className: classNames(className, classes)
}));
};
return Breadcrumb;
}(React.Component);
Breadcrumb.Item = BreadcrumbItem;
export default bsClass('breadcrumb', Breadcrumb);
|
var insert = require('./insert');
// Delete just one
insert('remove', [{
name:'Squirtle', type:'water'
}, {
name:'Starmie' , type:'water'
}, {
name:'Lapras' , type:'water'
}], function(db, t, done) {
// Remove just one
db.a.remove({type:'water'}, true, function(err, lastErrorObject) {
t.equal(lastErrorObject.n, 1);
db.a.find({type:'water'}, function(err, docs) {
t.equal(docs.length, 2);
t.equal(docs[0].name, 'Starmie')
// Normal remove
db.a.remove({type:'water'}, function(err, lastErrorObject) {
t.equal(lastErrorObject.n, 2);
db.a.find({type:'water'}, function(err, docs) {
t.equal(docs.length, 0);
done();
});
});
});
});
});
|
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v5.0.0-alpha.6
* @link http://www.ag-grid.com/
* @license MIT
*/
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var component_1 = require("../widgets/component");
var rowNode_1 = require("../entities/rowNode");
var utils_1 = require('../utils');
var context_1 = require("../context/context");
var gridOptionsWrapper_1 = require("../gridOptionsWrapper");
var svgFactory_1 = require("../svgFactory");
var svgFactory = svgFactory_1.SvgFactory.getInstance();
var CheckboxSelectionComponent = (function (_super) {
__extends(CheckboxSelectionComponent, _super);
function CheckboxSelectionComponent() {
_super.call(this, "<span class=\"ag-selection-checkbox\"/>");
}
CheckboxSelectionComponent.prototype.createAndAddIcons = function () {
this.eCheckedIcon = utils_1.Utils.createIconNoSpan('checkboxChecked', this.gridOptionsWrapper, null, svgFactory.createCheckboxCheckedIcon);
this.eUncheckedIcon = utils_1.Utils.createIconNoSpan('checkboxUnchecked', this.gridOptionsWrapper, null, svgFactory.createCheckboxUncheckedIcon);
this.eIndeterminateIcon = utils_1.Utils.createIconNoSpan('checkboxIndeterminate', this.gridOptionsWrapper, null, svgFactory.createCheckboxIndeterminateIcon);
var eGui = this.getGui();
eGui.appendChild(this.eCheckedIcon);
eGui.appendChild(this.eUncheckedIcon);
eGui.appendChild(this.eIndeterminateIcon);
};
CheckboxSelectionComponent.prototype.onSelectionChanged = function () {
var state = this.rowNode.isSelected();
utils_1.Utils.setVisible(this.eCheckedIcon, state === true);
utils_1.Utils.setVisible(this.eUncheckedIcon, state === false);
utils_1.Utils.setVisible(this.eIndeterminateIcon, typeof state !== 'boolean');
};
CheckboxSelectionComponent.prototype.onCheckedClicked = function () {
this.rowNode.setSelected(false);
};
CheckboxSelectionComponent.prototype.onUncheckedClicked = function (event) {
this.rowNode.setSelectedParams({ newValue: true, rangeSelect: event.shiftKey });
};
CheckboxSelectionComponent.prototype.onIndeterminateClicked = function (event) {
this.rowNode.setSelectedParams({ newValue: true, rangeSelect: event.shiftKey });
};
CheckboxSelectionComponent.prototype.init = function (params) {
this.createAndAddIcons();
this.rowNode = params.rowNode;
this.onSelectionChanged();
// we don't want the row clicked event to fire when selecting the checkbox, otherwise the row
// would possibly get selected twice
this.addGuiEventListener('click', function (event) { return event.stopPropagation(); });
// likewise we don't want double click on this icon to open a group
this.addGuiEventListener('dblclick', function (event) { return event.stopPropagation(); });
this.addDestroyableEventListener(this.eCheckedIcon, 'click', this.onCheckedClicked.bind(this));
this.addDestroyableEventListener(this.eUncheckedIcon, 'click', this.onUncheckedClicked.bind(this));
this.addDestroyableEventListener(this.eIndeterminateIcon, 'click', this.onIndeterminateClicked.bind(this));
this.addDestroyableEventListener(this.rowNode, rowNode_1.RowNode.EVENT_ROW_SELECTED, this.onSelectionChanged.bind(this));
};
__decorate([
context_1.Autowired('gridOptionsWrapper'),
__metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
], CheckboxSelectionComponent.prototype, "gridOptionsWrapper", void 0);
return CheckboxSelectionComponent;
})(component_1.Component);
exports.CheckboxSelectionComponent = CheckboxSelectionComponent;
|
class A {}
class B extends A {
constructor() {
return super();
}
}
|
/***********************************************
*app-loading
*(c) 2015
*github.com/aprilorange/app-loading
***********************************************/
'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
(function () {
var definition = function definition(W, D) {
var appLoading = (function () {
function appLoading() {
_classCallCheck(this, appLoading);
this.opts = {
className: 'app-loading',
loadingBar: '.loading-bar',
color: null
};
}
_createClass(appLoading, [{
key: 'start',
value: function start(color) {
console.log('start');
this.showBar(color);
}
}, {
key: 'stop',
value: function stop() {
console.log('stop');
this.hideBar();
}
}, {
key: 'showBar',
value: function showBar(color) {
var bar = this.getBar();
if (this.opts.color) bar.style.backgroundColor = this.opts.color;
if (color) bar.style.backgroundColor = color;
D.querySelector('body').classList.add(this.opts.className);
}
}, {
key: 'hideBar',
value: function hideBar() {
D.querySelector('body').classList.remove(this.opts.className);
this.getBar().style.backgroundColor = null;
}
}, {
key: 'getBar',
value: function getBar() {
var bar = D.querySelector(this.opts.loadingBar);
if (!bar) this.initBar();
return bar;
}
}, {
key: 'initBar',
value: function initBar() {
var bar = D.createElement('div');
bar.className = this.opts.loadingBar.substring(1);
D.body.appendChild(bar);
}
}, {
key: 'setColor',
value: function setColor(color) {
this.opts.color = color;
}
}]);
return appLoading;
})();
return new appLoading();
};(function (context, name, definition) {
if (typeof module !== 'undefined') {
module.exports = definition;
} else if (typeof define === 'function' && define.amd) {
define(definition);
} else {
context[name] = definition;
}
})(window, 'appLoading', definition(window, document));
})();
|
export default {
scheme: 'green screen',
author: 'chris kempson (http://chriskempson.com)',
base00: '#001100',
base01: '#003300',
base02: '#005500',
base03: '#007700',
base04: '#009900',
base05: '#00bb00',
base06: '#00dd00',
base07: '#00ff00',
base08: '#007700',
base09: '#009900',
base0A: '#007700',
base0B: '#00bb00',
base0C: '#005500',
base0D: '#009900',
base0E: '#00bb00',
base0F: '#005500'
};
|
/*expected
initial->s1_1->s1_2->s1_3->s1_4->s1_5->s1_6->s1_2->s1_7;
s1_3->s1_6;
s1_4->s1_7->final;
*/
while (a) {
if (b) {
break;
}
foo();
}
/*DOT
digraph {
node[shape=box,style="rounded,filled",fillcolor=white];
initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];
final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];
s1_1[label="Program\nWhileStatement"];
s1_2[label="Identifier (a)"];
s1_3[label="BlockStatement\nIfStatement\nIdentifier (b)"];
s1_4[label="BlockStatement\nBreakStatement"];
s1_5[style="rounded,dashed,filled",fillcolor="#FF9800",label="<<unreachable>>\nBlockStatement:exit"];
s1_6[label="ExpressionStatement\nCallExpression\nIdentifier (foo)"];
s1_7[label="WhileStatement:exit\nProgram:exit"];
initial->s1_1->s1_2->s1_3->s1_4->s1_5->s1_6->s1_2->s1_7;
s1_3->s1_6;
s1_4->s1_7->final;
}
*/
|
var Role = DS.Model.extend({
uuid: DS.attr('string'),
name: DS.attr('string'),
description: DS.attr('string'),
created_at: DS.attr('moment-date'),
updated_at: DS.attr('moment-date'),
lowerCaseName: Ember.computed('name', function () {
return this.get('name').toLocaleLowerCase();
})
});
export default Role;
|
/*
Copyright © 2001-2004 World Wide Web Consortium,
(Massachusetts Institute of Technology, European Research Consortium
for Informatics and Mathematics, Keio University). All
Rights Reserved. This work is distributed under the W3C® Software License [1] 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.
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
/**
* Gets URI that identifies the test.
* @return uri identifier of test
*/
function getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo07";
}
var docsLoaded = -1000000;
var builder = null;
//
// This function is called by the testing framework before
// running the test suite.
//
// If there are no configuration exceptions, asynchronous
// document loading is started. Otherwise, the status
// is set to complete and the exception is immediately
// raised when entering the body of the test.
//
function setUpPage() {
setUpPageStatus = 'running';
try {
//
// creates test document builder, may throw exception
//
builder = createConfiguredBuilder();
setImplementationAttribute("schemaValidating", true);
docsLoaded = 0;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
docsLoaded += preload(docRef, "doc", "hc_staff");
if (docsLoaded == 1) {
setUpPageStatus = 'complete';
}
} catch(ex) {
catchInitializationError(builder, ex);
setUpPageStatus = 'complete';
}
}
//
// This method is called on the completion of
// each asychronous load started in setUpTests.
//
// When every synchronous loaded document has completed,
// the page status is changed which allows the
// body of the test to be executed.
function loadComplete() {
if (++docsLoaded == 1) {
setUpPageStatus = 'complete';
}
}
/**
*
The getSchemaTypeInfo method retrieves the type information associated with this attribute.
Load a valid document with an XML Schema.
Invoke getSchemaTypeInfo method on an attribute having [type definition] property. Expose {name} and {target namespace}
properties of the [type definition] property. Verity that the typeName and typeNamespace of the title attribute's
schemaTypeInfo are correct. getSchemaTypeInfo on the 'id' attribute of the fourth 'acronym' element
* @author IBM
* @author Jenny Hsu
* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo
*/
function attrgetschematypeinfo07() {
var success;
if(checkInitialization(builder, "attrgetschematypeinfo07") != null) return;
var doc;
var elemList;
var acElem;
var attr;
var attrTypeInfo;
var typeName;
var typeNamespace;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
doc = load(docRef, "doc", "hc_staff");
elemList = doc.getElementsByTagName("acronym");
acElem = elemList.item(3);
attr = acElem.getAttributeNode("id");
attrTypeInfo = attr.schemaTypeInfo;
assertNotNull("typeInfoNotNull",attrTypeInfo);
typeName = attrTypeInfo.typeName;
typeNamespace = attrTypeInfo.typeNamespace;
assertEquals("attrgetschematypeinfo07_typeName","ID",typeName);
assertEquals("attrgetschematypeinfo07_typeNamespace","http://www.w3.org/2001/XMLSchema",typeNamespace);
}
function runTest() {
attrgetschematypeinfo07();
}
|
/**
* @provides javelin-behavior-phabricator-watch-anchor
* @requires javelin-behavior
* javelin-stratcom
* javelin-dom
* javelin-vector
*/
JX.behavior('phabricator-watch-anchor', function() {
var highlighted;
function highlight() {
highlighted && JX.DOM.alterClass(highlighted, 'anchor-target', false);
try {
highlighted = JX.$('anchor-' + window.location.hash.replace('#', ''));
} catch (ex) {
highlighted = null;
}
highlighted && JX.DOM.alterClass(highlighted, 'anchor-target', true);
}
// Defer invocation so other listeners can update the document.
function defer_highlight() {
setTimeout(highlight, 0);
}
// In some cases, we link to an anchor but the anchor target ajaxes in
// later. If it pops in within the first few seconds, jump to it.
function try_anchor() {
var anchor = window.location.hash.replace('#', '');
try {
// If the anchor exists, assume the browser handled the jump.
if (anchor) {
JX.$(anchor);
}
defer_highlight();
} catch (e) {
var n = 50;
var try_anchor_again = function () {
try {
var node = JX.$(anchor);
var pos = JX.Vector.getPosWithScroll(node);
JX.DOM.scrollToPosition(0, pos.y - 60);
defer_highlight();
} catch (e) {
if (n--) {
setTimeout(try_anchor_again, 100);
}
}
};
try_anchor_again();
}
}
JX.Stratcom.listen('hashchange', null, try_anchor);
try_anchor();
});
|
Package.describe({
name: 'blaze-html-templates',
version: '1.0.1',
// Brief, one-line summary of the package.
summary: 'Compile HTML templates into reactive UI with Meteor Blaze',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting documentation, set this field to null.
documentation: 'README.md'
});
Package.onUse(function(api) {
api.imply([
// A library for reactive user interfaces
'blaze',
// The following packages are basically empty shells that just exist to
// satisfy code checking for the existence of a package. Rest assured that
// they are not adding any bloat to your bundle.
'ui', // XXX COMPAT WITH PACKAGES BUILT FOR 0.9.0.
'spacebars', // XXX COMPAT WITH PACKAGES BUILT FOR 0.9.0
// Compile .html files into Blaze reactive views
'templating'
]);
});
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.