code stringlengths 2 1.05M |
|---|
import * as model from "./model";
import { getTestRun } from "../testRun/redux";
import { handleActions } from "redux-actions";
// Actions
const PREFIX = "STEP_DEFINITIONS";
const GET_STEP_DEFINITIONS = `${PREFIX}/GET_STEP_DEFINITIONS`;
const GET_STEP_DEFINITIONS_FULFILLED = `${GET_STEP_DEFINITIONS}_FULFILLED`;
// Ac... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><path d="M9 11h3.63L9 15.2V17h6v-2h-3.63L15 10.8V9H9v2zM16.0564 3.3465l1.2812-1.5358 4.6074 3.8436-1.2812 1.5358zM3.3367 7.1896L2.0555 5.6538l4.6074-3.84... |
const scope = {};
const utils = require('./utils');
scope.defaultOptions = require('./defaultOptions');
scope.events = require('./utils/events');
scope.signals = new (require('./utils/Signals'));
utils.extend(scope, require('./utils/window'));
utils.extend(scope, require('./utils/domObjects'));
s... |
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M4 15.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V5c0-3.5-3.58-4-8-4s-8 .5-8 4v10.5zm8 1.5c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
// Nitrogen Compatibility Layer
function querySourceRaw(Id) {
var val, el = document.getElementById(Id);
if (!el) return "";
switch (el.tagName) {
case 'FIELDSET': val = document.querySelector('#' + Id + ' :checked');
val = val ? val.value : ""; break;
case 'INPUT':... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime")... |
import UserType from 'kolibri.utils.UserType';
/**
* Vuex State Mappers
*
* The methods below help map data from
* the API to state in the Vuex store
*/
export function _userState(facilityUser) {
return {
id: facilityUser.id,
facility_id: facilityUser.facility,
username: facilityUser.username,
... |
/* @flow */
export default function noop(): void {
return undefined
}
|
/**
* @version: 1.2
* @author: Dan Grossman http://www.dangrossman.info/
* @date: 2013-07-25
* @copyright: Copyright (c) 2012-2013 Dan Grossman. All rights reserved.
* @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0
* @website: http://www.improvely.com/
*/
!function (... |
/* jshint node: true */
'use strict';
module.exports = {
name: 'yebo-ember-storefront',
included: function(app) {
this._super.included(app);
// Nested Addons don't contribute to the Host Application filestructure.
// To ensure the initializers from core and checkouts are run, we include
// them as... |
describe('User signout', function() {
it('Perform signout', function() {
// Click dropdown button
element(by.id('profile_dropdown'))
.element(by.className('dropdown')).click();
// Click signout
element(by.className('dropdown-menu'))
.element(by.linkText('Signout')).click();
});
}); |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z" />
, 'FontDownload');
|
var Annotation = (function Annotation() {
var Annotation = {
annotator: null,
// Range that we got from the current selection
_selectedRange: null,
range: {
startContainerXPath: null,
endContainerXPath: null,
parentContainerXPath: null,
... |
module.exports={A:{A:{"2":"H D G E A B EB"},B:{"2":"C p x J L N I"},C:{"1":"1 2 3 4 5 6 8 9 g h i j k l m n o M q r s t u v w y","2":"0 YB BB F K H D G E A B C p x J L N I O P Q R S T U V W X Y Z b c d e f WB QB"},D:{"1":"FB a GB HB IB","2":"0 1 2 3 4 F K H D G E A B C p x J L N I O P Q R S T U V W X Y Z b c d e f g h ... |
;
(function() {
ace.require(["ace/snippets/hjson"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})(); |
/*
* DomUtils
* Visit http://createjs.com/ for documentation, updates and examples.
*
*
* Copyright (c) 2012 gskinner.com, inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software with... |
var assert = require('assert');
var PMysql = require('lib/PMysql');
describe('PMysql (constructor)', function() {
it('should set the config', function() {
var pMysql = new PMysql(null);
assert.strictEqual(pMysql.config, null);
var pMysql = new PMysql(7);
assert.strictEqual(pMysql.config, 7);
});
... |
/*
* Jsgauge 0.4.4
* http://code.google.com/p/jsgauge/
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*/
/*jslint browser: true */
/**
* Creates a new Gauge
* @param {DOM Object} canvas The gauge will be created inside of this canvas element
* @param {Object... |
export * from './table';
export * from './bag'; |
define({
"transparencyLabel": "Transparence",
"outline": "Contour",
"fill": "Remplissage (La couleur s’applique uniquement lorsque le style est uni)",
"style": "Style",
"mandatoryLabel": "Distance d’évacuation obligatoire",
"mandatoryButtonLabel": "Configurer les paramètres de distance d’évacuation obligato... |
define("bui-cookie/1.1.0/cookie",[],function(e,n,t){function o(e){return"string"==typeof e&&""!==e}var i=document,r=864e5,c=encodeURIComponent,u=decodeURIComponent,a={get:function(e){var n,t;return o(e)&&(t=String(i.cookie).match(new RegExp("(?:^| )"+e+"(?:(?:=([^;]*))|;|$)")))&&(n=t[1]?u(t[1]):""),n},set:function(e,n,... |
import React, { PropTypes } from 'react';
import { timeAgo } from '../../utils/calendar';
import styles from './styles.css';
const shortDate = date => date.toISOString().substr(2, 8);
const reverseDate = date => date.split('-').reverse().join('-');
const shortDateReversed = date => reverseDate(shortDate(date));
cons... |
var page_is_visible = 1;
var TARGET_THUMB_GRAPH_WIDTH = 500; // thumb charts width will range from 0.5 to 1.5 of that
var MINIMUM_THUMB_GRAPH_WIDTH = 400; // thumb chart will generally try to be wider than that
var TARGET_THUMB_GRAPH_HEIGHT = 160; // the height of the thumb charts
var TARGET_GROUP_GRAPH_HEIGHT = 160;... |
// Main type inference engine
// Walks an AST, building up a graph of abstract values and contraints
// that cause types to flow from one node to another. Also defines a
// number of utilities for accessing ASTs and scopes.
// Analysis is done in a context, which is tracked by the dynamically
// bound cx variable. Us... |
/**
* Promise类
*/
function Promise() {
this.status = 'unfulfilled'; //fulfilled|failed
this.fulfilledHandlers = [];
this.errorHandlers = [];
this.reason = '';
}
Promise.prototype = {
constructor: Promise,
reject: function(arg) {
if (this.status !== 'unfulfilled') {
... |
var path = require('path');
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var excludeGitignore = require('gulp-exclude-gitignore');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var nsp = require('gulp-nsp');
var plumber = require('gulp-plumber');
var coveralls = require... |
function fn () {
console.log('main fn');
}
export default fn;
|
/**
* 公式对象,表达式容器
*/
define( function ( require ) {
var kity = require( 'kity' ),
GTYPE = require( "def/gtype" ),
FontManager = require( "font/manager" ),
FontInstaller = require( "font/installer" ),
DEFAULT_OPTIONS = {
fontsize: 50,
autoresize: true,
... |
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "Unnamed: 0": 0, "Incident Number": 82810175, "Date": "09\/30\/2008", "Time": "06:32 PM", "Police District": 5.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": ... |
/*
0xor1 http://github.com/0xor1
*/
(function () {
function app() {
var threePanel = new UIControls.ThreePanel(document.getElementById("threeViewport"))
, gameBoard = new Sudoku.GameBoard(3)
, assistant = new Sudoku.Assistant(gameBoard)
, gameBoard3D = new Sudoku.Ga... |
/**
* ============================================================
* Español
* ============================================================
*
* Translators:
*
* Hyuchia <diego@hyuchia.com>
*/
export default {
'AdvanceHelp': 'Para avanzar en el juego, presiona espacio o haz click',
'AllowPlayback': 'Click her... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime")... |
/**
* Require the given path.
*
* @param {String} path
* @return {Object} exports
* @api public
*/
function require(path, parent, orig) {
var resolved = require.resolve(path);
// lookup failed
if (null == resolved) {
orig = orig || path;
parent = parent || 'root';
var err = new Error('Failed ... |
var fs = require("fs");
var readline = require('readline');
var parseCodebook = require("./codebook");
// load bucket definitions
bucket_definitions = {};
fs.readdirSync(__dirname + "/../buckets/").forEach(function(d) {
var buckets = require(__dirname + "/../buckets/" + d);
Object.keys(buckets).forEach(function(buc... |
'use strict'
module.exports = {
create,
lookup,
add,
print,
keys
}
/**
* create new AVL tree node
* @returns {{key: null, value: null, height: number, left: null, right: null}}
*/
function create(key, value) {
if (!Buffer.isBuffer(key)) {
throw new TypeError('expected buffer')
}
return {
k... |
'use strict';
var should = require('should'),
request = require('supertest'),
app = require('../../server'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Volunteer = mongoose.model('Volunteer'),
agent = request.agent(app);
/**
* Globals
*/
var credentials, user, volunteer;
/**
* Volunteer ... |
version https://git-lfs.github.com/spec/v1
oid sha256:a03d3c78698a5ed09d5699c62d36ee9cbfb4263225fbe4a0e9d0a1ae179161f2
size 11551
|
module.exports = require("npm:once@1.3.3/once.js"); |
/* @flow */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { EditorState, convertToRaw, ContentState, Modifier } from 'draft-js';
import draftToHtml from 'draftjs-to-html';
import htmlToDraft from 'html-to-draftjs';
import { Editor } from 'react-draft-wysiwyg';
import Codemirror f... |
import CalendarLocale from 'rc-calendar/lib/locale/et_EE';
import TimePickerLocale from '../../time-picker/locale/et_EE';
// 统一合并为完整的 Locale
const locale = {
lang: Object.assign({ placeholder: 'Vali kuupäev', rangePlaceholder: ['Algus kuupäev', 'Lõpu kuupäev'] }, CalendarLocale),
timePickerLocale: Object.assign... |
export const MARKDOWN_CHANGED = 'MARKDOWN_CHANGED';
export const ENABLE_SCROLL_CHANGED = 'ENABLE_SCROLL_CHANGED';
export const RESET = 'RESET';
export const TOGGLE_SCROLLING = 'TOGGLE_SCROLLING';
|
var _div, _p;
(function () {
var _div2;
const AppItem = () => {
return _div || (_div = <div>child</div>);
};
class App extends React.Component {
render() {
return _div2 || (_div2 = <div>
{_p || (_p = <p>Parent</p>)}
<AppItem />
</div>);
}
}
});
|
// ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
var factory = require('../../../src/express/tables/middlewareFactory'),
executeOperation = req... |
#!/usr/bin/env node
var app = require("commander");
var getLists = require("./lib/get-lists");
var auth = require("./lib/auth");
app.description("List your lists").parse(process.argv);
function main() {
getLists(function(err, data) {
if (err) process.exit(1);
data.forEach(function(val, index, array) {
... |
/**
* Created by paul on 4/23/15.
*/
'use strict';
Meteor.publish('servers', function () {
var user = Meteor.users.findOne({_id: this.userId},{fields: {isAdmin: 1}});
if (!user || !user.isAdmin) {
return this.ready();
}
return Collections.Servers.find({});
});
|
import path from 'path'
import { CucumberAdapter } from '../lib/adapter'
const conf = {
cucumberOpts: {
timeout: 15000,
require: [path.join(__dirname, '/fixtures/retry-step-definition.js')]
}
}
const feature = ['./test/fixtures/retry.feature']
const NOOP = () => {}
const WebdriverIO = class {... |
var config = require("../config/config")
, Sequelize = require("../../index")
, sequelize = new Sequelize(config.mysql.database, config.mysql.username, config.mysql.password, { pool: config.mysql.pool, logging: false, host: config.mysql.host, port: config.mysql.port })
, Helpers = new (require("../config/hel... |
if (Meteor.isClient) {
Template.samlDemo.events({
'click .saml-login': function(event, template){
event.preventDefault();
var provider = $(event.target).data('provider');
Meteor.loginWithSaml({
provider:provider
}, function(error, result){
//handle errors and result
});
... |
import Ember from 'ember';
export default Ember.Mixin.create({
classNameBindings:['hasFocus'],
hasFocus: false,
focusTarget: null,
focusIn(e){
if(this.get('focusTarget')){
if(!this.get('focusTraget.hasFocus')){
this.set('focusTraget.hasFocus', true);
}
} else {
if(!this.get... |
/* globals describe, it, expect, beforeEach*/
import ParsersDicom from '../../src/parsers/parsers.dicom';
import ParsersNifti from '../../src/parsers/parsers.nifti';
let dicomDataset = {
format: 'dicom',
url: '/base/data/dicom/adi_slice.dcm',
parser: ParsersDicom,
};
let niftiDataset = {
format: 'nif... |
/* eslint-disable camelcase */
const { setLocalNav } = require('../../middleware')
const { isItaTierDAccount } = require('../../../lib/is-tier-type-company')
const { LOCAL_NAV } = require('../constants')
function setCompaniesLocalNav(req, res, next) {
const { company } = res.locals
const isCoreTeamCompany =
!i... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
chalk = require('chalk'),
glob = require('glob'),
fs = require('fs'),
path = require('path');
/**
* Get files by glob patterns
*/
var getGlobbedPaths = function (globPatterns, excludes) {
// URL paths regex
var urlRegex = new RegEx... |
var pull = require('pull-level')
var toStream = require('pull-stream-to-stream')
var liveStream = module.exports = function (db, opts) {
var ts
opts = opts || {}
opts.tail = opts.tail !== false
if(opts.old === false)
return toStream(null, pull.live(db, opts))
opts.onSync = function () {
ts.emit('syn... |
//>>built
define({blockquote:"Blokksitat"}); |
/*!
* https://github.com/gilmoreorless/css-shorthand-properties
* MIT Licensed: http://gilmoreorless.mit-license.org/
*/
(function (exports) {
/**
* Data collated from multiple W3C specs: http://www.w3.org/Style/CSS/current-work
* Only specs that are Candidate Recommendations or better are counted, wit... |
var SingleObserver = (function(__super__) {
inherits(SingleObserver, __super__);
function SingleObserver(o, obj, s) {
this._o = o;
this._obj = obj;
this._s = s;
this._i = 0;
this._hv = false;
this._v = null;
__super__.call(this);
}
SingleObserver.prototype.ne... |
define(['Chance', 'mocha', 'chai', 'underscore'], function (Chance, mocha, chai, _) {
var expect = chai.expect;
describe("Dice", function () {
var die, dice, chance = new Chance();
it("returns a properly bounded d4", function () {
_(1000).times(function () {
die = c... |
var game = new PhaserNano.Game(800, 600, 'canvas', '', { preload: preload, create: create, update: update, render: render });
function preload () {
game.load.path = 'assets/';
game.load.image('sky2');
game.load.atlas('atlas_hash_trim');
}
var layer;
function create() {
game.add.sprite(0, 0, 'sky2... |
// [VexFlow](http://vexflow.com) - Copyright (c) Mohit Muthanna 2010.
//
// ## Description
// Implements time signatures glyphs for staffs
// See tables.js for the internal time signatures
// representation
import { Vex } from './vex';
import { Glyph } from './glyph';
import { StaveModifier } from './stavemodifier';
... |
$(document).ready(function(){
var name = $('#name');
if (name.length > 0){
$('#whoareyou').submit(function(e){
if ($.trim(name.val()).length < 1) {
e.preventDefault();
$('div.control-group').addClass('error');
$('<div class="alert alert-error">You must enter in your name.</div>').... |
var express = require('express');
var router = express.Router();
var mongoose = require('mongoose');
/* GET home page. */
router.get('/', function(req, res, next) {
// TODO: set this from database value
res.render('index', { title: 'Broadsword' });
});
module.exports = router;
|
'use strict';
describe('Service: authService', function () {
// load the service's module
beforeEach(module('tbsApp'));
// instantiate service
var authService;
beforeEach(inject(function (_authService_) {
authService = _authService_;
}));
it('should do something', function () {
expect(!!authSe... |
import './Button';
|
import { get, set } from "@ember/object";
function factory( fn ) {
/**
* @param {Enumerable} enumerable
* @param {...*} args
* @returns {Array}
*/
return function( enumerable, ...args ) {
const meta = get( enumerable, "meta" );
enumerable = enumerable[ fn ]( ...args );
if ( meta ) {
set( enumerab... |
import less from 'less/lib/less'
export function addStyleSheet(str) {
less().render(str, (e, output) => {
if(e){
utils.exception.error(e)
return
}
var s = document.querySelector('#mk-meta-design-dynamic-style')
if (s)
s.remove()
var head... |
(function() {
'use strict';
describe('user.client.controller.settings.social.js', function () {
var $scope,
$rootScope,
SocialAccountsController,
Authentication,
$httpBackend;
beforeEach(module('users'));
beforeEach(inject(function(_$rootScope_, $controller, _Authentication_,... |
function reportError(msg) {
// Show the error in the form:
$('#payment-errors').text(msg).addClass('error');
// Re-enable the submit button:
$('#submitBtn').prop('disabled', false);
return false;
}
$(document).ready(function() {
// Watch for a form submission:
$("#payment-form").s... |
//#region Copyright, Version, and Description
/*
* Copyright 2015 IdeaBlade, Inc. All Rights Reserved.
* Use, reproduction, distribution, and modification of this code is subject to the terms and
* conditions of the IdeaBlade Breeze license, available at http://www.breezejs.com/license
*
* Author: Ward Bell
* V... |
// QClient.js
// ==========
// Main module exported from this library.
// Require our dependencies
var https = require('https'),
crypto = require('crypto');
// QClient
// -------
// The main function exposed to your code.
// QClient will take your client ID and token
// and set up subsequent API calls.
//
// ... |
/**
* Imports
*/
import test from 'tape'
import PicturePasswordModal from '.'
/**
* <Picture Password Modal/> tests
*/
test('<PicturePasswordModal/> should work', t => {
})
|
var Webpack = require('webpack'),
path = require('path');
var eslintrcPath = path.resolve(__dirname, '.eslintrc'),
nodeModulesPath = path.resolve(__dirname, 'node_modules'),
buildPath = path.resolve(__dirname, 'build'),
mainPath = path.resolve(__dirname, 'src', 'app.js');
var config = {
devtool: '... |
'use strict';
var _ = require('underscore');
var Hoard = require('./backbone.hoard');
var mergeOptions = ['expires', 'timeToLive'];
// A Policy determines key generation and cache eviction
var Policy = function (options) {
_.extend(this, _.pick(options || {}, mergeOptions));
this.initialize.apply(this, arguments... |
// Import libraries for making a component
import React from 'react';
import {
StyleSheet,
View,
} from 'react-native';
// Make a component
const CardSection = props => (
<View style={styles.containerStyle}>
{props.children}
</View>
);
// ========================================================
// PropTyp... |
var dotnet = require('electron-dotnet');
//var hello = dotnet.func("./src/GracefulLoad/bin/Debug/GracefulLoad.dll");
var hello = dotnet.func("./src/GracefulLoad/GracefulLoad.cs");
//Make method externaly visible this will be referenced in the renderer.js file
exports.sayHello = arg => {
hello('GracefulLoad', functio... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... |
import rp from 'request-promise'
// import cheerio from 'cheerio'
import util from 'util'
import _ from "lodash"
import helpers from "../../helpers"
let steam = {
/**
* get - description
*
* @param {type} id description
* @return {type} description
*/
get: function(id) {
... |
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _extends from "@babel/runtime/helpers/esm/extends";
import * as React from 'react';
import PropTypes from 'prop-types';
import { refType } from '@mat... |
module.exports={title:'Kickstarter',slug:'kickstarter',svg:'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Kickstarter icon</title><path d="M9.604 8.18l4.4-6.38C14.838.6 15.91 0 17.231 0c1.072 0 2.002.381 2.789 1.144.783.765 1.176 1.675 1.176 2.738 0 .784-.207 1.479-.624 2.079l-3.967 5.76... |
var jwt = require('express-jwt');
module.exports.authenticate = jwt({
secret: new Buffer(process.env.AUTH0_CLIENT_SECRET, 'base64'),
audience: process.env.AUTH0_CLIENT_ID
});
module.exports.authenticateAdmin = function(req, res, next) {
if (req.user && req.user.is_admin) {
next();
} else {
var err = n... |
import browserTools from 'testcafe-browser-tools';
import { killBrowserProcess } from '../../../../../utils/process';
import BrowserStarter from '../../../utils/browser-starter';
import { buildChromeArgs } from './build-chrome-args';
import remoteChrome from 'chrome-remote-interface';
import Timer from '../../../../../... |
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'image2', 'nl', {
alt: 'Alternatieve tekst',
btnUpload: 'Naar server verzenden',
captioned: 'Afbeelding met onderschrift',
infoTab: 'Informatie af... |
'use strict';
import utils from './utils';
import asEnumerable from './asEnumerable';
export default function (source, selector) {
if (this !== undefined && this !== null && arguments.length < 2 && (!source || utils.isFunc(source))) {
selector = source;
source = this;
}
if (!utils.isGenerator(source)) ... |
/**
@module ember-metal
*/
var ArrayPrototype = Array.prototype;
// Testing this is not ideal, but we want to use native functions
// if available, but not to use versions created by libraries like Prototype
var isNativeFunc = function(func) {
// This should probably work in all browsers likely to have ES5 array me... |
/**
* Create a new ObjectCallProxy.
*
* @class
*/
function ObjectCallProxy (source) {
this.source = source;
this.attached = {};
this.pending = [];
}
/**
* Restore all of the attached methods.
*
* @private
*/
ObjectCallProxy.prototype._restore = function () {
for (var name in this.attached) {
this.s... |
var ClassExpr = class {
m() {
return ClassExpr;
}
}
var TempClass = ClassExpr;
ClassExpr = 42;
expect(42).toBe(new TempClass().m());
expect(TempClass.name).toBe('');
//////////////////////////////////////////////////////////////////////////////
var ClassExpr2 = class ClassExprInner {
m() {
return Cla... |
"use strict";
if (typeof (JSIL) === "undefined")
throw new Error("JSIL.js must be loaded first");
if (typeof(JSIL.SuppressInterfaceWarnings) === "undefined")
JSIL.SuppressInterfaceWarnings = true;
JSIL.ReadOnlyPropertyWriteWarnings = false;
if (typeof(JSIL.ThrowOnUnimplementedExternals) === "undefined")
JSIL.... |
Ember.mixin(Array.prototype, {
sum: function() {
return this.reduce(function(sum, x) { return sum+x; }, 0);
},
isEqual: function(ary) {
if (!ary) return false ;
if (ary == this) return true;
var loc = ary.get('length') ;
if (loc != this.get('length')) return false ;... |
import React from "react";
import { Link } from "react-router-dom";
import { Sticky, StickyContainer } from "../src/";
export class Navbar extends React.Component {
render() {
return (
<div className="navbar">
<ul>
<li className="nav-link">
<Link to="/basic">Basic</Link>
... |
buildEmailTemplate = function (htmlContent) {
var juice = Meteor.require('juice');
var emailProperties = {
headerColor: getSetting('headerColor'),
buttonColor: getSetting('buttonColor'),
siteName: getSetting('title'),
tagline: getSetting('tagline'),
siteUrl: getSiteUrl(),
body: htmlContent... |
new Test.Unit.Runner({
testNumberTween: function(){ with(this) {
assertEqual(0, (0).tween(1, 0));
assertEqual(.5, (0).tween(1, .5));
assertEqual(1, (0).tween(1, 1));
assertEqual(25, (20).tween(30, .5));
assertEqual(50, (100).tween(0, .5));
assertEqual(33.33, (100).tween(0, 2/3).toF... |
if (typeof module === "object" && typeof require === "function") {
var assert = require("assert");
var buster = {
util: require("buster-util"),
assertions: require("../lib/buster-assertions")
};
}
(function () {
var create = function (obj) {
function F() {}
F.prototype ... |
angular.module('app.EventFactory', [])
.factory('EventFactory', eventFactory);
function eventFactory($http, $rootScope, apiUrl) {
var services = {};
services.acceptEvent = function(eventId, userId, username, acceptedLat, acceptedLong){
return $http({
method: 'POST',
url: apiUrl + '/acceptEvent/' +... |
import $ from 'jquery';
require('./style/main.scss');
import * as utils from './../components/utils/utils.js';
import bootstrap from './bootstrap.js';
require('./../../node_modules/jquery-ui-datepicker-with-i18n/ui/i18n/jquery.ui.datepicker-ar.js');
require('./../../node_modules/jquery-ui-datepicker-with-i18n/ui/i18n/j... |
"use strict";
const expect = require('chai').expect;
const runner = require('../runner');
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');
const exec = require('child_process').exec;
const prewarm = require('../../lib/utils/when-prewarmed').setupMocha;
describe('kotlin-runner',... |
//= require vendor
//= require app
//= require_tree ./lib
//= require_tree ./app
|
import projection from '../../common/view-models/shopping-list.projection'
import {
SHOPPING_LIST_CREATED,
SHOPPING_LIST_RENAMED,
SHOPPING_LIST_REMOVED,
SHOPPING_ITEM_CREATED,
SHOPPING_ITEM_TOGGLED,
SHOPPING_ITEM_REMOVED,
} from '../../common/event-types'
describe('view-models', () => {
describe('Shopping... |
define(['annotate', 'is-js'], function(annotate, is) {
return annotate('log', 'Returns the natural logarithm (base E) of a number')
.on(is.number, Math.log);
});
|
/*!
* jquery.customSelect() - v0.5.1
* http://adam.co/lab/jquery/customselect/
* 2014-03-19
*
* Copyright 2013 Adam Coulombe
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @license http://www.gnu.org/licenses/gpl.html GPL2 License
*/
(function ($) {
'use strict';
... |
/*
* Copyright (c) 2016, Globo.com (https://github.com/globocom)
*
* License: MIT
*/
import image from "./image/plugin";
import video from "./video/plugin";
export default [
image,
video
];
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.