code
stringlengths
2
1.05M
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import contains from 'ramda/src/contains'; import { requestCurrencies } from '../../actions/currenciesActions'; import { selectCurrency } from '../../actions/selectedCurrenciesActions'; import currencyPickerSelector...
var jbBackbone = Backbone.noConflict(); jbBackbone.$ = jBone; var jqBackbone = Backbone.noConflict(); jqBackbone.$ = jQuery; suite("Backbone View", function(suite) { setup(function() { suite.jbView = jbBackbone.View.extend({ events: { click: function() {} } }); suite.jqView = jqBackbone.View.exte...
require('./vendor/jquery-2.0.3.min.js'); var Handlebars = require('handlebars'); require('../../lib/hbs_config')(Handlebars); var toHTML = require('../../lib/toHTML'); var testing; $(function(){ var manifest = null; $.getJSON('/manifest', function(m) { manifest = m.manifest.manifest; testing = m.testing;...
/*! * sasso * * * @author lucadevelo * @version 1.0.0 * Copyright 2017. MIT licensed. */ (function($, window, document, undefined) { 'use strict'; $(window).load(function() { $('.loader').delay(100).fadeOut('slow'); }); $(function() { $('div.mylist dd').filter(':nth-child(n+4)'...
import React from 'react'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { Nav, NavItem, NavDropdown, MenuItem, ProgressBar, } from 'react-bootstrap'; import Navbar, {Brand} from 'react-bootstrap/lib/Navbar'; import history from '../../core/history'; import $ from "jquery"; import Si...
'use strict' const utils = require('./utils') Object.assign(module.exports, require('./async'), require('./sync')) exports.path = utils.filename
import chai from 'chai'; import Deck from './../../lib/deck/Deck'; import SUITS from './../../lib/deck/suits.json'; import VALUES from './../../lib/deck/values.json'; import Attack from './../../lib/simulation/Attack'; import Character from './../../lib/Character/Character'; import {weapons} from './../../lib/Character...
(function () { 'use strict'; define(['app'], function (app) { app.controller('homeCtrl', homeCtrl); homeCtrl.$inject = ['$modal','$location','$routeParams']; function homeCtrl($modal,$location,$routeParams) { /* js hint valid this: true*/ var vm = this; ...
'use strict'; var assert = require('assert'), Validator = require('../../src/models/dryRunValidator'), promiseIt = require('../testHelpers').promiseIt, mock = require('../mock').mock, BaseRepository = require('../../src/models/stubRepository'), testRequest = { requestFrom: '', path: '/', query: {},...
/* Copyright 2014, KISSY v1.49 MIT Licensed build time: May 22 12:20 */ KISSY.add("editor/plugin/color/btn",["editor","../button","../overlay","../dialog-loader"],function(j,f){function l(a,b,d){setTimeout(function(){a.execCommand(b,d)},0)}var i=f("editor"),n=f("../button"),o=f("../overlay"),p=f("../dialog-loader"),q=j...
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_pre...
/** * cssๆ น็›ฎๅฝ•ไธ‹ๅˆ’ๅˆ†pagesๅ’Œcommonๆ–‡ไปถๅคน๏ผŒpagesๅˆ†ๆ•ฃ็ผ–่ฏ‘๏ผŒcommonไธ‹ๆ นๆฎcommon/index.stylๅˆๅนถ็ผ–่ฏ‘ * cssไปปๅŠก๏ผš * 1ใ€็ผ–่ฏ‘stylusๆบ็  * 2ใ€ๅฏนๅ›พ็‰‡base64็ผ–็  * 3ใ€ๅผ€ๅ‘็ŽฏๅขƒไธๅŽ‹็ผฉ๏ผŒๆญฃๅผ็ŽฏๅขƒๅŽ‹็ผฉ * 4ใ€ๆ–‡ไปถๅ็”Ÿๆˆhash๏ผŒๅนถ็”Ÿๆˆcss-map */ const rev = require('gulp-rev'); const noop = require('gulp-noop'); const sourcemaps = require('gulp-sourcemaps'); const base64 = require('gulp-css-base64...
'use strict'; var _ = require('lodash'), Jimp = require('jimp'), path = require('path'), q = require('q'); //// Methods Layer.prototype.render = renderLayer; Layer.prototype.opacity = setOpacity; Layer.prototype.position = setPosition; Layer.prototype.size = setSize; module.exports =...
'use strict'; angular.module('dandelionApp') .config(function($stateProvider) { $stateProvider .state('main', { url: '/', templateUrl: 'app/main/main.html', // controller: 'MainController', // controllerAs: 'main' }); });
// icon-push export default { functional: true, render: function (h, { props }) { let width = props.width || 20 let height = props.height || 20 const viewBox = props.viewBox || '0 0 20 20' return h('svg', { attrs: { version: '1.1', meta: 'vk-icons-push', width: width, ...
/** * Utilities for the Odo Module component. * * @author Nathan Buchar */ /** * If the first parameter is not an array, return an array containing the * first parameter. * * @author Glen Cheney <glen@odopod.com> * @param {*} thing - Anything. * @returns {Array.<*>} Array of things. */ export function array...
var gulp = require('gulp'); var concat = require('gulp-concat'); var watch = require('gulp-watch'); var count = require('gulp-count'); var scriptSources = [ './app.js', './controllers/*.js', './modules/*.js', './directives/*.js', './services/*.js' ]; var nodemoduleSources = [ './node_modul...
/* * grunt-protractor-runner * https://github.com/teerapap/grunt-protractor-runner * * Copyright (c) 2013 Teerapap Changwichukarn * Licensed under the MIT license. */ 'use strict'; var util = require('util'); var path = require('path'); module.exports = function(grunt) { grunt.registerMultiTask('e2e', 'A ne...
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M20.5 6c-2.61.7-5.67 1-8.5 1s-5.89-.3-8.5-1L3 8c1.86.5 4 .83 6 1v13h2v-6h2v6h2V9c2-.17 4.14-.5 6-1l-.5-2zM12 6c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z" /> , 'AccessibilityNewOutlined');
var numeral = require('../../numeral'), language = require('../../locale/es-es'); numeral.locale('es-es', language); exports['language:es-es'] = { setUp: function (callback) { numeral.locale('es-es'); callback(); }, tearDown: function (callback) { numeral.locale('en'); ...
'use strict'; angular.module('feedify.menu', []) .controller('MenuCtrl', ['$scope', '$rootScope', 'FeedModel', '$state', '$cookies', '$interval', '$uibModal', function($scope, $rootScope, FeedModel, $state, $cookies, $interval, $uibModal) { console.log($rootScope.userToken); $scope....
/* * * ChatMessage * */ import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; import { loadTouchGroup, fetchGroupMessageList } from 'containers/ChatPage/actions'; import Avatar from 'material-ui/Avatar'; import { List, ListItem } from...
{ const resolved = dependencyResolver.resolve( path.resolve(__dirname, "__fixtures__", "scoped.js") ); expect(resolved).toEqual([ expect.stringContaining(path.join("@myorg", "pkg")) ]); }
// PDF // /** * @namespace pdf */ var pdf = { 'version': '0.0.0' // semvar }; /** * METHOD: normal( mu, sigma ) * Returns a probability density function for a normal distribution with mean 'mu' and standard deviation 'sigma'. * * @param {number} mu - distribution mean * @param {number} sigma - distribution stand...
var should = require('should'), DoNothing = require('../lib/do_not_do_this'); describe("Bogus test to fool Jenkins", function(){ it("should do nothing successfully", function(done){ var uselessGuy = new DoNothing(); uselessGuy.doesNothing(function(err, data){ data.should.eql('I did...
;(function ( $, window, document, undefined ) { var pluginName = "keepTheRhythm", defaults = { baseLine: parseFloat($('body').css('line-height')), verticalAlignment: "center", spacing: "padding" }; // The actual plugin constructor function Plugin( elemen...
const pass = require('./password.js'); // MySQL ๆ•ฐๆฎๅบ“่ฟžๆŽฅ้…็ฝฎ module.exports = { mysql: { connectionLimit: 10, host: '127.0.0.1', port: 3306, user: 'root', password: pass.mysql, database: 'honeymorning' } };
/* * SCSS Lint Grunt plugin * https://github.com/ahmednuaman/grunt-scss-lint */ module.exports = function (grunt, options) { return { // Lint sass folder sass: [ '<%= srcPath %>/sass' ], options: { config: '<%= testPath %>.scss-lint.yml', rep...
/** * mongooseๆœ€ๆ–ฐๆ›ดๆ–ฐๆ—ถ้—ดๆ’ไปถ */ module.exports = function lastModifiedPlugin(schema) { schema.add({lastMod: Date}); schema.pre('save', function (next) { this.lastMod = new Date(); next(); }); };
/* ========================================================================== jQuery plugin settings and other scripts ========================================================================== */ $(document).ready(function(){ // Sticky footer var bumpIt = function() { $('body').css('margin-bo...
// Run a batch operation against the Word object model. Word.run(function (context) { // Create a proxy object for the content controls collection that contains a specific tag. var contentControlsWithTag = context.document.contentControls.getByTag('Customer-Address'); // Queue a command to load th...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototy...
#!/usr/bin/env node require('coffee-script'); module.exports = require('./slate.coffee');
(function(){ 'use strict'; angular .module('emodeling') .factory("erlangcService", erlangcService); erlangcService.$inject = [ '$q', 'config', 'logService' ]; function erlangcService($q, config, log){ var errors = config.eError; ...
'use strict'; var myApp = angular.module('myApp.controllers', []); myApp.controller('InitCtrl', ['$scope', '$location', InitCtrl]); myApp.controller('NavCtrl', ['$scope', '$location', NavCtrl]); myApp.controller('MyCtrl1', [MyCtrl1]); myApp.controller('MyCtrl2', [MyCtrl2]); myApp.controller('MyCtrl3', [MyCtrl3]); fun...
const {flatten, uniqBy} = require('lodash'); const isGoodWord = (text) => !(/^[ใ‚กใ‚ฃใ‚ฅใ‚งใ‚ฉใƒƒใƒฃใƒฅใƒงใƒฎใƒณใƒผ]/).test(text); /** * @description Generate cartesian product of arrays * @template T * @param {Array<Iterable<T>>} arrays List of input array * @returns {IterableIterator<Array<T>>} A generator yielding result array */ co...
/*! * Copyright (c) 2015-2018 Cisco Systems, Inc. See LICENSE file. */ // eslint-disable-next-line var CiscoSpark = window.ciscospark = require('ciscospark'); module.exports = CiscoSpark;
define(function(require, exports, module){ var Marionette = require("marionette"), $ = require("jquery"), _ = require("underscore"), MainController = require('mainController'); module.exports = Marionette.AppRouter.extend({ controller: new MainController(), appRoutes: {...
"use strict"; /* global describe,it,before*/ require("requirish")._(module); var should = require("should"); var Method = require("lib/address_space/ua_method").Method; var StatusCodes = require("lib/datamodel/opcua_status_code").StatusCodes; var UAObjectType = require("lib/address_space/ua_object_type").UAObjectType; ...
(function($R) { $R.add('plugin', 'clips', { translations: { en: { "clips": "Clips", "clips-select": "Please, select a clip" } }, modals: { 'clips': '' }, init: function(app) { this.app = app; this.opt...
import $ from 'jquery' import Vue from 'vue' import App from './App.vue' new Vue({ el: '#app', render: h => h(App) })
import React, { Component, PropTypes } from 'react'; import { Row, Col } from 'react-bootstrap'; import { Sparklines, SparklinesLine, SparklinesReferenceLine } from 'react-sparklines'; export default class CardSlideout extends Component { render() { return ( <div className="card-slideout"> <R...
var neo4j = require('neo4j-js'); var neo4jurl = "http://localhost:7474/db/data/"; var HTTPStatus = require('http-status'); exports.findAll = function (req, res){ console.log("Retrieving all projects"); res.header("Access-Control-Allow-Origin", "*"); res.set({'Content-Type': 'text/json'}); // setting conte...
const express = require('express') const debug = require('debug')('app:server') const path = require('path') const webpack = require('webpack') const webpackConfig = require('../config/webpack.config') const project = require('../config/project.config') const compress = require('compression') const app = express() //...
app.controller("LoginModalController", function($scope, $modalInstance, UserService) { $scope.model = { email: "", password: "", error: "" } $scope.ok = function() { $scope.model.error = ""; var u = $scope.model; UserService.login(u.email, u.password).then(function() { $modalInstance.close(); },...
/** * Generate a non duplicate ID */ export function getRandomId() { return Date.now().toString(36) + Math.random().toString(36).substr(2); }
const Discord = require('discord.js'); const client = new Discord.Client(); const config = require('./config.json'); const size = config.colors; const rainbow = new Array(size); for (var i=0; i<size; i++) { var red = sin_to_hex(i, 0 * Math.PI * 2/3); // 0 deg var blue = sin_to_hex(i, 1 * Math.PI * 2/3); /...
/** * Created by ไบขๅ™ๆฐ on 2017/5/4. */ function jiashansanweimoxing() { viewer.entities.removeAll(); viewer.dataSources.removeAll(); $("#draggable").css("display","none"); if(($(".overlayIcon").length)>0) { for(var j=0;j<($(".overlayIcon").length);j++) { $(".overlayIcon")...
/*! * Stylus - Normalizer * Copyright(c) 2010 LearnBoost <dev@learnboost.com> * MIT Licensed */ /** * Module dependencies. */ var Visitor = require('./') , nodes = require('../nodes') , utils = require('../utils') , fs = require('fs'); /** * Initialize a new `Normalizer` with the given `root` Node. * ...
WeFi = {}; WeFi.max_posts = 1679616; WeFi.max_score = 2176782336; WeFi.max_title_words = 10; WeFi.max_body_text = 200; Accounts.config({ sendVerificationEmail: true }); Accounts.emailTemplates.siteName = "Weekday Filler"; Accounts.emailTemplates.from = "Weekday Filler Accounts <accounts@weekdayfiller.com>";
/** * Created by raychen on 16/8/3. */ import mongoose from 'mongoose' var schema = mongoose.Schema; //add schema var global = schema({ global_num: Number, current_user: String }); //make model and export var globalSchema = mongoose.model('global', global); export {globalSchema};
jQuery(document).ready(function($){ var mainHeader = $('.cd-auto-hide-header'), secondaryNavigation = $('.cd-secondary-nav'), //this applies only if secondary nav is below intro section belowNavHeroContent = $('.sub-nav-hero'), headerHeight = mainHeader.height(); //set scrolling variables var scrolling = fa...
var parse = require('./modules/ndjson.js').parse; var stringify = require('./modules/ndjson.js').stringify; console.log(parse(prompt())); console.log(stringify(prompt()));
angular .module('myapp') .service('AuthService', AuthService) .service('CookieService', CookieService); CookieService.$inject = ['$window']; function CookieService($window){ var self = this; this.put = function (name, value, expires, path, domain) { var cookie = name + "=" + escape(value) + ";path=...
Package.describe({ summary: "Used by the coffeescript package's tests", version: "1.0.5" }); Package.onUse(function (api) { api.use('coffeescript', ['client', 'server']); api.export('COFFEESCRIPT_EXPORTED'); api.addFiles("exporting.coffee", ['client', 'server']); });
var controllers = require('./controllers'); var router = function(app, passport){ app.get('/login', controllers.Account.loginPage); app.post('/login', controllers.Account.login); app.get('/userpage', ensureAuthenticated, controllers.Account.userPage); app.get('/auth/facebook', passport.authenticate('faceboo...
const BaseCard = require('./basecard'); const _ = require('underscore'); const { Locations, EffectNames } = require('./Constants'); class ProvinceCard extends BaseCard { constructor(owner, cardData) { super(owner, cardData); this.isProvince = true; this.isBroken = false; this.men...
require('./dist/v-textfield'); module.exports = 'vTextfield';
import {createSelector} from 'reselect'; import {getOwnEstimate} from '../estimations/estimationsSelectors'; const getPendingCmds = (state) => state.commandTracking.pendingCommands; /** * returns a commandId of the "joinRoom" command, if we sent one and are waiting for the respective event from the backend. * Will ...
$(document).ready(function() { var game = new Game(); setInterface(); refreshInfo(); controlButtonsHandler(); function setInterface() { for (var i = 0; i <= game.defaults.pins; i++) { $('#controls').append( '<button id="roll'+ i +'" class="btn btn-default" data-value="'+ i + '">'+ ...
/** * Modules in this bundle * @license * * power-assert-renderers: * license: MIT * author: Takuto Wada <takuto.wada@gmail.com> * homepage: http://github.com/twada/power-assert-renderers * version: 0.0.1 * * array-foreach: * license: MIT * author: Takuto Wada <takuto.wada@gmail.com> * home...
(function($) { var $current_target; var $dropdown; // form elements var $datepicker; var $parameters; var $daterangePreset; var $parameter1; var $aggregation; var $aggregationWrap; var $enableComparison; var $comparisonPreset; // Custom variables var $custom_start; var $custom_...
'use strict'; let Wit = null; let interactive = null; try { // if running from repo Wit = require('./lib/Wit'); interactive = require('./lib/interactive'); } catch (e) { Wit = require('node-wit').Wit; interactive = require('node-wit').interactive; } const accessToken = (() => { if (process.argv.length !==...
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ // import // โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ import styled from 'styled-components'; // โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ // component // โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€...
exports.config = { // will use local selenium server jar // seleniumAddress: 'http://localhost:4444/wd/hub', framework: 'jasmine', // See the full list at https://github.com/juliemr/minijasminenode/tree/jasmine1 jasmineNodeOpts: { // If true, display spec names. isVerbose: true, // If true, prin...
export default function() { return [ {title: 'Javascript: The Good Parts', pages: 972}, {title: 'Harry Potter', pages: 1234}, {title: 'The Dark Tower', pages: 2323}, {title: 'Eloquent Ruby', pages: 50}, {title: 'Clint the Great', pages: 2598} ] }
'use strict'; //Setting up route angular.module('helplines').config(['$stateProvider', function($stateProvider) { // Helplines state routing $stateProvider. state('listHelplines', { url: '/helplines', templateUrl: 'modules/helplines/views/list-helplines.client.view.html' }). state('createHelpline', { ...
'use strict'; const name = getName(__filename); describe(name, function () { it('should stringify an object', function () { expect(hbs.compile('{{{ stringify obj }}}')({ obj: {a: 'b'} })).to.equal('{"a":"b"}'); }); });
/* * pmx.js */ (function() { tm.asset = tm.asset || {}; tm.define("tm.asset.PMX", { superClass: "tm.event.EventDispatcher", init: function(path) { this.superInit(); this.pmx = null; this.path = path; this.texturePath = null; this.l...
'use strict'; describe('Directive: myDirective', function () { // load the directive's module beforeEach(module('myNewProjectApp')); var element, scope; beforeEach(inject(function ($rootScope) { scope = $rootScope.$new(); })); it('should make hidden element visible', inject(function ($compile) ...
'use strict' const { assert } = require('chai') const { task, join } = require('../') describe('Join', function() { it('Should pass context between two tasks', function(done) { const tasks = ['foo', 'bar'].map((val) => task({ params: { val }, name: `Resolve ${val}` }, ({ params }) =...
var robbery_2010_09 = [{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "Unnamed: 0": 0, "Incident Number": 102440081, "Date": "09\/01\/2010", "Time": "01:40 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "L...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Image } from 'semantic-ui-react'; // src ๅฐ้ขๅ›พ็‰‡่ทฏๅพ„ // play ๆ˜ฏๅฆๆญฃๅœจๆ’ญๆ”พ class Cover extends Component { shouldComponentUpdate(nextProps) { if (!nextProps.src) { return false; } return true; } ...
function myMap() { var lat = 46.4461538, lng = 30.7488844; var myCenter = new google.maps.LatLng(lat, lng); var mapCanvas = document.getElementById("map"); var mapOptions = { center: myCenter, zoom: 15, styles: [{"featureType": "landscape", "stylers": [{"hue": "#FFBB00"},...
var curCSS, iframe, iframeDoc, ralpha = /alpha\([^)]*\)/i, ropacity = /opacity=([^)]*)/, rposition = /^(top|right|bottom|left)$/, // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/displa...
Drupal.nodehierarchy = { callbackURL : "", autoAttach : function( ctxt ) { ctxt = ctxt || document; // expand/collapse links // links that are already expanded just need the slide animation $(".nodehierarchy_outline li.expanded", ctxt).each(Drupal.nodehierarchy.addExpandCollapse); // add the...
(function(angular) { 'use strict'; var module = angular.module('rcMedia'); module.directive("rcmUploadControls", [ '$log', '$parse', '$compile', function ($log, $parse, $compile) { return { restrict : 'EA', require: "^rcMedia", scope : { fi...
const express = require('express'); const path = require('path'); const manipulateString = require('./stringManipulator'); const app = express(); app.get('/', (req, res) => { res.sendFile(path.resolve('public/index.html')); }); app.get('/:string', (req, res) => { res.send(manipulateString(req.params.string)); })...
import syncGlob from '../src/index' import { beforeEachSpec, afterAllSpecs, awaitMatch, fs } from './helpers' describe('node-sync-glob transform', () => { beforeEach(beforeEachSpec) afterAll(afterAllSpecs) it('should transform a file', (done) => { const close = syncGlob('tmp/mock/b.txt', 'tmp/trans', { tran...
/*global define, _*/ define([], function(){ "use strict"; var instance; function DataStore(){} DataStore.prototype.objects = {}; DataStore.prototype.initialize = function(){ if(arguments.length === 2){ var name = arguments[0]; return this.set(name, arguments[1]); } _.each(a...
// Service ================================================================================= (function () { 'use strict'; angular .module(appMainModule) .service('EmpleadoService', service); service.$inject = ['$http', 'AppConfig']; function service($http, AppConfig) { var vm ...
'use strict'; angular.module('ideas').factory('Ideas', ['$resource', function ($resource) { return $resource('api/ideas/:ideaId', { ideaId: '@_id' }, { update: { method: 'PUT' } }, { create: { method: 'POST' } }); } ]);
"use strict" var abs = Math.abs , min = Math.min function almostEqual(a, b, absoluteError, relativeError) { var d = abs(a - b) if (absoluteError == null) absoluteError = almostEqual.DBL_EPSILON; if (relativeError == null) relativeError = absoluteError; if(d <= absoluteError) { return true } if...
(function () { "use strict"; /** * Emit an event on the given element. * @param {HTMLElement} element - DOM element to trigger the event on. * @param {String} eventName - Name of the triggered event. * @param {Object} [data={}] - Custom data to attach to the event. * @private */ function _emitE...
'use strict'; var path = require('path') var chalk = require('chalk') var Runner = require('./runner') var tasks = require('./tasks') var server = require('./server') var watch = require('./watch') function lpad(str, width) { var len = Math.max(0, width - str.length); return new Array(len + 1).join(' ') + str; ...
'use strict' module.exports = flagType function flagType(flag) { if (Array.isArray(flag.type)) { return flagType({ ...flag , ...unnest(flag) , multi: true }) } if (flag.type === Boolean) return 'confirm' if (flag.type === Number) return 'number' if (flag.mask) return 'password' if (f...
context("2:Layout", () => { context("0: Basic", () => { test("10: Panel with Titles", () => { bela .ready('/w2ui/demos/#/layout/10') .begin('Check titles') .get(`#layout_layout_panel_top .w2ui-panel-title`) .should('have.tex...
var cssPagedMedia = (function() { var style = document.createElement('style'); document.head.appendChild(style); return function(rule) { style.innerHTML = rule; }; }()); cssPagedMedia.size = function(size) { cssPagedMedia('@page {size: ' + size + '}'); }; var notify = function($caller, title, message, popover_...
define([ 'backbone', 'jquery', 'lib/mustache', ], function(Backbone, $, Mustache) { var Model = Backbone.Model.extend({ initialize: function() { this.view = new View({model: this}); }, destroy: function() { this.view.remove(); delete this.view; } ...
/* @licstart The following is the entire license notice for the JavaScript code in this file. The MIT License (MIT) Copyright (C) 1997-2020 by Dimitri van Heesch Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to...
/** * Created by sz43 on 9/14/2016. */ myApp.service('anchorSmoothScroll', function(){ this.scrollTo = function(eID) { // This scrolling function // is from http://www.itnewb.com/tutorial/Creating-the-Smooth-Scroll-Effect-with-JavaScript var startY = currentYPosition(); var stop...
import Layer from './Layer' class Network { constructor (layers) { this.layers = layers.map(neurons => new Layer(neurons)) this.spacingX = 400 this.spacingY = 40 this.layers[this.layers.length - 1].outputLayer = true this.layers.forEach((layer, index) => { if (this.layers[index - 1]) { ...
/* eslint-env browser, jquery */ import $ from 'jquery'; import { setLocale, getLocale, translations } from './translate'; const changeLocale = (locale) => { if (locale === getLocale()) { console.warn('Locale is the SAME (not changing)', locale); return; } if (getLocale() !== '') { // only run this w...
import { Base } from 'yeoman-generator'; import generatorArguments from './arguments'; import generatorOptions from './options'; import generatorSteps from './steps'; export default class ControllerGenerator extends Base { constructor(...args) { super(...args); Object.keys(generatorArguments).forEach(key =>...
goog.provide('ol.format.XML'); goog.require('goog.asserts'); goog.require('ol.xml'); /** * @classdesc * Generic format for reading non-feature XML data * * @constructor */ ol.format.XML = function() { }; /** * @param {Document|Node|string} source Source. * @return {Object} */ ol.forma...
'use strict'; var path = require('path'); module.exports = function(eyeglass, sass) { return { sassDir: path.join(__dirname, 'scss') }; };
const googlemaps = require('@google/maps'); const nconf = require('nconf'); nconf .argv() .env() .file({file: '../config.json'}); exports.geocode = function(address, city, country) { const googleMapsClient = googlemaps.createClient({ key: nconf.get('google_api_key'), Promise: Promise }); // G...
(function () { 'use strict'; angular.module('cvMakerApp') .component('userResume', { templateUrl: '../templates/components/resume/resume.template.html' }) .controller('UserResumeController', UserResumeController); function UserResumeController() { var $ctrl = this; ...
var MAX_PACKET_LENGTH = Math.pow(2, 24) - 1; var MUL_32BIT = Math.pow(2, 32); var PacketHeader = require('./PacketHeader'); var BigNumber = require('bignumber.js'); module.exports = Parser; function Parser(options) { options = options || {}; this._supportBigNumbers = options.config &...
import MathFormatter from '../../src/formatters/FormatterMath.js' import assert from 'assert' describe('formatter math', () => { let format = ast => { let formatter = new MathFormatter(ast) return formatter.format() } it('format a general latex example', () => { const ast = { type: 'operator',...