text
stringlengths 2
6.14k
|
|---|
// /index/after-basis-script-require.js
|
/**
* @author zz85 / https://github.com/zz85
* @author Mugen87 / https://github.com/Mugen87
*
* Parametric Surfaces Geometry
* based on the brilliant article by @prideout http://prideout.net/blog/?p=44
*/
import { Geometry } from '../core/Geometry.js';
import { BufferGeometry } from '../core/BufferGeometry.js';
import { Float32BufferAttribute } from '../core/BufferAttribute.js';
import { Vector3 } from '../math/Vector3.js';
// ParametricGeometry
function ParametricGeometry( func, slices, stacks ) {
Geometry.call( this );
this.type = 'ParametricGeometry';
this.parameters = {
func: func,
slices: slices,
stacks: stacks
};
this.fromBufferGeometry( new ParametricBufferGeometry( func, slices, stacks ) );
this.mergeVertices();
}
ParametricGeometry.prototype = Object.create( Geometry.prototype );
ParametricGeometry.prototype.constructor = ParametricGeometry;
// ParametricBufferGeometry
function ParametricBufferGeometry( func, slices, stacks ) {
BufferGeometry.call( this );
this.type = 'ParametricBufferGeometry';
this.parameters = {
func: func,
slices: slices,
stacks: stacks
};
// buffers
var indices = [];
var vertices = [];
var normals = [];
var uvs = [];
var EPS = 0.00001;
var normal = new Vector3();
var p0 = new Vector3(), p1 = new Vector3();
var pu = new Vector3(), pv = new Vector3();
var i, j;
// generate vertices, normals and uvs
var sliceCount = slices + 1;
for ( i = 0; i <= stacks; i ++ ) {
var v = i / stacks;
for ( j = 0; j <= slices; j ++ ) {
var u = j / slices;
// vertex
p0 = func( u, v, p0 );
vertices.push( p0.x, p0.y, p0.z );
// normal
// approximate tangent vectors via finite differences
if ( u - EPS >= 0 ) {
p1 = func( u - EPS, v, p1 );
pu.subVectors( p0, p1 );
} else {
p1 = func( u + EPS, v, p1 );
pu.subVectors( p1, p0 );
}
if ( v - EPS >= 0 ) {
p1 = func( u, v - EPS, p1 );
pv.subVectors( p0, p1 );
} else {
p1 = func( u, v + EPS, p1 );
pv.subVectors( p1, p0 );
}
// cross product of tangent vectors returns surface normal
normal.crossVectors( pu, pv ).normalize();
normals.push( normal.x, normal.y, normal.z );
// uv
uvs.push( u, v );
}
}
// generate indices
for ( i = 0; i < stacks; i ++ ) {
for ( j = 0; j < slices; j ++ ) {
var a = i * sliceCount + j;
var b = i * sliceCount + j + 1;
var c = ( i + 1 ) * sliceCount + j + 1;
var d = ( i + 1 ) * sliceCount + j;
// faces one and two
indices.push( a, b, d );
indices.push( b, c, d );
}
}
// build geometry
this.setIndex( indices );
this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
}
ParametricBufferGeometry.prototype = Object.create( BufferGeometry.prototype );
ParametricBufferGeometry.prototype.constructor = ParametricBufferGeometry;
export { ParametricGeometry, ParametricBufferGeometry };
|
define(function () {
// Malay
return {
errorLoading: function () {
return 'Keputusan tidak berjaya dimuatkan.';
},
inputTooLong: function (args) {
var overChars = args.input.length - args.maximum;
return 'Sila hapuskan ' + overChars + ' aksara';
},
inputTooShort: function (args) {
var remainingChars = args.minimum - args.input.length;
return 'Sila masukkan ' + remainingChars + ' atau lebih aksara';
},
loadingMore: function () {
return 'Sedang memuatkan keputusan…';
},
maximumSelected: function (args) {
return 'Anda hanya boleh memilih ' + args.maximum + ' pilihan';
},
noResults: function () {
return 'Tiada padanan yang ditemui';
},
searching: function () {
return 'Mencari…';
},
removeAllItems: function () {
return 'Keluarkan semua item';
}
};
});
|
module.exports = [
{
'should': 'Should mirror property value: border-radius (4 values)',
'expected': 'div { border-radius: 40.25px 10.5px 10.75px 40.3px; }',
'input': 'div { border-radius: 10.5px 40.25px 40.3px 10.75px; }',
'reversable': true
},
{
'should': 'Should mirror property value: border-radius (3 values)',
'expected': 'div { border-radius: 40.75px 10.75px 40.75px 40.3px; }',
'input': 'div { border-radius: 10.75px 40.75px 40.3px; }',
'reversable': false
},
{
'should': 'Should mirror property value: border-radius (2 values)',
'expected': 'div { border-radius: 40.25px 10.75px; }',
'input': 'div { border-radius: 10.75px 40.25px; }',
'reversable': true
},
{
'should': 'Should mirror property value: border-radius (4 values - double)',
'expected': 'div { border-radius: 40.25px 10.75px .5px 40.75px / .4em 1em 1em 4.5em; }',
'input': 'div { border-radius: 10.75px 40.25px 40.75px .5px / 1em .4em 4.5em 1em; }',
'reversable': true
},
{
'should': 'Should mirror property value: border-radius (3 values - double)',
'expected': 'div { border-radius: .40px 10.5px .40px 40px / 4em 1em 4em 3em; }',
'input': 'div { border-radius: 10.5px .40px 40px / 1em 4em 3em; }',
'reversable': false
},
{
'should': 'Should mirror property value: border-radius (2 values- double)',
'expected': 'div { border-radius: 40px 10px / 2.5em .75em; }',
'input': 'div { border-radius: 10px 40px / .75em 2.5em; }',
'reversable': true
},
{
'should': 'Should mirror property value: border-width',
'expected': 'div { border-width: 1px 4px .3em 2.5em; }',
'input': 'div { border-width: 1px 2.5em .3em 4px; }',
'reversable': true
},
{
'should': 'Should mirror property value: border-width (none length)',
'expected': 'div { border-width: thin medium thick none; }',
'input': 'div { border-width: thin none thick medium; }',
'reversable': true
},
{
'should': 'Should mirror property value: border-style (4 values)',
'expected': 'div { border-style: none dashed dotted solid; }',
'input': 'div { border-style: none solid dotted dashed; }',
'reversable': true
},
{
'should': 'Should mirror property value: border-color (4 values)',
'expected': 'div { border-color: rgba(255, 255, 255, 1) rgb( 0, 0, 0) #000 hsla(0, 100%, 50%, 1); }',
'input': 'div { border-color: rgba(255, 255, 255, 1) hsla(0, 100%, 50%, 1) #000 rgb( 0, 0, 0); }',
'reversable': true
},
{
'should': 'Should not mirror property value: border-color (3 values)',
'expected': 'div { border-color: #000 rgb( 0, 0, 0) hsla(0, 100%, 50%, 1); }',
'input': 'div { border-color: #000 rgb( 0, 0, 0) hsla(0, 100%, 50%, 1); }',
'reversable': false
},
{
'should': 'Should not mirror property value: border-color (2 values)',
'expected': 'div { border-color:rgb( 0, 0, 0) hsla(0, 100%, 50%, 1); }',
'input': 'div { border-color:rgb( 0, 0, 0) hsla(0, 100%, 50%, 1); }',
'reversable': false
},
{
'should': 'Should mirror property value: margin',
'expected': 'div { margin: .1em auto 3.5rem 2px; }',
'input': 'div { margin: .1em 2px 3.5rem auto; }',
'reversable': true
},
{
'should': 'Should mirror property value: padding',
'expected': 'div { padding: 1px 4px .3rem 2.5em; }',
'input': 'div { padding: 1px 2.5em .3rem 4px; }',
'reversable': true
},
{
'should': 'Should mirror property value: box-shadow',
'expected': 'div { box-shadow: -60px -16px rgba(0, 128, 128, 0.98), -10.25px 5px 5px #ff0, inset -0.5em 1em 0 white; }',
'input': 'div { box-shadow: 60px -16px rgba(0, 128, 128, 0.98), 10.25px 5px 5px #ff0, inset 0.5em 1em 0 white; }',
'reversable': true
},
{
'should': 'Should mirror property value: text-shadow',
'expected': 'div { text-shadow: -60px -16px rgba(0, 128, 128, 0.98), -10.25px 5px 5px #ff0, inset -0.5em 1em 0 white; }',
'input': 'div { text-shadow: 60px -16px rgba(0, 128, 128, 0.98), 10.25px 5px 5px #ff0, inset 0.5em 1em 0 white; }',
'reversable': true
},
{
'should': 'Should mirror property value (no digit before the dot): box-shadow, text-shadow',
'expected': 'div { box-shadow: inset -0.5em 1em 0 white; text-shadow: inset -0.5em 1em 0 white; }',
'input': 'div { box-shadow: inset .5em 1em 0 white; text-shadow: inset .5em 1em 0 white; }',
'reversable': false
}
]
|
(function(buster, define) {
var fakePromise, undef;
fakePromise = {
then:function () {}
};
define('when.isPromise-test', function (require) {
var when;
when = require('when');
function assertIsPromise(it) {
buster.assert(when.isPromise(it));
}
function assertIsNotPromise(it) {
buster.refute(when.isPromise(it));
}
buster.testCase('when.isPromise', {
'should return true for promise': function() {
assertIsPromise(fakePromise);
},
'should return false for non-promise': function() {
/*jshint -W009, -W010, -W053 */
var inputs = [
1,
0,
'not a promise',
true,
false,
undef,
null,
'',
/foo/,
{},
new Object(),
new RegExp('foo'),
new Date(),
new Boolean(),
[],
new Array()
];
for(var i = inputs.length - 1; i >= 0; --i) {
assertIsNotPromise(inputs[i]);
}
},
'should return true for delegated promise': function() {
function T() {}
T.prototype = fakePromise;
assertIsPromise(new T());
}
});
});
}(
this.buster || require('buster'),
typeof define === 'function' && define.amd ? define : function (id, factory) {
var packageName = id.split(/[\/\-\.]/)[0], pathToRoot = id.replace(/[^\/]+/g, '..');
pathToRoot = pathToRoot.length > 2 ? pathToRoot.substr(3) : pathToRoot;
factory(function (moduleId) {
return require(moduleId.indexOf(packageName) === 0 ? pathToRoot + moduleId.substr(packageName.length) : moduleId);
});
}
// Boilerplate for AMD and Node
));
|
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
* @providesModule ToolbarAndroidExample
*/
'use strict';
var React = require('react');
var ReactNative = require('react-native');
var nativeImageSource = require('nativeImageSource');
var {
StyleSheet,
Text,
View,
} = ReactNative;
var RNTesterBlock = require('./RNTesterBlock');
var RNTesterPage = require('./RNTesterPage');
var Switch = require('Switch');
var ToolbarAndroid = require('ToolbarAndroid');
class ToolbarAndroidExample extends React.Component<{}, $FlowFixMeState> {
static title = '<ToolbarAndroid>';
static description = 'Examples of using the Android toolbar.';
state = {
actionText: 'Example app with toolbar component',
toolbarSwitch: false,
colorProps: {
titleColor: '#3b5998',
subtitleColor: '#6a7180',
},
};
render() {
return (
<RNTesterPage title="<ToolbarAndroid>">
<RNTesterBlock title="Toolbar with title/subtitle and actions">
<ToolbarAndroid
actions={toolbarActions}
navIcon={nativeImageSource({
android: 'ic_menu_black_24dp',
width: 48,
height: 48
})}
onActionSelected={this._onActionSelected}
onIconClicked={() => this.setState({actionText: 'Icon clicked'})}
style={styles.toolbar}
subtitle={this.state.actionText}
title="Toolbar" />
<Text>{this.state.actionText}</Text>
</RNTesterBlock>
<RNTesterBlock title="Toolbar with logo & custom title view (a View with Switch+Text)">
<ToolbarAndroid
logo={nativeImageSource({
android: 'launcher_icon',
width: 132,
height: 144
})}
style={styles.toolbar}>
<View style={{height: 56, flexDirection: 'row', alignItems: 'center'}}>
<Switch
value={this.state.toolbarSwitch}
onValueChange={(value) => this.setState({'toolbarSwitch': value})} />
<Text>{'\'Tis but a switch'}</Text>
</View>
</ToolbarAndroid>
</RNTesterBlock>
<RNTesterBlock title="Toolbar with no icon">
<ToolbarAndroid
actions={toolbarActions}
style={styles.toolbar}
subtitle="There be no icon here" />
</RNTesterBlock>
<RNTesterBlock title="Toolbar with navIcon & logo, no title">
<ToolbarAndroid
actions={toolbarActions}
logo={nativeImageSource({
android: 'launcher_icon',
width: 132,
height: 144
})}
navIcon={nativeImageSource({
android: 'ic_menu_black_24dp',
width: 48,
height: 48
})}
style={styles.toolbar} />
</RNTesterBlock>
<RNTesterBlock title="Toolbar with custom title colors">
<ToolbarAndroid
navIcon={nativeImageSource({
android: 'ic_menu_black_24dp',
width: 48,
height: 48
})}
onIconClicked={() => this.setState({colorProps: {}})}
title="Wow, such toolbar"
style={styles.toolbar}
subtitle="Much native"
{...this.state.colorProps} />
<Text>
Touch the icon to reset the custom colors to the default (theme-provided) ones.
</Text>
</RNTesterBlock>
<RNTesterBlock title="Toolbar with remote logo & navIcon">
<ToolbarAndroid
actions={[{title: 'Bunny', icon: require('./bunny.png'), show: 'always'}]}
logo={require('./hawk.png')}
navIcon={require('./bunny.png')}
title="Bunny and Hawk"
style={styles.toolbar} />
</RNTesterBlock>
<RNTesterBlock title="Toolbar with custom overflowIcon">
<ToolbarAndroid
actions={toolbarActions}
overflowIcon={require('./bunny.png')}
style={styles.toolbar} />
</RNTesterBlock>
</RNTesterPage>
);
}
_onActionSelected = (position) => {
this.setState({
actionText: 'Selected ' + toolbarActions[position].title,
});
};
}
var toolbarActions = [
{title: 'Create', icon: nativeImageSource({
android: 'ic_create_black_48dp',
width: 96,
height: 96
}), show: 'always'},
{title: 'Filter'},
{title: 'Settings', icon: nativeImageSource({
android: 'ic_settings_black_48dp',
width: 96,
height: 96
}), show: 'always'},
];
var styles = StyleSheet.create({
toolbar: {
backgroundColor: '#e9eaed',
height: 56,
},
});
module.exports = ToolbarAndroidExample;
|
define({
"_widgetLabel": "Zasięg - nawigacja",
"previousExtent": "Poprzedni zasięg",
"nextExtent": "Następny zasięg"
});
|
/* ***** 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 Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org>
*
* 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 ***** */
ace.define('ace/theme/idle_fingers', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-idle-fingers";
exports.cssText = "\
.ace-idle-fingers .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-idle-fingers .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-idle-fingers .ace_gutter {\
background: #e8e8e8;\
color: #333;\
}\
\
.ace-idle-fingers .ace_print_margin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-idle-fingers .ace_scroller {\
background-color: #323232;\
}\
\
.ace-idle-fingers .ace_text-layer {\
cursor: text;\
color: #FFFFFF;\
}\
\
.ace-idle-fingers .ace_cursor {\
border-left: 2px solid #91FF00;\
}\
\
.ace-idle-fingers .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #91FF00;\
}\
\
.ace-idle-fingers .ace_marker-layer .ace_selection {\
background: rgba(90, 100, 126, 0.88);\
}\
\
.ace-idle-fingers.multiselect .ace_selection.start {\
box-shadow: 0 0 3px 0px #323232;\
border-radius: 2px;\
}\
\
.ace-idle-fingers .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-idle-fingers .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #404040;\
}\
\
.ace-idle-fingers .ace_marker-layer .ace_active_line {\
background: #353637;\
}\
\
.ace-idle-fingers .ace_marker-layer .ace_selected_word {\
border: 1px solid rgba(90, 100, 126, 0.88);\
}\
\
.ace-idle-fingers .ace_invisible {\
color: #404040;\
}\
\
.ace-idle-fingers .ace_keyword, .ace-idle-fingers .ace_meta {\
color:#CC7833;\
}\
\
.ace-idle-fingers .ace_constant, .ace-idle-fingers .ace_constant.ace_other {\
color:#6C99BB;\
}\
\
.ace-idle-fingers .ace_constant.ace_character, {\
color:#6C99BB;\
}\
\
.ace-idle-fingers .ace_constant.ace_character.ace_escape, {\
color:#6C99BB;\
}\
\
.ace-idle-fingers .ace_invalid {\
color:#FFFFFF;\
background-color:#FF0000;\
}\
\
.ace-idle-fingers .ace_support.ace_constant {\
color:#6C99BB;\
}\
\
.ace-idle-fingers .ace_fold {\
background-color: #CC7833;\
border-color: #FFFFFF;\
}\
\
.ace-idle-fingers .ace_support.ace_function {\
color:#B83426;\
}\
\
.ace-idle-fingers .ace_variable.ace_parameter {\
font-style:italic;\
}\
\
.ace-idle-fingers .ace_string {\
color:#A5C261;\
}\
\
.ace-idle-fingers .ace_string.ace_regexp {\
color:#CCCC33;\
}\
\
.ace-idle-fingers .ace_comment {\
font-style:italic;\
color:#BC9458;\
}\
\
.ace-idle-fingers .ace_meta.ace_tag {\
color:#FFE5BB;\
}\
\
.ace-idle-fingers .ace_entity.ace_name {\
color:#FFC66D;\
}\
\
.ace-idle-fingers .ace_markup.ace_underline {\
text-decoration:underline;\
}\
\
.ace-idle-fingers .ace_collab.ace_user1 {\
color:#323232;\
background-color:#FFF980;\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});
|
'use strict';
var SymbolPoly = require( '../polyfill' );
module.exports = function( t, a ) {
a( t( undefined ), false, "Undefined" );
a( t( null ), false, "Null" );
a( t( true ), false, "Primitive" );
a( t( 'raz' ), false, "String" );
a( t( {} ), false, "Object" );
a( t( [] ), false, "Array" );
if( typeof Symbol !== 'undefined' ) {
a( t( Symbol() ), true, "Native" );
}
a( t( SymbolPoly() ), true, "Polyfill" );
};
|
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
goog.require('ol.source.MapQuest');
goog.require('ol.source.TileArcGISRest');
|
/**
* Copyright 2018 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.
*/
/**
* Vendors who have IAB viewability certification may use iframe transport
* (see ../amp-analytics.md and ../integrating-analytics.md). In this case,
* put only the specification of the iframe location in the object below.
*
* This object is separated from vendors.js to be shared with extensions
* other than amp-analytics, for instance amp-ad-exit.
*
* @const {!JsonObject}
*/
export const IFRAME_TRANSPORTS = /** @type {!JsonObject} */ ({
'bg': 'https://tpc.googlesyndication.com/b4a/b4a-runner.html',
'moat': 'https://z.moatads.com/ampanalytics093284/iframe.html',
});
|
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
*/
'use strict';
import type {Options, DatePickerOpenAction} from './DatePickerAndroidTypes';
class DatePickerAndroid {
static async open(options: ?Options): Promise<DatePickerOpenAction> {
throw new Error('DatePickerAndroid is not supported on this platform.');
}
/**
* A date has been selected.
*/
static +dateSetAction: 'dateSetAction' = 'dateSetAction';
/**
* The dialog has been dismissed.
*/
static +dismissedAction: 'dismissedAction' = 'dismissedAction';
}
module.exports = DatePickerAndroid;
|
'use strict';
var toString = Object.prototype.toString
, id = toString.call(require('./noop'));
module.exports = function (f) {
return (typeof f === "function") && (toString.call(f) === id);
};
|
//// [computedPropertyNamesSourceMap1_ES5.ts]
class C {
["hello"]() {
debugger;
}
get ["goodbye"]() {
return 0;
}
}
//// [computedPropertyNamesSourceMap1_ES5.js]
var C = (function () {
function C() {
}
C.prototype["hello"] = function () {
debugger;
};
Object.defineProperty(C.prototype, "goodbye", {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
return C;
}());
//# sourceMappingURL=computedPropertyNamesSourceMap1_ES5.js.map
|
//// [computedPropertyNames22_ES5.ts]
class C {
bar() {
var obj = {
[this.bar()]() { }
};
return 0;
}
}
//// [computedPropertyNames22_ES5.js]
var C = /** @class */ (function () {
function C() {
}
C.prototype.bar = function () {
var _a;
var obj = (_a = {},
_a[this.bar()] = function () { },
_a);
return 0;
};
return C;
}());
|
/* -*- 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) 2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Jesse Ruderman
*
* 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 = 355736;
var summary = 'Decompilation of "[reserved]" has extra quotes';
var actual = '';
var expect = '';
var f;
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
enterFunc ('test');
printBugNumber(BUGNUMBER);
printStatus (summary);
f = function() { [implements] = q; };
expect = 'function() { [implements] = q; }';
actual = f + '';
compareSource(expect, actual, summary + ': 1');
f = function() { return { get implements() { } } };
expect = 'function() { return { get implements() { } }; }';
actual = f + '';
compareSource(expect, actual, summary + ': 2');
f = function() { [goto] = a };
expect = 'function() { [goto] = a; }';
actual = f + '';
compareSource(expect, actual, summary + ': 3');
exitFunc ('test');
}
|
'use strict';
var test = require('tape');
var dragula = require('..');
test('end does not throw when not dragging', function (t) {
t.test('a single time', function once (st) {
var drake = dragula();
st.doesNotThrow(function () {
drake.end();
}, 'dragula ignores a single call to drake.end');
st.end();
});
t.test('multiple times', function once (st) {
var drake = dragula();
st.doesNotThrow(function () {
drake.end();
drake.end();
drake.end();
drake.end();
}, 'dragula ignores multiple calls to drake.end');
st.end();
});
t.end();
});
test('when already dragging, ends (cancels) previous drag', function (t) {
var div = document.createElement('div');
var item1 = document.createElement('div');
var item2 = document.createElement('div');
var drake = dragula([div]);
div.appendChild(item1);
div.appendChild(item2);
document.body.appendChild(div);
drake.start(item1);
drake.on('dragend', end);
drake.on('cancel', cancel);
drake.end();
t.plan(4);
t.equal(drake.dragging, false, 'final state is: drake is not dragging');
t.end();
function end (item) {
t.equal(item, item1, 'dragend invoked with correct item');
}
function cancel (item, source) {
t.equal(item, item1, 'cancel invoked with correct item');
t.equal(source, div, 'cancel invoked with correct source');
}
});
test('when already dragged, ends (drops) previous drag', function (t) {
var div = document.createElement('div');
var div2 = document.createElement('div');
var item1 = document.createElement('div');
var item2 = document.createElement('div');
var drake = dragula([div, div2]);
div.appendChild(item1);
div.appendChild(item2);
document.body.appendChild(div);
document.body.appendChild(div2);
drake.start(item1);
div2.appendChild(item1);
drake.on('dragend', end);
drake.on('drop', drop);
drake.end();
t.plan(5);
t.equal(drake.dragging, false, 'final state is: drake is not dragging');
t.end();
function end (item) {
t.equal(item, item1, 'dragend invoked with correct item');
}
function drop (item, target, source) {
t.equal(item, item1, 'drop invoked with correct item');
t.equal(source, div, 'drop invoked with correct source');
t.equal(target, div2, 'drop invoked with correct target');
}
});
|
var classCqrs_1_1Azure_1_1BlobStorage_1_1Test_1_1Integration_1_1BlobStorageEventStoreTests =
[
[ "Save_ValidEvent_EventCanBeRetreived", "classCqrs_1_1Azure_1_1BlobStorage_1_1Test_1_1Integration_1_1BlobStorageEventStoreTests_ac74c18e7aeeaedb7e0328b1ab8b2a8e8.html#ac74c18e7aeeaedb7e0328b1ab8b2a8e8", null ]
];
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
module.exports = angular.module('trafficPortal.form.tenant.edit', [])
.controller('FormEditTenantController', require('./FormEditTenantController'));
|
var viewport;
var mainWidth;
var _northPanelHeight = 25;
var _northPanelHeightMinimized = 25;
var _topPlaceDivId = "TopPlaceDiv"; // div on the top of the page (in default.aspx)
var _rightFrameId = "right"; // id of the right frame
var _showPartTopFrameStateId = "showPartTopFrame"; // cookie name for storing whether to show top panel (TopPlaceDiv in default.aspx)
var _showLeftFrameStateId = "showLeftFrame"; // cookie name for storing whether to show left menu
// Create cards
var cards = new Ext.Panel({title: '',id:'menu_panel',layout:'card',region:'center',border: false,activeItem: 0,bodyStyle: 'padding:0px', defaults: {border:false}});
function initLayout()
{
// Set constants
Ext.BLANK_IMAGE_URL = 'images/s.gif';
// Set cookie provider
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
var str = Ext.state.Manager.get(_showLeftFrameStateId);
var hidden = false;
if(str && str == "0")
hidden = true;
viewport = new Ext.Viewport({
layout: 'border',
autoShow: true,
items: [{
region: 'north',
xtype: 'panel',
contentEl: 'up_div',
border: false,
margins: '0 0 0 0',
height: _northPanelHeight
}, {
region: 'west',
collapsible: true,
collapsed: hidden,
collapseMode: 'mini',
width: 200,
minSize: 175,
maxSize: 400,
split: true,
margins: '0 0 0 2',
layout:'border',
items:
[
cards,
{
region:'south',
border: false,
split:false,
contentEl: 'left_div'
}
],
listeners: {
beforecollapse: function(p) {
HideLeft();
},
beforeexpand: function(p) {
ShowLeft();
}
}
},
{
region:'center',
border: false,
items:
new Ext.Panel({
region:'center',
items:[
{
region:'center',
border: false,
contentEl:'center_div'
}]
}),
listeners: {
resize: function(p1,p2,p3,p4,p5) {
ResizeIFrame();
}
}
}]
});
var s = Ext.state.Manager.get(_showPartTopFrameStateId);
if(s && s == "0")
HideTopPart();
else
ShowTopPart();
ResizeIFrame();
setTimeout('leftTemplate_Initialize();', 500);
}
function ResizeIFrame()
{
if(viewport && viewport.layout && viewport.layout.center && viewport.layout.center.panel)
{
var obj = document.getElementById(_rightFrameId);
obj.height = (viewport.layout.center.panel.getInnerHeight() - 2).toString() + "px";
}
}
function ExpandCollapse()
{
var s = Ext.state.Manager.get(_showPartTopFrameStateId);
if(s && s == "0")
ShowTopPart();
else
HideTopPart();
}
function HideTopPart()
{
var fset = viewport.layout.north;
fset.panel.hide();
fset.panel.setHeight(_northPanelHeightMinimized);
fset.panel.show();
viewport.doLayout();
var TopPlaceDiv = document.getElementById(_topPlaceDivId);
if (TopPlaceDiv)
TopPlaceDiv.style.display = "none";
Ext.state.Manager.set(_showPartTopFrameStateId, "0");
}
function ShowTopPart()
{
var fset = viewport.layout.north;
fset.panel.hide();
fset.panel.setHeight(_northPanelHeight);
fset.panel.show();
viewport.doLayout();
var TopPlaceDiv = document.getElementById(_topPlaceDivId);
if (TopPlaceDiv)
TopPlaceDiv.style.display = "";
Ext.state.Manager.set(_showPartTopFrameStateId, "1");
}
function ShowLeft()
{
Ext.state.Manager.set(_showLeftFrameStateId, "1");
}
function HideLeft()
{
Ext.state.Manager.set(_showLeftFrameStateId, "0");
}
|
/*
** NOTE: This file is generated by Gulp and should not be edited directly!
** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.
*/
/* http://keith-wood.name/calendars.html
Македонски MK localisation for Gregorian/Julian calendars for jQuery.
Hajan Selmani (hajan [at] live [dot] com). */
(function ($) {
$.calendars.calendars.gregorian.prototype.regionalOptions['mk'] = {
name: 'Gregorian',
epochs: ['BCE', 'CE'],
monthNames: ['Јануари', 'Февруари', 'Март', 'Април', 'Мај', 'Јуни',
'Јули', 'Август', 'Септември', 'Октомври', 'Ноември', 'Декември'],
monthNamesShort: ['Јан', 'Фев', 'Мар', 'Апр', 'Мај', 'Јун',
'Јул', 'Авг', 'Сеп', 'Окт', 'Нов', 'Дек'],
dayNames: ['Недела', 'Понеделник', 'Вторник', 'Среда', 'Четврток', 'Петок', 'Сабота'],
dayNamesShort: ['Нед', 'Пон', 'Вто', 'Сре', 'Чет', 'Пет', 'Саб'],
dayNamesMin: ['Не', 'По', 'Вт', 'Ср', 'Че', 'Пе', 'Са'],
dateFormat: 'dd/mm/yyyy',
firstDay: 1,
isRTL: false
};
if ($.calendars.calendars.julian) {
$.calendars.calendars.julian.prototype.regionalOptions['mk'] =
$.calendars.calendars.gregorian.prototype.regionalOptions['mk'];
}
})(jQuery);
|
'use strict';
// src/services/message/hooks/restrict-to-sender.js
//
// Use this hook to manipulate incoming or outgoing data.
// For more information on hooks see: http://docs.feathersjs.com/hooks/readme.html
const errors = require('feathers-errors');
module.exports = function(options) {
return function(hook) {
const messageService = hook.app.service('messages');
// First get the message that the user wants to access
return messageService.get(hook.id, hook.params).then(message => {
// Throw a not authenticated error if the message and user id don't match
if (message.sentBy._id !== hook.params.user._id && hook.provider) {
throw new errors.NotAuthenticated('Access not allowed');
}
// Otherwise just return the hook
return hook;
});
};
};
|
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright
* (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your choice: -
* GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License
* Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html -
* Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE ==
*
* Manages the DOM ascensors element list of a specific DOM node (limited to
* body, inclusive).
*/
var FCKElementPath = function(lastNode) {
var eBlock = null;
var eBlockLimit = null;
var aElements = new Array();
var e = lastNode;
while (e) {
if (e.nodeType == 1) {
if (!this.LastElement)
this.LastElement = e;
var sElementName = e.nodeName.toLowerCase();
if (FCKBrowserInfo.IsIE && e.scopeName != 'HTML')
sElementName = e.scopeName.toLowerCase() + ':' + sElementName;
if (!eBlockLimit) {
if (!eBlock
&& FCKListsLib.PathBlockElements[sElementName] != null)
eBlock = e;
if (FCKListsLib.PathBlockLimitElements[sElementName] != null) {
// DIV is considered the Block, if no block is available
// (#525)
// and if it doesn't contain other blocks.
if (!eBlock && sElementName == 'div'
&& !FCKElementPath._CheckHasBlock(e))
eBlock = e;
else
eBlockLimit = e;
}
}
aElements.push(e);
if (sElementName == 'body')
break;
}
e = e.parentNode;
}
this.Block = eBlock;
this.BlockLimit = eBlockLimit;
this.Elements = aElements;
}
/**
* Check if an element contains any block element.
*/
FCKElementPath._CheckHasBlock = function(element) {
var childNodes = element.childNodes;
for (var i = 0, count = childNodes.length; i < count; i++) {
var child = childNodes[i];
if (child.nodeType == 1
&& FCKListsLib.BlockElements[child.nodeName.toLowerCase()])
return true;
}
return false;
}
|
"use strict";
var ParseLocation = (function () {
function ParseLocation(file, offset, line, col) {
this.file = file;
this.offset = offset;
this.line = line;
this.col = col;
}
ParseLocation.prototype.toString = function () {
return this.offset ? this.file.url + "@" + this.line + ":" + this.col : this.file.url;
};
return ParseLocation;
}());
exports.ParseLocation = ParseLocation;
var ParseSourceFile = (function () {
function ParseSourceFile(content, url) {
this.content = content;
this.url = url;
}
return ParseSourceFile;
}());
exports.ParseSourceFile = ParseSourceFile;
var ParseSourceSpan = (function () {
function ParseSourceSpan(start, end, details) {
if (details === void 0) { details = null; }
this.start = start;
this.end = end;
this.details = details;
}
ParseSourceSpan.prototype.toString = function () {
return this.start.file.content.substring(this.start.offset, this.end.offset);
};
return ParseSourceSpan;
}());
exports.ParseSourceSpan = ParseSourceSpan;
var ParseErrorLevel;
(function (ParseErrorLevel) {
ParseErrorLevel[ParseErrorLevel["WARNING"] = 0] = "WARNING";
ParseErrorLevel[ParseErrorLevel["FATAL"] = 1] = "FATAL";
})(ParseErrorLevel = exports.ParseErrorLevel || (exports.ParseErrorLevel = {}));
var ParseError = (function () {
function ParseError(span, msg, level) {
if (level === void 0) { level = ParseErrorLevel.FATAL; }
this.span = span;
this.msg = msg;
this.level = level;
}
ParseError.prototype.toString = function () {
var source = this.span.start.file.content;
var ctxStart = this.span.start.offset;
var contextStr = '';
var details = '';
if (ctxStart) {
if (ctxStart > source.length - 1) {
ctxStart = source.length - 1;
}
var ctxEnd = ctxStart;
var ctxLen = 0;
var ctxLines = 0;
while (ctxLen < 100 && ctxStart > 0) {
ctxStart--;
ctxLen++;
if (source[ctxStart] === '\n') {
if (++ctxLines === 3) {
break;
}
}
}
ctxLen = 0;
ctxLines = 0;
while (ctxLen < 100 && ctxEnd < source.length - 1) {
ctxEnd++;
ctxLen++;
if (source[ctxEnd] === '\n') {
if (++ctxLines === 3) {
break;
}
}
}
var context_1 = source.substring(ctxStart, this.span.start.offset) + '[ERROR ->]' +
source.substring(this.span.start.offset, ctxEnd + 1);
contextStr = " (\"" + context_1 + "\")";
}
if (this.span.details) {
details = ", " + this.span.details;
}
return "" + this.msg + contextStr + ": " + this.span.start + details;
};
return ParseError;
}());
exports.ParseError = ParseError;
|
// This is a dummy JavaScript file, meant to indicate a 'support' file of
// sorts that may be included by some test.
function helloWorld() {
return 'Hello, world!';
}
|
( function ( $ ) {
// We could either be in wp-admin/widgets.php or the customizer.
var $container = $( '#customize-controls' );
if ( ! $container.length ) {
$container = $( '#wpbody' );
}
$container.on( 'change', '.milestone-type', function () {
var $messageWrapper = $( this ).parent().find( '.milestone-message-wrapper' );
$( this ).find( 'input[type="radio"]:checked' ).val() === 'since'
? $messageWrapper.hide()
: $messageWrapper.show();
} );
function triggerChange() {
$container.find( '.milestone-type' ).trigger( 'change' );
}
// Used when adding widget via customizer or saving settings.
$( document ).on( 'widget-added widget-updated', function () {
triggerChange();
} );
triggerChange();
} )( jQuery );
|
/**
* 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.
*
* @providesModule SampleDraftInlineStyle
*
*/
'use strict';
var _require = require('immutable');
var OrderedSet = _require.OrderedSet;
module.exports = {
BOLD: OrderedSet.of('BOLD'),
BOLD_ITALIC: OrderedSet.of('BOLD', 'ITALIC'),
BOLD_ITALIC_UNDERLINE: OrderedSet.of('BOLD', 'ITALIC', 'UNDERLINE'),
BOLD_UNDERLINE: OrderedSet.of('BOLD', 'UNDERLINE'),
CODE: OrderedSet.of('CODE'),
ITALIC: OrderedSet.of('ITALIC'),
ITALIC_UNDERLINE: OrderedSet.of('ITALIC', 'UNDERLINE'),
NONE: OrderedSet(),
STRIKETHROUGH: OrderedSet.of('STRIKETHROUGH'),
UNDERLINE: OrderedSet.of('UNDERLINE')
};
|
Polymer('core-menu-button',{
overlayListeners: {
'core-overlay-open': 'openAction',
'core-activate': 'activateAction'
},
activateAction: function() {
this.opened = false;
}
});
|
version https://git-lfs.github.com/spec/v1
oid sha256:1177cfb7b071d59ea396fa643c1d3f76620accfe9ea77b5cf9dc457558cabfff
size 1969
|
016432n
|
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. 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 AJAX.ORG B.V. 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.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function() {
this.$rules = {
start : [
{token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{token : "xml-pe", regex : "<\\?.*?\\?>"},
{token : "comment", regex : "<\\!--", next : "comment"},
{token : "xml-pe", regex : "<\\!.*?>"},
{token : "meta.tag", regex : "<\\/?", next : "tag"},
{token : "text", regex : "\\s+"},
{
token : "constant.character.entity",
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
},
{token : "text", regex : "[^<]+"}
],
cdata : [
{token : "text", regex : "\\]\\]>", next : "start"},
{token : "text", regex : "\\s+"},
{token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
{token : "comment", regex : ".*?-->", next : "start"},
{token : "comment", regex : ".+"}
]
};
xmlUtil.tag(this.$rules, "tag", "start");
};
oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
|
// Copyright 2009 the Sputnik authors. All rights reserved.
/**
* Operator ~x returns ~ToInt32(x)
*
* @path ch11/11.4/11.4.8/S11.4.8_A3_T4.js
* @description Type(x) is undefined or null
*/
//CHECK#1
if (~void 0 !== -1) {
$ERROR('#1: ~void 0 === -1. Actual: ' + (~void 0));
}
//CHECK#2
if (~null !== -1) {
$ERROR('#2: ~null === -1. Actual: ' + (~null));
}
|
// Copyright 2009 the Sputnik authors. All rights reserved.
/**
* Check Do-While Statement for automatic semicolon insertion
*
* @path ch07/7.9/S7.9_A9_T5.js
* @description Execute do { \n ; \n }while((false) \n )
*/
//CHECK#1
do {
;
} while ((false)
)
|
/// Copyright (c) 2012 Ecma International. All rights reserved.
/**
* @path ch11/11.13/11.13.2/11.13.2-1-s.js
* @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(*=) evaluates to an unresolvable reference
* @onlyStrict
*/
function testcase() {
"use strict";
try {
eval("_11_13_2_1 *= 1;");
return false;
} catch (e) {
return e instanceof ReferenceError;
}
}
runTestCase(testcase);
|
/** PURE_IMPORTS_START .._.._Observable,.._.._operator_mergeScan PURE_IMPORTS_END */
import { Observable } from '../../Observable';
import { mergeScan } from '../../operator/mergeScan';
Observable.prototype.mergeScan = mergeScan;
//# sourceMappingURL=mergeScan.js.map
|
/** PURE_IMPORTS_START .._.._Observable,.._.._operator_concat PURE_IMPORTS_END */
import { Observable } from '../../Observable';
import { concat } from '../../operator/concat';
Observable.prototype.concat = concat;
//# sourceMappingURL=concat.js.map
|
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'indent', 'el', {
indent: 'Αύξηση Εσοχής',
outdent: 'Μείωση Εσοχής'
} );
|
module('system/run_loop/run_test');
test('Ember.run invokes passed function, returning value', function() {
var obj = {
foo: function() { return [this.bar, 'FOO']; },
bar: 'BAR',
checkArgs: function(arg1, arg2) { return [ arg1, this.bar, arg2 ]; }
};
equal(Ember.run(function() { return 'FOO'; }), 'FOO', 'pass function only');
deepEqual(Ember.run(obj, obj.foo), ['BAR', 'FOO'], 'pass obj and obj.method');
deepEqual(Ember.run(obj, 'foo'), ['BAR', 'FOO'], 'pass obj and "method"');
deepEqual(Ember.run(obj, obj.checkArgs, 'hello', 'world'), ['hello', 'BAR', 'world'], 'pass obj, obj.method, and extra arguments');
});
|
// Error: :8:14: super is only allowed in methods
// Error: :14:16: super is only allowed in methods
// Error: :19:19: super is only allowed in methods
class C {
superM() {
return (function() {
return super.m();
})();
}
superX2() {
return (function() {
return (function() {
return super.x;
})();
})();
}
constructor() {
(function() { super(); })();
}
}
|
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'table', 'is', {
border: 'Breidd ramma',
caption: 'Titill',
cell: {
menu: 'Reitur',
insertBefore: 'Skjóta inn reiti fyrir aftan',
insertAfter: 'Skjóta inn reiti fyrir framan',
deleteCell: 'Fella reit',
merge: 'Sameina reiti',
mergeRight: 'Sameina til hægri',
mergeDown: 'Sameina niður á við',
splitHorizontal: 'Kljúfa reit lárétt',
splitVertical: 'Kljúfa reit lóðrétt',
title: 'Cell Properties',
cellType: 'Cell Type',
rowSpan: 'Rows Span',
colSpan: 'Columns Span',
wordWrap: 'Word Wrap',
hAlign: 'Horizontal Alignment',
vAlign: 'Vertical Alignment',
alignBaseline: 'Baseline',
bgColor: 'Background Color',
borderColor: 'Border Color',
data: 'Data',
header: 'Header',
yes: 'Yes',
no: 'No',
invalidWidth: 'Cell width must be a number.',
invalidHeight: 'Cell height must be a number.',
invalidRowSpan: 'Rows span must be a whole number.',
invalidColSpan: 'Columns span must be a whole number.',
chooseColor: 'Choose'
},
cellPad: 'Reitaspássía',
cellSpace: 'Bil milli reita',
column: {
menu: 'Dálkur',
insertBefore: 'Skjóta inn dálki vinstra megin',
insertAfter: 'Skjóta inn dálki hægra megin',
deleteColumn: 'Fella dálk'
},
columns: 'Dálkar',
deleteTable: 'Fella töflu',
headers: 'Fyrirsagnir',
headersBoth: 'Hvort tveggja',
headersColumn: 'Fyrsti dálkur',
headersNone: 'Engar',
headersRow: 'Fyrsta röð',
invalidBorder: 'Border size must be a number.', // MISSING
invalidCellPadding: 'Cell padding must be a positive number.', // MISSING
invalidCellSpacing: 'Cell spacing must be a positive number.', // MISSING
invalidCols: 'Number of columns must be a number greater than 0.', // MISSING
invalidHeight: 'Table height must be a number.', // MISSING
invalidRows: 'Number of rows must be a number greater than 0.', // MISSING
invalidWidth: 'Table width must be a number.', // MISSING
menu: 'Eigindi töflu',
row: {
menu: 'Röð',
insertBefore: 'Skjóta inn röð fyrir ofan',
insertAfter: 'Skjóta inn röð fyrir neðan',
deleteRow: 'Eyða röð'
},
rows: 'Raðir',
summary: 'Áfram',
title: 'Eigindi töflu',
toolbar: 'Tafla',
widthPc: 'prósent',
widthPx: 'myndeindir',
widthUnit: 'width unit' // MISSING
} );
|
var express = require('express');
var proto = require('./server');
var util = require('./util');
var http = require('http');
var https = require('https');
function ExpressPeerServer(server, options) {
var app = express();
util.extend(app, proto);
options = app._options = util.extend({
debug: false,
timeout: 5000,
key: 'peerjs',
ip_limit: 5000,
concurrent_limit: 5000,
allow_discovery: false,
proxied: false
}, options);
// Connected clients
app._clients = {};
// Messages waiting for another peer.
app._outstanding = {};
// Mark concurrent users per ip
app._ips = {};
if (options.proxied) {
app.set('trust proxy', options.proxied);
}
app.on('mount', function() {
if (!server) {
throw new Error('Server is not passed to constructor - '+
'can\'t start PeerServer');
}
// Initialize HTTP routes. This is only used for the first few milliseconds
// before a socket is opened for a Peer.
app._initializeHTTP();
app._setCleanupIntervals();
app._initializeWSS(server);
});
return app;
}
function PeerServer(options, callback) {
var app = express();
options = options || {};
var path = options.path || '/';
var port = options.port || 80;
delete options.path;
if (path[0] !== '/') {
path = '/' + path;
}
if (path[path.length - 1] !== '/') {
path += '/';
}
var server;
if (options.ssl) {
if (options.ssl.certificate) {
// Preserve compatibility with 0.2.7 API
options.ssl.cert = options.ssl.certificate;
delete options.ssl.certificate;
}
server = https.createServer(options.ssl, app);
delete options.ssl;
} else {
server = http.createServer(app);
}
var peerjs = ExpressPeerServer(server, options);
app.use(path, peerjs);
if (callback) {
server.listen(port, function() {
callback(server);
});
} else {
server.listen(port);
}
return peerjs;
}
exports = module.exports = {
ExpressPeerServer: ExpressPeerServer,
PeerServer: PeerServer
};
|
tList1 = document.getElementById("testRect1").transform;
tList2 = document.getElementById("testRect2").transform;
function testTransformStyleBasic()
{
assert_equals(tList1.animVal.numberOfItems, 1, "There should be one transform on testRect1 - animVal");
assert_equals(tList2.animVal.numberOfItems, 2, "There should be two transforms on testRect2 - animVal");
assert_equals(tList1.baseVal.numberOfItems, 1, "There should be one transform on testRect1 - baseVal");
assert_equals(tList2.baseVal.numberOfItems, 2, "There should be two transforms on testRect2 - baseVal");
}
|
/**
* jQuery EasyUI 1.3.4
*
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
*
* Licensed under the GPL or commercial licenses
* To use it on other terms please contact us: info@jeasyui.com
* http://www.gnu.org/licenses/gpl.txt
* http://www.jeasyui.com/license_commercial.php
*
*/
(function($){
function _1(_2){
var _3=$.data(_2,"datetimebox");
var _4=_3.options;
$(_2).datebox($.extend({},_4,{onShowPanel:function(){
var _5=$(_2).datetimebox("getValue");
_9(_2,_5,true);
_4.onShowPanel.call(_2);
},formatter:$.fn.datebox.defaults.formatter,parser:$.fn.datebox.defaults.parser}));
$(_2).removeClass("datebox-f").addClass("datetimebox-f");
$(_2).datebox("calendar").calendar({onSelect:function(_6){
_4.onSelect.call(_2,_6);
}});
var _7=$(_2).datebox("panel");
if(!_3.spinner){
var p=$("<div style=\"padding:2px\"><input style=\"width:80px\"></div>").insertAfter(_7.children("div.datebox-calendar-inner"));
_3.spinner=p.children("input");
var _8=_7.children("div.datebox-button");
var ok=$("<a href=\"javascript:void(0)\" class=\"datebox-ok\"></a>").html(_4.okText).appendTo(_8);
ok.click(function(){
_f(_2);
});
}
_3.spinner.timespinner({showSeconds:_4.showSeconds,separator:_4.timeSeparator}).unbind(".datetimebox").bind("mousedown.datetimebox",function(e){
e.stopPropagation();
});
_9(_2,_4.value);
};
function _a(_b){
var c=$(_b).datetimebox("calendar");
var t=$(_b).datetimebox("spinner");
var _c=c.calendar("options").current;
return new Date(_c.getFullYear(),_c.getMonth(),_c.getDate(),t.timespinner("getHours"),t.timespinner("getMinutes"),t.timespinner("getSeconds"));
};
function _d(_e,q){
_9(_e,q,true);
};
function _f(_10){
var _11=$.data(_10,"datetimebox").options;
var _12=_a(_10);
_9(_10,_11.formatter.call(_10,_12));
$(_10).combo("hidePanel");
};
function _9(_13,_14,_15){
var _16=$.data(_13,"datetimebox").options;
$(_13).combo("setValue",_14);
if(!_15){
if(_14){
var _17=_16.parser.call(_13,_14);
$(_13).combo("setValue",_16.formatter.call(_13,_17));
$(_13).combo("setText",_16.formatter.call(_13,_17));
}else{
$(_13).combo("setText",_14);
}
}
var _17=_16.parser.call(_13,_14);
$(_13).datetimebox("calendar").calendar("moveTo",_17);
$(_13).datetimebox("spinner").timespinner("setValue",_18(_17));
function _18(_19){
function _1a(_1b){
return (_1b<10?"0":"")+_1b;
};
var tt=[_1a(_19.getHours()),_1a(_19.getMinutes())];
if(_16.showSeconds){
tt.push(_1a(_19.getSeconds()));
}
return tt.join($(_13).datetimebox("spinner").timespinner("options").separator);
};
};
$.fn.datetimebox=function(_1c,_1d){
if(typeof _1c=="string"){
var _1e=$.fn.datetimebox.methods[_1c];
if(_1e){
return _1e(this,_1d);
}else{
return this.datebox(_1c,_1d);
}
}
_1c=_1c||{};
return this.each(function(){
var _1f=$.data(this,"datetimebox");
if(_1f){
$.extend(_1f.options,_1c);
}else{
$.data(this,"datetimebox",{options:$.extend({},$.fn.datetimebox.defaults,$.fn.datetimebox.parseOptions(this),_1c)});
}
_1(this);
});
};
$.fn.datetimebox.methods={options:function(jq){
var _20=jq.datebox("options");
return $.extend($.data(jq[0],"datetimebox").options,{originalValue:_20.originalValue,disabled:_20.disabled,readonly:_20.readonly});
},spinner:function(jq){
return $.data(jq[0],"datetimebox").spinner;
},setValue:function(jq,_21){
return jq.each(function(){
_9(this,_21);
});
},reset:function(jq){
return jq.each(function(){
var _22=$(this).datetimebox("options");
$(this).datetimebox("setValue",_22.originalValue);
});
}};
$.fn.datetimebox.parseOptions=function(_23){
var t=$(_23);
return $.extend({},$.fn.datebox.parseOptions(_23),$.parser.parseOptions(_23,["timeSeparator",{showSeconds:"boolean"}]));
};
$.fn.datetimebox.defaults=$.extend({},$.fn.datebox.defaults,{showSeconds:true,timeSeparator:":",keyHandler:{up:function(){
},down:function(){
},enter:function(){
_f(this);
},query:function(q){
_d(this,q);
}},formatter:function(_24){
var h=_24.getHours();
var M=_24.getMinutes();
var s=_24.getSeconds();
function _25(_26){
return (_26<10?"0":"")+_26;
};
var _27=$(this).datetimebox("spinner").timespinner("options").separator;
var r=$.fn.datebox.defaults.formatter(_24)+" "+_25(h)+_27+_25(M);
if($(this).datetimebox("options").showSeconds){
r+=_27+_25(s);
}
return r;
},parser:function(s){
if($.trim(s)==""){
return new Date();
}
var dt=s.split(" ");
var d=$.fn.datebox.defaults.parser(dt[0]);
if(dt.length<2){
return d;
}
var _28=$(this).datetimebox("spinner").timespinner("options").separator;
var tt=dt[1].split(_28);
var _29=parseInt(tt[0],10)||0;
var _2a=parseInt(tt[1],10)||0;
var _2b=parseInt(tt[2],10)||0;
return new Date(d.getFullYear(),d.getMonth(),d.getDate(),_29,_2a,_2b);
}});
})(jQuery);
|
/**
* @license Angulartics v0.17.2
* (c) 2013 Luis Farzati http://luisfarzati.github.io/angulartics
* License: MIT
*/
(function (angular) {
'use strict';
/**
* @ngdoc overview
* @name angulartics.scroll
* Provides an implementation of jQuery Waypoints (http://imakewebthings.com/jquery-waypoints/)
* for use as a valid DOM event in analytics-on.
*/
angular.module('angulartics.scroll', ['angulartics'])
.directive('analyticsOn', ['$analytics', function ($analytics) {
function isProperty(name) {
return name.substr(0, 8) === 'scrollby';
}
function cast(value) {
if (['', 'true', 'false'].indexOf(value) > -1) {
return value.replace('', 'true') === 'true';
}
return value;
}
return {
restrict: 'A',
priority: 5,
scope: false,
link: function ($scope, $element, $attrs) {
if ($attrs.analyticsOn !== 'scrollby') return;
var properties = { continuous: false, triggerOnce: true };
angular.forEach($attrs.$attr, function(attr, name) {
if (isProperty(attr)) {
properties[name.slice(8,9).toLowerCase()+name.slice(9)] = cast($attrs[name]);
}
});
$element.waypoint(function () {
$element.triggerHandler('scrollby');
}, properties);
}
};
}]);
})(angular);
|
!function () {
} //
, 42;
!{
get 42() {
} //
,
foo: 42
};
(function () {
} //
);
|
version https://git-lfs.github.com/spec/v1
oid sha256:ffb1c670c7e9088b99c121ee79caccd22743e1a8528a64f4da8792a884dd73fe
size 4890
|
/* -*- 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 Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* 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 ***** */
gTestfile = '7.3-8.js';
/**
File Name: 7.3-7.js
ECMA Section: 7.3 Comments
Description:
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "7.3-8";
var VERSION = "ECMA_1";
startTest();
var TITLE = "Comments";
writeHeaderToLog( SECTION + " "+ TITLE);
var testcase = new TestCase( SECTION,
"code following multiline comment",
"pass",
"fail");
/**/testcase.actual="pass";
test();
|
"use strict";
module.exports = function (t, a) {
var o, o1, o2, x, y = {}, z = {};
o = { inherited: true, visible: 23 };
o1 = Object.create(o);
o1.visible = z;
o1.nonremovable = "raz";
Object.defineProperty(o1, "hidden", { value: "hidden" });
o2 = Object.defineProperties({}, { nonremovable: { value: y } });
o2.other = "other";
try { t(o2, o1); }
catch (ignore) {}
a(o2.visible, z, "Enumerable");
a(o1.hidden, "hidden", "Not Enumerable");
a(o2.propertyIsEnumerable("visible"), true, "Enumerable is enumerable");
a(o2.propertyIsEnumerable("hidden"), false, "Not enumerable is not enumerable");
a(o2.inherited, true, "Extend deep");
a(o2.nonremovable, y, "Do not overwrite non configurable");
a(o2.other, "other", "Own kept");
x = {};
t(x, o2);
try { t(x, o1); }
catch (ignore) {}
a(x.visible, z, "Enumerable");
a(x.hidden, "hidden", "Not Enumerable");
a(x.propertyIsEnumerable("visible"), true, "Enumerable is enumerable");
a(x.propertyIsEnumerable("hidden"), false, "Not enumerable is not enumerable");
a(x.inherited, true, "Extend deep");
a(x.nonremovable, y, "Ignored non configurable");
a(x.other, "other", "Other");
x.visible = 3;
a(x.visible, 3, "Writable is writable");
x = {};
t(x, o1);
a.throws(function () { x.hidden = 3; }, "Not writable is not writable");
x = {};
t(x, o1);
delete x.visible;
a.ok(!x.hasOwnProperty("visible"), "Configurable is configurable");
x = {};
t(x, o1);
a.throws(function () { delete x.hidden; }, "Not configurable is not configurable");
x = Object.defineProperty({}, "foo", {
configurable: false,
writable: true,
enumerable: false,
value: "bar"
});
try { t(x, { foo: "lorem" }); }
catch (ignore) {}
a(x.foo, "bar", "Writable, not enumerable");
};
|
'use strict';
var fs = require('fs');
var grunt = require('grunt');
var src = 'npm-react/';
var dest = 'build/npm-react/';
var modSrc = 'build/modules/';
var lib = dest + 'lib/';
var dist = dest + 'dist/';
var distFiles = [
'react.js', 'react.min.js', 'JSXTransformer.js',
'react-with-addons.js', 'react-with-addons.min.js'
];
function buildRelease() {
// delete build/react-core for fresh start
if (grunt.file.exists(dest)) {
grunt.file.delete(dest);
}
// mkdir -p build/react-core/lib
grunt.file.mkdir(lib);
// Copy npm-react/**/* to build/npm-react
// and build/modules/**/* to build/react-core/lib
var mappings = [].concat(
grunt.file.expandMapping('**/*', dest, {cwd: src}),
grunt.file.expandMapping('**/*', lib, {cwd: modSrc})
);
mappings.forEach(function(mapping) {
var mappingSrc = mapping.src[0];
var mappingDest = mapping.dest;
if (grunt.file.isDir(mappingSrc)) {
grunt.file.mkdir(mappingDest);
} else {
grunt.file.copy(mappingSrc, mappingDest);
}
});
// Make built source available inside npm package
grunt.file.mkdir(dist);
distFiles.forEach(function(file) {
grunt.file.copy('build/' + file, dist + file);
});
// modify build/react-core/package.json to set version ##
var pkg = grunt.file.readJSON(dest + 'package.json');
pkg.version = grunt.config.data.pkg.version;
grunt.file.write(dest + 'package.json', JSON.stringify(pkg, null, 2));
}
function packRelease() {
var done = this.async();
var spawnCmd = {
cmd: 'npm',
args: ['pack', 'npm-react'],
opts: {
cwd: 'build/'
}
};
grunt.util.spawn(spawnCmd, function() {
var buildSrc = 'build/react-' + grunt.config.data.pkg.version + '.tgz';
var buildDest = 'build/react.tgz';
fs.rename(buildSrc, buildDest, done);
});
}
module.exports = {
buildRelease: buildRelease,
packRelease: packRelease
};
|
// Generated by CoffeeScript 1.12.7
(function() {
var CoffeeScript, Module, binary, child_process, ext, findExtension, fork, helpers, i, len, loadFile, path, ref;
CoffeeScript = require('./coffee-script');
child_process = require('child_process');
helpers = require('./helpers');
path = require('path');
loadFile = function(module, filename) {
var answer;
answer = CoffeeScript._compileFile(filename, false, true);
return module._compile(answer, filename);
};
if (require.extensions) {
ref = CoffeeScript.FILE_EXTENSIONS;
for (i = 0, len = ref.length; i < len; i++) {
ext = ref[i];
require.extensions[ext] = loadFile;
}
Module = require('module');
findExtension = function(filename) {
var curExtension, extensions;
extensions = path.basename(filename).split('.');
if (extensions[0] === '') {
extensions.shift();
}
while (extensions.shift()) {
curExtension = '.' + extensions.join('.');
if (Module._extensions[curExtension]) {
return curExtension;
}
}
return '.js';
};
Module.prototype.load = function(filename) {
var extension;
this.filename = filename;
this.paths = Module._nodeModulePaths(path.dirname(filename));
extension = findExtension(filename);
Module._extensions[extension](this, filename);
return this.loaded = true;
};
}
if (child_process) {
fork = child_process.fork;
binary = require.resolve('../../bin/coffee');
child_process.fork = function(path, args, options) {
if (helpers.isCoffee(path)) {
if (!Array.isArray(args)) {
options = args || {};
args = [];
}
args = [path].concat(args);
path = binary;
}
return fork(path, args, options);
};
}
}).call(this);
|
gj.dialog.messages['ru-ru'] = {
Close: 'Закрыть',
DefaultTitle: 'Сообщение'
};
gj.grid.messages['ru-ru'] = {
First: 'Первый',
Previous: 'Предыдущий',
Next: 'Следующий',
Last: 'Последний',
Page: 'Страница',
FirstPageTooltip: 'Первая страница',
PreviousPageTooltip: 'Предыдущая страница',
NextPageTooltip: 'Следущая страница',
LastPageTooltip: 'Последняя страница',
Refresh: 'Обновить',
Of: 'от',
DisplayingRecords: 'Показать записи',
RowsPerPage: 'Записей на странице:',
Edit: 'Изменить',
Delete: 'Удалить',
Update: 'Обновить',
Cancel: 'Отмена',
NoRecordsFound: 'Нет ни одной записи.',
Loading: 'Загрузка...'
};
gj.editor.messages['ru-ru'] = {
bold: 'Жирный',
italic: 'Курсив',
strikethrough: 'Зачеркнутый',
underline: 'Подчеркнутый',
listBulleted: 'Список',
listNumbered: 'Нумерованный список',
indentDecrease: 'Уменьшить отступ',
indentIncrease: 'Увеличить отступ',
alignLeft: 'Выровнять по левому краю',
alignCenter: 'Выровнять по центру',
alignRight: 'Выровнять по правому краю',
alignJustify: 'Выровнять по ширине',
undo: 'Назад',
redo: 'Вперед'
};
gj.core.messages['ru-ru'] = {
monthNames: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
monthShortNames: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'],
weekDaysMin: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
weekDaysShort: ['вск', 'пнд', 'втр', 'срд', 'чтв', 'птн', 'сбт'],
weekDays: ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'],
am: 'AM',
pm: 'PM',
ok: 'ОК',
cancel: 'Отмена'
};
|
global.chai = require('chai');
global.sinon = require('sinon');
global.chai.use(require('sinon-chai'));
require('babel-core/register');
require('./setup')();
|
version https://git-lfs.github.com/spec/v1
oid sha256:58b8b795542ddb99ca9ad32c438d343593be83840f39ad67e762db566eb395f6
size 2010
|
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
var exports = module.exports;
/**
* ComputeManagementClient client exports.
*/
var ComputeManagementClient = require('./computeManagementClient');
exports.ComputeManagementClient = ComputeManagementClient;
/**
* Creates a new {@link ComputeManagementClient} object.
*
* NOTE: These APIs are still in development and should not be used.
*
* @param {string} [credentials.subscriptionId] The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [baseUri] The base uri.
* @param {array} [filters] optional array of service filters
* @return {ComputeManagementClient} A new ComputeManagementClient object.
*/
exports.createComputeManagementClient = function (credentials, baseUri, filters) {
return new exports.ComputeManagementClient.ComputeManagementClient(credentials, baseUri, filters);
};
var common = require('azure-common');
/**
* Creates a new CertificateCloudCredentials object.
* Either a pair of cert / key values need to be pass or a pem file location.
*
* @param {string} credentials.subscription The subscription identifier.
* @param {string} [credentials.cert] The certificate.
* @param {string} [credentials.key] The certificate key.
* @param {string} [credentials.pem] The PEM file content.
* @return {CertificateCloudCredentials}
*/
exports.createCertificateCloudCredentials = function (credentials) {
return new common.CertificateCloudCredentials(credentials);
};
|
// Helper script to hide the host organisation role if the project
// chosen in the embed-component widget already has a host organisation
// @todo: parametrize!
$(function() {
// Called as post_process from modules/s3db/org.py
S3.hide_host_role = function(component_id) {
if (component_id !== '') {
var json_url = S3.Ap.concat('/project/project/' + component_id + '/organisation.s3json?organisation.role=1');
$.getJSONS3(json_url, function (data) {
try {
project = data["$_project_project"][0];
if (project.hasOwnProperty("$_project_organisation")) {
$('#project_organisation_role > option[value=1]').hide();
}
else {
$('#project_organisation_role > option[value=1]').show();
}
}
catch(e) {
// skip
}
});
}
else {
$('#project_organisation_role > option[value=1]').show();
}
};
});
|
var a = 1
var b = function(){}
function c() {}
var d = {}
function e() {}
var f = []
function g() {}
var h = (1)
function i() {}
do {
} while(0)
function j() {}
var k = new Function('a','b','return a+b')
function l() {}
var m = 0 // a single comment doesn't eat the newline
function n() {}
|
/**
* Sinon.JS 1.15.0, 2015/11/25
*
* @author Christian Johansen (christian@cjohansen.no)
* @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS
*
* (The BSD License)
*
* Copyright (c) 2010-2014, Christian Johansen, christian@cjohansen.no
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of Christian Johansen nor the names of his 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 HOLDER 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.
*/
/**
* Helps IE run the fake timers. By defining global functions, IE allows
* them to be overwritten at a later point. If these are not defined like
* this, overwriting them will result in anything from an exception to browser
* crash.
*
* If you don't require fake timers to work in IE, don't include this file.
*
* @author Christian Johansen (christian@cjohansen.no)
* @license BSD
*
* Copyright (c) 2010-2013 Christian Johansen
*/
if (typeof window !== "undefined") {
function setTimeout() {}
function clearTimeout() {}
function setImmediate() {}
function clearImmediate() {}
function setInterval() {}
function clearInterval() {}
function Date() {}
// Reassign the original functions. Now their writable attribute
// should be true. Hackish, I know, but it works.
setTimeout = sinon.timers.setTimeout;
clearTimeout = sinon.timers.clearTimeout;
setImmediate = sinon.timers.setImmediate;
clearImmediate = sinon.timers.clearImmediate;
setInterval = sinon.timers.setInterval;
clearInterval = sinon.timers.clearInterval;
Date = sinon.timers.Date;
}
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _pure = require('recompose/pure');
var _pure2 = _interopRequireDefault(_pure);
var _SvgIcon = require('../../SvgIcon');
var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var EditorBorderOuter = function EditorBorderOuter(props) {
return _react2.default.createElement(
_SvgIcon2.default,
props,
_react2.default.createElement('path', { d: 'M13 7h-2v2h2V7zm0 4h-2v2h2v-2zm4 0h-2v2h2v-2zM3 3v18h18V3H3zm16 16H5V5h14v14zm-6-4h-2v2h2v-2zm-4-4H7v2h2v-2z' })
);
};
EditorBorderOuter = (0, _pure2.default)(EditorBorderOuter);
EditorBorderOuter.displayName = 'EditorBorderOuter';
EditorBorderOuter.muiName = 'SvgIcon';
exports.default = EditorBorderOuter;
|
odoo.define('website.tour.banner', function (require) {
'use strict';
var core = require('web.core');
var Tour = require('web.Tour');
var base = require('web_editor.base');
var _t = core._t;
base.ready().done(function () {
Tour.register({
id: 'banner',
name: _t("Build a page"),
path: '/page/homepage',
steps: [
{
title: _t("Welcome to your website!"),
content: _t("This tutorial will guide you to build your home page. We will start by adding a banner."),
popover: { next: _t("Start Tutorial"), end: _t("Skip It") },
},
{
waitNot: '.popover.tour',
element: 'button[data-action=edit]',
placement: 'bottom',
title: _t("Edit this page"),
content: _t("Every page of your website can be modified through the <i>Edit</i> button."),
popover: { fixed: true },
},
{
snippet: '#snippet_structure .oe_snippet:first',
placement: 'bottom',
title: _t("Drag & Drop a Banner"),
content: _t("Drag the Banner block and drop it in your page."),
popover: { fixed: true },
},
{
waitFor: '.oe_overlay_options .oe_options:visible',
element: '#wrapwrap .carousel:first div.carousel-content',
placement: 'top',
title: _t("Customize banner's text"),
content: _t("Click in the text and start editing it."),
sampleText: 'Here, a customized text',
},
{
waitNot: '#wrap .carousel:first div.carousel-content:has(h2:'+
'containsExact('+_t('Your Banner Title')+')):has(h3:'+
'containsExact('+_t('Click to customize this text')+'))',
element: '.oe_snippet_parent:visible',
placement: 'bottom',
title: _t("Get banner properties"),
content: _t("Select the parent container to get the global options of the banner."),
popover: { fixed: true },
},
{
element: '.oe_overlay_options .oe_options:visible',
placement: 'left',
title: _t("Customize the banner"),
content: _t("Customize any block through this menu. Try to change the background of the banner."),
popover: { next: _t("Continue") },
},
{
waitNot: '.popover.tour',
snippet: '#snippet_structure .oe_snippet:eq(7)',
placement: 'bottom',
title: _t("Drag & Drop This Block"),
content: _t("Drag the <em>'Features'</em> block and drop it below the banner."),
popover: { fixed: true },
},
{
waitFor: '.oe_overlay_options .oe_options:visible',
element: 'button[data-action=save]',
placement: 'right',
title: _t("Save your modifications"),
content: _t("Publish your page by clicking on the <em>'Save'</em> button."),
popover: { fixed: true },
},
{
waitFor: 'button[data-action=edit]:visible',
title: _t("Good Job!"),
content: _t("Well done, you created your homepage."),
popover: { next: _t("Continue") },
},
{
waitNot: '.popover.tour',
element: 'a[data-action=show-mobile-preview]',
placement: 'bottom',
title: _t("Test Your Mobile Version"),
content: _t("Let's check how your homepage looks like on mobile devices."),
popover: { fixed: true },
},
{
element: '.modal-dialog:has(#mobile-viewport) button[data-dismiss=modal]',
placement: 'right',
title: _t("Check Mobile Preview"),
content: _t("Scroll to check rendering and then close the mobile preview."),
popover: { next: _t("Continue") },
},
{
waitNot: '.modal-dialog:has(#mobile-viewport)',
element: '#content-menu-button',
placement: 'left',
title: _t("Add new pages and menus"),
content: _t("The 'Content' menu allows you to add pages or add the top menu."),
popover: { next: _t("Close Tutorial") },
},
]
});
});
});
|
YUI.add('event-key', function (Y, NAME) {
/**
* Functionality to listen for one or more specific key combinations.
* @module event
* @submodule event-key
*/
var ALT = "+alt",
CTRL = "+ctrl",
META = "+meta",
SHIFT = "+shift",
trim = Y.Lang.trim,
eventDef = {
KEY_MAP: {
enter : 13,
esc : 27,
backspace: 8,
tab : 9,
pageup : 33,
pagedown : 34
},
_typeRE: /^(up|down|press):/,
_keysRE: /^(?:up|down|press):|\+(alt|ctrl|meta|shift)/g,
processArgs: function (args) {
var spec = args.splice(3,1)[0],
mods = Y.Array.hash(spec.match(/\+(?:alt|ctrl|meta|shift)\b/g) || []),
config = {
type: this._typeRE.test(spec) ? RegExp.$1 : null,
mods: mods,
keys: null
},
// strip type and modifiers from spec, leaving only keyCodes
bits = spec.replace(this._keysRE, ''),
chr, uc, lc, i;
if (bits) {
bits = bits.split(',');
config.keys = {};
// FIXME: need to support '65,esc' => keypress, keydown
for (i = bits.length - 1; i >= 0; --i) {
chr = trim(bits[i]);
// catch sloppy filters, trailing commas, etc 'a,,'
if (!chr) {
continue;
}
// non-numerics are single characters or key names
if (+chr == chr) {
config.keys[chr] = mods;
} else {
lc = chr.toLowerCase();
if (this.KEY_MAP[lc]) {
config.keys[this.KEY_MAP[lc]] = mods;
// FIXME: '65,enter' defaults keydown for both
if (!config.type) {
config.type = "down"; // safest
}
} else {
// FIXME: Character mapping only works for keypress
// events. Otherwise, it uses String.fromCharCode()
// from the keyCode, which is wrong.
chr = chr.charAt(0);
uc = chr.toUpperCase();
if (mods["+shift"]) {
chr = uc;
}
// FIXME: stupid assumption that
// the keycode of the lower case == the
// charCode of the upper case
// a (key:65,char:97), A (key:65,char:65)
config.keys[chr.charCodeAt(0)] =
(chr === uc) ?
// upper case chars get +shift free
Y.merge(mods, { "+shift": true }) :
mods;
}
}
}
}
if (!config.type) {
config.type = "press";
}
return config;
},
on: function (node, sub, notifier, filter) {
var spec = sub._extra,
type = "key" + spec.type,
keys = spec.keys,
method = (filter) ? "delegate" : "on";
// Note: without specifying any keyCodes, this becomes a
// horribly inefficient alias for 'keydown' (et al), but I
// can't abort this subscription for a simple
// Y.on('keypress', ...);
// Please use keyCodes or just subscribe directly to keydown,
// keyup, or keypress
sub._detach = node[method](type, function (e) {
var key = keys ? keys[e.which] : spec.mods;
if (key &&
(!key[ALT] || (key[ALT] && e.altKey)) &&
(!key[CTRL] || (key[CTRL] && e.ctrlKey)) &&
(!key[META] || (key[META] && e.metaKey)) &&
(!key[SHIFT] || (key[SHIFT] && e.shiftKey)))
{
notifier.fire(e);
}
}, filter);
},
detach: function (node, sub, notifier) {
sub._detach.detach();
}
};
eventDef.delegate = eventDef.on;
eventDef.detachDelegate = eventDef.detach;
/**
* <p>Add a key listener. The listener will only be notified if the
* keystroke detected meets the supplied specification. The
* specification is a string that is defined as:</p>
*
* <dl>
* <dt>spec</dt>
* <dd><code>[{type}:]{code}[,{code}]*</code></dd>
* <dt>type</dt>
* <dd><code>"down", "up", or "press"</code></dd>
* <dt>code</dt>
* <dd><code>{keyCode|character|keyName}[+{modifier}]*</code></dd>
* <dt>modifier</dt>
* <dd><code>"shift", "ctrl", "alt", or "meta"</code></dd>
* <dt>keyName</dt>
* <dd><code>"enter", "backspace", "esc", "tab", "pageup", or "pagedown"</code></dd>
* </dl>
*
* <p>Examples:</p>
* <ul>
* <li><code>Y.on("key", callback, "press:12,65+shift+ctrl", "#my-input");</code></li>
* <li><code>Y.delegate("key", preventSubmit, "#forms", "enter", "input[type=text]");</code></li>
* <li><code>Y.one("doc").on("key", viNav, "j,k,l,;");</code></li>
* </ul>
*
* @event key
* @for YUI
* @param type {string} 'key'
* @param fn {function} the function to execute
* @param id {string|HTMLElement|collection} the element(s) to bind
* @param spec {string} the keyCode and modifier specification
* @param o optional context object
* @param args 0..n additional arguments to provide to the listener.
* @return {Event.Handle} the detach handle
*/
Y.Event.define('key', eventDef, true);
}, '3.14.1', {"requires": ["event-synthetic"]});
|
// Copyright 2011 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview Adds a keyboard shortcut for the link command.
*
*/
goog.provide('goog.editor.plugins.LinkShortcutPlugin');
goog.require('goog.editor.Command');
goog.require('goog.editor.Plugin');
/**
* Plugin to add a keyboard shortcut for the link command
* @constructor
* @extends {goog.editor.Plugin}
* @final
*/
goog.editor.plugins.LinkShortcutPlugin = function() {
goog.editor.plugins.LinkShortcutPlugin.base(this, 'constructor');
};
goog.inherits(goog.editor.plugins.LinkShortcutPlugin, goog.editor.Plugin);
/** @override */
goog.editor.plugins.LinkShortcutPlugin.prototype.getTrogClassId = function() {
return 'LinkShortcutPlugin';
};
/**
* @override
*/
goog.editor.plugins.LinkShortcutPlugin.prototype.handleKeyboardShortcut =
function(e, key, isModifierPressed) {
var command;
if (isModifierPressed && key == 'k' && !e.shiftKey) {
var link = /** @type {goog.editor.Link?} */ (
this.getFieldObject().execCommand(goog.editor.Command.LINK));
if (link) {
link.finishLinkCreation(this.getFieldObject());
}
return true;
}
return false;
};
|
/*global dijondemo */
/**
* @author Camille Reynders
* Date: 03/02/12
* Time: 14:34
*/
(function( ns ) {
'use strict';
ns.utils.Utils = {
// https://gist.github.com/1308368
uuid: function( a, b ) {
for ( b = a = '' ; a++ < 36 ; b += a * 51 & 52 ? (a ^ 15 ? 8 ^ Math.random() * (a ^ 20 ? 16 : 4) : 4).toString( 16 ) : '_' );
return b;
},
pluralize: function( count, word ) {
return count === 1 ? word : word + 's';
}
};
}( dijondemo ));
|
description("This test checks the SVGAnimatedLengthList API - utilizing the dx property of SVGTextElement");
var textElement = document.createElementNS("http://www.w3.org/2000/svg", "text");
textElement.setAttribute("dx", "50");
debug("");
debug("Check initial dx value");
shouldBeEqualToString("textElement.dx.toString()", "[object SVGAnimatedLengthList]");
shouldBeEqualToString("textElement.dx.baseVal.toString()", "[object SVGLengthList]");
shouldBe("textElement.dx.baseVal.getItem(0).value", "50");
debug("");
debug("Check that length lists are dynamic, caching value in a local variable and modifying it, should take effect");
var numRef = textElement.dx.baseVal;
numRef.getItem(0).value = 100;
shouldBe("numRef.getItem(0).value", "100");
shouldBe("textElement.dx.baseVal.getItem(0).value", "100");
debug("");
debug("Check that assigning to baseVal has no effect, as no setter is defined");
shouldBe("textElement.dx.baseVal = -1", "-1");
shouldBeEqualToString("textElement.dx.baseVal = 'aString'", "aString");
shouldBe("textElement.dx.baseVal = textElement", "textElement");
debug("");
debug("Check that the dx value remained 100, and the baseVal type has not been changed");
shouldBeEqualToString("textElement.dx.baseVal.toString()", "[object SVGLengthList]");
shouldBe("textElement.dx.baseVal.getItem(0).value", "100");
successfullyParsed = true;
|
//// [overloadOnConstConstraintChecks2.ts]
class A {}
class B extends A {}
class C extends A {
public foo() { }
}
function foo(name: 'hi'): B;
function foo(name: 'bye'): C;
function foo(name: string): A;
function foo(name: any): A {
return null;
}
//// [overloadOnConstConstraintChecks2.js]
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 A = (function () {
function A() {
}
return A;
})();
var B = (function (_super) {
__extends(B, _super);
function B() {
_super.apply(this, arguments);
}
return B;
})(A);
var C = (function (_super) {
__extends(C, _super);
function C() {
_super.apply(this, arguments);
}
C.prototype.foo = function () { };
return C;
})(A);
function foo(name) {
return null;
}
|
//// [tests/cases/conformance/decorators/missingDecoratorType.ts] ////
//// [a.ts]
interface Object { }
interface Array<T> { }
interface String { }
interface Boolean { }
interface Number { }
interface Function { }
interface RegExp { }
interface IArguments { }
//// [b.ts]
declare function dec(t, k, d);
class C {
@dec
method() {}
}
//// [a.js]
//// [b.js]
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
}
};
var C = (function () {
function C() {
}
C.prototype.method = function () { };
Object.defineProperty(C.prototype, "method",
__decorate([
dec
], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method")));
return C;
})();
|
// Based on http://philip.html5.org/tests/canvas/suite/tests/2d.pattern.modify.canvas1.html
description("This test checks if pattern changes after the source canvas is modified. See https://bugs.webkit.org/show_bug.cgi?id=20578 .");
function dataToArray(data) {
var result = new Array(data.length)
for (var i = 0; i < data.length; i++)
result[i] = data[i];
return result;
}
function getPixel(ctx, x, y) {
var data = ctx.getImageData(x,y,1,1);
if (!data) // getImageData failed, which should never happen
return [-1,-1,-1,-1];
return dataToArray(data.data);
}
function pixelShouldBe(ctx, x, y, colour) {
shouldBe("getPixel(ctx, " + [x, y] +")", "["+colour+"]");
}
function createCanvasImage(width, height, colour) {
var c = document.createElement("canvas");
c.width = width;
c.height = height;
var context = c.getContext("2d");
context.fillStyle = colour;
context.fillRect(0,0,width,height);
return c;
}
var canvas = createCanvasImage(100, 50, '#fff');
var ctx = canvas.getContext('2d');
var patternCanvas = createCanvasImage(100, 50, '#0f0');
var pattern = ctx.createPattern(patternCanvas, 'no-repeat');
// Modify the original canvas after we create a pattern.
var patternCtx = patternCanvas.getContext('2d');
patternCtx.fillStyle = '#f00';
patternCtx.fillRect(0, 0, 100, 50);
ctx.fillStyle = pattern;
ctx.fillRect(0, 0, 100, 50);
pixelShouldBe(ctx, 1, 1, [0, 255, 0, 255]);
pixelShouldBe(ctx, 98, 1, [0, 255, 0, 255]);
pixelShouldBe(ctx, 1, 48, [0, 255, 0, 255]);
pixelShouldBe(ctx, 98, 48, [0, 255, 0, 255]);
|
// Takes a root element and a list of ids of shadow host elements. Each id refers to a shadow host
// inside the previous id's shadow tree.
function getElementByShadowIds(root, ids) {
for (var i = 0; ;i++) {
var host = root.getElementById(ids[i]);
if (host == null) {
throw "No element found: i=" + i + " id=" + ids[i] + ". Root was " + root;
}
if (i == ids.length - 1) {
return host;
}
root = host.shadowRoot;
if (root == null) {
throw "No shadowRoot found: i=" + i + " id=" + ids[i] + ". Host was " + host;
}
}
}
// Installs a mininal custom element based on this template.
function installCustomElement(element_name, template_id) {
ceClass = class extends HTMLElement {
constructor() {
super();
var template = document
.getElementById(template_id)
.content;
this
.attachShadow({mode: 'open'})
.appendChild(template.cloneNode(true));
}
};
window.customElements.define(element_name, ceClass);
}
|
tinymce.addI18n('id',{
"Cut": "Penggal",
"Header 2": "Header 2",
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Browser anda tidak mendukung akses langsung ke clipboard. Silahkan gunakan Ctrl+X\/C\/V dari keyboard.",
"Div": "Div",
"Paste": "Tempel",
"Close": "Tutup",
"Font Family": "Font Family",
"Pre": "Pre",
"Align right": "Rata kanan",
"New document": "Dokumen baru",
"Blockquote": "Kutipan",
"Numbered list": "list nomor",
"Increase indent": "Tambah inden",
"Formats": "Format",
"Headers": "Header",
"Select all": "Pilih semua",
"Header 3": "Header 3",
"Blocks": "Blok",
"Undo": "Batal",
"Strikethrough": "Coret",
"Bullet list": "list simbol",
"Header 1": "Header 1",
"Superscript": "Superskrip",
"Clear formatting": "Hapus format",
"Font Sizes": "Font Sizes",
"Subscript": "Subskrip",
"Header 6": "Header 6",
"Redo": "Ulang",
"Paragraph": "Paragraf",
"Ok": "Ok",
"Bold": "Tebal",
"Code": "Code",
"Italic": "Miring",
"Align center": "Rate tengah",
"Header 5": "Header 5",
"Decrease indent": "Turunkan inden",
"Header 4": "Header 4",
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.",
"Underline": "Garis bawah",
"Cancel": "Batal",
"Justify": "Justifi",
"Inline": "Inline",
"Copy": "Salin",
"Align left": "Rate kiri",
"Visual aids": "Alat bantu visual",
"Lower Greek": "Lower Yunani",
"Square": "Kotak",
"Default": "Bawaan",
"Lower Alpha": "Lower Alpha",
"Circle": "Lingkaran",
"Disc": "Cakram",
"Upper Alpha": "Upper Alpha",
"Upper Roman": "Upper Roman",
"Lower Roman": "Lower Roman",
"Name": "Nama",
"Anchor": "Anjar",
"You have unsaved changes are you sure you want to navigate away?": "Anda memiliki perubahan yang belum disimpan, yakin ingin beralih ?",
"Restore last draft": "Muat kembali draft sebelumnya",
"Special character": "Spesial karakter",
"Source code": "Kode sumber",
"Right to left": "Kanan ke kiri",
"Left to right": "Kiri ke kanan",
"Emoticons": "Emotikon",
"Robots": "Robot",
"Document properties": "Properti dokumwn",
"Title": "Judul",
"Keywords": "Kata kunci",
"Encoding": "Enkoding",
"Description": "Description",
"Author": "Penulis",
"Fullscreen": "Layar penuh",
"Horizontal line": "Horizontal line",
"Horizontal space": "Horizontal space",
"Insert\/edit image": "Insert\/edit image",
"General": "General",
"Advanced": "Advanced",
"Source": "Source",
"Border": "Border",
"Constrain proportions": "Constrain proportions",
"Vertical space": "Vertical space",
"Image description": "Image description",
"Style": "Style",
"Dimensions": "Dimensions",
"Insert image": "Insert image",
"Insert date\/time": "Insert date\/time",
"Remove link": "Remove link",
"Url": "Url",
"Text to display": "Text to display",
"Anchors": "Anchors",
"Insert link": "Insert link",
"New window": "New window",
"None": "None",
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?",
"Target": "Target",
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",
"Insert\/edit link": "Insert\/edit link",
"Insert\/edit video": "Insert\/edit video",
"Poster": "Poster",
"Alternative source": "Alternative source",
"Paste your embed code below:": "Paste your embed code below:",
"Insert video": "Insert video",
"Embed": "Embed",
"Nonbreaking space": "Nonbreaking space",
"Page break": "Page break",
"Paste as text": "Paste as text",
"Preview": "Preview",
"Print": "Print",
"Save": "Save",
"Could not find the specified string.": "Could not find the specified string.",
"Replace": "Replace",
"Next": "Next",
"Whole words": "Whole words",
"Find and replace": "Find and replace",
"Replace with": "Replace with",
"Find": "Find",
"Replace all": "Replace all",
"Match case": "Match case",
"Prev": "Prev",
"Spellcheck": "Spellcheck",
"Finish": "Finish",
"Ignore all": "Ignore all",
"Ignore": "Ignore",
"Insert row before": "Insert row before",
"Rows": "Rows",
"Height": "Height",
"Paste row after": "Paste row after",
"Alignment": "Alignment",
"Column group": "Column group",
"Row": "Row",
"Insert column before": "Insert column before",
"Split cell": "Split cell",
"Cell padding": "Cell padding",
"Cell spacing": "Cell spacing",
"Row type": "Row type",
"Insert table": "Insert table",
"Body": "Body",
"Caption": "Caption",
"Footer": "Footer",
"Delete row": "Delete row",
"Paste row before": "Paste row before",
"Scope": "Scope",
"Delete table": "Delete table",
"Header cell": "Header cell",
"Column": "Column",
"Cell": "Cell",
"Header": "Header",
"Cell type": "Cell type",
"Copy row": "Copy row",
"Row properties": "Row properties",
"Table properties": "Table properties",
"Row group": "Row group",
"Right": "Right",
"Insert column after": "Insert column after",
"Cols": "Cols",
"Insert row after": "Insert row after",
"Width": "Width",
"Cell properties": "Cell properties",
"Left": "Left",
"Cut row": "Cut row",
"Delete column": "Delete column",
"Center": "Center",
"Merge cells": "Merge cells",
"Insert template": "Insert template",
"Templates": "Templates",
"Background color": "Background color",
"Text color": "Text color",
"Show blocks": "Show blocks",
"Show invisible characters": "Show invisible characters",
"Words: {0}": "Words: {0}",
"Insert": "Insert",
"File": "File",
"Edit": "Edit",
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help",
"Tools": "Tools",
"View": "View",
"Table": "Table",
"Format": "Format"
});
|
// moment.js locale configuration
// locale : Arabic Saudi Arabia (ar-sa)
// author : Suhail Alkowaileet : https://github.com/xsoh
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
var symbolMap = {
'1': '١',
'2': '٢',
'3': '٣',
'4': '٤',
'5': '٥',
'6': '٦',
'7': '٧',
'8': '٨',
'9': '٩',
'0': '٠'
}, numberMap = {
'١': '1',
'٢': '2',
'٣': '3',
'٤': '4',
'٥': '5',
'٦': '6',
'٧': '7',
'٨': '8',
'٩': '9',
'٠': '0'
};
return moment.defineLocale('ar-sa', {
months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
LLLL : 'dddd D MMMM YYYY LT'
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
return 'ص';
} else {
return 'م';
}
},
calendar : {
sameDay: '[اليوم على الساعة] LT',
nextDay: '[غدا على الساعة] LT',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: 'dddd [على الساعة] LT',
sameElse: 'L'
},
relativeTime : {
future : 'في %s',
past : 'منذ %s',
s : 'ثوان',
m : 'دقيقة',
mm : '%d دقائق',
h : 'ساعة',
hh : '%d ساعات',
d : 'يوم',
dd : '%d أيام',
M : 'شهر',
MM : '%d أشهر',
y : 'سنة',
yy : '%d سنوات'
},
preparse: function (string) {
return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
return numberMap[match];
}).replace(/،/g, ',');
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
}).replace(/,/g, '،');
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));
|
'use strict';
var isExtendable = require('is-extendable');
var forIn = require('for-in');
function mixinDeep(target, objects) {
var len = arguments.length, i = 0;
while (++i < len) {
var obj = arguments[i];
if (isObject(obj)) {
forIn(obj, copy, target);
}
}
return target;
}
/**
* Copy properties from the source object to the
* target object.
*
* @param {*} `val`
* @param {String} `key`
*/
function copy(val, key) {
var obj = this[key];
if (isObject(val) && isObject(obj)) {
mixinDeep(obj, val);
} else {
this[key] = val;
}
}
/**
* Returns true if `val` is an object or function.
*
* @param {any} val
* @return {Boolean}
*/
function isObject(val) {
return isExtendable(val) && !Array.isArray(val);
}
/**
* Expose `mixinDeep`
*/
module.exports = mixinDeep;
|
//>>built
define("dojox/widget/DynamicTooltip",["dijit","dojo","dojox","dojo/i18n!dijit/nls/loading","dojo/require!dijit/Tooltip"],function(_1,_2,_3){
_2.provide("dojox.widget.DynamicTooltip");
_2.experimental("dojox.widget.DynamicTooltip");
_2.require("dijit.Tooltip");
_2.requireLocalization("dijit","loading");
_2.declare("dojox.widget.DynamicTooltip",_1.Tooltip,{hasLoaded:false,href:"",label:"",preventCache:false,postMixInProperties:function(){
this.inherited(arguments);
this._setLoadingLabel();
},_setLoadingLabel:function(){
if(this.href){
this.label=_2.i18n.getLocalization("dijit","loading",this.lang).loadingState;
}
},_setHrefAttr:function(_4){
this.href=_4;
this.hasLoaded=false;
},loadContent:function(_5){
if(!this.hasLoaded&&this.href){
this._setLoadingLabel();
this.hasLoaded=true;
_2.xhrGet({url:this.href,handleAs:"text",tooltipWidget:this,load:function(_6,_7){
this.tooltipWidget.label=_6;
this.tooltipWidget.close();
this.tooltipWidget.open(_5);
},preventCache:this.preventCache});
}
},refresh:function(){
this.hasLoaded=false;
},open:function(_8){
_8=_8||(this._connectNodes&&this._connectNodes[0]);
if(!_8){
return;
}
this.loadContent(_8);
this.inherited(arguments);
}});
});
|
describe("", function() {
var rootEl;
beforeEach(function() {
rootEl = browser.rootEl;
browser.get("build/docs/examples/example-ng-pluralize/index.html");
});
it('should show correct pluralized string', function() {
var withoutOffset = element.all(by.css('ng-pluralize')).get(0);
var withOffset = element.all(by.css('ng-pluralize')).get(1);
var countInput = element(by.model('personCount'));
expect(withoutOffset.getText()).toEqual('1 person is viewing.');
expect(withOffset.getText()).toEqual('Igor is viewing.');
countInput.clear();
countInput.sendKeys('0');
expect(withoutOffset.getText()).toEqual('Nobody is viewing.');
expect(withOffset.getText()).toEqual('Nobody is viewing.');
countInput.clear();
countInput.sendKeys('2');
expect(withoutOffset.getText()).toEqual('2 people are viewing.');
expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');
countInput.clear();
countInput.sendKeys('3');
expect(withoutOffset.getText()).toEqual('3 people are viewing.');
expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');
countInput.clear();
countInput.sendKeys('4');
expect(withoutOffset.getText()).toEqual('4 people are viewing.');
expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');
});
it('should show data-bound names', function() {
var withOffset = element.all(by.css('ng-pluralize')).get(1);
var personCount = element(by.model('personCount'));
var person1 = element(by.model('person1'));
var person2 = element(by.model('person2'));
personCount.clear();
personCount.sendKeys('4');
person1.clear();
person1.sendKeys('Di');
person2.clear();
person2.sendKeys('Vojta');
expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');
});
});
|
// Serbian
plupload.addI18n({
'Select files' : 'Izaberite fajlove',
'Add files to the upload queue and click the start button.' : 'Dodajte fajlove u listu i kliknite na dugme Start.',
'Filename' : 'Naziv fajla',
'Status' : 'Status',
'Size' : 'Veličina',
'Add Files' : 'Dodaj fajlove',
'Stop current upload' : 'Zaustavi upload',
'Start uploading queue' : 'Počni upload',
'Drag files here.' : 'Prevucite fajlove ovde.',
'Start Upload': 'Počni upload',
'Uploaded %d/%d files': 'Snimljeno %d/%d fajlova'
});
|
module.exports = {
'name': 'permutations',
'category': 'Probability',
'syntax': [
'permutations(n)',
'permutations(n, k)'
],
'description': 'Compute the number of permutations of n items taken k at a time',
'examples': [
'permutations(5)',
'permutations(5, 3)'
],
'seealso': ['combinations', 'factorial']
};
|
/*
* Copyright 2012 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for node's readline module. Depends on the events module.
* @see http://nodejs.org/api/readline.html
*/
var events = require('events');
var stream = require('stream');
/**
* @const
*/
var readline = {};
/**
* @param {{input: stream.ReadableStream, output: stream.WritableStream, completer: function(string, function(*, Array)=), terminal: boolean}} options
* @return {readline.Interface}
*/
readline.createInterface;
/**
* @constructor
* @extends events.EventEmitter
*/
readline.Interface = function() {};
/**
* @param {string} prompt
* @param {number} length
* @return {void}
*/
readline.Interface.prototype.setPrompt;
/**
* @param {boolean=} preserveCursor
* @return {void}
*/
readline.Interface.prototype.prompt;
/**
* @param {string} query
* @param {function(string)} callback
* @return {void}
*/
readline.Interface.prototype.question;
/**
* @return {void}
*/
readline.Interface.prototype.pause;
/**
* @return {void}
*/
readline.Interface.prototype.resume;
/**
* @return {void}
*/
readline.Interface.prototype.close;
/**
* @param {string} data
* @param {Object.<string,*>=} key
* @return {void}
*/
readline.Interface.prototype.write;
module.exports = readline;
|
import BaseValidator from './base';
var TagSettingsValidator = BaseValidator.create({
properties: ['name', 'metaTitle', 'metaDescription'],
name: function (model) {
var name = model.get('name');
if (validator.empty(name)) {
model.get('errors').add('name', 'You must specify a name for the tag.');
this.invalidate();
}
},
metaTitle: function (model) {
var metaTitle = model.get('meta_title');
if (!validator.isLength(metaTitle, 0, 150)) {
model.get('errors').add('meta_title', 'Meta Title cannot be longer than 150 characters.');
this.invalidate();
}
},
metaDescription: function (model) {
var metaDescription = model.get('meta_description');
if (!validator.isLength(metaDescription, 0, 200)) {
model.get('errors').add('meta_description', 'Meta Description cannot be longer than 200 characters.');
this.invalidate();
}
}
});
export default TagSettingsValidator;
|
/*
* /MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Latin1Supplement.js
*
* Copyright (c) 2009-2014 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.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["MathJax_Main-italic"],{160:[0,0,250,0,0]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/Main/Italic/Latin1Supplement.js");
|
/**
* DO NOT EDIT THIS FILE.
* See the following change record for more information,
* https://www.drupal.org/node/2815083
* @preserve
**/
(function ($, Drupal, drupalSettings, _) {
Drupal.behaviors.ckeditorStylesComboSettings = {
attach: function attach(context) {
var $context = $(context);
var $ckeditorActiveToolbar = $context.find('.ckeditor-toolbar-configuration').find('.ckeditor-toolbar-active');
var previousStylesSet = drupalSettings.ckeditor.hiddenCKEditorConfig.stylesSet;
var that = this;
$context.find('[name="editor[settings][plugins][stylescombo][styles]"]').on('blur.ckeditorStylesComboSettings', function () {
var styles = $.trim($(this).val());
var stylesSet = that._generateStylesSetSetting(styles);
if (!_.isEqual(previousStylesSet, stylesSet)) {
previousStylesSet = stylesSet;
$ckeditorActiveToolbar.trigger('CKEditorPluginSettingsChanged', [{ stylesSet: stylesSet }]);
}
});
},
_generateStylesSetSetting: function _generateStylesSetSetting(styles) {
var stylesSet = [];
styles = styles.replace(/\r/g, '\n');
var lines = styles.split('\n');
for (var i = 0; i < lines.length; i++) {
var style = $.trim(lines[i]);
if (style.length === 0) {
continue;
}
if (style.match(/^ *[a-zA-Z0-9]+ *(\.[a-zA-Z0-9_-]+ *)*\| *.+ *$/) === null) {
continue;
}
var parts = style.split('|');
var selector = parts[0];
var label = parts[1];
var classes = selector.split('.');
var element = classes.shift();
stylesSet.push({
attributes: { class: classes.join(' ') },
element: element,
name: label
});
}
return stylesSet;
}
};
Drupal.behaviors.ckeditorStylesComboSettingsSummary = {
attach: function attach() {
$('[data-ckeditor-plugin-id="stylescombo"]').drupalSetSummary(function (context) {
var styles = $.trim($('[data-drupal-selector="edit-editor-settings-plugins-stylescombo-styles"]').val());
if (styles.length === 0) {
return Drupal.t('No styles configured');
}
var count = $.trim(styles).split('\n').length;
return Drupal.t('@count styles configured', { '@count': count });
});
}
};
})(jQuery, Drupal, drupalSettings, _);
|
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
function getModelName () {
var modelName = window.qnx.webplatform.device.modelName;
//Pre 10.2 (meaning Z10 or Q10)
if (typeof modelName === "undefined") {
if (window.screen.height === 720 && window.screen.width === 720) {
if ( window.matchMedia("(-blackberry-display-technology: -blackberry-display-oled)").matches) {
modelName = "Q10";
} else {
modelName = "Q5";
}
} else if ((window.screen.height === 1280 && window.screen.width === 768) ||
(window.screen.height === 768 && window.screen.width === 1280)) {
modelName = "Z10";
} else {
modelName = window.qnx.webplatform.deviceName;
}
}
return modelName;
}
function getUUID () {
var uuid = "";
try {
//Must surround by try catch because this will throw if the app is missing permissions
uuid = window.qnx.webplatform.device.devicePin;
} catch (e) {
//DO Nothing
}
return uuid;
}
module.exports = {
getDeviceInfo: function (success, fail, args, env) {
var result = new PluginResult(args, env),
modelName = getModelName(),
uuid = getUUID(),
info = {
platform: "blackberry10",
version: window.qnx.webplatform.device.scmBundle,
model: modelName,
uuid: uuid,
cordova: "dev"
};
result.ok(info);
}
};
|
/**
* Creates plugin instances.
*
* A plugin may be specified simply as a *config object* as long as the correct `ptype` is specified:
*
* {
* ptype: 'gridviewdragdrop',
* dragText: 'Drag and drop to reorganize'
* }
*
* Or just use the ptype on its own:
*
* 'gridviewdragdrop'
*
* Alternatively you can instantiate the plugin with Ext.create:
*
* Ext.create('Ext.grid.plugin.DragDrop', {
* dragText: 'Drag and drop to reorganize'
* })
* @private
*/
Ext.define('Ext.plugin.Manager', {
alternateClassName: [
'Ext.PluginManager',
'Ext.PluginMgr'
],
singleton: true,
typeName: 'ptype',
/**
* Creates a new Plugin from the specified config object using the config object's ptype to determine the class to
* instantiate.
* @param {Object} config A configuration object for the Plugin you wish to create.
* @param {Function} defaultType (optional) The constructor to provide the default Plugin type if the config object does not
* contain a `ptype`. (Optional if the config contains a `ptype`).
* @return {Ext.Component} The newly instantiated Plugin.
*/
create : function(config, defaultType, host) {
var result, type;
if (config.init) {
result = config;
} else {
// Inject the host into the config is we know the host
if (host) {
config = Ext.apply({}, config); // copy since we are going to modify
config.cmp = host;
}
// Grab the host ref if it was configured in
else {
host = config.cmp;
}
if (config.xclass) {
result = Ext.create(config);
} else {
// Lookup the class from the ptype and instantiate unless its a singleton
type = 'plugin.' + (config.ptype || defaultType);
result = Ext.ClassManager.instantiateByAlias(type, config);
}
}
// If we come out with a non-null plugin, ensure that any setCmp is called once.
if (result && host && result.setCmp && !result.setCmpCalled) {
result.setCmp(host);
result.setCmpCalled = true;
}
return result;
}
});
|
'use strict';
var assign = require('object-assign');
var path = require('path');
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jsx: require('./grunt/config/jsx'),
browserify: require('./grunt/config/browserify'),
npm: require('./grunt/config/npm'),
clean: [
'./build',
'./*.gem',
'./docs/_site',
'./examples/shared/*.js',
'.module-cache',
],
/*eslint-disable camelcase */
compare_size: require('./grunt/config/compare_size'),
/*eslint-enable camelcase */
});
grunt.config.set('compress', require('./grunt/config/compress'));
function spawnGulp(args, opts, done) {
grunt.util.spawn({
// This could be more flexible (require.resolve & lookup bin in package)
// but if it breaks we'll fix it then.
cmd: path.join('node_modules', '.bin', 'gulp'),
args: args,
opts: assign({stdio: 'inherit'}, opts),
}, function(err, result, code) {
if (err) {
grunt.fail.fatal('Something went wrong running gulp: ', result);
}
done(code === 0);
});
}
Object.keys(grunt.file.readJSON('package.json').devDependencies)
.filter(function(npmTaskName) {
return npmTaskName.indexOf('grunt-') === 0;
})
.filter(function(npmTaskName) {
return npmTaskName !== 'grunt-cli';
})
.forEach(function(npmTaskName) {
grunt.loadNpmTasks(npmTaskName);
});
grunt.registerTask('eslint', require('./grunt/tasks/eslint'));
grunt.registerTask('lint', ['eslint']);
grunt.registerTask('delete-build-modules', function() {
// Use gulp here.
spawnGulp(['react:clean'], null, this.async());
});
// Register jsx:normal and :release tasks.
grunt.registerMultiTask('jsx', require('./grunt/tasks/jsx'));
// Our own browserify-based tasks to build a single JS file build.
grunt.registerMultiTask('browserify', require('./grunt/tasks/browserify'));
grunt.registerMultiTask('npm', require('./grunt/tasks/npm'));
var npmReactTasks = require('./grunt/tasks/npm-react');
grunt.registerTask('npm-react:release', npmReactTasks.buildRelease);
grunt.registerTask('npm-react:pack', npmReactTasks.packRelease);
var npmReactDOMTasks = require('./grunt/tasks/npm-react-dom');
grunt.registerTask('npm-react-dom:pack', npmReactDOMTasks.packRelease);
var npmReactAddonsTasks = require('./grunt/tasks/npm-react-addons');
grunt.registerTask('npm-react-addons:release', npmReactAddonsTasks.buildReleases);
grunt.registerTask('npm-react-addons:pack', npmReactAddonsTasks.packReleases);
grunt.registerTask('version-check', require('./grunt/tasks/version-check'));
grunt.registerTask('build:basic', [
'build-modules',
'version-check',
'browserify:basic',
]);
grunt.registerTask('build:addons', [
'build-modules',
'browserify:addons',
]);
grunt.registerTask('build:min', [
'build-modules',
'version-check',
'browserify:min',
]);
grunt.registerTask('build:addons-min', [
'build-modules',
'browserify:addonsMin',
]);
grunt.registerTask('build:npm-react', [
'version-check',
'build-modules',
'npm-react:release',
]);
grunt.registerTask('build:react-dom', require('./grunt/tasks/react-dom'));
grunt.registerTask('test', ['jest']);
grunt.registerTask('npm:test', ['build', 'npm:pack']);
grunt.registerTask('jest', require('./grunt/tasks/jest'));
// Optimized build task that does all of our builds. The subtasks will be run
// in order so we can take advantage of that and only run build-modules once.
grunt.registerTask('build', [
'delete-build-modules',
'build-modules',
'version-check',
'browserify:basic',
'browserify:addons',
'browserify:min',
'browserify:addonsMin',
'build:react-dom',
'npm-react:release',
'npm-react:pack',
'npm-react-dom:pack',
'npm-react-addons:release',
'npm-react-addons:pack',
'compare_size',
]);
// Automate the release!
var releaseTasks = require('./grunt/tasks/release');
grunt.registerTask('release:setup', releaseTasks.setup);
grunt.registerTask('release:bower', releaseTasks.bower);
grunt.registerTask('release:docs', releaseTasks.docs);
grunt.registerTask('release:msg', releaseTasks.msg);
grunt.registerTask('release:starter', releaseTasks.starter);
grunt.registerTask('release', [
'release:setup',
'clean',
'build',
'release:bower',
'release:starter',
'compress',
'release:docs',
'release:msg',
]);
grunt.registerTask('build-modules', function() {
spawnGulp(['react:modules'], null, this.async());
});
// The default task - build - to keep setup easy.
grunt.registerTask('default', ['build']);
};
|
// Copyright 2013 the V8 project authors. All rights reserved.
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
description(
'This is a test case for String.prototype.link(href).'
);
// This test is based on http://mathias.html5.org/tests/javascript/string/.
// Check that the quotation mark is correctly escaped.
shouldBe("'_'.link('\"')", '"<a href=\\""\\">_</a>"');
// Simple case.
shouldBe("'_'.link('b')", '"<a href=\\"b\\">_</a>"');
// Does not escape special characters in `this` value.
shouldBe("'<'.link('b')", '"<a href=\\"b\\"><</a>"');
// First argument gets ToString()ed.
shouldBe("'_'.link(0x2A)", '"<a href=\\"42\\">_</a>"');
// Check that the quotation mark is correctly escaped.
shouldBe("'_'.link('\"')", '"<a href=\\""\\">_</a>"');
shouldBe("'_'.link('\" target=\"_blank')", '"<a href=\\"" target="_blank\\">_</a>"');
// Generic use on Number object.
shouldBe("String.prototype.link.call(0x2A, 0x2A)", '"<a href=\\"42\\">42</a>"');
// Generic use on non-coercible object `undefined`.
shouldThrow("String.prototype.link.call(undefined)", '"TypeError: Type error"');
// Generic use on non-coercible object `null`.
shouldThrow("String.prototype.link.call(null)", '"TypeError: Type error"');
// Check link.length.
shouldBe("String.prototype.link.length", "1");
|
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("devtools","id",{title:"Informasi Elemen",dialogName:"Nama jendela dialog",tabName:"Nama tab",elementId:"ID Elemen",elementType:"Tipe elemen"});
|
'use strict';
angular.module('mean.admin').controller('UsersController', ['$scope', 'Global', 'Menus', '$rootScope', '$http', 'Users', 'Circles',
function($scope, Global, Menus, $rootScope, $http, Users, Circles) {
$scope.global = Global;
$scope.user = {};
Circles.mine(function(acl) {
var circles = acl.allowed;
$scope.userSchema = [{
title: 'Email',
schemaKey: 'email',
type: 'email',
inTable: true
}, {
title: 'Name',
schemaKey: 'name',
type: 'text',
inTable: true
}, {
title: 'Username',
schemaKey: 'username',
type: 'text',
inTable: true
}, {
title: 'Roles',
schemaKey: 'roles',
type: 'select',
options: circles,
inTable: true
}, {
title: 'Password',
schemaKey: 'password',
type: 'password',
inTable: false
}, {
title: 'Repeat password',
schemaKey: 'confirmPassword',
type: 'password',
inTable: false
}];
});
$scope.init = function() {
Users.query({}, function(users) {
$scope.users = users;
});
};
$scope.add = function(valid) {
if (!valid) return;
if (!$scope.users) $scope.users = [];
var user = new Users({
email: $scope.user.email,
name: $scope.user.name,
username: $scope.user.username,
password: $scope.user.password,
confirmPassword: $scope.user.confirmPassword,
roles: $scope.user.roles
});
user.$save(function(data, headers) {
$scope.user = {};
$scope.users.push(user);
$scope.userError = null;
}, function(data, headers) {
$scope.userError = data.data;
});
};
$scope.remove = function(user) {
for (var i in $scope.users) {
if ($scope.users[i] === user) {
$scope.users.splice(i, 1);
}
}
user.$remove();
};
$scope.update = function(user, userField) {
if (userField && userField === 'roles' && user.tmpRoles.indexOf('admin') !== -1 && user.roles.indexOf('admin') === -1) {
if (confirm('Are you sure you want to remove "admin" role?')) {
user.$update();
} else {
user.roles = user.tmpRoles;
}
} else
user.$update();
};
$scope.beforeSelect = function(userField, user) {
if (userField === 'roles') {
user.tmpRoles = user.roles;
}
};
}
]);
|
/*! lightgallery - v1.2.9 - 2015-12-18
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2015 Sachin N; Licensed Apache 2.0 */
(function($, window, document, undefined) {
'use strict';
var defaults = {
hash: true
};
var Hash = function(element) {
this.core = $(element).data('lightGallery');
this.core.s = $.extend({}, defaults, this.core.s);
if (this.core.s.hash) {
this.oldHash = window.location.hash;
this.init();
}
return this;
};
Hash.prototype.init = function() {
var _this = this;
var _hash;
// Change hash value on after each slide transition
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index) {
window.location.hash = 'lg=' + _this.core.s.galleryId + '&slide=' + index;
});
// Listen hash change and change the slide according to slide value
$(window).on('hashchange', function() {
_hash = window.location.hash;
var _idx = parseInt(_hash.split('&slide=')[1], 10);
// it galleryId doesn't exist in the url close the gallery
if ((_hash.indexOf('lg=' + _this.core.s.galleryId) > -1)) {
_this.core.slide(_idx);
} else if (_this.core.lGalleryOn) {
_this.core.destroy();
}
});
};
Hash.prototype.destroy = function() {
// Reset to old hash value
if (this.oldHash && this.oldHash.indexOf('lg=' + this.core.s.galleryId) < 0) {
window.location.hash = this.oldHash;
} else {
if (history.pushState) {
history.pushState('', document.title, window.location.pathname + window.location.search);
} else {
window.location.hash = '';
}
}
};
$.fn.lightGallery.modules.hash = Hash;
})(jQuery, window, document);
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
var gadgets = gadgets || {};
gadgets.i18n = gadgets.i18n || {};
gadgets.i18n.NumberFormatConstants = {
DECIMAL_SEP:".",
GROUP_SEP:",",
PERCENT:"%",
ZERO_DIGIT:"0",
PLUS_SIGN:"+",
MINUS_SIGN:"-",
EXP_SYMBOL:"E",
PERMILL:"\u2030",
INFINITY:"\u221E",
NAN:"NaN",
DECIMAL_PATTERN:"#,##,##0.###",
SCIENTIFIC_PATTERN:"#E0",
PERCENT_PATTERN:"#,##,##0%",
CURRENCY_PATTERN:"\u00A4\u00A0#,##,##0.00",
DEF_CURRENCY_CODE:"INR"
};
gadgets.i18n.NumberFormatConstants.MONETARY_SEP = gadgets.i18n.NumberFormatConstants.DECIMAL_SEP;
gadgets.i18n.NumberFormatConstants.MONETARY_GROUP_SEP = gadgets.i18n.NumberFormatConstants.GROUP_SEP;
|
/**
* Parse errors but not in flow and not imported.
* Should see no parse errors for this file.
* @providesModule Bar
*/
function f(s:string):string { ### // illegal token
return s;
}
module.exports = { f: f }
|
'use strict';
var $ = require('../internals/export');
var DESCRIPTORS = require('../internals/descriptors');
var FORCED = require('../internals/object-prototype-accessors-forced');
var toObject = require('../internals/to-object');
var toPrimitive = require('../internals/to-primitive');
var getPrototypeOf = require('../internals/object-get-prototype-of');
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
// `Object.prototype.__lookupGetter__` method
// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupGetter__
if (DESCRIPTORS) {
$({ target: 'Object', proto: true, forced: FORCED }, {
__lookupGetter__: function __lookupGetter__(P) {
var O = toObject(this);
var key = toPrimitive(P, true);
var desc;
do {
if (desc = getOwnPropertyDescriptor(O, key)) return desc.get;
} while (O = getPrototypeOf(O));
}
});
}
|
/**
* Interval state object constructor
*
* @ignore
*/
var ReplSetState = function ReplSetState () {
this.errorMessages = [];
this.secondaries = {};
this.addresses = {};
this.arbiters = {};
this.passives = {};
this.members = [];
this.errors = {};
this.setName = null;
this.master = null;
}
ReplSetState.prototype.hasValidServers = function() {
var validServers = [];
if(this.master && this.master.isConnected()) return true;
if(this.secondaries) {
var keys = Object.keys(this.secondaries)
for(var i = 0; i < keys.length; i++) {
if(this.secondaries[keys[i]].isConnected())
return true;
}
}
return false;
}
ReplSetState.prototype.getAllReadServers = function() {
var candidate_servers = [];
for(var name in this.addresses) {
candidate_servers.push(this.addresses[name]);
}
// Return all possible read candidates
return candidate_servers;
}
ReplSetState.prototype.addServer = function(server, master) {
server.name = master.me;
if(master.ismaster) {
this.master = server;
this.addresses[server.name] = server;
} else if(master.secondary) {
this.secondaries[server.name] = server;
this.addresses[server.name] = server;
} else if(master.arbiters) {
this.arbiters[server.name] = server;
this.addresses[server.name] = server;
}
}
ReplSetState.prototype.contains = function(host) {
return this.addresses[host] != null;
}
ReplSetState.prototype.isPrimary = function(server) {
return this.master && this.master.name == server.name;
}
ReplSetState.prototype.isSecondary = function(server) {
return this.secondaries[server.name] != null;
}
exports.ReplSetState = ReplSetState;
|
Prism.languages.inform7 = {
'string': {
pattern: /"[^"]*"/,
inside: {
'substitution': {
pattern: /\[[^\]]+\]/,
inside: {
'delimiter': {
pattern:/\[|\]/,
alias: 'punctuation'
}
// See rest below
}
}
}
},
'comment': {
pattern: /\[[^\]]+\]/,
greedy: true
},
'title': {
pattern: /^[ \t]*(?:volume|book|part(?! of)|chapter|section|table)\b.+/im,
alias: 'important'
},
'number': {
pattern: /(^|[^-])(?:(?:\b|-)\d+(?:\.\d+)?(?:\^\d+)?\w*|\b(?:one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve))\b(?!-)/i,
lookbehind: true
},
'verb': {
pattern: /(^|[^-])\b(?:applying to|are|attacking|answering|asking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:s|ing)?|consulting|contain(?:s|ing)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:ve|s|ving)|hold(?:s|ing)?|impl(?:y|ies)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:s|ing)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:s|ing)?|setting|showing|singing|sleeping|smelling|squeezing|switching|support(?:s|ing)?|swearing|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:s|ing)?|var(?:y|ies|ying)|waiting|waking|waving|wear(?:s|ing)?)\b(?!-)/i,
lookbehind: true,
alias: 'operator'
},
'keyword': {
pattern: /(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|unless|the story)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,
lookbehind: true
},
'property': {
pattern: /(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: on| off)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,
lookbehind: true,
alias: 'symbol'
},
'position': {
pattern: /(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,
lookbehind: true,
alias: 'keyword'
},
'type': {
pattern: /(^|[^-])\b(?:actions?|activit(?:y|ies)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,
lookbehind: true,
alias: 'variable'
},
'punctuation': /[.,:;(){}]/
};
Prism.languages.inform7['string'].inside['substitution'].inside.rest = Prism.util.clone(Prism.languages.inform7);
// We don't want the remaining text in the substitution to be highlighted as the string.
Prism.languages.inform7['string'].inside['substitution'].inside.rest.text = {
pattern: /\S(?:\s*\S)*/,
alias: 'comment'
};
|
require('../../modules/es.array.for-each');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'forEach');
|
var util = require('util');
module.exports.isPath = function (s) {
return (/[\/\\]/).test(s);
};
module.exports.inspect = function(obj, depth) {
console.log(util.inspect(obj, false, depth || 5, true));
};
|
'use strict';
module.exports = function defFunc(ajv) {
defFunc.definition = {
type: 'string',
inline: function (it, keyword, schema) {
return getRegExp() + '.test(data' + (it.dataLevel || '') + ')';
function getRegExp() {
try {
if (typeof schema == 'object')
return new RegExp(schema.pattern, schema.flags);
var rx = schema.match(/^\/(.*)\/([gimy]*)$/);
if (rx) return new RegExp(rx[1], rx[2]);
throw new Error('cannot parse string into RegExp');
} catch(e) {
console.error('regular expression', schema, 'is invalid');
throw e;
}
}
},
metaSchema: {
type: ['string', 'object'],
properties: {
pattern: { type: 'string' },
flags: { type: 'string' }
},
required: ['pattern'],
additionalProperties: false
}
};
ajv.addKeyword('regexp', defFunc.definition);
return ajv;
};
|
/*************************************************************
*
* MathJax/fonts/HTML-CSS/TeX/png/AMS/Regular/Latin1Supplement.js
*
* Defines the image size data needed for the HTML-CSS OutputJax
* to display mathematics using fallback images when the fonts
* are not availble to the client browser.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2010 Design Science, 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
*
* 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"].defineImageData({
"MathJax_AMS": {
0xA0: [ // NO-BREAK SPACE
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],
[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0],[1,1,0]
],
0xA5: [ // YEN SIGN
[6,5,0],[7,6,0],[8,7,0],[9,8,0],[11,9,0],[13,11,0],[15,13,0],[18,16,0],
[21,19,0],[25,22,0],[29,27,0],[35,32,0],[41,38,0],[49,45,0]
],
0xAE: [ // REGISTERED SIGN
[7,6,1],[8,8,2],[9,9,2],[11,10,2],[13,12,2],[16,15,3],[18,17,3],[22,20,4],
[26,24,5],[31,29,6],[36,34,7],[43,41,8],[51,49,10],[61,59,12]
],
0xF0: [ // LATIN SMALL LETTER ETH
[4,5,0],[5,6,0],[5,8,0],[6,9,0],[8,11,0],[9,13,0],[10,15,0],[12,18,0],
[15,22,2],[17,25,1],[20,30,1],[24,36,1],[29,43,1],[34,51,1]
]
}
});
MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].imgDir+"/AMS/Regular"+
MathJax.OutputJax["HTML-CSS"].imgPacked+"/Latin1Supplement.js");
|
fc.applyAll = applyAll;
/* Event Date Math
-----------------------------------------------------------------------------*/
function exclEndDay(event) {
if (event.end) {
return _exclEndDay(event.end, event.allDay);
}else{
return addDays(cloneDate(event.start), 1);
}
}
function _exclEndDay(end, allDay) {
end = cloneDate(end);
return allDay || end.getHours() || end.getMinutes() ? addDays(end, 1) : clearTime(end);
// why don't we check for seconds/ms too?
}
/* Event Element Binding
-----------------------------------------------------------------------------*/
function lazySegBind(container, segs, bindHandlers) {
container.unbind('mouseover').mouseover(function(ev) {
var parent=ev.target, e,
i, seg;
while (parent != this) {
e = parent;
parent = parent.parentNode;
}
if ((i = e._fci) !== undefined) {
e._fci = undefined;
seg = segs[i];
bindHandlers(seg.event, seg.element, seg);
$(ev.target).trigger(ev);
}
ev.stopPropagation();
});
}
/* Element Dimensions
-----------------------------------------------------------------------------*/
function setOuterWidth(element, width, includeMargins) {
for (var i=0, e; i<element.length; i++) {
e = $(element[i]);
e.width(Math.max(0, width - hsides(e, includeMargins)));
}
}
function setOuterHeight(element, height, includeMargins) {
for (var i=0, e; i<element.length; i++) {
e = $(element[i]);
e.height(Math.max(0, height - vsides(e, includeMargins)));
}
}
function hsides(element, includeMargins) {
return hpadding(element) + hborders(element) + (includeMargins ? hmargins(element) : 0);
}
function hpadding(element) {
return (parseFloat($.css(element[0], 'paddingLeft', true)) || 0) +
(parseFloat($.css(element[0], 'paddingRight', true)) || 0);
}
function hmargins(element) {
return (parseFloat($.css(element[0], 'marginLeft', true)) || 0) +
(parseFloat($.css(element[0], 'marginRight', true)) || 0);
}
function hborders(element) {
return (parseFloat($.css(element[0], 'borderLeftWidth', true)) || 0) +
(parseFloat($.css(element[0], 'borderRightWidth', true)) || 0);
}
function vsides(element, includeMargins) {
return vpadding(element) + vborders(element) + (includeMargins ? vmargins(element) : 0);
}
function vpadding(element) {
return (parseFloat($.css(element[0], 'paddingTop', true)) || 0) +
(parseFloat($.css(element[0], 'paddingBottom', true)) || 0);
}
function vmargins(element) {
return (parseFloat($.css(element[0], 'marginTop', true)) || 0) +
(parseFloat($.css(element[0], 'marginBottom', true)) || 0);
}
function vborders(element) {
return (parseFloat($.css(element[0], 'borderTopWidth', true)) || 0) +
(parseFloat($.css(element[0], 'borderBottomWidth', true)) || 0);
}
/* Misc Utils
-----------------------------------------------------------------------------*/
//TODO: arraySlice
//TODO: isFunction, grep ?
function noop() { }
function dateCompare(a, b) {
return a - b;
}
function arrayMax(a) {
return Math.max.apply(Math, a);
}
function zeroPad(n) {
return (n < 10 ? '0' : '') + n;
}
function smartProperty(obj, name) { // get a camel-cased/namespaced property of an object
if (obj[name] !== undefined) {
return obj[name];
}
var parts = name.split(/(?=[A-Z])/),
i=parts.length-1, res;
for (; i>=0; i--) {
res = obj[parts[i].toLowerCase()];
if (res !== undefined) {
return res;
}
}
return obj[''];
}
function htmlEscape(s) {
return s.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/'/g, ''')
.replace(/"/g, '"')
.replace(/\n/g, '<br />');
}
function disableTextSelection(element) {
element
.attr('unselectable', 'on')
.css('MozUserSelect', 'none')
.bind('selectstart.ui', function() { return false; });
}
/*
function enableTextSelection(element) {
element
.attr('unselectable', 'off')
.css('MozUserSelect', '')
.unbind('selectstart.ui');
}
*/
function markFirstLast(e) {
e.children()
.removeClass('fc-first fc-last')
.filter(':first-child')
.addClass('fc-first')
.end()
.filter(':last-child')
.addClass('fc-last');
}
function setDayID(cell, date) {
cell.each(function(i, _cell) {
_cell.className = _cell.className.replace(/^fc-\w*/, 'fc-' + dayIDs[date.getDay()]);
// TODO: make a way that doesn't rely on order of classes
});
}
function getSkinCss(event, opt) {
var source = event.source || {};
var eventColor = event.color;
var sourceColor = source.color;
var optionColor = opt('eventColor');
var backgroundColor =
event.backgroundColor ||
eventColor ||
source.backgroundColor ||
sourceColor ||
opt('eventBackgroundColor') ||
optionColor;
var borderColor =
event.borderColor ||
eventColor ||
source.borderColor ||
sourceColor ||
opt('eventBorderColor') ||
optionColor;
var textColor =
event.textColor ||
source.textColor ||
opt('eventTextColor');
var statements = [];
if (backgroundColor) {
statements.push('background-color:' + backgroundColor);
}
if (borderColor) {
statements.push('border-color:' + borderColor);
}
if (textColor) {
statements.push('color:' + textColor);
}
return statements.join(';');
}
function applyAll(functions, thisObj, args) {
if ($.isFunction(functions)) {
functions = [ functions ];
}
if (functions) {
var i;
var ret;
for (i=0; i<functions.length; i++) {
ret = functions[i].apply(thisObj, args) || ret;
}
return ret;
}
}
function firstDefined() {
for (var i=0; i<arguments.length; i++) {
if (arguments[i] !== undefined) {
return arguments[i];
}
}
}
|
/**
* plugin.js
*
* Released under LGPL License.
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
/*global tinymce:true */
tinymce.PluginManager.add('save', function(editor) {
function save() {
var formObj;
formObj = tinymce.DOM.getParent(editor.id, 'form');
if (editor.getParam("save_enablewhendirty", true) && !editor.isDirty()) {
return;
}
tinymce.triggerSave();
// Use callback instead
if (editor.getParam("save_onsavecallback")) {
editor.execCallback('save_onsavecallback', editor);
editor.nodeChanged();
return;
}
if (formObj) {
editor.setDirty(false);
if (!formObj.onsubmit || formObj.onsubmit()) {
if (typeof formObj.submit == "function") {
formObj.submit();
} else {
displayErrorMessage(editor.translate("Error: Form submit field collision."));
}
}
editor.nodeChanged();
} else {
displayErrorMessage(editor.translate("Error: No form element found."));
}
}
function displayErrorMessage(message) {
editor.notificationManager.open({
text: message,
type: 'error'
});
}
function cancel() {
var h = tinymce.trim(editor.startContent);
// Use callback instead
if (editor.getParam("save_oncancelcallback")) {
editor.execCallback('save_oncancelcallback', editor);
return;
}
editor.setContent(h);
editor.undoManager.clear();
editor.nodeChanged();
}
function stateToggle() {
var self = this;
editor.on('nodeChange dirty', function() {
self.disabled(editor.getParam("save_enablewhendirty", true) && !editor.isDirty());
});
}
editor.addCommand('mceSave', save);
editor.addCommand('mceCancel', cancel);
editor.addButton('save', {
icon: 'save',
text: 'Save',
cmd: 'mceSave',
disabled: true,
onPostRender: stateToggle
});
editor.addButton('cancel', {
text: 'Cancel',
icon: false,
cmd: 'mceCancel',
disabled: true,
onPostRender: stateToggle
});
editor.addShortcut('Meta+S', '', 'mceSave');
});
|
/**
* VexFlow - TabTie Tests
* Copyright Mohit Muthanna 2010 <mohit@muthanna.com>
*/
Vex.Flow.Test.TabTie = {}
Vex.Flow.Test.TabTie.Start = function() {
module("TabTie");
Vex.Flow.Test.runTest("Simple TabTie", Vex.Flow.Test.TabTie.simple);
Vex.Flow.Test.runRaphaelTest("Simple TabTie (Raphael)",
Vex.Flow.Test.TabTie.simple);
Vex.Flow.Test.runTest("Hammerons", Vex.Flow.Test.TabTie.simpleHammeron);
Vex.Flow.Test.runRaphaelTest("Hammerons (Raphael)",
Vex.Flow.Test.TabTie.simpleHammeron);
Vex.Flow.Test.runTest("Pulloffs", Vex.Flow.Test.TabTie.simplePulloff);
Vex.Flow.Test.runRaphaelTest("Pulloffs (Raphael)",
Vex.Flow.Test.TabTie.simplePulloff);
Vex.Flow.Test.runTest("Tapping", Vex.Flow.Test.TabTie.tap);
Vex.Flow.Test.runRaphaelTest("Tapping (Raphael)", Vex.Flow.Test.TabTie.tap);
Vex.Flow.Test.runTest("Continuous", Vex.Flow.Test.TabTie.continuous);
Vex.Flow.Test.runRaphaelTest("Continuous (Raphael)",
Vex.Flow.Test.TabTie.continuous);
}
Vex.Flow.Test.TabTie.tieNotes = function(notes, indices, stave, ctx, text) {
var voice = new Vex.Flow.Voice(Vex.Flow.Test.TIME4_4);
voice.addTickables(notes);
var formatter = new Vex.Flow.Formatter().joinVoices([voice]).
format([voice], 100);
voice.draw(ctx, stave);
var tie = new Vex.Flow.TabTie({
first_note: notes[0],
last_note: notes[1],
first_indices: indices,
last_indices: indices,
}, text || "Annotation");
tie.setContext(ctx);
tie.draw();
}
Vex.Flow.Test.TabTie.setupContext = function(options, x, y) {
var ctx = options.contextBuilder(options.canvas_sel, x || 350, y || 160);
ctx.fillStyle = "#221"; ctx.strokeStyle = "#221";
ctx.setFont("Arial", Vex.Flow.Test.Font.size, "");
var stave = new Vex.Flow.TabStave(10, 10, x || 350).addTabGlyph().
setContext(ctx).draw();
return {context: ctx, stave: stave};
}
Vex.Flow.Test.TabTie.drawTie = function(notes, indices, options, text) {
var c = Vex.Flow.Test.TabTie.setupContext(options);
Vex.Flow.Test.TabTie.tieNotes(notes, indices, c.stave, c.context, text);
}
Vex.Flow.Test.TabTie.simple = function(options, contextBuilder) {
options.contextBuilder = contextBuilder;
function newNote(tab_struct) { return new Vex.Flow.TabNote(tab_struct); }
Vex.Flow.Test.TabTie.drawTie([
newNote({ positions: [{str:4, fret:4}], duration: "h"}),
newNote({ positions: [{str:4, fret:6}], duration: "h"})
], [0], options);
ok(true, "Simple Test");
}
Vex.Flow.Test.TabTie.tap = function(options, contextBuilder) {
options.contextBuilder = contextBuilder;
function newNote(tab_struct) { return new Vex.Flow.TabNote(tab_struct); }
Vex.Flow.Test.TabTie.drawTie([
newNote({ positions: [{str:4, fret:12}], duration: "h"}).
addModifier(new Vex.Flow.Annotation("T"), 0),
newNote({ positions: [{str:4, fret:10}], duration: "h"})
], [0], options, "P");
ok(true, "Tapping Test");
}
Vex.Flow.Test.TabTie.multiTest = function(options, factory) {
var c = Vex.Flow.Test.TabTie.setupContext(options, 440, 140);
function newNote(tab_struct) { return new Vex.Flow.TabNote(tab_struct); }
var notes = [
newNote({ positions: [{str:4, fret:4}], duration: "8"}),
newNote({ positions: [{str:4, fret:4}], duration: "8"}),
newNote({ positions: [{str:4, fret:4}, {str:5, fret:4}], duration: "8"}),
newNote({ positions: [{str:4, fret:6}, {str:5, fret:6}], duration: "8"}),
newNote({ positions: [{str:2, fret:14}], duration: "8"}),
newNote({ positions: [{str:2, fret:16}], duration: "8"}),
newNote({ positions: [{str:2, fret:14}, {str:3, fret:14}], duration: "8"}),
newNote({ positions: [{str:2, fret:16}, {str:3, fret:16}], duration: "8"})
];
var voice = new Vex.Flow.Voice(Vex.Flow.Test.TIME4_4).addTickables(notes);
var formatter = new Vex.Flow.Formatter().joinVoices([voice]).
format([voice], 300);
voice.draw(c.context, c.stave);
factory({
first_note: notes[0],
last_note: notes[1],
first_indices: [0],
last_indices: [0],
}).setContext(c.context).draw();
ok(true, "Single note");
factory({
first_note: notes[2],
last_note: notes[3],
first_indices: [0, 1],
last_indices: [0, 1],
}).setContext(c.context).draw();
ok(true, "Chord");
factory({
first_note: notes[4],
last_note: notes[5],
first_indices: [0],
last_indices: [0],
}).setContext(c.context).draw();
ok(true, "Single note high-fret");
factory({
first_note: notes[6],
last_note: notes[7],
first_indices: [0, 1],
last_indices: [0, 1],
}).setContext(c.context).draw();
ok(true, "Chord high-fret");
}
Vex.Flow.Test.TabTie.simpleHammeron = function(options, contextBuilder) {
options.contextBuilder = contextBuilder;
Vex.Flow.Test.TabTie.multiTest(options, Vex.Flow.TabTie.createHammeron);
}
Vex.Flow.Test.TabTie.simplePulloff = function(options, contextBuilder) {
options.contextBuilder = contextBuilder;
Vex.Flow.Test.TabTie.multiTest(options, Vex.Flow.TabTie.createPulloff);
}
Vex.Flow.Test.TabTie.continuous = function(options, contextBuilder) {
options.contextBuilder = contextBuilder;
var c = Vex.Flow.Test.TabTie.setupContext(options, 440, 140);
function newNote(tab_struct) { return new Vex.Flow.TabNote(tab_struct); }
var notes = [
newNote({ positions: [{str:4, fret:4}], duration: "q"}),
newNote({ positions: [{str:4, fret:5}], duration: "q"}),
newNote({ positions: [{str:4, fret:6}], duration: "h"})
];
var voice = new Vex.Flow.Voice(Vex.Flow.Test.TIME4_4).addTickables(notes);
var formatter = new Vex.Flow.Formatter().joinVoices([voice]).
format([voice], 300);
voice.draw(c.context, c.stave);
Vex.Flow.TabTie.createHammeron({
first_note: notes[0],
last_note: notes[1],
first_indices: [0],
last_indices: [0],
}).setContext(c.context).draw();
Vex.Flow.TabTie.createPulloff({
first_note: notes[1],
last_note: notes[2],
first_indices: [0],
last_indices: [0],
}).setContext(c.context).draw();
ok(true, "Continuous Hammeron");
}
|
/**
* Converts `map` to its key-value pairs.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the key-value pairs.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
export default mapToArray;
|
var inst = require("../index").getInstance();
module.exports = inst.use("file-html5");
|
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_precision) {
var v = opt_precision;
if (undefined === v) {
v = Math.min(getDecimals(n), 3);
}
var base = Math.pow(10, v);
var f = ((n * base) | 0) % base;
return {v: v, f: f};
}
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"
],
"DAY": [
"\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5",
"\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5",
"\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5",
"\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5",
"\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5",
"\u062c\u06c8\u0645\u06d5",
"\u0634\u06d5\u0646\u0628\u06d5"
],
"ERANAMES": [
"\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5\u062f\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
"\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5"
],
"ERAS": [
"\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5\u062f\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
"\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5"
],
"FIRSTDAYOFWEEK": 6,
"MONTH": [
"\u064a\u0627\u0646\u06cb\u0627\u0631",
"\u0641\u06d0\u06cb\u0631\u0627\u0644",
"\u0645\u0627\u0631\u062a",
"\u0626\u0627\u067e\u0631\u06d0\u0644",
"\u0645\u0627\u064a",
"\u0626\u0649\u064a\u06c7\u0646",
"\u0626\u0649\u064a\u06c7\u0644",
"\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a",
"\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631",
"\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631",
"\u0628\u0648\u064a\u0627\u0628\u0649\u0631",
"\u062f\u06d0\u0643\u0627\u0628\u0649\u0631"
],
"SHORTDAY": [
"\u064a\u06d5",
"\u062f\u06c8",
"\u0633\u06d5",
"\u0686\u0627",
"\u067e\u06d5",
"\u0686\u06c8",
"\u0634\u06d5"
],
"SHORTMONTH": [
"\u064a\u0627\u0646\u06cb\u0627\u0631",
"\u0641\u06d0\u06cb\u0631\u0627\u0644",
"\u0645\u0627\u0631\u062a",
"\u0626\u0627\u067e\u0631\u06d0\u0644",
"\u0645\u0627\u064a",
"\u0626\u0649\u064a\u06c7\u0646",
"\u0626\u0649\u064a\u06c7\u0644",
"\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a",
"\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631",
"\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631",
"\u0646\u0648\u064a\u0627\u0628\u0649\u0631",
"\u062f\u06d0\u0643\u0627\u0628\u0649\u0631"
],
"WEEKENDRANGE": [
5,
6
],
"fullDate": "EEEE\u060c MMMM d\u060c y",
"longDate": "MMMM d\u060c y",
"medium": "MMM d\u060c y h:mm:ss a",
"mediumDate": "MMM d\u060c y",
"mediumTime": "h:mm:ss a",
"short": "M/d/yy h:mm a",
"shortDate": "M/d/yy",
"shortTime": "h:mm a"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "\u00a5",
"DECIMAL_SEP": ".",
"GROUP_SEP": ",",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "-\u00a4",
"negSuf": "",
"posPre": "\u00a4",
"posSuf": ""
}
]
},
"id": "ug-arab-cn",
"pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.