code stringlengths 2 1.05M |
|---|
(function($){var _ajax=$.ajax,mockHandlers=[],mockedAjaxCalls=[],CALLBACK_REGEX=/=\?(&|$)/,jsc=(new Date()).getTime();function parseXML(xml){if(window.DOMParser==undefined&&window.ActiveXObject){DOMParser=function(){};DOMParser.prototype.parseFromString=function(xmlString){var doc=new ActiveXObject('Microsoft.XMLDOM');... |
//used for the media picker dialog
angular.module("umbraco").controller("Umbraco.Editors.LinkPickerController",
function ($scope, eventsService, entityResource, contentResource, mediaHelper, userService, localizationService, tinyMceService, editorService) {
var vm = this;
var dialogOptions ... |
/**
* Copyright (c) 2014-present, San Wei Ju Yuan Tech Ltd. <https://www.3vjuyuan.com>
* All rights reserved.
*
* This file is part of node-dev-tools, licensed under the MIT license (MIT) found
* in the LICENSE file in the root directory of this source tree.
*
* For more details:
* https://www.3vjuyuan.com/lice... |
(function (angular) {
"use strict";
angular.module('bathwaterApp.common',[]);
})(window.angular) |
// 96a82310-f433-45e9-8b38-254ba2448465
function NeutrinoEffect(ctx) {
var Db = this;
var ne = function (Ld, Bd) {
this.Ld = Ld;
this.Bd = Bd;
if (this.Bd.we.pe.length > 0) {
this.we = this.Bd.we.pe[0];
this.Lc = [ne.prototype.Ec,
ne.prototype.Fc][this.we.xe];
}
else
this.... |
/**
* Ajax Autocomplete for jQuery, version 1.2.7
* (c) 2013 Tomas Kirda
*
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
* For details, see the web site: http://www.devbridge.com/projects/autocomplete/jquery/
*
*/
/*jslint browser: true, white: true, plus... |
module.exports = function getSupportedFontsPerBrowser({
browsers,
fonts,
}) {
return Object.keys(browsers).map((browserName) => {
const browserVersion = browsers[browserName];
return {
browser: browserName,
supports: fonts.map(({ browsers, font }) => (
(browsers[browserName] && browse... |
/**
* ClienteApiController
*
* @description :: Server-side logic for managing Clienteapis
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
*/
module.exports = {
};
|
var fs = require('fs'),
juice = require('juice');
var readFile = function(file, callback){
var stats = fs.stat(file);
if(!stats.isFile())
return callback(file + ' is not a valid file path');
var data = fs.readFileSync(file, 'utf8')
if(data === '')
return callback(file + ' was an empty file');
... |
describe('isFunction utility', function() {
var isFunc = require('../../src/util/is_func');
it('should return false when provided a STRING', function() {
expect(isFunc('hello')).to.be.false;
});
it('should return false when provided a NUMBER', function() {
expect(isFunc(123)).to.be.false;
});
it('s... |
//Variables
_ACTIVE_MODEL_GROUP = "mod_ci1";
_ACTIVE_MODEL = "type_works";
_ACTIVE_PAGE = 1;
_PAGE_SIZE = 25;
//Hooks
//Attach of events related to objects in the interface
//The interface, has not any event into the html view page
$(function () {
defineClicks();
});
//Functions
function defineCl... |
// 计算夜战伤害 |
'use strict';
var request = require('request');
var validUrl = require('valid-url');
function getPageData(url, callback){
if(!url){
return callback(new Error('Missing required input: url'), null);
}
if(!validUrl.isWebUri(url)){
return callback(new Error('Invalid url'), null);
}
request(url, funct... |
const networkWhitelist = [36, 126, 127];
export function isWhitelisted(ipAddress) {
const bits = ipAddress.split('.');
return networkWhitelist.includes(
parseInt(bits[1])
);
}
export function getStoreCodeFromIpAddress(ipAddress) {
const bits = ipAddress.split('.');
return String(Math.floor(bits[2] / 2))... |
// generated on 2016-11-09 using generator-chrome-extension 0.6.1
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import del from 'del';
import runSequence from 'run-sequence';
import {stream as wiredep} from 'wiredep';
const $ = gulpLoadPlugins();
gulp.task('extras', () => {
return gulp.s... |
System.register(["./Mirror", "davinci-csv"], function (exports_1, context_1) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && functi... |
function rand(a, b){ return Math.floor(a + Math.random() * (b-a+1)); }
var log = console.log.bind(console);
function generate(n) {
// level gender hp
log (rand(1,100), rand(0, 1), rand(200, 999));
var runs = [rand(0, 10)];
for (var i=0; i<3; i++)
runs.push(runs[runs.length-1]... |
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
Accounts.onEmailVerificationLink((token, done) => {
Accounts.verifyEmail(token, (error, result) => {
if (error) {
console.log('verifyEmail error', error);
} else {
alert(JSON.stringify(result));
console... |
'use strict'
var fs = require('fs-extra')
var path = require('path')
var mkdirp = require('mkdirp')
var browserify = require('browserify')
var tsify = require('tsify')
var envify = require('envify/custom')
var exorcist = require('exorcist')
require('dotenv').config({silent: true})
var srcPath = path.join(process.cwd... |
/* global $ */
export default (function() {
let _scrollPosition;
function preventScroll(e) {
e.preventDefault();
window.scroll(..._scrollPosition);
}
function lock() {
_scrollPosition = [window.pageXOffset, window.pageYOffset];
$(window).on('scroll touchmove', preventScroll);
}
function unlock() {
$... |
#!/usr/bin/env node
const Migrate = require("../../");
const mysql = require("mysql");
const db = mysql.createConnection({
host: "localhost",
database: "migratejs",
user: "migratejs",
multipleStatements: true,
});
function log(key, msg) {
console.log(" \x1B[90m%s :\x1B[0m \x1B[36m%s\x1B[0m", key, ... |
/* global gapi */
/*
* http://stackoverflow.com/questions/18260815/use-gapi-client-javascript-to-execute-my-custom-google-api
* https://developers.google.com/appengine/docs/java/endpoints/consume_js
* https://developers.google.com/api-client-library/javascript/reference/referencedocs#gapiclientload
*
*/
/**
* Af... |
module.exports = {
plugins: [
require('postcss-import'), // Resolve @import statements
require('postcss-clean'), // Minifies CSS
require('postcss-reporter') // Output errors messages & other info
]
}
|
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
files: ['Gruntfile.js', 'dist/**/*.js', 'src/**/*.js'],
options: {
esversion: 6,
globals: {
jQuery: true
}
}
},
watch: {
... |
suite( 'muigui/useful-util', function() {
test( '<static> util.format', function( done ) {
expect( util.format( '{0}, {1}, {2}, {3}, {4}, {5}, {6}, ${7}, ${8}, ${9}', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine' ) ).to.deep.equal( 'zero, one, two, three, four, five, six, seven, eigh... |
var gulp = require('gulp');
var concat = require('gulp-concat');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var addsrc = require('gulp-add-src');
var replace = require('gulp-replace');
var jsifyTemplates = require('gulp-jsify-html-templates');
var uglify = require('gulp-uglify');
v... |
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { createSelector } from 'reselect';
import App from '../components/App';
import * as TodoActionCreators from '../actions/TodoActionCreators';
import { SHOW_ALL, SHOW_COMPLETED, SHOW_ACTIVE } from '../constants/VisibilityFilters';... |
/* ========================================================================================== */
/* Gulp
/* ========================================================================================== */
var gulp = require('gulp');
/* ============================== */
/* Plugins
/* ============================== */
... |
'use strict';
module.exports = function(indicatorMixin, accessor_ohlc, indicator_ema) { // Injected dependencies
return function() { // Closure function
var p = {}, // Container for private, direct access mixed in variables
period = 14,
overbought = 70,
middle = 50,
oversold = 3... |
/*
* Globalize Culture ar-OM
*
* http://github.com/jquery/globalize
*
* Copyright Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* This file was generated by the Globalize Culture Generator
* Translation: bugs found in this f... |
;(function() {
"use strict";
var BaseController = require("BaseController");
new BaseController({
siteName: "Short Orange",
play: ".jp-play .fa-play",
pause: ".jp-play .fa-pause",
playNext: ".fa-forward",
playPrev: ".fa-backward",
playState: ".fa-pause:not(.ng-hide)",
song: ".episod... |
/**
* @param {number[]} digits
* @return {number[]}
*/
const plusOne = digits => {
// INVARIANT: digits must be a non-empty Array
// plus 1 here
++digits[digits.length-1]
let i = digits.length-1
// carry bits until hitting most significant digit
while (i-1 >= 0 && digits[i] > 9) {
++digits[i-1]
d... |
'use strict';
/**
* Module dependencies.
*/
var should = require('should'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Firstdate = mongoose.model('Firstdate');
/**
* Globals
*/
var user, firstdate ;
/**
* Unit tests
*/
describe('Firstdate Model Unit Tests:', function() {
beforeEach(func... |
'use strict';var lang_1 = require('angular2/src/facade/lang');
var PregenProtoChangeDetector = (function () {
function PregenProtoChangeDetector() {
}
PregenProtoChangeDetector.isSupported = function () { return false; };
PregenProtoChangeDetector.prototype.instantiate = function (dispatcher) {
... |
window.onload=function() {
var canvas=document.getElementById("canvas");
var context=canvas.getContext('2d');
context.fillStyle='rgba(255,0,0,0.75)';
context.beginPath();
context.scale(1.5,1.5);
context.moveTo(75,60);
context.bezierCurveTo(125,20,125,100,75,115);
context.bezierCurveTo(2... |
/*
* grunt-html2amd
* https://github.com/rdesoky/grunt-html2amd
*
* Copyright (c) 2014 Ramy Eldesoky
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Please see the Grunt documentation for more information regarding task
// creation: http://gruntjs.com/creating-tasks... |
$(function(){
$.ajax({
'async': false,
'global': false,
type:'GET',
dataType:'json',
url:'board.json',
success:function(data){
map = data;
loadBoard();
}
});
$('.unanswered').click(function(){
var category = $(this).pare... |
vti_encoding:SR|utf8-nl
vti_author:SR|OMCORP\\saten.kumar
vti_modifiedby:SR|OMCORP\\saten.kumar
vti_timelastmodified:TR|26 May 2006 15:17:09 -0000
vti_timecreated:TR|26 May 2006 15:17:09 -0000
vti_cacheddtm:TX|26 May 2006 15:17:09 -0000
vti_filesize:IR|1082
vti_extenderversion:SR|6.0.2.6551
vti_backlinkinfo:VX|Editor/j... |
/**
* @license Highcharts JS v5.0.6 (2016-12-07)
* Highcharts Drilldown module
*
* Author: Torstein Honsi
* License: www.highcharts.com/license
*
*/
;define(function(require, exports, module){
(function(factory) {
if (typeof module === 'object' && module.exports) {
module.exports = factory;
} el... |
const BroadcastChannelPolyFill = function(global) {
var channels = [];
function BroadcastChannel(channel) {
var $this = this;
channel = String(channel);
var id = '$BroadcastChannel$' + channel + '$';
channels[id] = channels[id] || [];
channels[id].push(this);
... |
/**
* Resources:
*
* http://dmitrysoshnikov.com/ecmascript/es5-chapter-3-1-lexical-environments-common-theory
*
*
* - Definition: Scope is an enclosing environment in which a variable is associated with a value.
*
* - Resolving data in ECMAScript is based on static scoping principle
*
* - Static ... |
import React from 'react'
import renderer from 'react-test-renderer'
import Form, {TextInput} from '../lib/index.js'
test('TextInput renders', () => {
const component = renderer.create(
<TextInput />
)
let tree = component.toJSON()
expect(tree).toMatchSnapshot()
})
test('TextInput renders with props', () ... |
/* launch.ly Shopping Cart - v0.4.1 - 2014-09-04
* https://github.com/launchly/launchly-cart
* Copyright (c) 2014 Craig Sullivan; Licensed MIT */
/* List of cart methods
* ------------
*
* add
* dec
* empty
* get
* inc
* on_account
* pay ... |
import Form from './';
import FormComponent from './Form';
import TextInput from './TextInput';
import Select from './Select';
import Field from './Field';
test('can be used directly as Form component', () => {
expect(FormComponent).toBe(Form);
});
test('has a TextInput property', () => {
expect(TextInput).toBe(F... |
import React from "react";
import { connect } from "react-redux";
import { doNavigate } from "actions/app";
import { doResolveUri } from "actions/content";
import {
makeSelectClaimForUri,
makeSelectMetadataForUri,
} from "selectors/claims";
import { makeSelectFileInfoForUri } from "selectors/file_info";
import { se... |
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('i-c-s-soft-s-t-o-r-m-n-e-t-security-link-view', 'Unit | Serializer | i-c-s-soft-s-t-o-r-m-n-e-t-security-link-view', {
// Specify the other units that are required for this test.
needs: [
'serializer:i-c-s-soft-s-t-o-r-m-n-e-t-security-link-vi... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.11.0-rc1-master-ffbcff3
*/
goog.provide('ng.material.components.fabToolbar');
goog.require('ng.material.components.fabActions');
goog.require('ng.material.components.fabShared');
goog.require('ng.material.components.fabTrigger'... |
'use strict';
/**
*
* 音乐搜索器 - JS 文件
*
* @author MaiCong <i@maicong.me>
* @link https://github.com/maicong/music
* @since 1.5.9
*
*/
$(function() {
// 获取参数
function q(key) {
var value = null;
var tmp = [];
location.search
.substr(1)
.split('&')
.forEach(function(v) {
... |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
var mongoose = require('mongoose');
var Spll = mongoose.model('Spells');
var sendJsonResponse = function(res, status, content) {
res.status(status);
res.json(content);
};
module.exports.spellGetOne = function(req, res) {
if (req.params && req.params.spellid) {
Spll
.findById(req.params... |
import React, { Component } from 'react'
import { connect } from 'react-redux';
import Mentor from './Mentor'
//Container for mentor result
const mapStateToProps = ({ mentors }) => ({mentors});
@connect(mapStateToProps)
export default class MentorList extends Component {
render() {
console.log("Mentors", this.p... |
function scriptLoader(type, name, callback) {
var newScript = document.createElement('script');
var path = window.location.pathname.split('/').slice(0,-1).join('/')+'/';
newScript.src = window.location.origin+path+type+"/"+name+".js";
console.log("Loading ["+newScript.src+"]");
newScript.onload =... |
ideologies_.createIdeology = function(name){
name = o_.capitaliseFirstLetter(name);
var ideology = Ideologies.findOne({name: name});
if(ideology){
return ideology._id;
} else {
var ideologyId = Ideologies.insert({
name: name,
date: new Date()
});
... |
// # Ghost Configuration
// Setup your Ghost install for various environments
// Documentation can be found at http://support.ghost.org/config/
var path = require('path'),
config;
console.log('PORT:', process.env.PORT);
config = {
// ### Development **(default)**
development: {
// The url to use ... |
/*! UIkit 2.14.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
(function(core) {
if (typeof define == "function" && define.amd) { // AMD
define("uikit", function(){
var uikit = core(window, window.jQuery, window.document);
uikit.load = function(res, req, o... |
/**
* Copyright 2012-2020, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var isNumeric = require('fast-isnumeric');
var BADNUM = require('../../constants/numerical').BADNUM;
var Axes ... |
var merge = require('webpack-merge')
var prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
API_URL: '"http://localhost:8080/api/"'
})
|
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.MessagePortDispatcher = {})));
}(this, (function (exports) { 'use strict';
function unwrapExports (x) {
retu... |
module.exports = {
hasMore: true,
data: [
{
img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161022145742279-606202974.jpg',
title: '河束人家',
subTitle: '南锣鼓巷店',
price: '150',
distance: '120m',
mumber: '389'
},
... |
module.exports = {
name: 'berries',
resource: 'meat',
update: function(player) {
},
getHarvestedValue: function(player, tribe) {
return 1;
},
getRequiredResources: function() {
return {
};
},
clicks: 10
};
|
'use strict';
/**
* Module dependencies
*/
var modPolicy = require('../policies/mod.server.policy'),
util = require('../../../../config/lib/util.js'),
mod = require('../controllers/mod.server.controller');
module.exports = function(app) {
app.route('/v2/modlogin')
.post(mod.modLogin);
app.route('/v2/m... |
'use strict';
var util = module.exports = {};
util.bind = function(func, object) {
var args = Array.prototype.slice.apply(arguments, [2]);
return function() {
var newArgs = args.concat(
Array.prototype.slice.apply(arguments, [0])
);
return func.apply(object, newArgs);
};
};
/**
* @method uti... |
module.exports = __CONFIG__({
caches: {
main: ['external.js', ':rest:']
},
externals: ['external.js'],
excludes: ['main.js'],
version: '[hash]',
ServiceWorker: {
entry: 'sw-entry.js'
}
}, {
swMetadataOnly: false
}); |
/**
* Adds a formatter to format dates and strings simplistically
*/
module.exports = function(value) {
if (!value) {
return '';
}
if (!(value instanceof Date)) {
value = new Date(value);
}
if (isNaN(value.getTime())) {
return '';
}
return value.toLocaleDateString();
};
|
// All symbols in the Tagalog block as per Unicode v7.0.0:
[
'\u1700',
'\u1701',
'\u1702',
'\u1703',
'\u1704',
'\u1705',
'\u1706',
'\u1707',
'\u1708',
'\u1709',
'\u170A',
'\u170B',
'\u170C',
'\u170D',
'\u170E',
'\u170F',
'\u1710',
'\u1711',
'\u1712',
'\u1713',
'\u1714',
'\u1715',
'\u1716',
'\u17... |
(function (angular) {
'use strict';
angular.module('ruchJow.config.globals', [
'ui.router',
'ruchJow.messages',
'ruchJow.security',
'ruchJow.basicServices',
'ruchJow.points',
'ruchJow.statistics',
'ruchJow.feedback'
])
// UI ROUTER ($state, $... |
import {string, url, listOf} from '@travi/any';
import React from 'react';
import dom from 'react-dom/server';
import cheerio from 'cheerio';
import {assert} from 'chai';
import HistoryWrapper from '../../helpers/history-wrapper';
import {PrimaryNav} from '../../../src/main';
suite('primary navigation', () => {
te... |
import React from 'react';
import TickIcon from './TickIcon';
import generateSketchIconSizes from '../private/generateSketchIconSizes';
export const symbols = {
...generateSketchIconSizes('Tick', <TickIcon />)
};
|
import React, {Component} from "react";
import Col from "react-bootstrap/lib/Col";
import Nav from "react-bootstrap/lib/Nav";
import NavItem from "react-bootstrap/lib/NavItem";
class TabsSearchFavoritesMusikki extends Component {
render() {
return (
<Col xs={12}>
<Nav bsStyle="pills">
<... |
var assert = require('assert');
describe('wizcorp-timer', function () {
var Timer = require('../');
it('instantiate a new timer', function () {
var timerA = new Timer();
});
it('get a timestamp in milliseconds', function () {
var timerA = new Timer();
var msecTime = timerA.msec();
var now = Date.now();
... |
import { connect } from 'react-redux';
import React from 'react';
import SensorComponent from './SensorComponent.js';
import Fan from './Fan.js';
import { setTargetTemperature } from './actions.js';
const mapStateToProps = (state) => {
const { currentTemperature, targetTemperature, fanOn } = state.targetSensor;
r... |
/* eslint-disable react/jsx-handler-names */
import React from 'react';
import Button from '@material-ui/core/Button';
import Menu from '@material-ui/core/Menu';
import MenuItem from '@material-ui/core/MenuItem';
import PopupState, { bindTrigger, bindMenu } from 'material-ui-popup-state/index';
function MenuPopupStat... |
'use strict';
angular.module('asc.trips', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/trips', {
templateUrl: 'trips/trips.html',
controller: 'TripsCtrl'
});
}])
.controller('TripsCtrl', ['$scope', function($scope) {
$scope.trips = [
{ name: 'Race T... |
/**
* Copyright (c) 2014 brian@bevey.org
*
* 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 limitation the
* rights to use, copy, modify, merge, pu... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.selectBirthday = selectBirthday;
function selectBirthday(yearSelector, monthSelector, daySelector, config) {
yearSelector = yearSelector || null;
monthSelector = monthSelector || null;
daySelector = daySelector || nul... |
/**
* Widget for Narrative Outline Panel
* @author David Lyon <dlyon@lbl.gov>
* @public
*/
define(['jquery', 'base/js/namespace', 'kbwidget', 'kbaseNarrativeControlPanel', 'util/display'], (
$,
Jupyter,
KBWidget,
ControlPanel,
DisplayUtil
) => {
'use strict';
return new KBWidget({
... |
(function() {
$(document).on('ready page:change', function() {
$('body').removeClass('touch').removeClass('no-touch');
if(is_touch) {
$('body').addClass('touch');
} else {
$('body').addClass('no-touch');
}
});
})();
|
describe('WalksReferenceService', function () {
beforeEach(module('ekwgServices'));
describe('toEventType', function () {
it('should return a moment instance when passed a string and a date format', inject(function (WalksReferenceService) {
expect(WalksReferenceService.toEventType('approved')).toBe(Wal... |
import express from 'express';
import graphQLHTTP from 'express-graphql';
import path from 'path';
import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import {Schema} from './data/schema';
const APP_PORT = process.env.PORT || 3000;
const GRAPHQL_PORT = 8080;
// Expose a GraphQL endpoint
... |
require('babel-register')({
presets: [
{
// only include this at runtime because updateSchema.js must not reference this
plugins: [
"./babelRelayPlugin"
]
}]
});
require('./server'); |
var stubServer = function() {
var pretender = new Pretender();
DS._routes = Ember.create(null);
pretender.unhandledRequest = function(verb, path, request) {
var string = "Pretender: non-existing " + verb + " " + path, request
console.error(string);
throw (string);
};
return {
pretender: pret... |
var visualizr = (function () {
// Good: the name is local to this module
var visualizr = {};
var chartInstances = [];
var chartDescriptors = [];
var from = '';
var to = '';
var datsourceId = '';
var autoupdate = false;
var chartheight = 500;
var updated = 0;
var updateIntervall =... |
var express = require('express'),
bodyParser = require('body-parser'),
mongoose = require('mongoose'),
cors = require('cors');
// db = mongoose.connect('mongodb://localhost/books');
var db = mongoose.connect('mongodb://team:123456@ds059692.mongolab.com:59692/bookapi');
var Book = require('./models/bookM... |
var baseApi = "http://localhost:52857/api/";
var token = {
validate: function (token) { return baseApi + 'token/validate/' + token }
}
Object.freeze(token);
export class Urls {
get baseApi() {
return baseApi;
}
get token() {
return token;
}
}
|
/*
options: {
strings: {..}, //
extensions: '' // string
}
*/
function FilesRepository(options) {
var defaults = {
extensions: '',
strings: {
caption: 'Audio files list',
hint: 'Use file number as param for playRecord function',
add: 'Add... |
const fetch = require('node-fetch');
const cheerio = require('cheerio');
const parsePlace = function parsePlace(nodeEl) {
const elements = cheerio(nodeEl).find('h6');
return elements.eq(1).text().trim();
};
const parseDate = function parseDate(nodeEl) {
const elements = cheerio(nodeEl).find('h6');
return elem... |
const helpers = require('./helpers')
const webpackMerge = require('webpack-merge') // used to merge webpack configs
const webpackMergeDll = webpackMerge.strategy({plugins: 'replace'})
const commonConfig = require('./webpack.common.js') // the settings that are common to prod and dev
/**
* Webpack Plugins
*/
const Ad... |
'use babel';
import {
MessageObject,
} from '../../../lib/objects'
import messages, {
setAllMessages,
addMessages,
sendMessage,
reciveMessage,
updateMessage,
replaceMessage,
} from '../../../lib/redux/modules/messages'
describe('messages reducer', () => {
// const ch1 = new ChannelObject({
// id... |
var requiredTags = function(input, callback) {
"use strict";
var evidence = [];
if (input.message.configurationItem.configurationItemStatus === "OK" ||
input.message.configurationItem.configurationItemStatus === "ResourceDiscovered") {
/*
* Only evaluate policies applicable to t... |
//================================================
// exclude_retweets.js
// Author: @iihoshi
//================================================
(function ($, jn) {
if ((_Janetter_Window_Type != "main") && (_Janetter_Window_Type != "profile"))
return;
var my_filename = 'exclude_retweets.js';
// プラグイン情報 ここから
/... |
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
goog.provide('proto.xla.WaitForExecutionResponse');
goog.require('jspb.Message');
goog.require('jspb.BinaryReader');
goog.require('jspb.BinaryWriter');
goog.require('proto.xla.ExecutionProfile');
goog.require('proto.xla.GlobalDataHa... |
'use strict';
var gulp = require('gulp');
gulp.task('coffee-build', function(){
console.log('run coffee builder');
return true;
}); |
#!/usr/bin/env node
var program = require('commander');
program= require('./commands/create/create')(program);
program= require('./commands/model/model')(program);
program= require('./commands/controller/controller')(program);
program.parse(process.argv); |
import BtnCard from './btnCard'
export { BtnCard }
|
import { reducer as routerReducer } from 'fans-router';
import products from './products';
// import translations from './translations';
import ui from './ui';
import user from './user';
export default (state, action) => ({
products: products(state.products, action),
router: routerReducer(state.router, action, st... |
import beforeEach from "./beforeEach";
import child from "child_process";
import { cliPath } from "../fixtures";
import getCurrCommitHash from "./getCurrCommitHash";
import getCurrTagHash from "./getCurrTagHash";
import getCurrTree from "./getCurrTree";
import getCurrVersion from "./getCurrVersion";
import tempInitAndV... |
// Generated by CoffeeScript 1.7.1
(function() {
var DB, Helper, IDSet, PolygonIndex, Result, SetIndex, TextIndex, TrieIndex, empty;
IDSet = require('./id_set');
Result = require('./result');
Helper = require('./helper');
SetIndex = require('./indexes/set_index');
TrieIndex = require('./indexes/trie_in... |
/* jshint quotmark: single */
(function () {
'use strict';
questkit.goDirection = function (direction) {
// TODO: Locked exits, exits with scripts
var foundExit;
questkit.scopeExits().forEach(function (exit) {
if (get(exit, 'direction') == direction) {
foundExit = exit;
return;
}
});
if (!f... |
//This library requires big.js - https://github.com/MikeMcl/big.js/ - used in regPolyBig, determinantBig and smoothQuadraticBig
var ssci = ssci || {};
ssci.smooth = {};
ssci.season = {};
ssci.reg = {};
ssci.fore = {};
ssci.ts = {};
|
var Logger = require('./logger.js');
var logger = Logger().getLogger();
var tokenizer = require('./token.js');
module.exports = {
/**
* Add Access-Control-Allow-Headers in HTTP response
*/
header : function(req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-He... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.