text stringlengths 8.5k 48.7k |
|---|
// //--[[
// description: 战斗内各种消耗计算(大陆版)
// author: scott (<EMAIL>)
// date: 20171129
// ATTENTION:引用外部参数不可在该内中修改
// //--]]
const cacheReader = require('../../../../cache/cacheReader');
const consts = require('../consts');
const TAG = 'numberTest ---';
const DEBUG = 1;
class Cost {
constructor() {
this._... |
const ELEMENTS = [
'anemo',
'pyro',
'cryo',
'electro',
'hydro',
'geo'
]
const WEAPONS = [
'bow','catalyst','claymore','polearm','sword'
]
const STRINGS = {
'local': "Local Specialty",
'common': "Common Material"
}
const ASSETS = {
characterImg: "/assets/character/",
elementImg: "/assets/element/",... |
/* eslint-disable no-bitwise */
import L from 'leaflet'
import Arc from './arc'
import Coordinate from './coordinate'
// Avoid leaflet dependency
const latLng = (typeof L !== 'undefined' && L !== null)
? (a, b, c) => L.latLng(a, b, c)
: function latLng(a) {
if (a.constructor === Array) {
if (a.length ==... |
'use strict';
var $ = require('./lib/tools/dm')
var util = require('./lib/tools/util')
var conf = require('./lib/conf')
var is = require('./lib/tools/is')
var Query = require('./lib/tools/query')
var consoler = require('./lib/tools/consoler')
var KP = require('./lib/tools/keypath')
var nextTick = require('./lib/tools/... |
// ** **********************************************************************
// Cookie name is 'ProhitsLogin'.
// It is not used to check login username nor password.
// It is only used to protect that user forgot to logout or other user using
// history to view records.
// The cookie timeout is half day
// The cookie... |
"use strict";
/* jshint node: true */
/*
* This builds on the webServer of previous projects in that it exports the current
* directory via webserver listing on a hard code (see portno below) port. It also
* establishes a connection to the MongoDB named 'cs142project6'.
*
* To start the webserver run the command... |
import layers from '../static/style/layers.js'
const controlsLocation = 'bottom-right';
const layersColoursDict = {
helpPoints: '#ffd500',
informationPoints: '#ffee00',
bloodDonation: '#990000',
socialFacilities: '#00d5ff',
pharmacies: '#880044',
hospitals: '#ff1111',
diplomatic: '#446688'... |
import { Plugin, NodeSelection, TextSelection } from 'prosemirror-state';
import { lift, setBlockType, toggleMark, wrapIn } from 'prosemirror-commands';
import { wrapInList } from 'prosemirror-schema-list';
import {
isInTable,
deleteTable,
mergeCells,
splitCell,
addRowBefore,
addRowAfter,
deleteRow,
add... |
import * as THREE from 'three';
import {GLTFLoader} from "three/examples/jsm/loaders/GLTFLoader";
import {OrbitControls} from "three/examples/jsm/controls/OrbitControls";
import MinGeometryFinder from "./MinGeometryFinder";
import MinSTLExporter from "./MinSTLExporter";
class MainStage {
constructor() {
th... |
function find_distance(selector){
var x_location = $(selector).parent().css('left'), y_location = $(selector).parent().css('top');
return {
x: parseInt(x_location.substring(0, x_location.length-2)),
y: parseInt(y_location.substring(0, y_location.length-2))
};
}
var log_events = false;
var list_skill_id = 0;
... |
/*
How the Earth map works
1. Find an API or endpoint providing a live feed of field sensing devices that capture air pollution, temperature, humidity or other interesting probe values
2. Write ana AJAX request to query the feed either on map load or at each map movement
3. Remap the sensor values to a standard json ... |
//http://lawrence.ecorp.net/inet/samples/js-date-fx.shtml
Date.prototype.DAYNAMES = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
Date.prototype.SHORTDAYS = ["Su","M","Tu","W","Th","F","Sa"];
Date.prototype.MONTHNAMES = ["January", "February", "March", "April", "May", "June", "Jul... |
var THREE = require('three')
var raf = require('raf')
var lsb = require('lsb')
module.exports = function(options) {
var container
var containerElement
var canvasWidth, canvasHeight
var camera, renderer, brush
var projector, plane, scene, grid, shareDialog
var mouse2D, mouse3D, raycaster, objectHovered
va... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
const PREC = {
NONE: 0,
ASSIGNMENT: 1, // =
OR: 2, // or
AND: 3, // and
EQUALITY: 4, // == !=
COMPARISON: 5, // < > <= >=
TERM: 6, // + -
FACTOR: 7, // * /
UNARY: 8, // ! -
CALL: 9, /... |
/*
* Copyright (c) 2012 The Chromium Authors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of... |
"use strict";
const path = require("path");
const crypto = require("crypto");
const debugGenerator = require("debug");
const debug = debugGenerator("broccoli-eyeglass");
const hotCacheDebug = debugGenerator("broccoli-eyeglass:hot-cache");
const persistentCacheDebug = debugGenerator("broccoli-eyeglass:persistent-cache"... |
/////////////////////////////////////////////////////////////////////////////////////////////
//
// This is a Javascript library to write multi-browser pages comprising CS Chem3D Plugin/ActiveX.
//
//
// You will use the following three functions in your web pages:
//
// c3d_insert3dStr(str) - insert a chem3d object... |
var events = require('events')
,sys = require('util')
,utils = require('./utils')
,url=require('url');
//****** Constants ******
var HOST_LISTEN = "127.0.0.1";
var PORT_LISTEN = 10010;
var MAX_VALUE = Number.MAX_VALUE;
var TOP_VIEW = 3; // The maximum number of viewable requests that spent most time for ex... |
/**
* This work is based on original code developed and copyrighted by TNO 2020.
* Subsequent contributions are licensed to you by the developers of such code and are
* made available to the Project under one or several contributor license agreements.
*
* This work is licensed to you under the Apache Lice... |
'use strict';
function isMobile(){
var isMobile = (/iphone|ipod|android|ie|blackberry|fennec/).test
(navigator.userAgent.toLowerCase());
return isMobile;
}
var SplashCtrl = function($scope, $rootScope, State, $location, Game, $facebook, Charity, Campaign, $filter, $analytics) {
$rootScope.sp... |
/*
SHEETS CODE
https://developers.google.com/sheets/api/quickstart/js
*/
// Client ID and API key from the Developer Console
const CLIENT_ID = '456390951586-96qcaqi78249qdb4m89hac6ulu11ogbq.apps.googleusercontent.com';
const API_KEY = '<KEY>';
// Array of API discovery doc URLs for APIs used by the quickstart
const... |
"use strict";
/*
GroundDB is a thin layer providing Meteor offline database and methods
Concept, localstorage is simple wide spread but slow
GroundDB saves outstanding methods and minimongo into localstorage at window
unload, but can be configured to save at any changes and at certain interval(ms)
When the app loa... |
/*!
* satellite-js v3.0.1
* (c) 2013 <NAME> and UCSC
* https://github.com/shashwatak/satellite-js
* License: MIT
*/
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = sgp4init;
var _constants = require("../constants");
var _dpper = _interopRequireDefault(require(".... |
"use strict";
/* eslint-disable promise/no-promise-in-callback */
/* eslint-disable promise/no-callback-in-promise */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
var __assign = (this && this.__assign) || function () {
__assign = Object... |
'use strict'
const tap = require('tap')
const isTbr = require('../index')
var options = {
skoleid: 3830,
postnummer: '',
gatenavn: 'Djevelgaten',
husnummer: '666'
}
options.postnummer = 3960
tap.equal(isTbr(options), true, 'Nome vgs, avdeling Søve, avdeling Søve returns true from 3960 Stathelle')
options.pos... |
const Apify = require('apify');
const request = require('request-promise');
/**
* Gets attribute as text from a ElementHandle.
* @param {ElementHandle} element - The element to get attribute from.
* @param {string} attr - Name of the attribute to get.
*/
async function getAttribute(element, attr){
try{
... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Wrapper from '../../../../../../content/containers/Fragments/Template/wrapper';
import * as storeAction from '../../../../../../foundation/redux/globals/DataStoreSingle/actions';
import StandardFilters from '... |
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {
ARCADE_MODE_URL,
DEFAULT_WIDTH,
FPS,
IS_HIDPI,
IS_IOS,
IS_MOBILE,
} from './constants';
import {
createCanvas,
decodeBase64T... |
const quotes = [
{highlight : "Half the time I don't know the restaurants instagram handle. ",
quote : "They usually tag the restaurant's location in an Instagram Story because 'half the time I don't know their handle.' ",
source : "2.35"},
{highlight : "They had a bad experience with a restaurants that kept sending em... |
'use strict';
'require view';
'require fs';
'require poll';
'require ui';
const pollIval = 2;
//https://www.rfc-editor.org/rfc/rfc1213
const iphelp = [
{key : 'Forwarding', text : '1 - acting as router, 2 - NOT acting as router', err : false},
{key : 'DefaultTTL' , text : 'The default value inserted into the ... |
import React, { Component } from 'react'
import {
StyleSheet,
Animated,
TouchableOpacity,
PanResponder,
Image,
View,
Dimensions,
ScrollView,
} from 'react-native'
import _ from 'lodash'
import AnimateBottom from './AnimateBottom';
import RootSiblingsManager, { RootSiblingParent } from 'react-native-roo... |
import { aframeHelper, nafHelper, threeHelper } from "harlyq-helpers"
const NUM_FACES = 6
const UNEXPOSED_FRAME = 7
const TEXTURE_COLS = 4
const TEXTURE_ROWS = 2
const EMPTY_ARRAY = []
const INNER_SIDE = 6
const NO_SIDE = -1
const PI_2 = Math.PI*.5
const PI = Math.PI
const FLOATS_PER_POSITION = 3
const FLOATS_PER_QUAT... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
"use strict";
// Require Third-party Dependencies
const lazy = require("@slimio/lazy");
/**
* @class
* @function Unit
* @param {object} options Unit options
* @param {!string} options.name Unit name
* @param {!number} options.type Unit type
* @param {!string} options.symbol Unit symbol
* @param {number} [optio... |
var FRAME = {
MAIN: 1,
INTERPRETING: 2
};
var interpretingChannelURL;
var interpreterMode;
function removeOldContent(){
var content = ['interpreterChannel', 'controllerContainer'];
content.forEach((item, index) => {
var elem = document.getElementById(item);
if (elem != null){
... |
/*
* Map editor mode :
* 0 = reading
* 1 = add poi
*/
var EditorMode = Object.freeze({
"READING": 0,
"ADD_POI": 1,
"FOLLOW_POSITION": 2,
"POI_EDIT": 3,
properties: {
0: {
name: "READING",
value: 0
},
1: {
name: "ADD_POI",
v... |
import { loadModules } from 'esri-loader';
import { routerRedux } from 'dva/router';
import { MathUtil } from './MathUtil';
import { MapToolManager } from './maptool/MapToolManager';
import ThematicDataParser from './ThematicDataParser';
import MapCfgParser from './MapCfgParser';
import ThematicArea from './ThematicAre... |
import { global, keyMultiplier, p_on } from './vars.js';
import { vBind, clearElement, popover, darkEffect, easterEgg } from './functions.js';
import { loc } from './locale.js';
import { racialTrait, races, traits, biomes, planetTraits } from './races.js';
import { armyRating } from './civics.js';
import { craftingRati... |
// -------------------- extra functions to work with narration --------------------
function extraCode(whichCode) {
// console.log("extraCode is " + whichCode);
let lesson = [];
function makeLesson(lessonText) {
let mylesson = [], asIs = false;
for (let i = 0; i < lessonText.length; i++) {
if (less... |
// Node.js API.
const assert = require('assert')
// Exceptions that you can catch by type.
const Interrupt = require('interrupt')
// A Promise wrapper that captures `resolve` and `reject`.
const { Future } = require('perhaps')
// A linked-list to track promises, scrams.
const List = require('./list')
// Return the ... |
const EventEmitter = require('events');
const Os = require('os');
const Bloomrun = require('bloomrun');
const Errio = require('errio');
const Heavy = require('heavy');
const _ = require('lodash');
const Pino = require('pino');
const TinySonic = require('tinysonic');
const SuperError = require('super-error');
const Co =... |
// inspired from Makuhin's Home Page
// https://hakuhin.jp/js/gamepad.html
(function() {
const platform = 0;
// ------------------------------------------------------------
// Gemapad API に対応しているか調べる
// ------------------------------------------------------------
if (!(window.Gamepad)) return;
if (!(navig... |
'use strict';
const fs = require('fs');
const {ArgumentParser} = require('argparse');
const path = require('path');
const cliProgress = require('cli-progress');
const {BarFormat} = require('cli-progress').Format;
const WaitNotify = require('wait-notify');
const SortedArray = require('sorted-array-type');
const logge... |
"use strict";
var dummy = "npc_dota_hero_wisp";
var availableHeroes = {};
var currentHero = null;
var abilityBar = null;
var buffBar = null;
var healthBar = null;
var chatLines = [];
var cosmeticAbilityBar = null;
var attacksRequested = 0;
var newPlayer = false;
var attackOff = false;
//GameUI.SetCameraPitchMin(0);
... |
var ImageMod; // the single identifier needed in the global scope
var $builtinmodule;
if (!ImageMod) {
ImageMod = {};
ImageMod.canvasLib = [];
}
$builtinmodule = function (name) {
var screen;
var pixel;
var eImage;
var mod = {__name__: new Sk.builtin.str("image")};
var updateCanvasAndSuspe... |
// module to control the Tools options (click to edit, to re-geenerate, tp add)
"use strict";
toolsContent.addEventListener("click", function(event) {
if (customization) {tip("Please exit the customization mode first", false, "warning"); return;}
if (event.target.tagName !== "BUTTON") return;
const button = even... |
/* MIT license */
module.exports = {
rgb2hsl: rgb2hsl,
rgb2hsv: rgb2hsv,
rgb2hwb: rgb2hwb,
rgb2cmyk: rgb2cmyk,
rgb2keyword: rgb2keyword,
rgb2xyz: rgb2xyz,
rgb2lab: rgb2lab,
rgb2lch: rgb2lch,
hsl2rgb: hsl2rgb,
hsl2hsv: hsl2hsv,
hsl2hwb: hsl2hwb,
hsl2cmyk: hsl2cmyk,
hsl2keyword... |
/*global Mousetrap:true */
import {
default as computed,
on,
observes
} from "ember-addons/ember-computed-decorators";
import { categoryHashtagTriggerRule } from "discourse/lib/category-hashtags";
import { search as searchCategoryTag } from "discourse/lib/category-tag-search";
import { cookAsync } from "discourse... |
/* Configure script for libxslt, specific for Windows with Scripting Host.
*
* This script will configure the libxslt build process and create necessary files.
* Run it with an 'help', or an invalid option and it will tell you what options
* it accepts.
*
* March 2002, <NAME> <<EMAIL>>
*/
/* The source directo... |
import * as t from '../constants/ActionTypes';
import _ from 'lodash';
import { arrange } from '../funcs/fields';
const initialState = {
ecode: 0,
emsg: '',
collection: [],
itemData: {},
options: {},
indexLoading: false,
visitedCollection: [],
visitedIndex: -1,
optionsLoading: false,
filte... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
import { Matcher } from 'name-suggestion-index';
import { fileFetcher, locationManager } from '../core';
import { presetManager } from '../presets';
// This service contains all the code related to the **name-suggestion-index** (aka NSI)
// NSI contains the most correct tagging for many commonly mapped features.
// S... |
// global variables
var canvas;
var renderer;
var stage;
var game;
//user input
var keysPressed = [];
var mouseDown = false;
// preloader
$(document).ready(function() {
// load assets
var loader = test = new PIXI.AssetLoader([
// background
"img/github_game_off_2013_resized.png",
"img/backgro... |
'use_strict';
var Model = require('../model.js'),
validator = require('nodee-utils').validator,
object = require('nodee-utils').object;
/*
* Model "validations" extension:
* adds methods to validate and get/set model instance data,
* and get/set validation errors
*
* @example: modelInstance.fill({ ...da... |
"use strict";
/********************************************************************************
* Copyright (c) 2017-2020 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/lega... |
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.definePrope... |
//<![CDATA[
<!--
function Client(){
//if not a DOM browser, hopeless
this.min = false; if (document.getElementById){this.min = true;};
this.ua = navigator.userAgent;
this.name = navigator.appName;
this.ver = navigator.appVersion;
//Get data about the browser
this.mac = (this.ver.indexO... |
//@line 38 "/builds/slave/rel-m-rel-xr-osx64-bld/build/toolkit/mozapps/downloads/content/helperApps.js"
var Cc = Components.classes;
var Ci = Components.interfaces;
var gRDF;
const CLASS_MIMEINFO = "mimetype";
const CLASS_PROTOCOLINFO = "scheme";
// namespace prefix
const NC_NS = "http... |
"use strict";
exports.__esModule = true;
exports.CommonInstanceDependencies = exports.InstanceProperties = exports.StaticProperties = exports.BuiltIns = exports.PromiseDependenciesWithIterators = exports.PromiseDependencies = exports.CommonIterators = void 0;
var _data = _interopRequireDefault(require("../core-js-com... |
// Imports
import discord from "discord.js"
import numeral from "numeral"
import mkdir from "mkdirp"
import fst from "fs"
import fs from "fs/promises"
import hyperscape from "./hyperscape.js"
const config = JSON.parse(fst.readFileSync("./config.json"));
const client = new discord.Client();
const fmt = ... |
import isNil from 'lodash/isNil'
import intersection from 'lodash/intersection'
import isEqual from 'lodash/isEqual'
import keys from 'lodash/keys'
import sortedUniq from 'lodash/sortedUniq'
import difference from 'lodash/difference'
import {
trimExtentToWebMercatorMax,
calculateXTileRangeForExtent,
calculateYTil... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const THREE = require("three");
const ethereal = require("ethereal");
// import ResizeObserver from 'resize-observer-polyfill'
// import { NodeParser } from '@speigg/html2canvas/dist/npm/NodeParser'
// import Logger from '@speigg/html2canvas/d... |
import FittingMode from '../fitting.js'
const scale = function (v, smin, smax, dmin, dmax) {
if (!isFinite(smin) || !isFinite(smax) || smin === smax) {
return (dmax + dmin) / 2
}
return ((v - smin) / (smax - smin)) * (dmax - dmin) + dmin
}
class DataRenderer {
constructor(manager) {
this._manager = manager
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var aa_1 = require("./aa");
Object.defineProperty(exports, "aa", { enumerable: true, get: function () { return aa_1.aa; } });
var aai_1 = require("./aai");
Object.defineProperty(exports, "aai", { enumerable: true, get: function () { return aai... |
import Hammer from "hammerjs";
import { Signal } from "./signaling";
import { logger } from "./logging";
import { offset } from "./dom";
import * as events from "./bokeh_events";
import { getDeltaY } from "./util/wheel";
import { reversed, is_empty } from "./util/array";
import { isString } from "./util/types";
import ... |
import * as checkbox from './ui/checkbox.js'
import * as dimmer from './ui/dimmer.js'
import {renderTaskList, updateHeader} from "./ui/header.js"
import {setClass, escape, copy2clipboard} from "./ui/utils.js";
import {waitForTask} from "./tasks.js";
import * as modal from "./ui/modals.js";
async function getMemberData... |
// JavaScript Document by jacy
/**
定义基本常量
*/
var RESULT_SUCCESS = 'success';
var RESULT_FAIL = 'fail';
var WeiPHP_RAND_COLOR = ["#ff6600","#ff9900","#99cc00","#33cc00","#0099cc","#3399ff","#9933ff","#cc3366","#333333","#339999","#ff6600","#ff9900","#99cc00","#33cc00","#0099cc","#3399ff","#9933ff","#cc3366","#333333","... |
/*
* Biblioteca para overlay social e recomendação da shopback,
* @author: <NAME>[<EMAIL>], <NAME> [<EMAIL>]
* @description: Conjunto de Métodos para criação e funcionalidade dos Overlays Shopback.
* @version: 0.1.0 vitrine com UTM correta
*/
// LOAD JQUERY & Bibliotecas default
// Jquery Load
(function() {
var... |
"use strict"
const { handleOfferError } = require("./ErrorHelper");
const { updateCurrencyLabels } = require("./EventListeners");
const ExchangeHelper = require("./index")
const Utils = require("./UtilityFunctions");
function checkDecimals (value, decimals) {
const str = value.toString()
const strArr = str.split(... |
"use strict";
exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactDom = require("react-dom");
var _propTypes = _interopRequireDefault(require("prop-types"));
var _activeElement = _interopRequireDefault(require("dom-helpers/activeElement"));
var _cl... |
$(function() {
var c = new Coder("style-text");
c.load("<p><div class='bef_comment writecode'>/**</div>");
c.load("<div class='bef_comment writecode'> *</div>");
c.load("<div class='bef_comment writecode'> *hi,我的名字叫梁江浩,是一名Java开发工程师</div>");
c.load("<div class='bef_comment writecode'> *我的主要工作是编写一些网站的... |
/*
* Copyright (c) 2018 CoddyThemes
* Author: CoddyThemes
* This file is made for CURRENT TEMPLATE
*/
jQuery(document).ready(function(){
"use strict";
// here all ready functions
emorat_tm_menubarFixingToTop();
emorat_tm_article();
emorat_tm_imgtosvg();
emorat_tm_magnific_popup();
emorat_tm_owl_carousel... |
/* Banner 商城管理/内容管理/banner管理 */
// ==================
// 所需的各种插件
// ==================
import React from "react";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import P from "prop-types";
import Config from "../../../../config/config";
import {
Form,
Button,
Icon,
Input,
... |
var game_id;
var game_eligible = 0;
var magic_number;
var credits = 0;
var credits_bal = credits;
var profit;
//bets
var bets = [];
var bets_others = [];
var last_bet = [];
var last_bet_count = 0;
var last_bet_div_value = 0;
var bet_value = 1;
var time_left_to_bet = 0;
var bet_place = 0; // to be changes to 0
var bet_a... |
// Timeout for (any) http requests, in milliseconds
var g_xhr_timeout = 30000;
// Timeout for sending appmessage to Pebble, in milliseconds
var g_msg_timeout = 8000;
var g_server_url = "https://2-dot-pebble-notes.appspot.com";
var g_options = {
"sort_status": false,
"sort_date": false, // false, "asc", "desc"
"sor... |
// # Canvas factory
// Scrawl-canvas mediates between its system and <canvas> elements in the DOM using Canvas wrapper objects. The wrapper includes a handle to the visible element, but most work is done on a second <canvas> element - the __base Cell__ - which is not part of the DOM, thus excluded from a browser'... |
const countryNames = {
BLR: 'Q184',
CHE: 'Q39',
CHN: 'Q148',
ESP: 'Q29',
GBR: 'Q145',
IRL: 'Q27',
ISL: 'Q189',
MEX: 'Q96',
MKD: 'Q221',
POL: 'Q36',
UKR: 'Q212',
AFG: 'Q889',
AND: 'Q228',
ANT: 'Q25227',
ARE: 'Q878',
ATG: 'Q781',
AZE: 'Q227',
BHR: 'Q398',
BRB: 'Q244',
BRN: 'Q921',
... |
import Rule from './rule';
import Check from './check';
import standards from '../../standards';
import RuleResult from './rule-result';
import {
clone,
queue,
preload,
findBy,
ruleShouldRun,
performanceTimer
} from '../utils';
import doT from '@deque/dot';
import log from '../log';
import constants from '../cons... |
class Setting {
constructor(key, default_value, type) {
this.key = key;
this.default_value = default_value;
this.type = type;
this.value = cfg.get(this.key, this.default_value, this.type);
}
// Methods
get() {
return this.value;
}
set(new_value) {
if (this.value !== new_value) {
sw... |
const express = require('express');
const app = express();
const https = require('https');
const socket = require('socket.io')
const path = require('path');
const fs = require("fs");
const playerDatabase = require('../public/playerDatabase.json')
const Player = require('./Player');
const APIManager = require('./APIMana... |
/**
* Synced chart areas
*/
class ChartObserver {
/**
* Constructor
*/
constructor() {
this.observers = {}
}
/**
* Get reference to subscriptions for specified event
* @param {any} eventName
*/
events(eventName) {
return this.observers[eventName] = this.observers[ev... |
var GOOD_WORDS = [];
var PAST_DESCS = [];
$(window).on('load', function () {
// get date to check they are trying before giving up
START_DATE = new Date();
// get progress bar completion
size_progress_bar();
update_progress_bar();
// fill textbox forms with actual text
$("#grid_size_... |
/*
WebGLImageFilter - MIT Licensed
2013, <NAME> - phoboslab.org
<https://github.com/phoboslab/WebGLImageFilter>
*/
function GLProgram(gl, vertexSource, fragmentSource) {
const _collect = function (source, prefix, collection) {
const r = new RegExp('\\b' + prefix + ' \\w+ (\\w+)', 'ig');
source.replace(r, (ma... |
#!/usr/bin/env node
'use strict';
const path = require('path'),
fs = require('fs');
let { exec, spawn } = require('child_process');
// the argument index for the packaging script
const ARGV_PROCESS_PACKAGING_SCRIPT_NAME = 2;
const REAL_PROJECT_ROOT = path.resolve(__dirname, '../');
// const REAL_PROJECT_DIRNAME = ... |
'use strict'
var voxel = require('voxel')
var ray = require('voxel-raycast')
var control = require('voxel-controls')
var Detector = require('./lib/detector')
var inherits = require('inherits')
var path = require('path')
var EventEmitter = require('events').EventEmitter
var collisions = require('collide-3d-tilemap')
var... |
import auth from '@react-native-firebase/auth';
import functions from '@react-native-firebase/functions';
import database from '@react-native-firebase/database';
import React from 'react';
import { ScrollView, View } from 'react-native';
import { Button, Input, Text, ThemeConsumer, CheckBox } from 'react-native-element... |
'use strict';
/*
const cameraScale = 1; Масштаб, 1 - стандарт
const blockSize = 32 Масштаб камеры (пикселей в блоке при cameraScale = 1)
let cameraX = 0, cameraY = 0; Положение камеры
const chankWidth = 8, chankHeight = 8 Размеры чанка
const minLayout = 2, maxLayout = 3 Обрабатываемые слои
const block... |
/*
Copyright 2017 Vector Creations Ltd
Copyright 2018 New Vector Ltd
Copyright 2019 <NAME> <<EMAIL>>
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
... |
var exam = {
editingQesId: 0,
//初始化
init: function () {
//加载数据
// this.loadDataFn();
//拖拽
this.dragFn();
//拖拽排序
this.sortFn();
//题目菜单滚动固定顶部
this.fixFn();
//题目菜单折叠/展开
this.menuFn();
//标题编辑
this.titleEditFn();
... |
load("../biginteger.js");
load("test.js");
function checkBigInteger(n, d, s) {
assertPropertyExists(n, "_d");
assertPropertyExists(n, "_s");
var sign = n._s;
var digits = n._d;
if (sign === 0) {
assertTrue(digits.length === 0, "sign is zero, but array length is " + digits.length + ": " + JSON.stringify(n));
... |
import Plugin from '@walletpack/core/plugins/Plugin';
import * as PluginTypes from '@walletpack/core/plugins/PluginTypes';
import {Blockchains} from '@walletpack/core/models/Blockchains'
import Network from '@walletpack/core/models/Network'
import Account from ... |
/* eslint complexity: ["error", {"max": 50}] */
/* eslint-disable indent */
let SHOW_SCREENS = 4
let MAX_SHOW_SCREENS = 5 // 5和3刚好合适?
const DEFAULT_SHOW_SCREENS = SHOW_SCREENS
const DEFAULT_MAX_SHOW_SCREENS = MAX_SHOW_SCREENS
const RECT_SIZE = 200
const systemInfo = wx.getSystemInfoSync()
const DEBUG = false
const BOUN... |
// raffle.js Raffle module for SpongeBot
// By SpongeJr
const utils = require('../lib/utils.js');
const cons = require('../lib/constants.js');
const raffleData = require('../../data/raffle.json');
const giveaways = require('../../data/giveaways.json');
const sortRaffleData = function(rData) {
// pass a raffleData obj... |
/* Enter Device Status Endpoit URL here */
var devices_endpoint_url = 'https://jmuvv5pidj.execute-api.us-east-1.amazonaws.com/prod';
// This file covers 3 devices, a real program should be designed to handle any number of devices
/****************************************
/**
* Angular Part of the code
*... |
// LEHMBAU
var app = new Framework7({
statusbarOverlay: false,
swipePanelOnlyClose: true
});
$.holdReady(true);
var preferences;
var rate2 = false, quickpoint = false;
var images = [];
var cluster, map, marker, passive_marker, layer_std_points, layer_trk_lines, layer_img_points,
highaccuracygeoloc, ba... |
//To Insert Insulation
$('form.insulationActual').submit(function (e) {
$(this).find('button[type="submit"]').prop('disabled', true);
$(this).find('.spinner').removeClass('d-none');
e.preventDefault();
let that = this;
let dataForm = {};
let token = $(this).find('input').eq(0).attr('value');
... |
// Three.js setup
var renderer = new THREE.WebGLRenderer({
canvas:document.getElementById("main-canvas"),
alpha:true,
antialias:true
})
renderer.setSize(window.innerWidth, window.innerHeight)
renderer.setPixelRatio( window.devicePixelRatio );
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.tone... |
"use strict";
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
va... |
import API from './api.js';
import {T} from './omegaup.js';
let UI = {
navigateTo: function(url) { window.location = url; },
escape: function(s) {
if (typeof s !== 'string') return '';
return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
},
buildURLQuery: function(queryParamet... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.