code
stringlengths
2
1.05M
const assert = require('assert') const { unparse } = require('uuid-parse') const supertest = require('supertest') const createApp = require('../app') const { createSetup, getAuthPassword } = require('./lib') const { createPlayer, createKick } = require('./fixtures') describe('Query player kick', () => { let setup ...
var assert = require('chai').assert var sendgrid = require('../lib/sendgrid'); describe('test_access_settings_activity_get', function () { this.timeout(30000); var API_KEY = 'SendGrid API Key' if(process.env.TRAVIS) { var TEST_HOST = process.env.MOCK_HOST } else { var TEST_HOST = 'localhost' } var...
// All code points in the Khmer Symbols block as per Unicode v5.0.0: [ 0x19E0, 0x19E1, 0x19E2, 0x19E3, 0x19E4, 0x19E5, 0x19E6, 0x19E7, 0x19E8, 0x19E9, 0x19EA, 0x19EB, 0x19EC, 0x19ED, 0x19EE, 0x19EF, 0x19F0, 0x19F1, 0x19F2, 0x19F3, 0x19F4, 0x19F5, 0x19F6, 0x19F7, 0x19F8, 0x19F9, 0x19FA, 0x19F...
jQuery(document).ready(function() { $('.alert-close').bind('click', function() { $(this).parent().fadeOut(100); }); function createAutoClosingAlert(selector, delay) { var alert = $(selector).alert(); window.setTimeout(function() { alert.alert('close') }, delay); } createAutoClosingAlert(".ale...
CucumberJsBrowserRunner.StepDefinitions.test3(function () { var And = Given = When = Then = this.defineStep, runner; Given(/^test3$/, function(callback) { callback(); }); When(/^test3$/, function(callback) { callback(); }); Then(/^test3$/, function(callback) ...
'use strict'; var run = require('./helpers').runMochaJSON; var assert = require('assert'); describe('.only()', function() { describe('bdd', function() { it('should run only tests that marked as `only`', function(done) { run('options/only/bdd.fixture.js', ['--ui', 'bdd'], function(err, res) { if (e...
module.exports = require('eden-class').extend(function() { /* Require -------------------------------*/ /* Constants -------------------------------*/ /* Public.Properties -------------------------------*/ /* Protected Properties -------------------------------*/ this._table = null; this._where = []; /* ...
const path = require('path'); const { expect } = require('chai'); const delay = require('../../../../lib/utils/delay'); describe('Compiler service', () => { it('Should execute a basic test', async () => { await runTests('testcafe-fixtures/basic-test.js', 'Basic test'); }); it('Should ha...
var fans=require('../../modules/blog/fans'); var User=require('../../modules/resume/user'); var async = require('asyncawait/async'); var await = require('asyncawait/await'); module.exports=(async(function(method,req,res){ var result; if(method==='get'){ } else if(method==='post'){ var userId=req.session.uid; v...
// @flow import React, { Component } from 'react' import { Helmet } from 'react-helmet' import AlternativeMedia from './AlternativeMedia' import ImageViewer from './ImageViewer' import { Code, CodeBlock, Title } from '../components' const propFn = k => { const style = { display: 'inline-block', marginBottom: 4, ma...
var gulp = require('gulp'); var browserify = require('browserify'); //transform jsx to js var reactify = require('reactify'); //convert to stream var source = require('vinyl-source-stream'); var nodemon = require('gulp-nodemon'); gulp.task('browserify', function() { //source browserify('./src/js/main.js') ...
module.exports = function(config) { config.set({ basePath: '../../', frameworks: ['jasmine', 'requirejs'], files: [ {pattern: 'test/unit/require.conf.js', included: true}, {pattern: 'test/unit/tests/global.js', included: true}, {pattern: 'src/client/**/...
/** * @namespace http * * The C<http> namespace groups functions and classes used while making * HTTP Requests. * */ ECMAScript.Extend('http', function (ecma) { // Intentionally private var _documentLocation = null function _getDocumentLocation () { if (!_documentLocation) _documentLocation = new ecm...
import debounce from 'debounce'; import $ from 'jquery'; const groupElementsByTop = (groups, element) => { const top = $(element).offset().top; groups[top] = groups[top] || []; groups[top].push(element); return groups; }; const groupElementsByZero = (groups, element) => { groups[0] = groups[0] || []; grou...
// Structure to represent a proof class ProofTree { constructor({equation, rule, newScope=false }) { this.equation = equation; this.rule = rule; this.newScope = newScope; this.parent = null; this.children = []; this.isSound = !newScope; } isAssumption() { return this.newScope; } ...
version https://git-lfs.github.com/spec/v1 oid sha256:20e35c5c96301564881e3f892b8c5e38c98b131ea58889ed9889b15874e39cbe size 8394
/** * Javascript file for Category Show. * It requires jQuery. */ function wpcs_gen_tag() { // Category Show searches for term_id since 0.4.1 and not term slug. // There is a need to add the id%% tag to be compatible with other versions $("#wpcs_gen_tag").val("%%wpcs-"+$("#wpcs_term_dropdown").val()+"%%"+$("#wpc...
function mathGame(){ var game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.auto, 'math', { preload: onPreload, create: onCreate, // resize:onResize }); WebFontConfig = { active: function() { game.time.events.add(Phaser.Timer.SECOND, createText, this); }, google: { fami...
'use strict';exports.__esModule = true;var _stringify = require('babel-runtime/core-js/json/stringify');var _stringify2 = _interopRequireDefault(_stringify);var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);var _possibleConstructorRetu...
// Generated by CoffeeScript 1.8.0 (function() { var TaskSchema, mongoose; mongoose = require('./mongoose'); TaskSchema = mongoose.Schema({ id: { type: Number, unique: true }, title: { type: String }, url: { type: String, unique: true }, status: { ...
var mongoose = require('mongoose'), _ = require('underscore'), roomTokenizer = function(msg) { var tokens = []; tokens = tokens.concat(msg.content.split(' ')); tokens.push(msg.author); return tokens; }; exports.init = function(db) { var EntitySchemaDefinition, E...
import React, { PropTypes } from 'react' import { Grid, Row, Col } from 'react-bootstrap' import Sort from '../../components/Sort' import ProjectFilterForm from '../../components/ProjectFilterForm' import Search from '../../containers/Search' import ProjectsDashboardStatContainer from '../../containers/ProjectsDashboar...
export default function mapNodesToColumns({ children = [], columns = 1, dimensions = [], } = {}) { let nodes = [] let heights = [] if (columns === 1) { return children } // use dimensions to calculate the best column for each child if (dimensions.length && dimensions.length === children.length) ...
/** * @fileoverview enforce or disallow capitalization of the first letter of a comment * @author Kevin Partington */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ const...
module.exports = { FIREBASE_URL: 'https://amber-heat-<your-app>.firebaseio.com/', TWITTER_KEY: '', TWITTER_SECRET: '', TWITTER_CALLBACK: process.env.TWITTER_CALLBACK || 'Twitter Callback Url' };
'use strict' const _ = require('lodash') module.exports = { getQueryString(url) { const qs = {} _.forEach(url.split('?').pop().split('&'), s => { if (!s) return const kv = s.split('=') if (kv[0]) { qs[kv[0]] = decodeURIComponent(kv[1]) } }) return qs }, toQuerySt...
'use strict'; var eachAsync = require('each-async'); var onetime = require('onetime'); var arrify = require('arrify'); module.exports = function (hostnames, cb) { cb = onetime(cb); eachAsync(arrify(hostnames), function (hostname, i, next) { var img = new Image(); img.onload = function () { cb(true); // ...
//IP Flow Information Export (IPFIX) Entities // Last Updated 2013-01-15 // http://www.iana.org/assignments/ipfix/ipfix.xml var entities = []; //ipfix-information-elements entities['elements'] = { "1":{"name":"octetDeltaCount","dataType":"unsigned64","dataTypeSemantics":"deltaCounter","group":"flowCounter","units":"...
/* @flow */ import { InputTypeComposer, type ObjectTypeComposerFieldConfigAsObjectDefinition, } from 'graphql-compose'; import { getTypeName, type CommonOpts, desc } from '../../../utils'; import { getAllAsFieldConfigMap } from '../../Commons/FieldNames'; export function getRangeITC<TContext>( opts: CommonOpts<...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.16/esri/copyright.txt for details. //>>built define({lblItem:"\u30a2\u30a4\u30c6\u30e0",title:"\u30b5\u30a4\u30f3 \u30a4\u30f3",info:"{server} {resource} \u306e\u30a2\u30a4\u30c6\u30e0\u306b\u30a2\u30af\u30bb...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // Split the input into chunks. exports.default = (function (input, fail) { var len = input.length; var level = 0; var parenLevel = 0; var lastOpening; var lastOpeningParen; var lastMultiComment; var lastMultiCommen...
angular.module("umbraco") .controller("Umbraco.PropertyEditors.RTEController", function ($rootScope, $scope, $q, $locale, dialogService, $log, imageHelper, assetsService, $timeout, tinyMceService, angularHelper, stylesheetResource, macroService, editorState) { $scope.isLoading = true; //...
'use strict'; var isA = require("Espresso/oop").isA; var oop = require("Espresso/oop").oop; var init = require("Espresso/oop").init; var trim = require("Espresso/trim").trim; var isA = require("Espresso/oop").isA; var oop = require("Espresso/oop").oop; function RequestInterface(){ oop(this,"Espresso/Http/RequestIn...
module.exports = function(dataUri, maxDimension, callback){ var source = new Image(); source.addEventListener('load', function(){ var canvas = document.createElement('canvas'), ratio = Math.max(source.width, source.height) / maxDimension; canvas.width = source.width / ratio; ...
// @flow import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import Middleware from './Middleware'; type Base = { href?: string, target?: string, }; type Link = { crossOrigin?: string, href?: string, hrefLang?: string, integrity?: string, media?: string, preload?: bool...
import { RESOURCE, SERVER_ERRORS, INITIAL_STATE_WITH_CACHED_LIST, INITIAL_STATE_WITH_LIST_BEING_FETCHED, INITIAL_STATE_WITH_CACHED_AND_SELECTED_LIST, } from '../mocks' import { generateListResourceActions } from './mocks' const request = () => Promise.resolve([RESOURCE]) const errorRequest = () => ...
import React, {Component} from 'react'; import MiniInfoBar from '../components/MiniInfoBar'; export default class About extends Component { state = { showKitten: false } handleToggleKitten() { this.setState({showKitten: !this.state.showKitten}); } render() { const {showKitten} = this.state; ...
define([ "dojo/_base/array", "dojo/_base/connect", "dojo/_base/declare", "dojo/_base/lang", "dojo/_base/window", "dojo/dom", "dojo/dom-class", "dojo/dom-construct", "dojo/dom-style", "dijit/registry", "dijit/_Contained", "dijit/_Container", "dijit/_WidgetBase", "./ProgressIndicator", "./ToolBarButton", ...
/** @jsx jsx */ import { Editor } from 'slate' import { jsx } from '../..' export const input = ( <editor> <block> <mark key="a"> <anchor />o </mark> n <mark key="b"> e<focus /> </mark> </block> </editor> ) export const run = editor => { return Array.from(E...
/* * Popular Repositories * Copyright (c) 2014 Alberto Congiu (@4lbertoC) * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ 'use strict'; var React = require('react'); /** * Like Array.map(), but on an object's own properties. ...
import assert from 'assert' import {fixCase} from '../../src/lib/words/case' import Locale from '../../src/locale/locale' describe('Corrects accidental uPPERCASE\n', () => { let testCase = { 'Hey, JEnnifer!': 'Hey, Jennifer!', 'CMSko': 'CMSko', 'FPs': 'FPs', 'ČSNka': 'ČSNka', 'BigONE': 'BigONE', ...
/** * Reparse the Grunt command line options flags. * * Using the arguments parsing logic from Grunt: * https://github.com/gruntjs/grunt/blob/master/lib/grunt/cli.js */ module.exports = function(grunt){ // Get the current Grunt CLI instance. var nopt = require('nopt'), parsedOptions = parseOptions(nopt, gru...
module.exports = { "name": "ATmega16HVB", "timeout": 200, "stabDelay": 100, "cmdexeDelay": 25, "syncLoops": 32, "byteDelay": 0, "pollIndex": 3, "pollValue": 83, "preDelay": 1, "postDelay": 1, "pgmEnable": [172, 83, 0, 0], "erase": { "cmd": [172, 128, 0, 0], "delay": 45, "pollMethod":...
const express = require('express'); const app = express(); const path = require('path'); const userCtrl = require('./userCtrl.js'); //extra middleware const bodyParser = require('body-parser'); app.use(bodyParser.urlencoded({extended: true}), bodyParser.json()); app.use(express.static(path.join(__dirname, '../../node...
exports.find = function(options) { options || (options = {}); options.param || (options.param = 'query'); options.parse || (options.parse = JSON.parse); return function(req, res, next) { var query = req.query[options.param]; var conditions = query ? options.parse(query) : {}; re...
// MooTools: the javascript framework. // Load this file's selection again by visiting: http://mootools.net/more/f0c28d76aff2f0ba12270c81dc5e8d18 // Or build this file again with packager using: packager build More/Assets More/Hash.Cookie /* --- script: More.js name: More description: MooTools More license: MIT-st...
'use strict'; module.exports = require('./toPairsIn'); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2NsaWVudC9saWIvbG9kYXNoL2VudHJpZXNJbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLE9BQU8sT0FBUCxHQUFpQixRQUFRLGFBQVIsQ0FBakIiLCJmaWxlIjoiZW50cmllc0luLmpzIiwic291cmNlc0...
var chalk = require('chalk'); var safeStringify = require('fast-safe-stringify') function handleErrorObject(key, value) { if (value instanceof Error) { return Object.getOwnPropertyNames(value).reduce(function(error, key) { error[key] = value[key] return error }, {}) } return value } function...
"use strict" const createTileGridConverter = require(`./createTileGridConverter`) const colorDepth = require(`./colorDepth`) module.exports = ({palette, images}) => { const converter = createTileGridConverter({ tileWidth: 7, tileHeight: 9, columns: 19, tileCount: 95, raw32bitData: colorDepth.con...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ $(document).ready(function(){ var oldAction = $('#comment-form').attr("action"); hljs.initHighlightingOnLoad(); $('#coolness div').hover(function(){ $('#coolness .second').fadeOut(50...
(function(Object) { Object.Model.Background = Object.Model.PresentationObject.extend({ "initialize" : function() { Object.Model.PresentationObject.prototype.initialize.call(this); } },{ "type" : "Background", "attributes" : _.defaults({ "skybox" : { "type" : "res-texture", "name" : "...
import './Modal.scss' import pugTpl from './Modal.pug' import mixin from '../../mixin' import alert from '@vue2do/component/module/Modal/alert' import confirm from '@vue2do/component/module/Modal/confirm' export default { name: 'PageCompModal', template: pugTpl(), mixins: [mixin], data() { return { ...
var a;function SongView(){ListView.call(this);this.name="SongView";this.allDataLoaded=this.songsLoaded=false;this.sortVariable="bezeichnung"}Temp.prototype=ListView.prototype;SongView.prototype=new Temp;songView=new SongView;a=SongView.prototype; a.getData=function(d){if(d){var c=[];allSongs!=null&&$.each(churchcore_so...
"use strict"; var i = 180; //3分固定 function count(){ if(i <= 0){ document.getElementById("output").innerHTML = "完成!"; }else{ document.getElementById("output").innerHTML = i + "s"; } i -= 1; } window.onload = function(){ setInterval("count()", 1000); };
define(['omega/entity', 'omega/core'], function (e, o) { 'use strict'; var triggerKey = function (action, e) { o.trigger(action, { keyCode: e.keyCode, shiftKey: e.shiftKey, ctrlKey: e.ctrlKey, altKey: e.altKey }); }; window.onkeydown =...
$(window).on('load', function() {//main const dom = {//define inputs tswitch: $("#wave-switch input"), aSlider: $("input#angle"),//angle slider nSlider: $("input#refractive-index-ratio"), }; let layout = {//define layout of pot showlegend: false, ...
'use strict'; memoryApp.controller('AuthCtrl', function ($scope, $location, AuthService) { $scope.register = function () { var username = $scope.registerUsername; var password = $scope.registerPassword; if (username && password) { AuthService.register(username, password).then( function () ...
var xmas = {}; (function() { xmas.present = { box: {} }; }()); (function(global) { global.xmas.present.box.color = 'Red'; }(this));
/** * A decorator for making sure specific function being invoked serializely. * * Usage: * class A { * @serialize * async foo() {} * } * */ export default function serialize(target, key, descriptor) { let prev = null; function serializeFunc(...args) { const next = () => Promise.resolve(descr...
var functions = {} functions.evaluateSnapshotType = function (name) { var splittedName = name.split('-') var type = splittedName[splittedName.length - 1].split('.')[0] return type === 'motion' ? type : type === 'snapshot' ? 'periodic' : 'unknown' } functions.getSnapshotDate = function (name) { var splittedDa...
(function() { 'use strict'; angular .module('rtsApp') .directive('hasAuthority', hasAuthority); hasAuthority.$inject = ['Principal']; function hasAuthority(Principal) { var directive = { restrict: 'A', link: linkFunc }; return directive...
var async = require('async'); function captainHook(schema) { // Pre-Save Setup schema.pre('validate', function (next) { var self = this; this._wasNew = this.isNew; if (this.isNew) { this.runPreMethods(schema.preCreateMethods, self, function(){ next(); }); } else { this.ru...
import * as React from 'react'; function CubeIcon(props) { return ( <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" {...props} > <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} ...
var repl = require('repl'); var server = repl.start({}); var con = server.context; con.name='zfpx'; con.age = 5; con.grow = function(){ return ++con.age; }
export default { queryRouteList: '/routes', queryUserInfo: '/user', logoutUser: '/user/logout', loginUser: 'POST /user/login', queryUser: '/user/:id', queryUserList: '/users', updateUser: 'Patch /user/:id', createUser: 'POST /user', removeUser: 'DELETE /user/:id', removeUserList: 'POST /users/dele...
import Controller from '@ember/controller'; import { debounce } from '@ember/runloop'; import fetch from 'fetch'; import RSVP from 'rsvp'; export default class extends Controller { searchRepo(term) { return new RSVP.Promise((resolve, reject) => { debounce(_performSearch, term, resolve, reject, 600); })...
import controller from './controller'; import template from './template.pug'; routes.$inject = ['$stateProvider', '$urlRouterProvider']; export default function routes($stateProvider, $urlRouterProvider){ $stateProvider.state('main.item', { url: '/:id/item', template: template, controllerAs: 'ctrl', contro...
var config = require('./config') var webpack = require('webpack') var merge = require('webpack-merge') var utils = require('./utils') var baseWebpackConfig = require('./webpack.base.conf') var HtmlWebpackPlugin = require('html-webpack-plugin') var FriendlyErrors = require('friendly-errors-webpack-plugin') // add hot-r...
var margin = {top: 0, right: 0, bottom: 0, left: 130}, width = 1500 - margin.right - margin.left, height = 470 - margin.top - margin.bottom; var i = 0, duration = 750, root; var tree = d3.layout.tree() .size([height, width]); var diagonal = d3.svg.diagonal() .projection(function(d) { return [...
import { EventBus } from '../wires/event_bus'; class EventStore { constructor(storeAdapter) { this.adapter = storeAdapter; } appendToStream(streamId, expectedVersion, events) { if (events.length === 0) { return; } events.forEach(function(event) { thi...
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 15l-5-5h3V9h4v4h...
(function () { 'use strict'; angular .module('app.home') .config(appRun); /* @ngInject */ function appRun($stateProvider) { $stateProvider .state('root.home', { url: '/', templateUrl: 'app/home/home.html', controller: 'Home', controllerAs: 'vm', }); } ...
import React from 'react'; import { Text, View, TextInput, } from 'react-native'; import newChallengeStyles from '../../styles/newChallenge/newChallengeStyles'; import mainStyles from '../../styles/main/mainStyles'; import ItemSelectView from './ItemSelectView'; const propTypes = { onChallengeUpdate...
import React, {PropTypes} from 'react'; import L from 'leaflet'; import gh from '../api/GitHubApi'; import RaisedButton from 'material-ui/RaisedButton'; const REPO_TIMESPAN = { ALLTIME: 0, THIRTYDAYS: 1, SIXTYDAYS: 2, ONEYEAR: 3 }; const defaultMapConfig = { options: { center: [ ...
function lessThan (a, b) { return a < b } function main () { for (var i = 0; i < 10000; i++) { lessThan(1, 0x7fffffff) } for (var i = 0; i < 10000; i++) { lessThan(1, Infinity) } for (var i = 0; i < 10000; i++) { lessThan(1, 0x7fffffff) } } main()
/*! * hybridify-all <https://github.com/hybridables/hybridify-all> * * Copyright (c) 2015 Charlike Mike Reagent, contributors. * Released under the MIT license. */ 'use strict' var reduce = require('object.reduce') var hybridify = require('hybridify') /** * > Hybridifies all the selected functions in an object...
/*! p5.dom.js v0.3.3 May 10, 2017 */ /** * <p>The web is much more than just canvas and p5.dom makes it easy to interact * with other HTML5 objects, including text, hyperlink, image, input, video, * audio, and webcam.</p> * <p>There is a set of creation methods, DOM manipulation methods, and * an extended p5.Eleme...
import { createStore } from '@utils/store.utils'; import placeholderImage from '../images/placeholder.jpeg'; import { getPhotoUrl, getPrefetchedPhotoForDisplay } from './api'; import { getLocalPhotoPath, getRandomLocalPhoto } from './photos.local'; import Settings from './settings'; export const getStateObject = (forc...
import {Component} from 'react'; import {reduxForm} from 'redux-form'; import './CreateTodoForm.styl'; class CreateTodoForm extends Component { render() { return ( <form className="create-todo-form" onSubmit={this.props.handleSubmit} autoComplete="off"> <input type="text" placeholder="Todo text......
import React, { useState, useRef } from 'react'; import { computeOutOffsetByIndex, computeInOffsetByIndex } from './lib/Util'; // import { SVGComponent } from './lib-hooks/svgComp-hooks'; import Spline from './lib/Spline'; import DragNode from './lib/Node'; const index = ({ data, onNodeDeselect, onNodeMove...
var t = require('chai').assert; var P = require('bluebird'); var Renderer = require('../').Renderer; var view = { "name": { "first": "Michael", "last": "Jackson" }, "age": "RIP", calc: function () { return 2 + 4; }, delayed: function () { return new P(function (resolve) { setTimeout(r...
/** * Pre Tests * Check to make sure jQuery and Zest are loaded */ module("Setup"); test("jQuery is loaded", function() { expect(3); ok( jQuery, "jQuery is defined." ); ok( $, "$ is defined."); equal( typeof jQuery, "function", "jQuery is a function." ); }); test("Zest i...
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), errorHandler = require('./errors.server.controller'), Task = mongoose.model('Task'), Project = mongoose.model('Project'), Person = mongoose.model('Person'), _ = require('lodash'); /** * Create a Task */ var person, project;...
// angular.module is a global place for creating, registering and retrieving Angular modules // 'directory' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' // 'directory.services' is found in services.js // 'directory.controllers' ...
import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; import { get } from '@ember/object'; export default Route.extend({ ajax: service(), model() { return get(this, 'ajax').request( 'https://api.github.com/repos/ember-cli/ember-ajax/commits', { heade...
const fs = require('fs'); class Loader { static extend (name, loader) { return { name, loader }; } static get (name, options) { const item = options.loaders.find((loader) => name === loader.name); if (!item) { throw new Error(`Missing loader for ${name}`); } return item.loader; } ...
/** * @license angular-sortable-column * (c) 2013 Knight Rider Consulting, Inc. http://www.knightrider.com * License: MIT */ /** * * @author Dale "Ducky" Lotts * @since 7/21/13 */ basePath = '..'; files = [ JASMINE, JASMINE_ADAPTER, 'bower_components/jquery/dist/jquery.js', 'bower_...
const storage = require("./storage"); const recognition = require("./recognition"); async function labelPictures(bucketName) { const bucket = await storage.getOrCreateBucket(bucketName); const fileNames = await storage.ls(bucket); for (const file of fileNames) { console.log(`Retrieve labels for fi...
'use strict'; describe('TestComponent', function () { var componentController; beforeEach(module('APPLICATION')); beforeEach(inject(function ($componentController) { componentController = $componentController('testComponent', null, { test: { data: 'data' } ...
import Ember from 'ember'; export default Ember.Controller.extend({ resume: Ember.inject.controller(), actions: { scrollToElem: function(selector) { this.get('resume').send('scrollToElem', selector); }, selectTemplate: function(template) { this.get('resume').send('selectTemplate', template)...
process.env.NODE_ENV = 'test'; const chai = require('chai'); const chaiHttp = require('chai-http'); const should = chai.should(); const CostCalculator = require("../libs/costcalculator"); describe('Calculate Cost', () => { describe("Book Meeting Room", () => { it("it should calcuate cost for meetin...
module.exports = { // Token you get from discord "token": "", // Prefix before your commands "prefix": "", // Port for webserver (Not working) "port": 8080, // Mongodb stuff "mongodb": { // Mongodb uri "uri": "" }, // Channel IDs "channelIDs": { // Where to announce the events in A...
Object.prototype.getKeyByValue = function( value ) { for( var prop in this ) { if( this.hasOwnProperty( prop ) ) { if( this[ prop ] === value ) return prop; } } }
require('./ramda-mori')
/*istanbul ignore next*/'use strict'; 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.configurable = true; if ("value" in descriptor) descriptor.writable =...
// shexmap-simple - Simple ShEx2 validator for HTML. // Copyright 2017 Eric Prud'hommeux // Release under MIT License. const ShEx = ShExWebApp; // @@ rename globally const ShExJsUrl = 'https://github.com/shexSpec/shex.js' const RdfJs = N3js; const ShExApi = ShEx.Api({ fetch: window.fetch.bind(window), rdfjs: RdfJs, ...
var Branch = function (origin, baseRadius, baseSegment, maxSegments, depth, tree) { this.gid = Math.round(Math.random() * maxSegments); this.topPoint = origin; this.radius = baseRadius; this.maxSegments = maxSegments; this.lenghtSubbranch = tree.genes.pSubBranch !== 0 ? Math.floor(maxSegments * tree.gene...
'use strict'; var assert = require('assert') , TestEvents = require('../lib/TestEvents'); var wasCalled = false; var FN = function (ev) { wasCalled = true; }; describe('TestEvents', function () { beforeEach(function () { wasCalled = false; }); describe('#on', function () { it('Should bind a funct...
//process.argv.forEach(function (val, index, array) { console.log(index + ': ' + val); }); var fs = require('fs'); (function () { function slugify(text) { text = text.replace(/[^-a-zA-Z0-9,&\s]+/ig, ''); text = text.replace(/-/gi, "_"); text = text.replace(/\s/gi, "-"); return text; } var DocGen = { ...
'use strict'; exports.name = '/activation';