code stringlengths 2 1.05M |
|---|
$('.grid').packery({
// options
itemSelector: '.grid-item',
gutter: 0,
columnWidth:0
});
$(document).ready(function() {
$.ajaxSetup({ cache: true });
$.getScript('http://connect.facebook.net/en_US/sdk.js', function(){
FB.init({
appId: '243797116015643',
version: 'v2.7' // or v2.1, v2.2, v2.... |
import React, { Component } from "react";
import {
StyleSheet,
View,
} from "react-native";
import { CreditCardInput, LiteCreditCardInput } from "react-native-credit-card-input";
const s = StyleSheet.create({
container: {
backgroundColor: "#F5F5F5",
marginTop: 60,
},
label: {
color: "black",
... |
/*
* Copyright (c) 2016, Globo.com (https://github.com/globocom)
*
* License: MIT
*/
import React, {Component, PropTypes} from "react";
import BlockAction from "./BlockAction";
export default class BlockActionGroup extends Component {
static propTypes = {
items: React.PropTypes.arrayOf(
React.PropT... |
// icon-bell
export default {
functional: true,
render: function (h, { props }) {
let width = props.width || 20
let height = props.height || 20
const viewBox = props.viewBox || '0 0 20 20'
return h('svg', {
attrs: {
version: '1.1',
meta: 'vk-icons-bell',
width: width,
... |
module.exports = {
normalizeEntityName() {}, // no-op since we're just adding dependencies
afterInstall() {
return this.addPackageToProject('@primer/octicons', '^16.0.0');
},
};
|
var temp;
temp=new XMLHttpRequest();
function clearsidediv(){
//handwave('clearsidediv()');
document.getElementById('sidediv1').style.display='none';
document.getElementById('sidediv2').style.display='none';
//document.getElementById('sidediv3').style.display='none';
//document.getElementById('sidediv4').style.d... |
import assert from 'assert'
import sinon from 'sinon'
import reset from './../reset.js'
import Criteo from './../../src/integrations/Criteo.js'
import ddManager from './../../src/ddManager.js'
function viewedPage (eventData, callback) {
window.digitalData.events.push(Object.assign({
name: 'Viewed Page',
call... |
function Game(canvas){
this.canvas = canvas;
this.children = {};
this.cardList = [];
var that = this;
["click","dragstart","dragover","drop"].forEach(function(event){
that.canvas.addEventListener(event,that.on.bind(that,event));
});
that.canvas.draggable = true;
}
Game.prototype.render = function(){... |
var i2c = require('i2c');
var utils = require('./util');
var accel_address = 0x19;
var accel_device = '/dev/i2c-1'
function Accelerometer(options) {
if (options && options.address) {
accel_address = options.address;
}
if (options && options.device) {
accel_device = options.devic... |
TweenMax.ticker.useRAF(false);
TweenMax.lagSmoothing(0);
var debuggerMode = false;
var scale = 0.55;
var cellSize = 150*scale;
var swapSpeed = 0.25;
var advanceSpeed = 0.5;
WebFontConfig = {
google: {
families: ['Chango']
}
};
var levelState = {
preload: function () {
game.load.script('webfont', 'ht... |
'use strict';
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const TaskSchema = new Schema({
createdDate: {
default: Date.now,
type: Date
},
name: {
type: String
},
detail: {
type: String
},
isDone: {
default: false,
ty... |
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add (x, y) {
var lsw = (x & 0xFFFF) + (y & 0xFFFF),
msw = (x >> 16) + (y >> 16) + (lsw >> 16)
return (msw << 16) | (lsw & 0xFFFF)
}
/*
* Bitwise rotate a 32-bi... |
var _ = require('lodash');
var R = require('../..');
var objs = [
{x: [1, 2], y: true}, {x: [1, 3], y: true}, {x: [], y: false}, {x: [2], y: false},
{x: [3], y: true}, {x: [1], y: true}, {x: [1, 2, 3], y: true}, {x: [], y: true},
{x: [1, 2], y: false}, {x: [1, 3], y: true}
];
var findEmptyX = R.find(R.where({x: ... |
function SearchCtrl($scope, $http) {
// XHR to get the map data
$http.get('./source/search.json').success(function(data) {
$scope.search = data;
});
}
|
const React = require('react');
const helpers = require('../utils/helpers');
const CueForm = React.createClass({
getInitialState: function(){
return({
cueNumber: '',
isValid: false,
cueExists: false
});
},
componentDidMount: function(){
helpers.tooltipHelper();
},
handleCueNumberChange: functio... |
import { arrayFromNSArray, toJSON } from './lib/nsdict'
import uuidv4 from './lib/uuid'
import { open } from './lib/libc'
import { getDataAttrForPath } from './lib/foundation'
const { NSFileManager, NSProcessInfo, NSDictionary, NSBundle } = ObjC.classes
const fileManager = NSFileManager.defaultManager()
export func... |
import mean from '..'
describe('mean', () => {
it('is not a number when the list is empty', () => {
expect(isNaN(mean([]))).toBe(true)
})
it('is the item value when the list has a single numerical item', () => {
expect(mean([1])).toBe(1)
})
it('computes the mean of a list of numbers', () => {
e... |
import Service from '@ember/service';
import { A } from '@ember/array';
import spdx from 'bracco/spdx';
export default Service.extend({
spdxList: A([]),
init() {
this._super(...arguments);
this.getSpdxList();
},
getSpdxList() {
this.set('spdxList',spdx.licenses);
return true;
},
});
|
module.exports.customizationDefaults = {
"institute": {
"researchEntity": 1,
"institute": 1,
"name": "Istituto Italiano di Tecnologia",
"slug": "istituto-italiano-di-tecnologia",
"shortname": "IIT",
"description": null,
"type": "Institute",
"code": "II... |
describe('ErrorLookup', function () {
"use strict";
var expect = chai.expect;
var $provide;
var $compile;
var $injector;
var $rootScope;
var $q;
var Provider;
var createModel;
var $interpolate;
var ErrorLookup;
var $templateCache;
var $exceptionHandler = {
f... |
var _ = require('underscore'),
cx = require('classnames'),
React = require('react'),
Note = require('../components/Note');
function validateSpec(spec) {
if (!_.isObject(spec.supports)) {
spec.supports = {};
}
if (!spec.focusTargetRef) {
spec.focusTargetRef = 'focusTarget';
}
return spec;
}
function evalD... |
var gulp = require('gulp'),
config = require('../config').browserSync,
browserSync = require('browser-sync').create(config.name);
gulp.task('browserSync', function() {
browserSync.init({
server: {
baseDir: config.dir
},
files: [config.dir + '/**/*.html'],
browser: []
});
}); |
/*
Team:Dolphin
Author:Li Dongfang,Yuan Haiwang
Version:0.0.1
Time:20140424 22.40
Code:ZG9waGlu
*/
function createThink(w, h)
{
var catchtail=1;
var counterround=1;
var gridnumber=w*h;
var walk=[];
var dx=[],dy=[],dir=[];
dx[0]=0,dx[1]=0,dx[2]=-1,dx[3]=1;
dy[0]=-1,dy[1]=1,dy[2]=0,dy[3]=... |
/**
* Created by frasiek on 2015-02-02.
*/
//= require excanvas.min
//= require jquery.jqplot.min
//= require plugins/jqplot.canvasAxisLabelRenderer.min.js
//= require plugins/jqplot.canvasTextRenderer.min.js
//= require plugins/jqplot.highlighter.min.js
//= require plugins/jqplot.cursor.min.js
//= require plugins/jq... |
'use strict';
const moment = require('moment');
const later = require('later');
const events = require('events');
const errors = require('./errors');
module.exports = class Cron extends events.EventEmitter {
constructor(model, config) {
super();
this._model = model;
this._handler = config.handler;
... |
/**
* @module core/Voxel
* @requires common
* @requires events
* @requires positioned
* @requires core/Mesh
* @requires core/ImageFace
* @requires core/ColorFace
**/
'use strict';
const {assign, keys} = Object;
const {abs, asin, max, min, PI, pow, sqrt} = Math;
const {
generateRotationMatrix,
isNumber,... |
$(document).ready(function() {
$('.buttonDrunk').click(function(){
// bannerStatus();
blinkTransition();
// console.log("Buttondrunk is working");
});
$('.dummyBut').click(function(){
blinkTransition();
});
$('.resetLogBut').click(function(){
resetLog();
});
$('.reloadBut').click(function(){
reloadPa... |
import express from 'express';
import { WebApp } from 'meteor/webapp';
import { UIKitIncomingInteractionType } from '@rocket.chat/apps-engine/definition/uikit';
import { Users } from '../../../models/server';
const apiServer = express();
apiServer.disable('x-powered-by');
WebApp.connectHandlers.use(apiServer);
// ... |
import test from 'ava';
import cbtTunnel from './dist';
import path from 'path';
import Promise from 'pinkie-promise';
import pify from 'pify';
import fs from 'fs';
const promiseFs = pify.all(fs, Promise);
test('should download the executable', (t) => {
t.plan(1);
t.doesNotThrow(promiseFs.access(path.join(__dirname... |
var canvas;
function Point(x, y) {
this.x = x;
this.y = y;
}
function Drawing() {
this.points = [];
this.colour;
this.strokeWidth;
}
Drawing.prototype.addPoint = function(point) {
this.points.push(point);
}
Drawing.prototype.lastPoint = function(point) {
return this.points[this.points.length - 1]
}
f... |
var expect = require('chai').expect,
Dice = require('../lib/dice');
describe('test the dice object', function() {
it('sets sides a default number of sides', function() {
var dice = new Dice();
expect(dice.sides).to.equal(6);
});
it('sets sides correctly', function() {
var dice = new Dice(8);
... |
import curry2 from "./internal/curry2";
/**
* Returns the last element of the list which matches the predicate, or `undefined` if no
* element matches.
*
* @func
* @memberOf R
* @category List
* @param {Function} fn The predicate function used to determine if the element is the
* desired one.
* @param {Array}... |
/*
* Bootstrap Image Gallery JS Demo
* https://github.com/blueimp/Bootstrap-Image-Gallery
*
* Copyright 2013, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
/*global blueimp, $ */
$(function () {
'use strict'
var borderless = true... |
"use strict";
const debug = process.env.NODE_ENV !== "production";
const webpack = require('webpack');
const path = require('path');
module.exports = {
devtool: debug ? 'inline-sourcemap' : null,
entry: path.join(__dirname, 'src', 'app-client.js'),
devServer: {
inline: true,
port: 3333,
contentBase: "src/st... |
/**
* @license
* lodash <https://lodash.com/>
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters... |
'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_pre... |
// This is the service worker with the Cache-first network
const CACHE = "kekapp-cache-v1";
const precacheFiles = [
'/',
'index.html',
'manifest.json',
'keklogo.png',
'mtlogooo.png',
'jquery-3.3.1.min.js',
'materialize.min.js',
'dexie.js',
'vue.js',
'clipboard.min.js',
'html... |
// var casper = require('casper').create();
casper.start('index.html');
casper.then(function () {
this.echo('Current page : ' + this.getTitle());
this.waitForSelector('form #l1');
});
// Est-ce que le formulaire existe ?
casper.then(function () {
this.test.assertExists(('#\\#frm_serca_api'), 'the element e... |
/* ------------------------------------------------------------------------------
*
* # CKEditor editor
*
* Specific JS code additions for editor_ckeditor.html page
*
* Version: 1.0
* Latest update: Aug 1, 2015
*
* ---------------------------------------------------------------------------- */
$(function() {
... |
import React from 'react';
import { Radio } from 'romagny13-react-form-validation';
const Example1 = () => {
let value = 'b';
return (
<div>
<h4>Direct check</h4>
<Radio checked name="g1" />
<h4>Grouped by name (the last checked is checked)</h4>
<Radio c... |
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
/**
* this class handles the navigation through the page via react-router.
* Much simpler and easier to use than https://github.com/ReactTraining/react-router/tree/master/packages/react-router-redux
*/
class Navigato... |
(function($process) {
const devInk = require('./../devink').devInk;
devInk.sendTemplate();
})(process); |
/**
* Created by BBN Solutions.
* User: Vito Fava
* Date: 27/06/17
* Time: 11.40
*/
var path = require('path');
var fs = require('fs');
var browserify = require('browserify');
var vueify = require('vueify');
var babelify = require('babelify').configure({
presets: ["es2015"]
});
var aliasify = require('alias... |
#!/usr/bin/env node
const extractInlineScripts = require('./');
const fs = require('fs');
const glob = require('glob');
const color = require('bash-color');
const argv = require('minimist')(process.argv.slice(2));
if (argv._.length === 0) {
console.error(`Usage: extis globs [OPTIONS]
OPTIONS
-c print th... |
'use strict';
import React from 'react'
import extensions from '../utils/extensions.react'
/*eslint-disable no-unused-vars*/
import {Link} from 'react-router'
/*eslint-enable no-unused-vars*/
export default
//@extensions
class GroupByFilter extends React.Component {
constructor(props, context){
su... |
let $userGroupForm = $('#user-group-form');
let $groupIntroduce = $('#groupIntroduce');
let btn = '#group-save-btn';
var editor = CKEDITOR.replace('groupIntroduce', {
toolbar: 'Full',
filebrowserImageUploadUrl: $groupIntroduce.data('imageUploadUrl'),
allowedContent: true,
height: 300
});
editor.on('change', () =>... |
import { clone } from './dash'
import invariant from './invariant'
import Path from './path'
export default function transition (options, Promise) {
options = options || {}
let router = options.router
let log = router.log
let logError = router.logError
let path = options.path
let match = options.match
... |
export const TYPES = {
INTEGER: (id, definition) => new Integer(id, definition),
BIGINT: (id, definition) => new BigInt(id, definition),
MEDIUMINT: (id, definition) => new MediumInt(id, definition),
SMALLINT: (id, definition) => new SmallInt(id, definition),
TINYINT: (id, definition) => new TinyInt(id, defini... |
Error.stackTraceLimit = Infinity;
require('core-js/es6');
require('core-js/es7/reflect');
require('zone.js/dist/zone');
require('zone.js/dist/long-stack-trace-zone');
require('zone.js/dist/proxy'); // since zone.js 0.6.15
require('zone.js/dist/sync-test');
require('zone.js/dist/jasmine-patch'); // put here since zone... |
angular.module('schemaForm').directive('uiDatePicker', function() {
return {
restrict: 'A',
// require: 'ngModel',
controller: function($scope) {
$scope.openCalendar = function($event) {
$event.preventDefault();
$event.stopPropagation();
$scope.opened = true;
};
}/... |
var wildpad = wildpad || { };
wildpad.UndoManager = (function () {
'use strict';
var NORMAL_STATE = 'normal';
var UNDOING_STATE = 'undoing';
var REDOING_STATE = 'redoing';
// Create a new UndoManager with an optional maximum history size.
function UndoManager (maxItems) {
this.maxItems = maxItems ||... |
'use strict';
(function () {
console.log('Hello World');
}());
|
'use strict';
const test = require('ava')
, noCache = require('./noCache')
, res = {}
, config = {};
test.beforeEach(() => {
res.headers = {};
res.setHeader = function (key, value) {
this.headers[key] = value;
};
res.removeHeader = function (key) {
this.headers[key] = undefined;
}... |
import test from 'ava';
// import mechanisms from '../mechanisms';
// import prefixes from '../prefixes';
import s from '../';
test('Invalid qualifier fails', t => {
const m = [];
s.parseTerm('@include:bar.com', m);
t.deepEqual(m, [
{
message: `Unknown standalone term '@include:bar.com'`,
type: 'error'
}
... |
// public/js/appRoutes.js
angular.module('appRoutes', []).config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/home.html'
})
.when('/login', {
templateUrl: 'views/login.html'
})
.when('/signup', {
... |
'use strict';
var genBase = require('../genBase')
, Generator;
Generator = module.exports = genBase.extend();
Generator.prototype.prompting = function prompting() {
this.askForModuleName();
};
Generator.prototype.writing = function writing() {
this.copySrc('factory');
this.copyUnitTest('factory');
};
|
/*
* browser.js: Browser specific functionality for director.
*
* (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors.
* MIT LICENSE
*
*/
var dloc = document.location;
var QUERY_SEPARATOR = /\?.*/;
function dlocHashEmpty() {
// Non-IE browsers return '' when the address bar shows '#'; Director's lo... |
angular.module('hpcpm-ui').factory('EndpointsService', function() {
var _endpoints = {
'status': 'status',
'get_computation_node': 'nodes/computation_node',
'put_computation_node': 'nodes/computation_node',
'delete_computation_node': 'nodes/computation_node',
'get_power_limit... |
import { join } from "path";
import { assert } from "yeoman-generator";
import { test as helpers } from "yeoman-generator";
import test from "tape";
helpers.run(join(__dirname, "../app"))
.withOptions({skipInstall: true})
.withPrompts({someOption: true})
.on("end", () => {
assert.file([
"README.md"
... |
var searchData=
[
['vfprintf',['vfprintf',['../printf_8c.html#a4c938d1cedba90cbc8107400ebea6100',1,'printf.c']]],
['vprintf',['vprintf',['../printf_8c.html#adc27df6594a246219000f9d2a584a3be',1,'printf.c']]],
['vsnprintf',['vsnprintf',['../printf_8c.html#a8f2d28f08e5d66db9a14ed70cb1f4220',1,'printf.c']]],
['vspr... |
'use strict';
var async;
var Settings;
var socketAdmin;
var request;
var user;
var topics;
var privileges;
var meta;
var db;
var nconf;
var winston;
var CronJob = require('cron').CronJob;
var tdwtfArticles = function(imports) { // eslint-disable-line complexity
imports = imports || {};
async = impo... |
var gulp = require('gulp');
module.exports = function(tasks) {
tasks.forEach(function(name) {
gulp.task(name, require('./tasks/' + name)(gulp));
});
return gulp;
} |
'use strict';
SystemJS.config({
'transpiler': 'plugin-babel',
'map': {
'plugin-babel': './node_modules/systemjs-plugin-babel/plugin-babel.js',
'systemjs-babel-build': './node_modules/systemjs-plugin-babel/systemjs-babel-browser.js',
//Libraries:
'jquery': './node_modules/jquery... |
// Karma configuration
// http://karma-runner.github.io/0.12/config/configuration-file.html
// Generated on 2014-08-03 using
// generator-karma 0.8.3
module.exports = function(karma) {
var files = require('./files.js').files;
karma.set({
// enable / disable watching file and executing tests whenever any file ... |
'use strict';
// Science Writer
// ---------------
//
// Configures a simple writer for the substance journal, using the generic SubstanceWriter implementation
var $$ = React.createElement;
// Core Writer from Substance UI
// ---------------
//
var SubstanceWriter = require("substance-ui/writer");
// Configuration... |
import Component from 'ember-component';
import layout from '../templates/components/grid-cell';
export default Component.extend({
layout,
classNames: [
'c-grid-cell',
'o-grid-cell',
'o-grid',
'o-grid--align-center',
'o-grid--align-middle'
],
title: null
});
|
var isUndefined = angular.isUndefined;
var isArray = angular.isArray;
var isObject = function(value) {
return(angular.isObject(value) && !isArray(value));
};
var TYPES = {
form: 'form',
upload: 'upload',
simple: 'simple',
list: 'list',
error: 'error'
};
var ignoredTypes = ['error'];
var INTER... |
version https://git-lfs.github.com/spec/v1
oid sha256:79fcb338b3fd0a4a55ca4c504b32c53ee4e05f57e8a0484185cb94fb10880b88
size 581
|
import React from "react";
class FourOFour extends React.Component {
render() {
return (
<div>
<h1>Page not found</h1>
</div>
);
}
}
export default FourOFour;
|
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
// load the unit we are testing, or more js as needed.
var foof = function(){ return 12; }
// the tests.
describe('foo', function() {
it('should return 12', function(){
assert.equal(foof(), 12);
});
it('should return 12*12', function(){
var x = foof();
assert.equal(foof() * foof(),... |
/*global $, MAPJS, MM, window*/
$.fn.importWidget = function (activityLog, mapRepository) {
'use strict';
var element = this,
uploadType,
statusDiv = element.find('[data-mm-role=status]'),
fileInput = element.find('input[type=file]'),
selectButton = element.find('[data-mm-role=select-file]'),
spinner = func... |
function getSimEvent() {
$.get('${pageContext.request.contextPath}/playing/getEvents/1',
function(myFunction){
alert('here');
});
}
function startTimers()
{
getSimEvent();
setTimeout("startTimers()", 600000);
}
$( document ).ready(function() {
startTimers();
}); |
BEM.DOM.decl('i-lego-example', {
onSetMod : {
'js' : function() {
this.domElem.append(BEM.HTML.build(
{
block : 'b-form-button',
mods: { type: 'simple', theme: 'simple-grey', size: 's', valign: 'middle' },
content : '... |
"use strict";
var elmain = document.getElementById("replay");
var fast_forward_lines = 0;
var id = window.location.pathname.slice(2);
var json = null;
var lineno = 0;
var playing = false;
var progress = 0;
var speed = 1;
var timeout = null;
var title = null;
function rewind() {
if (playing) {
window.clearTimeou... |
'use strict';
var gulp = require('gulp-help')(require('gulp'));
var imagemin = require('gulp-imagemin');
var cache = require('gulp-cache');
var gulpif = require('gulp-if');
var config = require('./../config.js');
// Clear imagemin cache
gulp.task('clearCache', 'Clear Imagemin cache', function (done) {
return cach... |
'use strict';
var validator = require('validator');
var React = require('react/addons');
var ModalProgressTrigger = require('../modal/ModalProgressTrigger.js');
var ModalProgressTriggerAction = require('../../action/modal/ModalProgressTriggerActions.js');
var Button = require('react-bootstrap').Button;
var DeskAction ... |
import React from "react"
import PropTypes from "prop-types"
import { StaticQuery, graphql } from "gatsby"
import Navbar from '../components/Navbar';
import '@fortawesome/fontawesome-free/css/all.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import "../styles/theme.css"
import AOS from 'aos';
import 'aos/dist/... |
'use strict';
/* Animations */
define(['angular', 'jquery', 'angular-animate'],function(angular, $){
return angular.module('phonecatAnimations', ['ngAnimate']).animation('.phone', function() {
var animateUp = function(element, className, done) {
if(className !== 'active') {
re... |
const path = require('path');
const { Router } = require('express');
// Internal
const configs = require('../configs');
const { getHandlers } = require ('./utils');
const viewHandlers = getHandlers(path.join(configs.PATH.ROOT, 'server', 'handlers'));
const router = new Router();
module.exports = function(routes) {
... |
const {
makeRequest,
verifyParameters
} = require('../lib/api');
const academicKnowledge = ({
API_KEY
}) => {
let self = this;
/**
Name: Academic Knowledge: CalcHistogram
Description: The calchistogram REST API is used to calculate the distribution of attribute values for a set of paper entitie... |
module.exports = function *(next) {
this.enterprise.Info = null;
if(!this.user_islogin){
yield next;
return;
}
var eid = this.params.eid;
if (eid==undefined){
yield next;
return;
}
eid = parseInt(eid);
if(isNaN(eid)){
this.body = "ERROR";
r... |
document.addEventListener('DOMContentLoaded', function() {
/* * * * * *
* Classes *
* * * * * */
function TabItem(id, title, url, iconUrl) {
if (typeof id !== 'string' ||
typeof title !== 'string' ||
typeof url !== 'string' ||
typeof iconUrl !== 'string')
throw n... |
import { createSelector, createStructuredSelector } from 'reselect';
import isEmpty from 'lodash/isEmpty';
import { formatNumber } from 'utils/format';
// get list data
const getData = (state) => state.data;
const getLocationName = (state) => state.locationLabel;
const getColors = (state) => state.colors;
const getSen... |
var chai = require('chai');
var expect = chai.expect;
var Layer = require('../../lib/Layer');
var layer;
beforeEach(function () {
layer = new Layer();
});
describe('Layer', function () {});
|
/*
* grunt-feature
* https://github.com/indieisaconcept/grunt-feature
*
* Copyright (c) 2013 Jonathan Barnett @indieisaconcept
* Licensed under the MIT license.
*/
'use strict';
var matchdep = require('matchdep'),
Handlebars = require('handlebars');
// HELPERS
// ------------------------------
Handlebars.... |
'use strict';
export default function binarySearch(start, end, predicate) {
let ss = start, ee = end;
while (ss < ee) {
const mid = Math.floor((ss + ee) / 2);
const result = predicate(mid);
if (result === 0) return mid;
if (result > 0) ee = mid - 1;
else if (result < 0) ss = mid + 1;
}
ret... |
const assert = require('power-assert');
const express = require('express');
const request = require('supertest');
describe('packages/health', () => {
it('should have outcome "UP" without any checks', done => {
const app = express();
require('@dnode/controllers')(app, [require('../index').controller()]);
... |
import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
// import * as getters from './getters'
import home from './modules/home'
import error from './modules/error'
import createLogger from 'vuex/dist/logger'
Vue.use(Vuex)
const debug = process.env.NODE_ENV !== 'production'
export default... |
"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... |
H5.Repository = (function (Object) {
'use strict';
function Repository() {
this.dict = {};
}
Repository.prototype.add = function (item, fn, dependencies) {
this.dict[item.id] = {
fn: fn,
dependencies: dependencies
};
};
Repository.prototype.has ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }... |
window.addEventListener('onready', () => {
console.log('Ready!');
});
|
/**
* https://gist.github.com/jonleighton/958841
*/
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then
// use window.btoa' step. According to my tests, this appears to be a faster approach:
// http://jsperf.com/encoding-xhr-image-data/5
function ArrayBufferToBase64(array... |
/*globals describe, beforeEach, afterEach, it*/
var moment = require('moment'),
should = require('should'),
sinon = require('sinon'),
Promise = require('bluebird'),
_ = require('lodash'),
// Stuff we are testing
api = require('../../../../server/api'),
frontend = require('..... |
const { createStore, applyMiddleware } = require('redux');
const {
forwardToMain,
replayActionRenderer,
getInitialStateRenderer,
createAliasedAction,
} = require('electron-redux');
const reducers = require('../reducers');
// setup store
const initialState = getInitialStateRenderer();
const store = createStore(... |
import { unflatten } from 'flat';
import {
parseUrl,
getCustomHeaders,
convertArrayToHeaders,
getHeaders,
} from '../utils';
import CustomError from '../utils/CustomError';
const setCellValue = async (app, type, rawUrl, id, property, value) => {
const defaultError = 'Unable to update data';
try {
const { url ... |
/*
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( 'stylescombo', 'bs', {
label: 'Stil',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'Block Styles', // MISSIN... |
(function () {
var fs = require('fs');
var plugins = require('gulp-load-plugins')();
var mainBowerFiles = require('main-bower-files');
var del = require('del');
var gutil = require('gulp-util');
var validate = require('html-angular-validate');
var runSequence = require('run-sequence')
va... |
import OtherPlayer from '../maze/otherPlayer';
import SocketConnection from './connection';
class MultiPlayerController {
constructor(maze, uri) {
this.player = maze.player.configuration;
this.maze = maze;
this.items = maze.items;
this.connection = new SocketConnection(this.player, this.items, uri);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.