code stringlengths 2 1.05M |
|---|
"use strict";
var speedy = require ("../lib");
speedy.run ({
new: function (){
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
arr = [];
},
length: function (){
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
arr.length = 0;
}
});
/*
File: empty-array.js
Node v0.10.22
V8 v3.14.5.9
Speedy v0.1.1
Tests... |
'use strict';
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ['.tmp/scripts/', '.tmp/spec/'],
coffee: {
compileScripts: {
expand: true,
flatten: false,
cwd: 'scripts',
src... |
var utils = (function () {
function getJson(url, callback) {
var httpRequest = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState === 4 || httpRequest.readyState === 0) {
if (http... |
/**
* WYSIWYG - jQuery plugin 0.5
*
* Copyright (c) 2008-2009 Juan M Martinez
* http://plugins.jquery.com/project/jWYSIWYG
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* $Id: $
*/
jQuery(document).ready(f... |
/**
* CSS Animation utils.
*/
/**
* Using Animate.css. Sets an animation to a target and quits after animation completes.
* @see http://daneden.github.io/animate.css/
*/
Komunalne.anim.animate = function(effect,target) {
var ends = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
... |
// MainCtrl:
// Contains all $scope variables and functions for UI functionality
// Dependencies: ImagesFactory, PostsFactory, various AngularJS utils
(function() {
var MainCtrl = function ($scope, $http, PostsFactory, $filter, $location, $anchorScroll, ImagesFactory, $routeParams) {
$scope.activeView... |
'use strict';
var React = require('react');
var SvgIcon = require('../../svg-icon');
var MapsDirectionsRailway = React.createClass({
displayName: 'MapsDirectionsRailway',
render: function render() {
return React.createElement(
SvgIcon,
this.props,
React.createElement('path', { d: "M4 15.5C4... |
"use strict";
var Ember = require("ember")["default"] || require("ember");
exports["default"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
var buffer = '', stack... |
var getRenderer = require('./get_renderer'),
getPartials = require('./get_partials'),
build = require("./build"),
assert = require('assert'),
Q = require('q'),
path = require('path');
describe("documentjs/lib/generators/html/build",function(){
it("get_renderer and get_partial work",function(done){
Q.all([... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'selectall', 'fr', {
toolbar: 'Tout sélectionner'
} );
|
(function(angular) {
'use strict';
angular.module('appDirectives').directive('mapActions', function(){
return {
restrict: 'E',
replace: true,
templateUrl: 'views/directives/map-actions.html',
controller: ['$scope', 'mapService', '$mdDialog', 'amenitiesService', function ($scope, ... |
var request = require('request');
var itunes = require('../common/itunes');
var tmdb = require('../common/tmdb');
exports.getListMoviesByGenre = function (req, res, callback) {
tmdb.discoverMovie({
sort_by: 'popularity.desc',
include_adult: false,
include_video: false,
page: req.que... |
// For any third party dependencies, like jQuery, place them in the lib folder.
// Configure loading modules from the lib directory,
// except for 'app' ones, which are in a sibling
// directory.
requirejs.config({
baseUrl: 'Scripts',
paths: {
app: '../app'
}
});
// Start loading the main app fil... |
"use strict";
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 ts = require('typescript');
var rewriter_1 =... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" />
, 'HomeRounded');
|
/*
* ToolPage Messages
*
* This contains all the text for the ToolPage component.
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
header: {
id: 'app.containers.ToolPage.header',
defaultMessage: 'This is ToolPage container !',
},
addTool: {
id: 'app.containers.ToolP... |
import { useStaticQuery, graphql } from 'gatsby';
const useColorData = () => {
const { allSassVarsJson } = useStaticQuery(
graphql`
query SassColors {
allSassVarsJson {
edges {
node {
description
context {
name
value
... |
if ("geolocation" in navigator) {
/* geolocation is available */
function addMarker(coord, title, map, infoWindow) {
console.log(title)
marker = new google.maps.Marker({
position: coord,
title : title,
map: map
});
}
function calculateAndDisplayRoute(directionsService, dir... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* FabricTransfer Schema
*/
var FabricTransferSchema = new Schema({
transferNo: {
type: Number,
required: 'Please fill transferNo name'
},
jobNo: {
type: Number,
required: 'Please fil... |
const appConfig = {
aggregates: [
{
name: 'Story',
commands: 'common/aggregates/story.commands.js',
projection: 'common/aggregates/story.projection.js',
},
{
name: 'User',
commands: 'common/aggregates/user.commands.js',
projection: 'common/aggregates/user.projection.js'... |
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Route | mymaterials', function(hooks) {
setupTest(hooks);
test('it exists', function(assert) {
let route = this.owner.lookup('route:mymaterials');
assert.ok(route);
});
});
|
/**
* Fill a portion of an array with a value.
*
* @example
* const a = [1, 2, 3, 4];
* fill(a, 'foo', 1, 3);
* // => [1, 'foo', 'foo', 4]
*
* @param {Array} array The array to fill.
* @param {*} value The value to fill the array with.
* @param {number} [start=0] The index at which to start filling in values.... |
import Tooltip from './tooltip'
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.0.0-alpha.6): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
c... |
$.fn.hoverDelay = function(options) {
var defaultOptions = {
delayIn: 300,
delayOut: 300,
handlerIn: function(){},
handlerOut: function(){}
};
options = $.extend(defaultOptions, options);
return this.each(function() {
var timeoutIn, timeoutOut;
var $element = $(this);
$element.hover(
function() {... |
import { StateAndEffect } from './sideEffects';
const REPLAY_HAPPENED = Symbol('replayHappened');
export function enableEffects(applyMiddleware) {
return (...middlewares) => {
return nextStoreEnhancer => (defaultReducer, initialState) => {
// Here we will collect all actions that need to be runned after o... |
var genders = {
male: 1,
female: 2
}
exports.genders = genders; |
(function () {
'use strict';
angular
.module('vagueBook.infrastructure')
.directive('modelValidator', _directive);
_directive.$inject = [
'$parse'
];
function _directive($parse) {
// This directive lets you add custom validation conditions to a valid
// ng... |
/* eslint-disable */
import React from 'react';
import classNames from 'classnames';
// React-UI
import FormGroup from '../../src/components/layout/formGroup/formGroup.jsx';
import Textbox from '../../src/components/editors/textbox/textbox';
import TreeView from '../../src/components/data/treeView/treeView.jsx';
impor... |
import React, { useEffect, useCallback } from 'react'
import { useIntl } from 'react-intl'
import * as firebaseui from 'firebaseui'
import { getAuth } from 'firebase/auth'
let authUi = null
/*eslint-disable */
const AuthUI = ({ uiConfig }) => {
const intl = useIntl()
const locale = intl.locale
const auth = get... |
/**
* 百度好看分享
*/
define(function (require) {
// mip 组件开发支持 zepto
var $ = require('zepto');
var customElem = require('customElement').create();
function build() {
var element = this.element;
var config = getConfig();
$(element).find('#J_detail_share').click(function () {
... |
var musicBuffer = null;
var musicSourceNode = null;
var buttonElem = document.querySelector('.playMusicButton').childNodes[0];
var isPlayingMusic = false;
window.addEventListener('load', function() {
loadMusic('./music/find_your_soul.mp3');
});
function loadMusic(url) {
var request = new XMLHttpRequest();
re... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{358:function(t,e,s){"use strict";s.r(e);var a=s(0),o=Object(a.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[e("p",[this._v("This blog post was "),e("a",{attrs:{href:"h... |
var app = angular.module('nbaRoutes');
app.service('teamService', function($http, $q){
this.addNewGame = function(gameObj){
var url = "https://api.parse.com/1/classes/" + gameObj.homeTeam;
if(parseInt(gameObj.homeTeamScore) > parseInt(gameObj.opponentScore)){
gameObj.won = true;
} else {
gameObj.won ... |
$(function () { // Same as document.addEventListener("DOMContentLoaded"...
// Same as document.querySelector("#navbarToggle").addEventListener("blur",...
$("#navbarToggle").blur(function (event) {
var screenWidth = window.innerWidth;
if (screenWidth < 768) {
$("#collapsable-nav").collapse('hide');
... |
// Generated by CoffeeScript 1.7.1
(function() {
var Entity, Node, f, global, is_node, p,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = p... |
import ffcp from '../../src/ffcp';
describe('ffcp', () => {
describe('Greet function', () => {
beforeEach(() => {
spy(ffcp, 'greet');
ffcp.greet();
});
it('should have been run once', () => {
expect(ffcp.greet).to.have.been.calledOnce;
});
it('should have always returned hello... |
app.factory('AngelReservation',function($http){
var all = function() {
return $http.get('/app/api/reservation/')
}
var add = function(data) {
return $http.post('/app/api/reservation', data)
}
var update = function(data) {
return $http.put('/app/api/reservation', data)
}
return {
all: a... |
// BOOTSTRAP-UI.JS -
module.exports = (function(){
if(typeof window === 'undefined')
require('./virtualdom');
require('angular/angular');
return {
angular: window.angular
};
})(); |
var json = [
{
"": 0,
"Name": "Abbasi Suhaib",
"Amount": 200
},
{
"": 0,
"Name": "Abdelaziz Mouharir",
"Amount": 10
},
{
"": 0,
"Name": "Abdelghani Zigh.",
"Amount": 40
},
{
"": 0,
"Name": "Abdella Yisak Adem",
"Amount": 800
},
{
"": 0,
"Name": "Abdelqayoum Azizullah.",
"Amount": ... |
var blessed = require('blessed');
module.exports = {
init: function() {
var screen = blessed.screen({
autopadding: true,
smartCSR: true,
title: 'Slack'
}),
container = blessed.box({
width: '100%',
height: '100%',
... |
// This is used to bootstrap the application and initialise any UIComponents.
|
'use strict';
/**
* Module dependencies
*/
var path = require('path'),
config = require(path.resolve('./config/config'));
/**
* Stories module init function.
*/
module.exports = function (app, db) {
};
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
Ext.define('CustomChartApp', {
extend: 'Rally.app.App',
componentCls: 'app',
layout: 'fit',
config: {
defaultSettings: {
types: 'defect',
chartType: 'piechart',
aggregationField: 'State',
aggregationType: 'count',
query: ''
}
... |
(function (define) {
define('datagate/union', ['datagate/plow', 'datagate/error'], function (plow, DatagateError) {
var UnionError = DatagateError.UnionError;
return function createNewUnionGate(gates, error_message) {
if (error_message === undefined) {
error_message = 'I... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{126:function(n,t,e){},416:function(n,t,e){"use strict";var i=e(126);e.n(i).a},427:function(n,t,e){"use strict";e.r(t);var i={beforeMount:function(){e.e(96).then(e.t.bind(null,421,7)).then((function(n){n.initialize({startOnLoad:!0}),n.init("div.language-mermaid>p... |
import { LogMessage } from '../../message';
import { Console } from '../';
import Level from '../../enum/level';
describe('service/console', () => {
it('should log to console', () => {
const originalConsoleLog = console.log;
console.log = jest.fn();
const config = {
project: 'cool project',
... |
module.exports = function () {
console.log('I am an anony-moose');
};
|
/*global namespace, xiphe */
/*
* Global setting for the time when a xiphe.wait.until call stops
* searching for the given module.
*/
namespace('xiphe.wait.patience', 3000);
/*
* Global setting for if xiphe.wait.until callbacks should be
* called even if the module could not be found.
*/
namespace('xiphe.wait.co... |
alert('This works!'); |
/*
* AJAX file - this is posted to each time user makes a swipe or queue action
* It saves the action in logs and also updates the stack and queue arrays
*/
var user = require('./user');
exports.view = function(req, res){
// TODO save data - update queue and stack arrays accordingly
// Check session is valid
... |
function(doc) {
emit([doc.host, doc.schema], 1);
} |
(function() {
'use strict';
angular.module('daksportsApp')
.directive('capitalizeFirst', function($parse) {
return {
require: 'ngModel',
link: function(scope, element, attrs, modelCtrl) {
var capitalize = function(inputValue) {
... |
import React, { Component, PropTypes } from 'react';
export default class ReactForm extends Component {
static propTypes = {
styleError: PropTypes.object,
classNameError: PropTypes.string,
children: PropTypes.any,
onValidationChange: PropTypes.func,
}
static defaultProps = ... |
var debug = require("debug")("InactiveTokensEndpoint");
var async = require("neo-async");
var JSONFileLoader = require("../common/json_file_loader");
var Utils = require("../common/utils");
var InvalidPayloadError = require("../errors/invalid_payload_error");
var IntegerSchema = JSONFileLoader.loadSync("int... |
/**
* Service permettant de stocker et récupérer le garde manger
* ainsi que le profil courant de l'utilisateur
*/
angular.module('nutrionixApp.index')
.factory('localStorageService',['$localStorage', function($localStorage) {
return {
/**
* Fonction permettant de stocker le gard... |
'use strict';
angular.module('DashmoteApp', ['ngRoute', 'ngAnimate', 'DashmoteApp.filters', 'DashmoteApp.services', 'DashmoteApp.directives', 'DashmoteApp.controllers'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider
.when('/', {templateUrl: 'partials/welcome.html', controller: 'welcomeCtr... |
'use strict';
describe('Thermostat', function(){
var thermostat;
beforeEach(function(){
thermostat = new Thermostat();
});
it('starts at 20 degrees', function(){
expect(thermostat.getCurrentTemperature()).toEqual(20);
});
it('allows increase of temperature using up button', function(){
thermostat.upBut... |
// MUSICVENT V.1 //
// Copyright 2014, Mandar Shirke //
// www.quadcodes.com
// --------- INIT JS --------- //
// -- 1. HOMEPAGE -- //
// -- 2. LOGO & NAV -- //
// -- 3. FLEXSLIDER -- //
// -- 4. ALPHABETICAL SORTING LIST -- //
// -- 5. TIPSY -- //
// -- 6. SCROLL SPY -- //
// -- 7. SCROLL FUNCTION -- //
// -... |
var lib = {
letatlin: require('../')
};
/*
Assumes that you've seeded etcd like this:
curl -L http://127.0.0.1:4001/v2/keys/greetings/default -XPUT -d value="Welcome to Letatlin"
curl -L http://127.0.0.1:4001/v2/keys/mysql/documents -XPUT -d value="mysql://user:pass@host/database"
curl -L http://127.0.0.1:4001/v2/k... |
function XiaoXiaoLe(canvasId, imgspath, options, scorechange, gameendcalback, timedowncalback) {
var _this = this;
var w = 600, h = 500, boxsize = 100;
var wi = 6, hi = 5;
var classnum = 5;
wi = options.col || wi;
hi = options.row || hi;
boxsize = options.boxsize || boxsize;
... |
const dev = process.env.NODE_ENV !== 'production'
const express = require('express')
const router = express.Router()
const cookieParser = require('cookie-parser')
const bodyParser = require('body-parser')
const passport = require('./lib/passport')
const session = require('express-session')
const FileStore = require('s... |
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { get } from "lodash";
import { registerForm, unregisterForm } from "../../actions/formActions";
/**
* @function
* @param {component} FormComponent The component to connect to Redux
*/
function connectForm(FormComponent) {
FormCo... |
var express = require("express");
var app = express();
app.use(express.logger());
var port = process.env.PORT || 5000;
var Trello = require("node-trello");
var public_key = process.env.TRELLO_KEY;
var trello_token = process.env.TRELLO_TOKEN; // TODO: replace with stored auth from admin user
var t = new Trello(public_... |
import { escapeRegExp } from "lodash";
import hostedGitInfo from "hosted-git-info";
export default class GitVersionParser {
constructor(versionPrefix = "v") {
this._gitUrlPattern = new RegExp(`(.+?#${escapeRegExp(versionPrefix)})(.+)$`);
}
parseVersion(version) {
const gitInfo = hostedGitInfo.fromUrl(ve... |
var expect = require("chai").expect;
var JSON2 = require("JSON2");
var Keen = require("../../../../src/server");
var keenHelper = require("../../helpers/test-config");
var mock = require("../../helpers/mockServerRequests");
describe("<Client>.savedQueries", function() {
beforeEach(function() {
this.client = new... |
import Ember from 'ember';
import ComponentMixin from 'sl-ember-behavior/mixins/component';
import { module, test } from 'qunit';
import sinon from 'sinon';
let AugmentedObject;
let isViewableStub;
module( 'Unit | Mixin | component', {
beforeEach() {
isViewableStub = sinon.stub().returns( true );
... |
/*
* Copyright (C) 2015-2016 Actor LLC. <https://actor.im>
*/
import React, { Component, PropTypes } from 'react';
import { FormattedMessage } from 'react-intl';
import { lightbox } from '../../utils/ImageUtils';
import { Container } from 'flux/utils';
import Scrollbar from '../common/Scrollbar.react';
import { esc... |
const esbuild = require('esbuild')
const options = {
target: 'node12',
platform: 'node',
jsxFactory: 'h',
jsxFragment: 'hh',
bundle: true,
outfile: 'out.js',
sourcemap: 'inline',
loader: {
'.js': 'jsx',
'.css': 'text',
},
entryPoints: ['/index.js'],
}
await service.build(options) |
$(document).ready(function() {
$("#message").on('change keydown', function(event) {
encryptMessage();
});
$("#mailfrom").on('change keydown', function(event) {
encryptMessage();
})
encryptMessage();
});
function encryptMessage() {
var message = $("#message").val();
var email = $("#mailfrom").val();
messag... |
var referenceType = require('../templates/fieldReferenceType');
var allowedFieldsTypes = {
'string' : String,
'number' : Number,
'date' : Date,
'boolean' : Boolean,
'array' : Array,
'objectId': referenceType
};
/**
* Format the fields for the model template
* @param {array} fields fiel... |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2016 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var BaseBatch = require('./BaseBatch');
/**
* Standard Image and Sprite Shader.
*
* @class Phaser.Renderer.WebGL.Batch.Si... |
import Logger from './../logger';
import Utils from '../libs/utils';
/**
* Class : Listener
*/
class Listener {
/**
* Validates the constructor arguments
*
* @param objUnderValidation - Constructor arguments during this class Object creation
* @returns {boolean} - Validation verdict
*/
... |
var searchData=
[
['scrollarea',['ScrollArea',['../class_symp_1_1_scroll_area.html',1,'Symp']]],
['singleton',['Singleton',['../class_symp_1_1_singleton.html',1,'Symp']]],
['singleton_3c_20entitymanager_20_3e',['Singleton< EntityManager >',['../class_symp_1_1_singleton.html',1,'Symp']]],
['singleton_3c_20... |
"use strict";
let fs = require('fs'),
Generator = require('../lib/generator'),
gen = new Generator(),
args = process.argv.slice(2),
graphName,
outputDir,
rdfDir,
outputFilePath;
if (args.length < 2) {
console.log('usage: node gen.conf.patch.from.dir.js <Graph name> <rdf file directory > <option: outpu... |
var browserSync = require("./index");
var connect = require("connect");
console.time("init");
var files = ["test/fixtures/assets/*", "test/fixtures/*.html"];
var options = {
server: {
baseDir: "./test/fixtures"
// routes: {
// "/shane": "test/fixtures"
// }
},
// proxy: "... |
setUpMenuShower: function(doc) {
var observer = {
observe: function(aSubject, aTopic, aData) {
var menu = doc.getElementById(aData);
if(menu) {
menu.setAttribute('hidden', !this.prefs.getBoolPref(aData));
}
},
unregister: function() {
this.prefs.removeObserver("", this);
},
register: function... |
(function() {
'use strict';
angular
.module('vampUi.services.executionDataExtract.mock', [])
.factory('ExecutionDataExtractServiceMock', ExecutionDataExtractServiceMock);
function ExecutionDataExtractServiceMock() {
var factory = {};
var combinedCpuLoad = null;
v... |
/*
Copyright 2013, KISSY UI Library v1.40dev
MIT Licensed
build time: Jul 22 19:29
*/
KISSY.add("event/dom/ie/change",function(h,b,g){function d(c){c=c.type;return"checkbox"==c||"radio"==c}function f(c){"checked"==c.originalEvent.propertyName&&(this.__changed=1)}function e(c){this.__changed&&(this.__changed=0,b.fire(th... |
import React from 'react';
import PropTypes from 'prop-types';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import IconButton from '@material-ui/core/IconButton';
import Typography from '@material-ui/core/Typography';
import InputBase from '@material-ui/core/InputBase'... |
describe("About Arrays", function() {
//We shall contemplate truth by testing reality, via spec expectations.
it("should create arrays", function() {
var emptyArray = [];
expect(typeof(emptyArray)).toBe('object'); //A mistake? - http://javascript.crockford.com/remedial.html
expect(emptyArray.length).to... |
import minifyCSSString from "../../utils/minifyCSSString";
describe("Minifying CSS strings", () => {
it("should return a minified CSS string", () => {
expect(minifyCSSString(".foo{color:bar}")).toEqual(".foo{color:bar}");
expect(
minifyCSSString(
`
.foo {
color: bar
}
.baz {
font-size:... |
// @flow
import 'babel-polyfill';
import React from 'react';
import renderer from 'react-test-renderer';
import Eye from '../view';
function dispatch() {}
const states = [{
color: null,
isLoading: false,
}, {
color: null,
isLoading: true,
}, {
color: 'red',
isLoading: false,
}, {
color: 'red',
isLoadi... |
class AuthError extends Error {
constructor(message) {
super(message);
this.name = "AuthError";
if (Error.captureStackTrace) {
Error.captureStackTrace(this, AuthError);
} else {
this.stack = (new Error()).stack;
}
}
}
module.exports = AuthError; |
(function() {
"use strict";
app.render_membershipchart = function(options) {
var box = options.container;
var data = options.data;
var margin = 25;
var width = box.width() - 2*margin;
var height = 20;
var svg = d3.select(box[0])
.append('svg')
.attr('width', width + 2*margin)
... |
// Generated by CoffeeScript 1.7.1
(function() {
var Contacts, GlobalData, OPTS, http;
http = require('http');
OPTS = {
host: 'www.knowtify.io',
port: 80,
prefix: '/api/v1/',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'User-Agent': 'Knowtify-Node/0.1'
}
... |
(function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue")) : typeof define === "function" && define.amd ? define(["exports", "vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.vant = {}, global.... |
var config = require("../.config.json")
var MySQL = require("mysql")
var pool = MySQL.createPool({
host: config.database.host,
user: config.database.user,
password: config.database.password,
database: config.database.database
});
var getConnection = function (query, params, done) {
pool.getConnectio... |
module.exports = function () {
throw new Error('Deprecated. Please try other awesome bundler like rollup (https://github.com/rollup/rollup) or buble (https://www.npmjs.com/package/buble)')
}
|
import { Console as console, render, error } from '../utils/log';
const State = function State(React) {
let wrappers = {};
let views = {};
let thises = {};
let instances = {};
this.getOrCreate = function(name) {
if ( !wrappers[name] ) {
wrappers[name] = React.createClass({
displayName: nam... |
/**
* Created by Unetitebiere on 31/05/2015.
*/
var access_token = '';
var app = (function() {
var api = {
views: {},
models: {},
collections: {},
currentView:{},
content: null,
router: null,
wines: null,
init: function() {
this.content... |
import { commitMutation, graphql } from 'react-relay';
import { ConnectionHandler } from 'relay-runtime';
// the new name of the operation must correspond to the file name of this file
// insert-widget-mutation => insertWidgetMutation
// the operation name must end in 'Mutation', so the file name must end in mutation
... |
const qs = require('qs');
const axios = require('axios');
const RantsEndpoint = require('./endpoints/rants');
const UsersEndpoint = require('./endpoints/users');
const AvatarsEndpoint = require('./endpoints/avatars');
/**
*/
class DevRant {
constructor() {
this.api = axios.create({
baseURL: 'h... |
describe('controller: IdeaController', function () {
var controller, q, scope, FeatureProposal, FeatureProposalRepo, Idea, IdeaRepo, Service;
beforeEach(function() {
module('core');
module('app');
module('mock.featureProposal');
module('mock.featureProposalRepo');
modul... |
// Start server
//
"use strict";
////////////////////////////////////////////////////////////////////////////////
module.exports.parserParameters = {
addHelp: true,
help: 'start nodeca server',
description: 'Start nodeca server'
};
module.exports.commandLineArguments = [
{
args: ['--tes... |
/**
* Created by Machine on 20-Mar-17.
*/
'use strict';
const SERVER_URL = 'http://100dayproject.org'
const WIT_TOKEN = process.env.WIT_TOKEN || 'NCPO4KTAYQTDZMXQCDX6LUNOHTZK3PBN'
if (!WIT_TOKEN) {
throw new Error('Missing WIT_TOKEN. Go to https://wit.ai/docs/quickstart to get one.')
}
let FB_PAGE_TOKEN = proce... |
import {expect} from 'chai';
describe('test', () => {
it('addition', () => {
expect(2).to.equal(2);
});
});
|
'use strict';
//Setting up route
angular.module('reportings').config(['$stateProvider',
function($stateProvider) {
// Reportings state routing
$stateProvider.
state('ShowFailedPUS', {
url: '/reportings/ShowFailedPUS',
templateUrl: 'modules/reportings/views/showFailedPUS.html'
}).
state('list-top1... |
"use strict";
(function() {
var pieceEmpty = 0x00;
var pieceMan = 0x01;
var pieceKing = 0x02;
var pieceNo = 0x80;
var moveflagPromotion = 0x01000000;
Dagaz.AI.pieceAdj = [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // piece... |
function UnityProgress (dom) {
this.progress = 0.0;
this.message = "";
this.dom = dom;
var parent = dom.parentNode;
var background = document.createElement("div");
background.style.background = "#4D4D4D";
background.style.position = "absolute";
parent.appendChild(background);
this.background = background;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.