code
stringlengths
2
1.05M
'use strict'; eventsApp.controller('SampleDirectiveController', function SampleDirectiveController($scope, $timeout) { var promise = $timeout(function() { $scope.name = "John Doe"; }, 3000); $scope.cancel = function() { $timeout.cancel(promise); }; } );...
'use strict'; //Setting up routes angular.module('customers').config(['$stateProvider', function($stateProvider) { // Customers state routing $stateProvider. state('listCustomers', { url: '/customers', templateUrl: 'modules/customers/views/list-customers.client.view.html' }). state('createCustomer', {...
var http = require("http").createServer(handler); // on req - hand var io = require("socket.io").listen(http); //socket library var fs = require("fs"); //variable for file system for providing html var firmata = require("firmata"); console.log("Starting the code"); var board = new ...
import soap from 'soap'; import _ from 'lodash'; import {uniqId} from './util'; const ERROR_FORMAT = 601; class Mengwang { static errMap = { '-1': '参数为空。信息、电话号码等有空指针,登陆失败', '-2': '电话号码个数超过100', '-10': '申请缓存空间失败', '-11': '电话号码中有非数字字符', '-12': '有异常电话号码', '-13': '电话号码个数与实际个数不相等', '-14': '实际...
goog.provide('ol.renderer.Layer'); goog.require('ol'); goog.require('ol.ImageState'); goog.require('ol.Observable'); goog.require('ol.Tile'); goog.require('ol.asserts'); goog.require('ol.events'); goog.require('ol.events.EventType'); goog.require('ol.functions'); goog.require('ol.source.State'); goog.require('ol.trans...
function getActivityColor(activity) { var pointColor = 'magenta'; switch (activity) { case 'ON_BICYCLE': pointColor = '#008c58'; break; case 'WALKING': case 'ON_FOOT': pointColor = '#20ac29'; break; case 'RUNNING': pointColor = '#add500'; break; case 'IN_VEHICLE': pointC...
"use strict" let mysql = require("mysql") let q = require('q'); let returnConfig = (dbname = 'test') => { return { host:'localhost', user: 'root', password : 'root', database : dbname } } let createDBIfNotExists = (tableName) => { let defer = q.defer(); var connection...
/* * The MIT License (MIT) * * Copyright (c) 2013 Numenta, Inc. * * 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...
"use strict"; var Basic= require('../Character.Basic/Client.js'); var Knight = function () { Basic.call(this); }; Knight.prototype = Object.create(Basic.prototype); Knight.prototype.constructor = Knight; Knight.DATA = require('./Data.js'); Knight.prototype.initInfoPanel = function (container){ Basic.prototyp...
/* * * INSPINIA - Responsive Admin Theme * version 2.0 * */ $(document).ready(function () { // Add body-small class if window less than 768px if ($(this).width() < 769) { $('body').addClass('body-small') } else { $('body').removeClass('body-small') } // MetsiMenu $('#...
import androidHover from '../images/icons/icon_android_hover.png' import androidNormal from '../images/icons/icon_android_normal.png' import appleHover from '../images/icons/icon_apple_hover.png' import appleNormal from '../images/icons/icon_apple_normal.png' import javaScriptHover from '../images/icons/icon_java_scrip...
export default { props: { transitionShow: { type: String, default: 'fade' }, transitionHide: { type: String, default: 'fade' } }, data () { return { transitionState: this.showing } }, watch: { showing (val) { this.transitionShow !== this.trans...
'use strict' var fs = require('fs') var path = require('path') var test = require('tape') var unified = require('unified') var parse = require('remark-parse') var stringify = require('remark-stringify') var gfm = require('remark-gfm') var frontmatter = require('remark-frontmatter') var footnotes = require('remark-foot...
'use strict'; var BpmnTreeWalker = require('./BpmnTreeWalker'); /** * Import the definitions into a diagram. * * Errors and warnings are reported through the specified callback. * * @param {Diagram} diagram * @param {ModdleElement} definitions * @param {Function} done the callback, invoked with (err, [ war...
// Fetch ajax links/forms var $body = $('body'); $body.ajaxcall({selector: "form.cms-ajax", event: "submit"}); $body.ajaxcall({selector: "a.cms-ajax", event: "click"}); $body.ajaxcall({selector: "form.tarsier-ajax", event: "submit"}); $body.ajaxcall({selector: "a.tarsier-ajax", event: "click"});
window.__imported__ = window.__imported__ || {}; window.__imported__["Transition@2x/layers.json.js"] = [ { "objectId": "8FC98ACF-ED26-4C63-9BF5-8CF1AC3BF897", "kind": "artboard", "name": "Transition", "originalName": "Transition", "maskFrame": null, "layerFrame": { "x": 312, "y": 90, "width": 375,...
exports.up = function(knex) { return knex.schema.createTable('users', (table) => { table.increments('id'); table.string('first_name').notNullable().defaultTo(''); table.string('last_name').notNullable().defaultTo(''); table.string('username').unique().notNullable().defaultTo(''); table.string('ema...
var mtheft_2010_04 = [{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "Unnamed: 0": 0, "Incident Number": 101200030, "Date": "04\/30\/2010", "Time": "05:49 AM", "Police District": 7.0, "Offense 1": "MOTOR VEHICLE THEFT", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense...
/** * * MinimalForm * */ import React from 'react'; import styled from 'styled-components'; import MinimalButton from '../MinimalButton/index'; const Form = styled.form` display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #fafafa; `; const TextField = styl...
module.exports = { env: { node: true, es6: true }, extends: [ "plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin "prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that w...
import React from 'react'; import styled, { keyframes } from 'styled-components'; const getSlide = (childIndex, reverse) => keyframes` from { transform: translateX(${childIndex * 100}%); } to { transform: translateX(${(reverse ? -100 : 100) + 100 * childIndex}%); } `; const UsersWrapper = styled.secti...
'use strict'; module.exports = function(policy, securityManager) { return function(next) { if (securityManager.isPrivileged()) { return next(); } else { var query = this; policy.getCondition(query.model.modelName, 'read').then(function(condition) { ...
/* * git-tag-version * https://github.com/bushee/git-tag-version * * Copyright (c) 2015 Jerzy Jelinek, 2016-2017 Krzysztof "Bushee" Nowaczyk * Licensed under the MIT license. */ 'use strict'; var gitVersion = require('./src/git-tag-version'); module.exports = function (grunt) { grunt.initConfig({ ...
import * as Actions from 'constants/actions' export default function (state = {}, action) { switch (action.type) { case Actions.TEST: case Actions.TEST_ASYNC: return { ...state, message: action.message, } } return state }
var getOSModule, linux, os, osx, win32; os = require('os'); win32 = require('./win32'); osx = require('./osx'); linux = require('./linux'); getOSModule = function() { var operatingSystem; operatingSystem = os.platform(); switch (operatingSystem) { case 'darwin': return osx; case 'win32': ...
describe("phantom global object", function() { it("should exist", function() { expect(typeof phantom).toEqual('object'); }); it("should have args property", function() { expect(phantom.hasOwnProperty('args')).toBeTruthy(); }); it("should have args as an array", function() { ...
/** * jquery.motionDetection.js * @version: v1.0.0 * @author: Sebastian Marulanda http://marulanda.me * @see: https://github.com/smarulanda/jquery.motionDetection */ (function($) { $.fn.motionDetection = function(options) { var defaults = { pollingFrequency: 1000, sampleWidth: 100, sampleHeight: 1...
// Generated by CoffeeScript 1.8.0 (function() { var App, Spine, __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.pr...
import Line from './Line'; import LinePlot from './LinePlot'; import data from 'json!../data/lpd.json'; import sortBy from 'lodash.sortby'; import uniqueId from 'lodash.uniqueid'; const DATA = sortBy(data, (item) => { return item.id; }); const PLOT_PARAMS = { xAxisLabel: 'Wavelength (nm)', xAxisClamp: { m...
// To use gulp build: // // Install nodejs http://nodejs.org/ // `npm install -g gulp` // `npm install` (from this directory to pull in build dependencies) // // Build: // // `gulp` // // `gulp karma` // Will watch JS files and run tests every time they are saved // // `gulp karma-ci` // Runs test suite onc...
/* exported testNavbar */ 'use strict'; function testNavbar(){ var expectedNavBar=['hind-cite', 'About', 'Cloudant API', 'Post History', 'SnapsPerDay']; it('should have the proper navbar', function () { var navItems = element.all(by.css('.navbar a')); var navTexts=navItems.map(function(elm){...
import { parseTemplatingVariables, mergeURLVariables, optionsFromSeriesData, } from '~/monitoring/stores/variable_mapping'; import { templatingVariablesExamples, storeTextVariables, storeCustomVariables, storeMetricLabelValuesVariables, } from '../mock_data'; import * as urlUtils from '~/lib/utils/url_uti...
/** * * MIDDLEWARE: JSON * * * DESCRIPTION: * - Returns a JSON response. * * * NOTES: * [1] * * * TODO: * [1] * * * LICENSE: * MIT * * Copyright (c) 2015. Athan Reines. * * * AUTHOR: * Athan Reines. kgryte@gmail.com. 2015. * */ 'use strict'; /** * FUNCTION: json( request, response, next ) * Returns a JSON respon...
/* jshint undef: true */ /* global $, _ */ /* global alert, prompt */ if (!window.apos) { window.apos = {}; } var apos = window.apos; apos.version = "0.5.317"; apos.handlers = {}; // EVENT HANDLING // // apos.emit(eventName, /* arg1, arg2, arg3... */) // // Emit an Apostrophe event. All handlers that have been s...
import CraftyBlockEvents from './CraftyBlockEvents.js'; /** * CraftyBlock Animator Class * * Handles user interactions of crafty blocks * Emits required block edit on CraftyBlockEvents * * @exports new CraftyBlockAnimator instance */ class CraftyBlockAnimator { constructor() { this.dragging = false;...
import ngMaterial from 'angular-material' import './item.scss' import template from './requestDetails.html' import {name as aggregatePercentage} from "../aggregatePercentage/aggregatePercentage" import {name as qAndA} from "../qAndA/qAndA" class requestCtrl { constructor() { "ngInject"; } } export const nam...
importScripts('chess.min.js','fisherMoves.js'); var filter_removeNonCapture = function(vMoves){ fMoves = vMoves.filter(function( a ) { return (a['flags'].search(/(c|e)/) !== -1); }); if(fMoves.length > 0) return fMoves; return vMoves; } var filter_removeNonPawnMoves = function(vMoves){ pawnMoves = vMove...
// eyedropper tool pg.tools.registerTool({ id: 'eyedropper', name: 'Eyedropper', usedKeys : { toolbar : 'i' } }); pg.tools.eyedropper = function() { var tool; var options = {}; var activateTool = function() { tool = new Tool(); var hitOptions = { segments: true, stroke: true, curves: ...
/** * A JavaScript API that allows developers to easily insert * the Editize form control into their HTML forms. See the * product documentation for details on the use of this * API, as comments in this file focus on implementation * of that API only. */ function Editize() { // The name of the form element for t...
'use strict'; const QueryStringQueryBase = require('./query-string-query-base'); const { validateRewiteMethod } = require('../helper'); const ES_REF_URL = 'https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html'; /** * A query that uses a query parser in order to parse...
const paths = require('./paths'); module.exports = { entry: paths.src + '/main.js', output: { filename: 'main.js', path: paths.public }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: [...
var models = require('../models'); exports.view = function(req, res){ if (!req.session.username) { res.redirect('/landing'); } res.render('index'); };
/** * Created by alejandro on 19/03/17. */ 'use strict'; const mongoId = require('mongoid') module.exports = function (value) { return mongoId(value) };
import Item from './item' export default Item export { Wrapper } from './wrapper'
// FileData.js (function(){ function throwNoImplementation(){ throw "no Implemention";} //--------------------------------------------------------------------------- // ★FileIOクラス ファイルのデータ形式エンコード/デコードを扱う //--------------------------------------------------------------------------- pzpr.classmgr.makeCommon({ //------...
(function (global, undefined) { var dom = { get: function (id) { return document.getElementById(id); }, setHtml: function (id, content) { this.get(id).innerHTML = content; }, closeLoading: function (id) { this.get(id || 'loading').style...
// Regular expression that matches all symbols in the `Buhid` script as per Unicode v4.1.0: /[\u1740-\u1753]/;
enyo.kind({ // screens constants MAINSCREEN : "main", INVENTORYSCREEN : "inventory", ITEMSCREEN : "youSee", LOCATIONSCREEN : "locations", TASKSCREEN : "tasks", DETAILSCREEN : "detail", name: "WIGApp.GameMain", kind: enyo.VFlexBox, components: [ {kind: "PageHeader", components: [ {kind: "IconB...
{ "package": "dom", "name": "insertAfter", "doc": "http://docs.kissyui.com/docs/html/api/core/dom/insertAfter.html", "desc": "", "tip": "", "demo": [] }
export { default } from 'ember-fhir/models/nutrition-order-administration';
import React from 'react'; import NotificationItem from './NotoficationItem'; import {List, ListItem} from 'material-ui/List'; export default class NotificationList extends React.Component { static propTypes = { data: React.PropTypes.array, checkNotification: React.PropTypes.func.isRequired, }; render...
// ``` // @datatype_void // david.r.niciforovic@gmail.com // webpack.common.js may be freely distributed under the MIT license // ``` var webpack = require('webpack'); var helpers = require('./helpers'); //# Webpack Plugins var CopyWebpackPlugin = (CopyWebpackPlugin = require('copy-webpack-plugin'), CopyWebpackPlugin...
const fs = require('fs'); const path = require('path'); const tape = require('tape'); const fixtures = require('geojson-fixtures').all; const load = require('load-json-file'); const write = require('write-json-file'); const explode = require('.'); const directories = { in: path.join(__dirname, 'test', 'in') + path...
/** * Developer: Stepan Burguchev * Date: 7/7/2014 * Copyright: 2009-2016 Comindware® * All Rights Reserved * Published under the MIT license */ import { keypress, Handlebars } from 'lib'; import { helpers, htmlHelpers } from 'utils'; import template from '../templates/list.hbs'; import SlidingW...
var server = require('./server') , assert = require('assert') , request = require('../main.js') var s = server.createSSLServer(); var tests = { testGet : { resp : server.createGetResponse("TESTING!") , expectBody: "TESTING!" } , testGetChunkBreak : { resp : server.createChunkRespon...
var mongoose = require('mongoose'), Schema = mongoose.Schema var SettingsSchema = new Schema({ installation: {type: String , default: "local"}, newLayoutsEnable: {type: Boolean , default: false}, systemMessagesHide: {type: Boolean, default: false}, forceTvOn: {type: Boolean, default: false}, di...
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=f()}}(function(){return function e(t,n,r){functio...
import RefData from '../../data/ref-data'; var SKILL_TEMPLATE = '<label style="border: 1px solid lightgrey; color: black; margin: 4px; padding: 4px; display: inline-block;">' + ' <span>' + ' <div style="text-align: center;">SKILL_NAME</div>' + ' <div>' + ' <input type="checkbox"/>' + ...
//import React from 'react'; //import ReactDOM from 'react-dom'; const React = require('react'); const ReactDOM = require('react-dom'); class Window() extends from React.component { render() { return ( <h1>React Component</h1> ); } } const app = document.getElementById('app'); ReactDOM.render(<Win...
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M17 11h3c1.11 0 2-.9 2-2V5c0-1.11-.9-2-2-2h-3c-1.11 0-2 .9-2 2v1H9.01V5c0-1.11-.9-2-2-2H4c-1.1 0-2 .9-2 2v4c0 1.11.9 2 2 2h3c1.11 0 2-.9 2-2V8h2v7.01c0 1.65 1.34 2.99 2.99 2.99H15v1c0 1.11.9 2 2 ...
'use strict'; var app = angular.module('angularDragdropApp', []).controller('MainCtrl', function($scope) { $scope.pages = 15; $scope.current = 1; }).directive('LineSheetPager', function($timeout) { return { restrict: 'C', replace: true, scope: { pages: '@paginatePages', ...
/* Copyright 2013, KISSY UI Library v1.40dev MIT Licensed build time: Aug 14 23:54 */ /* Combined processedModules by KISSY Module Compiler: editor/plugin/fake-objects */ /** * fakeObjects for music ,video,flash * @author yiminghe@gmail.com */ KISSY.add("editor/plugin/fake-objects", function (S, Editor, HtmlPar...
var inquirer = require('inquirer') wrench = require('wrench'), path = require('path'), fs = require('fs'), required = function (input) { if(input) return true; }, confirms = [ { name: 'name', message: '请输入项目名称', validate: required }, { ...
'use strict'; require('./support/setup.js'); const expect = require("chai").expect; const JwtHandler = require('../lib/handlers/JwtHandler'); const OAuthClientHandler = require('../lib/handlers/OAuthClientHandler.js'); const SmartsheetApiMock = require('./mocks/SmartsheetApiMock'); const DBMock = require('./mocks/DBMo...
module.exports = { /************************************ * JOIN USER INTO SOCKET IO * This function is deprecated *************************************/ joinOnlineRoom: function ( req, res ) { //Update cnt to client via socket io var socket = req.socket; var io = sail...
import { checkHttpStatus, parseJSONWithDates } from '../utils' import 'whatwg-fetch' import { push } from 'react-router-redux' //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Constants ////////////////////////////////////////////////////////...
import { asyncChangeProjectName, asyncChangeOwnerName } from '../actions/AppActions'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; class Page1 extends React.Component { render() { const { pathname } = this.props.location return ( ...
const assert = require("assert"); const Promise = require("../promise.js"); describe("method", () => { it("wraps errors in promises", async () => { var p = Promise.method(() => {throw new Error("HEY");})(); // gets here try { await p; } catch (e) { assert.equ...
S.Db.Cursor=S.newClass({ result: function(callback){ var r = new App.Model.Request; this._store.findByKey(this.key,{},r); r.success(callback).failed(callback.bind(null,undefined)); }, model: function(callback){ this.result(function(result){ callback(this._store.toModel(result)); }.bind(this)); ...
/* The MIT License (MIT) Copyright (c) 2013 Bryan Hughes <bryan@theoreticalideations.com> (http://theoreticalideations.com) 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, in...
'use strict' // var distance = require('./centimeter') // distance.set('perch', 'centimeter', 1 / 0.0019883878) // module.exports = distance module.exports = ['perch', 'centimeter', 1 / 0.0019883878]
import DataType, {validationErrors} from './'; import ValidationError from './validationError'; /** * The data type for numbers. * * Allowed options: * * |Name|Type|Attribute|Description| * |----|----|---------|-----------| * |type|{@link string}| <ul><li>optional</li><li>default: 'raw'</li></ul> | The type of ...
module.exports = { NODE_ENV: '"production"', BASE_API: '"http://118.178.93.124"', APP_ORIGIN: '"' };
var visualizerConfig = [ // temperature data { buttonId: "toggleTemperature", datasetIndex: 0, color: 'rgb(133, 255, 76)', name: "Temperature", units: "°C", fill: "false" }, // altitude data { buttonId: "toggleAltitude", datasetIndex...
/* global app:true */ 'use strict'; app.controller('RemoteCtrl', ['$scope', '$interval', '$window', 'KodiRemote', 'KodiPlayer', function ($scope, $interval, $window, KodiRemote, KodiPlayer) { $scope.inputButton = function(action) { KodiRemote.input(action); }; $scope.volumeDownButton = function() { ...
var Parse = require('parse').Parse; var parseArgs = require('minimist'); var args = parseArgs(process.argv.slice(2)); Parse.initialize(args.parseappid, args.parsejskey); var RoomStatus = Parse.Object.extend('RoomStatus', { initialize: function(attrs, options) { }, }, { query: function(start, end, page) { v...
var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; //some orchestrabot hovers var WorldScreen; (function (WorldSc...
'use strict'; //Accounts service used to communicate Accounts REST endpoints angular .module('users') .factory('Cuenta', [ '$resource', function($resource) { return $resource( 'cuentas/', {cuentaId: '@_id'}, {update: {method: 'PUT'}} ); } ] );
(function (window, namespace, undefined) { var $ns = window[namespace]; if (!$ns) { $ns = {}; window[namespace] = $ns; } // cookieString() によって生成される文字列のフォーマットが変更されたら increment する // "." は区切り文字なので、 formatVersion には含まないこと。 var formatVersion = "1"; var cookieName = "u"; v...
/* globals window, _, VIZI */ /** * Main entry point * @author Robin Hawkes - vizicities.com */ (function() { "use strict"; VIZI.World = function(options) { if (VIZI.DEBUG) console.log("Initialising VIZI.World"); var self = this; self.options = options || {}; _.defaults(self.options, { ...
var request = require('request'); var logger = require('../logger'); var getPem = require('rsa-pem-from-mod-exp'); var base64url = require('base64url'); var OpenIdMetadata = (function () { function OpenIdMetadata(url) { this.lastUpdated = 0; this.url = url; } OpenIdMetadata.prototype.getKey ...
/** * Copyright 2013-present, Novivia, Inc. * All rights reserved. */ import {ApplicationError} from "../../types/errors"; import {getErrorCause} from "../"; describe( "getErrorCause", () => { const typeError = new TypeError("RegularTypeError"); const error1 = new ApplicationError("error1"); const ...
'use strict'; let axios = require('axios'); function cleanData(data) { return data; } export default { get: (id) => { return axios.get('/embeddableMedias/' + id) .then(function(response) { return response.data; }); }, getAll: () => { return axios.get('/embeddableMedias') .then(function(response) ...
const debug = require('debug')('ssb-blobs') const tape = require('tape') const pull = require('pull-stream') const u = require('../util') const Fake = u.fake const hash = u.hash module.exports = function (createBlobs, createAsync, groupName = '?') { // NOTE: for the suite-async tests the createAsync function // m...
module.exports = { oauth: require('./oauth'), pulls: require('./pulls') };
var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function (req, res, next) { res.render('demo/executingJobQueue', { title: 'executingJobQueue' }); }); module.exports = router;
/** * Requires newline after blocks * * Type: `Boolean` or `Object` * * Values: * - `true`: always require a newline after blocks * - `Object`: * - `"allExcept"`: `Array` * - `"inCallExpressions"` Blocks don't need a line of padding in argument lists * - `"inArrayExpressions"` Blocks do...
'use strict'; module.exports = function (grunt) { // Time how long tasks take. Can help when optimizing build times require('time-grunt')(grunt); // Automatically load required Grunt tasks require('jit-grunt')(grunt, { useminPrepare: 'grunt-usemin' }); // Define the configuration for all the tasks ...
(function() { var app = angular.module('CMS.controller'); app.directive('cmsReport', ['httpService','userService', function(httpService,userService) { return { restrict: 'E', templateUrl: 'templates/report.html', controller: function(){ var reportSession = this; var report = {}; reportSession.d...
(function (module){ 'use strict'; var classBuilder = require('ryoc'); var AbstractTransformer = classBuilder() .abstract('__internal_get_signature', function (){}) .abstract('__internal_apply_transform', function (context,cb){}) .toClass(); module.exports = AbstractTransforme...
// Primary var name = "John", // string - can use double or single quotes age = 32, // number - without quotes married = true, //boolean - true or false age = null, // null - erase the contents of a variable without deleting the variable itself carModel; // unedifined
import * as PNotifyBootstrap4 from '@pnotify/bootstrap4'; import { defaultModules, defaults } from '@pnotify/core'; import * as PNotifyFontAwesome5 from '@pnotify/font-awesome5'; import * as PNotifyFontAwesome5Fix from '@pnotify/font-awesome5-fix'; import * as PNotifyMobile from '@pnotify/mobile'; export function init...
/* Event bindings and DOM Manipulation. */ (function(){ //Set the default starting folder for browse boxes var projectFolder = $("#projectFolder").val(); $("#projectIconBrowse").attr("nwworkingdir", projectFolder); $("#inputFolderBrowse").attr("nwworkingdir", projectFolder); $("#outputFolderBro...
// 5.3 - Must a tile replacement extend existing track? const permissive = "Permissive: Some of the track on the newly-laid tile must be reachable from one of the laying company's station markers by an arbitrarily large train."; const restrictive = "Restrictive: Some of the newly-created track must be reachable from o...
document.addEventListener("DOMContentLoaded", function () { // The URL of the park to load is passed on the URL fragment. var parkURL = window.location.hash.substring(1); var generateAttendance = document.getElementById('generate-event-addendance'); var startDateElement = document.getElementById('start-date'); ...
import _cheapestTree from './cheapestTree.js' import _updateTree from './updateTree.js' import _usedItems from './usedItems.js' import _craftingSteps from './craftingSteps.js' import _recipeItems from './helpers/recipeItems.js' import _dailyCooldowns from './helpers/dailyCooldowns.js' import _useVendorPrices from './he...
'use strict'; module.exports = function(sequelize, DataTypes) { return sequelize.define('Medic', { _id: { type: DataTypes.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true }, name: DataTypes.STRING, info: DataTypes.STRING, active: DataTypes.BOOLEAN }); };
import { shallow } from 'enzyme' import React from 'react' import test from 'ava' import toJson from 'enzyme-to-json' import RadioButton, { refUpdater } from './index' test('Radio component', t => { const input = toJson(shallow(<RadioButton className="sample" name="sample" />)) t.snapshot(input) }) test('renders...
'use strict'; /** * This subscriber will receive all messages published */ const msb = require('../..'); msb.subscriber('test:pubsub:routing-key') .withExchangeType('topic') .withBindingKeys(['odd']) .createEmitter() .on('message', (message) => console.log('subOdd:' + message.payload.body.i)) .on('error', ...
const { expect } = require('chai') describe('MadKudu Snippet', function () { it('should emit the ready callback', function (done) { window.madkudu.ready(function () { done() }) }) it('should wait to load madkudu', function () { expect(window.madkudu).to.be.an('object') }) })