code stringlengths 2 1.05M |
|---|
const Inventory = require('../objects/Inventory');
class Settlement {
constructor(name) {
/**
* @type {string}
*/
this.name = name;
/**
* @type {Inventory}
*/
this.inventory = new Inventory();
/**
* @type {number}
*/
this.members = 1;
}
addMember() {
t... |
const warpjsPlugins = require('@warp-works/warpjs-plugins');
const warpCore = require('./../lib/core');
module.exports = () => {
const plugin = warpjsPlugins.getPlugin('session');
if (plugin) {
return plugin.module.middlewares(plugin.config, warpCore, plugin.Persistence);
} else {
return n... |
var express = require('express');
var app = express();
app.use('/node_modules', express.static(__dirname + '/node_modules'));
app.use(express.static(__dirname + '/public'));
// redirect all others to the index (HTML5 history)
app.all('/*', function(req, res) {
res.sendFile(__dirname + '/public/index.html');
});
... |
var test = require('tape');
var fs = require('fs');
// Load utils and constants in the global scope of this file to run tests on:
/* jshint ignore:start */
eval(fs.readFileSync(__dirname + '/../src/constants.js') + '');
eval(fs.readFileSync(__dirname + '/../src/utils.js') + '');
/* jshint ignore:end */
test('test uni... |
import React, { Component } from "react";
import { Redirect, Route, Switch } from "react-router-dom";
import componentQueries from "react-component-queries";
import { Sidebar } from "./sidebar";
import { Me } from "./me";
import { Task } from "./task";
import { User } from "./user";
class Authenticated extends Compone... |
function Spawner() {
this.frame = 0
this.threshold = 220
this.toughness = 1
this.bossMode = false
this.speed = 1
}
Spawner.prototype.physics = function() {
if (!this.bossMode && this.frame % 90 === 0) {
this.spawn()
}
this.frame++
if(this.frame % 800 === 0) {
this.toughness++
this.speed... |
import { expect } from 'chai'
import { clean, runMocha } from '../helper'
describe('Test Id', () => {
beforeEach(clean)
it('should add testId to test cases', () => {
return runMocha(['testId']).then(results => {
expect(results).to.have.lengthOf(1)
const result = results[0]
... |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModu... |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("node_modules/codemirror/lib/codemirror.js"), require("node_modules/codemirror/mode/... |
var http = require('http');
var sys = require('sys');
var fs = require('fs');
http.createServer(function(req, res) {
debugHeaders(req);
if (req.headers.accept && req.headers.accept === 'text/event-stream') {
if (req.url === 'https://api.spark.io/v1/events/motion-detected?access_token=5a4501e8e5d6ab780731274e0... |
'use strict';
var gulp = require('gulp'),
karma = require('karma').server,
open = require('open'),
plugins = require('gulp-load-plugins')();
plugins.connect = require('gulp-connect');
plugins.useref = require('gulp-useref');
gulp.task('build', ['html', 'images']);
gulp.task('clean', function () {
retu... |
var lastOpenedInfo = null;
// Processing
var runProcess = function() {
var now = new Date();
$.ajax({
url: "https://docs.google.com/spreadsheet/pub",
data: {
key: localStorage["spreadsheet-key"],
output: "txt"
},
method: "GET",
dataType: "text",
... |
(function (angular, noty) {
"use strict";
angular.module('ClassStyleModule', ['myApp', 'ngRoute'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/classStyle', {
templateUrl: 'classStyle/show.html',
controller: 'ClassStyleController',
resolve: {
... |
/*
Copyright (c) 2010 Till Theis, http://www.tilltheis.de
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,... |
'use strict';
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _createReactClass = require('create-react-class');
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _... |
wm.Event = (function () {
'use strict';
let Event = function (name) {
this.name = name;
this.callbacks = [];
}
Event.prototype.registerCallback = function (callback) {
this.callbacks.push(callback);
}
return Event;
})();
|
var Greeter = (function () {
function Greeter(element) {
this.element = element;
}
Greeter.prototype.greet = function (msg) {
this.element.innerHTML = msg.greeting;
};
return Greeter;
}());
|
// @flow
import {createSelector} from 'reselect'
import type {Middleware} from 'redux'
import type {Features, ComposeMiddleware} from './index'
import {defaultComposeMiddleware} from './defaults'
export default function featureMiddlewaresMiddleware<S, A: {type: $Subtype<string>}>(
config?: {
getFeatures?: (sta... |
var _; //globals
/* This section uses a functional extension known as Underscore.js - http://documentcloud.github.com/underscore/
"Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support
that you would expect in Prototype.js (or Ruby), but without extend... |
/*
* ORE - Online Roguelike Engine
*
* Copyright (C) 2016 Mark Purser
* Released under the MIT license
* http://github.com/markpurser/ORE/LICENSE
*
* Tile rendering based on
* https://github.com/jice-nospam/yendor.ts
* Copyright (c) 2014 Jice
*/
/**
* @module ORE
*/
this.ORE = this.ORE || {};
(function () {
ORE... |
four51.app.directive('navigation', function() {
var obj = {
restrict: 'E',
templateUrl: 'partials/controls/nav.html',
controller: 'NavCtrl'
}
return obj;
});
four51.app.directive('accountnavigation', function() {
var obj = {
restrict: 'E',
templateUrl: 'partials/controls/accountnav.html',
... |
/*
* Kendo UI v2015.1.408 (http://www.telerik.com/kendo-ui)
* Copyright 2015 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial licen... |
// Generated by CoffeeScript 1.9.1
exports.MSGBYPAGE = 30;
exports.LIMIT_DESTROY = 200;
exports.LIMIT_UPDATE = 30;
exports.CONCURRENT_DESTROY = 1;
exports.FETCH_AT_ONCE = 10000;
exports.LIMIT_BY_BOX = 1000;
exports.REFRESH_INTERVAL = 300000;
|
/* */
"format cjs";
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.0-master-0d7fbad
*/
!function(n,e,i){"use strict";function t(n,e){return["$mdUtil","$window",function(i,t){return{restrict:"A",multiElement:!0,link:function(o,r,a){var d=o.$on("$md-resize-enable",function... |
import Ember from 'ember';
export default Ember.Controller.extend({
/**
Text for 'flexberry-togggler' component 'caption' property.
@property caption
@type String
*/
caption: '',
/**
Text for inner 'flexberry-togggler' component 'caption' property.
@property innerCaption
@type Strin... |
'use strict';
// user-model.js - A mongoose model
//
// See http://mongoosejs.com/docs/models.html
// for more of what you can do here.
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const userSchema = new Schema({
facebookId: { type: String },
facebook: { type: Schema.Types.Mixed },
git... |
angular.module('F1FeederApp.controllers', []).
controller('driversController', function($scope, ergastAPIservice) {
$scope.nameFilter = null;
$scope.driversList = [];
$scope.searchFilter = function (driver) {
var keyword = new RegExp($scope.nameFilter, 'i');
return !$scope.nameFilter || keyword... |
([
function(module, exports, __webpack_require__) {
__webpack_require__(2);
__webpack_require__(1);
(function(angular) {
(module.exports['myModule'] = angular.module('myModule', ['component', 'component.two']));
}.call(exports, __webpack_require__(3)))
},
function(module, exports, __webpack_require__) {
... |
var searchData=
[
['rightchild',['RightChild',['../struct_tree_1_1_node.html#ab9ca9f558858f48a2f6890f5024936f0',1,'Tree::Node']]],
['root',['Root',['../struct_tree.html#ac67db90bca69fd1b4275fafa11ea23ed',1,'Tree']]]
];
|
'use strict';
Connector.playerSelector = '#player-core';
Connector.artistSelector = '#artist';
Connector.trackSelector = '#title';
Connector.getTrackArt = () => $('#player-current-song').attr('rel');
|
import CoverageBar from './components/coverage-bar.js';
import DashboardController from './controllers/controller.js';
import PieChart from './directives/pie-chart.js';
import Project from './factory/project.js';
import ProjectStore from './services/project-status.js';
import StatusBar from './components/status-bar.js'... |
module.exports = function (req, res) {
var keystone = req.keystone;
if (!keystone.security.csrf.validate(req)) {
return res.apiError(403, 'invalid csrf');
}
req.list.model.findById(req.params.id, function (err, item) {
if (err) return res.status(500).json({ error: 'database error', detail: err });
if (!item) ... |
'use strict';
// const webpack = require('webpack');
const NgAnnotatePlugin = require('ng-annotate-webpack-plugin');
module.exports = function(grunt) {
grunt.config('express.dist', {
options: {
script : '<%= paths.dist.server %>/bin/web.js',
debug : true
}
});
grunt.config('webpa... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
SyncedCron.options = {
log: false,
collectionName: 'cronHistory',
utc: false,
collectionTTL: 172800
}
defaultFrequency = 7; // once a week
defaultTime = '00:00';
var getSchedule = function (parser) {
var frequency = getSetting('newsletterFrequency', defaultFrequency);
var recur = parser.recur();
var sch... |
var afterLogout = null;
Accounts.afterLogout = function(func) {
if (afterLogout) {
throw new Error("Can only call afterLogout once");
} else {
return afterLogout = func;
}
};
var oldLogoutMethod = Meteor.server.method_handlers.logout;
delete Meteor.server.method_handlers.logout;
Meteor.methods({
logo... |
angular.module('playlytics')
.factory('playlistFactory', ['$localStorage', '$state', function ($localStorage, $state){
var storage = $localStorage.$default({myPlaylists: {}})
var createPlaylist = function(playlist) {
if (storage.myPlaylists[playlist]) {
alert("this playlist already exists")
} else ... |
export const containsString = (substring, stringArray = []) => {
let matches = false;
stringArray.forEach((_string) => {
if (substring.includes(_string)) matches = true;
});
return matches;
};
export default { containsString };
|
let webpack = require('webpack');
let path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
output: {
path: path.resolve(__dirname, '../dist'),
filename: 'js/[name].js',
publicPath: '/'
},
resolve: {
modules: [
path.join(__dirname, '../src'),... |
'use strict';
var net = require('net');
var EventEmitter = require('eventemitter3');
exports.run = function () {
var run = require('../../run');
return {
ready: run.ready,
stop: function (test) {
run.stop(function (stopped) {
test.ok(stopped);
});
... |
/**
* This unit test file was auto generated via a gulp task.
* Any formatting issues can be ignored
*/
'use strict';
var _ = require('lodash'),
expect = require('must'),
lodashCollectionHelpers = require('./lodash-collection-helpers-es5.min'),
bankUserInfoData = require('../test/bankUserInfo'),
userInfoData = ... |
/**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import GitRepo from 'git-repository';
import task from './lib/task';
// TODO: Update deployment URL
const remote = {
name: 'github',
url: 'https://github.com/patmo... |
$(document).on('click', '.dropdown-menu li a', function () {
document.getElementById("selected_album").innerHTML = $(this).text();
});
function selectAlbum() {
var album_id = event.target.value;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhtt... |
'use strict';
angular.module('myApp.view3', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/view3', {
templateUrl: 'view3/view3.html',
controller: 'View3Ctrl'
});
}])
.controller('View3Ctrl', function ($http, $scope) {
$scope.countries = [{
... |
var gulp = require('gulp'),
pug = require('gulp-pug'),
sass = require('gulp-sass'),
ts = require('gulp-typescript'),
shell = require('gulp-shell'),
webpack = require('webpack-stream')
var tsProject = ts.createProject('tsconfig.json')
var path = {
assets: ['app/assets/**/*'],
... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Transfer Schema
*/
var TransferSchema = new Schema({
destination: {
type: Schema.ObjectId,
ref: 'Station'
},
source: {
type: Schema.ObjectId,
ref: 'Station'
},
amount: {
... |
/*global define:true */
if (typeof define !== 'function') {
var define = require('amdefine')(module);
}
define(['./sprintf'], function (sprintf) {
'use strict';
function splitTrimFilterArgs(commaSepArgs) { //parse 'one, two' into ['one', 'two']
if (!commaSepArgs) return [];
return commaSepArgs.split(',... |
function OnRun($rootScope, AppSettings, xdLocalStorage) {
'ngInject';
xdLocalStorage.init({
iframeUrl:'http://www.agenciadigitala.local:80/cross-domain-storage/magical-frame.html'
}).then(function () {
console.log('Got iframe ready to site');
xdLocalStorage.getItem('privateToken').then(functio... |
define([
"../_base/config", "../_base/json", "../_base/kernel", /*===== "../_base/declare", =====*/ "../_base/lang",
"../_base/xhr", "../sniff", "../_base/window",
"../dom", "../dom-construct", "../query", "require", "../aspect", "../request/iframe"
], function(config, json, kernel, /*===== declare, =====*/ lang, xh... |
/*
=========================================================
Name: ImportHS6e
GitHub: https://github.com/eepjr24/ImportHS6e
Roll20 Contact: eepjr24
Version: 1.03
Last Update: 02/21/2022
=========================================================
Updates:
Removed Rolls section from par... |
/*
|--------------------------------------------------------------------------
| Browser-sync config file
|--------------------------------------------------------------------------
|
| For up-to-date information about the options:
| http://www.browsersync.io/docs/options/
|
| There are more options than you... |
const package = require('../../package.json')
module.exports = function(command) {
console.log('Translator version: ' + package.version)
}; |
$(document).ready(function () {
});
|
let num = 10;
console.log(num.toString()); // "10"
console.log(num.toString(2)); // "1010"
console.log(num.toString(8)); // "12"
console.log(num.toString(10)); // "10"
console.log(num.toString(16)); // "a"
|
import {combineReducers} from 'redux'
import {reducerCreator} from 'redux-amrc'
import counter from './counter'
const rootReducer = combineReducers({
async: reducerCreator(),
counter
})
export default rootReducer |
/**
* Autoplay Plugin
* @version 2.0.0-beta.3
* @author Bartosz Wojciechowski
* @author Artus Kolanowski
* @license The MIT License (MIT)
*/
;(function($, window, document, undefined) {
/**
* Creates the autoplay plugin.
* @class The Autoplay Plugin
* @param {Owl} scope - The Owl Carousel
*/
var Autopl... |
var React = require('react');
var immstruct = require('immstruct');
var Component = require('./component');
var data = immstruct({
name: 'root',
value: 1,
children: [
{
name: 'c-1',
value: 1
}, {
name: 'c-2',
value: 1,
children: [
{
name: 'c-2-1',
... |
var examples = [{
title: 'Data list',
code: function() {
var table = new jsTable(data);
return table;
}
}, {
title: 'name ~ *l* or age > 20',
code: function() {
var table = new jsTable(data);
return table
.find(jsTable.or().regexp('name', /l/).greaterThan('age', 20));
}
}, {
title: 'nam... |
'use strict';
const createRouter = require('@arangodb/foxx/router');
const router = createRouter();
module.context.use(router);
router.get('/hello-world', function (req, res) {
res.send('Hello from volpe 0.1, a simple shortest-path implementation');
})
.response(['text/plain'], 'A generic greeting')
.summary('Gener... |
//**************************************************************************** */
// Node.js 代码
// Promise life cycle
// pending
// Fulfilled
// Rejected
const fs = require('fs');
function readFile(filename) {
return new Promise((resolve, reject) => {
// 触发异步任务
fs.readFile(filename, { encoding: 'utf-8' }, (... |
/**
* Created by jms on 07-16-16.
*/
$(function () {
var processURL = function () {
var long_url = $('.ui.form').form('get value', 'long_url');
console.info('validation passed, %s', long_url);
$.ajax({
url: '/process_url',
method: 'POST',
contentType: "... |
(function() {
'use strict';
angular.module('mobile-bazaar.about')
.service('SettingsService', SettingsService);
SettingsService.$inject = ['$http'];
function SettingsService($http) {
var APIURL = 'http://localhost:28469/api/settings';
return {
getSettings: getSettings
};
... |
'use strict';
var should = require('should'),
request = require('supertest'),
app = require('../../server'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Callback = mongoose.model('Callback'),
agent = request.agent(app);
/**
* Globals
*/
var credentials, user, callback;
/**
* Callback rout... |
var Sprite = require('../spritesheet/Sprite');
//▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
function NineSlice(asset, w, h) {
// 9-slice sprites
//
// 0 w w+1 asset.width
// 0 ┌───┬─────────┬───┐
// │ A │ B | C │
// ... |
import koa from 'koa'
import mount from 'koa-mount'
import helmet from 'koa-helmet'
import logger from 'koa-logger'
import responseTime from 'koa-response-time'
import session from 'koa-generic-session'
import level from 'levelup'
import store from 'koa-level'
import staticCache from 'koa-static-cache'
import cors from... |
const chai = require('chai');
const sinon = require('sinon');
const lab = require('lab').script();
const fn = require('../../../web/lib/plugins/good');
const expect = chai.expect;
exports.lab = lab;
lab.describe('good', () => {
lab.test('should set up local logging', done => {
process.env.HAPI_DEBUG = 'true';
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var ic_publish = exports.ic_publish = { "viewBox": "0 0 24 24", "children": [{ "name": "path", "attribs": { "d": "M5 4v2h14V4H5zm0 10h4v6h6v-6h4l-7-7-7 7z" } }] }; |
/**
* Created using Slot Framework
* Object model that represents the main Slot
*/
function main() {
this.userName = "";
this.userNumber = "";
}
main.create = function() { return new main(); }
main.prototype.layout = function() { return page.layouts["main"]; }
main.prototype.bind = function(json) {... |
var expect = require('chai').expect // assertion library
, superagent = require('superagent') // small progressive client-side HTTP request library
, sinon = require('sinon') // stubs and mocks
//, mongoose = require('mongoose') // mongodb abstaction
, cheerio = require('cheerio') // to parse fetched DOM data
,... |
/**
* @ignore
* Component.Extension.Align
* @author yiminghe@gmail.com, qiaohua@taobao.com
*/
KISSY.add(function (S, require) {
var Node = require('node');
var win = S.Env.host,
$ = Node.all,
UA = S.UA;
// http://yiminghe.iteye.com/blog/1124720
/**
* @ignore
* 得到会导致元素显示不... |
import Vue from 'vue';
import iView from 'iview';
import VueRouter from 'vue-router';
import router from './router';
import store from './store';
import Vuex from 'vuex';
import { docTitle } from './plugins/utils/assist';
import SissTab from './components/tabs';
import SissCombo from './components/combo';
import SissCo... |
import React from 'react'
const Search = () => {
return (
<div id="search" className="pure-u-2-3 center">
<input name="search" type="text" placeholder="suchen ..." required />
</div>
)
};
export default Search;
|
'use strict';
(function() {
// Needs Controller Spec
describe('Needs Controller Tests', function() {
// Initialize global variables
var NeedsController,
scope,
$httpBackend,
$stateParams,
$location;
// The $resource service augments the response object with methods for updating and deleting the resour... |
(function(window, document, undefined) {
// Capitalises a string
// Accepts:
// str: string
// Returns:
// string
var majusculeFirst = function(str) {
return str.charAt(0).toUpperCase() + str.substring(1);
};
// Usage:
// var data = { 'first name': 'George', 'last name': 'Jetson', 'age': 1... |
import React, { Component } from 'react';
import { Link } from 'react-router';
export class Login extends Component{
render(){
return(<div className="login-container">
<div className="login-form">
<div className="form-title">Login</div>
<div className="line"></d... |
angular.module('todoService', [])
.factory('Todos', ['$http',function($http) {
return {
get : function() {
return $http.get('/api/todos');
},
create : function(todoData) {
return $http.post('/api/todos', todoData);
},
delete : function(id) {
return $http.delete('/api/todos/' + id);
}
... |
function shadeBlend(p, c0, c1) {
var n = p < 0 ? p * -1 : p, u = Math.round, w = parseInt;
if (c0.length > 7) {
var f = c0.split(","), t = (c1 ? c1 : p < 0 ? "rgb(0,0,0)" : "rgb(255,255,255)").split(","), R = w(f[0].slice(4)), G = w(f[1]), B = w(f[2]);
return "rgb(" + (u((w(t[0].slice(4)) - R) * n) + R) + "... |
/**
* Created by khuongdt on 11/12/2015.
*/
goog.provide('bigfox.example.ChatHandler');
goog.require('goog.log');
goog.require('goog.events');
goog.require('goog.events.EventTarget');
goog.require('bigfox.core.base.BaseMessage');
goog.require('bigfox.core.base.MessageIn');
goog.require('bigfox.core.base.MessageOu... |
/*!
Bootstrap integration for DataTables' SearchPanes
©2016 SpryMedia Ltd - datatables.net/license
*/
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-searchpanes"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,c)... |
var _ = require('lodash');
var Store = require('./Store');
var DebugStore = require('./debug/DebugStore');
var DebugActions = require('./debug/DebugActions');
var RegisteredStore = _.assign({}, Store, {
name: '',
/**
* Fetch an object of data to display on the debug output
*/
getDebugData: functi... |
// Copyright 2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this li... |
var mlcl_forms = angular.module('mlcl_forms')
.directive('selectObjectids', ['$http', 'configService', function($http, configService) {
return {
scope: {
model: '=widgetmodel',
fieldinfo: '=',
selected: "="
},
restrict: 'E',
templateUrl: 'widgetDirectives/selectObjectids/selectObject... |
import _ from 'lodash';
import Component from '../_classes/component/Component';
import ComponentModal from '../_classes/componentModal/ComponentModal';
import EventEmitter from 'eventemitter3';
import NativePromise from 'native-promise-only';
import {
isMongoId,
eachComponent,
getStringFromComponentPath,
getAr... |
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/*!
* Next JS
* Copyright (c)2011 Xenophy.CO.,LTD All rights Reserved.
* http://www.xenophy.com
*/
// {{{ NX.smtp.Response.close
module.exports = function() {
};
// }}}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* c-hanging-commen... |
// local imports
import calculateResponsiveState from 'actions/creators/calculateResponsiveState'
import CALCULATE_RESPONSIVE_STATE from 'actions/types/CALCULATE_RESPONSIVE_STATE'
describe('calculateResponsiveState', function () {
it('returns action object with correct type when no arg passed', function () {
... |
module.exports = {
assetPrefix: process.env.NODE_ENV === 'production' ? '/react-dat-gui' : ''
};
|
// python Template for the preamble
var preamble = (basis,classname)=>
`"""3D Projective Geometric Algebra.
Written by a generator written by enki.
"""
__author__ = \'Enki\'
import math
class ${classname}:
def __init__(self, value=0, index=0):
"""Initiate a new ${classname}.
Optional, ... |
const path = require('path');
const rootDir = path.resolve('./');
module.exports = {
entry: {
bundle: rootDir + '/js/main.js',
},
output: {
filename: '[name].js',
path: rootDir + '/public'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules)/,
use: {
... |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* [description]
*
* @function Phaser.Geom.Polygon.Reverse
* @since 3.0.0
*
* @generic {Phaser.Ge... |
define("cool/controls/numberSlider",
[
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/_base/array",
"cool/controls/_control",
"dijit/form/HorizontalSlider",
'dijit/_TemplatedMixin',
'dijit/_WidgetsInTemplateMixin',
"dojo/text!./templates/numberSlider.html"
], function(declare, lang, a... |
define([
'jquery',
'underscore',
'global',
'backbone'
], function(
$,
_,
global,
Backbone
){
"use strict";
var SingleModel = Backbone.Model.extend({
MODEL_READY: 'model:ready',
initialize:function(){
_.bindAll(this,
'onFetchSuccess'
);
},
fetch :... |
import extend from 'tui-code-snippet/object/extend';
import forEach from 'tui-code-snippet/collection/forEach';
import style from '@/ui/template/style';
import standardTheme from '@/ui/theme/standard';
import { styleLoad } from '@/util';
import icon from '@svg/default.svg';
/**
* Theme manager
* @class
* @param {O... |
var zom = require('./zomato-data');
exports.webhookRoutes = function(router){
router.get('/get-zomato-data', zom.getData);
}; |
import { combineReducers } from 'redux';
import { titleReducer } from 'redux-title'
import todos from './todos';
import visibilityFilter from './visibilityFilter';
import counter from './counter';
import intl from './intl';
import navigation from './navigation';
import filterNav from './filterNav';
import appSt... |
/**
* Module dependencies.
*/
var request = require('superagent');
var jquery = require('cheerio').load;
/**
* Expose `parse`.
*/
module.exports = parse;
/**
* Parse wiki `url` and invoke `fn(err, pkgs)`.
*
* @param {String} url
* @param {Function} fn
* @api public
*/
function parse(url, fn) {
request... |
/**
* @license Highstock JS v8.1.2 (2020-06-16)
*
* Indicator series type for Highstock
*
* (c) 2010-2019 Sebastian Bochan
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.e... |
var
http = require('http'),
fs = require('fs');
http.createServer(function(req, res){
fs.readFile(__dirname + '/public/hello.txt', 'utf-8', function (err, data){
if(err){
res.writeHead(404, {'Content-Type': 'text/plain'});
res.end(fileContents);
return;
}
res.writeHead(200,... |
'use strict';
// @ngInject
let MapImageService = function($http) {
let self = this;
this.archive = 'https://api.npolar.no/map/archive';
this.base = 'https://api.npolar.no/map/archive-jpeg';
this.basename = function(filename) {
return filename.split(/\..*$/)[0];
};
this.filename = function(uri) {
... |
var pkg = require('../package'),
schema = require('../settings-schema'),
properties = schema.properties,
markdown = [],
fs = require('fs');
function setDefault(setting) {
let settingDefault = '**default:** ';
if (setting.default === undefined && !setting.defaultObject) {
settingDefault... |
'use strict';
function Customers (stripe) {
this.addSources = (identity, customer) => {
const cards = stripe.store.findCards(identity, {
customer: customer.id,
id: customer.default_source,
}).sort((a, b) => {
if (a.id === customer.default_source) {
return -1;
} else if (b.id =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.