code
stringlengths
2
1.05M
/* * Copyright (c) 2015 by Rafael Angel Aznar Aparici (rafaaznar at gmail dot com) * * openAUSIAS: The stunning micro-library that helps you to develop easily * AJAX web applications by using Java and jQuery * openAUSIAS is distributed under the MIT License (MIT) * Sources at https://github.com/raf...
const AbstractLexer = Jymfony.Component.Lexer.AbstractLexer; /** * @memberOf Jymfony.Component.DateTime.Parser */ export default class Lexer extends AbstractLexer { /** * @inheritdoc */ getCatchablePatterns() { return [ '\\d+', '[+-]\\d{4,}', '\\s+', ...
import React, {Component} from 'react'; import { TabBarIOS, Navigator } from 'react-native'; import {connect} from 'react-redux'; import type {Tab} from '../redux/reducers/navigation'; import {switchTab} from '../redux/actions'; import HostingScreen from './hosting/HostingScreen'; import SearchScreen from './search...
'use strict'; var test = require('thehelp-test'); var expect = test.expect; var sinon = test.sinon; var Twilio = require('../../../src/server/twilio'); describe('Twilio', function() { var twilio, key, token; beforeEach(function() { var key, token; key = process.env.THEHELP_TWILIO_KEY; token = proc...
function convertData(data, keys){ var pts = new Array(); for (var i = 0; i < data.length; i++){ var temp = {}; for ( var j = 0; j < keys.length; j++){ var cur = Number(data[i][keys[j]]); if (isNaN(cur)){ cur = [i, data[i][keys[j]]]; ...
import * as M from "@effectful/core"; function a() { var a = M.context(); return M.scope(a_1); } function a_1(a) { return M.chain(eff(1), a_2); } function a_2(a, b) { a._ = b; return M.chain(eff(2), a_3); } function a_3(a, b) { a._1 = b; return M.chain(eff(3), a_4); } function a_4(a, b) { var c, d;...
import enzyme from 'enzyme' import {latLngBounds} from 'leaflet' import React from 'react' import MiniMap from '../mini-map' describe('Report > MiniMap', () => { it('renders correctly', () => { const props = { bounds: latLngBounds([ [40.712, -74.227], [40.774, -74.125] ]) } ...
'use strict'; // or http://127.0.0.1:7001/chat // const socket = require('socket.io-client')('https://127.0.0.1/chat', { secure: true, reconnect: true, rejectUnauthorized: false }); const io = require('socket.io-client'); // const socket = io.connect('ws://127.0.0.1:443/chat', { rejectUnauthorized: false }); const soc...
/** * produces turnips all the time and gives * the collected turnips at harvest seasons */ export default class SeasonalProducer { constructor ({ structureType, harvestWeeks }) { this.turnipYield = structureType.turnipYield this.harvestWeeks = harvestWeeks this.produced = 0 this.wasHarvest = fal...
/* globals module, process */ // Karma configuration // Generated on Fri May 13 2016 20:43:12 GMT+0200 (CEST) module.exports = function (config) { var configuration = { // base path that will be used to resolve all patterns (eg. files, exclude) basePath: '', // frameworks to use // available frame...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); var _apiRunnerBrowser = require("./api-runner-browser"); var _react = _interopRequireDefault(require("react")); var _reactDom = _int...
var searchData= [ ['i2c_5fhandletypedef',['I2C_HandleTypeDef',['../struct_i2_c___handle_type_def.html',1,'']]], ['i2c_5finittypedef',['I2C_InitTypeDef',['../struct_i2_c___init_type_def.html',1,'']]], ['i2c_5fs',['i2c_s',['../structi2c__s.html',1,'']]], ['i2c_5ftypedef',['I2C_TypeDef',['../struct_i2_c___type_def...
// Generated by CoffeeScript 1.6.2 define(['Globals', 'Crafty', 'Grid'], function(g, Crafty, Grid) { var LevelStage; return LevelStage = (function() { function LevelStage(n) {} return LevelStage; })(); });
var TextsRoute = Ember.Route.extend({ actions: { save: function(title, values) { var model = this.get('content'); if ( title && values ) { values = stringify(values); model.set(title, values); } console.log('you cant save me'); Ember.run.debounce(model, 'save', 100); ...
var mongoose = require('mongoose'); var utils = require('../lib/utils'); var StopTime = mongoose.model('StopTime', new mongoose.Schema({ agency_key: { type: String, index: true }, trip_id: { type: String, index: true }, arrival_time: { type: String, get: utils.secondsToTime, set: ...
/*globals describe, it*/ 'use strict'; var valivore = require('../index'); describe('cleanValidate()', function() { it('doesn\'t give an error', function() { valivore.cleanValidate({}, {}, function(err) { (err === null).should.be.true(); }); }); it('gives a valErr array', function() { valivo...
// @flow const _ = require('lodash/fp'); const readPgkUp = require('read-pkg-up'); const { getCurrentDir } = require('../editorInterface'); const { shouldUseEslint } = require('../atomInterface'); const hasPackageDependency = (packageName: string): ((packageJson: {}) => boolean) => _.flow(_.get('packageJson.depende...
/** * Dutch translation for bootstrap-datetimepicker * Reinier Goltstein <mrgoltstein@gmail.com> */ ; (function ($) { $.fn.datetimepicker.dates['nl'] = { days : ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag"], daysShort : ["Zo", "Ma", "Di", "Wo", ...
// Generated by CoffeeScript 1.10.0 (function() { var ARCHIVE_TAG, IMAGE_URL, Q, TEST_TAG, _, api, cloudinary, exec, execSync, expect, fs, helper, http, https, includeContext, os, sharedExamples, sinon, uploader, utils, zlib; require('dotenv').load(); http = require('http'); https = require('https'); expe...
var gulp = require('gulp'); var browserSync = require('browser-sync').create(); var deploy = require('gulp-gh-pages'); var runSequence = require('run-sequence'); var $ = require('gulp-load-plugins')({ pattern: ['gulp-*', 'del', 'main-bower-files'] }); ///////////BABEL////////////////// gulp.task('js:dev...
var ffdb = require('flat-file-db'); var events = require('events'); var util = require('util'); var File = require('../utils/File'); var path = require('path'); function Database(config) { var self = this; /** db instance */ this.db; /** * connect to db * @param table */ this.conne...
'use strict'; angular.module('core').controller('AdminController', ['$scope', 'Authentication', 'Menus', function($scope, Authentication, Menus) { $scope.authentication = Authentication; $scope.isCollapsed = false; $scope.menu = Menus.getMenu('topbar'); if (!$scope.authentication.user) { return; } $...
import en from './en.json' import ru from './ru.json' export default { en, ru, }
function convertTemp(temp, from_scale, to_scale){ if (from_scale === "De"){ if (to_scale === "K"){ return Math.round((373.15 - (temp * (2/3)))); } else if (to_scale === "C"){ return Math.round(100-(temp * (2/3))); } } };
/* * Copyright (c) 2012 VMware, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, ...
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; const renderSpinner = ({ colorSpinnerDark, colorSpinnerLight, isDark, isOneLine, spinnerSize }) => { const size = isOneLine ? 20 : spinnerSize || 40; const sizeVb = 50; const sizeVbHalf = sizeVb / 2; const viewB...
var config = { connectionString : "test03:31337/MicroCMS" }; module.exports = config;
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors // MIT License. See license.txt import DataTable from 'frappe-datatable'; frappe.provide('frappe.widget.utils'); frappe.provide('frappe.views'); frappe.provide('frappe.query_reports'); frappe.standard_pages['query-report'] = function() { var wrapp...
import express from 'express'; import logger from './logger'; import conf from './conf'; import app from './app'; const PORT = conf.get('port'); const HOST = conf.get('host'); app.listen(PORT, HOST, function() { logger.info(`app started on ${HOST}:${PORT}`); });
version https://git-lfs.github.com/spec/v1 oid sha256:bee0e2a9b6edb12d3cc4d44af5e0fb78d2fda7ff69489ac9eadd963b2cee79ff size 8727
"use strict"; let merge = require('webpack-merge'), devEnv = require('./dev.env'); module.exports = merge(devEnv, { NODE_ENV: '"testing"' });
(function(app) { app.merge({ config:{ // =require script.Configuration.js }, initiate: function() { var configuration = app.config, local = app.localStorage; var process = function() { // =require script.Initiate.process.js }; var route = function() { // =requ...
var TaskController = Ember.ObjectController.extend({ isEditing: false, time: '00:00:00', something: function(){ console.log("At least I'm getting run") return 'something' }, actions: { start: function(){ this.set('isEditing', true); }, stop: functi...
webpackJsonp([1],[ /* 0 */, /* 1 */ /*!*********************************************!*\ !*** ../require.context/templates ^\.\/.*$ ***! \*********************************************/ /***/ function(module, exports, __webpack_require__) { var map = { "./a": 2, "./a.js": 2, "./b": 3, "./b.js": 3 }; funct...
export default function indexTemplate() { return ` <section class="intro"> <section class="container"> <p class="lead tagline">Ether is a minimalistic framework<br>for creating modular, composable apps.</p> <div class="lead download-links"> <a ...
var gulp = require('gulp'); var del = require('del'); gulp.task('default', function() { console.log("This is default task."); }); gulp.task('clean', function(cb) { console.log("Start cleaning the folder snippets/"); del([ 'collection/*', 'snippets/*' ], cb); }); gulp.task('generate', function() { c...
let program = require('commander'), inquirer = require('inquirer'), log = require('npmlog'); let DockerPs = require('../src/docker-ps'); const LOG_PREFIX = 'eth-devnet/status'; program .description('print out the logs of the chosen Node or Miner') .parse(process.argv); return DockerPs .getContai...
/*jslint browser: true*/ /*global Tangram, gui */ map = (function () { 'use strict'; var map_start_location = [37.8044, -122.2708, 15]; // Oakland /*** URL parsing ***/ // leaflet-style URL hash pattern: // #[zoom],[lat],[lng] var url_hash = window.location.hash.slice(1, window.location.hash...
/** * Strings <https://github.com/sellside/strings> * * Copyright (c) 2014 Sellside, Jon Schlinkert and Brian Woodward * Licensed under the MIT License (MIT). */ 'use strict'; var _s = require('underscore.string'); var moment = require('moment'); var Pattern = require('../pattern'); var slugified = function(st...
/** * unit tests for ContentEmbed.js * @author adrienjoly, whyd */ // DEPRECATION => TRACK DETECTION CODE AND TEST SUITE HAS MOVED AND IS MAINTAINED BY PLAYEMJS PROJECT // prevent ContentEmbed from printing to the console var log = console.log; console.log = function() {}; var ContentEmbedWrapper = require('get...
typeof window !== "undefined" && (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["Hls"] = f...
'use strict'; describe('Directive: thumb', function () { // load the directive's module and view beforeEach(module('shoprApp')); beforeEach(module('app/thumb/thumb.html')); var element, scope; beforeEach(inject(function ($rootScope) { scope = $rootScope.$new(); })); it('should make hidden element...
/**creamos el prototipo de la compra*/ var Compra = function(){ this.nomCliente, this.nickCliente, this.mailCliente, this.precio = 0; this.cursoFront = [], this.cursoBack = [], this.direccion, this.credito = ""; this.setFichaCliente = function(nom_user, nick, email){ /*datos relevantes desde localstorage para los ...
define(function(require, exports, module) { var backbone = require('backbone'); var marionette = require('marionette'); //http://www.safaribooksonline.com/library/view/getting-started-with/9781783284252/ch06s02.html var vent = new backbone.Wreqr.EventAggregator(); exports.vent = vent; });
import React ,{Component} from 'react'; import './hint.min.css'; class Navbar extends Component{ constructor(props){ super(props); this.state={ color:{ r:0, g:0, b:0 }, user:null } } componentWillReceiveProps(newProps) { this.setState({ color:newPr...
/* global require */ var setup = { domain: 'voip', host: '', service: 'freeswitch', pattern: '/var/log/freeswitch/cdr-csv/Master.csv', header: ['Line', 'Caller', 'Caller addr', 'Destination', 'Context', 'Call started', 'Duration', 'Hangup cause', 'Read codec', 'Write codec'], } setup.line2arr = functi...
// Import modules const BotLibs = require('../libs/Botkit'); const initAdminFeatures = require('./botrunners/Admin'); const initInstagramFeatures = require('./botrunners/Instagram'); const initTwitterFeatures = require('./botrunners/Twitter'); const { winstonInfo, winstonError } = require('../libs/LogUtil'); function...
angular.module('todoController', ['angularUtils.directives.dirPagination','720kb.datepicker']) // inject the Todo service factory into our controller .controller('mainController', ['$scope','$http','Todos','Users', function($scope, $http, Todos,Users) { $scope.formData = {}; $scope.loading = true; Users.get() ...
const statsD = require('../lib/statsd'); let count = 0; const options = { maxBufferSize: process.argv[2] }; const statsd = new statsD(options); let start = new Date(); function sendPacket() { count++; statsd.increment('abc.cde.efg.ghk.klm', 1); if(count %100000 === 0) { const stop = new Date(...
describe('test', function () { var $timeout, $scope, $compile, sandbox, elm, data; data = [ {key: 'One', value: 1}, {key: 'Two', value: 2}, {key: 'Three', value: 3}, {key: 'Four', value: 4}, {key: 'Five', value: 5}, {key: 'Six', value: 6} ]; // Load Modu...
/** * Tom Select v1.7.4 * Licensed under the Apache License, Version 2.0 (the "License"); */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../../tom-select.js')) : typeof define === 'function' && define.amd ? define(['../../tom-select'], factory) : (gl...
module.exports = function(grunt) { grunt.initConfig({ qunit: { all: ['phone/www/tests/**/*.html'] } }) grunt.loadNpmTasks('grunt-contrib-qunit'); // Default task(s). grunt.registerTask('default', ['qunit']); };
import Dependency from './Dependency' /** * The base class for defining your application's dependencies and installation * proceedures. */ export default class Go extends Dependency { default() { this.dependencyName = 'Go' this.dependencyLink = 'https://golang.org/' this.dependencyD...
import Textmode from 'textmode'; import Utils from './utils'; import characterSets from '../img/characters.json'; const BLACK = 0; const RED = 1; const GREEN = 2; const YELLOW = 3; const BLUE = 4; const MAGENTA = 5; const CYAN = 6; const WHITE = 7; const TELETEXT_COLORS = [ '#000000', '#ff0000', '#00ff00', '#ffff...
// original code grabbed from http://oranlooney.com/functional-javascript/ Object.copy = function Object$Copy(obj, options/*, level*/) { if (!options) { options = {}; } // initialize max level to default value if (!options.maxLevel) { options.maxLevel = 25; } // initialize level to default value var level ...
"use strict"; const express = require('express'); const bodyParser = require('body-parser'); const twilio = require('twilio'); const app = express(); const request = require('request'); var port = process.env.PORT || 8080; // set our port app.use(bodyParser.urlencoded({ extended: false } )); console.log(process.env....
var Icon = require('../icon'); var element = require('magic-virtual-element'); var clone = require('../clone'); exports.render = function render(component) { var props = clone(component.props); delete props.children; return element( Icon, props, element('path', { d: 'M16.5 6v11.5c0 2.21-1.79 4-4 4s-4...
module.exports = Object.create( { Postgres: require('../dal/Postgres'), apply( resource ) { return this[ resource.request.method ]( resource ) }, DELETE() { return this.Postgres.query( `DELETE FROM ${resource.path[0]} WHERE id = ${resource.path[1]} RETURNING id` ) }, GET( resource ) { var pa...
require.onError = function (err) { alert("RequireJS error: Cannot load module '" + err.requireModules + "'"); } window.onerror = function (errorMsg, url, lineNumber) { alert("Javascript error: " + errorMsg + "\r\nsource: " + url + "\r\nline: " + lineNumber); } /* Step 12 - Ask RequireJS for jquery, module1, module...
'use strict'; module.exports.definition = { set: function (v) { this.setProperty('-webkit-wrap-shape-outside', v); }, get: function () { return this.getPropertyValue('-webkit-wrap-shape-outside'); }, enumerable: true, configurable: true };
"use strict"; exports.__esModule = true; /** * Given an array-like, returns a real array. * @param {Array-like} args * @return {Arrau} */ exports["default"] = (function (args) { return Array.prototype.slice.call(args); });
'use strict'; const isStandardSyntaxAtRule = require('../../utils/isStandardSyntaxAtRule'); const keywordSets = require('../../reference/keywordSets'); const optionsMatches = require('../../utils/optionsMatches'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); c...
/** * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ /** * @fileOverview Horizontal Rule plugin. */ ( function() { var horizontalruleCmd = { canUndo: false, // The undo snapshot will be handled ...
(function(){ 'use strict'; /** * jQuery UI date pciker filter model * @constructor * @param {string} dataPath - DatePickerFilter data-path attribute * @param {string} dateTimeFormat * @param {Date|string} currentDate */ jQuery.fn.jplist.ui.controls.DatePickerFilterDTO = function(dataPath, dateTimeFormat, ...
version https://git-lfs.github.com/spec/v1 oid sha256:7ca09d1fb63dd3925bf003139aa86d6b6a966eac124fd3fe0826e8b358148946 size 11902
'use strict'; const path = require('path'); const globby = require('globby'); /** * Get all available analyzers * * @param {Object} config project configuration * * @return {Array} list of reporter methods */ function getAnalyzers(config) { const methods = {}; const basePath = config.filePaths.analyz...
// Load the http module to create an http server. const http = require('http'); // Configure our HTTP server to respond with Hello World to all requests. const server = http.createServer((request, response) => { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello node!!\n"); }); // Listen...
/* @flow */ import type { NodePath, Scope } from 'babel-traverse'; class InnerScopeVisitor { referencedScopes: Scope[]; thisReferencedScopes: Scope[]; ReferencedIdentifier = (path: NodePath) => { const binding = path.scope.getBinding(path.node.name); if (binding) { // istanbul ignore next: could ...
/** * Test that we're able to add a custom theme via the * addTheme method. */ describe('ngNotify addTheme method', function() { 'use strict'; var ngNotify, doc; var message = 'Message to display during tests.'; var newThemeName = 'newTheme'; var newThemeClass = 'new-theme'; /** ...
/** * Copyright 2012-2018, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; var Color = require('../../components/color'); module.exports = function fillColorDefaults(traceIn, traceOut,...
/*! * SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5) * (c) Copyright 2009-2015 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.ui.commons.Area. sap.ui.define(['jquery.sap.global', './library', 'sap/ui/core/Element'], functio...
/** * Created by joneszhu on 16/9/1. */ 'use strict'; module.exports = function (ctx) { const router = ctx.get('express').registerAsyncRouter('test'); // 两秒延迟之后返回hello world. router.get('/test/msg', async function (req, res, _next) { const msg = await delayMsg('hello world'); res.end(msg); }); ...
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router'; const ProductPreviewElement = ({ product }) => { return ( <div className="productPreviewElement col-xs-3 text-center"> <img src={product.picturePath} /> <div> <div> <Link to={'/produ...
(function(window, angular) { 'use strict'; angular.module('app.wallet') .directive('walletSend', walletSend); walletSend.$inject = ['DEFAULT_FEE', 'MIN_OUTPUT', 'Toast', 'txUtil']; function walletSend(DEFAULT_FEE, MIN_OUTPUT, Toast, txUtil) { return { templateUrl: 'wallet/...
angular.module('ggisland.ccnetwork.states.about', ['ggisland.ccnetwork.states.demo','ParseServices']) .config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function($stateProvider, $urlRouterProvider, $locationProvider) { $stateProvider .state('demo.about', { abstract: true, url: '/about'...
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ ret...
$(document).ready(function(){ $('.nodrag').mousedown(function(event){event.preventDefault();}); $('.clickable').mouseenter(function(){$(this).addClass('clickable_hover');}).mouseleave(function(){$(this).removeClass('clickable_hover');}).mousedown(function(event){event.preventDefault();}); $(".swipebox").swipebox(...
$(document).ready(function(){ $('head').append('<script src="js/mask.js" type="text/javascript"></script>'); }) var last_cep = 0; var address; var lat; var lng; var wsconf; function wscep(conf) { //parametros padrao true if(!conf){ conf = { 'auto': true, 'map' : '', ...
/* * Copyright (c) 2016 airbug Inc. http://airbug.com * * bugcore may be freely distributed under the MIT license. */ //------------------------------------------------------------------------------- // Annotations //------------------------------------------------------------------------------- //@Export('Itera...
import Ember from 'ember'; import EnginesInitializer from '../../../initializers/engines'; import { module, test } from 'qunit'; let application; module('Unit | Initializer | engines', { beforeEach() { Ember.run(function() { application = Ember.Application.create(); application.deferReadiness(); ...
import { ActiveRecord } from "dist/angular-cakephp"; /** * Class MarketingFilter */ export default class MarketingFilter extends ActiveRecord {}
'use strict' const populate = require('feathers-hooks-common').populate const serialize = require('feathers-hooks-common').serialize const uuid = require('../../../globalHooks').uuid const schema = { populate: { include: [{ service: 'api/campaigns-items-choices', nameAs: 'choices', parentField...
import path from 'path'; import webpack from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; const config = require('./base'); export default Object.assign({}, config, { devtool: 'cheap-module-source-map', entry: [ 'babel-polyfill', // must be first entry to properly set public path pa...
import { createSelector } from 'reselect'; import { List } from 'immutable'; const cellsSelector = (state, player) => state.boards.get(player).get('cells'); export const cellRowsSelector = createSelector( cellsSelector, cells => new List( cells.valueSeq().groupBy(cell => cell.row).valueSeq().map(seq => ...
import {UniqueId} from "../src/data/unique_id.js"; import {expect, assert} from "chai"; describe("Unique ID", () => { it("should generate ID", (done) => { let idUnderTest = new UniqueId().generate(); expect(idUnderTest).not.to.be.undefined; expect(idUnderTest).not.to.be.null; ass...
datab = [{},{"Profile Name":{"colspan":"1","rowspan":"1","text":"Network Address Management"},"Actor":{"colspan":"1","rowspan":"1","text":"DHCP Client"},"Protocols Used":{"colspan":"1","rowspan":"1","text":"DHCP"},"Optional Transactions":{"colspan":"1","rowspan":"1","text":"N/A"},"Security Support":{"colspan":"1","rows...
/** * Copyright 2012-2020, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; var Lib = require('../../lib'); var attrs = require('./attributes'); var oppAxisAttrs = require('./oppaxis_attri...
version https://git-lfs.github.com/spec/v1 oid sha256:d3ce6cb0624e388ecf22824c0091d4eac151e3300cb9438f66918e7d08c5148b size 28662
/////////////////////////////////////////////////////////////////////////// // Copyright © Esri. All Rights Reserved. // // Licensed under the Apache License Version 2.0 (the 'License'); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.ap...
import { push } from 'redux-router'; import { CALL_API } from '../../../middleware/apis'; import Apis from '../../../apis/apis'; import actionType from '../../constant/actionType'; import { simpleApiFailToast } from '../../utils/actions'; export function registerUser(params) { return { [CALL_API]: Apis['u...
define(["JS"], function(JS) { return function() { // Private Scope var _Module, _privVar = null; function _setPrivVar(val) { _privVar = val; } // Our Constructor _Module = function() {}; _Module.prototype = { // Public Scope publicVar: null, setPrivVar: ...
export function formatDate(time) { const date = new Date(time); return `${getMonthName(date)} ${getDayOfTheMonthWithOrdinal( date )}, ${date.getFullYear()}`; } function getDayOfTheMonthWithOrdinal(date) { const dayOfTheMonth = date.getDate(); const ordinal = getOrdinal(dayOfTheMonth); return `${dayOfTheMonth...
/** * Module dependencies. */ const express = require('express'); const compression = require('compression'); const session = require('express-session'); const bodyParser = require('body-parser'); const logger = require('morgan'); const chalk = require('chalk'); const errorHandler = require('errorhandler'); const lus...
import {expect} from 'chai'; import {List} from 'immutable'; describe('immutability', () => { describe('a number', () => { function increment(currentState) { return currentState + 1; } it('is immutable', () => { let state = 42; let nextState = increment(state); expect(nextState...
var common = require("ui/label/label-common"); var utils = require("utils/utils"); var viewModule = require("ui/core/view"); var trace = require("trace"); function onTextWrapPropertyChanged(data) { var label = data.object; if (data.newValue) { label.ios.lineBreakMode = NSLineBreakMode.NSLineBreakByWordW...
export default function WriteCacheError(message) { this.name = 'WriteCacheError'; this.message = message; } WriteCacheError.prototype = Error.prototype;
// TODO Test all methods define(() => { // Assets storage class class Storage { constructor(loader) { this.loader = loader; this.assets = new Map(); this.default = { retries: 2, delay: 200 }; } get pool() { const pool = []; this.assets.forEach(asset => pool.push(asset)); ...
#!/usr/bin/env node // http://emberjs.com/blog/2015/02/05/compiling-templates-in-1-10-0.html var fs = require('fs'); var UglifyJS = require("uglify-js"); var compiler = require('./ember-template-compiler'); var input = fs.readFileSync(process.argv[2], { encoding: 'utf8' }); var template = compiler.precompile(input, f...
/** * Output widget to vizualize ExpressionMatrix object. * Pavel Novichkov <psnovichkov@lbl.gov> * @public */ define ( [ 'kbwidget', 'bootstrap', 'jquery', 'kbaseAuthenticatedWidget', 'kbaseLinechart' ], function( KBWidget, bootstrap, $, kbaseAuthenticatedWidget, kbaseLinechart ) { return ...
/** * This file uses the Page Object pattern to define the main page for tests * https://docs.google.com/presentation/d/1B6manhG0zEXkC-H-tPo2vwU06JhL8w9-XCF9oehXzAQ */ 'use strict'; var ViewPage = function() { this.nameEl = element(by.binding('divisionCollectionless.name')); this.headDivisionEl = eleme...