code stringlengths 2 1.05M |
|---|
/**
* Module that provides formatter to convert result of {@link module:seeq.search search} into JSON.
*
* @module json
*/
"use strict";
var util = require("./util");
/**
* Format/convert result of {@link module:seeq.search search} into JSON.
*
* @param {Object} data
* Result of {@link module:seeq.se... |
'use strict';
/**
* Transform event source mappings,
*/
const BbPromise = require('bluebird');
const _ = require('lodash');
const utils = require('../utils');
module.exports = function(currentTemplate, aliasStackTemplates, currentAliasStackTemplate) {
const stageStack = this._serverless.service.provider.compiledC... |
$(function() {
var inputPassword
, inputConfirmPassword
, errorPassword
, buttonSubmit
, isValidPassword
, validateForm;
inputPassword = $('#password');
inputConfirmPassword = $('#confirm-password');
errorPassword = $('#error-password');
buttonSubmit = $('#submit');
isValidPassword = f... |
/**
* @author JerryC
* @date 16/5/10
* @description
*/
'use strict';
const express = require('express');
const app = express();
const cookieParser = require('cookie-parser');
const ssoAuth = require('../index');
const ssoClient = ssoAuth.createClient({
ssoClient: {
client: {name: 'siteA', key: '%^&*'}
}
})... |
'use strict';
describe('Controller: ServerDetailCtrl', function () {
var $httpBackend, $rootScope, $resource, configuration, $controller, _, ServerDetailCtrl;
var scope;
// load the controller's module
beforeEach(module('kheoApp'));
beforeEach(inject(function($injector) {
$httpBackend = $injector.get('... |
"use strict";
var t = require("../../types");
exports.ForInStatement =
exports.ForOfStatement = function (node, parent, scope, context, file) {
var left = node.left;
if (t.isVariableDeclaration(left)) {
var declar = left.declarations[0];
if (declar.init) throw file.errorWithNode(declar, "No assignments al... |
var
gulp = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
jc = require('../jcConfig'),
paths = jc.paths;
gulp.task('js-top', function () {
var topJsScripts = [
paths.bower + '/html5shiv/dist/html5shiv.js'
];
return gulp.src(topJsScripts)
.pipe(concat("top.js... |
const elixir = require('laravel-elixir');
require('laravel-elixir-vue-2');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some... |
$(document).ready(function(){
/*
// footer hide
$('footer').hide();
// random team-member order
var members = [
['Octavio', 'Biologist', 'https://pingendo.com/assets/photos/user_placeholder.png'],
['Franco', 'Phycisist', 'https://pingendo.com/assets/photos/user_placeholder.png'],
['Cezar', 'C.S. ... |
/* istanbul ignore file */
import { isDefined } from './is'
import get from './get'
export const isBrowserEnv = () => {
if (!isDefined(process)) return true
return get(process, 'browser') === true
}
export const isNodeEnv = () => !isBrowserEnv()
export const isTestEnv = () => {
const testEnv =
get(process... |
$(window).load(function() {
$(window).on('keydown', function(evt) {
console.log('keycode', evt.which);
// slice down
if (evt.which === 38) { // down arrow
var sliceZ = Session.get('sliceZ');
sliceZ = Math.min(Math.max(sliceZ + 1, 1), Session.get('gridSizeZ'));
Session.set('sliceZ', sli... |
window.addEventListener("load",limitaOitoDigitos);
function limitaOitoDigitos(numero){
var max_numeros = 8;
if(numero.value.length > max_numeros) {
numero.value = numero.value.substr(0, max_numeros);
}
}
|
var mongoose = require( 'mongoose' );
var crypto = require('crypto');
var jwt = require('jsonwebtoken');
var config = require('../config/config');
var userSchema = new mongoose.Schema({
email: {
type: String,
unique: true,
required: true
},
name: {
type: String,
required: true
},
hash: St... |
import { combineReducers } from 'redux';
export function error(state = null, action) {
switch (action.type) {
case 'PRODUCT_LIST_ERROR':
return action.error;
case 'PRODUCT_LIST_MERCURE_DELETED':
return `${action.retrieved['@id']} has been deleted by another user.`;
case 'PRODUCT_LIST_RESET'... |
/**
* @fileoverview Enforce ES5 or ES6 class for returning value in render function.
* @author Mark Orel
*/
'use strict';
// ------------------------------------------------------------------------------
// Requirements
// ------------------------------------------------------------------------------
const RuleTe... |
/* eslint-disable no-console */
'use strict'
const libp2p = require('../../')
const TCP = require('libp2p-tcp')
const PeerInfo = require('peer-info')
const waterfall = require('async/waterfall')
const defaultsDeep = require('@nodeutils/defaults-deep')
class MyBundle extends libp2p {
constructor (_options) {
con... |
import Ember from 'ember';
import Reference from './reference';
import { DEBUG } from '@glimmer/env';
import { deprecate } from '@ember/debug';
import { assertPolymorphicType } from 'ember-data/-debug';
import isEnabled from '../../features';
const {
RSVP: { resolve },
get
} = Ember;
/**
A HasManyReference is... |
(function () {
var canvas;
var canvasContext;
var scale;
var controlSet;
var keyCodeTouched = null;
var resizeBuffer = $('<canvas width="128" height="128">')[0];
var resizeBufferContext = resizeBuffer.getContext('2d');
disableSmoothing(resizeBufferContext);
RuneWizard.setDispla... |
'use strict';
var tobacco_cessation = function (attrs) {
this.name = "tobacco_cessation";
for (var k in attrs) {
this[k] = attrs[k];
}
};
module.exports = tobacco_cessation;
|
const overflowRegex = /(auto|scroll|hidden)/
function needScroll(el, dir) {
let { scrollTop, scrollLeft, scrollHeight, scrollWidth, clientHeight, clientWidth } = el;
switch (dir) {
case "left":
return scrollLeft > 0
break;
case "right":
return scrollLeft + clientWidth < scrollWidth
... |
'use strict';
const { vec3, mat4 } = require('gl-matrix');
const _ = require('lodash');
const dat = require('dat.gui');
const Shader = require('../Shader');
const GLTF2Loader = require('../GLTF2Loader');
const ShaderLoader = require('../ShaderLoader');
const ImageLoader = require('../ImageLoader');
const getCurTimeM... |
import {Account, Bank, Category, Operation, Setting} from './Models';
function xhrError(xhr, textStatus, err) {
var msg = xhr.responseText;
try {
msg = JSON.parse(msg).error;
} catch(e) {
// ignore
}
alert('xhr error: ' + err + '\n' + msg);
}
function xhrReject(reject) {
return... |
module.exports = require('run-object-basis')(require('run-series')) |
$("#menu-close").click(function(e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active");
});
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active");
});
$(function() {
$('a[href*=#]:not([href=#],[data-toggle],[data-target],[data-slide])').click(function()... |
var autoplaySpeed = 15000; //15s
var tweetHideInterval = null;
var photoBombList = [];
var nextSlideIndex = 0;
// Static functions
var slickGoto = function(index) {
$('#slick').slick('slickGoTo', index);
}
var toggleContainers = function(elementId) {
switch (elementId) {
case 'tweet':
console.log('tog... |
exports.sourceNodes = ({ actions, createContentDigest }) => {
const node = {
id: `parent_childAdditionForFields`,
internal: {
type: `Parent_ChildAdditionForFields`,
},
foo: `run-1`,
}
node.internal.contentDigest = createContentDigest(node)
actions.createNode(node)
}
|
/* eslint-disable import/no-extraneous-dependencies */
// Matching bootstraps level of browser compatibility except for:
//
// - no support for IE8
//
// @see https://github.com/twbs/bootstrap-sass#d-npm--nodejs
// @see http://getbootstrap.com/getting-started/#support
const autoprefixer = require('autoprefixer')({
... |
describe("FireLayer.js", function () {
var layer = null;
beforeEach(function () {
layer = new FireLayer();
layer.setCanvas();
});
describe("setCanvas", function () {
it("·½·¨´æÔÚ", function () {
expect(layer.setCanvas).toBeDefined();
});
it("»ñµÃFir... |
/* eslint-disable no-unused-vars */
const { defineStep } = require('cucumber');
defineStep('noop', () => { });
defineStep('noop {string}', (noop) => { });
defineStep('ambiguous', () => { });
defineStep('ambiguous', () => { });
defineStep('failed', () => { throw new Error('FAILED'); });
defineStep('passed', () => {... |
var rptbaocaokhachhang = new baseRpt('baocaokhachhang','baocaokhachhang','Báo cáo khách hàng',{
onLoading:function($scope,options){
var $filter = options.$filter;
var $location = options.$location;
$scope.gotoKH = function(r){
$location.url("dmkh/view/" + r._id);
}
}
});
rptbaocaokhach... |
'use strict';
angular.module('confusionApp')
.controller('MenuController', ['$scope', 'menuFactory', function($scope, menuFactory) {
$scope.tab = 1;
$scope.filtText = '';
$scope.showDetails = false;
$scope.showMenu = false;
$scope.message = "Loading... |
"use strict";
/* eslint-disable no-console */
const log = require("npmlog");
module.exports = output;
// istanbul ignore next
function output(...args) {
log.clearProgress();
console.log(...args);
log.showProgress();
}
|
"use strict";
/*
* ooiui/static/js/views/science/StreamTableView.js
* View definitions to build a table view of streams
*
* Dependencies
* Partials:
* - ooiui/static/js/partials/StreamTable.html
* - ooiui/static/js/partials/StreamTableItem.html
* Libs
* - ooiui/static/lib/underscore/underscore.js
* - ooiui/st... |
import { getOwner } from '@ember/application';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
import { get } from '@ember/object';
import ListFormController from 'ember-flexberry/controllers/list-form';
export default ListFormController.extend({
/**
Name of related ... |
/**
* BuildNavigationActions
*/
var BuildNavigations = {
init: function() {
this.createMainNavigation();
this.createSecMenuNavigation();
this.createGuideMenuNavigation();
},
/**
* Create main menu navigation
*/
createMainNavigation: function() {
var actions = [], action = {};
var log = document... |
'use strict';
const assert = require('assert');
const proc = require('process');
const sys = require('system');
const TEXT = 'test123\n';
const TEST_ARGS = ['foo', 'bar', 'baz', '123'];
var p;
var r;
p = proc.spawn([sys.executable, 'test/helper3.js'],
{stdin: 'pipe', stdout: 'pipe', stderr: 'pipe'})... |
import React from 'react';
const Stateless = () => {
return (
<div>
<p>
Stateless functions are ideal. They only render props and sometimes trigger actions.
These are the most reusable components and even have a special shorthand syntax.
</p>
<pre className='language-javascript... |
var gulp = require('gulp');
var paths = require('../paths');
var eslint = require('gulp-eslint');
// runs eslint on all .js files
gulp.task('lint', function () {
return gulp.src(paths.source)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failOnError());
}); |
'use strict'
const net = require('net')
const Promise = require('bluebird')
function firstOpenPort(port, max) {
max = max || 65535
const err = `no ports open from ${port} to ${max}`
return new Promise((res, rej) =>
(function test() {
const server = net.createServer()
server.on('error', () => {
... |
import * as React from "react";
import PropTypes from "prop-types";
import { withWrapper } from "../Icon";
const Vector = React.forwardRef(({ size, color, ...props }, ref) => (
<svg
width={size}
height={size}
viewBox="4 4 32 32"
xmlns="http://www.w3.org/2000/svg"
ref={ref}
aria-hidden={!props... |
/**
* Module dependencies.
*/
var mongo = require('./mongo.js');
// Handle the :qid parameter
exports.loadQueue = function(req, res, next, qid) {
mongo.findQueueById(qid, function(err, queue) {
if (err) {
next(err);
}
else if (queue) {
req.queue = queue;
next();
}
else {
next(new Error('Unkno... |
"use strict";
const media_server_1 = require("@bldr/media-server");
function action(port) {
media_server_1.runRestApi(port);
}
module.exports = action;
|
/*
* overlay.js v1.0.0
* Copyright 2014 Joah Gerstenberg (www.joahg.com)
*/
(function($) {
$.fn.overlay = function() {
overlay = $(this);
overlay.ready(function() {
overlay.on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {
if (!overlay.hasClass('shown')) ... |
'use strict';
var mean = require('meanio');
module.exports = function(System){
return {
render:function(req,res){
res.render('index',{ locals: { config: System.config.clean }, user: req.user});
},
aggregatedList:function(req,res) {
res.send(res.locals.aggregatedassets);
}
};
};
|
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { PropTypes, Component } from 'react';
import withStyles from '../../decorators/withStyles';
import styles from './SearchForm.css';
@withStyles(styles)
class SearchForm extends Component {
static contextTypes = {
onSetTitle:... |
goog.provide('ngeo.DecorateLayerLoading');
goog.require('goog.asserts');
goog.require('ngeo');
/**
* Provides a function that adds a 'loading 'property (using
* `Object.defineProperty`) to an ol.layer.Group or a layer with
* an ol.source.Tile or an ol.source.Image source.
* This property is true when the layer i... |
$(function() {
var $dot, L1, L3, camera, dot, golf, render, renderer, scene, update , click = false , qqq;
var size = {
1:970,
2:970
};
var cpos=0,
cdate=0,
creg=0,
alltime=15000;
$(document).ready(function(){
formleft();
formright();
consolerize();
loading_func();
});
function consoler... |
import state from './state.js';
import ListrError from './listr-error.js';
class TaskWrapper {
constructor(task, errors) {
this._task = task;
this._errors = errors;
}
get title() {
return this._task.title;
}
set title(title) {
this._task.title = title;
this._task.next({
type: 'TITLE',
data: tit... |
var ldap = require('ldapjs');
var LdapLookup = require('./LdapLookup');
ldap.Attribute.settings.guid_format = ldap.GUID_FORMAT_D;
var LdapValidator = module.exports = function(options){
this._options = options;
this._lookup = new LdapLookup(options);
};
LdapValidator.prototype.validate = function (username, pass... |
angular.module('smiley', [])
.directive('smiley', function () {
return {
restrict: 'AE',
replace: false,
template: 'Smile! {{color}} {{size}}', // 'templates/smiley.html',
controller: function ($scope, $element, $attrs) {
$scope.color = $attrs.color || '#f6eb13';
$scope.siz... |
angular.module("leaflet-directive")
.factory('leafletLayerHelpers', function ($rootScope, $log, leafletHelpers, leafletIterators) {
var Helpers = leafletHelpers;
var isString = leafletHelpers.isString;
var isObject = leafletHelpers.isObject;
var isArray = leafletHelpers.isArray;
var isDefined = leaf... |
!function(){"use strict";(async()=>{const e=document.getElementById("jsAgree"),t=document.getElementsByClassName("jsExecBtn"),n=t=>{if(!e.checked)return t.preventDefault(),void alert("注意事項に同意してね")};for(const e of t)e.onclick=n})()}();
|
// Authentication Related Background Tasks
/**
Processes the authentication response from the OAuth endpoint, dispatching a
message to our own server and storing information about the current user.
@method processResponse
@param {String} resp HTTP response text
@param {XMLHttpRequest} xhr server request headers
@... |
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 app = express();
var dbConfig = require('./db.js');
v... |
/**
* Copyright (c) 2016-present JetBridge, LLC.
* All rights reserved.
*
* This source code is licensed under the MIT-style license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
i... |
/* ************************************ */
/* Define Helper Functions */
/* ************************************ */
function getDisplayElement() {
$('<div class = display_stage_background></div>').appendTo('body')
return $('<div class = display_stage></div>').appendTo('body')
}
function addID() {... |
exports.up = function(knex, promise) {
return promise.all([
knex.schema.createTable('migration_test_2', function(t) {
t.increments();
t.string('name');
}),
knex.schema.createTable('migration_test_2_1', function(t) {
t.increments();
t.string('name');
})
]);
};
... |
// This file has been autogenerated.
exports.setEnvironment = function() {
process.env['AZURE_BATCH_ACCOUNT'] = 'batchtestnodesdk';
process.env['AZURE_BATCH_ENDPOINT'] = 'https://batchtestnodesdk.japaneast.batch.azure.com/';
process.env['AZURE_SUBSCRIPTION_ID'] = '603663e9-700c-46de-9d41-e080ff1d461e';
};
expor... |
let _ = require('lodash')
let co = require('co')
let requireAll = require('require-all')
/* global VERSION */
let commands = requireAll({
dirname: `${__dirname}/commands`
})
let HELPTEXT = `
Thinker ${VERSION}
==============================
A RethinkDB command line tool.
Commands:
thinker clone ... |
const Discord = require('discord.js')
/**
* Handles Guild Specific Settings
*/
class SettingsManager {
constructor () {
/**
* Settings Schema.
* DO NOT MODIFY THIS DIRECTLY. Use the .register() and .unregister() methods instead.
* @type {object}
*/
this.schema = { }
/**
* Defau... |
/*global module*/
'use strict';
module.exports = {
unit: {
configFile: 'karma.conf.js',
background: true
}
};
|
import DS from 'ember-data';
export default DS.Model.extend({
email: DS.attr('string'),
firstName: DS.attr('string'),
lastName: DS.attr('string'),
lastSignInAt: DS.attr('string'),
displayName: Ember.computed('firstName', 'lastName', function () {
return [this.get('firstName'), this.get('lastName')].comp... |
import React from 'react';
import withRoot from 'docs/src/modules/components/withRoot';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from './list-item-secondary-action.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
export default withRoot(Page);
|
Template.userReservations.helpers({
listRes: function () {
return Reservations.find({userId: Meteor.userId()});
},
dateFormat: function (date) {
return date.toDateString();
},
selectedReservation: function () {
var res = Session.get("selectedRes");
var record = Reservations.findOne({_id: res})... |
'use strict';
System.register(['../models/Negociacao.js', '../models/ListaNegociacao', '../models/Mensagem.js', '../helpers/Bind.js', '../helpers/DateHelper.js', '../views/NegociacoesView.js', '../views/Mensagem.js', '../services/NegociacaoService.js'], function (_export, _context) {
"use strict";
var Negociacao,... |
import React from 'react'
export { Awesome } from './src'
const App = () => (
<div>
<Awesome onClick={() => { console.log('Nice!')}/>
</div>
)
export default App
|
'use babel';
import { CompositeDisposable } from 'atom';
import request from 'request'
import SolarCalc from 'solar-calc'
import _ from 'underscore-plus';
import MyConfig from './config-schema.json';
// Use raw API rather than navigator due to unavailability in Atom
const GEOLOCATION_API = 'https://maps.googleapis.co... |
app.controller('createUserController', function ($scope, $location, $rootScope, userService, maskFactory, toast, userFactory) {
angular.extend($scope, maskFactory);
$rootScope.login = {color: false, menu: false, confirmation: false};
$scope.perfilUser = profileUser();
$scope.user = {status: true};
... |
import { PureComponent } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import actions from './ndcs-sdgs-meta-provider-actions';
import reducers, { initialState } from './ndcs-sdgs-meta-provider-reducers';
class NdcsSdgsMetaProvider extends PureComponent {
componentDidMount... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
document.addEventListener('DOMContentLoaded', function() {
var btn = document.getElementById('disableBtn');
link.addEventListener('click', function() {
localStorage.setItem('trumpExtEnabled'), false);
document.getElementById("disableBtn").value = "Enable";
chrome.tabs.query({active: true... |
angular.module('eBlog')
.controller('MypageController', ['$scope', '$state','$http', 'userService','$stateParams', function($scope, $state,$http,userService,$stateParams) {
$('.no-write').show();
$('.home-write').hide();
$scope.user = userService.get();
var id = $stateParams.id;
init();
$scope.goDetai... |
(function($) {
var dialog = {
opts: null,
init: function(options) {
dialog.opts = $.extend({
modal: true,
width: 600,
height: 300,
title: 'Title',
html: '',
buttons: {
... |
var BASE_CHECKSUM = 0xB19ED489;
var LAYER1_OFFSET;
var LAYER2_OFFSET;
var SPRITE_OFFSET;
var HEADER1_OFFSET;
var HEADER2_OFFSET;
var HEADER3_OFFSET;
var HEADER4_OFFSET;
var FLAGBASE;
var LEVEL_OFFSETS =
[
// layer data
{"name": "layer1", "bytes": 3, "offset": LAYER1_OFFSET = 0x2E000},
{"name": "layer2", "bytes":... |
(function($) {
//Mobile Dropdown Navigation
$('#menu-main-navigation').tinyNav({header: 'Navigation'});
//End
//Home-Page Boxes Ordering
$('.cell--bk-widget').insertAfter('.cell--square:eq(3)');
$('.cell--promo-bkg').insertAfter('.cell--square:eq(4)');
$('.cell--square').not(':firs... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime")... |
var searchData=
[
['detailcontroller',['DetailController',['../classDetailController.html',1,'']]],
['detailcontroller_2ephp',['detailController.php',['../detailController_8php.html',1,'']]],
['detailmodel_2ephp',['detailModel.php',['../detailModel_8php.html',1,'']]],
['detailsitemodel_2ephp',['DetailSiteModel.... |
var Employee = require("../domain/employee");
export default class EmployeeService {
constructor() {}
GetUser(loginName, passWord) {
var model = new Employee();
model.LoginName = loginName;
model.PassWord = passWord;
return model;
}
} |
describe("FizzBuzz", function() {
var fizzBuzz;
beforeEach(function() {
fizzBuzz = new FizzBuzz();
});
it("knows that 3 is divisible by 3", function() {
expect(fizzBuzz.isDivisibleByThree(3)).toBe(true);
});
it("knows that 1 is not divisible by 3", function() {
expect(fizzBuzz.isDivisibleByThree(1)).toBe... |
(function() {
var CopyDialog, Dialog, fs, path,
__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 cto... |
import HttpServer from './HttpServer.js'
import LambdaFunctionPool from './LambdaFunctionPool.js'
export default class Lambda {
#httpServer = null
#lambdas = new Map()
#lambdaFunctionNamesKeys = new Map()
#lambdaFunctionPool = null
constructor(serverless, options, v3Utils) {
if (v3Utils) {
this.lo... |
/**
* Copyright 2013-present, Novivia, Inc.
* All rights reserved.
*/
import {ApplicationError} from "../../types/errors";
import {parseErrorStack} from "../";
describe(
"parseErrorStack",
() => {
it(
"should work on native errors",
() => {
const parsedStack = parseErrorStack(
... |
import { assert } from 'chai';
import getGitHubEventHeader from './getGitHubEventHeader';
describe('getGitHubEventHeader', () => {
it('should return value of header X-GitHub-Event', () => {
const result = getGitHubEventHeader({
'X-GitHub-Event': 'foo',
});
assert.deepEqual(resul... |
import _ from 'lodash' // eslint-disable-line
import moment from 'moment'
import Backbone from 'backbone'
import {smartSync} from 'fl-server-utils'
const dbUrl = process.env.DATABASE_URL
if (!dbUrl) console.log('Missing process.env.DATABASE_URL')
export default function createStripeCustomer(User) {
class StripeCust... |
'use strict';
angular.module('ngGcBaseAppService', [
'ngGcHttpProviderConfig',
'ngGcLocationProviderConfig',
'ngGcRavenInitializer',
'ngGcLogInitializer',
'ngGcGaInitializer',
'ngGcRavenConfigService',
'ngGcExceptionHandlerProviderConfig'
]);
|
module.exports = require("npm:dashdash@1.14.1/lib/dashdash.js"); |
$(function() {
$('.api-call form').each(function() {
$(this).submit(function() {
var urlparams = {}
$(this).siblings('.urlparam').each(function() {
urlparams[$(this).attr('name')] = $(this).val();
});
var resultsPre = $(this).siblings('.api-cal... |
/*
* @name Distance 2D
* @description Move the mouse across the image to obscure
* and reveal the matrix. Measures the distance from the mouse
* to each circle and sets the size proportionally.
*/
let max_distance;
function setup() {
createCanvas(710, 400);
noStroke();
max_distance = dist(0, 0, width, heigh... |
// Generated by CoffeeScript 1.6.3
(function() {
var Backbone, Project, RESTController, app, async, bootstrap, express, kb, _ref, _ref1,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() {... |
const Speech = require('@google-cloud/speech');
const record = require('node-record-lpcm16');
const config = require('../config');
const options = {
config: {
// Configure these settings based on the audio you're transcribing
encoding: 'LINEAR16',
sampleRate: 16000,
languageCode: 'fi-FI',
},
};
mo... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import { VISITOR_KEYS } from './symbols'
import fromHtmlAttribute from './fromHtmlAttribute'
const HTML_ELEMENT_PROPERTIES = ['tagName', 'ownerDocument', 'textContent']
class HTMLElementNode {
static [VISITOR_KEYS] = ['childNodes', 'attributes']
constructor(originalNode) {
this.originalNode = originalNode
... |
"use strict"
var expect = require('chai').expect;
var mapper = require('../assets/js/lib/template/mapper');
//=====================================================
//============================= We will test the stores
//=====================================================
var mokeModel = {
attributes: {
... |
'use strict';
var path = require('path');
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var excludeGitignore = require('gulp-exclude-gitignore');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var nsp = require('gulp-nsp');
var plumber = require('gulp-plumber');
gulp.tas... |
/**
* CORS middleware for koa2
*
* @param {Object} [options]
* - {String|Function(ctx)} origin `Access-Control-Allow-Origin`, default is request Origin header
* - {Array} exposeHeaders `Access-Control-Expose-Headers`
* - {String|Number} maxAge `Access-Control-Max-Age` in seconds
* - {Boolean} credentials `Ac... |
/**
* @author Vadim Semenov <i@sedictor.ru>
* @date 10/12/12
* @time 1:24 PM
* @description LogLog algorithm implementation
* @url http://algo.inria.fr/flajolet/Publications/DuFl03-LNCS.pdf
* @license MIT, see LICENSE-MIT.md
*/
function generateWords(count) {
var result = [];
... |
/*!
* Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
// jQuery to collapse the navbar on scroll
$(window).scroll(function() {
if ($(".navbar").offset().top > 50) {
... |
'use strict';
/**
* Validate that a given XML document conforms to a given XML schema. XML Schema Definition (XSD) is the expected schema format.
*
* @param {document} xmlDocument xml to validate
* @param {document} schemaDocument schema to enforce
* @param {string} schemaFolderId if your schema utilizes <import>... |
const db = require('APP/db')
const Category = db.model('categories')
const Product = db.model('products')
module.exports = require('express').Router()
.get('/', (req, res, next) => {
Category.findAll({})
.then(planets => {
res.json(planets)
})
.catch(next)
})
.get('/:categor... |
(function() {
function Score() {
this.Container_constructor(); // Basically: super();
// Layout
this.width = properties.TOP1_WIDTH;
this.height = properties.TOP1_HEIGHT;
this.txt;
this.setup();
}
// Basically: ... Button extends Container ... (below returns a prototype)
var p = createjs.extend(Score, cre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.