code
stringlengths
2
1.05M
import httpProxy from 'http-proxy'; export default function(options) { const PathRewrite = function(rewriteRules, path) { for(var regex in rewriteRules) { var value = rewriteRules[regex]; path = path.replace(regex, value) } return path; } const proxy = httpPr...
export function randomInt (min, max) { return Math.floor(min + Math.random() * (max - min + 1)) }
$(function() { var editor = editormd("editormd", { path: "/plugins/editor-md/lib/", height: 500, emoji: true, onfullscreen : function() { $("#editormd").css('margin-top', '46px').css('z-index', '3'); } }); $("button[type=submit]").click(function () { ...
/** * olojs.document * ============================================================================ * This module contains functions to parse, evaluate and render any string of * text formatted as olo-document. * * ```js * source = "Twice x is <% 2*x %>!"; * context = olojs.document.createContext({x:10})...
module.exports = function home(app, models){ app.get('/', function(req, res){ if(req.isAuthenticated()){ res.render('home/index'); }else{ res.redirect('/auth/login'); } }); };
define(["require", "exports", 'durandal/system', 'knockout'], function(require, exports, system, ko) { var Third = (function () { function Third() { var _this = this; this.title = 'Third Tab'; this.thirdVm = ko.observable(null); this.activate = function (id) ...
/** * Unset project variables in configs/configuration.json */ module.exports = function vDelCommand (program, helpers) { program .command('vdel <variable>') .description('Unset / delete one variable from configs/configuration.json') .action( function run (variable) { const we = helpers.getWe(); we....
var itemtypenames if (itemtypenames == undefined) itemtypenames = [ "Small Caliber Main Gun", "Medium Caliber Main Gun", "Large Caliber Main Gun", "Secondary Gun", "Anti-Aircraft Gun", "Anti-Aircraft Shell", "Armor Piercing Shell", "Torpedos & Submarine", "Carrier-Based Fighter", "Carrier-Based Torpedo Bomber...
const { Model } = require('../../../'); const { expect } = require('chai'); module.exports = (session) => { describe(`relations should be loaded lazily #1202`, () => { let knex = session.knex; let Person; let loadedRelations = []; before(() => { return knex.schema .dropTableIfExists('c...
/** * Created by Jos�Pablo on 10/28/2015. */ angular.module('MetronicApp').controller('HomeCtrl',['$scope',function($scope){ $scope.usuario = "Hola"; }]);
import TabInterface from './tab.interface'; /** * Tab class. * * @ngInject */ export default class Tab implements TabInterface { /** * Constructor of the class * * @param {TabInterface} item */ constructor(item: Object) { this.label = item.label; this.state = item.state; } }
"use strict"; // I don't think that this is used anywhere yet! class FieldFormat { constructor(engine, data={}) { this.engine = engine; this.data = data; ['id'].map(key => this[key] = data[key] ? data[key] : this.constructor[key]); } } FieldFormat.id = ''; module.exports = FieldFormat;
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _base = require('./base'); var _base2 = _interopRequireDefault(_base); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function FeatureUnavailableError(message, debug, code, kinveyRequ...
define([ 'jidejs/ui/layout/BorderPane', './issueList', './details', './TemplateView', 'jidejs/ui/control/MenuBar', 'jidejs/ui/control/MenuItem', 'jidejs/ui/control/Hyperlink', 'jidejs/base/Observable', 'jidejs/base/Window' ], function(BorderPane, issueList, details, TemplateView, MenuBar, MenuItem, Hyperlink, Observ...
function Base64() { // private property var _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; // public method for encoding this.encode = function (input) { var output = ''; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = _ut...
var assert = require('power-assert'); var isEmpty = require('../src/index').isEmpty; describe('isEmpty', function() { it('empty value', function() { assert(isEmpty('') === true); assert(isEmpty([]) === true); assert(isEmpty(null) === true); assert(isEmpty(void(0)) === true); assert(isEmpty({}) =...
"use strict"; var _this = this; var _1 = require("../../../"); describe("SortingAccessor", function () { beforeEach(function () { _this.options = { options: [ { label: "None" }, { label: "Highest Price", field: 'price', ...
const hooks = require('hooks'); hooks.beforeEach((transaction, done) => { transaction.request.body = Buffer.from([0xFF, 0xEF, 0xBF, 0xBE]).toString('base64'); transaction.request.bodyEncoding = 'base64'; done(); });
(function() { var app = angular.module('gemStore', ['store-products']); app.controller('StoreController', [ '$http', function($http){ //this.products = $http({ method: 'GET', url: '/products.json' }); //$http.get('/products.json', { apiKey: 'myApiKey' }); var store = this; store.products = []; $http.get('st...
angular.module('wikidataTimeline') .factory('$wikidata', ['$http', '$q', function($http, $q) { var WD = {}; WD.languages = ['en', 'fr']; WD.sitelinks = [ 'wikisource', 'commonswiki', 'wikibooks', 'wikiquote', 'wiki', 'wikinews' ]; /** * converts a wikidata datetime to a JS Date * @todo: expand to get ti...
define(['vm/ConstantPool/ConstantPoolFactory', 'vm/Attributes/AttributeFactory', 'vm/FieldInfoFactory', 'vm/MethodFactory', 'util/Util', 'vm/Class'], function(ConstantPoolFactory, AttributeFactory, FieldInfoFactory, MethodFactory, Util, Class) { "use strict"; var ClassFactory = {}; ClassFactory.parseCla...
'use strict'; var gulp = require('gulp'); var csslint = require('gulp-csslint'); var jshint = require('gulp-jshint'); var nodemon = require('gulp-nodemon'); var livereload = require('gulp-livereload'); var uglify = require('gulp-uglifyjs'); var concat = require('gulp-concat'); var minifyCSS = require('gulp-minify-css'...
;(function(){ angular.module("Jal-Stats", ['ngRoute'], function($routeProvider){ $routeProvider .when('/', { redirectTo: '/login' }) .when('/login', { templateUrl: 'partials/login.html', controller: function($http){ var login = { }; login.send = function(){ ...
/* =========================================================== * OCNav - Offcanvas plugin for Bootstrap * * author: @geedmo * uri: http://geedmo.com * * Copyright (c) 2014, Geedmo. All rights reserved. * Released under CodeCanyon Regular License: http://codecanyon.net/licenses * ========================...
'use strict' /* global describe, it */ const assert = require('assert') const supertest = require('supertest') describe('Registered User ReviewController', () => { let registeredUser, userID, customerID before((done) => { registeredUser = supertest.agent(global.app.packs.express.server) // Login as Regis...
const { stringifyJSONForWeb } = require('desktop/components/util/json.coffee') export const SuperSubArticlesQuery = (ids) => { return ` { articles(ids: ${stringifyJSONForWeb(ids)}, published: true) { thumbnail_title thumbnail_image title slug } } ` } export cons...
/** * Created by Paul-Guillaume Déjardin on 15/04/16. * Copyright © 2016 Xebia IT Architects. All rights reserved. */ var express = require('express'), router = express.Router(), postgresStore = require('../oauth/postgresStore'); module.exports = function (app) { app.use('/users', app.oauth.authorise(), r...
'use strict'; angular.module('webApp').constant('CONFIG', { povej : { buttons : { favorite : true, volume : false, keyboard : false, fullscreen : true } } }); // disable cordova plugins angular .module('webApp') .factory('$cordova...
jest.unmock('../src/index'); import index from '../src/index'; describe('<%= name %> tests', () => { it('succeeds', () => { expect(index()) .toBe(true); }); });
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; // offsetX 水平偏移量, 百分百或字符串 class ProgressBar extends PureComponent { constructor(props) { super(props); this.handleChangeProgress = this.handleChangeProgress.bind(this); } handleChangeProgress(e) { con...
const Device = require('../../../objects/device'); const spawn = require('../../../utils/spawn'); const sdkPaths = require('../utils/sdk-paths'); const deserializeDevices = function(list) { let devices = []; if (list === undefined) { return devices; } let items = list.split('\n'); it...
angular.module('pizzaBuilder') /** * main contorller of /new route */ .controller('NewController', ['$scope', '$location', 'Components', 'Data', function($scope, $location, Components, Data) { // some data to fill inputs in view $scope.title = 'Dodaj'; /** * Add new pizza to pizzaList * ...
(function() { var dependencies = [ "babel.editor", "babel.execution", "babel.cmd", "babel.script", "babel.errors", "babel.stack", "babel.dump" ]; var module = angular.module("babel.exercice", dependencies); module.service("$Generator", function() { /** * Génère un nombre entier aléatoire...
/*jshint laxcomma: true, smarttabs: true, node:true, mocha: true*/ 'use strict'; /** * Allows for filtering case sensitve filtering of records * @module tastypie-bookshelf/lib/resource/filters/exact * @author Eric Satterwhite * @since 1.0.0 * @requires cage/string * @example ?foobar__exact=igh */ module.exports ...
$.getJSON("https://twitter.madeat.eu/1.1/statuses/user_timeline.json?screen_name=fab13santiago&count=1", function(data) { var tweet = linkify(data[0].text); $('.tweet').html(tweet); }); function linkify(inputText) { var replacedText, replacePattern1, replacePattern2, replacePattern3; //URLs starting with http...
const SongFormatterMixin = { getSongName: function(song) { if (song.hasOwnProperty("name")) { return song.name; } else { var urlSplit = song.url.split("/"); return urlSplit[urlSplit.length - 1]; } } } export default SongFormatterMixin
'use strict'; var translator = require('../lib/translator'); describe('Translator', function() { var itemData; var translateHook; beforeEach(function() { itemData = { name: 'itemOne' }; translateHook = jasmine.createSpy('translateHook').andReturn(itemData); delete translator.item; }); des...
var FileRequest, Request, fs, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = p...
#!/usr/bin/env node // requires require('console.table') var fs = require('fs') var program = require('commander') var wc_db = require('wc_db') var qpm_media = require('../') var solidbot = require('solidbot'); /** * version as a command */ function bin(argv) { // setup config var config = re...
var CILJS = require("../CilJs.Runtime/Runtime"); var asm1 = {}; var asm = asm1; var asm0 = CILJS.findAssembly("mscorlib"); asm.FullName = "MethodInfoInvoke.cs.ciljs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null";/* System.String A.X(String)*/ asm.x6000002 = function X(arg0, arg1) { var t0; var loc0; ...
module.exports = env => { let config; if (!env || env.dev) { config = require('./config/webpack.dev'); } else if (env.dist) { config = require('./config/webpack.dist'); } else if (env.prod) { config = require('./config/webpack.prod'); } else if (env.test) { config = require('./config/webpack....
var module = angular.module('chatControllerModule', ['chatServiceModule', 'settingsServiceModule']); module.controller('ChatController', [ '$scope', 'settingsService', 'chatService', ChatController]); function ChatController($scope, settingsService, chatService) { var self = this; $scope.connected = true; $scope.r...
var group__CMSIS__RTOS__SemaphoreMgmt_structosSemaphoreAttr__t = [ [ "name", "group__CMSIS__RTOS__SemaphoreMgmt.html#ab74e6bf80237ddc4109968cedc58c151", null ], [ "attr_bits", "group__CMSIS__RTOS__SemaphoreMgmt.html#a6e93b49cb79c12f768d72580c7731f30", null ], [ "cb_mem", "group__CMSIS__RTOS__SemaphoreMg...
define('ember-bootstrap/components/bs-collapse', ['exports', 'ember'], function (exports, _ember) { 'use strict'; var computed = _ember['default'].computed; var observer = _ember['default'].observer; /** An Ember component that mimics the behaviour of Bootstrap's collapse.js plugin, see http://getbootstrap...
var item_8php = [ [ "fix_attached_file_permissions", "item_8php.html#a3daae7944f737bd30412a0d042207c0f", null ], [ "fix_attached_photo_permissions", "item_8php.html#a7b63a9d0cd02096e17dcf11f4afa7c10", null ], [ "handle_tag", "item_8php.html#abd0e603a6696051af16476eb968d52e7", null ], [ "item_content", "...
'use strict'; // Development specific configuration // ================================== module.exports = { // MongoDB connection options mongo: { uri: 'mongodb://localhost/huecommand-dev' }, seedDB: true };
function IndexedLinkedList() { this.list = {}; this.length = 0; this.head = null; this.tail = null; } /** * Remove from head */ IndexedLinkedList.prototype.dequeue = function() { return this._removeItem(this.head); }; /** * Remove item at given index * @param index */ IndexedLinkedList.prototype.remove = fu...
/** * @author: @AngularClass */ const webpack = require('webpack'); const helpers = require('./helpers'); /* * Webpack Plugins */ // problem with copy-webpack-plugin const AssetsPlugin = require('assets-webpack-plugin'); const NormalModuleReplacementPlugin = require('webpack/lib/NormalModuleReplacementPlugin'); c...
module.exports = move; var fse = require('fs-extra'); function move(src, dest, options, cb, self) { if (!cb) { return move(src, dest, {}, options, this); } if (!self) { self = this; } var absPathSrc = self.pathHelper.absolutePath(src); var relPathSrc = self.pathHelper.relativePath(absPathSrc); var absPat...
import babel from "rollup-plugin-babel"; module.exports = { input: "src/DiodePublic.js", output: { file: "lib/DiodePublic.js", format: "cjs" }, external: [ "react", "react-is", "lodash.mergewith", "deep-extend", "object-assign", "hoist-non-react-statics", "lodash.find" ], ...
var fs = require('fs'); var path = require('path'); var probe = require('node-ffprobe'); var db = require('./index').db; var Pila = require('./pila'); var ModelHelpers = require('../../lib/model_helpers'); var hostname = ModelHelpers.hostname; var Audio = { all: function(callback) { Pila.findByName(hostname, (...
define(function (require) { var plot_core = require("plot_core"); var sys = require("sys"); var common = require("common"); var dbg = require("dbg"); var res = require("res"); var pp = res.pp; var people = []; var exports = { running: {}, }; var sx = sys.sx; var sy =...
'use strict'; ;(function() { var config = require('./config'); var bunyan = require('bunyan'); var formatter = require('bunyan-format'); var format = formatter(config.loggingConfigs); var streams = [{level: config.consoleLogLevel, stream: format }]; if (config.logToFile) { streams.push({ level: 'error'...
/** * Copyright (c) 2012 Andreas Madsen * MIT License */ var vows = require('vows'), assert = require('assert'), common = require('../common.js'), prope = require(common.watcher('interface.js')); common.reset(); function startImmortal(callback) { prope.createInterface(common.fixture('longlive.js'),...
var World = null; (function () { "use strict"; // The code below uses https://code.google.com/p/selenium/wiki/WebDriverJs // https://github.com/assaf/zombie // http://phantomjs.org/ // https://github.com/LearnBoost/soda // https://github.com/admc/wd World = function World(ready) { ...
var housingData = require('../../housing.json'); exports.view = function(req, res){ //console.log(housingData); // get variables from request query var city = req.query.city.toLowerCase(); var occupants = parseInt(req.query.occupants); var maxArea = 45 + ((occupants-1)*15); var cost = (req.query.cost !=='')?par...
var express = require('express'); var mongoose = require('mongoose'); var queries = require('./db/queries.js'); var schema = require('./db/schema.js'); var app = express(); mongoose.connect('mongodb://54.159.218.143:27017/cis450'); var db = mongoose.connection; db.on('error', console.error.bind(console, 'connection e...
const EventEmitter = require('events'); // How to make sure EventEmitter constructor is called? (super keyword) module.exports = class Greetr extends EventEmitter { constructor() { super(); this.greeting = 'Hello' } greet(data){ console.log(`${this.greeting} : ${data}`); this.emit('greet', data)...
/* --- MooTools: the javascript framework web build: - http://mootools.net/core/6ee878a38312482d057ff0d6192abbd8 packager build: - packager build Core/Element.Delegation Core/Request.JSON Core/DOMReady ... */ /* --- name: Core description: The heart of MooTools. license: MIT-style license. copyright: Copyrigh...
const hyperHTML = require('hyperhtml'); hyperHTML.Component = function () { const newTarget = this.__proto__.constructor; return Reflect.construct(HTMLElement, arguments, newTarget); } Object.setPrototypeOf(hyperHTML.Component, HTMLElement); Object.setPrototypeOf(hyperHTML.Component.prototype, HTMLElement.prototyp...
import React from 'react'; const tabbedNavigationButton = props => ( <li className="tabbedNavigationButton"> <input checked={!!props.selected} id={props.id} name="tab" onChange={() => props.onSelect(props.id)} type="radio" /> <label htmlFo...
'use strict'; module.exports = { app: { title: 'SurveyProject', description: 'Survey site using mean stack', keywords: 'MongoDB, Express, AngularJS, Node.js' }, port: process.env.PORT || 3000, templateEngine: 'swig', sessionSecret: 'MEAN', sessionCollection: 'sessions', assets: { lib: { css: [ 'p...
import { createStore, compose, applyMiddleware } from 'redux'; import rootReducer from '../reducers'; // thunk is used for async api calls import thunk from 'redux-thunk'; export default function configureStore(initialState) { return createStore(rootReducer, initialState, compose( applyMiddleware(thunk) ));...
// FIXME(samgoldman) Remove top-level interface once Babel supports // `declare interface` syntax. // FIXME(samgoldman) Remove this once rxjs$Subject<T> can mixin rxjs$Observer<T> interface rxjs$IObserver<-T> { closed?: boolean, next(value: T): mixed, error(error: any): mixed, complete(): mixed } type rxjs$Par...
/// <reference path="typings/node/node.d.ts" /> /// <reference path="typings/genetic-algorithm/interfaces.d.ts" /> var Randomizer = (function () { function Randomizer(random) { if (typeof random === "undefined") { random = Math.random; } this.random = random; } Randomizer.prototype.randomInt...
Package.describe({ name: "nova:debug", summary: "Telescope debug package", version: "1.2.0", git: "https://github.com/TelescopeJS/Telescope.git" }); Package.onUse(function (api) { api.versionsFrom(['METEOR@1.0']); api.use([ 'fourseven:scss', // Nova packages 'nova:core@1.2.0', 'nova:po...
// VARS SCROLL LISTENER var canScroll = true; var transitionsTiming = 900; var pauseToLoadSection = 500; var lastSectionId = 15; // SCROLL LISTENER // $('#mbrtWrapper').on('mousewheel', function(event) { // // CONTROL TRIGGERING // // Change section only if the current section has been fully loaded ...
// ## Globals var argv = require('minimist')(process.argv.slice(2)); var autoprefixer = require('gulp-autoprefixer'); var browserSync = require('browser-sync').create(); var changed = require('gulp-changed'); var concat = require('gulp-concat'); var flatten = require('gulp-flatten'); var gulp ...
export default { logging: "Iniciando sesión...", logCall: "Registrar llamada", editLog: "Editar registro", select: "Seleccionar una grabación que coincida", OnHold: "En espera", Ringing: "Llamando", CallConnected: "Llamada conectada", unknownUser: "Usuario desconocido", unknownNumber: "Anónimo", una...
// namespace window.semantic = { handler: {} }; // Allow for console.log to not break IE if (typeof window.console == "undefined" || typeof window.console.log == "undefined") { window.console = { log : function() {}, info : function(){}, warn : function(){} }; } if(typeof window.console.group == 'un...
/** * Copyright reelyActive 2015 * We believe in an open Internet of Things */ var pdu = require('../../common/util/pdu.js'); /** * Parse generic data. * @param {string} payload The raw payload as a hexadecimal-string. * @param {number} cursor The start index within the payload. * @param {Object} advertiserDa...
var assert = require('assert'); var path = require('path'); var moduleName = path.basename(__filename).split('.')[0]; var expandFunction = require('../src/expand-function'); describe(moduleName, function() { var shouldReturn = 'should return: '; describe('empty dictionary', function() { it(shouldRetur...
import React, { Component } from 'react'; import './Footer.css'; class Footer extends Component { render() { return ( <footer> Whatcolorisit? By <a href="http://nrouviere.fr" target="_blank">Nicolas Rouvière</a> with <a href="https://facebook.github.io/react/" ta...
var basic = require('../functions/basic.js'); var consoleLogger = require('../functions/basic.js').consoleLogger; var userDB = require('../db/user_db.js'); function getTheUser(req) { return req.customData.theUser; } function getTheCurrentGrillStatus(req) { return req.customData.currentGrillStatus; } var recei...
module.exports = function() { NS.foobar = function() { throw new Error(); }; return { NS: NS }; };
var protocol_a_s_i_cache_delegate_p = [ [ "cachedResponseDataForURL:", "protocol_a_s_i_cache_delegate-p.html#aecbe916ea3557016f61ce515163daf1a", null ], [ "cachedResponseHeadersForURL:", "protocol_a_s_i_cache_delegate-p.html#a4ab21eaae8e114a36ce38f62ed283a30", null ], [ "canUseCachedDataForRequest:", "proto...
//= require 'shader-script' // ShaderScript isn't production ready yet and shouldn't be sent to // client code. So this file is here to ensure SS is loaded only // in Jax development, and not in development of projects that // depend on Jax. // // Otherwise, this file would live in `helpers/shaderscript_helper.js`.
'use babel' import quickSelect from 'atom-quick-select' import path from 'path' import glob from 'glob' module.exports = { config: { showBundledPackages: { type: 'boolean', default: false } }, activate (state) { this.disposable = atom.commands.add( 'atom-workspace', 'readme:show-...
'use strict'; describe('Service: EditZoneService', function () { // load the service's module beforeEach(module('yeomanApp')); // instantiate service var EditZoneService; beforeEach(inject(function(_EditZoneService_) { EditZoneService = _EditZoneService_; })); it('should do something', function ()...
import Ember from 'ember'; import StorageArray from 'ember-local-storage/local/array'; export default StorageArray.extend({ storageKey: 'anonymous-likes', initialContent: Ember.A() });
exports = module.exports = require('./src/zephyros');
'use strict' var utils = require('./_utils'), eslint = require('./eslint'), build = require('./build'), chokidar = require('chokidar') module.exports = function(options) { options = utils.extend({ // chokidar events we are going to watch // generally you should not touch them watchEvents: ...
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2011 Strobe Inc. and contributors. // portions copyright @2009 Apple Inc. // License: Licensed under MIT license (see license.js) // ================...
import React, {Component} from 'react'; import './SlidesBtn.styl'; import IconSlides from 'Resources/icon-slides.svg'; import IconNext from 'Resources/icon-next.svg'; class SlidesBtn extends Component { render() { return ( <div className="slidesBtn"> <span className="pixels"> <img src="r...
/* pointer.js */ module.exports = require('/single.js'); /* end */
var punt = require('punt'); var redis = require("redis"); var LOG_LENGTH = 2500; module.exports.createServer = function(options) { return new UDPServer(options); }; function UDPServer(options) { options.redis = options.redis || {}; options.redis.host = options.redis.host || '127.0.0.1'; options.redis...
(function () { 'use strict'; angular .module('users') .controller('EditProfileController', EditProfileController); EditProfileController.$inject = ['$scope', '$http', '$location', 'UsersService', 'Authentication', 'Notification']; function EditProfileController($scope, $http, $location, User...
/*! * froala_editor v1.2.7 (https://www.froala.com/wysiwyg-editor) * License https://www.froala.com/wysiwyg-editor/terms * Copyright 2014-2015 Froala Labs */ (function ($) { $.Editable.commands = $.extend($.Editable.commands, { insertOrderedList: { title: 'Numbered List', icon: 'fa fa-list-ol', ...
const fs = require('fs') const path = require('path') const config = require('./locals') const exec = require('child_process').exec const files = fs.readdirSync(config.samplePath) files.forEach((filename) => { const fullname = path.join(config.samplePath, filename) const outname = path.join('./assets/samples', `$...
(function(){ /** * not yet implemented. * * @class LocalizationUtility * @constructor * @namespace <%= nameSpace.toLowerCase() %>.localization */ var LocalizationUtility = function() { if (LocalizationUtility.instance===null) { LocalizationUtility.instance = this; ...
var request = require('superagent'); var config = require('../config'); var utils = require('./utils'); var extend = require('extend'); var count = 1; var query = { view : 'pointToSOIL(-121.9921875,39.02771884021161,8192)', tq : 'SELECT *', tqx : 'reqId:' }; module.exports = { getAll : getAll }; function g...
/** * Main application routes */ 'use strict'; var errors = require('./components/errors'); var path = require('path'); module.exports = function(app) { // Insert routes below app.use('/api/polls', require('./api/poll')); app.use('/api/things', require('./api/thing')); app.use('/api/users', require('./api...
import { FETCHED_EVALS, FETCHED_EVAL } from '../sagas/event' export function EvalInfoReducer (state = {}, action) { switch (action.type) { case FETCHED_EVAL: return action.payload default: } return state } export function EvalListReducer (state = [], action) { switch (action.type) { case FETCHED_EVA...
var SocketIO = require('socket.io') var di = require('di') var util = require('util') var Promise = require('bluebird') var root = global || window || this var cfg = require('./config') var logger = require('./logger') var constant = require('./constants') var watcher = require('./watcher') var plugin = require('./pl...
module.exports = function($http, $q, EventEmitter) { var events = EventEmitter('youtube'), apiUrl = 'http://127.0.0.1:3000/search'; // Exposed method designed to be used // for querying, returns a promise function search(query) { return $http.post(apiUrl, { query: query }); } return...
import Navbar from './navbar.vue' export default Navbar
'use strict'; module.exports = function(app) { var workerthreads = require('../../app/controllers/workerthreads.server.controller'); // Workerthreads Routes app.route('/workerthreads') .get(workerthreads.list) .post(workerthreads.create); };
module.exports = (function () { return { DEFAULT_VALUE_NAME: 'Value', CANVAS_WIDTH: 300, CANVAS_HEIGHT: 201, // game1 constants GAME1_BOARD_TOP_LEFT_POINT_X: 50, GAME1_BOARD_TOP_LEFT_POINT_Y: 100, GAME1_BOARD_WIDTH: 200, GAME1_BOARD_HEIGHT: ...
export const handleError = (routeCallback) => { return (req, res, next) => { routeCallback(req,res).catch(next); }; };
/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/mast...