code
stringlengths
2
1.05M
var on = require('emmy/on'); var off = require('emmy/off'); module.exports = Sticky; /** * @constructor */ function Sticky(el, options){ if (el.getAttribute('data-sticky-id') === undefined) { return console.log('Sticky already exist'); } this.el = el; this.parent = this.el.parentNode; //recognize attribute...
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["VueBootfy"] = factory(); else root["Vue...
import React from 'react'; import AlertPageContent from '../common/AlertPageContent'; export default () => ( <AlertPageContent imgSrc={require('../assets/img/illustrations/no-active-plan.svg')} headline="No active subscription" message={`Oh no! Your subscription has expired. Simply upgrade your account f...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _toolbar = require('./components/toolbar'); var _toolbar2 = _interopRequireDefault(_toolbar); var _item = require('./components/item'); var _item2 = _interopRequireDefault(_item); var _button = require('./components/items/button'); ...
// takes an array of objects that look like this: {action: ..., time: ...} // action is a function with no arguments; time is the time after the start that the action should run, in ms // this can be used for audio sequences, for example function Sequence(actions) { this.actions = actions.sort(function (a, b) {return ...
/** * @author jianzhe.ding * @homepage https://github.com/discipled/ * @since 2016-07-07 17:36 */ ;(function (angular, undefined) { 'use strict'; angular .module('app', ['ccms.components']) .controller('ctrl', function ($scope) { $scope.demo = { value: 'a', setting: ['a', 'b', 'c'], disable...
var React = require('react'); var ReactPropTypes = React.PropTypes; var MovieResult = React.createClass({ propTypes: { value: ReactPropTypes.number.isRequired, label: ReactPropTypes.string.isRequired }, render: function() { return ( <option value={this.props.value}>{this.props.label}</opti...
(function() { 'use strict'; angular .module('artemisApp') .controller('ProgrammingExerciseDeleteController',ProgrammingExerciseDeleteController); ProgrammingExerciseDeleteController.$inject = ['$uibModalInstance', 'entity', 'ProgrammingExercise']; function ProgrammingExerciseDeleteCon...
var WebpackDevServer = require('webpack-dev-server'); var webpack = require('webpack'); var config = require('./webpack.config'); var server = new WebpackDevServer(webpack(Object.assign(config, { devtool: "#eval-source-map" })), { publicPath: config.output.publicPath, hot : true, stats: { ...
angular .module('admin.controllers.state2', []) .controller('State2Ctrl', [ '$scope', function($scope) { $scope.message = "Here's a state 2 message from the controller"; } ]) ;
export const rootUrl = 'http://smktesting.herokuapp.com/'; const apiUrl = `${rootUrl}api/`; const headers = new Headers(); headers.append('Content-Type', 'application/json'); class Api { static getProducts() { const option = { method: 'GET', }; return fetch(`${apiUrl}products/`, option) .th...
'use strict' const Controller = require('trails-controller') const GeoJSON = require('geojson'); /** * @module InputOutputController * @description Controller . */ module.exports = class InputOutputController extends Controller { exports(request, reply) { // Recuperar projecte const FootprintService = t...
/** * @file mip-tiebaobei-listfixcall 组件 * @author weiss */ define(function (require) { var customElement = require('customElement').create(); var $ = require('zepto'); customElement.prototype.firstInviewCallback = function () { // var urlHost = window.location.host; var ele = $(this.ele...
/* @flow weak */ var inflector = require('./utils/inflector'); var merge = require('./utils/merge'); var Relation = function(parent, relation) { this.parent = parent; this.relation = relation; this.namespace = inflector.pluralize(relation); this.store = parent.store; }; merge(Relation.prototype, ...
module.exports = { mailgun_api_key: "key-xxxxxxxxxxxxxxxxxxxxxxxxxxxx", mail_domain: "mail.example.com", slack_bot_key: "xoxb-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxx", app_port: 3000, agents:[ { name:"slack username", id:false // Keep this false, will autoload upon start ...
import * as types from '../constants/ActionTypes'; // export function addFriend(name) { // return { // type: types.ADD_FRIEND, // name // }; // } // export function deleteFriend(id) { // return { // type: types.DELETE_FRIEND, // id // }; // } export function selectRecipient(id) { return { ...
var FN = FN || {}; FN.dbesy0_ctx = { nty0: 0, xsml: 0.0, by0cs: [-0.1127783939286557321793980546028E-1, -0.1283452375604203460480884531838E+0, -0.1043788479979424936581762276618E+0, +0.2366274918396969540924159264613E-1, -0.2090391647700486239196223950342E-2, +0.1039754539390572520999246576381E-3, -0.33697...
'use strict'; // The actual option data. var data = {}; // Get or set an option value. var option = module.exports = function(key, value) { var no = key.match(/^no-(.+)$/); if (arguments.length === 2) { return (data[key] = value); } else if (no) { return data[no[1]] === false; } else { ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /*--------------------------------------------------------------------------------------------- * Copyright (c) Red Hat, Inc. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license informatio...
/** * Testing our link component */ import React from 'react'; import { shallow } from 'enzyme'; import A from '../index'; const href = 'http://mxstbr.com/'; const children = <h1>Test</h1>; const renderComponent = (props = {}) => shallow( <A href={href} {...props}> {children} </A>, ); describe('...
var exec = require('child_process').exec; var EventEmitter = require('events').EventEmitter; var util = require('util'); var os = require('os-utils'); var async = require('async'); function Monitor(options){ this.options = options || { delay:1000, interval:5000 } } util.inherits(Monitor, EventEmitter); Monit...
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 = Reflect.decorate(d...
var fs = require('fs') , lev = require('levenshtein') , csv = require('csv') , path = require('path') , http = require('http') , injector = require('injector'); module.exports = function(Service, Promise, async, config, _) { var csvConfig = config['clever-csv']; ...
/** * Dependencies */ var slug = require('slugg'); module.exports.commands = { slug: function(args, done) { done(null, slug(args.join(' '))); } };
var gulp = require('gulp'), plumber = require('gulp-plumber'), rename = require('gulp-rename'); var autoprefixer = require('gulp-autoprefixer'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var imagemin = require('gulp-imagemin'), cache = require('gulp-cache'); var minifycss = r...
#!/usr/bin/env node const {argv} = require('yargs') .usage('$0 [options] <assetsFolder>') .demand(1) .env('CDN_UPLOADER') .option('app-prefix', { alias: 'a', describe: 'Application prefix used in the CDN url', demand: true, type: 'string', }) .option('key-filenam...
module.exports = { dbConnection: process.env.dbConnection, googleMapsClientKey: process.env.googleMapsClientKey, facebookConfig: { appId: process.env.facebookConfigAppId, secret: process.env.facebookConfigSecret }, jwtSecret: process.env.jwtSecret };
'use strict'; var AppSettings = { appTitle: 'JS Competency Test', apiUrl: 'http://api.football-data.org/alpha', apiKey: '356bb8a3c0f24df6bccb758b2afe457f' }; module.exports = AppSettings;
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React, { PropTypes } from 'react'; import withSt...
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M5.83 3H21v2l-6.2 6.97L9.83 7h6.74l1.78-2H7.83l-2-2zm13.95 19.61L18 20.83V21H6v-2h5v-5l-1.37-1.54-8.24-8.24L2.8 2.81 3 3l18.19 18.19-1.41 1.42zM16.17 19L13 15.83V19h3.17z" /> , 'NoDrinks');
define('CartBtn', ['Element', 'Elements', 'Ajax', 'FormData', 'Cart', 'CartTable'], function ($, $$, $http, $form, $cart, $ct) { 'use strict'; var api = ContextPath + '/api/cart'; function addToCart(number) { var form = $form(); var request; form.append...
'use strict'; /** * Module Dependencies */ var fs = require('fs'); // http://nodejs.org/docs/v0.10.25/api/fs.html var io = require('socket.io'); // https://www.npmjs.org/package/socket.io var pkg = require('./package.json'); // Get...
import LoaderBase from './loader-base'; export default class TriangleSkewSpin extends LoaderBase { divCount = 1; class = 'triangle-skew-spin'; }
function couchapp_load(scripts) { for (var i=0; i < scripts.length; i++) { document.write('<script src="'+scripts[i]+'"><\/script>') }; }; couchapp_load([ "/_utils/script/sha1.js", "/_utils/script/json2.js", "/_utils/script/jquery.js", "/_utils/script/jquery.couch.js", "vendor/couchapp/jquery.couch....
import { bruker } from 'bruker-data-test'; import Jszip from 'jszip'; import { extractFilePaths, extractSingleSpectrumZip, } from '../util/extractSingleSpectrumZip'; const file1 = [ 'cyclosporin_1h/', 'cyclosporin_1h/1/', 'cyclosporin_1h/1/acqu', 'cyclosporin_1h/1/audita.txt', 'cyclosporin_1h/1/cyclospo...
/** * @author alteredq / http://alteredqualia.com/ */ THREE.Points = function ( geometry, material ) { THREE.Object3D.call( this ); this.type = 'Points'; this.geometry = geometry !== undefined ? geometry : new THREE.Geometry(); this.material = material !== undefined ? material : new THREE.PointsMaterial( { co...
;(function($){ /** * jqGrid English Translation * Tony Tomov tony@trirand.com * http://trirand.com/blog/ * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html **/ $.jgrid = $.jgrid || {}; $.extend($.jgrid,{ defaults...
angular.module('ngFabForm') .directive('form', function ($compile, $timeout, ngFabForm) { 'use strict'; // HELPER VARIABLES var formNames = []; // HELPER FUNCTIONS function preventFormSubmit(ev) { ev.preventDefault(); ev.stopPropagation(...
/*jshint esversion: 6 */ import { Template } from 'meteor/templating'; import './email.html'; import { attsToggleInvalidClass } from '../../utilities/attsToggleInvalidClass.js'; Template.afInputEmail_materialize.helpers({ atts: attsToggleInvalidClass });
webpackJsonp([9],{ /***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}],\"es2015\",\"stage-2\"]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/views/dashboard/user/...
var searchData= [ ['game_5fof_5flife',['game_of_life',['../md__r_e_a_d_m_e.html',1,'']]] ];
$(document).ready(function() { var do_search = function(e){ e.preventDefault(); var search_query = $input.val(); if(search_query.length <= 3) return false; $error_message.hide(); $.getJSON('/search/' + search_query) .done(function(data){ // $fums_container.html(data.fums); ...
/** * @file Webpack configuration file for production. */ const webpack = require('webpack'); const TerserWebpackPlugin = require('terser-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const StyleLintPlugin = require('stylelint-bare-webpack-plugin'); const ManifestPlugin = require...
const express = require('express'); const router = express.Router(); const indexController = require('../controllers/index'); const bcrypt = require('bcryptjs'); const salt = bcrypt.genSaltSync(10); const knex = require('../db/knex'); const existingUser = require('../auth/init').existingUser; router.get('/', function ...
/* ** JSONML helper methods - http://www.jsonml.org/ ** ** This provides the `JSONML` object, which contains helper ** methods for rendering JSONML to HTML. ** ** Note that the tag ! is taken to mean comment, this is however ** not specified in the JSONML spec. */ const singletons = require('./html').singletons; // d...
var searchData= [ ['parserdelegate',['ParserDelegate',['../structpegmatite_1_1_parser_delegate.html',1,'pegmatite']]], ['parserposition',['ParserPosition',['../structpegmatite_1_1_parser_position.html',1,'pegmatite']]] ];
/* Rarebit certificate superclass */ var Rarebit = {}; /* Create a certificate instance, optionally sign it clientContent is any client data, will be JSON.stringified */ Rarebit.createCertificate = function( clientContent, priv ) { var c = new Rarebit.Certificate(); c.init( clientContent ); if (priv) c.sig...
'use strict'; let Service; let Characteristic; let CBusLightAccessory; let uuid; const chalk = require('chalk'); const ms = require('ms'); const cbusUtils = require('../lib/cbus-utils.js'); const FILE_ID = cbusUtils.extractIdentifierFromFileName(__filename); module.exports = function (_service, _characteristic, _...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _NodeList = require('./NodeList.js'); var _NodeList2 = _interopRequireDefault(_NodeList); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = { props: { con...
$(function() { var postsLoaded = false; $.ajax({ method: 'get', url: '/feed/', dataType: 'json', success: function(result) { for (var i = 0; i < result.posts.length; i++) { $(getPost(result.posts[i])).appendTo('.posts'); } ...
'use strict'; describe('myApp.albums module', function() { beforeEach(module('myApp.albums')); describe('album controller', function(){ it('should be defined', inject(function($controller) { //spec body var albumCtrl = $controller('AlbumCtrl'); expect(albumCtrl).toBeDefined(); })); ...
'use strict' const React = require('react'); const Profile = React.createClass({ render : function() { return ( <div className="ui segment profile"> <div className="ui grid"> <div className="six wide column"> <div className="ui card"> <div className="image"> ...
var Item = Backbone.Model.extend({ defaults:{ id_todo: '', title: '', column: '', //tags: [], color: '' } }); var Box = Backbone.Model.extend({ defaults:{ name: "" } });
import { Schema, arrayOf, normalize } from 'normalizr' import { camelizeKeys } from 'humps' import 'isomorphic-fetch' import { fromPromiseFactory } from '../../../lib' // Extracts the next page URL from Github API response. function getNextPageUrl(response) { const link = response.headers.get('link') if (!link) { ...
/* global require, process, Buffer, module */ 'use strict'; var fs = require("fs"); var path = require("path"); var join = path.join; var crypto = require("crypto"); var RSA = require('node-rsa'); var wrench = require("wrench"); var archiver = require("archiver"); var Promise = require('es6-promise').Promise; var temp...
'use strict'; var path = require('path') , basename = path.basename(__filename, '.js') , debug = require('debug')('castor:authorization:' + basename) ; module.exports = function(options) { options = options || {}; return function (req, authorize) { if (Object.keys(req.headers).length === 2 && req.header...
//应用集群扩展 const cluster = require('cluster'); function startWorker(){ let worker = cluster.fork(); console.log(`CLUSTER:worker ${worker.id} strated`); } if(cluster.isMaster){ require('os').cpus().forEach(()=>{ startWorker(); }) cluster.on('disconnect',(worker)=>{ console.log(`CLUSTER:worker ${worker.id} discon...
var Thermostat = function() { this.targetTemperature = 20; this.maxTempOn = 25; this.maxTempOff = 32; this.minTemp = 10; this.powerSave = true; this.increment = 1; this.defaultTemperature = 20; }; Thermostat.prototype.temperature = function() { return this.targetTemperature; }; Thermostat.prototy...
'use strict'; angular.module('myApp') .controller('TrasvasecajaController', ['$scope', '$timeout', '$modal', '$rootScope', '$stateParams', 'ValidaService', 'ConsultaService', 'MessageService', 'sharedProperties', function ($scope, $timeout, $modal, $rootScope, $stateParams, ValidaService, Consu...
import { subtract } from '../dist/subtract' describe( 'subtract', () => { it('subtracts two numbers', () => { expect( subtract(3,2) ).toEqual(1) }) it('returns NaN if input is null or undefined', () => { expect( subtract( '' ) ).toEqual(NaN) }) })
/** * @module gulp-natron * test */ import chai from "chai"; import chaiAsPromised from "chai-as-promised"; let {assert} = chai; chai.use(chaiAsPromised); Object.assign(global, { assert, });
//usage <div style={show(true)} /> export function show(condition) { return condition ? {} : {display: 'none'}; } //usage <div {...showStyle(true)} /> export function showStyle(condition){ return {style: show(condition)}; }
import React, { Component } from 'react'; import styles from './ExtraMenu.extra.css'; import withStyles from '../../decorators/withStyles'; import {toggleSnowing, toggleTilting} from '../../actions'; @withStyles(styles) class ExtraMenu extends Component { toggleFunction(func, e) { func(); e.preventDefault()...
if (typeof jQuery === "undefined") { throw new Error("jQuery plugins need to be before this file"); } $.AdminBSB = {}; $.AdminBSB.options = { colors: { red: '#F44336', pink: '#E91E63', purple: '#9C27B0', deepPurple: '#673AB7', indigo: '#3F51B5', blue:...
export default class BestBuyWebService{ constructor(){ this.url =""; this.apiKey = ""; this.productData = null; this.products = null; } getData(theApp){ // theApp is a reference to the main app // we can pass information to it, including data // tha...
describe('Date', function() { beforeEach(function() { this.day = 4; this.month = 10; this.dateMonth = this.month; this.dateDay = this.day; this.buildDate = function() { this.date = new Date(2017, this.dateMonth, this.dateDay); }; this.buildSubject = function() { return this.su...
(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports...
Function.prototype.bind = function(scope) { var _function = this; return function() { return _function.apply(scope, arguments); } } localcache = {}; localcache.clear = function () { for (var i in localStorage) { if (i.indexOf("cached-") == 0) { localStorage.removeItem(i); } } }; localc...
(function(angular) { 'use strict'; angular .module('ExampleApp') .directive('transferActivity', TransferActivityDirective); function TransferActivityDirective() { return { bindToController: true, controller: function() {}, controllerAs: '$ctrl', restrict: 'E', scope: { transfer: "=activity...
'use strict'; module.exports = { set: function (v) { this.setProperty('border-bottom-width', v); }, get: function () { return this.getPropertyValue('border-bottom-width'); }, enumerable: true };
/*************************************************************************** * Copyright (C) 2007 by Vladimir Kadalashvili * * Vladimir.Kadalashvili@gmail.com * * ...
define(function (require) { return { notEmpty: require('./validators/notEmpty'), notNull: require('./validators/notNull'), email: require('./validators/email') } });
//!! FunctionAlias creates a type alias for Function, which is used in base.js //!! This test checks that that alias is emitted in a valid format in the goog //!! namespace goog.provide('partial.FunctionAlias'); /** * @typedef {function(number, number)} */ partial.FunctionType1; /** * @typedef {function(string, str...
module.exports = { scripts: { //'transition': true, //'alert': true, //'button': true, //'carousel': true, //'collapse': true, //'dropdown': true, //'modal': true, //'tooltip': true, //'popover': true, //'scrollspy': true, //'ta...
$(document).ready(function() { $(window).scroll(function () { if ($(this).scrollTop() > 67) { $('.navbar').css({position:'fixed', top: 0, right: '133px'}); $('.social-icons').css({position:'fixed', top: '3px', right: '13px'}); } else{ $('.navbar').css({position: 'relative', top: '',...
var options = { appid: "amzn1.echo-sdk-ams.app.ENTER_YOUR_APP_ID_FOR_ECHO_HERE", host: "host_for_sonos_api", port: "5005" }; module.exports = options;
'use strict'; var React = require('react-native'); var MapboxGLMap = require('react-native-mapbox-gl'); var Icon = require('react-native-vector-icons/Ionicons'); var BackgroundGeolocation = require('react-native-background-geolocation'); var SettingsService = require('....
import { createSimpleTransition } from '../../util/helpers' const SlideXTransition = createSimpleTransition('slide-x-transition') const SlideXReverseTransition = createSimpleTransition('slide-x-reverse-transition') const SlideYTransition = createSimpleTransition('slide-y-transition') const SlideYReverseTransition = cr...
export default { // Generic "generic.add": "Toevoegen", "generic.cancel": "Annuleren", // BlockType "components.controls.blocktype.h1": "H1", "components.controls.blocktype.h2": "H2", "components.controls.blocktype.h3": "H3", "components.controls.blocktype.h4": "H4", "components.controls.blocktype.h5...
import { getOwner } from "@ember/application"; export default function (component) { return function (_, propertyName) { return { get() { const parts = component.split("/"); const componentName = parts.slice(1, parts.length).join("/"); if (this.args[propertyName]) { retur...
function each(els, fn) { for (var i = 0, len = (els || []).length, el; i < len; i++) { el = els[i] // return false -> remove current item during loop if (el != null && fn(el, i) === false) i-- } return els } function remAttr(dom, name) { dom.removeAttribute(name) } // max 2 from objects allowed f...
import { markdownToSlate } from '../../serializers'; const parser = markdownToSlate; describe('Compile markdown to Slate Raw AST', () => { it('should compile simple markdown', () => { const value = ` # H1 sweet body `; expect(parser(value)).toMatchInlineSnapshot(` Object { "nodes": Array [ Object { ...
'use strict'; var jellypromise = require('jellypromise/production'); require('../lib/run')(jellypromise);
var apiData = { "questions": [ { "id": 1, "type": "单选题", "content": "“三不动”安全制度第二点:对设备( )不清楚不动", "A": "性能、状态", "B": "性能、原理", "C": "原理、状态", "D": "性能、特性", "answer": "A", "yourAnswer": "", "description": "" }, { "id": 2, "type": "单选题", ...
Board.scheme_primitive_functions = (function ($) { var m_canvas = null; var m_context = null; var m_main_frame = null; var m_board_main = Board.board_main; var m_editor = Board.editor; var m_div_repl = Board.div_repl; var JS_functions = { 'set-painter-frame': function(args){ // (make-frame) ...
'use strict'; var React = require('react'); var mui = require('material-ui'); var SvgIcon = mui.SvgIcon; var createClass = require('create-react-class'); var ImageFilterCenterFocus = createClass({ displayName: 'ImageFilterCenterFocus', render: function render() { return React.createElement( SvgIcon, ...
"use strict"; define("ace/snippets/verilog", ["require", "exports", "module"], function (require, exports, module) { "use strict"; exports.snippetText = undefined; exports.scope = "verilog"; });
function demo() { view.moveCam({ theta:40, phi:30, distance:70, target:[0,0,0] }); physic.set(); // reset default setting //physic.add({type:'plane', friction:0.6, restitution:0.1 }); // infinie plane var z = 0; for( var i = 0; i < 20; i++){ z = -20 + i*2; physic.add({ ...
function SimplePostMessage(target, targetOrigin, receiveCallBack) { var receive; if (!(this instanceof SimplePostMessage)) { return new SimplePostMessage(target, targetOrigin, receiveCallBack); } if (!target || !targetOrigin) throw new Error('Params target and targetOrigin are required!'); this.send =...
/* import dependencies */ import Vue from 'vue' import Chat from '@/components/Chat' import ElementUI from 'element-ui' import VueResource from 'vue-resource' import VueLocalStorage from 'vue-localstorage' import VueRouter from 'vue-router' /* inject dependencies */ Vue.use(ElementUI) Vue.use(VueLocalStorage) Vue.us...
// const COMPARE_EQUALS = 0; // const COMPARE_GREATER = 1; // const COMPARE_LOWER = -1; /** * Compare 2 tags to each other. * * @param {TMD.Tag} tag1 first tag to compare * @param {TMD.Tag} tag2 second tag to compare * @returns {number} caomparason resukt */ module.exports.compare = (tag1, tag2) => tag1.getName...
/* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const _ = require("underscore") const sinon = require("sinon") const Backbone = require("backbone") const { fabricate } = r...
"use strict"; var debug = require('debug')('ap:scene'); var Emitter = require('./emitter.js'); var util = require('./util.js'); var Vector = require('./vector.js'); function Scene(options) { this.width = parseInt(options.data['width_height'].values[0]); this.height = parseInt(options.data['width_height'].valu...
var MoveError = require("./moveError"); function Board () { this.grid = Board.makeGrid(); } Board.isValidPos = function (pos) { return ( (0 <= pos[0]) && (pos[0] < 3) && (0 <= pos[1]) && (pos[1] < 3) ); }; Board.makeGrid = function () { var grid = []; for (var i = 0; i < 3; i++) { grid.push([]); ...
/** * Builds a FrameBuffer with a color component and optionally a depth component * \param gl webGL context to create the framebuffer on and to use for the binding operations * \param width width of the framebuffer * \param height height of the framebuffer * \param hasDepthBuffer if set to true a dept...
;(function(win) { var $ = win['Zepto']; var home = function() { } })(window)
(function(root, factory) { if (typeof define === 'function' && define.amd) { define([], factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.debounce = factory(); } }(this, function() { 'use strict'; return function(callback, delay) { var timeout; return functi...
// NPM Modules var low = require("lowdb"); var url = require("url"); var async = require("async"); var fs = require("fs"); var _ = require("underscore"); var _s = require("underscore.string"); var request = require('request'); var twitter = require('twitter'); // Custom Modules var yans = require("./node_modules-custo...
/** * CommandHandler: for handling script commands. * @TODO: Flesh this out! **/ var _ = require('underscore'); var $ = require('jquery'); var Radio = require('backbone.radio'); class CommandHandler { constructor(opts) { this.channel = opts.channel; this.broadcastChannel = this.channel; th...
// Utils etc. import anchorLink, { getAnchor } from 'utils/anchor-link'; import scrollToAnchor from 'utils/scroll-to-anchor'; export class About { constructor () { this.anchorLink = anchorLink; this.getAnchor = getAnchor; } /* ----------------------- Aurelia-specific methods ----------------------- */ ...