code
stringlengths
2
1.05M
db.users.drop(); db.users.insert({ name: 'dustin', password: 'pwd1', admin: true }); db.users.insert({ name: 'anna', password: 'pwd1', admin: true });
define(['Global'], function(G){ return Backbone.Model.extend({ defaults: { name: 'A villager', isMale: false, isNative: false } }); });
module.exports = function zeros(expression) { function multiplycation(first,second){ let a=[],b=[],PER=0,PERU=0,PERE=0,k,i,RESULT,RES=[],RESU=[],RESE=[]; first+=''; second+=''; a=first.match(/\d/g).reverse(); b=second.match(/\d/g).reverse(); for(k=0;k<b.length;k++){ PER=0; for(i=0;i<a.length;i++){ if(i==0...
define("container", [], function() { function InheritingDict(parent) { this.parent = parent; this.dict = {}; } InheritingDict.prototype = { get: function(key) { var dict = this.dict; if (dict.hasOwnProperty(key)) { return dict[key]; } if (t...
import React from "react"; import PeopleModal from "./people-modal"; import RetireForm from "./retire-form"; import Cookies from "js-cookie"; const fieldOptions = { "Name": "name", "Title": "title", "District": "district", "Party": "party", "Image": "image", "Email": "email", "Capitol Phone": "capitol_vo...
/* global describe, it */ import mocha from 'mocha'; import should from 'should/as-function'; import Message from '../src'; describe('Message Interface', () => { const pluginsPath = `${__dirname}/plugins`; it('message basics', (done) => { Message.createMessage('This `is` a test, yes a test!', {}, (err, mo) ...
import { html } from 'lit-element' export const Spinner = html` <style> .spinner { display: flex; flex: 1 1 100%; justify-content: center; height: 100%; align-items: center; } </style> <div class="spinner"> <atom-spinner color="#000000" duration="1" size="60"></atom-spin...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *------------------------------------------------------------...
Hull.component('leaderboard', { templates: ['leaderboard'], requiredOptions: ['id', 'board'], datasources: { leaders: ':id/leaderboards/:board' } });
define(function (require) { var GF256Value = require('./GF256Value'); // creates a polynomial in GF256[x] // value, term are both optional parameters // if term is not set, value is a list of coefficients as in [1, x, x^2, ...] // if term is set, then it sets the coefficient of x^term to the value // va...
import { connect } from 'react-redux'; import { getResetPaletteState, getImageSize } from '../../selectors'; import { toggleResetPalette, uploadStore } from '../../actions/application'; import { resetUserColors } from '../../actions/palette'; import { resetFramesState } from '../../actions/frames'; import NewProject...
var application_root = __dirname, port = process.env.PORT || 3000, express = require('express'), path = require('path'), mysql = require('mysql'), config = require('./config.js'), expressJwt = require('express-jwt'), morgan = require('morgan'), bodyParser = require('body-parser'), methodOverride = require('met...
var soap=require('soap'); var responseFormat =require('../responseFormat'); var url="http://www.96600.gov.cn/portal/webapi.asmx?WSDL"; exports.wechatShow=function(wcode,next) { soap.createClient(url,function(err,client){ if (typeof client !="undefined") { client.GetRouteStatusWithWcode(wcode,function(err,...
/*********************************************** * * MIT License * * Copyright (c) 2016 珠峰课堂,Ramroll * 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 with...
/** * Device.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models */ module.exports = { attributes: { deviceId : { type: 'string', unique: true }, owner : { ...
import { expect } from 'chai'; import * as ReduxGrout from '../../src'; describe('redux-grout', () => { it('defines createMiddleware', () => { expect(ReduxGrout).to.have.property('createMiddleware'); }); it('defines Actions', () => { expect(ReduxGrout).to.have.property('Actions'); }); it('defines Redu...
const prettierConfig = { semi: false, printWidth: 100, singleQuote: true, trailingComma: 'all', } module.exports = prettierConfig
/*jshint node:true*/ 'use strict'; var path = require('path'); module.exports = { normalizeEntityName: function() { // this prevents an error when the entityName is // not specified (since that doesn't actually matter // to us }, fileMapTokens: function() { return { __root__: function(op...
var sound = (function() { var advancedSoundAdjustmentsEnabled = false; var alwaysShowAdvancedAdjustments = false; var systemVolume = null; var adjustingSystemVolume = false; $(document).on("ui", function(event, data) { if (data.header == "menusReady") { // Check which sound adjustments extensions have been placed ...
#!/usr/bin/env node const Dog = require('./02-dog'); let taidi = new Dog('taidi', 4), zangao = new Dog('zangao', 8); taidi.on('bark', onBark); zangao.on('bark', onBark); function onBark() { console.log('%s barked! energy: %s', this.name(), this.energy()); }
xmlplus("xp", function (xp, $_, t) { $_().imports({ Example: { xml: "<button id='example'>click</button>", fun: function (sys, items, opts) { sys.example.on("click", function (e) { sys.example.off("click"); console.log("hello, w...
import webpack from 'webpack'; // import cssnano from 'cssnano'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import ExtractTextPlugin from 'extract-text-webpack-plugin'; import config from '../config'; import _debug from 'debug'; const debug = _debug('app:webpack:config'); const paths = config.utils_paths; co...
// callbackPromise.js // // This is a simple test script that does the following: // open a website // validate title // set/verify first/last name using Promises // set/verify first/last name using Callbacks // // required libraries var webdriverio = require('webdriverio'), should = require('should'); // a tes...
import { connect } from 'react-redux' import TransferButton from './TransferButton' import { transferStar } from './TransferButtonActions' const mapStateToProps = (state, ownProps) => { return {} } const mapDispatchToProps = (dispatch) => { return { onTransferStar: (event, to, starIndex) => { event.prev...
export const calculator = {"viewBox":"0 0 16 16","children":[{"name":"path","attribs":{"fill":"#000000","d":"M6 1h-5c-0.55 0-1 0.45-1 1v5c0 0.55 0.45 1 1 1h5c0.55 0 1-0.45 1-1v-5c0-0.55-0.45-1-1-1zM6 5h-5v-1h5v1zM14 1h-5c-0.55 0-1 0.45-1 1v13c0 0.55 0.45 1 1 1h5c0.55 0 1-0.45 1-1v-13c0-0.55-0.45-1-1-1zM14 10h-5v-1h5v1z...
export default function stripUrlAuth(string) { if (typeof string !== 'string') { throw new TypeError('Expected a string'); } return string.replace(/^((?:\w+:)?\/\/)[^@/]+@/, '$1'); }
function opcoObject() { this.account_type = getDefaultAccountType(); this.apn = getApn(); if (this.account_type === "Contract" && this.apn === "vfinternet.au") { this.country = "Australia"; this.currency = ""; this.data_notification = ""; this.dns1 = ""; this.dns2 = ""; this.help_url = "http:/...
; var _= _ || {}; _.INIT= _.INIT || {}; _.STATIC= _.STATIC || {}; _.STATIC.PAGE= _.STATIC.PAGE || {}; _.STATIC.PAGE.SCRIPTS= [ 'change.static', 'change.vars', 'change.factory', 'change.handler', 'change.init' ]; $(function(){ var success= function(){ _.INIT.QUERY(); _.INIT.BIND(); _.INIT.EYECA...
var gulp = require('gulp'), concat = require('gulp-concat'), uglify = require('gulp-uglify'), rename = require('gulp-rename'), sass = require('gulp-ruby-sass'), autoprefixer = require('gulp-autoprefixer'), browserSync = require('browser-sync').create(); var DEST = 'build/'; gulp.task('scripts'...
define( [ 'canjs', 'underscore', 'app/days/day', 'app/days/daysModel', 'app/fragments/fragmentsModel', 'app/products/productsModel', 'core/appState', 'css!app/days/css/days' ], function (can, _, Day, DaysModel, FragmentsModel, ProductsModel, appState) { var ViewModel = can.Map.extend({ define...
const _ = require('lodash'); const vrtUtils = require('./vrt-utils'); suite('Visual Regression Tests - Updating In Place', function () { this.retries(2); suiteSetup(function () { vrtUtils.suiteSetup.call(this); this.browser = vrtUtils.createBrowser('chrome'); return this.browser.get(vr...
(function() { /** * Eplant.Views.ChromosomeView.GeneticElementList class * Coded by Hans Yu * UI designed by Jame Waese * * @constructor * @param {Eplant.Views.ChromosomeView.Chromosome} chromosome The ChromosomeView Chromosome object that this GeneticElementList is created for. * @param {Number} vPosition The ...
YUI.add('pnm-helpers', function (Y) { var regexPathParam = /([:*])([\w\-]+)?/g; Y.namespace('PNM').Helpers = { pathTo: function (routeName, context) { context || (context = this); var route = PNM.ROUTES.routes[routeName], path, keys; if (!route) { return ''; } path =...
define(function (require) { require('microevent'); var Heartbeat = require('heartbeat'); var Canvas = function (config) { this.beatRate = config.canvas.heartbeat.rate; } Canvas.prototype = { constructor : Canvas, init : function () { this.canvas = document...
/* * FILE * models/sidebar-pulses.js * * PURPOSE * * * LICENSE * Copyright (C) 2014 Rob Colbert <rob.isConnected@gmail.com> * * 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 ...
import {convertObjectWithTemplates} from '../utils' function uploadFileFactory (urlValue, filesValue, optionsValue) { function uploadFile ({http, resolve}) { const url = resolve.value(urlValue) const files = resolve.value(filesValue) const options = convertObjectWithTemplates(optionsValue) return ht...
var sanitize = require('validator').sanitize; /** * ポストの一行目と残りを返す */ exports.splitPost = function (post) { var sanitizedPost = sanitize(post).trim() , ary = sanitizedPost.split(/\n/) , title = ary.shift() , body = sanitize(ary.join('\n')).trim(); return [title, body]; };
$(document).ready(function(){ $('.notification').delay(10000).fadeOut(); vote(); unvote(); function vote(){ $(".vote").unbind('click').click(function(){ var elem=$(this); //var p=$(this).parent().parent(); //nov=p.children('span.no_of_votes'); var nov = $(".no_of_votes"+$(this).attr('id')); $....
import DataHandler from "./datahandler"; import BaseRepo from "./baserepo"; import Syncable from "./syncable"; import RootObject from "./rootobject"; import TreeNode from "./treenode"; export {DataHandler, Syncable, RootObject, BaseRepo, TreeNode};
version https://git-lfs.github.com/spec/v1 oid sha256:c34d92b61f742187f1d23089da95a54ccfbd92822f93f0cc3de4d8a186f2aafe size 4356
/* Add theme related links to theme customizer */ (function($) { if ('undefined' !== typeof mh_magazine_lite_links) { // Add Upgrade Notice upgrade = $('<a class="mh-upgrade-link"></a>') .attr('href', mh_magazine_lite_links.upgradeURL) .attr('target', '_blank') .text(mh_magazine_lite_links.upgradeLabel)...
'use strict'; const fs = require('fs'); const path = require('path'); const koa = require('koa'); const router = require('koa-router'); const serve = require('koa-static'); const mount = require('koa-mount'); module.exports = init; /** * initializes koa-swagger-editor * @param {Object} options The options object ...
define([], function () { 'use strict'; class MegaMenu { constructor(element) { this.menu = element; this.focusable = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), object, embed, *[tabindex], *[contenteditable]'; this.foc...
import vm from "vm"; import readAsset from "./readAsset"; function getCodeFromBundle(stats, compiler, asset) { let code = null; if ( stats && stats.compilation && stats.compilation.assets && stats.compilation.assets[asset || "main.bundle.js"] ) { code = readAsset(asset || "main.bundle.js", ...
FlowRouter.goToRoomById = (roomId) => { const subscription = ChatSubscription.findOne({rid: roomId}); if (subscription) { FlowRouter.go(Sequoia.roomTypes.getRouteLink(subscription.t, subscription), null, FlowRouter.current().queryParams); } };
/** @module ember @submodule ember-runtime */ // .......................................................... // HELPERS // import { guidFor } from 'ember-utils'; import { get, set, Mixin, aliasMethod, computed, propertyWillChange, propertyDidChange, addListener, removeListener, sendEvent, hasList...
// Módulo principal para compartilhar eventos // do sistema, assim não sujamos o process. var EventEmitter2 = require('eventemitter2').EventEmitter2; var e = new EventEmitter2({ wildcard: true, newListener: true, maxListeners: Infinity }); module.exports = e;
module.exports = Ti.Platform.name === 'android';
// source code var calculator = { sum : function(a, b) {'use strict'; return a + b; }, multiply : function(a, b) {'use strict'; return a * b; }, subtract : function(a, b) {'use strict'; return a - b; } };
import $ from 'jquery'; import img from '../../img/webpack.png'; /*global System:true*/ /*eslint no-undef: "error"*/ $('body').html('Hello, Page Three'); $('body').append('<p>'); $('body').append('<img src="'+ img +'">'); $('body').append('<p>'); $('<button>Test</button>').click(function () { System.import('./mod...
/* * Copyright (c) André Bargull * Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms. * * <https://github.com/anba/es6draft> */ function assertEq(actual, expected) { if (actual !== expected) { throw new Error(`Expected '${expected}', but got '${actual}'`); } } function assert...
/** * Portfolio tags type schema **/ var mongoose = require('mongoose'), Schema = mongoose.Schema, uniqueValidator = require('mongoose-unique-validator'); var tagsTypeSchema_name = new Schema({ en : { type : String, default: "" }, ru : { type...
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-preferences', isDevelopingAddon() { return true; }, options: { nodeAssets: { 'lz-string': function() { return { enabled: this._shouldIncludeFiles(), import: ['libs/lz-string.js'] }; } ...
$(function() { $("a.popup").on("mouseenter", function() { $this = $(this) var t_id = $this.attr("href").split("_")[1]; var r_id = $this.attr("href").split("_")[2]; $.support.cors = true; $.ajax({ type: "GET", url: "http://askmona.org/v1/responses/list"...
'use strict'; const chai = require('chai'); const RssFeedEmitter = require('../../src/FeedEmitter'); const { expect } = chai; const expectedlength = 1; const refresh = 1000; process.env.NOCK_OFF = true; const feeds = [ { name: 'Nintendo Life', url: 'https://www.nintendolife.com/feeds/latest', }, { ...
/** * @author luohj * copyright 2015 Qcplay All Rights Reserved. */ /** * 显示文本控件 * @class qc.UIText * @extends qc.Node * @param {qc.Game} game - A reference to the currently running game. * @constructor * @internal */ var UIText = qc.UIText = function(game, parent, uuid) { // 调用基类的初始 qc.Node.call(thi...
"use strict"; import CANNON from "cannon"; import Component from "../Component"; export default class Wander extends Component { wanderTheta = 0.0; wanderPhi = 0.0; wanderPsi = 0.0; wanderRadius = 1.0; wanderDistance = 2.5; wanderStep = 0.25; velocity = new CANNON...
'use strict'; var utils = require('lightning-client-utils'); var inherits = require('inherits'); var d3 = require('d3'); var L = require('leaflet'); var F = require('leaflet.freedraw-browserify'); F(L); // code adopted from http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html var Img = function(selector, dat...
import React from 'react'; import ReactDOMServer from 'react-dom/server'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import resolve from './utils/resolve'; export default class ReduxRenderer { constructor() { this.type = 'react'; } render(Page, storeFunction, reducer) { ...
$(document).on("ready page:load", function() { // TODO: remove alert before going to production alert("Hello world!"); });
import React, { Component } from 'react' import MJMLElement from 'components/decorators/MJMLElement' @MJMLElement class Section extends Component { render () { return ( <div> {'Section'} {this.props.children} </div> ) } } export default Section
var Calculator = { current : 0, add : function(n){ var sum = this.current; for(var i = 0, len = arguments.length; i < len; i++){ sum += arguments[i]; } this.current = sum; return this.current; }, subtract : function(n){ var result = this.current; for(var i = 0, len = arguments.length; i < len; i++)...
app.controller('EditProfileCtrl', ['$scope', '$http', 'GlobalConstants', 'auth', 'Upload', '$state', function ($scope, $http, GlobalConstants, auth, Upload, $state) { $scope.saveBasicinfo = function(){ $http.put(GlobalConstants.APIBASEPATH + 'api/user/' + auth.getId() + '/basicinfo', ...
export const DEMOGRAPHICS = [ { value: 'Avg. Portland Household', label: 'Avg. Portland Household' }, { value: '3-Person Extremely Low-Income', label: '3-Person Extremely Low-Income' }, { value: '3-Person Low-Income', label: '3-Person Low-Income' }, { value: '3-Person Moderate-Income', label: '3-Person Moderate...
const SimpleDom = require('simple-dom'); const Renderer = require('mobiledoc-dom-renderer').default; const common = require('../../common'); const mobiledoc = require('../'); const options = { dom: new SimpleDom.Document(), cards: mobiledoc.cards, atoms: mobiledoc.atoms, unknownCardHandler: function (ar...
// @flow import { createStore, applyMiddleware } from 'redux'; import thunk from 'redux-thunk'; import { hashHistory } from 'react-router'; import { routerMiddleware } from 'react-router-redux'; import rootReducer from '../reducers'; import type { fileType } from '../reducers/files'; const router = routerMiddleware(ha...
'use strict'; require('mocha'); var assert = require('assert'); var co = require('co'); var AsyncHelpers = require('../'); var asyncHelpers = null; describe('async-helpers', function() { beforeEach(function() { AsyncHelpers.globalCounter = 0; asyncHelpers = new AsyncHelpers(); }); describe('set', funct...
/* * Copyright (C) 2008 Apple Inc. All Rights Reserved. * Copyright (C) 2011 Google Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the ...
const test = require('tape') /** * Given N*M (square or rectangular) matrix, traverse it clockwise from top left corner. * e.g. for following matrix: * 1, 2, 3, 4 * 12, 13, 14, 5 * 11, 16, 15, 6 * 10, 9, 8, 7 * it should return array [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] * * @param {Arra...
/*MySql connection*/ module.exports = { connection:{ host: 'localhost', user: 'user', password: 'password', debug: true //set true if you wanna see debug logger } }
/* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); var mergeTrees = require('broccoli-merge-trees'); var pickFiles = require('broccoli-static-compiler'); var extraAssets = pickFiles('bower_components/bootstrap-sass/assets/fonts/bootstrap', { srcDir: '/', files: ['**/*'], dest...
import Vuex from 'vuex'; import { shallowMount, createLocalVue } from '@vue/test-utils'; import { GlToggle, GlButton } from '@gitlab/ui'; import IntegrationForm from '~/clusters/forms/components/integration_form.vue'; import { createStore } from '~/clusters/forms/stores/index'; const localVue = createLocalVue(); local...
const _ = require('lodash'); const async = require('async'); const Router = require('./router'); module.exports = function initialize(callback) { // Callback is optional. callback = callback || function (err) { if (err) { this.log.error(err); } }; async.auto({ ready: cb => ready.apply(this, ...
import React from 'react'; import Icon from '../Icon'; export default class HighlightIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M12 28l6 6v10h12V34l6-6V18H12zM22 4h4v6h-4zM7 11.75l2.828-2.828 4.243 4.243-2.82 2.828zm26.923 1.422l4.2...
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. * File Name : template_literal.js * Created at : 2019-05-27 * Updated at : 2020-09-09 * Author : jeefo * Purpose : * Description : * Reference : https://www.ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-co...
var fs = require('fs'), path = require('path'); /** * Returns a function that looks in a specified path relative to the current * directory, and returns all .js modules it (recursively). * * ####Example: * * var importRoutes = landmark.importer(__dirname); * * var routes = { * site: importRou...
var log4js = require("log4js"), log = log4js.getLogger("megapis-worker"), FeedParser = require("feedparser"), async = require("async"), request = require("request"), moment = require("moment"), feedUtils = require("feedparser/utils"), util = require("util"); var MegapisWorker = require("meg...
var classjson_1_1parser_1_1syntax__error = [ [ "syntax_error", "classjson_1_1parser_1_1syntax__error.html#a153b751d0e68cd08a88c54a7de839b04", null ] ];
activity = {} activity.geoStatus = function() { if ("geolocation" in navigator) { /* geolocation is available */ return "GPS Available"; } else { /* geolocation IS NOT available */ return"No GPS"; } }; activity.availableTypes = [ "Running", "Walking", "Cycling", "Hiking" ] activity.Pos...
var db = require('./db'); module.exports = { setDB: function(newDb) { db = require(newDb); }, addRoute: function(routeNumber, valid_bus_types){ return db.query("INSERT INTO route VALUES ($1, $2) RETURNING *", [routeNumber, valid_bus_types]); }, getValidBusTypes: function(routeNumber){ return db...
'use strict'; angular.module("ngLocale", [], ["$provide", function ($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "da manh\u00e3", "da tarde" ], "D...
import { mount } from 'avoriaz'; import Swatch from '@/components/Swatch'; const wrapper = mount(Swatch, { propsData: { color: '#2D2D2D', }, }); describe('Swatch.vue', () => { it('should render a color box', () => { expect(wrapper.contains('.hex__block')) .to.equal(true); }); it('should color t...
export default { "data": { "node": { "__typename": "Checkout", "id": "Z2lkOi8vc2hvcGlmeS9DaGVja291dC9lM2JkNzFmNzI0OGM4MDZmMzM3MjVhNTNlMzM5MzFlZj9rZXk9NDcwOTJlNDQ4NTI5MDY4ZDFiZTUyZTUwNTE2MDNhZjg=", "ready": true, "lineItems": { "pageInfo": { "hasNextPage": false, ...
function containsAbcAsync($q) { return { require: 'ngModel', link: function (scope, elem, attrs, modelCtrl) { function validator(modelValue, viewValue) { console.log('called'); return $q((resolve, reject) => { setTimeout(() => { if (typeof viewValue === 'string') { ...
const Axios = require('./axios'); const transports = { axios: Axios, }; module.exports = function (base = '') { const result = {}; Object.keys(transports).forEach(key => { const Service = transports[key]; result[key] = function (connection, options = {}) { if (!connection) { throw new E...
/** * @param {Number} a * @param {Number} b * @returns {Number} * @typecheck */ function test(a, b) { return; }
const Base = require('./helpers/base'); const Request = require('./helpers/request'); const Entity = require('./entity'); const JSONAPI = require('./jsonapi'); const Swagger = require('./swagger'); const OAuth = require('./helpers/oauth'); const methods = require('./helpers/methods'); module.exports = class Waterwhe...
// Here be dragons // This file contains logic for the PropEditor and the Renderer itself // TODO split this into many smaller files and refactor a bit. import React, { Component, PropTypes } from 'react' import getPropTypes from './find_component_proptypes' const prop_style = { padding: '5px', backgroundColor: '#...
/*! dragon-drop - v1.0.6 - 2015-02-09 * https://github.com/jimschubert/angular-dragon-drop * Copyright (c) 2015 Brian Ford; License: MIT */ (function () { 'use strict'; var util; var REPEATER_EXP = /^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*(?:\|\s+([\s\S]+?))?...
/** * Each controller receives an injector and a router. Injectors can be used to * request services from the app injector, and router is used to register * routes on the app. By default, the route for a controller follows its file * structure, with "controller/index.js" mapping to "/" and everything else * map...
/*jshint maxstatements:50 */ 'use strict'; var util = require('util'); var uuid = require('node-uuid'); var logger = require('log4js').getLogger('routes/actors'); exports = module.exports = function (movieDb, actorDb) { if (!movieDb) { throw new Error('No movie database configured'); } if (!actor...
/** * Getting or calculating data values by leveraging common data patterns * we've seen so far. */ /** Calculate appropriate MONTHLY bracket/limit value (such as income limit) * by number of relevant items (such as number of household members). This * function is needed because the math for these calculation needs ...
"use strict"; describe("recurveMock", function() { it("should provide global shortcut methods for invoke and include", function() { expect($include).toBeDefined(); expect($include).toBe(recurve.mock.include); expect($invoke).toBeDefined(); expect($invoke).toBe(recurve.mock.invoke)...
/* eslint-disable no-console */ import mongoose from 'mongoose'; import { formatMongoose } from 'mongodb-uri'; import { isStagingEnvironment } from '../config/environment'; export default () => new Promise((resolve, reject) => { let hasCallbackBeenCalledMemory = false; const callbackGuard = (error) => { cons...
import cx from 'classnames'; import {PropTypes} from 'react'; export default function PickerCell(props) { const className = cx({ 'dt-picker-cell': true, 'dt-picker-cell-disable': props.disable, 'dt-picker-cell-current': props.current, 'dt-picker-cell-selected': props.selected }); return ( <d...
var path = require('path'); var paths = require('./config/paths'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var marble_web_path = '../marble/.z/duhdcam-hi3516d+ov4689-developer/z/web/onvif'; process.env.NODE_ENV = 'development'; module.exports = { entry: [ require.resolve('./config/pol...
require('./prism.css'); require('./prism.js'); var React = require('react'); var lib = require('markdown-to-react-components'); var DOM = React.DOM; var HalfColumn = { width: '50%', verticalAlign: 'top', display: 'inline-block' }; lib.configure({ h1: React.createClass({ render: function () { return ...
var util = require('./util'); /** * Represents an volume * @param {Object} modem docker-modem * @param {String} name Volume's name */ var Volume = function(modem, name) { this.modem = modem; this.name = name; }; /** * Inspect * @param {Function} callback Callback, if specified Docker will be...
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React, { Component, PropTypes } from 'react'; impor...
Package.describe({ name: 'theduke:bootstrap-modal-prompt', summary: "Show prompts in a bootstrap modal.", version: "0.0.3", git: "https://github.com/theduke/meteor-bootstrap-modal-prompt" }); Package.onUse(function (api) { api.versionsFrom('METEOR@1.0'); api.use('underscore', 'client'); api.use('templat...