code
stringlengths
2
1.05M
function EraserBrush(ctx) { this.draw = function (event) { ctx.beginPath(); ctx.moveTo(event.previousMousePosition.offsetX, event.previousMousePosition.offsetY); ctx.lineTo(event.offsetX, event.offsetY); ctx.stroke(); ctx.closePath(); }; this.name = "eraser"; } toolbox.addNewBrush(new EraserBrush(ctx));
// ==UserScript== // @name github-npm-deps // @version 0.1.0 // @description Link dependencies from package.json to respective GitHub homepages // @license MIT // @namespace https://github.com/eush77/github-npm-deps // @supportURL https://github.com/eush77/github-npm-deps // @include https:...
console.log('Service Worker started: ', self); var CACHE_VERSION = 'ronco-v1.1.1'; var urlsToCache = [ '/', '/css/style.min.css', '/js/main.min.js', '/images/hand-of-god.png', '/images/just-the-tip.png', '/images/polka-pattern.png', '/images/ronco.png', '/sounds/gagging.mp3',...
/* * * JourneyPage constants * */ export const DEFAULT_ACTION = 'app/JourneyPage/DEFAULT_ACTION';
$(document).ready(function() { $("button[type=submit]").jqxButton({ width: '120px', height: '35px', theme: 'green' }); $("button[type=submit].delete").jqxButton({ width: '120px', height: '35px', theme: 'red' }); $("p.button.error a").jqxLinkButton({ width: '120px', height: '35px', theme: 'r...
import path from 'path'; import Promise from 'bluebird'; import TranscodeError from './transcode-error.js'; import {stat as _stat, unlinkSync} from 'fs'; let stat = Promise.promisify(_stat); import _mkdirp from 'mkdirp'; let mkdirp = Promise.promisify(_mkdirp); import ChildPromise, {windowsCommand} from './child-promis...
/* global app:false */ 'use strict'; app.factory( 'CheckersProtocol', [ '$log', 'Socket', function ( $log, Socket ) { // init() will be called just prior to returning the lobby protocol object. function init() { // Register the checkers protocol's interpretCommand() function as the callback ...
$.ajax({ url: "myPage/myFunction", type: "Post", data: "ID=" + 10, dataType: "json" }).done(function (answer) { for(var i=0 ; i<=answer.length ; i++){ var element = '<option value="'+answer[i].ID+'">'+answer[i].Name+'</div>'; $('.comboBox2').appen...
/*This function will take parameters from the button, excecute an Ajax call *and then verify the response code, if the response code is 200 it will reload *a target div using a givn URL */ $('body').delegate('.ajax-html-call','click', function() { if($(this).attr("disabled")!='disabled'){ $activateClass="btn btn-mini...
function Gigasecond(startDate) { this.startDate = startDate; this.date = function () { var adjusted = new Date(this.startDate.getTime() + 1000 * 1e9); return adjusted; } } module.exports = Gigasecond;
"use strict"; /* tslint:disable:no-unused-variable */ var app_component_1 = require('./app.component'); var testing_1 = require('@angular/core/testing'); var platform_browser_1 = require('@angular/platform-browser'); describe('Smoke test', function () { it('should run a passing test', function () { expect(t...
// This file was automatically generated. Do not modify. 'use strict'; goog.provide('Blockly.Msg.he'); goog.require('Blockly.Msg'); Blockly.Msg.ADD_COMMENT = "הוסף תגובה"; Blockly.Msg.AUTH = "בבקשה נא לאשר את היישום הזה כדי לאפשר לעבודה שלך להישמר וכדי לאפשר את השיתוף על ידיך."; Blockly.Msg.CHANGE_VALUE_TITLE = "ש...
//models/Song var mongoose = require('mongoose'); var Schema = mongoose.Schema; var SongsSchema = new Schema({ title: String }); module.exports = mongoose.model('Song', SongsSchema);
const { lsdRadixSort } = require("./lsd-radix-sort"); const { createRandomArray, isSorted } = require("../utils/index"); const W = 7; /** * Transform an integer into a string of a fixed length. If the string number * doesn't have `size` digits, random digits are appended to it. * @param {int} n : number to be padd...
var hasOwn=Object.prototype.hasOwnProperty,toString=Object.prototype.toString,isFunction=function(e){var t=typeof e=="function"&&!(e instanceof RegExp)||toString.call(e)==="[object Function]";!t&&typeof window!="undefined"&&(t=e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt);return t};mod...
'use strict'; const request = require('request'); const APIServer = "https://restbus-api-server.herokuapp.com"; exports.getRoutes = (req, res) => { request({ uri: `${APIServer}/agencies/sf-muni/routes`, json: true }, (err, response, body) => { if (err) { console.log('err', err); return res...
"use strict"; /** * @license * Copyright 2019 Google Inc. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless...
var fs = require("fs"); var path = require("path"); const authentication = require('../authentication'); var express = require('express'); var router = express.Router(); var routes = []; //load files fs.readdirSync(__dirname) .filter(function(file) { return (file.indexOf(".") !== 0) && (file !== "index...
// Libraries const winston = require('winston'); const config = require('winston/lib/winston/config'); /** * LogService represents a singleton LoggerService. We are using a Singleton * pattern as the class is holding one logger instance. The logger levels are * the following custom levels: * success: 0, * error:...
$(function () { loadFromCookie(); init(); }); $(".tablinks").click(function (evt) { var tabName = evt.target.textContent.toLowerCase(); if (tabName === "save") createSavefile(); openTab(evt, tabName); }); // Star handlers $("#addStar").click(function (evt) { starEditor.addStar(); }); $("#deleteStar").click...
// See: https://en.wikipedia.org/wiki/Heap's_algorithm class Permute { /** * Given an array of values, produce results in lexical order. * @param {Array<T>} list Input to permute. * @template T */ constructor(list) { this.original_ = Array.from(list); this.list = this.original_; // Copied in r...
import React, { Component, PropTypes } from 'react'; import CheckList from './CheckList'; import marked from 'marked'; class Card extends Component { constructor() { super(...arguments); this.state = { showDetails: false }; } toggleDetails() { this.setState({sho...
// 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, or any plugin's // vendor/assets/javascripts directory can be referenced here using a relative path. // // It's not advisa...
describe('ArtCanvas Method TEST', function() { describe('ArtCanvas.prototype.getContainerWidth', function() { it('should return 800', function() { var container = document.createElement('div'); var canvas = document.createElement('canvas'); container.appendChild(can...
import actionTypes from '../src/action-types'; import { UniquenessErrorMessage, TypeErrorMessage, ConstantsTypeErrorMessage, NamespaceTypeErrorMessage, } from '../src/errors'; const arrayToTest = ['one', 'two', 'three']; const arrayToTest2 = [...arrayToTest, 77]; const arrayToTest3 = [...arrayToTest, 'two']; co...
// Dependencies var Ul = require("ul") , Fs = require("fs") , Moment = require("moment") , CliBox = require("cli-box") ; // Constants const STORE_PATH = Ul.USER_DIR + "/.git-stats" , LEVELS = [ "⬚" , "▢" , "▤" , "▣" , "■" ] , DAYS = [ "Sun" , "Mon" ...
var searchData= [ ['tabbackground',['tabBackground',['../classandroid_1_1support_1_1design_1_1_r_1_1attr.html#a655d14e3167b8f64ef0f47b57e34cdc5',1,'android.support.design.R.attr.tabBackground()'],['../classpl_1_1komunikator_1_1komunikator_1_1_r_1_1attr.html#ab410ae00a4313f175dc486882901cbca',1,'pl.komunikator.komunik...
var moment = require('moment'); var mc = {}; // fake memcache var set = function(key, value) { var ts = moment().add('minutes',3).unix(); var item = { value: value, ts:ts}; mc[key] = item; }; var get = function(key) { var ts = moment().unix(); if(typeof mc[key] != "undefined" && ts < mc[key].ts) { retur...
import React from 'react' import ReactTooltip from 'react-tooltip' import css from './BackTop.css' class BackTop extends React.Component { constructor(props) { super(props) this.toTop = this.toTop.bind(this) } shouldComponentUpdate() { return false } toTop(event) { event.preventDefault() ...
/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang("smiley","he",{options:"אפשרויות סמיילים",title:"הוספת סמיילי",toolbar:"סמיילי"});
/* * Level3MediaPortalAPI * https://github.com/dublx/Level3MediaPortalAPI * * Copyright (c) 2013 Luis Faustino * Licensed under the MIT license. */ 'use strict'; var request = require('request'); var _ = require('underscore'); var dateFormat = require('dateformat'); var crypto = require('crypto'); var url = req...
var React = require('react'); var GNode = require('./gnode-rect'); var GNodeElipse = require('./gnode-elipse'); var GConn = require('./gconn'); var Cursor = require('./cursor'); var store = require('../../store/editor'); var selectorAction = require('../../actions/selector'); selectorAction.register(store); var DRAG_...
'use strict'; var precondition = require('./contract').precondition; var i18n = require('./i18n').i18n(); exports.render = (container, task) => { precondition(container, 'Legend Widget requires a container'); precondition(task, 'Legend Widget requires a DisplaySheetTask'); var legendContainer = d3.select(contai...
export default Ember.Component.extend({ tagName : "input", type : "radio", attributeBindings : [ "name", "type", "value", "checked:checked" ], click : function() { this.set("selection", this.$().val()); }, checked : function() { return this.get("value") === this.get("selection");...
/* * Original code by Nihilogic * http://blog.nihilogic.dk/2008/05/javascript-super-mario-kart.html * * Customisations: * - location of audios and images * - parent element of the game div * - default screen scale set to 6 (large) * - default music set to off */ function MarioKart(rootUrl) { cons...
/** * @param {number} num * @return {string} */ var digit = [['I', 'V'], ['X', 'L'], ['C', 'D'], ['M']]; var intToRoman = function(num) { var res = ''; var pos = 0; while (num !== 0) { var current = num % 10; if (current > 0 && current < 4) { ...
var searchData= [ ['location',['Location',['../classpyccuweather_1_1objects_1_1_location.html',1,'pyccuweather::objects']]], ['locationset',['LocationSet',['../classpyccuweather_1_1objects_1_1_location_set.html',1,'pyccuweather::objects']]] ];
(function() { var getPointer = fabric.util.getPointer, degreesToRadians = fabric.util.degreesToRadians, radiansToDegrees = fabric.util.radiansToDegrees, atan2 = Math.atan2, abs = Math.abs, supportLineDash = fabric.StaticCanvas.supports('setLineDash'), STROKE_OFFSET = 0.5; /** ...
{{{ code }}}
/* * grunt-requirejspaths * https://github.com/rockallite/grunt-requirejspaths * * Copyright (c) 2014 Rockallite Wulf * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { grunt.registerMultiTask('requirejspaths', 'Find RequireJS modules and make a file which contains correspo...
import React from 'react'; import { Link } from 'react-router'; import $ from 'jquery'; import CommentsContainer from './comments_container'; import common_getParameter from '../modules/common_get_parameter'; class PrevPaper extends React.Component { render() { const { paper, changePa...
#!/usr/bin/env node const OctoDash = require("octodash") const packageJSON = require("./package.json") const ReleaseService = require("./lib/services/release-service") const ProjectHelper = require("./lib/helpers/project-helper") const semverHelper = require("./lib/helpers/semver-helper") const Spinner = require("./li...
var mongoose = require('mongoose'), Schema = mongoose.Schema; var PartSchema = new Schema({ name: {type: String, minlength: 2}, //_repairs: [{type: Schema.Types.ObjectId, ref: 'Repair'}] }, {timestamps: true}); mongoose.model('Part', PartSchema);
define(function (require) { 'use strict'; var defineComponent = require('flight/lib/component'); return defineComponent(colorMatcher); function colorMatcher() { this.defaultAttrs({ inputSelector: '.inputField', colorSelector: '.color' }); this.updateName = function (e, data) { ...
import { decamelizeKeys } from 'humps'; function buildQueryString(query) { const keys = query && Object.keys(decamelizeKeys(query)).filter(key => query[key] !== undefined); if (!keys || keys.length === 0) { return ''; } const qs = keys.map(key => [key, query[key]].map(encodeURIComponent).join('=')) ....
NEWSBLUR.ReaderGoodies = function(options) { var defaults = {}; this.options = $.extend({}, defaults, options); this.model = NEWSBLUR.assets; this.runner(); }; NEWSBLUR.ReaderGoodies.prototype = new NEWSBLUR.Modal; NEWSBLUR.ReaderGoodies.prototype.constructor = NEWSBLUR.ReaderGoodies; _.extend(NE...
import ActionTypes from "./actionTypes"; // Action to hide the callout export function hide() { return { type: ActionTypes.Hide.Callout, visible: false }; } // Action to show the callout export function show() { return { type: ActionTypes.Show.Callout, visible: true }; ...
module.exports = {"1619":{"id":"1619","parentId":"194","name":"\u5b5d\u5357\u533a"},"1620":{"id":"1620","parentId":"194","name":"\u5e94\u57ce\u5e02"},"1621":{"id":"1621","parentId":"194","name":"\u5b89\u9646\u5e02"},"1622":{"id":"1622","parentId":"194","name":"\u6c49\u5ddd\u5e02"},"1623":{"id":"1623","parentId":"194","...
import axios from 'axios'; export const FETCH_POSTS = 'fetch_posts'; export const FETCH_POST = 'fetch_post'; export const CREATE_POST = 'create_post'; export const DELETE_POST = 'delete_post'; const ROOT_URL = 'https://reduxblog.herokuapp.com/api'; const API_KEY = '?key=batman90'; export function fetchPosts() { co...
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plantumlEncode...
/* Pushes/removes the corresponding elements from selectedSpellIDs when a checkbox is marked. */ function updateSelectedSpells() { var currentSpellId = parseInt(this.id.replace("spell-", "")); if (this.checked) { selectedSpellIDs.push(currentSpellId); } else { selectedSpellIDs.splice(s...
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 users = require('./routes/users'); var reg = require('....
import React from "react"; import ShallowComponent from "robe-react-commons/lib/components/ShallowComponent"; import Application from "robe-react-commons/lib/application/Application"; import Card from "app/card/Card"; export default class Welcome extends ShallowComponent { render():Object { return ( ...
function euler220() { // Good luck! return true } euler220()
import '@storybook/addon-actions/register'; import '@storybook/addon-links/register'; import '@storybook/addon-events/register'; import '@storybook/addon-notes/register'; import '@storybook/addon-options/register'; import '@storybook/addon-knobs/register';
module.exports = { files: require('./files') };
'use babel'; import path from 'path'; const __b = (_p, arr) => arr.map(mp => path.resolve(`${__dirname}/../node_modules/babel-${_p}-${mp}`)); export default { "presets": __b('preset', [ "es2015", "react" ]), "plugins": __b('plugin', [ "add-module-exports", "transform-object-rest-spread", "tra...
//alert("Hello from your Chrome extension!")
var makebuffer_from_trace = require("node-opcua-debug").makebuffer_from_trace; exports.packet_ReadResponse= makebuffer_from_trace(function () { /* 00000000: 01 00 7a 02 87 bb 66 e8 6e 19 d1 01 e0 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 ..z..;fhn.Q.`................... 00000020: 0d...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: { options: { separator: ';' }, dist: { src: ['src/elements/BaseElement.js', 'src/elements/MapElement.js', 'src/elements/SolidMapElement.js', 'src/**/*.js'], dest: ...
window.addEvent('domready', function() { // Close button for alert messages $$('.alert-error, .alert-info, .alert-success').each(function(e) { var button = new Element('button', { type: 'button', html: '&times;', events: { click: function() { var fx = new Fx.Tween(this.parent...
var path = require('path'); module.exports = { cache: false, entry: { bundle: './src/client.js' }, output: { path: path.resolve(__dirname, 'public/js/build'), filename: 'bundle.js', }, module: { loaders: [ { test: /\.js$|\.jsx$/, exclude: /node_modules/, loader: 'babel' } ], }, ...
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; /** * Leave Schema */ var LeaveSchema = new Schema({ name: { type: String, default: '', required: 'Please fill Leave name', trim: true }, created: { type: Date, default: Date.now }, user: { ...
import React, { PureComponent } from 'react' import classNames from 'classnames' import PropTypes from 'prop-types' import BodyContent from '../BodyContent/BodyContent' import Description from '../Description/Description' import Indicator from '../Indicator/Indicator' import { styles } from './Response.styles' @styles...
module.exports = class extends think.Model { /** * 获取验证码by Code * 用于查询验证码是否存在 * @param code */ getCodeByCode(code) { return this.where({code: code}).find(); } /** * 保存验证码 * @param data * @returns {Promise} */ saveCode(data) { return this.thenU...
import * as React from 'react'; import PropTypes from 'prop-types'; import { Global } from '@emotion/react'; import { styled } from '@material-ui/core/styles'; import CssBaseline from '@material-ui/core/CssBaseline'; import { grey } from '@material-ui/core/colors'; import Button from '@material-ui/core/Button'; import ...
var ConcreteInformationView = Backbone.View.extend({ initialize : function() { this.template = _.template(tpl.get('layouts/concreteinformation')); }, render : function() { var data = {"object": this.model}; this.$el.html(this.template(data)); return this; } });
define([ 'backbone', 'jquery', 'underscore', 'find/app/vent', 'find/app/model/document-model', 'find/app/model/promotions-collection', 'find/app/page/search/sort-view', 'find/app/page/search/results/results-number-view', 'find/app/page/search/results/result-rendering/result-renderer'...
export default (prop) => <div propA='1' probB={3} c>1sdas</div>
Snipe.Results = Class.extend({ /** * Init method * @param options (Object) - Options for the method. * Eg. * options: { * //Maximum number of results to display * maxResults: 5, * * select: function(winid, tabid) { * //Method to handle what happ...
module.exports = { resHandler : function (req, res, next) { if(res.payload){ var response = {} response['status'] = 'ok' response['message'] = res.message if(res.payload.length){ response['payload'] = res.payload } else { response['payload'] = [res.payload] } ...
import storeContainer from "./storeContainer"; export default function storeContainerWithOpts(mapShadowToProps, options) { return storeContainer(mapShadowToProps, null, null, options); }
angular.module('lukkari.services') .factory('FoodService', ['$http', function($http) { let lunches = []; function parseLunch(element, index, array) { let lunch = {}; try { lunch.main = element.div[0].div.div.content; if (element.div.length >= 2) { lunch...
/** * Created by candice on 17/4/6. */ export Select from './components/Select'
/** * color button. * @author yiminghe@gmail.com */ KISSY.add("editor/plugin/color/btn", function (S, Editor, Button, Overlay4E, DialogLoader) { var Node = S.Node; var COLORS = [ ["000", "444", "666", "999", "CCC", "EEE", "F3F3F3", "FFF"], ["F00", "F90", "FF0", "0F0", "0FF", "00F", "90F", "F...
iD.Background = function(context) { var dispatch = d3.dispatch('change'), baseLayer = iD.TileLayer() .projection(context.projection), gpxLayer = iD.GpxLayer(context, dispatch) .projection(context.projection), mapillaryLayer = iD.MapillaryLayer(context), overla...
module.exports = require('./lib/simple-pubsub')
define(function(){return function anonymous(locals){var buf=[];with(locals||{})buf.push('<div id="navbar"></div><div id="main"></div>');return buf.join("")}})
define([],function(){ var addFormulaEvent = function(app,callBack){ var dts = app.getDataTables() for (var key in dts){ var dt = dts[key] var meta = dt.getMeta() for (var k in meta){ var hasEditFormula = meta[k]['editFormula']; var hasValidateFormula = meta[k]['validateFormula']; va...
//~ name c113 alert(c113); //~ component c114.js
angular .module('momentum.actions') .directive('actionsForm', actionsForm); function actionsForm() { return { restrict: 'E', bindToController: true, controller : 'actionsCtrl as Form', transclude: 'element', scope: { actionId: "@", action: "@", template: "@" }, ...
iris.ui(function(self) { var appRes = iris.resource(iris.path.resource.app); self.settings({ showStatus: null, hideStatus: null, data: [], type: 'type' }); self.create = function() { self.tmplMode(self.APPEND); self.tmpl(iris.path.ui.privacy.html); self.setting('data').forEach(function(item) { ...
(function () { 'use strict'; angular.module('fireApp', [ 'ngResource', 'ui.router', 'googlechart', 'fireApp.controllers', 'fireApp.services' ]).config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { $urlRouterProvi...
var colorutil = require('../app/colorutil.js'); describe("ColorUtils are able to ...", function() { it("convert hex green to RgbInt", function() { expect(colorutil.hex2Int("#00ff00")).toBe(65280); }); it("convert arbitrary hex to RgbInt", function() { expect(colorutil.hex2Int("#7B9C4F")).toBe(8100943); ...
'use strict'; const paper = require('paper'); const Howl = require('howler').Howl; const debounce = require('lodash/debounce'); const throttle = require('lodash/throttle'); const isFunction = require('lodash/isFunction'); const addEventListener = require('add-dom-event-listener'); /** * Renders an interactive musica...
function dropdownMenu () { return { require: '^dropdown', link: function (scope, element, attrs, ctrl) { ctrl.addMenu(element) } } } export default dropdownMenu
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M21 14.58c0-.36-.19-.69-.49-.89L13 9V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-7.51 4.69c-.3.19-.49.53-.49.89 0 .7.68 1.21 1.36 1L10 13.5V19l-1.8 1.35c-.13.09-.2.24-.2.4v.59c0 .33.32.57.64.48L11....
var assert = require('assert'), uuid = require('node-uuid'), _ = require('underscore'); var Status = { NOT_STARTED: 0, WAIT_FOR_ROUND_START: 1, WAIT_FOR_ANSWERS: 2, WAIT_FOR_JUDGMENT: 3, GAME_OVER: 5 }; // boilerplate cardset-loading code for rn var Cardset = require('./cardset.js'), cah = new ...
$(document).ready(function(){ $("#reporte_usuarios").click(function(){ if($("#fecha_desde_u").val() == "" || $("#fecha_hasta_u").val() == "") { alert('Seleccione fechas para usuarios'); } else { var fecha1 = $("#fecha_desde_u").val(); var ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceEr...
'use babel' import { RtmClient, WebClient, MemoryDataStore, RTM_EVENTS, CLIENT_EVENTS, } from '@slack/client' const RTM_CLIENT_EVENTS = CLIENT_EVENTS.RTM import { TeamObject, UserObject, ChannelObject, MessageObject } from './objects' import { setStatus } from './redux/modules/status' import { updateTeam,...
'use strict'; //NOTE: Do not remove the comments!!! /* [Start Import] */ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _angular = require('angular'); var _angular2 = _interopRequireDefault(_angular); var _factoriesBModalFactoryJs = require('./factories/b-moda...
// import React from 'react' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import Server from '../components/server' import { fetchServerInfo, saveServerInfo, testServer } from '../actions/server' const mapStateToProps = (state) => { let { server } = state return server } c...
define([ 'jquery', 'underscore', 'backbone', 'collections/divisions/freezerDivisions', 'text!templates/division/freezerDivisionList.html' ], function($, _, Backbone, FreezerDivisionCollection, freezerDivisionListTemplate) { var DivisionListView = Backbone.View.extend({ el: 'body', ...
import * as util from 'Utilities'; import {game} from 'index'; class BootstrapState extends Phaser.State { preload() { util.trace('BootstrapState::preload') game.load.image("loading","assets/sprites/loading.png") game.load.image("loadText","assets/GameLoading.png") game.load.bitmapFont("littera", "assets/f...
module.exports = function(req, res) { res.render('index'); };
var TablePreviewCommandHandler = function(){ this.includeInAudit = false } TablePreviewCommandHandler.prototype.run = function(command, cParts, conn, screen, callback){ if(cParts.length < 2){ callback([1, "Invalid syntax! Try: '\\h' for help.", "message"]) return; } var limit = parseInt(cParts[2] && !i...
/******/ (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...
import React from 'react'; import { shallow } from 'enzyme'; import NavBar from '../NavBar'; describe('NavBar Tests', () => { test('should render NavBar correctly', () => { const wrapper = shallow(<NavBar />); expect(wrapper).toMatchSnapshot(); }); test('should render NavBar with only the login button'...
define([ 'jquery', 'backbone', 'collections/search_quick', 'views/layout/search_quick_item', 'views/layout/search_quick_heading', 'text!templates/layout/nav_search_quick.html', 'views/layout/player' ], function($, Backbone, SearchQuickCollection, QuickSearchItem, QuickSearchHeading, searchQuickTemplate, PlayerVi...