code
stringlengths
2
1.05M
var expect = require('expect.js'), options = require('../lib/options'); describe("options", function() { describe("#firstNumberTest", function() { it("should be true when divisble by 3", function() { expect(options.firstNumberTest(3,3)).to.be(true); }); it("should be false when divisble by 3...
'use strict'; /** * @module * @copyright paywell Team at byteskode <www.byteskode.com> * @description redis client factories * @since 0.1.0 * @author lally elias<lallyelias87@gmail.com, lally.elias@byteskode.com> * @singleton * @public */ //dependencies const path = require('path'); const redis = require('r...
"use strict"; exports.__esModule = true; exports.default = createTemplateBuilder; var _options = require("./options"); var _string = _interopRequireDefault(require("./string")); var _literal = _interopRequireDefault(require("./literal")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : ...
var passport = require('passport'), jwt = require('jsonwebtoken'), extend = require('json-extend'), common = require('./common'), Client = require('./client'); function Strategy(identifier, config) { if(typeof(identifier) === 'object') { config = identifier; identifier = 'identity3-...
import http from 'http' // HTTP Server import express from 'express' // HTTP improvements import bodyParser from 'body-parser' // Parse JSON import cors from 'cors' // Cross-origin resource sharing import blocked from 'blocked' // detect if a node event loop is blocked import api from '~/api' import config from '~/con...
// Description of supported double byte encodings and aliases. // Tables are not require()-d until they are needed to speed up library load. // require()-s are direct to support Browserify. module.exports = { // == Japanese/ShiftJIS ==================================================== // All japanese enc...
/* --> carouselit jQuery Plugin <-- author : Horacio Herrera website : hherrerag.com twitter : @hhg2288 email: : me@hherrerag.com description : plugin to made a simple carousel of list objects SYNTAX: $("yourSelector").carouselit({ step ---> how many blocks it move , visible ---> how many bloc...
var models = require('../database'); var config = require('../config/config'); var Boom = require('boom'); var Joi = require('joi'); // private internal functions var internals = {}; exports.login = { tags: ['auth', 'login'], description: "App login endpoint with cookie session init", auth: { mode: 'try', stra...
'use strict'; exports.redis = { client: { host: '127.0.0.1', port: 6379, password: '', db: '0', }, agent: true, }; exports.keys = 'keys';
export { default } from './DeviceChanger';
'use strict'; const R = require('ramda'); const Bluebird = require('bluebird'); const OtomatkError = require('./error'); class Expressify { constructor(model) { this.model = model; } nextErr(next) { return (err) => next(new OtomatkError(err)); } query() { var _model = this.model; ...
module.exports = { entry: './example/index.js', output: { filename: 'bundle.js' }, module: { rules: [ { test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader', options: { forceEnv: 'browser' } }, { test: /\.css/, ...
/** * Created by Pencroff on 05.01.2015. */ module.exports = { primaryKey:'id', identity: 'pet', datastore: 'flat', attributes: { id: { type: 'number', autoMigrations: { autoIncrement: true, columnType:'integer' } }, name: {type: 'string',autoMigrations: { columnType:'text' } }, ...
var _ = require('underscore'), nconf = require('nconf'), fs = require('fs'), path = require('path'), utils = require('./lib/utility'); // Default nconf nconf.use('memory'); _.each({ debug: false }, function(v, k) { nconf.set(k, v); }); // New stuff! var Manager = require('./lib/manager'), main = new Manager()...
// borrow from universal-redux-boilerplate // https://github.com/savemysmartphone/universal-redux-boilerplate export default class ReduxResolver { constructor () { this.pending = [] this.firstRendering = true } resolve (action) { const [, ...args] = arguments if (process.env.BROWSER && !this.fi...
module.exports = exports = { lang: 'zh-cn', newglyph: '新字形', undo: '撤销', redo: '重做', import: '导入', import_svg: '导入svg', import_svg_title: '导入svg格式字体文件', import_pic: '导入图片', import_pic_title: '导入包含字形的图片', import_font: '导入字体文件', import_font_title: '导入ttf,woff,eot,otf格式字体文件', ...
'use strict'; var gulp = require('gulp'); var del = require('del'); var concat = require('gulp-concat'); var stripDebug = require('gulp-strip-debug'); var uglify = require('gulp-uglify'); var rename = require('gulp-rename'); var gutil = require('gulp-util'); var runSequence = require('run-sequence'); gulp.task('clean...
/** * @ngdoc module * @name material.components.buttons * @description * * Button */ angular.module('material.components.button', [ 'material.animations', ]) .directive('materialButton', [ MaterialButtonDirective ]); /** * @ngdoc directive * @name materialButton * @order 0 * * @restrict E * * @d...
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b)...
pageName=location.pathname.split('/').pop().split('.')[0]||'index'; siteTpl={}; $.when( resload('css/style.css'), resload('js/siteapi.js'), resload('js/sitecontroller.js'), resload('js/pages/'+pageName+'.js'), resload('templates/header.html', siteTpl, 'header'), resload('templates/'+pageName+'.html', siteTp...
var path = require('path'); var fakeson = require('./fakeson'); module.exports = function(folder, update) { var cache = {}; return function(req, res) { var url = req.url; var fullpath = path.join(folder, req.url+'.fakeson'); try { var jsonString; if (!update && cache[fullpath]) { ...
import Layout from '../components/layout' export default function Home() { return ( <Layout> <div>Hello World.</div> </Layout> ) }
module.exports = function(grunt) { var os = require('os'); var ifaces = os.networkInterfaces(); var lookupIpAddress = null; for (var dev in ifaces) { if (dev !== "en1" && dev !== "en0") { continue; } ifaces[dev].forEach(function(details) { if (details.fa...
var db = require('./db') var prop = process.argv[2] var value = process.argv[3] db.sublevel('index') .createQueryStream(prop, value) .on('data', function (value) { console.log(value) })
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; // import {Map, InfoWindow, Marker, Polygon, GoogleApiWrapper} from 'google-maps-react'; import history from '../history'; import { poiClusters } from '../Config/sampleMapClusters'; import appConfig from '../Config/params'; import MapComponent...
var searchData= [ ['protocol_5ftype_5ft',['protocol_type_t',['../_i_s_comm_8h.html#a932bee6e7c2e702a8cce14cfd728ba92',1,'ISComm.h']]] ];
$('#signIn').on('click', (e) => { e.preventDefault(); const email = $('#email').val(); const password = $('#password').val(); const payload = { email: email, password: password }; $.ajax({ url: '/signIn', method: 'POST', data: payload }).done((data) => { if (data.message) { i...
var stage = 0; var delimiter = ','; function removeTemplateData() { $('#fileUploadTemplate').hide(); $('#fileUploadTemplateInput').val(null); } function removeDataSourceData() { $('#fileUploadDataSource').hide(); $('#fileUploadDataSourceInput').val(null); $("#TableIndex").hide(); $("#TableDe...
function supportNewKeyboardEvent(){ var newElement = document.createElement('input'); try{ var charA = 65; e = new KeyboardEvent('keypress', { key: 'A', code: 'KeyA', }); newElement.focus(); newElement.dispatchEvent(e); return new...
import React from 'react'; import IngredientsField from './IngredientsField'; import { Section } from 'components/common'; function IngredientsSection(props) { const { inputProps, ...rest } = props; const caption = 'Tip: You can paste multiple ingredients at once.'; const isError = !!inputProps.error; retur...
function foo() { if (a) { y(); return; } } function bar() { y(); return; } function baz() { if (a) { y(); if (b) { return; } return; } return; } // keep non-redundant returns function foo1() { if (a) { y(); return; } x(); }
/** * Courses services */ "use strict"; angular.module("k2pServices") .factory("Courses", ["$resource", function($resource) { return $resource("/api/courses/:courseId/:sub", {}, { getStudents: { method: "GET", params: { sub: "students" }, isArray: true } ...
var config = require('traveling_salesman/config'), utils = require('traveling_salesman/utils'); /* * TravelingSalesmanMap * * Description: Generate virtual map to run traveling salesman experiment on * * Parameters: * sender - who is calling this * callback - callback called when initialization i...
'use strict' module.exports = { branches: require('./branches'), milestones: require('./milestones'), project: require('./project'), projectEvents: require('./project_events'), }
define( [ 'knockout', '../control-base', 'text!./control-radio-view.html' ], function (ko, ComponentBase, template) { ko.components.register('control-radio', { viewModel: ComponentBase, template: template } ); ...
import {Store} from 'flux/utils'; import AppDispatcher from '../dispatcher/AppDispatcher'; import LogReaderConstants from '../actions/ActionTypes'; import Immutable from 'immutable'; class LogStore extends Store { constructor(dispatcher){ super(dispatcher); this.logdata = Immutable.List(); ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Cookie = exports.Cookie = { createCookie: function createCookie(name, value, expireTime) { expireTime = !!expireTime ? expireTime : 15 * 60 * 1000; // Default 15 min var date = new Date(); date.setTime(date...
// https://pedrohs.github.io/criando-banco-de-dados-com-nedb/ var nedb = require('nedb'); var db = new nedb( { filename: 'banco.nedb', autoload: true, timestampData: true, flushDataOnCompaction: true }); // Original {"name":"Update da Silva ...
import $ from 'jquery'; import Component from '@ember/component'; import DataTablesHelpers from 'api-umbrella-admin-ui/utils/data-tables-helpers'; import I18n from 'npm:i18n-js'; import { computed } from '@ember/object'; import { inject } from '@ember/service'; export default Component.extend({ session: inject('sess...
$(document).ready(function () { $("nav li a.custom").click(function (event) { event.preventDefault(); var menuItemId = $(this).attr("data-item"); showModalEditor("Edit Menu Item: " + $(this).attr("data-itemname"), "/Admin/MenuItem/Edit?menuItemId=" + menuItemId); }); });
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||...
'use strict'; const path = require('path'); const staticPath = path.resolve(__dirname, 'lib', 'static'); module.exports = { entry: './main.js', context: staticPath, output: { path: staticPath, filename: 'bundle.min.js' }, module: { rules: [ { tes...
import React from "react"; const label = { display: "inline-block", fontWeight: 700, marginBottom: 0.25 }; const input = { border: "1px solid", borderColor: "blue", marginBottom: 0.25, resize: "none", width: "100%" }; const button = { fontSize: "1em", margin: "1em", padding: "0.25em 1em", bor...
"use strict" Meteor.startup(function () { Meteor.subscribe('users') }) Template.userList.events({ 'click .name a': manageRolesClicked, 'click .roles': manageRolesClicked }) Template.userList.helpers({ users: function () { return Meteor.users.find() }, mobile: function () { var profile = this.pro...
'use strict'; /** * Module dependencies. */ var should = require('should'), mongoose = require('mongoose'), Grid = require('gridfs-stream'); /** * Globals */ var connected = mongoose.Connection.STATES.connected; var db = mongoose.connection.db; var mongo = mongoose.mongo; /** * Unit tests */ de...
/** * the-wall-of-quotes * * Copyright 2016-2017, Andrea Sonny, All rights reserved. * * @author: Andrea Sonny <andreasonny83@gmail.com> */ // look in ./config for protractor.conf.js exports.config = require('./config/protractor.conf.js').config;
var sisr__smooth_8h = [ [ "SISRSmoother", "classSISRSmoother.html", "classSISRSmoother" ], [ "Mat", "sisr__smooth_8h.html#ae601f56a556993079f730483c574356f", null ], [ "Vec", "sisr__smooth_8h.html#a4c7df05c6f5e8a0d15ae14bcdbc07152", null ], [ "SISRResampStyle", "sisr__smooth_8h.html#a2486051fd2028dedca5...
'use strict'; var chai = require('chai'), expect = chai.expect, sinon = require('sinon'), sinonChai = require("sinon-chai"), expectSinonChai = chai.use(sinonChai), util = require('util'), lodash = require('lodash'), errors = require('../../lib/errors'), DirectiveContext = require('trbl-evergreen/lib/di...
const fs = require('fs'); const { resolve } = require('path'); const merge = require('lodash.merge'); const environment = process.env.NODE_ENV || 'development'; const debug = environment === 'development' && !process.argv.includes('build'); const sandbox = process.env.SANDBOX === 'true' || debug; const overrideProp = ...
/* The MIT License (MIT) Copyright (c) 2016 Narendra Sisodiya https://github.com/nsisodiya */ module.exports = function (Main, Rest) { Rest.map((v) => { return Object.getOwnPropertyNames(v.prototype); }).reduce(function (a, b) { return a.concat(b); }, []).filter(function (item, pos, arr) { return arr.ind...
function Clouds() { function webGlSupport() { try { return !!window.WebGLRenderingContext && !!document.createElement('canvas').getContext('experimental-webgl'); } catch(e) { return false; } } this.start = function() { container = document.createElement('div'); $('body').prepend(c...
export const logError = message => { console.error(message); };
module.exports = { "extends": ["eslint:recommended", "google"], "env": { // For more environments, see here: http://eslint.org/docs/user-guide/configuring.html#specifying-environments "browser": true, // "es6": true }, "rules": { // Insert custom rules here "no-var": "off", }, }
var key = 'rabbit__compressed'; var data = {data: [{age: 1}, {age: '2'}]}; var rabbit_c = new SecureLS({encodingType: 'rabbit'}); ae = rabbit_c.RABBIT.encrypt(JSON.stringify(data), 's3cr3t@123'); bde = rabbit_c.RABBIT.decrypt(ae.toString(), 's3cr3t@123'); de = bde.toString(rabbit_c.enc._Utf8); rabbit_c.set(key, data);...
"use strict"; exports.__esModule = true; exports.RecaptchaV2 = exports.RecaptchaExpired = exports.RecaptchaError = exports.RecaptchaVerified = void 0; var _aureliaFramework = require("aurelia-framework"); var _recaptchaBase = require("./recaptcha-base"); var _dec, _class, _class2, _descriptor, _descriptor2, _descri...
var app = app || {}; (function(){ app.TestButton = React.createClass({displayName: "TestButton", handleClick: function() { this.props.submitTestTask(this.props.btnType); }, render: function() { return ( React.createElement("button", {onClick: this.handleClick, ...
/** * Logger * ====== */ var colors = require('./ui/colorize'), inherit = require('inherit'); /** * Логгер. В данной реализации — обертка над console.log. * Выводит в консоль процесс сборки проекта. * @name Logger */ var Logger = module.exports = inherit( /** @lends Logger.prototype */ { /** * Кон...
/* * Kendo UI v2014.2.1008 (http://www.telerik.com/kendo-ui) * Copyright 2014 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial lice...
module.exports = function(SerMcglobalRequests) { };
/** * ng-openweathermap * * A simple & configurable provider for openweathermap.org * * @link https://github.com/OpenServices/ng-weathermap * @author Michael Fladischer <michael@openservices.at> * @license MIT License, http://www.opensource.org/licenses/MIT */ (function (root, factory) { if (typeof define ...
angular.module('elements') .config(function ($routeProvider) { $routeProvider.when('/login', { templateUrl: '/elements/page-login/page-login.html', controller: 'PageLoginCtrl' }) }) .controller('PageLoginCtrl', function($scope, $alert, $location, $auth, BaseUser, LoopBackAuth) { $scope....
'use strict'; var job = require('../index.js'), File = require('vinyl'); describe('gulp-job', sandbox(function () { describe('pre', function () { var buffer; beforeEach(function () { buffer = job.prototype.pre(); }); it('returns a buffer', function () { buffer.should.be.an.instanc...
'use strict'; module.exports = function(name) { name = name.toLowerCase(); if (['test', 'mern', 'mern-cli', 'vendor', 'app'].indexOf(name) > -1) { return false; } if (name.indexOf('.') > -1) { return false; } if (!isNaN(parseInt(name.charAt(0), 10))) { return false; } return true; };
var FS = require('fs'); var Path = require('path'); var io = module.exports = function () { // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];} ...
import storage from '../utils/storageModule' export default { saveClass (c) { storage.session.set('class', c) }, getClass () { return storage.session.get('class') }, saveClassId (id) { storage.session.set('classId', id) }, getClassId () { return storage.session.get('classId') }, saveE...
import { configLoaderCreator } from '@storybook/core/server'; import { logger } from '@storybook/node-logger'; import defaultConfig from './config/babel'; import loadTsConfig from './ts_config'; import { getAngularCliWebpackConfigOptions, applyAngularCliWebpackConfig, } from './angular-cli_config'; const cliWebp...
module.exports = function(config){ config.set({ basePath : './', files : [ 'app/bower_components/angular/angular.js', 'app/bower_components/angular-route/angular-route.js', 'app/bower_components/angular-mocks/angular-mocks.js', 'app/bower_components/lodash/lodash.js', ...
var previous module.exports = error module.exports.clear = clear function error(message) { var element = document.createElement('div') clear() element.classList.add('error-message') element.innerHTML = message document.body.appendChild(element) previous = hide function hide() { if (element.paren...
'use strict'; /** * Module dependencies. */ var fs = require('fs'), http = require('http'), socketio = require('socket.io'), https = require('https'), express = require('express'), morgan = require('morgan'), bodyParser = require('body-parser'), session = require('express-session'), compress = require('compr...
(function($) { var digestQueued = false; var digestRunning = false; var queueDigest = function() { if (!digestQueued) { digestQueued = true; if (!digestRunning) { setTimeout(function() { var maxIters = 10; digestRunnin...
import Ember from 'ember'; import layout from '../templates/components/smd-form-control'; const { computed, Component } = Ember; export default Component.extend({ layout, tagName: 'div', classNames: [ 'smd-form__control', 'mdl-textfield', 'mdl-js-textfield', ], classNameBindings: [ 'input...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.compileSituation = exports.current = exports.get = undefined; var _requests = require('../../requests'); function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (res...
/** PROMISIFY CALLBACK-STYLE FUNCTIONS TO ES6 PROMISES * * EXAMPLE: * const fn = promisify( (callback) => callback(null, "Hello world!") ); * fn((err, str) => console.log(str)); * fn().then((str) => console.log(str)); * //Both functions, will log 'Hello world!' * * Note: The function you pass, may have any arguments yo...
var Notification = require('./Notification'); var AndroidNotification = Notification.extend({ // the array for payload, please see API doc for more information _androidPayload: { 'display_type': 'notification', 'body': { 'ticker': '', 'title': '', 'text': '', // 'icon': '', // 'largeIcon': '', ...
import test from 'ava'; import modifyValues from './index.js'; test('main', t => { t.is(modifyValues({foo: 'UNICORN'}, value => value.toLowerCase()).foo, 'unicorn'); });
'use strict'; angular.module('core').controller('HomeController', ['$scope', 'Authentication','Voitures', function ($scope, Authentication,Voitures) { // This provides Authentication context. $scope.authentication = Authentication; // Find a list of Voitures $scope.trouver = function () { $scop...
import test from 'ava'; import assert from '../helpers/assertions.js'; import File from '../../src/File.js'; import { mix, Mix } from '../helpers/mix.js'; import webpack from '../helpers/webpack.js'; test('mix.ts()', t => { let response = mix.ts('src/app.ts', 'dist'); t.deepEqual(mix, response); t.deepE...
var SystemNotifier = require("../../webgl/system/system-notifier.js"); var RenderNode = require("./rendernode.js"); var DrawableClosure= require("./drawableclosure.js"); var C = require("./constants.js"); var Scene= require("./scene.js"); var ComputeRequest = require("../../../xflow/interface/request.js").ComputeReques...
(function () { 'use strict'; angular.module('simple-chat.app') .factory('Messages', Messages); Messages.$inject = ['$resource']; function Messages($resource) { return $resource('/api/messages/:id'); } })();
'use strict'; module.exports = function(environment) { let ENV = { modulePrefix: 'dummy', environment, rootURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true }, ...
var api_key = 'de882c8150f854766bbeb4388c25881d'; var lat = '51.2'; var lon = '-0.1'; var map = L.map('map').setView([lat,lon],17); L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' }).addTo(map); function loadPhotos(){...
function render_module(name, args) { $('#' + name).load('modules/' + name + '.module.php?' + args); } function activate_module(name, seconds, args) { render_module(name, args); if (seconds > 0) { setInterval("render_module('"+name+"', '"+args+"')", (seconds * 1000)); } } $(document).ready(function() { $...
angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap']) /** * A helper, internal data structure that stores all references attached to key */ .factory('$$multiMap', function() { return { createNew: function() { var map = {}; return { entries: function() { r...
import React, { Component } from 'react' import './App.css' // 组件 import Message from './message' import Timer from './timer' import TodoApp from './todo' import MarkdownEditor from './editor' import Logo from './logo' class App extends Component { // constructor 是类被初始化后自动调用的函数 constructor(props) { super(p...
import withMediaControl from 'EditorWidgets/withMedia/withMediaControl'; const FileControl = withMediaControl(); export default FileControl;
var fs = require('fs'); var fmt = require('util').format; var uniq = require('lodash.uniq'); var path = require('path'); var Plugin = require('broccoli-plugin'); function FastBootConfig(inputNode, options) { Plugin.call(this, [inputNode], { annotation: "Generate: FastBoot package.json" }); this.p...
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ export { withContext } from './withContext'; export { withStyles } from './withStyles'; export { withViewport } from './withViewport';
//NB Very important: there needs to be a reducer for each piece of state // as defined in the store.js file cf. const defaulState //NB all reducers are fired by an action dispatch, we must // therefore check the actions to be handled (pertinent to the reducer) here // and just return state if no action is handl...
'use strict'; var gulp = require('gulp'); var eslint = require('gulp-eslint'); var htmlExtract = require('gulp-html-extract'); var sourcemaps = require('gulp-sourcemaps'); var stylelint = require('gulp-stylelint'); var ts = require('gulp-typescript'); var typings = require('gulp-typings'); gulp.task('lint', ['lint:js...
'use strict'; var gulp = require('gulp'); var del = require('del'); var outputDir = 'static'; gulp.task('clean:static', function() { return del([`${outputDir}/**/*`]); }); gulp.task('copy:js', ['clean:static'], function() { var files = [ 'node_modules/firebase/firebase-app.js', 'node_modules/firebase/fi...
import Ember from 'ember'; var Session = Ember.Object.extend({ user: { isAdmin: false } }); export function initialize(container, application) { application.register('service:session', Session.create(), { instantiate: false }); application.inject('route', 'session', 'service:session'); } export default {...
const electron = require('electron'); const app = electron.app; // Module to control application life. const BrowserWindow = electron.BrowserWindow; // Module to create native browser window. const Menu = electron.Menu; const autoUpdater = electron.autoUpdater; const dialog = electron.dialog; // Report crashes to o...
import { moduleFor, test } from 'ember-qunit'; moduleFor('controller:quiz/q3-1', 'QuizQ31Controller', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); // Replace this with your real tests. test('it exists', function() { var controller = this.subject(); ok(cont...
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2015 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ /** * An Animation instance contains a single animation and the controls to play it. * * It is created by the Anima...
'use strict'; module.exports = { set: function (v) { this.setProperty('border-spacing', v); }, get: function () { return this.getPropertyValue('border-spacing'); }, enumerable: true };
Meteor.startup(function () { if (Parties.find().count() === 0) { var parties = [ { 'name': 'Dubstep-Free Zone', 'description': 'Fast just got faster with Nexus S.' }, { 'name': 'All dubstep all the time', 'description': 'Get it on!' }, { 'name'...
import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; const req = require.context('docs/src/pages/utils/popover', false, /\.md|\.js$/); const reqSource = require.context('!raw-loader!../../docs/src/pag...
var should = require('should'); var helper = require('../support/spec_helper'); var ORM = require('../../'); describe("Event", function() { var db = null; var Person = null; var triggeredHooks = {}; var checkHook = function (hook) { triggeredHooks[hook] = false; return function () { triggeredHoo...
var net = require('net'); var chatServer = net.createServer(); clientList = []; chatServer.on("connection", function(client) { client.write('Hi!\n'); client.name = client.remoteAddress + ":" + client.remotePort; client.write('Hi' + client.name + '\n'); clientList.push(client); client.on('data', func...
const { readFileToArray } = require('./utils'); day1b(); async function day1b(frequencyMap = {}, currentFrequency = 0) { const frequencies = await readFileToArray('./day1-input.txt', function (line) { return Number(line); }) frequencies.reduce((acc, item) => { currentFrequency += item; if (!acc[cu...