code
stringlengths
2
1.05M
console.warn( "THREE.CSS3DRenderer: As part of the transition to ES6 Modules, the files in 'examples/js' were deprecated in May 2020 (r117) and will be deleted in December 2020 (r124). You can find more information about developing using ES6 Modules in https://threejs.org/docs/#manual/en/introduction/Installation." ); ...
'use strict'; var ReactTestUtils = React.addons.TestUtils; describe('Test', function() { it('can render React components', function() { var label = <div>Hello</div>; ReactTestUtils.renderIntoDocument(label); }); it('can detect exceptions in render', function () { var Throws = Re...
/* * common.js: Internal helper and utility functions for winston * * (C) 2010 Charlie Robbins * MIT LICENCE * */ var util = require('util'), crypto = require('crypto'), cycle = require('cycle'), fs = require('fs'), config = require('./config'); // // ### function setLevels (target, past, curren...
var router = require('express').Router(); var authMiddleware = require('../../middleware/auth-rest'); // Services router.use('/v1/posts', authMiddleware, require('./post')); // Authentication router.use('/auth', require('./auth')); // Additional error handler for RESTful services router.use(require('../../middleware...
import React from 'react' import styled, { ThemeProvider } from 'styled-components' const theme = { colors: { primary: '#2980B9', primaryDark: '#1E2F39', accent: '#C5403F', text: '#131516', textLight: '#8C979A', light: '#d1d2d3' }, font: { size: 18 }, dimens: { breakpoint: '80...
/* var vid = new Whammy.Video(); vid.add(canvas or data url) vid.compile() */ window.Whammy = (function(){ // in this case, frames has a very specific meaning, which will be // detailed once i finish writing the code function toWebM(frames, outputAsArray){ var info = checkFrames(frames); //max duration by ...
// flow-typed signature: d68c59f08ffd9c6949385bd75ddb78c0 // flow-typed version: <<STUB>>/react-bootstrap_v^0.31.3/flow_v0.55.0 /** * This is an autogenerated libdef stub for: * * 'react-bootstrap' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your wor...
/** * Interaction for the locale module * * @author Thomas Deceuninck <thomas@fronto.be> */ jsBackend.translations = { init: function() { jsBackend.translations.controls.init(); } }; jsBackend.translations.controls = { init: function() { if($('select#application').length > 0 && $('select#module').length >...
// TODO: Fix neg problem on page. const express = require('express') const http = require('http') const spdy = require('spdy') const fs = require('fs') const url = require('url') const mongoose = require('mongoose') mongoose.Promise = global.Promise const redis = require('redis') const redislock = require('redis-lock')...
import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import PlusIcon from './plus.svg'; import MinusIcon from './minus.svg'; import styles from './ExpansionButton.css'; const ExpansionButton = ({ className, expanded, ...rest }) => ( <div {...rest} className={cx(classNa...
/**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011 Zynga Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software an...
/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */ /* Written by Jamil Najafov (necefov33@gmail.com). */ (function (factory) { if (typeof define === "function" && define.amd) { // AMD. Register as an anonymous module. define(["../datepicker"], factory); } else { ...
import { createSelector } from 'reselect'; const selectListPageDomain = () => (state) => state.get('BookPage'); const selectContentList = () => createSelector( selectListPageDomain(), (substate) => substate.get('contentList').toJS() ); const selectReportsRequesting = () => createSelector( selectListPageDomain...
define({ "addTaskTip": "1 つ以上のフィルターをウィジェットに追加して、各フィルターのパラメーターを構成します。", "enableMapFilter": "プリセット レイヤー フィルターをマップから削除します。", "newFilter": "新しいフィルター", "filterExpression": "フィルターの条件式", "layerDefaultSymbolTip": "レイヤーのデフォルト シンボルの使用", "uploadImage": "画像のアップロード", "selectLayerTip": "レイヤーを選択してください。", "setTitleTip"...
// Wrapper module for supertest. // This allows adding assertions fo all test requests var request = require('supertest'); var createApp = require('../../src/app'); function createRequest(url) { var server = createApp().listen(); function get() { var args = Array.prototype.slice.call(arguments); ...
import React from 'react' export default function Footer () { return ( <div className="footer"> <hr/> <div className="pure-g"> <div className="pure-u-1 u-sm-1-2"> Built on Baqend &amp; Actian </div> <div className="pure-u-1 u-sm-1-2"> &copy; 2016 </...
define("useful",[],function(){String.prototype.glen=function(){for(var t=0,e=0;e<this.length;e++)this.charCodeAt(e)>127||94==this.charCodeAt(e)?t+=2:t++;return t},addEvent=function(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n},autoCenter=function(t){var e=docume...
'use strict'; let dgram = require('dgram'); let client = dgram.createSocket('udp4');
/** * Handlebars Comparison Helpers * Copyright (c) 2013 Jon Schlinkert, Brian Woodward, contributors * Licensed under the MIT License (MIT). */ 'use strict'; // node_modules var _ = require('lodash'); // The module to be exported var helpers = { contains: function (str, pattern, options) { if (str.index...
// proxy - HTTP proxy server const http = require('http') const https = require('https') const pickup = require('../') http.createServer((req, res) => { https.get('https:/'.concat(req.url), (feed) => { feed.pipe(pickup()).pipe(res) }) }).listen(8080)
$(document).ready(function() { $('#modal-login').click(function() { $('#modal').modal('hide'); }); });
var User = require('../proxy/user'); var Message = require('../proxy/message'); var JPush = require("jpush-sdk"); var eventproxy = require('eventproxy'); var config = require('../config'); var client = null; if (config.jpush && config.jpush.secretKey !== 'your secret key') { client = JPush.buildClient(config.jpush.ap...
// Copyright IBM Corp. 2014. All Rights Reserved. // Node module: loopback-example-passport // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT module.exports = function(server) { // Install a `/` route that returns server status var router = server.loop...
var fs = require("fs"), csv = require("fast-csv"), stream = fs.createReadStream("data/alm_export_urls_shtml.csv"); csv .fromStream(stream, {headers : ["id", "category", "univ", "firstCrawl", "lastCrawl", "lastHttpStatus", "url", "totalCrawl", "totalView", "firstView", "lastView"], delimiter: ';'}) .on("data", fu...
define([ 'underscore', 'text!templates/grid-docs.html', 'text!pages/grid-options-keyboardNavigation.html', 'dobygrid' ], function (_, template, page, DobyGrid) { "use strict"; return Backbone.DobyView.extend({ events: function () { return _.extend({}, Backbone.DobyView.prototype.events, { "change #o...
import React, { Component } from 'react'; import FontAwesome from 'react-fontawesome'; export default class Footer extends Component { render() { return ( <footer className="footer"> <div className="right credit"> Made by <a href="http://rayalez.com">Ray Alez</a> <a href="https://github.com/ra...
var COMPILED = !0, goog = goog || {}; goog.global = this; goog.DEBUG = !0; goog.LOCALE = "en"; goog.TRUSTED_SITE = !0; goog.provide = function(a) { if(!COMPILED) { if(goog.isProvided_(a)) { throw Error('Namespace "' + a + '" already declared.'); } delete goog.implicitNamespaces_[a]; for(var b = ...
import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; import { singularize, pluralize } from 'ember-inflector'; module('Unit | Model | AamcPcrs', function (hooks) { setupTest(hooks); test('it exists', function (assert) { const model = this.owner.lookup('service:store').createRecord('a...
import '../css/style.css'; import { filesDropped, loadDefaultData } from './filesDropped'; import { runTSNEIters, initialiseTSNE } from './dimensionalReduction'; import { drawScatter, updateScatter, updateScatterData } from './graphing'; import version from './version'; // VARIABLES / CONSTANTS let repaintNum = 0; let...
#!/usr/bin/env node var program = require('commander'); program .version('0.0.1') .command('create', 'Create a new maze') .command('solve', 'Solve a maze') .parse(process.argv);
/** * @module ngeo.interaction.MeasurePointMobile */ import googAsserts from 'goog/asserts.js'; import ngeoInteractionMeasure from 'ngeo/interaction/Measure.js'; import ngeoInteractionMobileDraw from 'ngeo/interaction/MobileDraw.js'; import * as olBase from 'ol/index.js'; import * as olObj from 'ol/obj.js'; import ol...
'use strict'; /** * Module dependencies. */ var should = require('should'), mongoose = require('mongoose'), User = mongoose.model('User'), Blooddonation = mongoose.model('Blooddonation'); /** * Globals */ var user, blooddonation; /** * Unit tests */ describe('Blooddonation Model Unit Tests:', function() ...
/*jslint browser: true, debug: true*/ /*global define, module, exports*/ (function (root, factory) { "use strict"; if (typeof define === 'function' && define.amd) { define([], factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.scroll2Top...
module.exports = function (config) { config.set({ files: [ 'bower_components/angular/angular.js', 'bower_components/angular-mocks/angular-mocks.js', 'src/ng-uri.js', 'test/ng-uri.spec.js' ], exclude: [], browsers: ['PhantomJS'], ...
var searchData= [ ['cltool_2ecpp',['cltool.cpp',['../cltool_8cpp.html',1,'']]], ['cltool_2eh',['cltool.h',['../cltool_8h.html',1,'']]], ['cltool_5fmain_2ecpp',['cltool_main.cpp',['../cltool__main_8cpp.html',1,'']]], ['com_5fmanager_2ec',['com_manager.c',['../com__manager_8c.html',1,'']]], ['com_5fmanager_2eh'...
import React from 'react' import { storiesOf } from '@storybook/react' import theme from 'v2/styles/theme' import Specimen from 'v2/stories/__components__/Specimen' import States from 'v2/stories/__components__/States' import Text from 'v2/components/UI/Text' import Box from 'v2/components/UI/Box' import Badge from ...
var EventEmitter = require('events').EventEmitter; var life = new EventEmitter(); life.setMaxListeners(11); function water(who) { console.log('给' + who + '倒水'); } life.on('求安慰', water); life.on('求溺爱', water); // var hasConfortListener = life.emit('求安慰', '汉子'); life.removeAllListeners('求安慰'); //移除监听 console.lo...
// @flow import { NSFont } from '../types'; import { textAndFont } from './cssProperties'; import { px } from './units'; const pointToValue = { 6 : { px: 8, em: 0.5, percent: 50, }, 7: { px: 9, em: 0.55, percent: 55, }, 7.5: { px: 10, em: 0.625, percent: 62.5, }, 8: { px: 11, em: 0.7, per...
/** * Created by Tibi on 2015.11.25.. */ app.controller('Application',function($mdSidenav,$scope,$timeout){ $scope.toggleSidenav = function(menuId) { $mdSidenav(menuId).toggle(); }; $scope.isLoading = false; $scope.menu = [ { title:'Folyam', url:'/dashboard', icon:'dashboard' }, { title: 'Érte...
import del from 'del'; import fs from './lib/fs'; /** * Cleans up the output (build) directory. */ export default () => new Promise((resolve, reject) => { console.log('clean'); del(['.tmp', 'build/*', '!build/.git'], {dot: true}, err => { if (err) { reject(err); } else { fs.makeDir('build/pub...
/** * The copyright in this software is being made available under the BSD License, * included below. This software may be subject to other third party and contributor * rights, including patent rights, and no such rights are granted under this license. * * Copyright (c) 2013, Dash Industry Forum. * All rights re...
'use strict'; (function() { // Final view Controller Spec describe('Final view Controller Tests', function() { // Initialize global variables var FinalViewController, scope, $httpBackend, $stateParams, $location; // The $resource service augments the response object with methods for updating and d...
import { injectGlobal } from 'styled-components'; /* eslint no-unused-expressions: 0 */ injectGlobal` .image-gallery-thumbnail.active.active img { border: .0625rem solid #999; border-radius: .125rem; } `;
// // # Events // var Resource = require('../resource.js') , util = require('util'); // // Events constructor. // function Events(client) { // fix me: create a new connection class Resource.call(this, client); }; util.inherits(Events, Resource); Events.prototype.post = null; Events.prototype.put = null; Ev...
/** * Common test Dependencies */ // import {assert, should, expect} from "chai"; import * as es from '../src/es/connection'; /** * Test dependencies */ describe('Elasticsearch', function () { it('Should reject when connection fails', function (done) { es.connect({ host: 'http://localhost:555', ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = undefined; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor...
/** * Brower unit test for pr.texture * Runs with Kamra. */ "use strict"; describe('pr.texture', function () { var pr = window.parari, Texture = pr.textures.Texture; it('pr.texture', function () { var texture = new Texture({}); expect(texture).toBeDefined(); }); it('Creat...
// Initialize a Line chart in the container with the ID chart1 //$.getJSON("../../data.json", function(json) { // console.log(json); // this will show the info it in firebug console //}); $.getJSON("data.json", function(fillups){ var dateList = []; var priceList = []; var mpgList = []; for (var i =...
const int8Shader = {}; /** * Convert stored pixel data to image data. * * Store data in Uint8Array * * @param {Image} image A Cornerstone Image Object * @returns {Uint8Array} The image data for use by the WebGL shader */ function storedPixelDataToImageData (image) { // Transfer image data to alpha channel o...
import NumberFormatter from './numberFormatter'; import * as consts from './contractorCalculatorConstants'; export default class ContractTakeHomeCalculator { static necessaryDataIsProvidedToCalculateSavings(settings) { return settings.dayRate > 0 && settings.weeks > 0 && settings.wages > 0 && ...
import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; import Table from './index'; const defaultColumns = [ { key: 'name', title: 'Name' }, { key: 'age', title: 'Age', width: 150 }, { key: 'address', title: 'Address' } ]; const defaultData = [ { id: 1, name: 'Person 1', age: '25', ...
/* * Copyright (c) 2017 Roman Lakhtadyr * * 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, merge, pub...
const Component = require('../../../core/Component'); module.exports = new Component('health', { now: Number, max: Number });
import React, { PropTypes } from 'react'; import GarageSelectorOptions from './GarageSelectorOptions'; import GarageList from './GarageList'; const GarageSelectorComponent = ({ filteredData, headers, active, onShowMap }) => ( <section className={`GarageSelector Component ${active ? 'active' : ''}`} > <header> ...
/** * @fileoverview Actions encapsulate the process of resolving an * action creator. Create an action using `Microcosm::push`: * @flow */ import Emitter, { type Callback } from './emitter' import tag from './tag' import { uid } from './utils' import assert from 'assert' type ActionUpdater = (payload?: mixed) => ...
goog.provide('test.blub'); goog.require('goog.dom'); var b = goog.dom.test('bbb'); goog.style.setStyle(b, 'asd');
import * as PropTypes from 'prop-types' import {Button} from 'widget/button' import {EditLegendPanel} from './editLegendPanel' import {Layout} from 'widget/layout' import {LegendItem} from './legendItem' import {ListItem} from 'widget/listItem' import {NoData} from 'widget/noData' import {Widget} from 'widget/widget' i...
/** * Using Rails-like standard naming convention for endpoints. * GET /status -> index * POST /status -> create * GET /status/:id -> show * GET /status/me -> me * PUT /status/:id -> update * DELETE /status/:id -> destroy */...
/* ############################################################# # PHALEEX # ############################################################# Phantomjs Leekwars Experience a phantomjs autoplay to be used with leekwars.com based on Entonoir web app for leekwars */ /*-------------------------------------...
/** * View content module * * @param {type} ko * @param {type} $ * @returns {ViewsViewModel} */ define(['knockout', 'jquery', 'jqueryui', 'bootstrap', 'model/Constants'], function (ko, $, jqueryui, boostrap, constants) { /** * The view model for the Layers panel. * @...
var mongoose = require('mongoose'); var config = null; try { config = require('../config'); } catch(err) { } var mongoString = null; if (config) { mongoString = config.mongoString; } mongoose.connect(mongoString || 'mongodb://admin:SnappyApp1@kahana.mongohq.com:10010/paytime'); module.exports = mongoose;
import Vue from 'vue' import VueRouter from 'vue-router' import store from './store/store' import Login from './components/login/Login' import Home from './components/home/Home' import Cities from './components/home/Cities' import Profile from './components/user/Profile' import City from './components/city/City'; V...
/* */ System.register(["aurelia-dependency-injection"], function (_export) { "use strict"; var Container, _toArray, _prototypeProperties, RouteFilterContainer, RouteFilterStep; _export("createRouteFilterStep", createRouteFilterStep); function createRouteFilterStep(name) { function create(routeFilterConta...
'use strict'; var _ = require("underscore"); var u = require("./utils"); var debug = u.log.debug; var error = u.log.error; var MySymbol = u.model.MySymbol; class LinkedList { constructor(list, _state){ // array this.head = null; this.tail = null; this._state = _state || "NULL"; // NULL, ...
'use strict'; /** * @ngdoc directive * @name anjinhospeludosApp.directive:icheck * @description * # icheck */ angular.module('todasAsPatasApp') .directive('autoExec', ['$timeout', function ($timeout) { return { restrict: 'A', link: function (scope, $elm, $attrs)...
const pluralize = require('pluralize') const {startCase, upperFirst} = require('lodash') function pluralizeTypeName(name) { const words = startCase(name).split(' ') const last = words[words.length - 1] const plural = pluralize(last.toLowerCase()) words[words.length - 1] = upperFirst(plural) return words.join...
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('action-item', 'Integration | Component | action item', { integration: true }); test('it renders', function(assert) { assert.expect(2); // Set any properties with this.set('myProperty', 'val...
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' import router from './router' import Buefy from 'buefy' import 'buefy/lib/buefy.css' //import 'mdi/css/materialdesignicons.css' Vue.us...
import {colours} from '../../../../../../App/constants' export const header = { paddingTop: 32, paddingLeft: 32, paddingBottom: 2, backgroundColor: colours.blue.dark.aardvark.toString(), borderBottomWidth: 0.5, borderBottomColor: colours.blue.dark.giraffe.toString() } export const headerTitle = { fontSi...
// Karma configuration // Generated on Sat Nov 01 2014 18:06:21 GMT+0900 (JST) module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: './..', // frameworks to use // available frameworks: https://npmjs.org/browse/keywo...
import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import { connect } from 'umi' import { Tabs } from 'antd' import { history } from 'umi' import { stringify } from 'qs' import { t } from "@lingui/macro" import { Page } from 'components' import List from './components/List' const { TabPane...
var fs = require('fs'); var async = require('async'); module.exports = function (moduleName) { moduleName = moduleName.toLowerCase(); if (moduleName == 'common') { throw new Error('Common is not a valid name for a module!'); return; }; return function (req, res, next) { fs.readFile('./client-side/' + modul...
/* *@summary JavaScript setTimeout and setInterval utility that allows pausing, resuming, stopping, and starting a setTimeout *@license {@link https://github.com/jpehman/pause-mejs/blob/master/LICENSE} *@author Jonathan Ehman *@typedef object *@example * const pauseMe = require("pause-me"); * * const myTimeout...
export { default, initialize } from 'ember-cli-mutation-observer/initializers/mutation-observer';
'use strict'; angular.module('fightPage', ['fightRound']). component('fightPage', { templateUrl: 'fight/page/fight-page.template.html', controller: function FightPageController($route, vmvar, $http) { var self = this; self.refresh = function() { preServer.fakeDB(); // pr...
var searchData= [ ['conductor',['Conductor',['../classsol_1_1_streamed_audio.html#ab80d43fec1906dcf4de37c3edc9ee546',1,'sol::StreamedAudio']]] ];
'use strict'; eventsApp.controller('EventController', function EventController($scope, eventData) { $scope.sortorder = 'name' // eventData.getEvent().then( // function(event){ $scope.event = event; }, // function(statusCode){ console.log(statusCode) } // ); //replac...
/** * px 转 dp * 注意: * 在安卓设备下,如果 lineHeight 是浮点数会红屏,需要再取整下 */ import { PixelRatio } from 'react-native'; const dpi = PixelRatio.get(); /** * pix 转 dp * @param {Number} px * @return {Number} dp */ function transPxToDp(px) { return px / dpi; } export default transPxToDp;
const {isNumber} = require('../src/lib/isNumber'); const {expect} = require('chai'); describe('isNumber - Is It a Number?', function() { it('should return true when is a digit', function() { expect(isNumber(2)).to.eql(true) }) it('should return false when is a letter', function() { expect(isNumber("a"))....
'use strict'; define([ 'jquery', 'underscore', 'view/widget/page/page', 'view/widget/body/body', 'factory/header-factory', 'factory/form-factory', 'factory/model-table-factory', ], function ($, _, Page, Body, HeaderFactory, FormFactory, ModelTableFactory) { return Page.extend({ ...
import createSvgIcon from './utils/createSvgIcon'; import { jsx as _jsx } from "react/jsx-runtime"; export default createSvgIcon([/*#__PURE__*/_jsx("path", { d: "M14 6h2v5h-2z", opacity: ".3" }, "0"), /*#__PURE__*/_jsx("path", { d: "M16 4h-2c-1.1 0-2 .9-2 2v5c0 1.1.9 2 2 2h2c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 7h-...
/* * Date Info * src/VirtualizedArray.js * * Bartholomew Joyce -- bartholomew.michael.joyce@gmail.com * https://github.com/bartjoyce/ */ function VirtualizedArray(length, getFn) { this.length = length this.get = getFn } VirtualizedArray.prototype.toArray = function() { const length = this.length let arr...
/** * Validation functions for WtU data objects. */ var joi = require('joi'); var wtpConfig = require('config').get('WE_THE_PEOPLE'); var petitionIdType = joi.string(); if(wtpConfig.get('WHITELIST_PETITIONS')){ petitionIdType = petitionIdType.valid( wtpConfig.get('WHITELISTED_PETITIONS') ); } var signature...
var assert = require('assert'); var ratelimit = require('./../index').slidingWindow; var async = require('async'); var uuid = require('uuid/v4'); describe('Sliding Window', function(){ it ('should rate limit', function(done){ this.timeout(4000); var count=0; var rateLimited = false; ...
'use strict'; const fs = require('fs'); const moment = require('moment'); const radix64 = require('radix-64')(); const request = require('request'); const ratebeer = require('ratebeer'); const XmlStream = require('xml-stream'); const build = require('./build'); const stringReplaceStream = require('string-replace-strea...
import chai from 'chai'; const should = chai.should(); import ActionType from '../../lib/core/action-type'; import { reset } from '../../lib/core/type-registry'; describe('ActionType', function() { beforeEach(reset); afterEach(reset); it('should exist', function() { should.exist(ActionType); }); it('...
$(document).ready(function(){ app.c.init(); app.v.init(); app.c.listeners(); }) ///////////////////////////////////////////////////////////////////////////////// var app={m:{},v:{},c:{}}; ///////////////////////////////////////////////////////////////////////////////// app.m.sendToServer=false; /////////////////...
const canvas = document.querySelector('#complex-canvas') let dp = window.devicePixelRatio || 1 // dummy values let width = 1 let height = 1 // pixels per grid unit let rscale = 50 let scale = rscale * dp let draw let updateSize = function () { dp = window.devicePixelRatio || 1 const size = canvas.getBoundingClien...
if (typeof module !== 'undefined' && typeof module.exports === 'object') { module.exports = { getAverage, average, createHash, request }; } function getAverage(list) { let byName = createHash(list, 'name'); let withMothers = list.filter(p => Boolean(byName[p.mother])); let ageDiff = p => p.bo...
const path = require('path'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); /** * TODO remove when webpack fixed this error: * Links to this error: * https://github.com/webpack/webpack/issues/7300 * https://github.com/Je...
/* @flow */ import test from 'ava' import generateUniqueName from 'directory-helpers/test/helpers/generateUniqueName' import {File, Directory} from 'directory-helpers' test('listing the contents of a directory', async (t) => { const projectDirectory = new Directory('.') const contents = await projectDirectory.lis...
version https://git-lfs.github.com/spec/v1 oid sha256:bc2e95d6d8b4ae030d53de80f4aab3cee007de4b9bfab4edbfc3f4b83ae287b6 size 2115
// jshint node:true, globalstrict:true 'use strict'; var gulp = require( 'gulp' ); var browserSync = require( 'browser-sync' ); // var reload = browserSync.reload; var modRewrite = require( 'connect-modrewrite' ); var extensionsPattern = [ 'html', 'js', 'map', 'css', 'png', 'svg', 'jpg...
'use strict'; import DarwinianNetwork from 'scripts/class/darwiniannetwork.js'; import {generateRandomColor, generateRandomTraitColors} from 'scripts/utility.js'; class Game { init(evolution, evolutionPage) { this.evolution = evolution; this.traits = evolution.traits; this.populations = e...
'use strict'; describe('Main', function () { var DoftaApp, component; beforeEach(function () { var container = document.createElement('div'); container.id = 'content'; document.body.appendChild(container); DoftaApp = require('../../../src/scripts/components/DoftaApp.jsx'); component = DoftaAp...
// 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('map'),'shine'); // 指定图表的配置项和数据 var option = { title: { text: 'Top 37 Banks\' Income(2016)', left: 'center', top: 'top' }, toolbox: { show: true, ...
// All code points in the Latin Extended-B block as per Unicode v5.2.0: [ 0x180, 0x181, 0x182, 0x183, 0x184, 0x185, 0x186, 0x187, 0x188, 0x189, 0x18A, 0x18B, 0x18C, 0x18D, 0x18E, 0x18F, 0x190, 0x191, 0x192, 0x193, 0x194, 0x195, 0x196, 0x197, 0x198, 0x199, 0x19A, 0x19B, 0x19C, 0x19D, 0x19E...
/* */ (function(process) { var MersenneTwister = require('mersenne-twister'); var generator = new MersenneTwister(); var n = process.argv[2] || 5e7; var tick = process.hrtime(); while (n--) { generator.random_int(); } var tock = process.hrtime(tick); console.log('mersenne-twister: ' + (tock[0] * 1e...
// require express var express = require('express'); // initialize app var app = express(); // server port var port = process.env.PORT || 3000; // twilio client var client = require('twilio')(process.env.ACCOUNT_SID, process.env.AUTH_TOKEN); // superagent module var request = require('superagent'); // accept POST on ...
"use strict"; var Alphabet = require("./alphabet"); var Bindings = require("./dan-smith"); var makeFontColumn = require("./column"); var tengwar = exports.tengwar = { ...Bindings.tengwar, "open-paren": "=", "close-paren": "=", }; var tehtar = exports.tehtar = Bindings.tehtar; var positions = exports.posi...