code
stringlengths
2
1.05M
module.exports = { init: function() { var nrom128 = ( this.prgBanks === 1 ); if ( nrom128 ) { this.loadPRGBank( 0x8000, 0, 0x4000 ); this.loadPRGBank( 0xc000, 0, 0x4000 ); } else { this.loadPRGBank( 0x8000, 0, 0x8000 ); } }, readCHR: function( address ) { return this.chrData[ address ]; }, w...
module.exports = function(sails) { /** * Module dependencies. */ var _ = require('lodash'), util = require('sails-util'), Hook = require('../../index'); /** * Expose hook definition */ return { SECURITY_LEVEL_NORMAL: 0, SECURITY_LEVEL_HIGH: 1, SECURITY_LEVEL_VERYHIGH: 2, defaults: {...
"use strict"; var fs = require('fs'); var gm = require('gm').subClass({ imageMagick: true });; var pdf = require('pdfinfo'); var path = require('path'); var async = require('async'); var logger = require('../logger').serverLogger; var options = { type : 'png', size : 1024, density : 600, ...
/* * Document : uiIcons.js * Author : pixelcave * Description: Custom javascript code used in Icon Packs pages (Font Awesome and Glyphicons Pro) */ var UiIcons = function() { return { init: function() { var titleAttr; // When an icon button is clicked $('#...
( function(Dataflow) { var Source = Dataflow.prototype.plugin("source"); // Whether the graph may be updated via the source form Source.updateAllowed = true; Source.initialize = function(dataflow){ var $form = $( '<form class="dataflow-plugin-view-source">'+ '<div style="">'+ '<t...
var counter = require("./counter"); exports.increment = function(){ counter.increment(); };
var graphics = (function() { var projections = {"mercator": d3.geo.mercator, "orthographic": d3.geo.orthographic} var init = function(){ set_projection("mercator") } var projection var path function set_projection(proj_str){ projection = projections[proj_str]() .translate([window...
define("#base/0.9.0/base",["class","events","./options"],function(a){var b=a("class"),c=a("events"),d=a("./options");return b.create({Implements:[c,d]})});
ClassExtend('Controller', function PluginListController() { this.__construct = function() { this.load.ajax(); this.load.module('ui'); }; this.index = function() { Module.ready('ui', function() { new Module.zoom('plugin_detail', 'ajax', {width : 700, height : 500}); }) ; //DOM.id('scan_plg').ev...
var searchData= [ ['rock_5fcount',['rock_count',['../structlevel__rock__spawn.html#a91c9ec87f6ade8287ddcb9a8018f988f',1,'level_rock_spawn']]], ['rock_5fspawns',['rock_spawns',['../classlevel.html#a40952b770c5ff48d042380811fff8186',1,'level']]], ['rocks_5fspawned',['rocks_spawned',['../structlevel__rock__spawn.htm...
var Serializer = require("../../models").Serializer exports.addSerializer = function() { return new Serializer({ select: ['id', 'body', 'createdAt', 'updatedAt', 'createdBy', 'postId'], createdBy: { select: ['id', 'username', 'info'], info: { select: [...
import { Reactor } from 'nuclear-js' import expect from 'expect' import React from 'react' import ReactDOM from 'react-dom' import { Provider } from '../src/index' import setup from './setup' describe('Provider', () => { setup() it('should provide reactor context to children', (done) => { var reactor = new Re...
// // Copyright (c) Microsoft and contributors. 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 // // Unle...
#!/usr/bin/env node var util = require('util'), http = require('http'), fs = require('fs'), url = require('url'), events = require('events'); var DEFAULT_PORT = 8000; function main(argv) { new HttpServer({ 'GET': createServlet(StaticServlet), 'HEAD': createServlet(StaticServlet), }).start...
var _ = require('underscore'); var Backbone = require('backbone'); var config = require('../conf'); exports = module.exports = Backbone.Model.extend({ idAttribute: '_id', url: config.api.host + '/accounts', defaults: { email: '', password:'', username: '', avatar: '', biography: '', status: {}, }, ...
var a = "сенсея"; console.log(a);
var should = require('chai').should(); // eslint-disable-line describe('is', () => { var Hexo = require('../../../lib/hexo'); var hexo = new Hexo(__dirname); var is = require('../../../lib/plugins/helper/is'); it('is_current', () => { is.current.call({path: 'index.html', config: hexo.config}).should.be.tr...
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M20 12c0-1.1.9-2 2-2V4H2.01v6c1.1 0 1.99.9 1.99 2s-.89 2-2 2v6h20v-6c-1.1 0-2-.9-2-2zm-4.42 4.8L12 14.5l-3.58 2.3 1.08-4.12-3.29-2.69 4.24-.25L12 5.8l1.54 3.95 4.24.25-3.29 2.69 1.09 4.11z" /> , ...
var test = require("tape"); var intercept = require("intercept-stdout"); var Logger = require("../../src/logger.js"); var Logger2 = require("../../src/logger.js"); //test("should skip low level log by default",function(t){ // Logger.debug("test"); // // t.end(); //}); test("should keep the verbose config",functi...
$('.selectize').selectize({ plugins: ['remove_button'], selectOnTab: true, closeAfterSelect: true }); $('.datepicker').datepicker({ format: 'dd/mm/yyyy', autoclose: true, todayHighlight: true }); $('[data-toggle="popover"]').on('click', function(e){ e.preventDefault(); }).popover(); $('[d...
import React from 'react' import StreamList from './StreamList' import StreamCardContainer from './StreamCardContainer' export default ({ streams }) => ( <StreamList> {streams.map((stream) => ( <StreamCardContainer streamId={stream.id} key={stream.id} /> ))} {streams.length === 0 && <p cl...
module.exports = function(DwUrlExtraction) { };
describe("nesting views", function () { describe("delegating events", function () { it('should delegate events to the parent view only', function () { var subViewSpy = sinon.spy(), viewSpy = sinon.spy(); var SubView = Thumbs.View.extend({ clickEvent: ...
(google_async_config = window.google_async_config || {})['ca-pub-0826595092783671'] = {"sra_enabled":false};
import EventEmitter from 'events' import {Assertion, TestStart, TestEnd, SuiteStart, SuiteEnd} from '../Data.js' export default class MochaAdapter extends EventEmitter { constructor (mocha) { super() this.mocha = mocha this.origReporter = mocha._reporter mocha.reporter((runner) => { this.runn...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See http://js.arcgis.com/3.17/esri/copyright.txt for details. //>>built require({cache:{"url:esri/dijit/metadata/types/arcgis/common/templates/LanguageCode.html":'\x3cdiv data-dojo-attach-point\x3d"containerNode"\x3e\r\n \x3cdiv data-d...
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, global.i18next = factory()); }(this, function () { 'use strict'; function _typeof2(obj) { if (typeof...
import { BYTES_IN_KIB } from './constants'; /** * Function that allows a number with an X amount of decimals * to be formatted in the following fashion: * * For 1 digit to the left of the decimal point and X digits to the right of it * * * Show 3 digits to the right * * For 2 digits to the left of the decimal poi...
(function(win, doc, App){ "use strict"; App.Models = {}; App.Models.Instances = {}; App.Collections = {}; App.Collections.Instances = {}; App.Views = {}; App.Views.Instances = {}; App.Routers = {}; App.Routers.Instances = {}; App.Events = {}; App.Languages = {}; App.Lan...
module.exports={title:'Adobe',slug:'adobe',svg:'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Adobe icon</title><path d="M15.1 2H24v20L15.1 2zM8.9 2H0v20L8.9 2zM12 9.4L17.6 22h-3.8l-1.6-4H8.1L12 9.4z"/></svg>',get path(){return this.svg.match(/<path\s+d="([^"]*)/)[1];},source:'https://ww...
import createElement from './exports/createElement'; import findNodeHandle from './exports/findNodeHandle'; import processColor from './exports/processColor'; import render from './exports/render'; import unmountComponentAtNode from './exports/unmountComponentAtNode'; import NativeModules from './exports/NativeModules'...
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import _extends from "@babel/runtime/helpers/esm/extends"; import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@material-ui/utils"; import * as React from 'react'; import { isFragment } from 'react-is'; imp...
/*! * Quantum - http levels definition * Copyright(c) 2012 Jake Luer <jake@qualiancy.com> * MIT Licensed */ /*! * Level Definition */ module.exports = { levels: { GET: 0 , POST: 1 , PUT: 2 , HEAD: 3 , DELETE: 4 , OPTIONS: 5 ...
define({ "queries": "Vaicājumi", "addNew": "Pievienot jaunu", "newQuery": "Jauns vaicājums", "queryLayer": "Vaicājuma slānis", "setSource": "Iestatīt", "setDataSource": "Iestatīt datu avotu", "name": "Nosaukums", "querySource": "Datu avots", "queryName": "Uzdevuma nosaukums", "queryDefinition": "Fil...
/**! * AngularJS file upload/drop directive with http post and progress * @author Danial <danial.farid@gmail.com> * @version 1.3.1 */ (function() { var angularFileUpload = angular.module('angularFileUpload', []); angularFileUpload.service('$upload', ['$http', '$timeout', function($http, $timeout) { ...
/** * @file test for rule css-in-head * @author nighca<nighca@live.cn> */ var path = require('path'); var htmlcs = require('../../../../'); var parse = require('../../../../lib/parse'); var rule = path.basename(__dirname); describe('rule ' + rule, function () { var result = htmlcs.hintFile(path.join(__dirname...
module.exports={A:{A:{"2":"K D G E A B iB"},B:{"1":"AB","260":"2 C d J M H I"},C:{"1":"0 1 3 4 7 8 9 y z IB BB CB DB GB","2":"2 fB FB F N K D G E A B C d J M H I O ZB YB","66":"P Q","260":"6 R S T U V W X Y Z a b c e f g h i j k l m n o L q r s t u v w x"},D:{"1":"3 4 9 IB BB CB DB GB SB OB MB lB NB KB AB PB QB","2":"2...
/** * @class Autolinker * @extends Object * * Utility class used to process a given string of text, and wrap the matches in * the appropriate anchor (&lt;a&gt;) tags to turn them into links. * * Any of the configuration options may be provided in an Object (map) provided * to the Autolinker constructor, which w...
"use strict"; /* * * ooiui/static/js/models/aa/AlertFilterView.js * Validation model for Alerts and Alarms Page. * * Dependencies * Partials * - ooiui/static/js/partials/compiled/alertPage.js * Libs * - ooiui/static/lib/underscore/underscore.js * - ooiui/static/lib/backbone/backbone.js * Usage * */ Backbo...
/////////////////////////////////////////////////////////////////////////// // Copyright © Esri. 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.ap...
var $askFor = require('ask-for'); module.exports = function(grunt){ grunt.registerMultiTask( 'confirm', 'ask for confirm', function(){ var done = this.async(); var conf = this.options(); var data = this.data; var ask = '[y/n]'; var doAsk = function(){ grunt.log.writeln(); g...
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ '...
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2015 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ /** * This is the core internal game clock. * * It manages the elapsed time and calculation of elapsed values, us...
function Deck(){ this.cards = [] this.build() this.shuffle() } Deck.prototype={ shuffle: function(){ var arr = this.cards for (var i = 0; i < arr.length; i++) { var rand = Math.floor(Math.random()*52) var temp = arr[i] arr[i] = arr[rand] a...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), uglify: { options: { banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' }, dist: { files: { 'public/js/app.min.js': ['public/js/app.js'] ...
module.exports = function (wallaby) { var config = require('../../etc/wallaby/wallaby.base')(wallaby) return Object.assign(config,{ // Extended options go here }); };
MSG.title = "Webduino Blockly 課程 3-5:超音波傳感器控制 Youtube 音量"; MSG.subTitle = "課程 3-5:超音波傳感器控制 youtube 的音量"; MSG.demoDescription = "使用超音波傳感器,控制 youtube 的音量變化,越靠近越小聲,越遠越大聲。";
/*! jQuery UI - v1.10.4 - 2014-03-23 * http://jqueryui.com * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ (function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(e.times||5)+(l?1:0),c=e.duration...
'use strict'; var split = String.prototype.split; function compareNatural(value, other) { var index = -1, valParts = split.call(value, '.'), valLength = valParts.length, othParts = split.call(other, '.'), othLength = othParts.length, length = Math.min(valLength, othLength); while (+...
if (!String.prototype.trim) { String.prototype.trim = function () { return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); }; }
/* * routes/api/index.js */ var BASE_PATH = '../../lib/'; var email = require(BASE_PATH + 'email') , InviteCode = require(BASE_PATH + 'models').InviteCode module.exports = { config: require('./config'), require_param: require_param, invite_new: invite_new } /* * Require a request parameter is present or...
/*jslint plusplus: true */ (function () { "use strict"; var sID, iIterator, oRedmond = [ { title: { "#text": "Engineering Development Manager" } }, { title: { "#text": "Pr...
var absURLRegEx = /^[^\/]+:\/\//; function readMemberExpression(p, value) { var pParts = p.split('.'); while (pParts.length) value = value[pParts.shift()]; return value; } var baseURLCache = {}; function getBaseURLObj() { if (baseURLCache[this.baseURL]) return baseURLCache[this.baseURL]; // normali...
/* global moment */ var parseDateFormats = ['DD MMM YY @ HH:mm', 'DD MMM YY HH:mm', 'DD MMM YYYY @ HH:mm', 'DD MMM YYYY HH:mm', 'DD/MM/YY @ HH:mm', 'DD/MM/YY HH:mm', 'DD/MM/YYYY @ HH:mm', 'DD/MM/YYYY HH:mm', 'DD-MM-YY @ HH:m...
var sampleApp = angular.module('sampleApp', []);
import React, { Component } from 'react'; import { bindActionCreators } from 'redux'; import {camelise} from 'nodes/processors/uibuilder/utils'; import { actionCreators as canvasActions, selector } from '../..'; import { connect } from 'react-redux'; @connect(selector, (dispatch) => { return{ actions: bindActio...
(function (controllers, undefined) { /** * @ngdoc controller * @name Merchello.Dashboards.Settings.Shipping.Dialogs.ShippingMethodController * @function * * @description * The controller for the adding / editing shipping methods on the Shipping page */ controllers.ChaseGate...
/**! * * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file. */ 'use strict'; var AmpState = require('ampersand-state'); var FeatureCollection = require('./feature-collection'); var FeaturesModel = AmpState.extend({ collections: { developer: FeatureCollection, entitlement: FeatureCollection, ...
/** * This module is responsible for drawing an image to an enabled elements canvas element */ (function ($, cornerstone) { "use strict"; /** * Internal API function to draw an image to a given enabled element * @param enabledElement * @param invalidated - true if pixel data has been invalid...
require('dotenv').load(); module.exports = { development: { client: 'pg', connection: 'postgres://localhost/noobish' }, production: { client: 'pg', connection: process.env.DATABASE_URL + '?ssl=true' } };
describe("module:ngSanitize.service:$sanitize", function() { beforeEach(function() { browser.get("./examples/example-example67/index-jquery.html"); }); it('should sanitize the html snippet by default', function() { expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). toBe('<p>an ...
var Promise = require('es6-promise').Promise; describe('Helpers Misc.', function () { // TODO test afterFlush describe.skip('Built in Tracker helpers', function () { var server = meteor(); var client = browser(server); it('afterFlush should schedule function for next flush', function () { return...
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); y...
// This file serves as a common location for all your action constants export const SOMETHING_HAPPENED_SUCCESSFULLY = "SOMETHING_HAPPENED_SUCCESSFULLY"; export const SOMETHING_FAILED = "SOMETHING_FAILED";
/* Helper class that will increase build version of the app on each build. This way we will forse main plugin to install www folder from the assets. Otherwise - it will use the cached version. */ var path = require('path'); var plist = require('simple-plist'); var fs = require('fs'); var xmlHelper = require('./xmlHelpe...
"use strict"; // Git operations backed by shelling out. let a = require("atom"); let BufferedProcess = a.BufferedProcess; let Directory = a.Directory; let fs = require("fs"); let path = require("path"); let common = require("./common"); exports.getContext = function (filePath) { return Promise.all([locateGit(), c...
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; function load({ id = 0, ...rest }) { return [ { id:...
run_spec(__dirname, ["typescript", "babel"], { arrowParens: "always" }); run_spec(__dirname, ["typescript", "babel"], { arrowParens: "avoid" });
import Ember from "ember-metal/core"; import {reduceComputed, ReduceComputedProperty } from "ember-runtime/computed/reduce_computed"; import EnumerableUtils from "ember-metal/enumerable_utils"; import {create} from "ember-metal/platform"; import {addObserver} from "ember-metal/observer"; import EmberError from "ember-m...
'use strict'; var pathUtil = require('path'); var fs = require('fs'); var Q = require('q'); var mkdirp = require('mkdirp'); var rimraf = require('rimraf'); var modeUtil = require('./utils/mode'); var getCriteriaDefaults = function (passedCriteria) { var criteria = passedCriteria || {}; if (typeof criteria.empty ...
'use strict'; var Promise = require('../../ext/promise'); var path = require('path'); var fs = require('fs'); var Task = require('../../models/task'); var SilentError = require('silent-error'); function createServer(options) { var instance; var Server = (require('tiny-lr')).Server; S...
"use strict"; var fs = require ("fs"); var http = require ("http"); var tftp = require ("../../lib"); /* This example demonstrates the usefulness of the streams. When the client requests a file named "node.exe", it obtains the data from a remote location, in this case via http. */ var handleError = funct...
/*====================================================== ************ Views ************ ======================================================*/ app.views = []; var View = function (selector, params) { var defaults = { dynamicNavbar: false, domCache: false, linksView: undefined,...
'use strict'; var Utils = require('./utils') , uuid = require('node-uuid'); /** * The transaction object is used to identify a running transaction. It is created by calling `Sequelize.transaction()`. * * To run a query under a transaction, you should pass the transaction in the options object. * @class Transact...
//>>built define("dijit/_editor/nls/zh-hk/LinkDialog",{createLinkTitle:"\u93c8\u7d50\u5167\u5bb9",insertImageTitle:"\u5f71\u50cf\u5167\u5bb9",url:"URL\uff1a",text:"\u8aaa\u660e\uff1a",target:"\u76ee\u6a19\uff1a",set:"\u8a2d\u5b9a",currentWindow:"\u73fe\u884c\u8996\u7a97",parentWindow:"\u4e0a\u5c64\u8996\u7a97",topWindo...
var utils = require('../utils'), nodes = require('../nodes'); /** * This is a helper function for the slice method * * @param {String|Ident} vals * @param {Unit} start [0] * @param {Unit} end [vals.length] * @return {String|Literal|Null} * @api public */ (module.exports = function slice(val, start, end) { ...
/* * @name Triangle Strip * @description 由 Ira Greenberg 提供的范例。使用 vertex() 函数和 beginShape(TRIANGLE_STRIP) 模式生成闭环。 * 这个 outsideRadius 和 insideRadius 变量分别控制环的内外半径。 */ let x; let y; let outsideRadius = 150; let insideRadius = 100; function setup() { createCanvas(720, 400); background(204); x = width / 2; y = ...
/* * https://github.com/davidchambers/Base64.js */ ;(function () { var object = typeof exports != 'undefined' ? exports : this; // #8: web workers var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; function InvalidCharacterError(message) { this.message = message; } Invali...
var express = require('express'); var router = express.Router(); var util = require('util'); var constants = require('../util/constants'); var utils = require('../util/utils') var string = function(coverage) { router.put('/:scenario', function(req, res, next) { if (req.params.scenario === 'null') { ...
"use strict"; var app = { initialize: function () { document.addEventListener('deviceready', this.onDeviceReady, false); }, onDeviceReady: function () { app.receivedEvent('deviceready'); if (!window.device) { window.device = { platform: 'Browser' ...
/** * @fileOverview Encapsulates data and logic for 2d points. * @author <a href="http://benjaminbojko.com">Benjamin Bojko</a> * Copyright (c) 2015 Big Spaceship; Licensed MIT */ 'use strict'; /** * @constructor * @param {number=} x * @param {number=} y */ shinejs.Point = function(x, y) { /** @type {number}...
//目次 //ブラウザ判定、body,formのid,class付与 //ConfigManagerからid取得 //ID付与(IDがない場合)(nameが被った場合、単にiを付与する方が処理が軽い) //事前コンバート //ConfigManagerからclass取得 //ConfigManagerからvalidation取得 //new //action // window.onunload = function(){} // if(window.name != "xyz"){ // location.reload(); // window.name = "xyz"; // } jQuery.noConflict(); j...
/** * The Route class is for defining a route * * @class Route * @constructor * @module Router * @author Emilio Mariscal (emi420 [at] gmail.com) * @author Martin Szyszlican (martinsz [at] gmail.com) */ (function ($, Mootor) { "use strict"; var Route; // Private constructors Route = Mootor.Rout...
////////////////////////////////////////////////////////////////////////// // // // This is a generated file. You can view the original // // source in your browser if your browser supports source maps. // // Source maps are s...
let tagElements = document.querySelectorAll('.tag') let tagField = document.querySelector('#tagField') let tagsId = document.querySelector('#tagsId') for(let t of tagElements){ t.addEventListener('click',function(){ console.log(this) console.log(this.innerText) tagField.value+= this.innerText+'...
"use strict"; var request = require("request"); var LuisRecognizer = (function () { function LuisRecognizer(models) { if (typeof models == 'string') { this.models = { '*': models }; } else { this.models = (models || {}); } } LuisRecognizer.prototype.re...
'use strict'; function groupDataTypes($, path) { let firstLi; $('nav a').each(function() { /* eslint-disable no-invalid-this */ if ($(this).attr('href').startsWith('class/lib/data-types.js~')) { const li = $(this).closest('li'); if (!firstLi) { firstLi = li; firstLi.prepend('<a ...
var fs = require('fs'); var path = require('canonical-path'); var Package = require('dgeni').Package; var basePackage = require('../api-builder/docs-package'); var targetPackage = require('../api-builder/target-package'); var cheatsheetPackage = require('../api-builder/cheatsheet-package'); var PROJECT_PATH = path.res...
var paginationLg = document.getElementById("paginationLg"); var comp = new u.pagination({el:paginationLg,showState:false}); comp.update({totalPages: 100,pageSize:20,currentPage:1,totalCount:200}); var paginationDefault = document.getElementById("paginationDefault"); var comp = new u.pagination({el:paginationDefault,jum...
window.Utils = (function () { var Utils = {}; var queue = []; var running = false; var pop = function () { if (queue.length) { setTimeout(function() { window.location = encodeURI(queue.shift()); pop(); }, 0); } else { running = false; } }; Utils.redirect = fun...
#!/usr/bin/env node 'use strict'; const chalk = require('chalk'); const {join} = require('path'); const semver = require('semver'); const {execRead, execUnlessDry, logPromise} = require('../utils'); const {projects} = require('../config'); const push = async ({cwd, dry, version}) => { const errors = []; const ta...
import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance | Identity manager'); test('custom identity managers work', function(assert) { let book = server.create('book'); assert.equal(book.id, 'a'); });
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ const test = requ...
MyComponents.Rate = React.createClass({ render: function() { var keyMap = {'BEG': 'Beginning', 'END': 'End', 'RATE': 'Rate', 'RQ': 'Type of Rate', 'RR': 'Other Info', 'DESC': 'Description', } var vals = []; for(var key in this.props.rate) { vals.push(<span key={key}>{keyMap[key]}: {this.props.rate[key]}...
import Link from 'next/link' export default function Person({ person }) { return ( <li> <Link href="/person/[id]" as={`/person/${person.id}`}> <a>{person.name}</a> </Link> </li> ) }
'use strict' /** * promiseOrCallback will convert a function that returns a promise * into one that will either make a node-style callback or return a promise * based on whether or not a callback is passed in. * * @example * prompt('input? ').then(function (input) { * // deal with input * }) * var prompt2 =...
"use strict"; const execa = require("execa"); const ipRegex = require("ip-regex"); const gwArgs = "path Win32_NetworkAdapterConfiguration where IPEnabled=true get DefaultIPGateway,Index /format:table".split(" "); const ifArgs = "path Win32_NetworkAdapter get Index,NetConnectionID /format:table".split(" "); const par...
/** * WindowManager.js * * Released under LGPL License. * Copyright (c) 1999-2017 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ /** * This class handles the creation of native windows and dialogs. This class can be extended t...
import "./public-path"; it("should prefetch correctly", () => { expect(document.head._children).toHaveLength(1); // Test prefetch from entry chunk const link = document.head._children[0]; expect(link._type).toBe("link"); expect(link.rel).toBe("prefetch"); expect(link.href).toBe("https://example.com/public/path/...
$(window).on('load', function() { //Initialize skrollr and save the instance. var s = skrollr.init({ edgeStrategy: 'set', constants: { myconst: 300, my500: 500 }, easing: { half1: function() { return 0.5 } } }); //Counts how many assertions will be needed for the tests. var countAssertions = function...