code
stringlengths
2
1.05M
const expect = require('chai').expect; const ExtendedBuffer = require('..').ExtendedBuffer; describe('buffer.readBuffer()', function () { it('Test #1', function() { let buf1 = (new ExtendedBuffer).writeBuffer(Buffer.from([1, 2, 3, 4, 5])); let buf2 = Buffer.from([1, 2, 3]); expect(Buffer.c...
/***************************************************************************** * * jsMath: Mathematics on the Web * * This jsMath package makes it possible to display mathematics in HTML pages * that are viewable by a wide range of browsers on both the Mac and the IBM PC, * including browsers that don't pr...
import React, {Component} from 'react'; import $ from 'jquery'; require('./Header.scss'); export default class Header extends Component { constructor() { super(); } render() { return ( <div className="div__header__container"> <div className="div__header__brand"> <span className="s...
'use strict'; import { gl } from './Context'; import Framebuffer from './Framebuffer'; class DeferredFramebuffer extends Framebuffer { constructor( { colorAttachment, depthAttachment, flushable, name = 'deferred.framebuffer' } = {}) { super({ name, flushable });...
'use strict'; let plop = 'hello world'; console.log(plop);
var mongoose = require('mongoose'); var models = require('./models'); var local_database_name = 'mutual'; var local_database_uri = 'mongodb://localhost/' + local_database_name var database_uri = process.env.MONGOLAB_URI || local_database_uri mongoose.connect(database_uri); var users_json = require('./users.json');...
var Demo = function (name, id) { this.name = name; this.id = id; }; module.exports.Abort = new Demo('abort', 255); module.exports.Cover = new Demo('cover ', 0); module.exports.CoverAndDock = new Demo('cover_and_dock', 1); module.exports.SpotCover = new Demo('spot_cover', 2); module.exports.Mouse = new Demo('mouse'...
var LocalStrategy = require('passport-local').Strategy; var bCrypt = require('bcrypt-nodejs'); var mongoose = require('mongoose'); var User = mongoose.model('User'); var Game = mongoose.model('Game'); var passport = require('passport'); var session = require('express-session'); var flash = require('connect-flash'); va...
// Regular expression that matches all symbols in the `Syloti_Nagri` script as per Unicode v5.1.0: /[\uA800-\uA82B]/;
/* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ // // Hides any list items for artists without images. // export default () => $('.artist-list img').error(function() { re...
var path = require('path') var utils = require('./utils') var webpack = require('webpack') var config = require('./config') var merge = require('webpack-merge') var baseWebpackConfig = require('./webpack.base.conf') var CopyWebpackPlugin = require('copy-webpack-plugin') var HtmlWebpackPlugin = require('html-webpack-plu...
define([ "dojo/on", "dojo/dom", "dojo/query", "esri/config", "dojo/request/xhr", "dojo/Deferred", "dojo/dom-class", "dojo/dom-style", "dojo/promise/all", "dojo/_base/array", "dijit/Dialog", "dojox/validate/web", "esri/geometry/Point", "esri/geometry/Polygon", ...
/** * Created by esraa on 6/14/2017. */ 'use strict'; class extractedData { constructor(data) { this._data = data; } get data () { return this._data; } set data(newData) { this._data = newData } } //funtion to ceate new xml var createFile = { generateExportFile : function (data) { r...
!function ($) { "use strict"; var CHECKED_CLASS = 'checked'; var HALF_CHECKED_CLASS = 'halfchecked'; var DISABLED_CLASS= 'disabled'; var Checkbox = function (element, options) { this.$element = $(element) //this.options = $.extend({}, $.fn.checkbox.defaults, options) this.$checkbox = this.$elem...
import Collection from 'ampersand-rest-collection' import Label from './label' import githubApiMixin from '../helpers/github-api-mixin' export default Collection.extend(githubApiMixin, { url () { return this.parent.url() + '/labels' }, model: Label })
define("bui-extensions/1.1.1/extensions/treegrid-debug", ["bui-common/1.1.6/common-debug","jquery","bui-tree/1.1.2/index-debug","bui-list/1.1.2/index-debug","bui-data/1.1.4/index-debug","bui-grid/1.1.5/index-debug","bui-mask/1.1.3/index-debug","bui-toolbar/1.1.1/index-debug","bui-menu/1.1.2/index-debug"], function(requ...
'use strict'; const Account = require('./account'); const Admin = require('./admin'); const Async = require('async'); const Sodium = require('sodium').api; const Joi = require('joi'); const MongoModels = require('mongo-models'); const AUTH_SALT = '0000000000000000'; const PRIVATE_KEY_SALT = '0000000000000001'; const I...
/** * @note * * @param url * @return {Promise} */ export default url => { const Img = new Image(); return new Promise((reslove,reject)=>{ Img.onload = ()=>{ reslove("success"); }; Img.onerror = ()=>{ reject("error"); }; setTimeout(()=>{reject("timeout")},2000); Img.src ...
/** * @module ngeo.search.createGeoJSONBloodhound */ import olFormatGeoJSON from 'ol/format/GeoJSON.js'; import * as olObj from 'ol/obj.js'; import 'corejs-typeahead'; /** * @param {string} url an URL to a search service. * @param {(function(GeoJSONFeature): boolean)=} opt_filter function to filter * results...
import React, { PropTypes } from 'react'; import { moment, connect } from 'utils'; import styles from './styles.css'; const cn = require('classnames/bind').bind(styles); const CALENDAR_URL = 'https://calendar.google.com/calendar/embed?src=hacklag.org_aqt391ob3q7uj2lle7d6flknvg%40group.calendar.google.com'; const Tim...
/* global jest, describe, it, expect */ jest.dontMock('../react-dropzone') const React = require('react') const ReactDOM = require('react-dom') const { shallow, mount, render } = require('enzyme') const {DropzoneComponent} = require('../react-dropzone') describe('Dropzone Comoponent', () => { const componentConfi...
module.exports = function(sails) { /** * Module dependencies */ var path = require('path'); var fs = require('fs'); var async = require('async'); var _ = require('@sailshq/lodash'); var includeAll = require('include-all'); /** * Module loader * * Load code files from a Sails app into me...
__history = [{"date":"Fri, 12 Jul 2013 08:56:47 GMT","sloc":128,"lloc":34,"functions":9,"deliveredBugs":0.4217746316491852,"maintainability":80.04987064768908,"lintErrors":18,"difficulty":26.55}]
var _ = require('lodash'); var data = { array: [{ values: [1, 3, 6] }, { values: 3, flags: { first: false, second: true } }, { values: [7, 4, 7], flags: { first: true, second: false } }] }; _(data)...
import * as t from "../../../types"; function toStatements(node) { if (t.isBlockStatement(node)) { var hasBlockScoped = false; for (var i = 0; i < node.body.length; i++) { var bodyNode = node.body[i]; if (t.isBlockScoped(bodyNode)) hasBlockScoped = true; } if (!hasBlockScoped) { r...
'use strict'; var spawn = require('child_process').spawn, fs = require('fs'), mkdirp = require('mkdirp'), path = require('path'); var _currentProcess; var pid; module.exports.pid = function(){ return pid }; module.exports.serve = function(args, options){ options = options || {}; _currentProcess =...
var Dictionary = function(){ let items = {}; this.has = function(key){ //如果某个值存在于字典中,则返回true,反之则返回false return key in items; }; this.set = function(key, value){ //向字典中添加新元素 items[key] = value; }; this.remove = function(key){ //通过使用键值来从字典中移除对应的数据值 if(this.has(key)){ ...
var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextWebpackPlugin = require('extract-text-webpack-plugin'); var path = require('path'); module.exports = { entry: { app: './test/index.js' }, output:{ path: path.resolve(__dirname, 'test'), filename: '[name].js', ...
var mostrarController = function(Contacto) { var post = function(req, res) { Contacto.getAll(function(err, contacto) {//A través del esquema de contacto, mandamos llamar su función getAll(). if(err){//Si la variable error contiene algo, retornamos un código de error. ...
'use strict'; var setStyles = function () { // https://davidwalsh.name/add-rules-stylesheets var script = document.currentScript || (function() { var scripts = document.getElementsByTagName('script'); return scripts[scripts.length - 1]; })(); var style = document.createElement('style'); s...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var popularSchema = new Schema({ service: String, movies: Array }, { collection: 'popular' }); module.exports = mongoose.model('Popular', popularSchema);
import Route from '@ember/routing/route'; export default Route.extend({ model() { return { text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex...
import MField from '../m-field.vue'; import { focus } from '../../directives'; export const UInput = { name: 'u-input', mixins: [MField], directives: { focus }, props: { value: [String, Number], color: String, placeholder: String, clearable: { type: Boolean, default: fal...
var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return chil...
/* * Dashboard Messages * * This contains all the text for the Dashboard component. */ import { defineMessages } from 'react-intl'; export default defineMessages({ header: { id: 'app.components.Dashboard.header', defaultMessage: 'This is Dashboard components !', }, });
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .8...
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, de...
/*! * @copyright Copyright (c) 2016 IcoMoon.io * @license Licensed under MIT license * See https://github.com/Keyamoon/svgxuse * @version 1.1.17 */ (function(){if(window&&window.addEventListener){var c=Object.create(null),l,p,a=function(){clearTimeout(p);p=setTimeout(l,100)},q=function(){},t=functio...
#!/usr/bin/env node var emmeton = require('../lib/').default; console.log(process.argv[3]) if (process.argv[3]) { const emmet = process.argv[3]; const path = process.argv[2]; const emmetStr = path.split('/').join('>') + '>' + emmet; emmeton(emmetStr); return; } emmeton(process.argv[2]);
/** * Created by Pencroff on 04-Sep-16. */ (function (root) { root.app = root.app || {}; var module = root.app; module.run = run; function run() { var caseList = root.caseList; var caseDetails = root.caseDetails; var search = root.search; var router = new Grapnel({ pu...
var path = require("path"); var webpack = require('webpack'); var BundleTracker = require('webpack-bundle-tracker'); var MiniCssExtractPlugin = require('mini-css-extract-plugin'); module.exports = { context: __dirname, entry: './assets/js/bad_index', output: { path: path.resolve('./assets/django_webpack_l...
(function() { var doctype = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'; window.URL = (window.URL || window.webkitURL); var body = document.body, emptySvg; var prefix = { xmlns: "http://www.w3.org/2000/xml...
const {Mark} = require("../model") const {mapThroughResult} = require("../transform") const {Selection, TextSelection} = require("./selection") const {DOMFromPos, DOMFromPosFromEnd} = require("./dompos") function readInputChange(pm) { pm.ensureOperation({readSelection: false}) return readDOMChange(pm, rangeAround...
import mongoose from 'mongoose' import { Log } from '../../utils'; import profile from '../../profile' const logger = Log('db') // Connect to database const connection = mongoose.createConnection(profile.mongo.uri, profile.mongo.options) connection.on('error', err => { logger.error('MongoDB connection error: %s',...
var electron = require('electron'); var app = electron.app; var Menu = electron.Menu; var Tray = electron.Tray; var GlobalShortcuts = electron.globalShortcut; var window; function layout() { return [ { label: local('showHide'), click: function() { if (window.isVisib...
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; // Block and block me...
'use strict'; // Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net> // This work is free. You can redistribute it and/or modify it // under the terms of the WTFPL, Version 2 // For more information see LICENSE.txt or http://www.wtfpl.net/ // // For more information, the home page: // http://pieroxy.net/blog/pages/lz-str...
/* globals hopscotch: false */ /* ============ */ /* EXAMPLE TOUR */ /* ============ */ var tour = { id: 'hello-hopscotch', steps: [ { target: 'hopscotch-title', title: 'Welcome to Hopscotch!', content: 'Hey there! This is an example Hopscotch tour. There will be plenty of time to read docume...
'use strict'; window.Purchases = (function() { let cost, location, category, date, submitButton; return { init: function() { cost = $('#POST-cost'); location = $('#POST-location'); category = $('#POST-category'); date = $('#POST-date'); submitButton = $('input[id=submitData]'); ...
var decisions = require('../../decisions'); var models = require('../models'); var logger = require('debug')('textcapade'); var _ = require('lodash'); var validate = require('../../tropo/dataValidation').validate; module.exports = function getUserHistory (user, episode) { var userBlob = user.toJSON(); userBlo...
/** * Wheel, copyright (c) 2020 - present by Arno van der Vegt * Distributed under an MIT license: https://arnovandervegt.github.io/wheel/license.txt **/ exports.PoweredUpRoutes = class { constructor(opts) { this._poweredUp = opts.poweredUp; } discover(req, res) { this._poweredUp.discover...
const BaseComponent = require('../../src/BaseComponent'); const properties = require('../../src/properties'); const template = require('../../src/template'); const refs = require('../../src/refs'); const itemTemplate = require('../../src/item-template'); window.rand = require('randomizer'); // no actual test for this...
'use strict'; var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ApplicantSchema = new Schema({ surname: {type:String, required:true, index:true}, forename: {type:String, index:true}, /* On the next field we set an HTML5 input type This is the only addition to standard Mongoose schema forma...
(function(exports) { 'use strict'; var init = function() { var express = require('express'), http = require('https'), _ = require('underscore'), fs = require('fs'), app = express(), superHeroesPath = "/data/super-heroes", readlin...
/** @module ember-flexberry-gis */ import Ember from 'ember'; /** Mixin containing initializetion logic for layer metadata serializer. @class NewPlatformFlexberyGISLayerMetadataSerializerMixin @extends <a href="http://emberjs.com/api/classes/Ember.Mixin.html">Ember.Mixin</a> */ export let Serializer = Ember....
var express = require('express'); var $kd = require('./kdLotteryFilter.js'); var port = 8040; var uri = 'http://localhost:' + port; var app = express(); var server = app.listen(port, function(error){ if(error){ console.log(error); return; } console.log('Listening at: ' + ur...
'use strict'; const fs = require('fs'); const moment = require('moment'); const config = require('./config'); const utils = require('./utils'); module.exports = (title) => { if (title == null || title == undefined || title == '') { return console.log('Error: You must enter a title for your post. Use --tit...
// Generated by CoffeeScript 1.10.0 var slice = [].slice; module.exports.fragments_endUnauthorizedRequiresBasicAuth = function(fragments_setHeaderWWWAuthenticate, fragments_endUnauthorized) { return function() { var args; args = 1 <= arguments.length ? slice.call(arguments, 0) : []; fragments_setHeaderWW...
describe("controller: angular-tj-toast-demo", function(){ var $location, $controller, $rootScope, $templateCache; //----------------------------------------------------------------------------- beforeEach(function(){ module('angular-tj-toast-demo'); inject(function(_$location_, _$controller_, _$roo...
// Generated on 2014-10-15 using generator-angular 0.9.2 'use strict'; // # Globbing // for performance reasons we're only matching one level down: // 'test/spec/{,*/}*.js' // use this if you want to recursively match all subfolders: // 'test/spec/**/*.js' module.exports = function (grunt) { // Load grunt tasks au...
/* Simple OpenID Plugin http://code.google.com/p/openid-selector/ This code is licensed under the New BSD License. */ var providers; var openid; (function ($) { openid = { version : '1.3', // version constant demo : false, demo_text : null, cookie_expires : 6 * 30, // 6 months. cookie_name : 'openid_provider...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.PaginationEllipsis = exports.PaginationNext = exports.PaginationPrevious = exports.PaginationItem = exports.Pagination = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { va...
/** * @module ngeo.misc.AutoProjection */ import * as olProj from 'ol/proj.js'; import * as olExtent from 'ol/extent.js'; /** * @constructor * @struct * @ngdoc service * @ngname ngeoAutoProjection */ const exports = function() {}; /** * Parse a string and return a coordinate if the result is valid. Given str...
import GraphicsSolidFill from "openfl/display/GraphicsSolidFill"; import GraphicsStroke from "openfl/display/GraphicsStroke"; import * as assert from "assert"; describe ("ES6 | GraphicsStroke", function () { it ("caps", function () { // TODO: Confirm functionality var stroke = new GraphicsStroke (); ...
const { iframe: IframeRuntime } = require('noflo-runtime-postmessage'); (function (context) { context.NofloIframeRuntime = IframeRuntime; })(window); if (typeof module !== 'undefined' && module.exports) { module.exports = window.NofloIframeRuntime; }
/* globals describe beforeEach afterEach it */ var path = require('path') var fs = require('fs') var moment = require('moment') var when = require('when') var nodefn = require('when/node') var rewire = require('rewire') var sinon = require('sinon') var expect = require('chai').expect var rimraf = nodefn.lift(require('r...
"use strict"; System.register([], function (_export) { var foo, foo2, foo3, foo4, foo5, foo6, foo8; _export("foo7", foo7); function foo7() {} return { setters: [], execute: function () { foo = _export("foo", 1); foo2 = _export("foo2", function () {}); foo3 = _export("foo3", undefined...
'use strict'; var should = require('chai').should(); var TemplateResource = require('../lib/template-resource').TemplateResource; var path = require('path'); var fs = require('fs'); describe('Template Resource', function () { var testdata = path.join(__dirname, '../test-data'); var dist = __dirname + '/../di...
import { escapeRegExp } from '@rocket.chat/string-helpers'; import { hasAllPermissionAsync } from '../../../../authorization/server/functions/hasPermission'; import { Users } from '../../../../models/server/raw'; async function findUsers({ role, text, pagination: { offset, count, sort } }) { const query = {}; if (t...
import jquery from 'jquery' import tether from 'tether' import bootstrap from 'bootstrap' import lodash from 'lodash'; window._ = window.lodash = lodash; import './scss/base.scss'; import VueRouter from 'vue-router' import routes from './routes.js' Vue.use(VueRouter) import Meta from 'vue-meta' Vue.use(Meta) // cre...
var generate = require('./generate'); var utils = require('./utils'); function Environment() { if (!(this instanceof Environment)) return new Environment(); this.resolved = {}; } Environment.prototype = { /** * instantiate an object that corresponds to schema * * ### Examples: ...
import React, {Component} from 'react'; export default class SearchResultsTable extends Component { render() { if (!this.props.searchResults || !this.props.searchResults.hits.length) { return null; } const resultsRows = this.props.searchResults.hits.map((result, index) => ( ...
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M18.18 10l-1.7-4.68C16.19 4.53 15.44 4 14.6 4H12v2h2.6l1.46 4h-4.81l-.36-1H12V7H7v2h1.75l1.82 5H9.9c-.44-2.23-2.31-3.88-4.65-3.99C2.45 9.87 0 12.2 0 15c0 2.8 2.2 5 5 5 2.46 0 4.45-1.69 4.9-4h4.2c...
var _ = require('underscore'); var View = function (layout, view, options) { options || (options = {}); this.layoutTpl = layout; this.viewTpl = view; this.name = options.name; this.controller = options.controller; }; View.helpers = _.extend({}, require('./view-helpers/layouts'), ...
var utils = require('protean'); //--------------------------------------------------------------------------- // List Item //--------------------------------------------------------------------------- module.exports = utils.classify({ constructor: function Item (data, prev, next) { this.data = data; ...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.16/esri/copyright.txt for details. //>>built define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper @dojo/framework/shim/AbortController ../../../core/Acce...
// flow-typed signature: 6748d1f448a138f5d134ff78aa6e3b96 // flow-typed version: <<STUB>>/redux-observable_v0.16.0/flow_v0.56.0 /** * This is an autogenerated libdef stub for: * * 'redux-observable' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your wo...
const type = -1 function encode (dt) { if (dt === null) { return } const millis = dt * 1 const seconds = Math.floor(millis / 1000) const nanos = (millis - seconds * 1000) * 1e6 if (seconds < 0 || seconds > 0x400000000) { // Timestamp96 const encoded = Buffer.allocUnsafe(13) encoded[0] = -...
//NPM Modules - No relative path as they are in node_modules const express = require("express"); const bodyParser = require("body-parser"); const ejs = require("ejs"); const session = require("express-session"); //These are my own modules that require a relative path to find them const adminRoutes = require("./routes/...
var site = angular.module('main.site', [ 'siteServices', 'siteFilters', 'siteRoutes' ]) .directive('ngDateWidget', function() { return { restrict: 'AE', scope: { "date":"@" }, templateUrl: '../directives/date-widget....
var currentLayoutName = null; var currentLayout = null; var currentRegions = new ReactiveDict(); var currentData; var _isReady = false; BlazeLayout.setRoot = function(root) { BlazeLayout._root = root; }; BlazeLayout.render = function render(layout, regions) { Meteor.startup(function() { // To make sure dom is...
/** * eventsource.js * Available under MIT License (MIT) * https://github.com/Yaffle/EventSource/ */ /*jslint indent: 2, vars: true, plusplus: true */ /*global setTimeout, clearTimeout */ // console.log("Yaffle EventSource has been included the js asset"); (function (global) { "use strict"; function Map() {...
// Node-JS program to merge TheThingsNetwork configuration with changes required // for MultiTech LoRaWAN gateway. // // Copyright by Jac Kersing <j.kersing@the-box.com> // // Use of this source code is governed by the MIT license that can be found in the LICENSE file // at github.com/kersing/multitech-installer // f...
var url = "http://api.openweathermap.org/data/2.5/forecast/daily?lat={{ page.search.lat }}&lon={{ page.search.lon }}&mode=json&units=metric&appid={{ site.apiKey.openweathermap }}" $.getJSON(url).then(function(data) { var result = data.list[0]; var temp = result.temp; var weather = result.weather[0]; ...
//http://datatables.net/plug-ins/pagination#bootstrap $.extend( true, $.fn.dataTable.defaults, { "sDom": "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>", "sPaginationType": "bootstrap", "oLanguage": { // "sLengthMenu": "Display _MENU_ records <div class='input-group input-group-sm'><input ty...
version https://git-lfs.github.com/spec/v1 oid sha256:928e3b82e5dbe0b99a81a5a9891bea6f601c1593889b5a77e71c66d7932db7b5 size 47008
const _ = require('lodash'); module.exports = () => (req, res, next) => { if (!_.has(req, 'acl.allowed')) return res.status(403).send('Route is not allowed.'); next(); };
var path = require('path'); // Postgres DATABASE_URL = postgres://user:passwd@host:port/database // SQLite DATABASE_URL = sqlite://:@:/ var url = process.env.DATABASE_URL.match(/(.*)\:\/\/(.*?)\:(.*)@(.*)\:(.*)\/(.*)/); var DB_name = (url[6]||null); var user = (url[2]||null); var pwd = (url[3]||null); var ...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.8/esri/copyright.txt for details. //>>built define({openInApp:"\u041e\u0442\u043a\u0440\u044b\u044b\u0442\u044c \u0432 {appName}",view:"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440"});
'use strict'; const AWS = require('aws-sdk'); const dynamodb = new AWS.DynamoDB(); const lambda = new AWS.Lambda(); /* Macros: * - /dm "<player>" <message> privately messages another player * - /roll <roll> calls out to the roll lambda * - /qroll <roll> ca...
'use strict'; const expect = require('expect'); const { pick } = require('lodash'); const { isFSA } = require('flux-standard-action'); const { changeDirectorySuccess } = require('../'); const { CHANGE_DIRECTORY } = require('../../constants'); const { CHANGE_DIRECTORY_SUCCESS } = require('../../status-constants'); de...
import React from 'react' import injectSheet from 'react-jss' import { Phone, BigPhone, Tablet, Desktop } from './Breakpoints' import Spacer from './Spacer' const Instruction = ({ classes, stepNumber, stepDescription }) => { return ( <div className={classes.instructionRoot}> <Phone> <div> <div classNam...
{ it("should support custom adapter", function(done) { var called = false; axios("/foo", { adapter: function(config) { called = true; } }); setTimeout(function() { expect(called).toBe(true); done(); }, 100); }); }
output = function() { $.twitter.stream($.endpoint, $options, function (err, ev) { if (err) { cb({error: $.create(err)}) } else { cb({out: $.create(ev)}) } }) }
function clients(state = [], action) { switch(action.type){ case 'CLIENT_LOGGEDIN': // Client is logged in to Syno NAS return Object.assign({}, state, { clientSID: action.sid }) case 'CLIENT_LOADING': // Client big loading (loading overlay) return Object.assign({}, state, { ...
const Express = require('express'); const Bcrypt = require('bcrypt-nodejs'); const UserValidation = require('./validation'); const UserModel = require('./model'); const Response = require('../global/responses'); const Router = Express.Router(); Router.post('/', UserValidation.Create); Router.post('/', (req, res, ne...
'use strict'; module.exports = function (grunt) { grunt.initConfig({ clean: { main: { src: ['src/**/*.rt.js'] } }, eslint: { all: { src: [ 'src/**/*.js', '!src/**/*.rt.js' ...
const Explosion = require('./explosion') const SuperExplosion = require('./superExplosion') class Bomb { constructor(x, y, game) { this.x = x this.y = y this.game = game this.map = game.map this.height = 25 this.width = 25 this.fuseTime = 3000 this.image = 'assets/images/bomberman2_va...
"use strict"; const path = require('path'); const Blueprint = require('../../ember-cli/lib/models/blueprint'); const dynamicPathParser = require('../../utilities/dynamic-path-parser'); const getFiles = Blueprint.prototype.files; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Blueprint....
function createMeshFromGeom(ctx, g, primitiveType) { primitiveType = primitiveType || ctx.TRIANGLES; var attributes = []; var indices = null; if (g.positions) { attributes.push({ data: g.positions, location: ctx.ATTRIB_POSITION}); } if (g.normals) { attributes.push({ data: g.nor...