text
stringlengths
8.5k
48.7k
/* A Succinct Trie for Javascript By <NAME> Released to the public domain. This file contains functions for creating a succinctly encoded trie structure from a list of words. The trie is encoded to a succinct bit string using the method of Jacobson (1989). The bitstring is then encoded using BASE-64. ...
$.urlParam = function(doc_id){ var results = new RegExp('[\?&]' + doc_id + '=([^&#]*)').exec(window.location.href); if (results==null){ return null; } else{ return results[1] || 0; } } var page = /doctor/; var url =window.location.href; if(page.test(url)){ $('#sign_up').hide(); $('...
// Based on an original demo at https://github.com/tensorflow/magenta-demos/tree/master/sketch-rnn-js. // See LICENSE for full attribution and license details. dl = deeplearn; math = dl.ENV.math; /** * Location of JSON models used for sketch-rnn-js */ var SketchRNNConfig = { BaseURL: "https://storage.googleapis.c...
let ctx = document.querySelector("canvas"); let drawingSurface = ctx.getContext("2d"); let music = document.getElementById("music"); // Map key const EMPTY = 0; const GRASS = 1; const TREE = 2; const BOUND = 3; const AVATAR = 4; const ABDUCTIE = 5; const SHIP = 6; const WARP = 7; //////...
/* eslint-disable max-len */ const Command = require('../../Command'); const runnerRoot = require('../root/runner.cmd'); const inquirer = require('inquirer'); const colors = require('colors'); const _ = require('lodash'); const { getAllKubeContexts, getKubeContext } = require('../../helpers/kubernetes'); const installM...
"use strict"; const VERTEX_COUNT = 1000000; // Fade IN/OUT Parameters const FADEIN_TIME_MS = 1000; const FADEOUT_TIME_MS = 3000; const FADEOUT_PERCENT = 0.99; // Affine parameters const AFFINE0 = [0.5, 0.0, 0.433, 0.0, 0.5, -0.375]; const AFFINE1 = [0.5, 0.0, 0.0, 0.0, 0.5, 0.375]; const AFFINE2 = [0.5, 0.0,-0.433, ...
"use strict"; const htmlTagNames = require("html-tag-names"); const clean = require("./clean"); const privateUtil = require("../common/util"); const sharedUtil = require("../common/util-shared"); const doc = require("../doc"); const docBuilders = doc.builders; const concat = docBuilders.concat; const join = docBuilder...
"use strict"; var _util = require("./util"); var _convertToPropTypes = _interopRequireDefault(require("./convertToPropTypes")); var _makePropTypesAst = require("./makePropTypesAst"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _createForOfIteratorHelpe...
// When there is no predator, the fishes swim forward. // When a predator has appeared, angry fishes attack a predator and devour it. var dirtBlockUrl; var backgroundIsGradient = true; var fishSpeed = 1; //checking browser and platform, and if it is mobile then reduce fps 2 times if (navigator.userAgent.match(/(iPod...
const REDIRECT_URL = browser.runtime.getURL("redirect/redirect.html"); const DEFAULT_SEARCH_ENGINE = browser.i18n.getMessage("default_search_url"); var browserMajorVersion = 52; browser.runtime.getBrowserInfo().then(info => { browserMajorVersion = info.version.split(".")[0]; //$D("Browser Info:", info); bro...
// Constants const mindistance = 40; const STANDARD_CONTROLS = ["embedding", "clusterNum", "reset", "refit", "spectral", "spawn"]; const EXTRA_CONTROLS = ["showTrue", "generate"]; const clusterStyles = ["adjacency", "laplacian", "normLaplacian"]; const nodeRadius = 5; const nodeOpacity = 0.85; const durationTime = 500...
// ████████╗████████╗██████╗ // ╚══██╔══╝╚══██╔══╝██╔══██╗ // ██║ ██║ ██████╔╝ // ██║ ██║ ██╔══██╗ // ██║ ██║ ██║ ██║ // ╚═╝ ╚═╝ ╚═╝ ╚═╝ CHARACTER ENGINE // version 4.0 // by <NAME> // // This project is libre, and licenc...
'use strict'; const DPR_Chrome_Tabs = (function () { function openFirstDPRTab() { if(!findDPRTab('DPR-main')) openDPRMain('DPR-main',DPR_PAL.toWebUrl('chrome://digitalpalireader/content/index.xul'),''); } function openDPRTab(permalink, id, reuse) { permalink = DPR_PAL.toWebUrl(permalink); if(reuse...
const admin = require("firebase-admin"); const bucket = admin.storage().bucket(); const db = admin.firestore(); const m = require("moment"); const { retry } = require("../helpers/retry") const { mapAsync, sleep } = require("../helpers/asyncIterators") const { log, logError } = require("../helpers/log"); /** * Used ...
/* globals Event beaker DatArchive history beakerBrowser confirm */ import * as yo from 'yo-yo' import {FileTree, ArchivesList} from 'builtin-pages-lib' import {makeSafe} from '../../lib/strings' import {throttle} from '../../lib/functions' import renderTabs from '../com/tabs' import renderGraph from '../com/peer-hist...
/* * == BSD2 LICENSE == * Copyright (c) 2017, Tidepool Project * * This program is free software; you can redistribute it and/or modify it under * the terms of the associated License, which is identical to the BSD 2-Clause * License as published by the Open Source Initiative at opensource.org. * * This program ...
/*======================================================================== * get the source code for fragment shaders *======================================================================== */ function source( id ){ return document.getElementById( id ).innerHTML ; } var env = {} ; // Global variable /*=======...
import * as HX from "helix"; // https://www.khronos.org/files/gltf20-reference-guide.pdf /** * GLTFData contains all the info loaded * @constructor */ function GLTFData() { /** * The default scene to show first, as defined by GLTF. */ this.defaultScene = new HX.Scene(); /** * The loaded...
/*******************/ var renderer = null, scene = null, camera = null, root = null, group = null, sphere = null, sphereEnvMapped = null, orbitControls = null; var loader; /**************************************/ var sistemaSolar = null, gMercurio = null, gVenus = null, gTierra = null, gMarte = nu...
var MG = { _manager: null, //角色 _roles: [], userinfo: function () { var userdataString = { tt_userstatus: "" }; userdataString = tcookie(userdataString); if (!userdataString || userdataString == "") return null; var userdata = eval('userdata = ' + userdataStr...
/* * Copyright 2014-2019 the original author or authors. * * 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 required by ap...
import React, { useState, useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import stringify from 'fast-json-stable-stringify' import { CirclePicker } from 'react-color' import Modal from './modal' import { saveProfileData } from '../actions/profile' const paletteColors = [ `#0074D9`,...
function getTemplate(selector,qkey) { var template = ""; if (typeof questions[qkey] != 'undefined') { question = questions[qkey]; switch (question.type) { case "N": //slider = 1; configSlide = getQuestionConfig(question); currentHour = new Date().getHours(); if ((configSlide.frq == "a") && (c...
// Description: Free WebRTC Framework // Author: <NAME> // Created: Sun Apr 5 15:15:20 2015 (+0300) // Version: 1.12 /* options.localVideoID = string ID of the video tag for showing local video options.remoteVideoID = string ID of the video tag for showing remote video options.getRemoteVideoID = call back functi...
"use strict"; var wgm_map, wgm_marker1, wgm_infowindow, wgm_icon = 'https://maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png', info_content, current_map_markers = [], current_map_infowindows = [], //new marker wgm_new_marker = null, wgm_new_marker_infoindow = null, wgm_new_marker_...
import React, { useState, useRef, useEffect, useCallback } from 'react'; import './WealthDisplayCanvas.css'; import { useSelector } from 'react-redux'; import billStackImage from '../images/bill_stack_alpha_800w.png'; /** * * @param {RenderingContext} ctx - Canvas context object * @param {Number} x - starting x-co...
import React, { useState, useEffect, useRef } from 'react' import styles from './structurefield.module.css' import SomethingWentWrong from '../../SomethingWentWrong/SomethingWentWrong'; const dataTypesIcons = { string: 'string', string_markdown: 'paragraph', string_html: 'codeXML', string_email: 'mail...
var AJV = require('ajv') var Busboy = require('busboy') var UUIDV4 = require('../data/uuidv4-pattern') var annotateENOENT = require('../data/annotate-enoent') var applicationFee = require('../stripe/application-fee') var ed25519 = require('../util/ed25519') var email = require('../email') var escape = require('./escape...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireWildcard(require("react")); var _reactVis = require("react-vis"); var _reactTable = _interopRequireDefault(require("react-table")); var _GraphScroll = _interopRequireDefault(require(...
// WARNING: Script loads before HTML "use strict"; let time; let chapter = 0; let storyLine = 1; // Now this is useless, but maybe I could reuse it let storyInstructions = [{name: 'p'}]; // Like a queue let storyElementNesting = []; let buttonElements = []; // Used in f startUpdate(). // 1 frame = 77ms...
/** * @file Manage all the configuration nedded to generate .docx file * @author <NAME> <<EMAIL>> * @author <NAME> <<EMAIL>> */ const docx = require('docx'); const fs = require('fs'); const process = require('process'); const { generateSyllabusGraph, generateIndicatorsGraph } = require('../graphs/graphsUtils'); co...
// JavaScript Document // Version 1.0.0 $.kyweb = function() { } /******************************************************************************** * Prototypes ********************************************************************************/ String.prototype.replaceAll = function(from, to) { return this.split(fro...
const express = require("express"); const cors = require("cors"); const fs = require("fs"); const path = require("path"); const { v4: uuidv4 } = require('uuid'); const url = require('url'); const jsoning = require("jsoning"); const app = express(); let db = new jsoning("../logs/log.json"); let artdb = new jsoning("/va...
/** * DevExtreme (ui/data_grid/ui.data_grid.selection.js) * Version: 16.2.1-16294 * Build date: Thu Oct 20 2016 * * Copyright (c) 2012 - 2016 Developer Express Inc. ALL RIGHTS RESERVED * EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml */ "use strict"; var $ = require("jquery"), gridCore = requi...
var array_temperature = ['kelvin', 'celsius', 'fahrenheit']; var array_length = ['inch', 'foot', 'yard', 'mile', 'centimeter', 'meter', 'kilometer']; var array_area = ['square_inch', 'square_foot', 'anna', 'square_centimeter', 'square_meter']; var array_weight = ['ounce', 'pound', 'gram', 'kilogram']; var array_volume ...
var target_admin = function () { "use strict" var layoutColors = ['#16a085', '#e74c3c', '#428bca', '#333333', '#6685a4', '#E68E8E'] return { init: init, layoutColors: layoutColors, debounce: debounce } function init () { initLayoutToggles () initNoticeBar () navHoverInit ({ delay: { show...
var gmarkers = []; var maps = {}; var creando = true; var fullSelect = $("#subcategories"); var cloned = fullSelect.clone() console.log("funciona"); $(document).ready(function () { console.log("funciona2"); loadFilters(); loadCategorias(); loadCiudades(); $('#filter').submit(function (ev) { ...
import L from 'leaflet'; import $ from 'jquery'; delete L.Icon.Default.prototype._getIconUrl; L.Icon.Default.mergeOptions({ iconRetinaUrl: require('leaflet/dist/images/marker-icon-2x.png'), iconUrl: require('leaflet/dist/images/marker-icon.png'), shadowUrl: require('leaflet/dist/images/marker-shadow.png'),...
/** * */ var data_base_url = base_url + "data/"; var polygons = {}; var features = []; var featuresMap = {}; var currentClicked; var coordinate1; var coordinate2; var markerCurrent = null; var marker1 = null; var marker2 = null; var pathMarker = null; var path = []; var path_territories = {}; var speed = 22; var p...
$(document).ready(function(){ var page=1; if(window.location.href.indexOf("givenList.html")!=-1)page=2; else if(window.location.href.indexOf("needList.html")!=-1)page=3; console.log("page"+page); switch(page) { //首页 case 1: //获取店铺基本信息 var arr = { "auth_token": commonFun.get_param("auth_token"), ...
var marque = []; marque[0] = ["<NAME>", "<NAME>"]; marque[1] = ["Audi", "Audi"]; marque[2] = ["BAIC YX", "BAIC YX"]; marque[3] = ["BMW","BMW"]; marque[4] = ["Chery","Chery"]; marque[5] = ["Chevrolet","Chevrolet"]; marque[6] = ["Citroën","Citroën"]; marque[7] = ["DACIA","DACIA"]; marque[8] = ["DS","DS"]; marq...
var instance = null; var objRecord_read = {}; var objRecord_unread = {}; var block = new Array(16); /* PRIVATE 1 单聊 DISCUSSION 2 讨论组 GROUP 3 群组 CHATROOM 4 聊天室 CUSTOMER_SERVICE 5 客服 SYSTEM 6 系统消息 APP_PUBLIC_SERVICE 7 应用公众账号(应用内私有) PUBLIC_SERVICE 8 公众账号 (公有) */ var conversationT...
console.clear(); /** * TODO: * * - Handle pauses / tab defocus * - Better touch controls * - Responsive layout & UI * - More efficient matching routine * - Shorter explode/drop-lock time * - Hiscore (via LocalStorage) * - Music + SFX * **/ // 'Utils' object available - see https://codepen.io/njmcode/pen/doP...
let labels = {}; let aliases = {}; const CE = '<small class="ce-date2">CE</small>'; const BCE = '<small class="ce-date2">BCE</small>'; labels["AAVE"] = { link: "African American Vernacular English", display: "AAVE" } labels["æ-tensing"] = { link: "æ-tensing", type: "sound change" } aliases["ae-tensing"] = ...
/** * Created by Zowie on 12/17/2016. */ // aanmaken variabelen die gebruikt worden in de functies var zoomvar = 1; var zoomvarWheel = 0.8; var lengthnumber = 140; var sizenumber = 30; var mouse_enter = false; // soundfile voor feedback wanneer naar een object gekeken wordt var succes_sound = new Audio('./sounds/su...
var focalNodeID = "N1"; var nodeSet = [ {id: "N1", name: "Elliptic Curves", fixed: true, x: 10, y: 0, type: "Subject Area", hlink: "https://en.wikipedia.org/wiki/Elliptic_curve"}, {id: "N2", name: "E(ℚ)", type: "Definition", hlink: "https://en.wikipedia.org/wiki/Elliptic_curve#Elliptic_curves_over_the_rational_nu...
"use strict"; function getDefaults() { return { "b": "$b", "c": "$c", "v": "$v", "-": "-", ",": ", ", ".": " ", "c.v": ":", "$chapters": ["ch", "chs"], "$verses": ["v", "vv"], "singleChapterFormat": "bv", // or `b` or `bcv` "singleChapterBooks": ["Obad", "Phlm", "2John", "3John", "Jude", "PrAza...
import * as d3 from 'd3'; import d3tooltip from 'd3-tooltip'; import { data } from './data'; export const gColors = { system: 'mediumpurple', group: { lib: 'darkblue', con: 'crimson', wrong: { lib: 'rosybrown', con: '#8eabd0' } }, groups: [ {name: 'con', color: 'rgb(255, 34, 34)...
import { serializeSpec, ExpressionSerializer, deserialize, serialize } from 'lively.serializer2'; import { Icon, ProportionalLayout, Label, Text, ShadowObject, Morph, morph, icons } from 'lively.morphic'; import { Icons } from 'lively.morphic/text/icons.js'; import { Color, rect, LinearGradient, pt } from 'lively.graph...
/** * Scene Loader for Planner5d Scene files */ 'use strict'; var ArchCreator = require('geo/ArchCreator'); var AssetGroups = require('assets/AssetGroups'); var SceneState = require('scene/SceneState'); var SceneLoader = require('scene/SceneLoader'); var Object3DUtil = require('geo/Object3DUtil'); var P5DTextureLoa...
const vm = require("vm"); const https = require("https"); const electron = require("electron"); const PythonShell = require("python-shell"); const {remote} = electron; const {app,BrowserWindow,dialog,Menu,MenuItem,clipboard,shell} = remote; const ipc = electron.ipcRenderer; const path = require("path"); const fs = requ...
import Animations from '../modules/Animations' import Fill from '../modules/Fill' import Utils from '../utils/Utils' import Graphics from '../modules/Graphics' import Filters from '../modules/Filters' /** * MSCharts Pie Class for drawing Pie / Donut Charts. * @module Pie **/ class Pie { constructor(ctx) { th...
/* * Copyright (c) 2020 Tano Systems. All Rights Reserved. * Author: <NAME> <<EMAIL>> */ 'use strict'; 'require rpc'; 'require form'; 'require mstpd'; 'require dom'; 'require poll'; var callMSTPStatus = rpc.declare({ object: 'mstpd', method: 'getStatus', expect: {} }); const mstpdBridgeParams = { 'force-proto...
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import _isFunction from "lodash/isFunction"; import _isNil from "lodash/isNil"; import _isUndefined from "lodash/isUndefined"; import _omit from "lodash/omit"; ...
// playlistExample.doPlaylistForAlbum(); var playlist_songs = null; var g_playlist_params = ''; // $.ajax({type:"GET", dataType: "json", xhrFields: { // withCredentials: true // }, url: "http://developer.echonest.com/user/api_key.json"}).then( // function(data){ // ...
const assert = require('assert'); const crypto = require('crypto'); const { should } = require('micro-should'); const { sha256 } = require('../sha256'); const { sha512 } = require('../sha512'); const { hkdf, hkdf_extract } = require('../hkdf'); const { pbkdf2, pbkdf2Async } = require('../pbkdf2'); const { scrypt, scryp...
var Cookie = require('./cookie'); var JSON = require('json'); // jshint ignore:line var language = require('./language'); var localStorage = require('./localstorage'); // jshint ignore:line //var md5 = require('JavaScript-MD5'); var object = require('object'); var Request = require('./xhr'); var UUID = require('./uuid...
/* * Copyright (c) 2010 Epic Train Hack * Copyright (c) 2011 Research In Motion Limited * Contributors: <NAME>, <NAME>, <NAME> * * 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 restr...
//============================================================================== // FD-Plate.js //============================================================================== const BoundaryCondition = { SIMPLE: 'simple', CLAMPED: 'clamped' } class FDPlate { /** Constructor: Initialise with sample rate and FDPla...
import ViewBase from '../base/ViewBase'; import formModel from '../../models/formModel'; import _ from 'lodash'; import $ from 'jquery'; import Wysiwyg from './Wysiwyg'; import template from './formView.html'; import endpoints from '../../util/endpoints'; // import emojione from 'emojione'; import EmojisModal f...
"use strict"; require("babel-polyfill"); require("./localStoragePolyfill"); var IS_CX = false; if (typeof chrome != "undefined") IS_CX = chrome.windows === undefined ? false : true; var angular = require("angular"); var angularTranslate = require("angular-translate"); var angularTranslateErrorLog = require("angular...
import config from '../../config'; import _debug from 'debug' const debug = _debug('app:server:apis') import mqtt from 'mqtt' import KoaJwt from 'koa-jwt' import Wechat from './wechat'; import models from '../models'; import { dbCreate, dbUpdate, dbList, dbDestroy, dbDestroyById } from './dbBase' export default class...
'use strict'; // Test is based on the following editor draft: // webrtc-pc 20171130 // webrtc-stats 20171122 // This file depends on dictionary-helper.js which should // be loaded from the main HTML file. /* [webrtc-stats] 6.1. RTCStatsType enum enum RTCStatsType { "codec", "inbound-rtp", ...
// monkey patching String.prototype.endsWith = function(suffix) { return this.indexOf(suffix, this.length - suffix.length) !== -1; }; var ws; var url; var connectionState = { notConnected: "not connected", connecting: "connecting", connected: "connected" }; var autoConnect = true; var dataArray = []; for (v...
var frm = $('#f5_search'); var rslt = $('#f5_results'); function JSconfirm(action, request_type, f5_selected_items, f5_selected_items_name) { swal({ title: "Are you sure you want to " + action + " these items?", text: f5_selected_items_name, type: "warning", showCancelButton: true, confirmButtonC...
/** * Fragment Audio Server relay. * * This application allow to serve multiple Fragment Audio Server over the wire by splitting and distributing the incoming pixels data * This allow to distribute the sound synthesis computation over different computers or cores * See "simulation.htm" for the algorithms playgroun...
const _ = require('lodash'); const Molotov = require('../molotov'); const semver = require('semver'); const semverishFactory = require('../semverish/semverish'); const rangeFactory = require('../semverish/range'); const molotovDefaults = { overrides: {}, cocktailClasses: [], }; module.exports = function converter...
/* eslint-disable no-use-before-define */ import * as cache from "./cache.js"; import { storePointer } from "./utils.js"; /* istanbul ignore next */ try { process.env.NODE_ENV } catch(e) { var process = { env: { NODE_ENV: 'production' } }; } // eslint-disable-line export const connect = `__store__connect__${Date.now(...
const fs = require("fs"); const path = require("path"); module.exports = function Banker(mod) { const BANK_CONTRACT = 26; //1 = Bank, 3 = Guild Bank, 9 = Pet, 12 = Wardrobe // const BANK_TYPE = 1; const BANK_PAGE_SLOTS = 72; const INV_SLOTS = 120; // aka pocket 0 const POCKET_SLOTS = 80; const PAGE_CHANG...
/** * 多Agent路径规划演示demo * @author DarrenYing */ function setup() { // startTime(); //用户输入、 //小车 carName = select('#agentName'); addCarBtn = select('#addCar'); delCarBtn = select('#delCar'); selBox = select('#sel'); //算法 algBox = select('#alg'); algBox.mouseClicked(switchAl...
/* index.js */ // built\-in modules let fs = require('fs'); let path = require('path'); let electron = require('electron'); let os = require('os'); let app = electron.app; // Module to control application life. let BrowserWindow = electron.BrowserWindow; let crashReporter = electron.crashReporter; let globalShortcut...
/* * web: userMgmt.js * XNAT http://www.xnat.org * Copyright (c) 2005-2017, Washington University School of Medicine and Howard Hughes Medical Institute * All Rights Reserved * * Released under the Simplified BSD. */ /******************************* * Set of javascript functions to facilitate project-user acce...
import tinycolor from 'tinycolor2' import Wintersky from './wintersky'; import * as THREE from 'three'; import MissingTex from '../assets/missing.png'; import ParticlesTex from '../assets/particles.png'; import FlameAtlasTex from '../assets/flame_atlas.png'; import SoulTex from '../assets/soul.png'; import CampfireSmo...
// Powershell Tools extension for Visual Studio Code // <NAME> // The module 'vscode' contains the VS Code extensibility API. const vscode = require('vscode'); var workspace = vscode.workspace; const path = require("path"); // load local modules const common = require('./lib/common.js'); const HighlightFields = req...
var Int64 = function(high, low) { this.high = high | 0; this.low = low | 0; }; Int64.DBL_TWO_16 = 1 << 16; Int64.DBL_TWO_24 = 1 << 24; Int64.TWO_24 = new Int64(0, Int64.DBL_TWO_24) Int64.DBL_TWO_32 = Int64.DBL_TWO_16 * Int64.DBL_TWO_16; Int64.DBL_TWO_31 = Int64.DBL_TWO_32 / 2; Int64.DBL_TWO_48 = Int64.DBL_T...
#!/usr/bin/env node /** * Example: * xone build * xone build <platform> * xone build bundle * xone build lib * xone build lib min */ var platform = process.argv[2]; var parameter = process.argv[3]; var build_path = process.argv[4]; var fs = require('fs'); var path = require('path'); var lib = require('./lib.j...
"use strict"; var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { ...
// Roland-xs84h var instance_skel = require('../../../instance_skel'); var tcp = require('../../../tcp'); var actions = require('./actions.js') var feedbacks = require('./feedbacks.js') var variables = require('./variables.js') var presets = require('./presets.js') var debug; var log; function instance(system, id,...
/* async function check() { let url = 'https://api.openweathermap.org/data/2.5/weather?q=Orlando&units=celcius&APPID=fb2fefe4ce6886c61bd1f92aef08735a'; let response = await fetch(url); let result = await response.json(); // read response body and parse as JSON console.log(result); } check(); */ let weather = doc...
var zakodowanaWiadomosc; var tablica = []; var wylosowanyKlucz; var wylosowanaWiadomosc; var k = 0; var runda = 1; var glow = { red: [], green: [] }; var punkty = 0; function poprawKlucz(klucz) { //usuwa powtarzające się litery z klucza klucz = klucz.toUpperCase(); //same wielkie litery klucz = k...
'use strict' const cheerio = require('cheerio') const _ = require('lodash') const esprima = require('esprima') const escodegen = require('escodegen') const reactDOMSupport = require('./reactDOMSupport') const reactNativeSupport = require('./reactNativeSupport') const reactPropTemplates = require('./reactPropTemplates')...
'use strict'; const pval_sentinel = 5e-324 const optionalShortFloat = (value, nan = 'NA') => isNaN(+value) ? nan : (+value).toPrecision(1) const optionalExponential = (value, nan = 'NA') => isNaN(+value) ? nan : (+value).toExponential(1) const optionalFixed = (value, nan = 'NA') => isNaN(+value) ? nan : (+value).t...
const fs = require('fs'); const path = require('path'); const moment = require('moment-timezone'); const ExcelJS = require('exceljs'); const configPath = path.resolve('./config.json'); const config = require(configPath); const pruneStoragePath = path.resolve('./prunestorage.json'); /* fs.existsSync(pruneStoragePath, (...
/* Copyright (C) 2020, <NAME> All rights reserved. 11/24/2020 last modified 12/26/2020 */ const BFS_PATH = 0b1; const DFS_PATH = 0b11; const DIJKSTRA_PATH = 0b111; const GREEDY_DFS_PATH = 0b1111; function flow_g_node(id) { return "FLOW_GRAPH_" + id; } function original_g_node(id) { return "ORIGINAL_GRAP...
const axios = require("axios"); var fs = require("fs"); var path = require("path"); const { cpuUsage } = require("process"); const elementTypes = require("./elementTypes.js"); const https = require('https'); const ntlm = require('./ntlm'); const httpsAgent = new https.Agent({ keepAlive: true, rejectUnauthorized:...
/* eslint max-len: 0, no-continue: 0, no-underscore-dangle: 0, no-use-before-define: 0, max-params: 0, max-statements: 0, no-return-assign: 0, no-confusing-arrow: 0, no-extra-parens: 0 */ import { isPlainObject, isFunction, arrayRemove, arrayIndexOfNaN, defineProperty, defineHiddenConstant, defineHiddenCo...
var currentTabURL = window.location.href; var pubSub = new PubSub(); var getDecimalPercentage = function(percentage){ percentage = Number(percentage); if(percentage >= 0 && percentage <= 1){ return percentage; } return percentage / 100; }; var pageHasHTML5Video = function(){return typeof(document.getEleme...
window.onload = init; var bank; var ctx = new AudioContext(); function init() { var player = document.getElementById("player"); player.onplay = (e) => {ctx.resume();} var mediaSource = ctx.createMediaElementSource(player); // last param = dB Scale. Here go from -10dB to +10dB bank = new FilterBank(...
var socket = io(); var fishCount = 8; var ph_table = { 0: "Battery Acid (0)", 1: "Stomach Acid (1)", 2: "Lemon Juice (2)", 3: "Orange Juice (3)", 4: "Tomato Juice (4)", 5: "Black Coffee (5)", 6: "Cow Milk (6)", 7: '"Pure" Water (7)', 8: "Seawater (8)", 9: "Toothpaste (9)", 10: "Brocoli (10)", 11...
import React from 'react'; import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import ReactDOM from 'react-dom'; import classNames from 'classnames'; import { injectIntl, FormattedMessage } from 'react-intl'; import _ from 'lodash'; import readingTime from 'reading-time'; import { Checkbox, Form, Inp...
/* The <media-chrome> can contain the control elements and the media element. Features: * Auto-set the `media` attribute on child media chrome elements * Uses the element with slot="media" * Take custom controls to fullscreen * Position controls at the bottom * Auto-hide controls on inactivity while pla...
import { h, Component } from 'preact'; import style from '../App.css'; import { useContext } from 'preact/compat'; import GiveNearStopQueryValues from './GiveNearStopQueryValues'; import AddressList from './AddressList'; // import gql from "apollo-boost"; import SearchAndListAddressStops from './searchstops/SearchAndL...
const fs = require("fs"); const path = require("path"); const vm = require("vm"); const url = require("url"); const Module = require("module"); const HEADER_SIZE = 32; const FORMAT_VERSION = 3; const loglevel = process.env.NODE_VOO_LOGLEVEL; const log = { $warning: 1, $info: 2, $verbose: 3 }["$" + loglevel] | 0; con...
"use strict"; // https://stackoverflow.com/q/1335851/72470 // Global variables that are available in all functions. // Note: You can add your own here, e.g. to store the rendering mode. //world setup var camera, scene, renderer; var axisHelper, grid, ambient; // objects in scene var cube, wireframe, points,...
if (!Detector.webgl) { Detector.addGetWebGLMessage(); } else { var current_day_index = 0; var prev_foculed_location = -1; var current_focused_location = 0; // By default focus the region with the top cummulative value var current_stat_index = 0; var prev_stat_index = -1; var RADIAN = 180...
/* MIT License * * Copyright (c) 2012-2020 <EMAIL> * * 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, copy, modify...
import { boletoBarcodeSvg } from "./index.js" const number = "34195.00008 01233.203189 64221.470004 5 84410000002000" const svg = boletoBarcodeSvg(number) const expected = `<svg viewBox="0 0 1264 100"> <rect y="0" height="100%" fill="#000" width="4" x="0"></rect> <rect y="0" height="100%" fill="#fff" width="4" x=...
const PREFIX = 'hccwp' const COMPONENT_NAME = PREFIX + '-upload' /** * @description: 文件上传 * @param {*} * @return {*} */ class fileupload { constructor(options) { this.options = { el: '.hccwp-upload', showProgress: true, init: true, listType: 'text', accept: '.pdf,.jpg,.png', buttonText: '上传文件'...
// convert string to proper case String.prototype.toProperCase = function () { return this.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); }; // convert string to snake case String.prototype.toSnakeCase = function () { return this.replace(/(.)([A-Z])/g, "$1_$2").t...
//对象转字符串 function object2String(obj) { var val, output = ""; if (obj) { if (isArray(obj)){ output = array2String(obj); }else{ output += "{"; for (var i in obj) { val = obj[i]; if(val != null){ switch (typeof val) { ...