text stringlengths 5.97k 41.2k |
|---|
export const TYPE_COSTS = {
//TypeId: Cost
0: 15, //bomer
1: 21, //stealth bomber
2: 18, //stealth fighter
3: 11,
4: 12,
5: 8,
6: 3,
7: 8,
8: 8,
9: 4,
10: 11,
11: 7,
12: 9,
13: 18,
14: 24,
15: 16,
16: 10,
17: 11,
18: 12,
19: 7,
20: 20,
21: 40,
22: 25,
23: 30,
24: 60,
25: 35,
26: 35,
27: 90,... |
/* HELPERS */
// wrap jquery ajax function to reduce redundant code
var AJAX = function(loc, method, contentType, data, callback, failback, headers){
var me = this;
var dataStr = null;
if(!$.isEmptyObject(data) && (contentType == 'application/json' || contentType == 'text/uri-list')){
data... |
const fs = require("fs");
const fetch = require("node-fetch");
const helpers = require("./services/helpers");
const config = require("../config.json");
const aboutPackage = require("../package.json");
const convert = require("./services/convert");
const validateServices = require("./services/validateValueMap");
cons... |
/**
* Collapses menus for blog page.
*/
function collapseMenu() {
var i;
var elements = document.getElementsByClassName("collapsible");
for (i = 0; i < elements.length; i++) {
elements[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibl... |
/**
* This code is based on tutorial from:
* http://jlongster.com/Making-Sprite-based-Games-with-Canvas
*/
import './game.css'
import sprites from './images/sprites.png';
import Sprite from './sprite';
import {load, onReady} from './resources';
import isDown from './input';
document.getElementById('game-canvas').s... |
class SOM {
constructor(rows, cols, input_dims, data) {
this.rows = rows;
this.cols = cols;
this.input_dims = input_dims;
this.data = data; // 2d array, one entry for each neuron
}
getNumNeurons() {
return this.rows * this.cols;
}
getNeuronWeights(neuron) {
... |
/** @format */
/**
* External dependencies
*/
import { includes } from 'lodash';
import { isURL } from 'validator';
import * as FacebookToken from 'lib/facebook/token';
// import {
// REPLY_COMMENT_SUCCESS,
// } from 'state/action-types';
import {
REPLY_COMMENT_SUCCESS,
CONVERSATION_REQUEST,
CONVERSATION_POST_R... |
const applyProperty = (obj, value) => (obj[value.name] = value, obj);
class ELF {
static ABI_ID = {
0x00: "System V",
0x01: "HP-UX",
0x02: "NetBSD",
0x03: "Linux",
0x04: "GNU Hurd",
0x06: "Solaris",
0x07: "AIX",
0x08: "IRIX",
0x09: "FreeBSD",
... |
/*
- Created with help from the following tutorial by <NAME>: https://www.labnol.org/code/google-sheet-d3js-visualization-200608
- Additional resources found at: https://developers.google.com/chart/interactive/docs/querylanguage
*/
//Initialize the Google Visualization API
var googleSpreadSheetURL = 'https://docs.go... |
"use strict";
let dev = false
let socket
//Fuzzy_Ducc is the ducc king
/*
██████╗░██╗░░░██╗░█████╗░░█████╗░██████╗░░█████╗░██╗░░██╗░░░░░░░░██╗░██████╗
██╔══██╗██║░░░██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗╚██╗██╔╝░░░░░░░░██║██╔════╝
██║░░██║██║░░░██║██║░░╚═╝██║░░╚═╝██████╦╝██║░░██║░╚███╔╝░░░░░░░░░██║╚█████╗░
██║░░██║██║░░░█... |
// --- GLOBALS ------------------------------------------------------------------
var gPages = [];
var gPageController = {};
var gCurrentPage = 0;
var gTransitioningPages = false;
// --- LOGIN FORM ---------------------------------------------------------------
$(document).ready(function() {
var submitLogin = f... |
/**
* Add missing methods to Object & Array
*/
if(typeof Object.create !== 'function') {
Object.create = function(proto) {
var F = function() {};
F.prototype = proto;
return new F();
}
}
if(typeof Object.getOwnPropertyNames !== 'function') {
Object.getOwnPropertyNames = function(x) {
var r = []... |
import Program from './Program.js';
const SERVICE_UUID = 'dea7f73c-723c-4ba2-b769-9c0f43293653';
const BTCH_PROGRAM = "d7b710fb-74d5-4413-a94d-38e387e55745";
const BTCH_KEY = "<KEY>";
const soundkits = [
{name:'Piano', val:'octaves_piano'},
{name:'Guitar', val:'octaves_guitar'},
{name:'Bell', val:'octaves_bell'},
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _lodash = _interopRequireDefault(require("lodash.throttle"));
var _utils = require("./... |
//引入全局变量
// let dataCurrentPage = 1;
// let dataCurrentIndex = 0;
// let dataCountPage = 0;
// let updategid;
// let curSearch = null;
// let curOrder = 'asc';
// let curSort = 0;
/*页面初始化*/
$(document).ready(function () {
window.onresize = function () {
location.reload();
};
$("#home-content").show... |
"use strict";
require("dotenv").config();
const join = require("path").join;
const Telegraf = require("telegraf");
const session = require("telegraf/session");
const LOGGER = require(join(__dirname, "logger")).logger;
const UTIL = require(join(__dirname, "util"));
const CONSTANTS = require(join(__dirname, "constants... |
var graph = {},
selected = {},
highlighted = null,
isIE = false;
$(function() {
NProgress.start();
resize();
isIE = $.browser.msie;
// json.php
d3.json(config.jsonUrl, function(data) {
if (data.errors.length) {
alert('Data error(s):\n\n' + data.erro... |
/**
* Created by bogdanbegovic on 8/20/16.
*/
import React, { Component } from "react";
import PropTypes from "prop-types";
import { View, Animated, PixelRatio } from "react-native";
import moment from "moment";
import CalendarHeader from "./CalendarHeader";
import CalendarDay from "./CalendarDay";
import WeekSele... |
import React from 'react';
import moment from 'moment';
import amplitude from 'amplitude-js';
import {Redirect} from '@reach/router';
import {compose} from 'recompose';
import {withNotificationsProvider} from '../../providers/Notifications';
import {withAuthProvider} from '../../providers/Auth';
import {withCookiesProv... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
/*
* React component for rendering Explorer dashboard swimlanes.
*/
import... |
import _ from 'lodash';
import path from 'path';
import url from 'url';
import logger from './logger';
import { tempDir, fs, util, zip, net, timing } from 'appium-support';
import LRU from 'lru-cache';
import AsyncLock from 'async-lock';
import axios from 'axios';
const IPA_EXT = '.ipa';
const ZIP_EXTS = ['.zip', IPA_... |
/*
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"); you may not use this f... |
// Get p5 autocompletions
/// <reference path="node_modules/@types/p5/global.d.ts" />
// Performance - Disables FES
// p5.disableFriendlyErrors = true;
/// TEXT CLASS
class TextObject {
constructor(texts, line, timeOn, timeOff) {
if (texts.length != timeOn.length || texts.length != timeOff.length) {
cons... |
/* jslint node: true */
'use strict';
/*
Portions of this code for key handling heavily inspired from the following:
https://github.com/chjj/blessed/blob/master/lib/keys.js
chji's blessed is MIT licensed:
----/snip/----------------------
The MIT License (MIT)
Copyright (c) <year> <copyright ... |
const path = require("path");
const mapping = require("./ns3-mapping");
const { programCategoryMap } = require("../../common/nord-mapping");
const { ns3ProgramLocation } = require("./ns3-utils");
const { nordFileExtMap } = require("../../common/nord-mapping");
const { getVersion } = require("../../common/converter");
c... |
import React, { useState , useEffect } from "react";
import ReactDOM from "react-dom";
import {DefaultButton, PrimaryButton, DangerButton, BrandButton} from 'pivotal-ui/react/buttons';
import {Grid, FlexCol} from 'pivotal-ui/react/flex-grids';
import {Panel} from 'pivotal-ui/react/panels';
import {Divider} from 'pivota... |
var util = require('./util');
var EventEmitter = require('eventemitter3');
var Socket = require('./socket');
var MediaConnection = require('./mediaconnection');
var DataConnection = require('./dataconnection');
/**
* A peer who can initiate connections with other peers.
*/
function Peer(id, options) {
if (!(this i... |
/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
import L from "leaflet";
import '../core/Base';... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... |
import { RangeIterable } from './util/RangeIterable.js';
import { getAddress, Cursor, setGlobalBuffer, orderedBinary, lmdbError } from './external.js';
import { saveKey } from './keys.js';
const ITERATOR_DONE = { done: true, value: undefined };
const Uint8ArraySlice = Uint8Array.prototype.slice;
const Uint8A = ... |
const Discord = require('discord.js');
const LenoxCommand = require('../LenoxCommand.js');
module.exports = class hangmanCommand extends LenoxCommand {
constructor(client) {
super(client, {
name: 'hangman',
group: 'fun',
memberName: 'hangman',
description: 'Play hangman alone or with your... |
"use strict";
var secret_key = {};
var api = {
base : "https://api.frostrose-studio.com/",
urls : {
loadingScreenMessage : "imba/loading-screen-info",
},
getLoadingScreenMessage : function(success_callback, error_callback) {
$.AsyncWebRequest(api.base + api.urls.loadingScreenMessage, {
type : "GET",
dat... |
import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import { DDP } from 'meteor/ddp';
import { Random } from 'meteor/random';
import { PackageVersion } from 'meteor/package-version-parser';
import { fetch } from 'meteor/fetch';
import Fiber from 'fibers';
import { PackageServer } from './pac... |
// The driver maintains the state of the application and drives everything.
// (Well, it knows about everything except for routing)
// Most everything else is just stateless
// This is similar to Redux except more flexible for faster development
import Printify from '../lib/Printify';
import Byol from './Byol';
import ... |
"use strict";
require("core-js/modules/es.symbol");
require("core-js/modules/es.symbol.description");
require("core-js/modules/es.symbol.iterator");
require("core-js/modules/es.array.concat");
require("core-js/modules/es.array.filter");
require("core-js/modules/es.array.find");
require("core-js/modules/es.array.... |
"use strict"
const btnNext = document.querySelector('#next'),
btnStart = document.querySelector('#start'),
btnRank = document.querySelector('#rank'),
btnGiveUp = document.querySelector('#giveUp'),
btnShowAnswers = document.querySelector('#showAnswers'),
btnFinish = document.querySelector('#finish'),
btnSave = do... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const prettier_1 = __importDefault(require("../prettier"));
const { group, hardline, indent, makeString,... |
async function SelectionSort() {
refresharray()
ipointer.style.display = "";
jpointer.style.display = "";
kpointer.style.display = "";
let len = storedarray.length;
for (let isel = 0; isel < len; isel++) {
let min = isel;
for (let jsel = isel + 1... |
import nanoid from 'nanoid'
import JsonRpcEngine from 'json-rpc-engine'
import asMiddleware from 'json-rpc-engine/src/asMiddleware'
import ObservableStore from 'obs-store'
import log from 'loglevel'
import { CapabilitiesController as RpcCap } from 'rpc-cap'
import { ethErrors } from 'eth-json-rpc-errors'
import { clone... |
class VDOM {
/**
* @constructor
* @param {Object} rootNode - A tree exported through Observer.tree().
* @param {Object} options - Configuration options:
* - mutationCallback(update, target): optional. A callback to be called whenever the vDOM is updated.
* - validateView(node): optional. A function wh... |
// Adapted from https://gist.github.com/paulirish/1579671 which derived from
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by <NAME>.
// Fixes from <NAME>, <NAME>, <N... |
/*
Copyright (c) 2009 amano <<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, merge, publish, distr... |
import { ethers } from 'ethers';
import { Base64 } from 'js-base64';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE... |
import React, { useEffect, useRef, useState } from "react"
import { connect } from 'dva'
import styles from "./list.less"
import { Link, useHistory, useLocation } from "umi"
import { Form, Button, Input, Table, Space, Modal, Row, Col, Tooltip, Pagination, message, } from "antd"
import t from "@/utils/t"
import { human... |
import React from "react";
import axios from "axios";
import { withRouter } from "react-router-dom";
import { connect } from "react-redux";
import { addVehicle, updateVehicle } from "../../store/actions";
import Form from "react-bootstrap/Form";
import "./UpdateVehicleForm.css";
import { NavLink } from "react-router-do... |
var pg, imgField, imgField6, imgField9, imgFieldKeys, rotateKeys, orOctane, blOctane, orDominus, blDominus, orBatmob,
blBatmob, ball, penOn, penOff, reset, title, signature, orange, blue, penColor, penWeight;
var drawMode = false;
var things = []; //array for the objects (cars and ball)
var field = 1; //variable to... |
// CSV import/parsing code ripped (and edited) from https://www.papaparse.com/demo
var inputType = "string";
var firstRun = true;
var addedCount = 0;
var skippedCount = 0;
var disenchantCount = 0;
var overLimitCount = 0;
var offspecCount = 0;
var missingCharacters = [];
var missingCharacterCou... |
import base64 from 'base64-arraybuffer'
import uuidv4 from 'uuid/v4'
import LZString from 'lz-string'
import localData from './localData'
import crypto from './Crypto'
import { removeProtocolFromEndpoint, getProtocolFromEndpoint } from './utils'
import statusCodes from './statusCodes'
import config from './config'
impo... |
// "show" buttons, to show divs that are initially hidden.
// Set button class="shower". Set the div class="hider".
// The "shower" and "hider" elements must be children of
// the same parent.
$(function() {
$(".shower").click(function(ev)
{
// hide myself (the "show" button)
var shower = $(this);
sho... |
const chalk = require('chalk');
function log (msg, type = 'error') {
if (type === 'error') {
return console.log(chalk.red(`[wx-to-uni-app]: ${msg}`));
}
console.log(msg);
};
//借鉴:https://github.com/dcloudio/uni-app/blob/v3/packages/uni-migration/lib/mp-weixin/util.js
const isWin = /^win/.test(pr... |
/*
* Transforms stats before sending to Zabbix (http://www.zabbix.com/)
* to make possible metrics auto discovery.
*
* To enable this publisher, include 'simple-discovery-filter'
* in the zabbix backend filters configuration array:
*
* zabbixPublisher: './zabbix-discovery-publisher'
* zabbixDiscoveryKe... |
import * as Dat from 'dat.gui';
import { Scene, Color, PlaneGeometry, MeshStandardMaterial, Mesh, Vector2, Vector3, TextureLoader, RepeatWrapping } from 'three';
import { BasicLights } from 'lights';
import { Terrain } from '../objects/Terrain';
import MovingHazard from '../objects/MovingHazard/MovingHazard';
import { ... |
// Resources:
//
// https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_text
const {remote, shell} = require('electron')
const {Menu, MenuItem} = remote
const {dialog} = require('electron').remote
const path = require('path')
const csvsync = require('csvsync')
const fs = require('fs')
const os ... |
import { Spot } from './Spot.js';
let option1 = [
[2, 0, 0, 5, 0, 7, 0, 0, 0],
[0, 0, 6, 2, 3, 0, 1, 0, 0],
[7, 5, 3, 6, 0, 0, 0, 4, 8],
[0, 0, 0, 8, 0, 0, 4, 5, 1],
[3, 0, 0, 0, 6, 0, 9, 0, 2],
[0, 8, 5, 0, 2, 0, 0, 3, 0],
[5, 0, 1, 0, 0, 9, 6, 0, 0],
[0, 4, 9, 7, 0, 0, 0, 0, 3],
[8, 2, 7, 0, 0, 6, ... |
/*
* Copyright 2017-2021 EPAM Systems, Inc. (https://www.epam.com/)
*
* 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 req... |
import * as THREE from 'three'
import Vue from 'vue' // need this for underscore
import classModelColors from '../config/classModelColors'
import fontJson from '../assets/helvetiker_regular.typeface.json'
const font = new THREE.Font(fontJson)
const WIDTH = 400
const HEIGHT = 200
const DEPTH = 100
const RADIUS = 50
ex... |
import { Vector3, BufferAttribute, Box3 } from 'three';
import { CENTER } from './Constants.js';
import { BYTES_PER_NODE, IS_LEAFNODE_FLAG, buildPackedTree } from './buildFunctions.js';
import { OrientedBox } from './Utils/OrientedBox.js';
import { SeparatingAxisTriangle } from './Utils/SeparatingAxisTriangle.js';
impo... |
var bgcolor = "lightgrey"; // Set the default color of spaces
var hd = true; // True for higher quality, false for lower quality
if (hd) {
var shadow = "inset 0 0 10px #000000";
} else {
var shadow = "none";
}
var score = 0;
var playing = true;
// Class Declarations
// A Piece has a base and 3 relative piece... |
var express = require('express');
const router = express.Router();
var aws = require('aws-sdk');
var path = require('path');
const accessKeyId = require('../../config/keys').accessKeyId; //../config/keys
const secretAccessKey = require('../../config/keys').secretAccessKey;
const region = require('../../config/keys').re... |
/*
EventDispatcher
*/
var Event = {};
Event.list = [];
//Event.sweep_queue = [];
Event.sweep = function(){
var q = Event.list;
for(var i=0;i<q.length;i++){
try{
removeEvent.apply(this,q[i]);
q[i] = null;
} catch(e){
// alert(e)
}
}
};
Event.observe = addEvent;
Event.stop = function(e){
Event.stopAct... |
/** +-----------------------------+
* | ShopifyIQ - "Live Spy" page |
* +-----------------------------+
* Started 12/14/2017
*/
$(document).on("click","#page-limit-selector a", function(e){
var _selection = $(this).data("limit");
if(_selection === 0)
{
load_full_catalog = true;
max_p... |
import Utils from './Utils.js'
import Database from './Database.js'
import Helpers from './StatsHelpers.js'
import Charts from './Charts.js'
import Tags from './Tags.js'
const Stats = {
frequences: (nid, fields, table) => {
// joint symbol = ' ⊃ '
if(!nid || !fields || !table) return;
let out = [];
function ... |
// Three.js - Voxel Geometry - UI
// from https://threejsfundamentals.org/threejs/threejs-voxel-geometry-culled-faces-ui.html
'use strict';
/* global THREE */
class VoxelWorld {
constructor(options) {
this.cellSize = options.cellSize;
this.tileSize = options.tileSize;
this.tileTextureWidt... |
import $ from 'jquery';
import L_ from '../../Basics/Layers_/Layers_';
import Map_ from '../../Basics/Map_/Map_';
import CursorInfo from '../../Ancillary/CursorInfo';
import IsochroneManager from './IsochroneTool_Manager';
import models from './models';
import './IsochroneTool.css';
const L = window.L;
/*
Handles ma... |
var TIMEOUT = 5000;
var AVOID_FILTER = /(sem ocorrência|em processamento)/i;
var Harmonizer = require('color-harmony').Harmonizer;
var Color = require('color');
var sprintf = require('sprintf');
var _ = require('underscore');
var hashObject = require('hash-object');
var ChartJS = require('chart.js');
var squel = requir... |
/**
* @license
* Copyright 2015 Google Inc. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... |
/**
* @author cs
*/
var form_tips;
function form_updateTips(t) {
form_tips.text(t).addClass("ui-state-highlight");
}
function form_checkLength(o, n, min, max) {
if (o.val().length == 0) { //die PLZ darf auch leer sein
}
else if (o.val().length > max || o.val().length < min) {
o.addClass(... |
import {EventTargetFactory} from 'eventtargeter';
import SyncPromise from 'sync-promise';
import {createEvent} from './Event';
import {logError, findError, webSQLErrback, createDOMException} from './DOMException';
import {IDBRequest} from './IDBRequest';
import * as util from './util';
import IDBObjectStore from './IDB... |
var lastInfoPage = 1;
var infoEditors = [];
// class SimpleElement {
// tagName = "";
// id = "";
// classes = "";
// /** @type {[SimpleElement]} children*/
// children = [];
// text = "";
// }
function start_editor(){
let isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
... |
// 新车点检信息
var carCheckInfo = [
{ "name": "车辆编号", "type": "text", "inputName": "vSn", "must": "*" },
{ "name": "随车物品", "type": "text", "inputName": "item", "must": "" },
{ "name": "车辆型号", "type": "text", "inputName": "brandModelone", "must": "*" },
{ "name": "随车工具", "type": "text", "inputName": "tools", ... |
"use strict";
/* eslint max-statements:[2, 30]*/
const path = require("path");
const _ = require("lodash");
const async = require("async");
const chalk = require("chalk");
const args = require("./args");
const Environment = require("./environment");
const log = require("./log");
const clone = require("./utils/clone")... |
// Ensure ThreeJS is in global scope for the 'examples/'
global.THREE = require('three');
const { lerp } = require('canvas-sketch-util/math'); //npm install canvas-sketch-util in this projects directory to use this
const random = require('canvas-sketch-util/random');
const palettes = require('nice-color-palettes'); //... |
/* -------- 請求書データ ------*/
function nvl(src_val, rep) {
return (src_val == null) ? rep : src_val;
}
function getPdfDataInvoice(mode, invoice, setting, sumInvoice, customer, docClass = 'origin') {
const h = {};
const sum = {};
if (mode == 'delivery') {
h.category = '納品書';
h.baseImagePa... |
/***
* 1) желательно использовать для вывода какую-нибудь графическую среду, отображение в 2D хватит
*
* 2) на заданном расстоянии I (пусть будет длина - 1) поставлены две точки (далее - фокусы А и Т).
*
* 3) Расстояние разделено на алфавит: положим, иврит, тогда фокус А - алеф, а фокус Т - тау.
*
* 4) От обоих ... |
/*
ReguStreaming
Copyright 2018. ReguMaster all rights reserved.
*/
// defined variables //
// canvas
'use strict';
reguStreaming.canvas = null;
reguStreaming.canvas2D = null;
reguStreaming.audioContext = null;
/*
let canvas;
let canvas2D;
let src;
let analyser;
let context;
let canvasWidth;
let canvasHeight;
... |
const Display = require("./display");
const Keyboard = require("./keyboard");
const beepWav = require("RES/sounds/beep-01a.wav");
class Chip8 {
constructor(el, { chip = {}, display = {} }) {
let { speed, cycle } = chip;
let { pixelSize } = display;
this.TICK = speed ? 1000 / speed : 1000 / 60;
this.C... |
import React, { Component } from "react"
import styled from "styled-components"
// import { withI18next } from '../lib/withI18next';
import initFirebase from "../lib/initFirebase"
import Web3Local from "web3"
import Emojify from "react-emojione"
const web3local = new Web3Local(
new Web3Local.providers.WebsocketProvi... |
/* CONFIGURATION (Version Requirements)
UNIVERSITY OF SUBWAY - SYSTEM DETECTION
All versions are represented as: equal-to or greater-than */
// BROWSER REQUIREMENTS
var IE_REQ = 6;
var CHROME_REQ = 10;
var FIREFOX_REQ = 3;
var SAFARI_REQ = 3;
// PLUGIN REQUIREMENTS
var FLASH_REQ = 9;
var JAVA_REQ... |
/* @flow */
import React, { Component, useState, useEffect } from 'react';
import {
StyleSheet,
Dimensions,
View,
Animated,
Image,
TouchableOpacity,
Text,
Platform,
RefreshControl,
PermissionsAndroid,
BackHandler,
ScrollView
} from 'react-native';
import VenueDetail from ... |
'use strict'
const LineCoordinates = require('../layout/line-coordinates.js')
const SvgNodeSection = require('./svg-node-section.js')
class SvgNode {
constructor (parentContent) {
this.parentContent = parentContent
this.ui = parentContent.ui
// Set and updated in .setCoordinates():
this.strokePaddi... |
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
* in FIPS 180-2
* Version 2.2 Copyright <NAME>, <NAME> 2000 - 2009.
* Other contributors: <NAME>, <NAME>, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for details.
* Also http://anmar.e... |
import React, { useEffect, useState, useCallback } from 'react';
import PropTypes from 'prop-types';
import { withRouter } from 'react-router-dom';
import BigNumber from 'bignumber.js';
import { compose } from 'recompose';
import commaNumber from 'comma-number';
import { Row, Col, Icon } from 'antd';
import styl... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.mergeThemes = exports.mergeStyles = exports.mergeAnimations = exports.mergeStaticStyles = exports.mergeFontFaces = exports.mergeThemeStyles = exports.mergeThemeVariables = exports.mer... |
/**
Forward mouse events to the view's stack of overlaid visual layers to simulate the "hit
testing" that would occur natively if the visual layers were all implemented as descendants of
a single, common svg element.
In that scenario, native hit-testing is used: a mouse event at any point is forwarded to the
... |
const requestNode = require('request');
const Recording = require('../models/http/Recording');
const routing = require('../routes/recording');
const manager = require('../lib/pm2/manager');
const constants = require('../lib/util/constants');
var activeRecorders = {};
/**
* Recorder object
*
* This object i... |
/*
* decaffeinate suggestions:
* DS001: Remove Babel/TypeScript constructor workaround
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS206: Consider reworking classes to avoid initClass
* DS207: Consider shorter variations of null checks
* Fu... |
/**
* Copyright 2020 Google LLC
*
* 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 applicable law or agreed to... |
/**
*
*/
var typingTimer; //timer identifier
var doneTypingInterval = 5000; //time in ms, 5 second for example
$(function () {
$('[data-toggle="tooltip"]').tooltip()
});
$(function() {
var $contextMenu = $("#contextMenu");
$("body").on("contextmenu", ".searchList", function(e) {
... |
var Util = require('../util/common');
var Global = require('../global');
var Tooltip = require('../component/tooltip');
var Helper = require('../util/helper'); // Register the default configuration for Tooltip
Global.tooltip = Util.deepMix({
triggerOn: ['touchstart', 'touchmove'],
// triggerOff: 'touchend',
... |
/*==========BEGIN Llama Slides==========*/
//creates the slides
function llamaSlide (copy)
{
this.copy = copy;
var llamasArray = [];
var typewriterCollisionCheck = false; //keeps track of collisions for cancelling the typewriter animation
this.stopTypewriter = function() //cancels the typewriter animation o... |
import http from 'axios';
import { noticeError } from '../util/analytics.js';
import domainActions from '../actions/domain_actions.js';
import errorActions from '../actions/error_actions.js';
import quotaActions from '../actions/quota_actions.js';
import routeActions from '../actions/route_actions.js';
import userActi... |
const mongoose = require("mongoose");
const _ = require("lodash");
const uuid = require("node-uuid");
const utilsAsync = require("../helpers/utils.async");
const MongooseSchemaBuilder = require("../mongoose/schema.builder");
const AppSchema = require("./app.schema");
const AppManager = require("../builder/app.man... |
var chart1;
var chart2;
function generateChart1() {
// if(chart1 !== undefined){
// chart1.update();
// }
var pic1BeginY = parseFloat($("#chart1_index1").val());
// console.info('pic1BeginY = ' + pic1BeginY);
var pic1IndexY2 = parseFloat($("#chart1_index2").val());
// console.info('pic... |
const { ipcRenderer, TouchBarOtherItemsProxy, TouchBarSegmentedControl } = require('electron');
const schedule = require('./schedule.js');
const scraper = require('../web_scraper/web_scraper.js');
var ip = require("ip");
//gets the selected value of a set of radio buttons
//@param buttons - a list of buttons, e.g.retu... |
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
r... |
//////////////////////////////
//This is 'game' variable is the soul of the game
/////////////////////////////
//var game = new Phaser.Game(640, 480, Phaser.AUTO, 'game-canvas');
var game = new Phaser.Game(640, 480, Phaser.AUTO, 'game-canvas', { preload: preload, create: create, update: update, render: render });
v... |
var Template = require('./template.js');
var makeCompTable = require('./compTable.js');
var display, request, progressBar, rankContainers = {}, rankData = {}, currentRollNumber, latestResult = '-', currentSem, marksList = [];
window.onload = function() {
display = document.getElementById("Display");
request =... |
var queueIndex = 0;
var latest, root;
var ongoingPick, nextPick;
var animationStarted = false;
var brightColorAlpha = '789ABCDEF';
var arr = [];
var portal = 650;
var maxLevel = 0;
var max = 100;
var min = -100;
var levelSpacing = 35;
var lock = false;
//let tempArray = [56,-90,43,-57,53,49,55,-89,23];
//var max = 100;... |
import React from 'react';
import {ReactSVGPanZoom} from 'react-svg-pan-zoom';
import {ControlPoint, Point, Line, Arc, Bezier, Clone} from './shapes.js';
import {Solver} from './solver/solver.js';
import {handleKeyPress} from './userInputs/hotkeys.js';
import {functionAverageX, functionAverageY, clone} from './utils.js... |
/**
* find the multiplicative inverse of i in GF(2^8)
*
* denote i'(x) = i^-1(x), the multiplicative inverse of i
* i(x) * i'(x) = 1 (mod m(x))
*
* for AES the module is 0x11b, (x^8 + x^4 + x^3 + x + 1)
*
* for the special value 0, the inverse is set to 0
* for other cases, here finds them by trails
* @para... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.