code
stringlengths
2
1.05M
var TOPH = this.TOPH || {}; TOPH.templates = TOPH.templates || {}; TOPH.templates.projectChooserTemplate = function (data) { return ( React.createElement("div", null, React.createElement("h2", null, "Project:"), React.createElement("select", {onChange: this.onChange, value: this.state.sel...
var kue = require('kue') , project_root = __dirname.split('node_modules')[0] , kue_config = require(project_root + '/config/kue') , queue = kue.createQueue({}); module.exports = function (obj) { console.log('wh_receive queue create: ' + obj); var job = queue.create('wh_receive', obj).save( function(err){ ...
'use strict'; var mongoose = require('mongoose') , util = require('util') , mongoosePrivatePaths = require('mongoose-private-paths') , _ = require('underscore') , env = process.env.NODE_ENV || 'development' //, config = require('../config') , Schema = mongoose.Schema , PlayerSchema = requi...
import { V, render } from "soot"; import { VNodeFlags } from "soot-vnode-flags"; describe("Keyed simple", () => { let container; beforeEach(function() { container = document.createElement("div"); document.body.appendChild(container); }); afterEach(function() { render(null, container); contain...
/** * use `$cookies` instead of `$cookieStore` * * In Angular 1.4, the $cookieStore service is now deprected. * Please use the $cookies service instead * * @version 0.3.0 */ 'use strict'; module.exports = function(context) { return { MemberExpression: function(node) { if (node.object &&...
// Karma configuration // Generated on Fri Mar 13 2015 23:29:57 GMT+0900 (JST) module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: '', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/k...
import React from 'react'; import Svg from './svg'; const ErrorIcon = props => ( <Svg {...props}> <path opacity=".3" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 13h-2v-2h2v2zm0-4h-2V7h2v6z"/> <path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16z"/> <path d="M11 15h2v2h-2zM11...
import _ from 'lodash' import { numberToWordMap } from './numberToWord' export const COLORS = [ 'red', 'orange', 'yellow', 'olive', 'green', 'teal', 'blue', 'violet', 'purple', 'pink', 'brown', 'grey', 'black', ] export const FLOATS = ['left', 'right'] export const SIZES = ['mini', 'tiny', 's...
/* * Development environment config */ var config = {}; config.http = { port: '80' }; module.exports = config;
/** * @file * Front-end interaction for the installer routine. * * Copyright 2013 Kalamuna LLC */ var install = (function($, ko, socket) { "use strict"; var self = {}; // DOM elements: var $progressBar = $('.progress-bar'), $statusMessage = $('.lead'), $dependencyInstallModal = $('.dependency...
/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v1.1.0-rc.5-master-7f01138 */ !function(t,n,e){"use strict";n.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",f...
/* * Copyright (c) 2016 -2021 Bjoern Kimminich & the OWASP Juice Shop contributors. * SPDX-License-Identifier: MIT */ /* This is a default multiplier whereby the score will be = (difficulty x multiplier) i.e. using these multipliers will create challenges with the following scores: * = 100 ** = 250 *...
var tape = require("tape"), createStore = require(".."); tape("createStore() should create waekmap like store", function(assert) { var store = createStore(), object = {}; store.set(object, "{}"); assert.equals(store.has(object), true); assert.equals(store.get(object), "{}"); assert.eq...
angular.module('ui').directive('uiComponent', ['$http', '$compile', '$templateCache', '$q', function ($http, $compile, $templateCache, $q) { var templateCache = {}; return { restrict: 'E', bindToController: { item: '=' }, controll...
/** * Module dependencies. */ var chalk = require('chalk'); var fs = require('fs-extra'); var path = require('path'); /** * Expose `move`. */ exports = module.exports = move; /** * Move a file or folder to current working directory. * * @param {String} src * @param {String} dest * @param {String} repositor...
'use strict'; describe('Controller Tests', function () { describe('CashTransaction Management Controller', function () { var $scope, $rootScope; var MockEntity, MockCashTransaction, MockUser, MockCashSplit; var createController; beforeEach(inject(function ($injector) { ...
(function () { 'use strict'; angular .module('myApp') .controller('HomeCtrl', HomeCtrl); HomeCtrl.$inject = ['$scope']; function HomeCtrl($scope) { //Loading on scroll const debounce = function (func, wait = 20, immediate = true) { let timeout; return function () { const context = this, ar...
/********************************************************************************************************************* * * Metadata-related stuffs: mostly copying things around * *********************************************************************************************************************/ const { src, dest...
var gulp = require("gulp"); var bower = require("gulp-bower-files"); var flatten = require("gulp-flatten"); var typescript = require('gulp-tsc'); var clean = require('gulp-clean'); var uglify = require('gulp-uglify'); var cond = require('gulp-if'); var gutil = require('gulp-util'); var appConfig = { app: { ...
// digest auth request // by @inorganik // dependent upon CryptoJS MD5 hashing: // http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js var digestAuthRequest = function (method, url, username, password) { var self = this; if (typeof CryptoJS === 'undefined' && typeof require === 'function') { var ...
import React from 'react'; import { shallow } from 'enzyme'; import Fixture from '../index'; const defaultProps = { data: { result: {}, date: '', homeTeamName: '', awayTeamName: '' }, }; describe('Fixture', () => { it('renders without crashing', () => { shallow(<Fixture {...defaultProps} />)...
import React from "react"; import PropTypes from "prop-types"; class StepVirtual extends React.Component { render() { return ( <g className={this.props.theme.virtualBox} > <line className={this.props.theme.path} ...
var InputText = React.createClass({displayName: "InputText", componentWillReceiveProps: function (newProps) { React.findDOMNode(this.refs.input).value = newProps.value }, render: function () { return React.createElement("div", {className: "form-group"}, React.createElement("labe...
/** * Base class for the Tetromino (official(?) name for the shapes. properties: * board - the board in which this shape is placed. x - the x coordinate at * which the shape is placed (upper right) y - the y coordinate at which the * shape is placed (upper right) color - the color of this shape ghost - boolean * d...
'use strict'; // Use application configuration module to register a new module ApplicationConfiguration.registerModule('account-modal');
/** * Created by Administrator on 2016/7/1. */ import React from 'react' import PropTypes from 'prop-types' export default class List2 extends React.Component { constructor (props) { super(props) } render () { const { name } = this.props return ( <p> List2 with {name} </p> ...
// Exports the "save" plugin for usage with module loaders // Usage: // CommonJS: // require('tinymce/plugins/save') // ES2015: // import 'tinymce/plugins/save' require('./plugin.js');
var carcass, config, couch, lib, name, path, _i, _len, _ref; couch = require('../'); carcass = require('carcass'); config = require('carcass-config'); module.exports = lib = carcass.mixable(); lib.mixin(carcass.proto.register); lib.mixin(config.proto.manager); lib.extend(couch, 'classes'); lib.extend(couch, 'pl...
import fs from 'fs' import test from 'ava' import pify from 'pify' import childProcess from 'child_process' import pkg from './package.json' test('gets the latest version', async t => { t.plan(1) const stdout = await pify(childProcess.execFile)('./cli.js', ['johnotander', 'github-latest-cli']) t.is(stdout.trim(...
tinymce.init({ selector: 'textarea.rteditor' });
#!/usr/bin/env node 'use strict'; const meow = require('meow'); const isAnImageUrl = require('.'); const cli = meow({ help: [ 'Usage', ' $ is-an-image-url "<url>"', '', 'Example', ' $ is-an-image-url "https://www.npmjs.com/static/images/collaboration-security.svg"' ] }); const input = cli.in...
import { Meteor } from 'meteor/meteor'; import { Accounts } from "meteor/accounts-base"; export function RegisterCtrl ($meteor, $state) { var vm = this; vm.credentials = { email: '', password: '', profile: { first_name: '', last_name: '', }, }; vm.error = ''; vm.register = fun...
/*! * jQuery JavaScript Library v2.2.3 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-04-05T19:26Z */ (function( global, factory ) { if ( typeof module ==...
// HTTP CODES CONFIG const HTTP_CODES_CONFIG = require('../app.config').HTTP_CODES_CONFIG; // APP SERVICES const mongoose = require('../services/mongoose'); // APP MODELS const issueModelName = 'Issue'; const issueModel = mongoose.models[issueModelName] ? mongoose.model(issueModelName) : mongoose.model(issueModelNa...
var Botkit = require('botkit') var Witbot = require('witbot') var slackToken = "xoxb-36765713364-IEIxmspAGV52mX5uxP4HeR4s" var witToken = "N7TEI4LXZSTXLBKXHCW4ZBUSCPFMLSH4" var openWeatherApiKey = "OPENWEATHER_KEY" var controller = Botkit.slackbot({ debug: false }) controller.spawn({ token: slackToken }).startRT...
Meteor.startup(function () { // indexes Meteor.users._ensureIndex({ 'profile.lastPing': 1 }, { unique: false }); Messages._ensureIndex({ 'time': 1 }, { unique: false }); Messages._ensureIndex({ 'channel': 'hashed' }); Messages._ensureIndex({ 'hash': 1 }, { sparse: true }); Flags._ensureIndex({ 't': 1 }, { u...
/** * Created by Janne on 5.11.2014. */ var PlayerDb = require('./../js/player-db'); var assert = require('assert'); describe("Crude authentication test", function() { it("Should create a new user to the system", function(done) { var playerDb = new PlayerDb(); playerDb.Save({ username : "kokla...
export const previousUtxosObjUtxoArray = [ { height: 680782, tx_hash: '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', tx_pos: 1, value: 546, }, { height: 680784, tx_hash: '28f061fee068d3b9cb578141bac3d4d9ec4eccebec68...
// This file translates a date to a database string representation of that date module.exports.getSecondBulk = function(t) { return t.toISOString().replace("T", " ").substring(0,19); }; module.exports.getMinuteFromSecond = function(t) { return t.substring(0,16); }; module.exports.getHourFromMinute = function(t) { ...
$(function(){ $('.player').YTPlayer(); $(window).on('activate.bs.scrollspy', function(e, data) { console.log(data.relatedTarget); if(data.relatedTarget == '#home' || data.relatedTarget == '#about' || data.relatedTarget == '#contact') { $('#navbar-main').removeClass('navbar-light').addClass('navbar-da...
import React, { Component } from 'react'; import { scaleLinear, scaleTime } from 'd3-scale'; import { timeParse } from 'd3-time-format'; import PropTypes from 'prop-types'; import { min, max } from 'd3-array'; import { axisBottom, axisLeft, axisRight } from 'd3-axis'; import { select as d3Select } from 'd3-selection'; ...
'use strict'; const { assoc, has, prop, omit } = require('lodash/fp'); const strapiUtils = require('@strapi/utils'); const { ApplicationError } = require('@strapi/utils').errors; const { hasDraftAndPublish, isVisibleAttribute } = strapiUtils.contentTypes; const { PUBLISHED_AT_ATTRIBUTE, CREATED_BY_ATTRIBUTE } = strap...
// sum.js function sum(value1, value2) { return value1 + value2; } module.exports = sum;
var express = require('express'); var app = express(); var cors = require('cors') var Notes = require('./domain/Notes'); var notes = new Notes(); var Users = require('./domain/Users'); var users = new Users(); /* enable cors */ app.use(cors({ "credentials": true, "origin": true, "methods": ["GET","HEAD","PUT","PA...
$wnd.showcase.runAsyncCallback13("function h1b(a){var b,c;U0b(a.hb,'',Gpc);c=a.j.c;for(b=0;b<c;b++){U0b(nMb(a,m1b(a.j,b)),Gpc,''+b)}}\nfunction bsb(){var a,b;b=new j1b;b.e[coc]=5;for(a=1;a<10;a++){g1b(b,new lMb('Bouton '+a))}h1b(b);return b}\nvar Gpc='cwVerticalPanel';K8(429,1,Mmc);_.Bc=function gsb(){bbb(this.a,bsb())...
import VueRouter from 'vue-router'; import { createLocalVue, shallowMount, mount } from '@vue/test-utils'; import { ContentNodeKinds } from 'kolibri.coreVue.vuex.constants'; import makeStore from '../makeStore'; import CustomContentRenderer from '../../src/views/ChannelRenderer/CustomContentRenderer'; import { PageName...
'use strict'; import 'whatwg-fetch'; // add active class to selected faq category const categories = document.querySelectorAll('.category'); if (categories) { categories.forEach(category => { category.addEventListener('click', () => { let currentActive = document.querySelector('.activeFaq'); ...
'use strict'; var convert = require('./convert'), func = convert('has', require('../has')); func.placeholder = require('./placeholder'); module.exports = func; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2NsaWVudC9saWIvbG9kYXNoL2ZwL2hhcy5qcyJdLCJuYW1lcyI6W10s...
import React from 'react'; export default class extends React.Component { render() { return ( <div> local </div> ) } }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *------------------------------------------------------------...
var UI = require('ui'); var ajax = require('ajax'); // Build loading view. var main = new UI.Card({ title: 'Trending Now', body: 'Loading...' }); main.on('show', function() { ajax( { url: 'http://trending-now.hripak.com/api/1.0/all?ensure_hash=1', type: 'json' }, function(data, status, request) { ...
var fs = require("node-fs"); module.exports = function examples(conscribe) { var conscribe = conscribe; var publicInt = { generateExamples: function (mode, channel, channelName) { // need baseline, combines, extension... var c = JSON.parse(JSON.stringify(channel)); // I am not proud of this... var pa...
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gulp-tasks/cldr/extract.js (function(global) { glo...
require("kaoscript/register"); var Type = require("@kaoscript/runtime").Type; module.exports = function(__ks_Array, __ks_Object, clone) { var __ks_0_valuable = Type.isValue(__ks_Array); var __ks_1_valuable = Type.isValue(__ks_Object); var __ks_2_valuable = Type.isValue(clone); if(!__ks_0_valuable || !__ks_1_valuabl...
// Some useful utility methods define(["jquery", "config"], function($, config) { // Get a named <template> function template(name) { return document.querySelector("template[name='" + name + "']"); } // Load the todos with AJAX function getTodos(success, error, complete) { $.ajax({ dataType: "j...
/*jslint node: true */ "use strict"; var _ = require('underscore'), utils = require('../utils/utilities'), resolver = new (require('../utils/interface-resolver'))(), collections = function () { // set the public facing methods and the...
const Discord = require('discord.js'); const request = require('request'); const jsdom = require('jsdom'); const { JSDOM } = jsdom; var fs = require('fs'); const string = require('./string-manip.js'); const src = require('./source.json'); var bot; const BONUS_THRESHOLD = 10; function callback(err, resp, body){ // s...
import * as softReturn from '@tryghost/kg-parser-plugins/lib/cards/softReturn'; import Component from '@ember/component'; import Editor from 'mobiledoc-kit/editor/editor'; import cleanBasicHtml from '@tryghost/kg-clean-basic-html'; import defaultAtoms from '../options/atoms'; import registerKeyCommands, {BASIC_TEXTAREA...
'use strict'; var path = require('path'); var assert = require('chai').assert; var ZSchema = require('z-schema'); require(path.join(process.cwd(), './custom-formats'))(ZSchema); var validator = new ZSchema({}); var schema = require('./schema.json'); describe('When using swagger custom formats ', function() { var js...
/* jshint mocha: true */ 'use strict'; var path = require('path'); var expect = require('expect.js'); var context = require('./setup')(); describe('dependency bundle', function () { it('should acquire dependency module', function () { var depModule = context.__require(context.__fixtureFile); expect(depMod...
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' // 'starter.services' is found in services.js // 'start...
const analyzeName = require('../../../lib/path/analyzers/name') describe('path.analyzers.name', () => { it('should not update token if already analyzed', () => { const token = { analyzed: true } const save = {...token} const ret = analyzeName(token) expect(ret).toBeFalsy() expect(toke...
#!/usr/bin/env node 'use strict'; var minimist = require('minimist'), each = require('./utils/each'), filter = require('./utils/filter'), mix = require('./utils/mix'), isArrayLike = require('./utils/isArrayLike'), readFile = require('./utils/readFile'), readJSON = r...
'use strict'; /** * Module dependencies. */ var init = require('../config/init')(), config = require('../config/config'), mongoose = require('mongoose'), inquirer = require('inquirer'); // Bootstrap db connection mongoose.connect(config.db, function(err) { if (err) { console.error(chalk.red('Could not connect...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { parse, stringify } from 'query-string'; import { push as pushAction } from 'react-router-redux'; import { Card, CardText } from 'material-ui/Card'; import compose from 'recompose/compose'; impor...
;(function (SlideShare) { const SS_URL_REGEX = /\/\/(www\.)?slideshare.net\/slideshow\/embed_code\/(\d+)/ const URL_PREFIX = '//slideshare.net/slideshow/embed_code/' /** SlideShare.parse = function(url, options) Parse the given SlideShare url @param {Object} $ Instance of cheerio @param {String} url Sl...
// Eloquent JavaScript // Run this file in your terminal using `node my_solution.js`. Make sure it works before moving on! // Program Structure // Write your own variable and do something to it. var foo = 5; foo++; // Favorite Food prompt("What's your favorite food?") console.log("Hey! That's my favorite too!") //...
"use strict"; /** * @ngdoc function * @name algoland.controller:AboutCtrl * @description * # AboutCtrl * Controller of the algoland */ angular.module("algoland") .controller("AboutCtrl", function() { });
var expect = require('chai').expect; require('should'); function add(x,y) { return x + y; } describe('test suit', function() { describe('加法函数的测试', function() { it('1 加 1 应该等于 2', function() { expect(add(1, 1)).to.be.equal(2); }); }); describe('#indexOf()', function() { context('when not p...
'use strict'; /* Directives */ angular.module('myApp.directives', []) .directive('barChart', ['$document', '$window', function($document, $window) { return { scope: { data: '=', }, link: function(scope, element, attrs) { var chart = d3.select('#chart') .append...
import deprecated from '../../core/utils/deprecated'; // Class static helpers. import getHelper from '../class_static_methods/getHelper.js'; import getHelpers from '../class_static_methods/getHelpers.js'; import hasHelper from '../class_static_methods/hasHelper.js'; function onInitClass(Class, className) { Class.get...
import REST from '@/utils/rest' import consts from '@/utils/consts' import restHelpers from '@/utils/helpers/restHelpers' export default class extends REST { constructor () { super() this.baseURL = consts.API_URL this.errorHandler = restHelpers.errorHandler // this.headers = restHelpers.getHeaders() ...
/** * @license AngularJS v1.5.3 * (c) 2010-2016 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) {'use strict'; /** * @ngdoc module * @name ngRoute * @description * * # ngRoute * * The `ngRoute` module provides routing and deeplinking saitServices and directives for ...
import moment from 'moment-timezone' import BaseModel from './Base' class MeasurementFilterModel extends BaseModel { setName (name) { this.setAttribute('name', name) return this } getName () { return this.getAttribute('name') || this.getDevices().join(', ') } setGrouped (grouped = true) { this.setAttribut...
var InputText = React.createClass({displayName: "InputText", componentWillReceiveProps: function (newProps) { console.log(newProps) React.findDOMNode(this.refs.input).value = newProps.value }, render: function () { return React.createElement("div", {class: "form-group"}, ...
'use strict'; const bo = require( '../../source/index.js' ); const Model = bo.ModelComposer; const F = bo.common.PropertyFlag; const cr = bo.commonRules; const Address = require( './address.js' ); const BlanketOrderItems = require( './blanket-order-items.js' ); const BlanketOrder = new Model( 'BlanketOrder' ) .edi...
var path = require('path'); var webpack = require('webpack'); module.exports = { watch: true, context: __dirname + "/", entry: [ __dirname + '/js/mojs.babel.js' ], module: { loaders: [ { test: /\.(babel.js)$/, exclude: /node_modules/, loader: 'babel-loader', query: { ...
class BaseElement { constructor() { if (new.target === BaseElement) { throw new Error('Abstract class cannot be instantiated.'); } this.element = null; } appendTo(selector) { this.createElement(); $(selector).append(this.element); } createElemen...
'use strict'; /** * Module dependencies. */ var path = require('path'), mongoose = require('mongoose'), logger = require(path.resolve('./config/lib/logger')).log4jLog, Vote = mongoose.model('Vote'), Poll = mongoose.model('Poll'), User = mongoose.model('User'), errorHandler = require(path.resolve('./modul...
(function(){ 'use strict'; var app = window.LS || (window.LS = {}); var u = app.utils; // Info Module app.info = {vm: {}}; app.info.vm.init = function() {}; app.info.main = function(){ var info = app.system; var li = function(title, content, hide) { if (hide) { return ""; } el...
function myGetElementsByClassName(selector) { if ( document.getElementsByClassName ) { return document.getElementsByClassName(selector); } var returnList = new Array(); var nodes = document.getElementsByTagName('div'); var max = nodes.length; for ( var i = 0; i < max; i++ ) { if...
var model = require('../..'); var assert = require('assert'); var Car = model(); describe('lib mongel', function () { it('should instantiate', function () { var car = new Car({ color: 'green' }); assert.equal(car.color, 'green'); }); it('should instantiate array', function () { var cars = new Car(...
angular.module('myApp.pages.webSocket', []) .controller('WebSocketCtrl', function($rootScope, $scope, $timeout, webSocket, throttle) { $rootScope.page = 'webSocket'; $rootScope.fullContent = false; $scope.tag = 'angularjs'; $scope.counters = {}; $scope.tweets = []; $scope.echoes = []; $scope.showEcho = t...
/* * by-test.js: Tests for the By reactor stream. * * (C) 2012, Nodejitsu Inc. * */ var assert = require('assert'), vows = require('vows'), godot = require('../../lib/godot'), macros = require('../macros').reactor; var counts = { service: 0, 'service+ttl': 0, 'service+recombine': 0 }; vows.des...
import React from 'react'; import djc from '../images/djc.png'; import vba from '../images/vba.png'; import bbt from '../images/bbt.png'; import profile from '../images/profile.jpg'; import kevin from '../images/kevin.jpg'; import helios from '../images/helios.png'; import { Button, Image } from 'react-bootstrap'; co...
/*Copyright 2014 Yahoo! Inc. All rights reserved.*/ var STATUS_CODES = require('http'); var fs = require('fs'), path = require('path'), Promise = require('ypromise'); exports.error = error; exports.requireDir = requireDir; exports.extend = extend; exports.promisify = promisify; exports.image...
import { combineReducers } from 'redux'; import filterText from './filterText'; import tags from './tags'; const rootReducer = combineReducers({ filterText, tags }); export default rootReducer;
//http://nodejs.org/docs/v0.12.0/api/events.html /** * @namespace */ var events = {}; /** * @interface */ events.IEventEmitter = function() {}; /** * @type {number} */ events.IEventEmitter.defaultMaxListeners; /** * @param {!events.IEventEmitter} emitter * @param {string} event * @return {number} */...
(function(CodeMirror) { CodeMirror.defineOption("placeholder", "", function(cm, val, old) { var prev = old && old != CodeMirror.Init; if (val && !prev) { cm.on("swapDoc", onChange); cm.on("change", onChange); onChange(cm); } else if (!val && prev) { cm.on("swapDoc", onChange); ...
(function () { 'use strict'; var options = { url: 'localhost:3000/api', invalidUrl: function (e) { // optional option if close event code is >= 1006 https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent // this function will be called expecting a promise // in the resolve of the pro...
import bluebird from 'bluebird'; import pageParser from './pageParser'; import messageBus from './messageBus'; const compareScore = (a, b) => a.score - b.score; const compareRating = (a, b) => a.rating !== b.rating ? a.rating - b.rating : compareScore(a, b); const compareRarity = (a, b) => a.rarity !== b.rarity ? a.ra...
/** * DevExtreme (integration/knockout/validation.js) * Version: 16.2.5 * Build date: Mon Feb 27 2017 * * Copyright (c) 2012 - 2017 Developer Express Inc. ALL RIGHTS RESERVED * EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml */ "use strict"; var $ = require("jquery"), Class = require("../../cor...
goog.provide('ol.asserts'); goog.require('ol'); goog.require('ol.AssertionError'); /** * @param {*} assertion Assertion we expected to be truthy. * @param {number} errorCode Error code. */ ol.asserts.assert = function(assertion, errorCode) { if (!assertion) { throw new ol.AssertionError(errorCode); } };
module.exports = { subscribe: function(req, res) { Video.watch(req.socket); Video.find().exec(function(err, videos) { Video.subscribe(req.socket, videos); }); }, recent: function(req, res) { Video.find({ createdAt: { '>=': new Date(new Date().getTime() - 3600 * 1000) } ...
/* global it, expect, describe */ import React from 'react' import { shallow } from 'enzyme' import renderer from 'react-test-renderer' import App from '../pages' describe('With Enzyme', () => { it('App shows "HOME PAGE is here!"', () => { const app = shallow( <App /> ) expect(app.find('p').text(...
/* eslint-disable ember/no-component-lifecycle-hooks */ /* eslint-disable ember/require-tagless-components */ /* eslint-disable ember/no-classic-classes */ /* eslint-disable ember/no-classic-components */ import Component from '@ember/component'; import { EKMixin, keyPress, keyDown, keyUp, EKOnInsertMixin } from 'ember...
/* * Copyright (C) 2014 United States Government as represented by the Administrator of the * National Aeronautics and Space Administration. All Rights Reserved. */ define([ '../../../util/WWUtil', './KmlControls' ], function (WWUtil, KmlControls ) { "use strict"; /** ...
var table; $(document).ready(function() { table = $("#grid"); get_dados_grid(); $('#grid tbody').on( 'click', 'tr', function () { if ( $(this).hasClass('active') ) { limpar_selecao_grid(); } else { table.find('tr.active').removeClass('active'); $(this).addClass('active'); var id = table.find('tr...
'use strict'; /** * Module dependencies. */ var groupsPolicy = require('../policies/groups.server.policy'), groups = require('../controllers/groups.server.controller'); module.exports = function (app) { // groups collection routes app.route('/api/groups').all(groupsPolicy.isAllowed) .get(groups.list) ...
(function () { 'use strict'; angular .module('inventory.module') .controller('InventoryController', InventoryController); InventoryController.$inject = ['$scope', '$rootScope', '$state', '$stateParams', '$filter', '$ionicScrollDelegate', 'Toast', 'storage', 'money']; /* @ngInject */ function Invent...