code
stringlengths
2
1.05M
ScalaJS.modules.org_littlewings_scalajs_ScalaJsGettingStarted().main();
/* eslint-env es5,node */ require('babel-register'); let config; if (process.env.NODE_ENV === 'production') config = require('./webpack.production').default; else config = require('./webpack.development').default; module.exports = config;
/** * Copyright 2015 Google Inc. 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.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
/** * Author jmorrison * Date: 8/29/11 * Time: 12:20 PM */ function isArray(obj) { return (obj.constructor.toString().indexOf(”Array”) != -1); }
'use strict'; angular.module('mean').config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { $stateProvider .state('users', { url: '/admin/users', templateUrl: 'mean-admin/views/users.html' }).state('themes', { ...
var utils = require('./utils') var config = require('../config') var isProduction = process.env.NODE_ENV === 'production' module.exports = { loaders: utils.cssLoaders({ sourceMap: isProduction ? config.build.productionSourceMap : config.dev.cssSourceMap, extract: isProduction }), preLoaders: ...
import { LOAD_DATA_INITIATION, LOAD_DATA_SUCCESS, LOAD_DATA_FAILURE, CLEAR_DATA_ERROR, } from './constants'; const initialState = { isLoading: false, data: {}, error: {}, }; /** * @function featureComponent * @description A redux reducer function * Takes state and an action and returns n...
'use strict'; const gulp = require('gulp'); const autoprefixer = require('gulp-autoprefixer'); const browserSync = require('browser-sync').create(); const sass = require('gulp-sass'); const sassGlob = require('gulp-sass-glob'); const scssLint = require('gulp-scss-lint'); const webpack ...
// Deprecated /* istanbul ignore file */ import styled from 'styled-components' export const config = { borderWidth: '2px', } const AvatarStackUI = styled('div')` display: flex; position: relative; &.is-withLayerStack { padding-left: calc(${config.borderWidth} * 3); } ` export const AvatarStackLayerin...
// For authoring Nightwatch tests, see // http://nightwatchjs.org/guide#usage module.exports = { 'default e2e tests': function test(browser) { // automatically uses dev Server port from /config.index.js // default: http://localhost:8080 // see nightwatch.conf.js const devServer = browser.globals.devS...
import React, { useState, useCallback } from 'react'; // component import MaintenaceBanner from './component'; // utils import { getMaintenanceBannerAccepted, setMaintenanceBannerAccepted } from './helpers'; const MaintenaceBannerContainer = () => { const [maintenanceBannerAccepted, setMaintenanceBannerAcceptance]...
'use strict'; module.exports = function (stamp, flags) { if (stamp.p === 'win32' && flags.ci) { return { allow: false, note: 'headless windows CI seems to fail' }; } return { deployFilesFrom: [ 'opn' ] }; };
'use strict'; const mongoose = require('mongoose'); module.exports = mongoose.model('buys', mongoose.Schema({ name: String, symbol: String, quantity: String, price: String }) );
/** * Source Backup Main Application * @author Anthony G. Rivera Cosme * @copyright Anthony G. Rivera Cosme * @license MIT * @version 1.0 */ onload = function() { AppInit(function() { LoadMainWindow(function() { }); }); }; function AppInit(callback) { LoadSettings(funct...
/* @noflow */ import React from 'react'; import Redirect from '../'; import {shallow, mount} from 'enzyme'; describe('<Redirect>', () => { var context, navigate, serverResult; beforeEach(() => { serverResult = {}; navigate = jest.fn(); context = { router: { ...
'use strict'; var _Promise = require('babel-runtime/core-js/promise')['default']; Object.defineProperty(exports, '__esModule', { value: true }); var utils = {}; utils.formatSectionsIntoPage = function (mapData) { mapData.html = mapData.html.replace('</body>', '<script>' + mapData.js + '</script></body>'); ...
ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(acequire, exports, module) { "use strict"; var dom = acequire("../lib/dom"); var lang = acequire("../lib/lang"); var event = acequire("../lib/event"); var sear...
var mongoose = require('mongoose') , Truck = mongoose.model('Truck') , Feed = mongoose.model('Feed') exports.get = function (req, res) { Truck .find({}) .exec(function (err, trucks) { if (err) throw err if (trucks) res.json(trucks) }) } function populateTruc...
var nano = require('nano'); var Q = require('q'); var exp = { setup : setup, nano : nano } function setup(config){ var d = Q.defer(); nano = nano(config.couchdbUrl); function fin(){ design(config) .then(function (cfg) { var theDb = nano.db.use('liblib') var dbq = { view : fu...
//vendors let modules = []; if(process.env.npm_lifecycle_event === 'server') { require('bootstrap-sass/eyeglass-exports'); require('./styles/bootstrap.scss'); require('angular'); require('angular-vs-repeat/src/angular-vs-repeat.min.js'); modules.push(require('angular-animate')); modules.push('vs-repeat'); ...
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdBusiness(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M24 14h20v28H4V6h20v8zM12 38v-4H8v4h4zm0-8v-4H8v4h4zm0-8v-4H8v4h4zm0-8v-4H8v4h4zm8 24v-4h-4v4h4zm0-8v-4h-4v4h4zm0-8v-4h-4v4h4zm0-8v-4h-4v4h4zm20 24V...
var path = require('path'); var test = require('ava'); var postcss = require('postcss'); var colorblindPlugin = require('..'); var colorNames = require('css-color-names'); var colorblind = require('color-blind'); var onecolor = require('onecolor'); var getProcessor = require('./_getProcessor'); var testPostCSS = requir...
/* * opLoadBalancer.js: lbaas APIs * for Openstack networking * * (C) 2015 Hopebaytech * * P. Hsuan */ var urlJoin = require('url-join'); var _ = require('lodash'); var lbaasHealthMonitorPath = '/lb/health_monitors'; // Declaring variables for helper functions defined later var _convertcreateToWireFormat; ...
let deserialize = require('./src/deserialize'); let serialize = require('./src/serialize'); let prettyHrtime = require('pretty-hrtime'); let Instruction = require('./src/Instruction'); let start = process.hrtime(), data; let tree = [ new Instruction('test', { a: 1, b: 2, c: 3 }) ]; let sMethods = { 'test': ({ a, ...
const { exitChrome } = require('./chrome-launcher') async function exit () { await exitChrome() process.exit(0) } async function exitWithError () { await exitChrome() process.exit(1) } module.exports = { exit, exitWithError }
(bbn_resolve) => { ((bbn) => { let script = document.createElement('script'); script.innerHTML = `<div :class="componentClass"> <div class="bbn-hidden" v-if="$slots.default" ref="slot"> <slot></slot> </div> <div :class="getComponentName() + '-content'"> <div v-for="(li, idx) in filteredData" ...
var utils = {} var config = require('./configuration'); var models = require('./models'); var User = models.User; var Email = models.Email; var extend = require('util')._extend; var countries = require('country-data').countries; function get_permission_checker(permission) { var required = permission.split('/'); ...
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; var _excluded = ["items", "disabled", "className", "name", "error", "variant", "design", "label", "children", "size", "fontWeight", "paragraphStyle", "labelProps"], ...
// HINT TASK // ============================================================================= "use strict"; var taskName = 'hint'; var gulp = require('gulp'); var jshint = require('gulp-jshint'); var config = require('./config'); require('jshint-stylish'); gulp.task('hint', funct...
var votesControllers = angular.module('votesControllers', []); votesControllers.controller('VotesCtrl', ['$scope','$routeParams','$location', '$http','$rootScope','$cookies','GetVotes','GetLastVotes','GetVotesById', function($scope,$routeParams,$location, $http,$rootScope,$cookies,GetVotes,GetLastVotes,GetVotesById)...
var content_output2 = '<h2> Output In File JS test2 </h2>' + '<p>getAllParams: ' + JSON.stringify(PaserCurrentFileJs.getAllParams()) + '<p>getAllAttributes: ' + JSON.stringify(PaserCurrentFileJs.getAllAttributes()) + '<p>getValueParam param1: ' + JSON.stringify(PaserCurrentFileJs.getValueParam('param1'))...
(function (global, factory) { if (typeof define === "function" && define.amd) { define(['exports', '@uirouter/core', './ui-view-spinner', './content-cache'], factory); } else if (typeof exports !== "undefined") { factory(exports, require('@uirouter/core'), require('./ui-view-spinner'), require('...
Package.describe({ name: 'iron:url', summary: 'Url utilities and support for compiling a url into a regular expression.', version: '1.1.0', git: 'https://github.com/iron-meteor/iron-url' }); Package.on_use(function (api) { api.versionsFrom('METEOR@0.9.2'); api.use('underscore'); api.use('iron:core@1.0....
module.exports = { moduleFileExtensions: ['js', 'json', 'vue'], transform: { '^.+\\.js$': 'babel-jest', '^.+\\.vue$': '@vue/vue3-jest', }, testMatch: ['**/tests/**/*.test.js'], };
// COPYRIGHT © 2017 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute...
var SOURCE_FOLDER = __dirname + '/src/'; var DIST_FOLDER = __dirname + '/dist/'; var BUNDLE_NAME = 'visible.min.js'; var webpack = require('webpack'); module.exports = { entry: SOURCE_FOLDER + '/visible.js', target: 'web', output: { library: 'visible', path: DIST_FOLDER, filename: BUNDLE_NAME, publicPath:...
var CML__IO_8h = [ [ "IOError", "classIOError.html", "classIOError" ], [ "IOModuleSettings", "structIOModuleSettings.html", "structIOModuleSettings" ], [ "IOModule", "classIOModule.html", "classIOModule" ], [ "DigOutPDO", "classIOModule_1_1DigOutPDO.html", "classIOModule_1_1DigOutPDO" ], [ "AlgOutPD...
var express = require('express'); var router = express.Router(); var mkdirp = require('mkdirp'); var fs = require("fs"); var file = __dirname + "/../database/panoinfo.db"; var exists = fs.existsSync(file); var sqlite3 = require("sqlite3").verbose(); var db = new sqlite3.Database(file); /* GET users listing. */ router...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.16/esri/copyright.txt for details. //>>built define("require exports ../../../../core/tsSupport/extendsHelper ../../../../core/tsSupport/decorateHelper ../../../../core/tsSupport/assignHelper ../../../../core...
import arrays from './arrays'; import core from './core'; export default { core, arrays, };
import React, { Component } from 'react' import { Card, CardTitle, Divider } from "material-ui"; import Build from 'material-ui/svg-icons/action/build' import Header from './basic/Header' import Paragraph from './basic/Paragraph' class NotFoundCard extends Component { constructor(props) { super(props); ...
var palloc_8h = [ [ "palloc_t", "dc/d36/structpalloc__t.html", "dc/d36/structpalloc__t" ], [ "MAX_PALLOC", "dc/df7/palloc_8h.html#ae98cf2dde32dd7752510faa08edec1ef", null ], [ "PALLOC_MAX_BLOCKS", "dc/df7/palloc_8h.html#a6acb1947dc49f45d9429e9cc660ce2b1", null ], [ "PALLOC_SIZE", "dc/df7/palloc_8h.html#...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { StyleSheet, requireNativeComponent, NativeModules, View, ViewPropTypes, Image, Platform, UIManager, findNodeHandle, Dimensions } from 'react-native'; import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource'; i...
module.exports = function(grunt) { grunt.registerTask('default', ['compileAssets', 'watch']); };
//////////////////////////////////////////////////////////////////////////////// //API routes /* Instantiate Express Module*/ var express = require('express'); /* Instantiate Express Router*/ var router = express.Router(); //Instantiate Image model var Image = require('../models/image_model.js'); //Instantiate User mo...
function recordObj(){ this.id = ''; this.time = ''; this.value = new Object(); } module.exports = recordObj;
// PMASETools Cards -- data model // Loaded on both the client and the server /////////////////////////////////////////////////////////////////////////////// // Cards /* Each card is represented by a document in the Cards collection: x, y: Number (screen coordinates in the interval [0, 1]) text, description...
var express = require('express'); var router = express.Router(); db = new Firebase('https://codherjs.firebaseio.com/'); dbTweets = db.child('tweets'); /* GET home page. */ router.get('/', function(req, res) { res.render('index', { tweets: [] }); // dbTweets.on('child_added', function(snapshot) { // res.rende...
'use strict'; // Use Applicaion configuration module to register a new module ApplicationConfiguration.registerModule('trainingsessions');
describe('tooltip', function() { var elm, elmBody, scope, elmScope, tooltipScope; // load the tooltip code beforeEach(module('ui.bootstrap.tooltip')); // load the template beforeEach(module('template/tooltip/tooltip-popup.html')); beforeEach(inject(function($rootScope, $compile) {...
#! /usr/bin/env node /* * This is the Command Line Implementation of the `emptydir` module * * Command Line Argument Processing * emptydir dirA dirB - empties the directories * emptydir --version - show version * emptydir --help - show this help message * emptydir -v - be verbose in empty...
import { schema } from 'normalizr'; const user = new schema.Entity('users'); const messages = new schema.Entity('messages', { user, }); export const message = new schema.Entity('message', { user, }); export const messagesList = [messages]; export default messagesList;
var zrUtil = require('zrender/lib/core/util'); // FIXME 公用? /** * @param {Array.<module:echarts/data/List>} datas * @param {string} statisticType 'average' 'sum' * @inner */ function dataStatistics(datas, statisticType) { var dataNameMap = {}; var dims = ['value'];...
// @flow import React, { PureComponent as Component } from "react"; import Slider from "rc-slider/lib/Slider"; import { A, Icon } from "../common"; type Props = { nodeId: number, currentLine: Array<number>, onChangeCurrentNode: (number) => any, }; export default class BoardNav extends Component<Props> { compo...
/*global VisSense,it,expect*/ /* jshint undef: false */ describe('VisSense Globals', function () { 'use strict'; it('should have a `noConflict` method', function () { expect(VisSense.noConflict).toBeDefined(); var _oldValue = VisSense; var newCustomNameForVisSense = VisSense.noConflict(); expect...
(function(win, doc, glue) { 'use strict'; function setStyles(collection, name, value) { collection.each(function(element) { element.style[name] = value; }); } function getStyle(element, property) { var propertyValue, re = /(\-([a-z]){1})/g; // Support both camelCase and dashed property ...
'use strict'; var myAppControllers = angular.module('myAppControllers',[]); myAppControllers.controller('ContentQuery', ['$scope', 'Content', '$routeParams', function($scope, Content, $routeParams){ $scope.contentItems = Content.query(); $scope.contentPath = $routeParams.contentId; //$scope.picked = $scope.con...
(function() { 'use strict'; angular.module('ShoppingListCheckOff', []) .controller('ToBuyController', ToBuyController) .controller('AlreadyBoughtController', AlreadyBoughtController) .service('ShoppingListCheckOffService', ShoppingListCheckOffService); ToBuyController.$inject = ['ShoppingListCheckOffS...
import Parser from 'ember-graphql-adapter/parser'; import Generator from 'ember-graphql-adapter/generator'; import ArgumentSet from 'ember-graphql-adapter/types/argument-set'; import { Field, Operation } from 'ember-graphql-adapter/types'; export default { compile(model, store, options) { options = options || {}...
import * as React from 'react'; import TopLayoutCompany from 'docs/src/modules/components/TopLayoutCompany'; import { demos, docs, demoComponents, } from 'docs/src/pages/careers/react-engineer.md?@mui/markdown'; export default function Page() { return <TopLayoutCompany demos={demos} docs={docs} demoComponents=...
// The client ID is obtained from the {{ Google Cloud Console }} // at {{ https://cloud.google.com/console }}. // If you run this code from a server other than http://localhost, // you need to register your own client ID. var OAUTH2_CLIENT_ID = '111436808615-d7mam74ms4a49846vpq7iqmn8ihu6mdu.apps.googleusercontent.com';...
module( "max test" ); test('숫자 순차 배열의 최대값',function(){ var fn = Pascal.max([1,2,,3,4,5,10]); deepEqual(fn, 10, "Pascal.fact([1,2,,3,4,5,10]) === 10"); }); test('순서 없는 숫자 배열의 최대값',function(){ var fn = Pascal.max([1,-2,-3,4,5,-10]); deepEqual(fn, 5, "Pascal.fact(1,-2,-3,4,5,-10]) === 5"); }); test('문자열이 포함된 배열의 최대...
'use strict'; // load gulp and gulp plugins var gulp = require("gulp"); var $ = require('gulp-load-plugins')(); // load node modules var del = require('del'); var fs = require('fs'); var runSequence = require('run-sequence'); var browserSync = require('browser-sync'); // // Gulp config // // Override defaults w...
/*global io,data*/ (function(){ // give up and resort to `target=_blank` // if we're not modern enough if (!document.body.getBoundingClientRect || !document.body.querySelectorAll || !window.postMessage) { return; } // the id for the script we capture var id; // listen on setup event from the...
import React from 'react'; import PropTypes from 'prop-types'; import { View } from 'react-native'; import { Text } from 'native-base'; import Colors from '../../../native-base-theme/variables/commonColor'; const Messages = ({ message, type }) => ( <View style={{ backgroundColor: type === 'error' ...
function updateImprovementsDisplay(i) { updateDisplay( 'desc_improvements', `improvements: ${i}` ); } function updateGenerationsDisplay(g) { updateDisplay( 'desc_generations', `generations: ${g}` ); } function updateBestSimilarityDisplay(s) { updateDisplay( 'best_desc_similarity', `$...
import { createAction } from "redux-actions"; export default createAction("MARK_BLOCK");
/* This is the example config file used to demonstrate turning leds of different types and protocols on and off. */ // converts a number to a hex function toHex(c) { var hex = c.toString(16); hex = hex.length == 1 ? "0" + hex : hex; return "0x" + hex; } // formats an input to be received by a tri-colo...
const merge = require('webpack-merge'); const common = require('./webpack.common.js'); const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = merge(common, { module: { rules: [{ test: /\.css$/, use: ExtractTextPlugin.extract({ us...
const Request = require('request'); const env2 = require('env2'); const HapiCookie = require('hapi-auth-cookie'); env2('./config.env'); module.exports = { path: '/welcome', method: 'GET', handler: (req, rep) => { const accessUrl = `https://github.com/login/oauth/access_token`; Request.post({ heade...
describe('Events:', function() { var it_prepends_to_the_jobs_list_view = function() { it('prepends to the jobs list view', function() { expect_text('#jobs li:first-child', this.data.repository.name + ' #' + this.data.number) }); }; var it_removes_the_job_from_the_jobs_list_view = function() { i...
const {npmPublishPackage, npmPublishAll} = require(`../../utils/publish`); module.exports = { command: `package <packageName>`, desc: `Publish a package to NPM`, builder: {}, handler: ({packageName}) => { if (packageName) { switch (packageName.toLowerCase()) { case `all`: return npmPubl...
/** * A Node.js module object. Every Node.js module receives a reference to * itself through a local variable named "module", and its global context. * * @external module * @see https://nodejs.org/api/modules.html#modules_the_module_object */ /** * The Node.js built-in "path" module. * * @external path * @se...
// flow-typed signature: 03af697d18fe8a7b11299425ad8b778f // flow-typed version: <<STUB>>/webpack-manifest-plugin_v^1.1.0/flow_v0.41.0 /** * This is an autogenerated libdef stub for: * * 'webpack-manifest-plugin' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to...
/* * The MainMenu state displays the game menu and enters the Game state after the user clicks the screen. */ Game.MainMenu = function(game) { }; Game.MainMenu.prototype = { create: function() { this.add.sprite(0, 0, 'titlepage'); this.loadingText = this.add.text(510, 520, 'Click to start playin...
const Path = require('path'); const webpack = require('webpack'); // Import the core config const webpackConfig = require('@silverstripe/webpack-config'); const { resolveJS, externalJS, moduleJS, pluginJS, moduleCSS, pluginCSS, } = webpackConfig; const ENV = process.env.NODE_ENV; const PATHS = { MODULES:...
export const getMockState = { withNoNotes: ()=>({ byId: {}, ids: [], openNoteId: null }), withOneNote: ()=>({ byId: { 'id-123': { id: 'id-123', content: 'Hello World', timestamp: 1 } }, ids: ['id-123'], openNoteId: 'id-123' }), withTwoNotes: ()=>...
'use strict'; const path = require('path'); const { logError } = require('./util/logger'); const config = { user: process.env.MC_USER, pass: process.env.MC_PASS, serverHost: process.env.MC_SERVER_HOST || 'simpvp.net', serverPort: process.env.MC_SERVER_PORT || 25565, logFilePath: process.env.LOG_FILE_PATH |...
'use strict'; angular.module( 'webtypesetting.questions', [ 'sf.services', 'palaso.ui.listview', 'palaso.ui.typeahead', 'ui.bootstrap' ] ) .controller('QuestionsCtrl', ['$scope', 'questionsService', '$routeParams', 'sessionService', 'linkService', 'breadcrumbService', functi...
"use strict"; let merge = (nums, index, length, increasing) => { if (length > 1) { let half = Math.floor(length / 2); for (let i = index; i < index + half; i++) { if ((nums[i] > nums[i + half] && increasing) || (nums[i] < nums[i + half] && !increasing)) { [nums[i], nums[i + half]...
// *********************************** // Firebase & jQuery HTML5 chat // *********************************** var messagesRef = new Firebase('https://cesarstechinsights.firebaseio.com'); // When the user presses enter on the message input, write the message to firebase. $('#messageInput').keypress(function (e) { if (...
module.exports = { name: "datastore", ns: "nedb", description: "Nedb Datastore", phrases: { active: "Creating datastore" }, dependencies: { npm: { nedb: require('nedb') } }, ports: { input: { options: { title: "Options", type: "object", required: false...
import React from "react"; import { Link } from "react-imvc/component"; import Layout from "../component/Layout"; export default function View({ state }) { return ( <Layout> {state.contents.map(({ type, list }) => { return ( <div key={type}> <h2> {type} ...
var sha1sum = require('sha1sum') module.exports = function (emitter, state) { //vvv will all be refactored out. //using this right now, to get a MVP going. //later, replace with a merkle tree. //track changes in doc... emitter.on('open', function (doc) { function onUpdate () { console.log('update...
const subManager = new SubsManager(); BlazeComponent.extendComponent({ mixins() { return [Mixins.InfiniteScrolling, Mixins.PerfectScrollbar]; }, calculateNextPeak() { const cardElement = this.find('.js-card-details'); if (cardElement) { const altitude = cardElement.scrollHeight; this.cal...
var expect = require("chai").expect, proxyquire = require("proxyquire"), sinon = require("sinon"); var models = {}; var app = sinon.stub(); var auth = { authenticated: sinon.stub() }; var get = app.get = sinon.stub(); var post = app.post = sinon.stub(); var Country = models.Country = sinon.stub(); var Vote = models....
export default class Topic { constructor({text, likes = 0}) { this.text = text; this.likes = likes; } addLike() { this.likes++; } removeLike() { this.likes--; } }
import_module('Athena.Math'); v1 = new Athena.Math.Vector3(10, 20, 30); v = v1.negate(); CHECK_CLOSE(-10, v.x); CHECK_CLOSE(-20, v.y); CHECK_CLOSE(-30, v.z);
'use strict'; /** * Gulp Task - browserify */ var gulp = require('gulp'), gulpif = require('gulp-if'), config = require('../config.json'), sourcemaps = require('gulp-sourcemaps'), source = require('vinyl-source-stream'), buffer = require('vinyl-buffer'), browserify = require('browserify'), ...
import assert from 'assert'; import Extractor from '../src/extractor'; describe('Sentence word extraction', () => { it('.match', function() { let e = new Extractor([ 'what', 'is', 'the', 'weather', 'in', 'vancouver' ]); let tag = { label: 'location', start: 5, end: 5 }; let match =...
const filters = require('./filters'); const formats = require('./formats'); const tags = require('./tags'); const config = { bootstrapNodes: [ { address: 'router.bittorrent.com', port: 6881 }, { address: 'dht.transmissionbt.com', port: 6881 }, ], crawler: { address: '0.0.0.0', port: 6881, }, db: { /* ...
import React, { Component, PropTypes } from 'react'; import { DateBlock, RsvpBadge, Loading, SocialBtns } from '../'; import { eventsAPI } from '../../api'; import { dateTimeUtils, urlUtils } from '../../utils'; import { devMode } from '../../config'; import styles from './EventDetails.sass'; const renderAddress = (l...
{ var progressSpy = jasmine.createSpy("progress"); var instance = axios.create({ onUploadProgress: progressSpy }); instance.get("/foo"); getAjaxRequest().then(function(request) { done(); }); }
/*! * express-outdatedhtml * * Make sites outdated by replace the new HTML5 element names, * such as 'canvas', 'section', etc. with proven ones like 'div'. * This is happening on the fly by parsing * the view render results string of the Express framework. * Of course only if an outdated browser is detec...
var Backbone = require('backbone'); exports = module.exports = Backbone.Model.extend({ idAttribute: '_id', defaults: { roles: { admin: false, agent: false, user: true, app: false, }, business: { stage: 'test', types: { verify: false, base: false, whole: false }, times: { ...
var express = require('express'); var router = express.Router(); var spider = require("./spider"); router.get("/info",function(req,res,next){ spider(`/product/iteminfo?device=iphone&channel=h5&swidth=375&sheight=667&zoneId=1479&v=2.3.0&terminal=wap&page=https%3A%2F%2Fm.haoshiqi.net%2F%23detail%3Fsid%3D14369%26channel...
module.exports = function(mode) { return { test: /\.js$/, loader: "eslint-loader", exclude: /node_modules/ }; };
// Math.random() devuelve número aleatorio entre 0 y 1. var numero = Math.random(); if (numero <= 0.5){ console.log('\n' + numero + ' MENOR que 0,5 \n'); } else{ console.log('\n' + numero + ' MAYOR que 0.5 \n');´ }
/** * @venus-library jasmine * @venus-include ../vendor/Reflection.js/reflection.min.js * @venus-code ../src/functions.js */ describe('functions', function () { it('should create two sub-objects of window', function () { namespace('Foo.Bar'); expect(window.Foo).not.toBe(undefined); e...
// https://sourceforge.net/rest/p/nagios