code
stringlengths
2
1.05M
import { history } from 'global'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Route } from '@storybook/router'; import { Consumer } from '@storybook/api'; import AboutScreen from './about'; // Clear a notification on mount. This could be exported by core/notifications.js pe...
describe('Transition config test', function() { var async = new AsyncSpec(this); beforeEach(function() { loadFixtures('fixture.html'); }); async.it('should add a class of fancy-leave to the existing container', function(done) { fancyClick.init({ animationMethod: 'transiti...
import { createLocalVue, mount } from '@vue/test-utils' import PluginWrapper from '@/components/Plugin/PluginWrapper' import { Wormhole } from 'portal-vue' const vue = createLocalVue() jest.mock('portal-vue', () => ({ Wormhole: { open: jest.fn(), close: jest.fn() } })) describe('PluginWrapper', () => { ...
'use strict' module.exports = mouseListen var mouse = require('mouse-event') function mouseListen(element, callback) { if(!callback) { callback = element element = window } var buttonState = 0 var x = 0 var y = 0 var mods = { shift: false, alt: false, control: false, meta: ...
const data = [ { client: 'syfy', project: 'Hunters', subtitle: 'interactive experience', colors: { copy: '', headline: '', lockupProjectTitle: '', backbar: '', stat: '#ffffff', statLabel: '#7d2f37', ...
//Problem 6. Point in Circle var x = prompt('Enter x'); var y = prompt('Enter y'); function isWithin(){ var xInt= parseFloat(x); var yInt= parseFloat(y); if((xInt * xInt + yInt * yInt) <= 25){ console.log(true); } else{ console.log(false); } }; var within = isWithin();
var mongoose = require('mongoose') , Bluebird = require('bluebird'); var Project = mongoose.model('Project'); exports.index = function *() { this.body = yield Bluebird.promisify(Project.find, Project)({}, { color: 1, 'image.thumbnail': 1, slug: 1, title: 1 }); }; exports.show = function *(next)...
var util = require('util'), Validator = require('../lib').Validator; // // Definition of validation rules // var MyObjectValidator = function() { Validator.call(this); this.ruleFor('stringProperty').isNotEmpty(); this.ruleFor('otherStringProperty').hasMaximumLength(10); this.ruleFor('numericStringProperty')....
const speak = require('../../lib/speak'); describe('speak', () => { it('should print a cyan message on the screen', () => { const output = speak('This is a message'); expect(output).to.eql({ type: 'console', message: 'This is a message', color: 'cyan' }); }); it('should print a red message on the screen'...
module.exports = install; install.usage = "rappidjs install <pkg>" + "\nrappidjs install <pkg>@<version>" + "\nrappidjs install <pkg> <version>" + "\nrappidjs install <pkg> <version> <dir>" + "\nInstalls rAppidjs dependencies from ./package.json."; var sys = require('util'), child_process = requir...
/** * @license AngularJS v1.4.0-build.3807+sha.b3a9bd3 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) {'use strict'; /** * @ngdoc module * @name ngRoute * @description * * # ngRoute * * The `ngRoute` module provides r...
export const basic_case = {"viewBox":"0 0 64 64","children":[{"name":"g","attribs":{},"children":[{"name":"rect","attribs":{"x":"1","y":"18","fill":"none","stroke":"#000000","stroke-width":"2","stroke-miterlimit":"10","width":"62","height":"36"},"children":[{"name":"rect","attribs":{"x":"1","y":"18","fill":"none","stro...
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import PropTypes from 'prop-typ...
/** * @author Vladimir Kozhin <affka@affka.ru> * @license MIT */ 'use strict'; const Jii = require('../index'); const _isNumber = require('lodash/isNumber'); const _each = require('lodash/each'); const _has = require('lodash/has'); const _size = require('lodash/size'); const BaseObject = require('../base/BaseObjec...
"use strict"; module.exports = function () { return JSON.parse(window.localStorage.ccs || JSON.stringify({})); };
/* * * https://bitbucket.unileversolutions.com * /rest/api/latest/inbox/pull-requests?role=reviewer&limit=20 * /rest/api/latest/inbox/pull-requests?role=author&limit=20 * * https://api.bitbucket.org/2.0/ * /repositories/clanceyp/test-private-01/pullrequests?state="OPEN%20AND%20role=reviewer&limit=20" * /repositories/cl...
version https://git-lfs.github.com/spec/v1 oid sha256:4d7df4bd8494018399317b82e482587b9c2b6f698719af3d84e8cbea5d7ed34f size 313539
/*jshint latedef:false */ var path = require('path'), util = require('util'), yeoman = require('../../../../'); module.exports = Generator; function Generator() { yeoman.generators.NamedBase.apply(this, arguments); this.sourceRoot(path.join(__dirname, '../templates')); // required for collection.js templat...
module.exports = { intro: '以下是Bo比较喜欢的轻应用,快来选择一个了解一下吧<br>', btn1: '易问卷', btn2: '生活查询', btn3:'舌尖上的石大', btn4:'网薪商城', btn5:'通讯录', end:'想了解更多,可以进入石大易班主页噢<br>链接:http://yb.upc.edu.cn/' }
import { merge, defaultResolveConfig, validateConfig, } from '@resolve-js/scripts' const localConfig = { mode: 'development', runtime: { module: '@resolve-js/runtime-single-process', options: { host: 'localhost', port: 3000, }, }, } // mdis-start app-config const appConfig = { re...
var books = require('./books') // Internally, no strings are stored - only numbers. // // "id"s are UIDs, numbers are relative to parent unit; e.g. // Mark 2 and James 2 have different ids, but the same number. function Reference(reference) { if (!reference) { throw new Error('You must supply a Bible reference,...
import { connect } from 'react-redux' import ChannelCreateForm from 'components/Channels/ChannelCreateForm' import { fetchTickers, tickerSelectors } from 'reducers/ticker' import { openChannel } from 'reducers/channels' import { queryFees, paySelectors } from 'reducers/pay' import { balanceSelectors } from 'reducers/ba...
process.env.NODE_ENV = 'test'; let app = require('../app'); let server = app.listen(3002, function () { const port = server.address().port; }); module.exports = server;
import form from './form'; import popup from './popup'; import utils from './utils'; const olturf = { form, popup, utils, }; /** * Fit left position of form within map * @param {object} sizeForm Form's absolute form position and size * @param {object} sizeMap Map's absolute form position and size * @param {...
import {Observable} from '@reactivex/rxjs'; import {EOL} from 'os'; import {createWriteStream, truncateSync} from 'fs'; import json2csv from 'json2csv'; import Promise from 'bluebird'; import {property} from 'lodash'; import { closeMsConn } from '../database'; var toCSV = Promise.promisify(json2csv); export class Csv...
/* jshint expr:true */ import Controller from '@ember/controller'; import { expect } from 'chai'; import { describe, it } from 'mocha'; import { getValidationMessage } from 'ember-advanced-validations/helpers/get-validation-message'; import AdvValidationManager from 'ember-advanced-validations/services/adv-valid...
(function() { 'use strict'; angular.module('civic.search') .controller('SearchController', SearchController); // @ngInject function SearchController($scope) { var vm = $scope.vm = {}; vm.fields = $scope.$parent.fields; // see SearchViewController for field config vm.suggestedSearch = {}; ...
app.factory( 'Player', function() { return { song: null, playlist: null, playing: false, songIndex: null, playPause: function() { this.playing = !this.playing; if (this.playing && !this.song) { this.song = this.playlist.list[0]; this.songIndex = 0; } ...
import React, {Component} from 'react'; class TopBar extends Component { render() { return ( <div className="topbar"> <span className="topbar__title">Recipe <span className="secondary-color">Finder</span></span> </div> ) } } export default TopBar
import { math } from '../../../math/math.js'; import { Vec2 } from '../../../math/vec2.js'; import { Vec3 } from '../../../math/vec3.js'; import { ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL } from '../../../scene/constants.js'; import { EntityReference } from '../../utils/entity-reference.js'; import { ElementDrag...
import React from 'react'; import {Link} from 'react-router'; const HomePage = () => { return ( <div> <h1>React Slingshot</h1> <h2>Get Started</h2> <ol> <li>Remove the demo and start coding: npm run remove-demo</li> </ol> </div> ); }; export default HomePage;
var daemon = require("daemonize").setup({ main: "app.js", name: "sampleapp", pidfile: "sampleapp.pid" }); switch (process.argv[2]) { case "start": daemon.start().once("started", function() { process.exit(); }); break; case "stop": daemon.stop(...
export TwitterWidgetView from './View'; export TwitterWidgetEditor from './Editor';
import Utils from '../utils/utils'; import Mixins from '../utils/mixins'; import F7Badge from './badge'; import F7Icon from './icon'; import __vueComponentTransformJSXProps from '../runtime-helpers/vue-component-transform-jsx-props.js'; import __vueComponentSetState from '../runtime-helpers/vue-component-set-state.js';...
/*! * jQuery UI Form Reset Mixin 1.12.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ //>>label: Form Reset Mixin //>>group: Core //>>description: Refresh input widgets when their form is reset //>>docs: ...
$('#tablaUsuarios').DataTable({ 'paging':true, 'info':true, 'filter':true, 'staveSave':true, 'ajax':{ "url":baseurl+"Cusuarios/getUsuariosController/", "type":"POST", //"data":{ //"p1":p1, //"p2":p2 // } //dataSrc:'' "dataSrc":function(data) { var suma=0; for(var i =0; i<= data.length-1;i++)...
import React from 'react' import { mount } from 'enzyme' import sinon from 'sinon' import { compose, withStateHandlers } from '../' test('withStateHandlers should persist events passed as argument', () => { const component = ({ value, onChange }) => <div> <input type="text" value={value} onChange={onChang...
/*! jQuery UI - v1.9.2 - 2015-04-05 * http://jqueryui.com * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ jQuery(function(e){e.datepicker.regional.hi={closeText:"बंद",prevText:"पिछला",nextText:"अगला",currentText:"आज",monthNames:["जनवरी ","फरवरी","मार्च","अप्रेल","मई","जून","जूलाई","अगस्त ","...
var groove = Meteor.npmRequire('groove'), playlist = groove.createPlaylist(), player = groove.createPlayer(); Meteor.methods({ playTrack: function(track) { groove.open(track.path, function(err, file) { if (err) throw err; playlist.insert(file); player.attach(playlist, function(err) { if (err) throw ...
// command - widget 'use strict'; var helper = require('../lib/helper'), Promise, _, colors, request, archy, ncp, open, inquirer, indent, tree, cache; var initer = helper.init(function(){ Promise = require('bakari-promise'); _ = require('underscore'); colors = require('ansi-256-colors'); request = req...
/* Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. */ 'use strict' /** * Definition for singly-linked list. * function ListNode(val) { * this.val = val; * this.next = null; * } */ /*...
Session.setDefault('curProjectId', null); Session.setDefault('curProjectName', null);
import { injectGlobal } from "emotion" const colors = { dark: `#282c34`, white: `#ffffff`, } const prismColors = { char: `#D8DEE9`, comment: `#999999`, keyword: `#c5a5c5`, lineHighlight: `#14161a`, primitive: `#5a9bcf`, string: `#8dc891`, variable: `#d7deea`, boolean: `#ff8b50`, punctuation: `#5...
exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['basic.js'] }
requirejs.config({baseUrl: '../static', paths: {app: '../js'}});
'use strict'; exports.__esModule = true; exports.default = { error: { forgotPassword: { too_many_requests: 'Hai raggiunto il limite di tentativi di modifica della password . Attendi prima di riprovare.', 'lock.fallback': 'Ci dispiace, qualcosa è andato storto durante la richiesta di modifica della pa...
/* eslint-disable no-unused-expressions */ import supertest from 'supertest'; import { expect } from 'chai'; import { testHelper, defaultPassword } from '../testHelper'; import models from '../../server/models'; const app = require('../../build/server'); const request = supertest.agent(app); const adminUser = testHe...
/* * @Author: Sze Ka Wai Raymond (FakeC) * @Date: 2016-01-15 02:44:14 * @Last Modified by: Sze Ka Wai Raymond (FakeC) * @Last Modified time: 2016-01-17 22:44:50 */ export default { method: 'GET', path: '/errorES6', config: { handler: { async: async function () { throw Error('error'); } } } };
define(['js/data/validator/RegExValidator'], function (RegExValidator) { return RegExValidator.inherit('js.data.validator.EmailValidator', { defaults: { regEx: /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+...
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M13 1.07V9h7c0-4.08-3.05-7.44-7-7.93zM4 15c0 4.42 3.58 8 8 8s8-3.58 8-8v-4H4v4zm7-13.93C7.05 1.56 4 4.92 4 9h7V1.07z" /> , 'MouseSharp');
(function() { 'use strict'; var GeoUtils = {}; /** * Converts x,y,z coords to latitude and longitude, for the given mesh * @param {THREE.Vector3} point - the point to convert * @param {THREE.Mesh} mesh - the sphere geometry based mesh * @returns {Obejct} containing lat and lon coords */ GeoUtils.xyzToLa...
var level = require('level-test')() var tape = require('tape') var util = require('../util') var db = require('../')(level('test-mynosql', {encoding: 'json'})) var db2 = require('../')(level('test-mynosql2', {encoding: 'json'})) var pl = require('pull-level') var pull = require('pull-stream') var pull = require('...
(function($) { $.widget('pageflow.pageNavigationList', { _create: function() { var element = this.element; var options = this.options; var scroller = options.scroller; var links = element.find('a[href]'); pageflow.ready.then(function() { highlightUnvisitedPages(pageflow.visi...
var gulp = require('gulp'); var argv = require('yargs').argv; var mocha = require('gulp-mocha'); /** * */ module.exports = function fn() { var src = argv.f ? argv.f : 'test/**/*.js'; src = Array.isArray(src) ? src : [src]; src = [ 'test/helpers.js' ].concat(src); return gulp.src(src) .pipe(mocha(...
/** * Created by Artiom on 25/04/2016. */ myApp.service('storageService', [function(){ return { setKey: function(key, value){ sessionStorage.setItem(key, value); }, getKey: function(key){ return sessionStorage.getItem(key); }, setObject: function(key, value){ sessionStorage.setItem(key, JSON.strin...
import React from 'react'; // Get the Formatic component. import Formatic from 'formatic'; // Create some fields. const fields = [ { type: 'single-line-string', key: 'firstName', label: 'First Name', }, { type: 'single-line-string', key: 'lastName', label: 'Last Name', }, ]; const valu...
const React = require('react'); const Row = require('react-bootstrap/lib/row'); const Col = require('react-bootstrap/lib/Col'); const logs = require('../utilities/logsMixin'); const headerStyle={ color:"blue" } const Header = React.createClass({ //-------default API------------------ // getDefaultProps: function...
import { GraphQLString as String, GraphQLInputObjectType, GraphQLID as ID } from 'graphql'; const StatementInputType = new GraphQLInputObjectType({ name: 'StatementInput', fields: { text: { type: String, }, voteId: { type: ID, }, pollId: { type: ID, }, id: { typ...
var InstrumentFilterView = FilterParentView.extend({ events: { 'change [type="checkbox"]': '_instrumentChecked' }, _instrumentChecked: function(event) { // When an array checkbox is selected perform actions on the // filters and re fetch the collection in order for subscribers ...
// 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...
var BasicView = require('app/view/View'); var BasicModel = require('app/model/Model'); var UserModel = require('app/model/UserModel'); function UserView() { this.models = { Basic: BasicModel, User: UserModel } this.viewCls = 'view-user'; this._BasicView = BasicView; var VIEW = this, isApp = Core...
import React from 'react'; import { render } from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; import { SocketProvider } from 'socket.io-react'; import io from 'socket.io-client'; const socket = io.connect('http://localhost:8080'); render( ...
module.exports = { getArmdozerAbilityDescription: function(ability){ var ret = 'アームドーザアビリティ'; switch(ability.type){ case 'boostBattery': ret = 'バッテリーが'+ability.battery+'回復'; break; case 'boostActive': ret = 'アクティブゲージが' + ability...
/* jshint camelcase: false, expr: true */ var chai = require('chai') , expect = chai.expect , Support = require(__dirname + '/../support') , DataTypes = require(__dirname + "/../../lib/data-types") chai.config.includeStack = true describe(Support.getTestDialectTeaser("Multiple Level Filters"), functio...
'use strict'; /** * @ngdoc service * @name dashApp.Courses * @description * # Courses * Factory in the dashApp. */ angular.module('dashApp.common') .factory('Courses', function ($q, Restangular, Campuses) { var service = {}; service.REASON_CAMPUS_NOT_SELECTED = 'campus not selected'; angular.forEa...
(function () { $(document).ready(function () { var tweetsIterator = 0 $("#tweetBtn") .on("click", function () { var text = $("#tweetText").val() getTweets(text, function (error, data) { tweetSource.clear() data.statuses.forEach(function (value, index, array) { addTweetsInMap(value) ...
(function(define, describe) { "use strict"; var dependencies = [ 'bootstrap' ]; define(dependencies, function(AppBootstrap) { var appName = 'app'; describe('CheckboxMenuDropdown directive', function() { beforeEach(module(appName)); var $scope, $eleme...
function formatPrice(price) { return accounting.formatMoney(price, "₺", 2); } chrome.storage.local.get(function(rates) { var elAsk = document.getElementById("ask"); var elBid = document.getElementById("bid"); var elHigh = document.getElementById("high"); var elLow = document.getElementById("low"); ...
var contains = require('amp-contains'); module.exports = function intersection(array) { if (array == null) return []; var result = []; var argsLength = arguments.length; for (var i = 0, length = array.length; i < length; i++) { var item = array[i]; if (contains(result, item)) continue...
import Polyline from './../googleMap/Polyline'; import raf from 'raf'; class Route extends Polyline { constructor(map, data, regionClick){ super(map, data); this.active(false); } onMouseOut(region, regionData, map){ } onMouseOver(region, regionData, map){ } active(value){ ...
// This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directl...
import React, { PropTypes } from 'react' import { List } from 'immutable' export default class CommandHistoryList extends React.Component { componentDidUpdate() { this._commandHistoryList.scrollTop = this._commandHistoryList.scrollHeight } render() { const CommandHistoryComponents = this.props.commandHistory.f...
//= require ./Shared.js StartTest(function(t) { createForm(); var values = form.getValues(), names = [ 'x', 'y', 'deadline_month', 'deadline_day', 'deadline_hour', 'deadline_minute' ]; t.ok(values.data, 'Values contains a key named data'); ...
export default { key: 'F', suffix: '/E', positions: [ { frets: '003211', fingers: '003211', barres: 1 }, { frets: 'xx2211', fingers: '002311', barres: 1 }, { frets: '033211', fingers: '034211', barres: 1 } ] };
/** * Created by ezgoing on 9/25/14. */ define(function(require){ 'use strict'; var Backbone = require('backbone'), MINI = require('minified'), _=MINI._, $=MINI.$, $$=MINI.$$, User = require('model:user'), UserList = require('model:user-list'), template = require('text...
import {mappings} from './mappings'; export default function foldcase(string) { let result = ""; for (const char of string) { const codePoint = char.codePointAt(0); result += String.fromCodePoint(mappings[codePoint] || codePoint); } return result; };
import assert from "assert"; import Package from "../src/Package"; import ChildProcessUtilities from "../src/ChildProcessUtilities"; import assertStubbedCalls from "./_assertStubbedCalls"; describe("Package", () => { let pkg; beforeEach(() => { pkg = new Package( { name: "my-package", v...
"use strict"; var karma = require('karma'); var path_1 = require('path'); module.exports = function karmaStart() { return function (done) { new karma.Server({ configFile: path_1.join(process.cwd(), 'karma.conf.js'), singleRun: true }).start(done); }; };
import WebGLazy from './WebGLazy'; export default WebGLazy;
/*! * angular-google-staticmaps 0.0.1 * Pascal Hartig, weluse GmbH, http://weluse.de/ * License: MIT */ (function () { 'use strict'; angular.module('wu.staticGmap', []) .controller('StaticGmapCtrl', function () { var BASE_URL = '//maps.googleapis.com/maps/api/staticmap?'; var STYLE_ATTRIBUTES =...
import test from 'ava'; import nm from './'; import string from './string'; function testWith(name, nm) { test(name, t => { t.true(nm.test('node_modules')); t.true(nm.test('node_modules/foo/bar.js')); t.true(nm.test('node_modules\\foo\\bar.js')); t.true(nm.test('./node_modules')); t.true(nm.test('.\\node_mo...
import DS from 'ember-data'; export default DS.Model.extend({ name: DS.attr('string'), size: DS.attr('number') });
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ function Inbox() { this.ownerid = 0; this.owner; this.notifications = []; this.coreUrl= "http://143.44.67.0:13774/GoH...
var hbs = require('hbs'); var async = require('async'); var bcrypt = require('bcrypt-nodejs'); var jwt = require('jwt-simple'); var key = 'key_de_prueba'; module.exports = function(unuko) { var module = {}; module.info = { name: 'user', description: 'User System', required: true }; module.initi...
module.exports = [] .concat(require('./getProperty')) .concat(require('./summary'));
/// <reference path="../../defs/tsd.d.ts"/> /// <reference path="./interfaces.d.ts"/> 'use strict'; var path = require('path'); var fs = require('fs'); var _ = require('lodash'); var utils = require('./utils'); var cache = require('./cacheUtils'); var semver = require('semver'); var es6_promise_1 = require('es6-promise...
import React from 'react'; import { BrowserRouter } from 'react-router-dom'; import { AppRoutes, Menu } from 'App/ui/dynamicRoutes'; const App = () => ( <> <BrowserRouter> <Menu /> <AppRoutes /> </BrowserRouter> </> ); export default App;
/* */ module.exports = function(hljs) { /* missing support for heredoc-like string (OCaml 4.0.2+) */ return { aliases: ['ml'], keywords: { keyword: 'and as assert asr begin class constraint do done downto else end ' + 'exception external for fun function functor if in include ' + ...
/** * Copyright (c) 2011-2012 Jeff Hoefs <soundanalogous@gmail.com> * Released under the MIT license. See LICENSE file for details. */ JSUTILS.namespace('BO.io.CompassEvent'); BO.io.CompassEvent = (function() { var CompassEvent; // dependencies var Event = JSUTILS.Event; /** * An Event object to be d...
(function () { /* Imports */ var Meteor = Package.meteor.Meteor; var AccountsTemplates = Package['useraccounts:core'].AccountsTemplates; var Accounts = Package['accounts-base'].Accounts; var T9n = Package['softwarerero:accounts-t9n'].T9n; /* Exports */ if (typeof Package === 'undefined') Package = {}; Package['user...
/* * A speed-improved perlin and simplex noise algorithms for 2D. * * Based on example code by Stefan Gustavson (stegu@itn.liu.se). * Optimisations by Peter Eastman (peastman@drizzle.stanford.edu). * Better rank ordering method by Stefan Gustavson in 2012. * Converted to Javascript by Joseph Gentle. * * Version...
'use strict'; var numbro = require('../../numbro'); exports.misc = { cultures: function(test) { if (typeof module !== 'undefined' && module.exports) { test.expect(1); var cultures = numbro.cultures(); // test that cultures were loaded. // this relies on the ...
const { buildCommonViewData: _buildCommonViewData, data, ...rest } = require('../TRBase'); const buildCommonViewData = base => { const common = _buildCommonViewData(base); return { ...common, charter: { ...common.charter, noCharter: { ...base,...
import { GLOBAL_NOTIFICATION_ADDED, GLOBAL_NOTIFICATION_HANDLED, GLOBAL_NOTIFICATION_PUSHED, GLOBAL_NOTIFICATION_RECEIVED, NOTIFICATION_MANUAL_REMOVE, } from './constants'; export function dismissNotification() { return { type: NOTIFICATION_MANUAL_REMOVE, }; } export function newNotification(data) {...
// An example configuration file. exports.config = { // Do not start a Selenium Standalone sever - only run this using chrome. chromeOnly: true, baseUrl: 'http://127.0.0.1:7000/', chromeDriver: './node_modules/protractor/selenium/chromedriver', // Capabilities to be passed to the webdriver instance. capabi...
$('#hub').append('<div id="compass"></div>'); var div = $('#compass').get(0); var divRect = div.getBoundingClientRect(), ctx, x, i, needle; var length = 24; var headings = ['N', 'E', 'S', 'W']; var visibleWidth = divRect.width; var canvas = document.createElement('canvas'); canvas.width = visibleWidth * 2; canvas...
var assert = require('assert'), user = require('../../models/user'), redisClient = require('../../models/redisClient'), utils = require('../utils'); setTimeout(function(){ describe("user", function(){ describe("user.validateUser", function(){ var testUser = { nome: "teste", email: "e@ex...
'use strict' /** * InvalidOperationError * @ignore */ class InvalidOperationError extends Error { /** * constructor * * @class InvalidOperationError * * @description * Thrown when an operation has not been implemented yet * * @throws "This operation is not supported for this key type" ...
// const {expect} = require('chai'); // const async = require('async'); const slogger = require('node-slogger').init({flashInterval:500}); const {KafkaProducer,} = require('../../index'); // const ZK_HOST = process.env.ZOOKEEPER_PEERS; const KAFKA_HOST = process.env.KAFKA_PEERS; const SCHEDULE_NAME1 = 'scheduleBench'; ...
var uuidGenerator = require('node-uuid'); function generateUUID(){ return uuidGenerator.v4(); } module.exports = function uniqueName(filename){ var uuid = generateUUID(); return uuid + '_' + filename + '.pdf'; }