code stringlengths 2 1.05M |
|---|
/*
* jQuery Data Science Toolkit Plugin
* version: 0.50 (2013-05-19)
*
* Example:
* var dstk = $.DSTK();
* dstk.street2coordinates('2543 Graystone Place, Simi Valley, CA 93065', myCallback);
*
* See http://www.datasciencetoolkit.org/developerdocs#javascript for a full
* guide on how to use this interface.
... |
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
baseURL: '/',
locationType: 'auto',
torii: {
// a 'session' property will be injected on routes and controllers
sessionServiceName: 'session',
},
Ember... |
/*****************************************************************************/
/* PagesNew: Event Handlers and Helpersss .js*/
/*****************************************************************************/
Template.PagesNew.events({
/*
* Example:
* 'click .selector': function (e, tmpl) {
*
* }
*/
... |
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import Popover from 'react-simple-popover';
import Img from 'react-image';
import { createSelector } from 'reselect';
import { getAuth } from '../../../auth';
import { connect } from 'react-redux';
import { Link, withRouter } from '... |
/**
* 留言板组件
* @author Markey
* @date 2017-05-05
*/
define(function (require, exports) {
const render = require('text!../../template/comment/comment.tpl');
const ui = require('ui');
const layer = require('layer');
const pager = require('../common/pager');
const lazyLoadImage = require('lazyLoadImage');
co... |
import React from 'react';
import { createPortal } from 'react-dom';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { white } from 'common/styles/colors';
import IconButton from 'common/components/IconButton';
// NOTE: this is more of a reference as to how ReactDOM.createPortal() ... |
var require = {
baseUrl: "/script",
paths: {
"text": "//cdnjs.cloudflare.com/ajax/libs/require-text/2.0.10/text",
"Mustache": "//cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.min",
"stache": "//cdnjs.cloudflare.com/ajax/libs/requirejs-mustache/0.0.2/stache",
"domReady... |
// Copyright (c) 2014 Oleg Eterevsky. Licensed under the MIT license.
/**
* @constructor
* @param {Storage} opt_storage
*/
function Profiles(opt_storage) {
/** @type {Array.<number>} */
this.ids_ = null;
/** @type {Object.<number, Object> */
this.data_ = null;
/** @type {number} */
this.lastUsed_ = null... |
/**
* DocuSign REST API
* The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
*
* OpenAPI spec version: v2.1
* Contact: devcenter@docusign.com
*
* NOTE: This class is auto generated. Do not edit the class manually and submit a new issue inste... |
import { Component } from 'cerebral-view-snabbdom'
import Example from './example'
import { Button, Dialog } from '../../lib'
const N = '\n'
export default Component({
dialog: ['demos', 'dialog'],
screenInfo: ['screen']
}, ({
state: {
dialog,
screenInfo
},
signals
}) => (
<div>
<Example code="i... |
"use strict";
(function (ItemFlagStatus) {
ItemFlagStatus[ItemFlagStatus["NotFlagged"] = 0] = "NotFlagged";
ItemFlagStatus[ItemFlagStatus["Flagged"] = 1] = "Flagged";
ItemFlagStatus[ItemFlagStatus["Complete"] = 2] = "Complete";
})(exports.ItemFlagStatus || (exports.ItemFlagStatus = {}));
var ItemFlagS... |
(function() {
'use strict';
angular.module('app.core')
.config(translate);
/* @ngInject */
function translate($translateProvider) {
$translateProvider.translations('es', {
'GLOBAL': {
'APP_NAME': "FFP Angular Finances"
},
'DASHBOARD':... |
const passport = require('passport');
module.exports = app => {
// access google profile and email
app.get(
'/auth/google',
passport.authenticate('google', {
scope: ['profile', 'email']
})
);
// authenticate
app.get(
'/auth/google/callback',
passport.authenticate('google'),
(re... |
var debug = require('debug')('test-writeable');
var test = require('tape');
var fs = require('fs');
// OTHER EVENTS
// drain - when emitted the upstream could continue with data sending
// pipe/unpipe - emitted when upstream pipe or unpipe to this writeable stream
// error - emitted on error
test('### Write into Writ... |
import React, { Component } from 'react';
import Meteor, { createContainer } from 'react-native-meteor';
import Profile from './Profile';
export default createContainer(() => ({
user: Meteor.user(),
signOut: Meteor.logout(),
}), Profile);
|
import React from 'react';
import { connect } from 'react-redux';
import ExpenseForm from './ExpenseForm';
import { startAddExpense } from '../actions/expenses';
export class AddExpensePage extends React.Component {
onSubmit = (expense) => {
this.props.startAddExpense(expense);
this.props.history.push('/');
... |
/**
* Opendrop.
*
* @author Patrick Schroen / https://github.com/pschroen
* @license MIT Licensed
*/
/*jshint
strict:true, boss:true, eqeqeq:true, newcap:false,
loopfunc:true, shadow:true, browser:true, indent:4
*/
function toTimer(time) {
"use strict";
var h, m, s;
h = Math.floor(time/3600);
... |
export default [{
type: 'Person',
order: 1,
name: 'Brian',
}, {
type: 'Place',
order: 2,
name: 'Ohio',
}, {
type: 'Place',
order: 12,
name: 'Ohio',
}, {
type: 'Person',
order: 14,
name: 'Sarah',
}, {
type: 'Person',
order: 199,
name: 'Sam',
}, {
type: 'Person',
order: 19,
name: 'Eri... |
'use strict';
var Awstk = require('../lib/awstk.js')
, Optionall = require('optionall')
, Async = require('async')
, Path = require('path')
, Moment = require('moment')
, Belt = require('jsbelt')
, _ = require('underscore')
, O = new Optionall(Path.resolve('./'))
, S3 = new Awstk.s3(O.aws)
;
exports['... |
var arrayFilter = require('../internal/arrayFilter'),
baseCallback = require('../internal/baseCallback'),
baseFilter = require('../internal/baseFilter'),
isArray = require('../lang/isArray');
/**
* The opposite of `_.filter`; this method returns the elements of `collection`
* that `predicate` does **not*... |
/*************************************************************
*
* MathJax/localization/it/HTML-CSS.js
*
* Copyright (c) 2009-2016 The MathJax Consortium
*
* 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... |
(function (root, factory) { if(typeof define === "function" && define.amd) { define(["d3"], factory); } else if(typeof module === "object" && module.exports) { module.exports = factory(require("d3")); } else { root.webCharts = factory(root.d3); }}(this, function(d3){
var webCharts = { version: '0.2' };
we... |
//This file justs manages personalized options that will be passed
//as a parameter on the function exported by index.js in this project
//The keys/values necessary in the options are not restricted in this file
//They are specified in the validator.js file
//The object that holds the options
var options = {}
//This ... |
module.exports = {
"debug": false,
"force": false
}
|
/**
* @fileoverview
*/
goog.provide('com.dublook.chatrello.trello.model.List');
/**
* @constructor
* @param {Object} boardJson Trello board
* @param {Object} listJson Trello list
*/
com.dublook.chatrello.trello.model.List = function(boardJson, listJson) {
this.id = listJson.id;
this.name = listJson.name;
... |
/**
* Some utilitilies
*/
var utils = {
toCheerio: function(oSelector, cheerioVarName) {
oSelector = cheerioVarName + "('" + oSelector + "')";
oSelector = oSelector.replace(/\.find\(' *'\)/, '');
return oSelector;
}
}
/**
* The jQuery pseudo-selectors and their replacement
*/
var selectors = {
':first': f... |
var Context = require('./context'),
// tokens
NameToken = require('../tokens/wraps/name'),
InfoToken = require('../tokens/wraps/info'),
CopyrightToken = require('../tokens/wraps/copyright'),
CommentToken = require('../tokens/wraps/comment'),
BaseToken = require('../tokens/wraps/base'),
MindToken = require('../... |
require('isomorphic-fetch');
const path = require('path');
const fs = require('fs');
const sitemap = require('sitemap');
const pagePathname = require('./src/utils/page-pathname');
const snakeCase = require('snake-case');
exports.createPages = ({graphql, boundActionCreators}) => {
const {createPage} = boundActionCr... |
import { createSelector } from 'reselect';
/**
* Direct selector to the transferencia state domain
*/
const selectTransferenciaDomain = (state) => state.get('transferencia');
/**
* Other specific selectors
*/
/**
* Default selector used by Transferencia
*/
const makeSelectTransferencia = () => createSelector... |
'use strict';
var Vinyl = require('vinyl');
var through = require('through2');
var collection = require('../');
// files to use for creating list and item pages
// these can be Vinyl files
var list = {path: 'list.hbs', content: 'this is a list'};
var item = {path: 'item.hbs', content: 'this is an item'};
var stream =... |
import DS from "ember-data";
export default DS.Model.extend( {
index: DS.attr("number"),
year: DS.attr("string"),
sum_points: DS.attr("number"),
tasks_cnt: DS.attr("number"),
sealed: DS.attr("boolean"),
point_pad: DS.attr("number"),
active_orgs: DS.hasMany("user")
});
|
//
// desugars
//
// function (a, b = a) { ... }
//
// to:
//
// function (a, b) {
// a = %getArg(0, undefined);
// b = %getArg(1, a);
// }
//
import { reportError } from "../errors";
import { argPresent_id, getArg_id } from "../common-ids";
import { intrinsic } from "../echo-util";
import { TransformPas... |
/**
* jStat - JavaScript Statistical Library
* Copyright (c) 2011
* This document is licensed as free software under the terms of the
* MIT License: http://www.opensource.org/licenses/mit-license.php */
this.j$ = this.jStat = (function( Math, undefined ) {
// for quick reference
var slice = Array.prototyp... |
import React from 'react';
import { PropTypes } from 'prop-types';
import HeaderHelp from '../HeaderHelp/HeaderHelp';
const propTypes = {
isVisibleHelp: PropTypes.bool.isRequired,
onCloseHelp: PropTypes.func.isRequired,
onShowHelp: PropTypes.func.isRequired,
};
const Header = ({ isVisibleHelp, onCloseHelp, onSh... |
/*!
* Modernizr v2.7.1
* www.modernizr.com
*
* Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
* Available under the BSD and MIT licenses: www.modernizr.com/license/
*/
/*
* Modernizr tests which native CSS3 and HTML5 features are available in
* the current UA and makes the results available to you in two wa... |
'use strict'
exports.name = 'PV2'
exports.fields = [
'SegmentType'
, 'PriorPendingLocation'
, 'AccommdationCode'
, 'AdmitReason'
, 'TransferReason'
, 'PatientValuables'
, 'PatientValuablesLocation'
, 'VisitUserCode'
, 'ExpectedAdmitDateTime'
, 'ExpectedDischargeDateTime'
, 'EstimatedLengthOfIn... |
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/index');
var api = require('./routes/api');
var app = express();
/... |
'use strict';
var moment = require('moment');
var time = require('./render/model/time');
describe('Time calculations', function() {
beforeEach(function() {
jasmine.clock().install();
});
afterEach(function() {
jasmine.clock().uninstall();
});
it('uses the current week on weekdays... |
const mongoose = require('mongoose');
const beautifyUnique = require('mongoose-beautiful-unique-validation');
const productAttributeSchema = new mongoose.Schema({
category: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Category',
required: true
},
attribute: {
type: String,... |
const Controllers = require('./controllers');
const Components = require('./components');
const HTMLBarsSyntax = require('htmlbars/dist/cjs/htmlbars-syntax');
const fs = require('fs');
const path = require('path');
const walk = require('fs-walk');
const colors = require('colors/safe');
const beautify = require('js-beau... |
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('gulp-autoprefixer');
var fingerprint = require('gulp-fingerprint');
var inlineImage = require('gulp-inline-image');
var config = require('../config');
gulp.tas... |
var path = require('path');
module.exports = function(req, res) {
require(path.join(__dirname, 'header')).renderPage(req, res, 'subscribe');
}; |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Errors;
(function (Errors) {
Errors["NO_ACCOUNT_AVAILABLE"] = "No account is available to use. Either pass an account as an argument or use the `setDefaultAccount` method to specify beforehand";
Errors["CONTRACT_NOT_DEPLOYED"] = "T... |
const optimization = require('../optimization');
module.exports = class AttributeSelector {
/**
* @constructor
* @param {string} ident
* @param {string} comparison
* @param {string} value
*/
constructor(ident, comparison, value) {
this.ident = ident;
this.comparison = ... |
/*
* angular-pixlive v1
* (c) 2015-2016 Vidinoti https://vidinoti.com
* License: MIT
*/
'use strict';
var pixliveModule = angular.module('pixlive', []);
/*
* angular-pixlive v1
* (c) 2015-2016 Vidinoti https://vidinoti.com
* License: MIT
*/
'use strict';
pixliveModule
/**
* @ngdoc directive
*... |
/*!
* CanJS - 2.0.5
* http://canjs.us/
* Copyright (c) 2014 Bitovi
* Tue, 04 Feb 2014 22:36:26 GMT
* Licensed MIT
* Includes: CanJS default build
* Download from: http://canjs.us/
*/
define(["jquery", "can/util/can", "can/util/array/each", "can/util/inserted", "can/util/event"], function ($, can) {
var isBinda... |
const Sequelize = require('sequelize');
module.exports = (DB) => {
const operatorsAliases = false;
if (DB === 'postgres') {
return new Sequelize('sequelize', 'postgres', 'password', {
host: 'localhost',
dialect: 'postgres',
operatorsAliases
});
} else if (DB === 'mysql') {
return n... |
var noble=require('noble');
noble.on('stateChange', function(state) {
// possible state values: "unknown", "resetting", "unsupported", "unauthorized", "poweredOff", "poweredOn"
console.log(state);
if (state === 'poweredOn') {
noble.startScanning([], false);
powered = true;
}
else {
... |
const PT = require('prop-types');
const React = require('react');
const {
Component
} = React;
class ClassComponent extends Component {
static propTypes = {
foo: PT.string.isRequired,
}
}
|
/* */
"format global";
"use strict";
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; };
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
var explode = _interopRequire(require("./explode-assignable-expression"));
v... |
require('../lib/transforms/version-3/can-component-rename/can-component-rename-test.js');
require('../lib/transforms/version-3/can-stache-bindings/colon-bindings-test.js');
require('../lib/transforms/version-3/can-extend/can-extend-test.js');
require('../lib/transforms/version-3/can-data/can-data-test.js');
require('..... |
import MSTError from './msterror';
import CSV from './csv';
export default class MSTFile {
constructor(mst, name, location, length) {
this._mst = mst;
this._fileReader = new FileReader();
this.name = name;
this.location = location;
this.length = length;
this.filetype... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _jsx2 = _interopRequireDefault(require("@babel/runtime/helpers/builtin/jsx"));
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/builtin/assertThisInitialized"));
var _inhe... |
const licenseReference = require('./');
describe('@emdaer/plugin-license-reference', () => {
test('generates license reference', async () => {
expect(await licenseReference()).toBe(
'emdaer is [MIT licensed](./LICENSE).'
);
});
});
|
/* eslint key-spacing:0 spaced-comment:0 */
const path = require('path')
const debug = require('debug')('app:config:project')
const argv = require('yargs').argv
const ip = require('ip')
debug('Creating default configuration.')
// ========================================================
// Default Configuration
// ====... |
import React from 'react';
import {RouteHandler, Link, browserHistory} from 'react-router';
import adminStore from '../stores/adminStore';
import adminAction from '../actions/adminAction';
import trend from './trend';
class Main extends React.Component {
constructor(props) {
super(props)... |
'use strict';
var should = require('should'),
request = require('supertest'),
app = require('../../server'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Carne = mongoose.model('Carne'),
agent = request.agent(app);
/**
* Globals
*/
var credentials, user, carne;
/**
* Carne routes tests
*/... |
export default {
telegram: {
token: process.env.TELEGRAM_TOKEN || '',
externalUrl: process.env.CUSTOM_ENV_VARIABLE || '',
port: process.env.PORT || 443,
host: '0.0.0.0',
},
};
|
var xmlDoc;
var xmlTmp;
var htmlPart1, htmlPart2;
//executed at page load
function init(){
document.getElementById('slideLayout').selectedIndex = 0;
editCode = "<table border='0'>";
editCode = editCode + "<tr><td>Title:</td><td><input id='title' type='text' value='Tit... |
define( 'specs/combo/b', function(){ return 'b'; } );
|
var dateFormat = require('dateformat'),
faker = require('Faker'),
Nonsense = require('Nonsense'),
ns = new Nonsense();
/**
* Template function to generate a random integer.
*
* @param {Number} min: minimum integer
* @param {Number} max: maximum integer
* @param {Function} cb: jazz cb(data) callback
*/
func... |
/* eslint-disable */
import asyncLoader from '../../phet-core/js/asyncLoader.js';
const image = new Image();
const unlock = asyncLoader.createLock( image );
image.onload = unlock;
image.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ... |
window.onload = function() {
var gauges = [];
var dashContainer;
var readings = []; // pretend readings are supplied (named by gauge).
var rpm = 0;
var i = 0;
var interv0 = 0;
var greenColor = "#107618";
var yellowColor = "#FFC900";
var redColor = "#EC4922";
var darkColor = "#101010";
... |
'use strict';
import {hasNoUndefinedFields} from '../../utils';
import {authenticateByJWT} from '../../auth';
/**
* User middleware that mutates incoming router object to add routes
* @param {koa-router Router} router
*/
export default (router) => {
router.get('userProfile', '/user/profile',
authenticateBy... |
import HelpMenuView from './HelpMenu.js';
import html2element from '../../utilities/html2element.js';
export default {
parameters: {
layout: `fullscreen`,
},
title: `App/Help Menu`,
};
export const HelpMenu = () => {
// Create a mock banner to display the Help Menu against.
const banner = html2element(... |
/*!
* Chart.js Demo config options
*/
/*
*Helpers Functions
*/
// Numbers with zeros
function pad(d) {
return (d < 10) ? '0' + d : d;
}
// Generate range array
function range(start, stop, step){
var a=[pad(start)], b=start;
while(b<stop){b+=step;a.push(pad(b))}
return a;
}
var ... |
QUnit.module('Constraint.Axis')
var ParticleSystem = Particulate.ParticleSystem
var AxisConstraint = Particulate.AxisConstraint
var Vec3 = Particulate.Vec3
QUnit.test('Creation', function (assert) {
var start = 0, end = 1
var a = 1
var indices = [0, 1, 2]
var fromArgs = AxisConstraint.create(start, end, a)
... |
/* eslint no-unused-expressions: 0 */
/* global expect, request, describe, it, before, after */
import '../setup';
import redis from '../../src/index';
const config = {
host: process.env.MODLI_REDIS_HOST,
port: process.env.MODLI_REDIS_PORT,
password: process.env.MODLI_REDIS_PASSWORD
};
const testRedis = new red... |
/* global require, describe, it */
'use strict';
// MODULES //
var // Expectation library:
chai = require( 'chai' ),
// Module to be tested:
validate = require( './../lib' );
// VARIABLES //
var expect = chai.expect,
assert = chai.assert;
// TESTS //
describe( 'validate.io-properties', function tests() {
... |
function getVisitorDetails() {
$('.contact-list-pre').jsonViewer(contacts);
$('.pages-list-pre').jsonViewer(pagesViewed);
var goals = {};
goals.CurrentGoals = goalsList;
goals.PastGoals = pastGoals;
$('.goals-list-pre').jsonViewer(goals);
$('.visit-data-list-pre').jsonViewer(interactions);
var campaign... |
const codes = {
// internal
CCS_INTERNAL: { code: 0, message: 'ccs encountered an internal error.'},
// general errors
LOOKFORUPDATES_GENERAL: { code: 1, message: '.lookForUpdates error.'},
DOWNLOAD_GENERAL: { code: 2, message: '.download errors.'},
INSTALL_GENERAL: { code: 3, message: '.install error.'},
// s... |
var expect = require("chai").expect;
module.exports = function (helpers) {
var component = helpers.mount(require.resolve("./index"));
var buttonComponent = component.getComponent("button");
var countComponent = component.getComponent("count");
expect(buttonComponent).to.exist;
expect(countComponent).to.exis... |
import { t as _t } from "marko/dist/runtime/html/index.js";
const _marko_componentType = "8BXCo81d",
_marko_template = _t(_marko_componentType);
export default _marko_template;
import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml.js";
import _await from "marko/dist/core-tags/core/aw... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var radio = exports.radio = { "viewBox": "0 0 20 20", "children": [{ "name": "path", "attribs": { "d": "M17,8H5.021l8.974-5.265L13,1L1.736,7.571C1.28,7.837,1,8.324,1,8.852V17c0,1.105,0.895,2,2,2h14c1.105,0,2-0.895,2-2v-7\r\n\tC19,8.895,18.1... |
var HtmlParser = require('htmlParseUtil.js');
String.prototype.trim = function () {
return this.replace(/(^\s*)|(\s*$)/g, '');
}
String.prototype.isEmpty = function () {
return this.trim() == '';
}
function formatTime(date) {
var year = date.getFullYear()
var month = date.getMonth() + 1
var day = date.getD... |
module.exports = function(grunt) {
// Do grunt-related things in here
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
qunit: {
files: ['test/*.html']
},
jshint: {
files: ['paginator.js', 'tests/tests.js']
}
});
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt... |
var searchData=
[
['very_5fhigh_5fspeed_208',['VERY_HIGH_SPEED',['../namespace_a_d_c__settings.html#af0d80a1aae7288f77b13f0e01d9da0d3a605020f3fad4a24098fbbb0fa4a293f1',1,'ADC_settings']]],
['very_5flow_5fspeed_209',['VERY_LOW_SPEED',['../namespace_a_d_c__settings.html#af0d80a1aae7288f77b13f0e01d9da0d3a5afd4ce3e5123... |
#!/usr/bin/env node
var program = require('commander');
program
.version(require('./package.json').version)
.description('Perform a Doop operation on the currently active project')
.command('config', 'List Doop config')
.command('delete [unit]', 'Delete an exising unit from the project')
.command('gen-test [unit... |
// Generated by CoffeeScript 1.12.6
var post, sbserv;
sbserv = require("../server.js").sbserv;
post = function(req, res) {
var _, a, ref;
console.log(JSON.stringify(req.body));
ref = sbserv.ips;
for (a in ref) {
_ = ref[a];
if (req.remoteIP() === a) {
return sbserv.serveAjax(req.remoteIP(), "unb... |
(function(){
'use strict';
describe('Plugins', function() {
// Load the module with MainController
beforeEach(function(){
module('gantt');
module('gantt.labels');
module('gantt.sortable');
module('gantt.movable');
module('gantt.drawtas... |
'use strict';
// MODULES //
var isObject = require( 'validate.io-object' ),
isPositive = require( 'validate.io-positive' ),
isPositiveInteger = require( 'validate.io-positive-integer' ),
isString = require( 'validate.io-string-primitive' );
// VALIDATE //
/**
* FUNCTION: validate( opts, options )
* Validates fu... |
module.exports = {
'http_log_directory': 'logs/http-logs',
'log_directory': "logs/process-logs",
'GA_SERVICE_ACCOUNT': 'GOOGLE_SERVICE_ACCOUNT',
'GA_KEY_PATH': "./PRIVATE_KEY_PEM_FILE_PATH"
};
|
/**
* Project Configuration
* (sails.config.globals)
*
* Configure which global variables which will be exposed
* automatically by Sails.
*
* For more information on configuration, check out:
* http://sailsjs.org/#/documentation/reference/sails.config/sails.config.globals.html
*/
module.exports.project = {
... |
'use strict';
/**
* Standard logging method.
*
* @param {...} var_args
* @private
*/
function log(var_args) {
var args = Array.prototype.slice.call(arguments, 0);
args.unshift(LOG_PREFIX);
console.log.apply(console, args);
}
/**
* @type {string}
*/
const LOG_PREFIX = 'FireTaskQueue:';
module.... |
import { oneOf } from '../../utils/help';
export default {
props: {
fixed: {
type: String,
validator(value) {
return oneOf(value, ['left', 'right']);
},
},
flattenColumns: {
type: Array,
default() { return []; },
},
leftFixedColumns: {
type: Array,
... |
/** @module autorecordmic */
var recordmic = require( 'recordmic' );
/**
* autorecordmic will listen to the users surrounding for a certain period
* of time and then use the average volume to determine silence.
*
* If the silence is broken then recording will start. Generally this would
* be used in situations wh... |
var MongoClient = require('mongodb').MongoClient;
MongoClient.connect('mongodb://' + process.env.IP + ':27017/course', function(err, db){
if (err) throw err;
var query = {'title' : {'$regex' : 'NSA'}};
var projection = {'title' : 1, '_id' : 0};
db.collection('reddit').find(query, projection).each(funct... |
(function () {
"use strict";
var mediaPlayer = null;
var prerollAd = new PlayerFramework.Advertising.PrerollAdvertisement();
prerollAd.source = new Microsoft.PlayerFramework.Js.Advertising.RemoteAdSource();
prerollAd.source.type = Microsoft.Media.Advertising.VastAdPayloadHandler.adType;
prero... |
angular.module('meanDemoApp')
.directive('questionList', function() {
return {
restrict: "EA",
scope: {},
controller: 'QuestionlistListeningCtrl',
templateUrl: '/views/question-list.tpl.html'
};
});
|
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 (NumminorihSF) Konstantine Petryaev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitati... |
var _o = require('@carbon-io/carbon-core').bond._o(module)
module.exports = {
MONGODB_URI: _o('env:CARBOND_TEST_MONGODB_URI') || 'mongodb://localhost:27017'
}
|
var crypto = require('crypto');
var xml2js = require('xml2js');
var ejs = require('ejs');
var Session = require('./session');
var List = require('./list');
var WXBizMsgCrypt = require('wechat-crypto');
/**
* 检查签名
*/
var checkSignature = function (query, token) {
var signature = query.signature;
var timestamp = q... |
var passport = require('passport'),
mongoose = require('mongoose'),
constant = require('./constants.js'),
mongoStore = require('connect-mongo');
module.exports = function (app, db, express) {
var User = mongoose.model('User');
var store = mongoStore(express);
passport.use(User.lo... |
app.controller('abilitiesCtrl', function($scope) {
});
|
angular.module('EditColorschemeModal', ['ui.bootstrap', 'color.picker'])
.service('editColorschemeModal', ['$uibModal', function($uibModal) {
var self = this;
self.open = function(colorscheme) {
var modalInstance = $uibModal.open({
templateUrl: 'js/modals/edit-colorscheme/edit-colorscheme-... |
import React from 'react';
import withRoot from 'docs/src/modules/components/withRoot';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from './bottom-navigation.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
export default withRoot(Page);
|
import Phaser from 'phaser'
const JUMP_VALUE = -400
export default class Dino extends Phaser.Sprite {
constructor ({ game, x, y, asset }) {
super(game, x, y, asset)
this.anchor.setTo(0.5)
this.game.add.existing(this)
this.setup()
}
setup () {
this.isDead = false
this.jumpTimer = 0
thi... |
function Calculator(pension, income) {
this.pension = parseInt(pension.replace(/,/g, ''));
this.income = parseInt(income.replace(/,/g, ''));
this.tax_free_lump_sum = this.pension * 25 / 100;
this.taxable_pension = this.pension * 75 / 100;
this.taxable_income = this.income + this.taxable_pension;
this.PER... |
'use strict';
var myApp = angular.module(
'myApp',
[ 'ngAnimate',
'ui.bootstrap',
'ngRoute',
'ngResource']);
myApp.controller('AlertCtrl', function($scope) {
$scope.alerts = [ ];
$scope.closeAlert = function(index) {
$scope.alerts.splice(index, 1);
};
});
myApp.factory('Person', function(... |
import { MongoClient } from 'mongodb';
// Setup for mongodb
/*
Create two collections:
counter,
links,
insert into counter collection initial counter values:
{
obj: 'counter',
seq: 0
}
That's it!
*/
export default function database(config) {
const url = config.mongodb.url;
const linksCollec... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.