code stringlengths 2 1.05M |
|---|
angular.module('leukemiapp').config(config);
function config($translateProvider) {
$translateProvider.translations('en', {
JANUARY: 'January',
FEBRUARY: 'February',
MARCH: 'March',
APRIL: 'April',
MAI: 'May',
JUNE: 'June',
JULY: 'July',
AUGUST: 'Augu... |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(["sap/m/semantic/ShareMenuPage", "sap/m/semantic/SemanticConfiguration", "sap/m/semantic/SemanticPageRenderer", "sap/m/... |
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Button from './../Button';
import './MessageBox.scss';
const propTypes = {
title: PropTypes.string.isRequired,
type: PropTypes.oneOf(['error', 'success']),
showMessageBox: PropTypes.bool,
autoClosingTimeInterval: P... |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import styles from './styles.module.scss'
const TIMEOUT = 0.25
export default class Loader extends Component {
static propTypes = {
children: PropTypes.any,
}
state = {
loaded: false,
}
componentDidMount() {
TweenMax.t... |
const Palette = require('./Palette')
class Vehicle {
constructor (scene, position, maxspeed, maxforce, boxSize) {
this.scene = scene
this.position = new THREE.Vector3(position.x, position.y, 0)
this.maxspeed = maxspeed
this.maxforce = maxforce
this.velocity = new THREE.Vector3()
const vx = 0... |
/*!
* forecast.js
* Copyright (C) 2012 Eric Lippmann
* forecast.js may be freely distributed under the MIT license.
*/
/**
* Time series forecasting models.
*/
(function () {
'use strict';
var VERSION = 0.1,
// Reference to `window` in the browser, `exports`, `global` on
// the server
... |
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import AnimateSimple from './components/AnimateSimple';
import AnimateTransitionGroup from './components/AnimateTransitionGroup';
import animationClasses from './animateClasses.json';
export const getAnimationTiming = (anim) => {
switc... |
var f = function(){
var _ = NEJ.P,
_p = _('nej.p'),
_h = _('nej.h');
if (_p._$NOT_PATCH.trident1) return;
var __reg_nwrd = /<\/?[\w]+:[\w]+.*?>/gi;
/**
* 验证trident1下内容是否来自Word
* @param {String} _html 内容
* @return {Boolean} FF下内容是否来自Word
*/
var __isFrom... |
const Server = require('./server')
const PortFinder = require('portfinder')
const PACKAGE_NAME = '[Prerenderer]'
const OPTION_SCHEMA = {
staticDir: {
type: String,
required: true
},
indexPath: {
type: String,
required: false
}
}
function validateOptionsSchema (schema, options, parent) {
var... |
'use strict';
import createCustomerTpl from 'lib/views/modals/customer.create.html!text';
/**
* Customer namespace controller
* @constructor
* @property {*} fixtures - fixtures handler
* @property {Boolean} fixtures.busy - fixtures loading indicator
* @property {Function} fixtures.load - fixtures loader
*/
expo... |
var s3 = require('s3');
var fs = require('fs');
var request = require('request');
var BUCKET = process.env.S3_BUCKET;
var ACCESS_KEY = process.env.S3_ACCESS_KEY_ID;
var SECRET_KEY = process.env.S3_SECRET_ACCESS_KEY;
var REGION = process.env.S3_REGION;
module.exports = function downloadFile(fileKey, targetFileName, cal... |
(function (stampit, spoker) {
function cardValueToHTML(cardValue) {
if (cardValue === 'coffe') {
return '<img src="images/CoffeeCup.svg" alt="coffee" />';
}
var cardNumValue = +cardValue;
if (cardNumValue === 0.5) {
return '1/2';
} else if (cardNumV... |
var path = require('path');
var webpack = require('webpack');
module.exports = {
// cache: true,
// debug: true,
// devtool: 'eval',
entry: './src/scripts/app.jsx',
output: {
path: path.join(__dirname, "/js"),
filename: 'bundle.js'
},
module: {
loaders: [{
test: /.jsx?$/,
loader: 'babel-loader',
... |
'use strict';
angular.module('myApp.view1', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/forward-to', {
templateUrl: 'view1/forward-to.html',
controller: 'View1Ctrl'
});
}])
.controller('View1Ctrl', ['$scope', '$filter', 'localStorageService', 'Occasion', 'smoo... |
//
// Created by CaoTao, 2018/03/11
//
/*
* LeetCode link:
* https://leetcode.com/problems/reshape-the-matrix/description/
*/
/**
* @param {number[][]} nums
* @param {number} r
* @param {number} c
* @return {number[][]}
*/
var matrixReshape = function(nums, r, c) {
var originRows = nums.length
if (originR... |
import React from 'react';
import classnames from 'classnames';
//
import { Advanced } from 'czechidm-core';
/**
* Icon for CSV connector.
*
* @author Vít Švanda
* @author Radek Tomiška
* @since 10.7.0
*/
export default class CsvConnectorIcon extends Advanced.AbstractIcon {
renderIcon() {
const { iconSize... |
module.exports = {
extends: [
'eslint-config-airbnb-base',
],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6,
},
rules: {
// Airbnb rules overrides
'comma-dangle': ['warn', 'always-multiline'],
'no-use-before-define': ['error', 'nofunc'],
'object-curly-spacing': ['error',... |
/*
AngularJS v1.2.10
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
(function(v,k,t){'use strict';k.module("ngAnimate",["ng"]).factory("$$animateReflow",["$window","$timeout",function(k,B){var d=k.requestAnimationFrame||k.webkitRequestAnimationFrame||function(d){return B(d,10,!1)},q=k.cancelAni... |
module.exports = { prefix: 'far', iconName: 'step-backward', icon: [448, 512, [], "f048", "M76 480h24c6.6 0 12-5.4 12-12V285l219.5 187.6c20.6 17.2 52.5 2.8 52.5-24.6V64c0-27.4-31.9-41.8-52.5-24.6L112 228.1V44c0-6.6-5.4-12-12-12H76c-6.6 0-12 5.4-12 12v424c0 6.6 5.4 12 12 12zM336 98.5v315.1L149.3 256.5 336 98.5z"] }; |
/**
*
*
* ConfigPage actions
*
*/
import {
GET_SETTINGS,
GET_SETTINGS_SUCCEEDED,
ON_CANCEL,
ON_CHANGE,
SET_ERRORS,
SUBMIT,
SUBMIT_ERROR,
SUBMIT_SUCCEEDED,
} from './constants';
export function getSettings(env) {
return {
type: GET_SETTINGS,
env,
};
}
export function getSettingsSuccee... |
var pubsub = require('../index');
var client = pubsub.Client({
redis: 'redis://localhost:6379/0'
});
var productChan = client.Channel('product');
productChan.sub('add', function (product) {
console.log(['sub', 'add', 'product', product]);
});
productChan.pub('add', {name: 'test product name'});
|
/**
* Created by Victor on 24-Jul-15.
*/
var data = require('./data-types')
var should = require('chai').should()
//describe('Data-Types', function () {
// it('should have exported props', function () {
// data.should.hasOwnProperty(INTEGER);
// data.should.hasOwnProperty(BINARY);
// //data... |
function loginUser(actionUrl, userName, userPassword)
{
var userNameValue = document.forms['userloginext'].elements[userName].value;
var userPasswordValue = document.forms['userloginext'].elements[userPassword].value;
// $j = jQuery.noConflict();//{foo:"bar", bar:"foo"}
$.post(actionUrl, {option:"login", userN... |
// When customizing `templateSettings`, if you don't want to define an
// interpolation, evaluation or escaping regex, we need one that is
// guaranteed not to match.
var noMatch = /(.)^/;
// Certain characters need to be escaped so that they can be put into a
// string literal.
var escapes = {
"'": "'",
... |
import Ember from 'ember';
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import fillIn from '../../helpers/fill-in';
import DS from 'ember-data';
moduleForComponent('env-var', 'Integration | Component | env-var', {
integration: true
});
test('it renders an en... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
errorHandler = require('../errors.server.controller'),
mongoose = require('mongoose'),
passport = require('passport'),
User = mongoose.model('User'),
config = require('../../../config/config'),
nodemailer = require('nodemailer'),
async = r... |
/* global require, describe, it */
'use strict';
// MODULES //
var // Expectation library:
chai = require( 'chai' ),
// Module to be tested:
reverse = require( './../lib' );
// VARIABLES //
var expect = chai.expect,
assert = chai.assert;
// TESTS //
describe( 'compute-reverse', function tests() {
it( 'sh... |
'use strict'
var tape = require('tape')
var nock = require('nock')
var cache = require('../')
var request = cache(require('request'))
tape('[Cache-Control: public] Caches response with a future Expires header', function (t) {
cache._flushCache()
nock('http://example.com')
.get('/cacheable')
.reply(200, ... |
"use strict";
const _ = require("lodash");
const Msg = require("../../models/msg");
module.exports = function (irc, network) {
const client = this;
// The following saves the channel key based on channel mode instead of
// extracting it from `/join #channel key`. This lets us not have to
// temporarily store the... |
<div>
<Skeleton variant="circle" />
<Skeleton variant="rect" />
<Skeleton classes={{ circle: 'className', rect: 'className' }} />
<Box
sx={{
'& .MuiSkeleton-circle': {
background: 'red',
},
'& .MuiSkeleton-rect': {
background: 'red',
},
'& .CustomSkeleton-circle... |
import Utils from './utils';
function log(e) {
console.log(e);
}
function logDesync(e) {
log(`DESYNC : ${JSON.stringify(e)}`);
}
function error(res, err) {
if (err.code) {
Utils.reason(res, err.code, err.text);
} else {
log(err);
Utils.reason(res, 500, 'Unknown error');
}
}
function trace(req,... |
var fs = require("fs-extra"),
path = require("path"),
cleanAddress = require("../clean_address");
module.exports = function(loader, buildLoader, options){
return new Configuration(loader, buildLoader, options);
};
function Configuration(loader, buildLoader, options){
this.loader = loader;
this.buildLoader = bu... |
var Engine = require('./view');
var util = require('./util');
var emitter = require('events').EventEmitter;
exports = module.exports = Base;
function Base() {
// empty class
}
Base.prototype = {
extend: function(props) {
return util.object.extendThis(this, props);
},
get: func... |
_.extend(Template.loginForm, {
/**
* event mapping
*/
events: {
'submit #login-form': function(event, element) {
event.preventDefault();
Template.loginForm.login(element);
},
'click a.google' : function(){
var self = this;
... |
var test = require('blue-tape');
var poll = require('../utils').poll;
test('works in normal, delayed case', function(t) {
var resolvesAt = Date.now() + 50;
return poll(function() {
if (Date.now() >= resolvesAt) {
return 'RESOLVED';
}
}, 100000000, 10).then(function(result) {
t.equal(result, '... |
// if(Posts.find().count() === 0) {
// Posts.insert({ head: "Hello World", name: "Peter Nielsen", mail: "peter@designmonkey"});
// Posts.insert({ head: "Second Post", name: "Peter Nielsen", mail: "peter@designmonkey" });
// Posts.insert({ head: "Bourbon + Neat has been added!", name: "Rasmus Hjulskov", mail: "ras... |
import * as Objects from './object';
export default Objects;
|
'use strict';
const os = require('os');
const PQueue = require('p-queue');
const clientEvents = require('../constants/client-events');
const {RUNNING} = require('../../constants/test-statuses');
const {getSuitePath} = require('../../plugin-utils').getHermioneUtils();
const createWorkers = require('../../workers/create... |
/**
* Created by Oleg Rusak on 27.06.2017.
*/
'use strict'
const graphql = require('graphql')
const typeQuery = require('../type-query/type-query')
const schema = new graphql.GraphQLSchema({ query: typeQuery })
graphql.graphql(schema, `{
judgementFine(id: "1") {
guid
number,
hearing {
guid
... |
// Domain Public by Eric Wendelin http://eriwen.com/ (2008)
// Luke Smith http://lucassmith.name/ (2008)
// Loic Dachary <loic@dachary.org> (2008)
// Johan Euphrosine <proppy@aminche.com> (2008)
// Oyvind Sean Kinsey http://kinsey.no/blog (2010)
// ... |
import * as t from "../../types";
import { types as tt } from "horchata/lib/tokenizer/types";
import { Token } from "horchata/lib/tokenizer";
import { wb, sp, fsp, tab, nl } from "../token/types";
/**
* Prints WithStatement, prints object and body.
*/
export function WithStatement(node) {
this.keyword("with");
... |
'use strict'
const Sequelize = require('sequelize')
module.exports = db => db.define('billings', {
cardNumber: {
type: Sequelize.STRING,
allowNull: false,
validation: {
isCreditCard: true
}
},
expDate: {
type: Sequelize.INTEGER,
allowNull: false
},
ccvNumber: {
type: Sequel... |
import React, { useState } from 'react'
import * as EditorMode from '../../constants/EditorMode'
import { Menu, MenuItem, Fab } from '@mui/material'
import { SwapVert } from '@mui/icons-material'
const styles = {
btn: {
position: 'fixed',
right:(theme) => theme.spacing(3),
bottom:(theme) => theme.spacing... |
// Copyright (c) 2016 - 2017 Uber Technologies, 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 without restriction, including without limitation the rights
// to use, copy, modify... |
import React from 'react';
import { render } from 'react-dom';
import { BrowserRouter as Router, Route, browserHistory } from 'react-router-dom';
import App from './components/App'
render((
<Router>
<App />
</Router>
), document.getElementById('app'));
|
'use strict'
angular.module('Index', [ 'ngRoute', 'Services' ])
.config([ '$routeProvider', function ($route) {
$route
.when('/login', { controller: 'Main', templateUrl: 'login.html' })
.when('/forget', { controller: 'Forget', templateUrl: 'forget.html' })
.when('/register', { controller: 'Regi... |
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: "traceur",
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
map: {
"angular": "github:angular/bower-angular@1.5.8",
"angular-animate": "github:angular/bower-angular-animate@1.5.7",
"angu... |
/*
* 定义动画元素事件类,判断元素事件;
* @param dom: 承载点击事件的dom, 一般是显示的canvas dom节点;
* create by Paner @2016;
*/
Animate.Event = function(dom){
this._eventCanvas = document.createElement('canvas');
this._eventCtx = this._eventCanvas.getContext('2d');
this._contain = {};
var _this = this;
//基本事件类型
var e... |
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveDict } from 'meteor/reactive-dict';
import { ReactiveVar } from 'meteor/reactive-var'
import { Session } from 'meteor/session'
import { $ } from 'meteor/jquery';
// 컬렉션.
import { Categories } from '/imports/collectio... |
/**
* @preserve Galleria v 1.2.2 2011-02-25
* http://galleria.aino.se
*
* Copyright (c) 2011, Aino
* Licensed under the MIT license.
*/
/*global jQuery, navigator, Galleria, Image */
(function( $ ) {
// some references
var undef,
window = this,
doc = window.document,
$doc = $( doc ),
// inter... |
goog.provide('ol.interaction.KeyboardPan');
goog.require('goog.asserts');
goog.require('ol');
goog.require('ol.coordinate');
goog.require('ol.events.ConditionType');
goog.require('ol.events.EventType');
goog.require('ol.events.KeyCode');
goog.require('ol.events.condition');
goog.require('ol.interaction.Interaction');
... |
/*global require*/
define(["WebSite","UI","PathUtil","Util","assert","jshint"],
function (WebSite,UI,PathUtil,Util,assert,jshint) {
var exec = (WebSite.isNW? require('child_process').exec : function (){});
function extLink(href,caption,options) {
options=options||{};
var opt=getOpt(href,... |
import chai, {expect} from 'chai';
import spies from 'chai-spies';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import AddItemButton from './AddItemButton';
chai.use(spies);
function setup({ buttonAdditionalClasses = '', children }) {
let props = {
buttonAdditionalClasses,
chi... |
import Ember from 'ember';
const {
Controller,
inject
} = Ember;
export default Controller.extend({
firebase: inject.service(),
signIn: inject.controller(),
actions: {
signOut() {
this.get('firebase').unauth();
this.set('session.whoami', null);
return this.transitionToRoute('index');
... |
/**
* Authentication Controller
*
*/
var AppController = {
home : function(req, res) {
res.view('layout');
}
};
module.exports = AppController;
|
/* jshint expr:true */
/* global describe, it */
require('chai').should();
describe('test suite', function () {
'use strict';
it('should run', function () {
true.should.be.ok;
});
});
|
/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
c... |
(function(){
var root = this;
/**
* @author Miller Medeiros http://millermedeiros.github.com/js-signals/
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Object th... |
var Books = (function() {
var $books = $( '#bk-list > li > div.bk-book' ), booksCount = $books.length;
function init() {
$books.each( function() {
var $book = $( this ),
$other = $books.not( $book ),
$parent = $book.parent(),
... |
/* */
"format cjs";
// https://github.com/isaacs/sax-js/issues/47
require(__dirname).test
( { xml : '<a href="query.svc?x=1&y=2&z=3"/>'
, expect : [
[ "attribute", { name:'HREF', value:"query.svc?x=1&y=2&z=3"} ],
[ "opentag", { name: "A", attributes: { HREF:"query.svc?x=1&y=2&z=3"}, isSelfClosing... |
import path from 'path';
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
import { dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const sharedConfig = {
mode: 'development',
externals: {
fs: 'fs',
},
resolve: {
plu... |
var parse = require('../');
process.stdin.pipe(parse(function (err, headers) {
console.log(headers);
}));
|
// Canvas Asteroids
//
// Copyright (c) 2010 Doug McInnes
//
KEY_CODES = {
32: 'space',
37: 'left',
38: 'up',
39: 'right',
40: 'down',
70: 'f',
71: 'g',
72: 'h',
77: 'm',
80: 'p'
}
KEY_STATUS = { keyDown:false };
for (code in KEY_CODES) {
KEY_STATUS[KEY_CODES[code]] = false;
}
$(window).keydown... |
import {useEffect} from 'react';
import {observable, action, autorun} from 'mobx';
import {useObservable} from 'mobx-react-lite';
import firebase from '../api/firebase';
import database from '../api/database';
import auth from './auth';
export function createDocument(model, data) {
const document = {...model, ...da... |
$(document).ready(function() {
var drakonavWidth = $('.drakonav').width();
var logoWidth = $('.nav-logo').width();
var availableWidth = $('#nav').width();
var widthCheck = (availableWidth - (logoWidth+100));
if (drakonavWidth >= widthCheck) {
$('.drakonav').remove();
$('.drakolist').remove();
$('... |
module.exports = function asyncGuard() {
var callbacks = new Map();
return {
add: function (key, cb) {
var arr = callbacks.get(key);
if (arr) {
arr.push(cb);
return false;
}
arr = [cb];
callbacks.set(key, arr);
return true;
},
run: function (key, args, onError) {
var arr = callbac... |
version https://git-lfs.github.com/spec/v1
oid sha256:676558827e13e9edf29734f78a245c31323d235e9e4a5eeb1e0a60461d4e8fba
size 34823
|
#pragma strict
// Script used to handle the scoring of the game. If a user selects a problem that
// Matches the answer, +1 score. If the score reaches 25, end the game
// Also used to contribute to the student model which answers the student beats
// Used for debugging to reset the student model
function delete_play... |
'use strict';
var commentController = angular.module('commentController',['ui.bootstrap','publicBlogController']);
commentController.controller('commentController',function(
$scope,
$http,
$stateParams,
$rootScope,
PostFactory
) {
$scope.debug = 'js/blog/public/commentController';
// $rootScope.... |
import { expand as higherOrder } from 'rxjs/operators';
export function expand(project, concurrent = Number.POSITIVE_INFINITY, scheduler = undefined) {
concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
return higherOrder(project, concurrent, scheduler)(this);
}
//# sourceMappingURL=exp... |
/**
* Normalizes the duration of a transition.
* @param {number|object} duration The value to normalize.
* @param {'hide'|'show'} type The type of transition.
* @returns {number}
*/
export default (duration, type) =>
typeof duration === 'number' || typeof duration === 'string' ? duration : duration[type]
|
// DATA //
/**
* FUNCTION: Data( data )
* Data constructor. Creates a new data instance.
*
* @constructor
* @param {array} data - input data is expected to be an array of arrays; e.g., [[[0,0],[1,1],...,[N,N]]] or [[{x:0,y:0},{x:1,y:1},...{x:N,y:N}]]. Elements in the outer array are treated as separate datasets.
* @r... |
/**
* Created by glenn on 27.02.17.
*/
const _ = require('lodash');
const Generator = require('yeoman-generator');
module.exports = class extends Generator {
constructor(args, opts) {
super(args, opts);
}
prompting() {
return this.prompt([
{
type: 'input',
name: 'moduleName',
... |
'use strict';
var path = require('path');
module.exports = function (grunt) {
// Load relevant grunt tasks
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-less-to-sass');
// Define the configuration for all the tasks
grunt.initConfig({
// Convert less CSS files to SASS (.scss) ... |
'use strict';
var localize = require('../localize');
var jsonSchemaTest = require('json-schema-test');
var Ajv = require('ajv');
var ajvKeywords = require('ajv-keywords');
var assert = require('assert');
var remoteRefs = {
'http://localhost:1234/integer.json': require('./JSON-Schema-Test-Suite/remotes/integer.json... |
'use strict';
/*
* Defining the Package
*/
var Module = require('meanio').Module;
var Students = new Module('students');
/*
* All MEAN packages require registration
* Dependency injection is used to define required modules
*/
Students.register(function(app, auth, database) {
//We enable routing. By default t... |
/* eslint-disable max-len */
import { validationResult } from 'express-validator/check'
import { matchedData } from 'express-validator/filter'
import { DokkaError, DokkaGenericError, DokkaInvalidParams, DokkaNotFound } from '../config/errors'
export default module.exports = (app) => {
const { Users, Roles } = app.db... |
/**
* Run script for Grunt, task runner
*
* The MIT License (MIT)
* Copyright (c) 2015 GochoMugo <mugo@forfuture.co.ke>
*/
import load from "load-grunt-tasks";
export default function(grunt) {
load(grunt);
grunt.initConfig({
eslint: {
all: ["src/**/*.js"],
},
tape: {
options: {
... |
(function () {
'use strict';
describe('Votes Route Tests', function () {
// Initialize global variables
var $scope,
VotesService;
// We can start by loading the main application module
beforeEach(module(ApplicationConfiguration.applicationModuleName));
// The injector ignores leading an... |
/** Contains symbol path functions for various paths required in e skin **/
/** private symbols */
var customSymbolTypes = d3.map({
/**
* SIMPLECHEMICAL : returns the circle of passed dimension
*/
'SIMPLECHEMICAL': function(shapeObj) {
//size = shapeObj.iHeight||shapeObj.iWidth;
var iHeight = shap... |
export default {
// RCP 8.5
startingPathway: 'g311111111111111c1b111cybihogjgi233ssr2eAs11111gA2211111111',
startingYear: 2016,
numYears: 10,
levers: [{
name: 'tech.manufacturing.materials'
}, {
name: 'tech.manufacturing.metals'
}, {
name: 'tech.manufacturing.chemicals'
}, {
name: 'tech.... |
var Util = require("./Util.js");
var Event = require("./Event.js");
var Request = require("./Request.js");
var urlParser = require("url");
var ORTCClient = require('ibtrealtimesjnode').IbtRealTimeSJNode;
/**
* @namespace Realtime.Messaging Provides access to the Realtime Messaging functionalities.
*/
Event.extend(th... |
"use strict";
const config = require("./config");
let similar;
/* istanbul ignore else */
if (config.PASTEC_URL) {
similar = require("pastec")({
server: config.PASTEC_URL,
});
}
// TODO(jeresig): Implement TinEye MatchEngine option
/* istanbul ignore if */
if (!similar) {
console.error("No imag... |
"use strict";
let Promise = require("bluebird");
let Context = require("../../src/context");
let ServiceBroker = require("../../src/service-broker");
let { RequestSkippedError, MaxCallLevelError } = require("../../src/errors");
const { protectReject } = require("./utils");
describe("Test Context", () => {
it("test ... |
import {objectEach, clone} from './../../helpers/object';
import {rangeEach} from './../../helpers/number';
import {align, getAlignmentClasses, getValidSelection, checkSelectionConsistency, markLabelAsSelected} from './utils';
export const ROW_ABOVE = 'row_above';
export const ROW_BELOW = 'row_below';
export const CO... |
'use strict';
(function() {
var app = angular.module('dontdawdle');
app.controller('PopupController', function(ChromeService, Helper, ChromeStorage, Blocker, $window) {
var vm = this;
var tab = {};
ChromeService.tabsPromise().then(function(data) {
tab = data;
v... |
(function (mod) {
mod(CodeMirror);
})(function (CodeMirror) {
'use strict';
var symbol_regex1 = /^(?:~|!|%|\^|\*|\+|=|:|;|,|\?|&|<|>|\|)/;
var symbol_regex2 = /^(=|\.|#|\|)/;
var open_paren_regex = /^(\(|\[)/;
var close_paren_regex = /^(\)|\])/;
var keyword_regex1 = /^(if|else|return|var|fun... |
"use strict";
var base = require("node-base"),
step = require("step"),
path = require("path"),
uuid = require("node-uuid"),
histogram = require("histogram"),
fs = require("fs");
if(process.argv.length<3)
printUsageAndExit();
var maxDifference = +process.argv[2];
if(maxDifference<0)
printUsageAndExit("maxDiff... |
/**
* Highpine client simple static web server.
*/
require('dot-env');
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
/*
* Create express app.
*/
var app = express();
app.set('env', process.env.ENV);
/*
* Setup View engine.
... |
"file 1 - line 1";
"file 1 - line 2";
"file 1 - line 3";
"file 2 - line 1";
"file 2 - line 2";
"file 3 - line 1";
//
(function() {
"file 4 - line 1";
"file 4 - line 2";
"file 4 - line 3";
"file 4 - line 4";
"file 4 - line 5";
}).call(this);
/*
//
*/
//# sourceMappingURL=file_w... |
// Require the dev-dependencies
import chai from 'chai';
import chaiHttp from 'chai-http';
import supertest from 'supertest';
import expect from 'expect';
import app from '../../../server';
import mockdata from '../mockData';
import model from '../../models/index';
const Role = model.role;
const User = model.user;
con... |
var http = require('http')
var proto = {};
proto.isExpress = true;
proto.__proto__ = http.IncomingMessage.prototype;
module.exports = proto; |
import styles from './CloseHood.css';
import React from 'react';
import { setHoodAction } from '../../actions';
import { connect } from 'react-redux';
import image from '../../images/close-hood.png';
const CloseHood = ({dispatch}) => {
return (
<img
className={styles.root}
width="1... |
import './checkbox-spec';
import './chips-spec';
import './datepicker-spec';
import './input-spec';
import './radio-spec';
import './select-spec';
import './slider-spec';
import './switch-spec';
import './textarea-spec';
|
var expect = require('chai').expect,
through = require('through2'),
ReadableStream = require('readable-stream/readable'),
multistreamMerge = require('./');
describe('multistream-merge', function() {
it('should merge 2 readable streams (buffer)', function(done) {
var stream1 = new ReadableStream();
... |
'use strict';
/**
* Ratings service used for communicating with the Rating REST endpoints.
* By default, interacts with REST endpoint 'ratings/:ratingId'
*
* @module Ratings
* @submodule Ratings-Client
* @class Ratings
* @constructor
* @param $resource {Object}
* @return {Resource} Ratings object
*/
angular.... |
import ColorTheme, {defaultPrimaryMain} from '../color-theme'
test('create default state', () => {
const colorTheme = ColorTheme({initialPrimaryMain: defaultPrimaryMain})
return colorTheme.state_.take(1).forEach((actual) => {
expect(actual).toMatchSnapshot()
})
})
test('change color', () => {
const color... |
class OperationLocation {
constructor(operationLocation) {
this.id = operationLocation.id;
this.abbrev = operationLocation.abbrev;
this.name = operationLocation.name;
this.shortName = operationLocation.short;
this.type = operationLocation.type;
this.status = operationLocation.status;
this.loc... |
/** @module authr-verify */
var async = require('async');
/**
* Verify a user's email address
* @param {Object} config - authr configuration object
* @param {String} token - token to verify
* @param {VerifyCallback} callback - execute callback after verification
*/
Verify = function(config, token, callback){
as... |
(function (window) {
var Muuri = window.Muuri;
QUnit.module('Item methods');
QUnit.test(
'getPosition: should return the instance element`s cached position in the grid',
function (assert) {
assert.expect(4);
var container = utils.createGridElements({
containerStyles: {
pos... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.