text
stringlengths
3.07k
16k
// https://github.com/passport/express-4.x-openidconnect-example/blob/master/server.js if (!process.env.SKIP_DOTENV_CONFIG) { require('dotenv').config(); } const fs = require('fs'); const path = require('path'); const shell = require('shelljs'); const express = require('express'); const expressSession = require('ex...
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in m...
// const fs = require('fs') const rp = require('request-promise-native') // const schedule = require('node-schedule') const ObjectId = require('mongodb').ObjectId const rws = require('../utils/rws') // const athome = require('./athome') // const LiveWS = require('bilibili-live-ws') const nameConv = require('../utils/...
const MongoClient = require('mongodb').MongoClient const objectID = require('mongodb').ObjectID; const empresasDao = require("./empresas_dao"); const publicacionesDao = require("./publicaciones_dao"); const mailService = require("../services/mailService"); const stringConexion = process.env.STRINGCONEXION; var ...
/** * 初始化着色器 * vs 顶点着色器代码 * fs 片元着色器代码 */ function initShaders(gl, vs, fs) { var shaderProgram = gl.createProgram();//创建着色器 //编译着色器代码 var fragmentShader = getShaderByCode(gl, fs); var vertexShader = getShaderByCode(gl, vs); //链接着色器程序 gl.attachShader(shaderProgram, vertexShader); gl.attachShader(shad...
var SocketChat = (function($) { // Elements const usersBox = '.left'; const chatBox = '.right'; const usersList = '#users'; const selectedUser = '#selected'; const messageInput = '#message'; const admin = 'admin'; const sendButton = '#send'; const submit = '.bottom'; const conversationBox = '#conve...
export const isNotNullOrUndefined = (string) => { return string !== null && string !== undefined } // uses setObject setter to set object to fetch response export const setObjectFromApi = (path, setObject) => { fetch(path, { method: "GET", headers: { "Content-Type": "application/json", Accept:...
var defaultConfig = { clones: 4, // number of clones randomClones: true, // number of clones will differ by 0-50% for each burst spread: 0.8, // spread of clones rotate: 480, // rotation of clones starting from 0 angle: 0, // direction of burst in degrees, 0 onl...
import React from 'react'; import {makeStyles} from "@material-ui/core/styles"; import Card from "@material-ui/core/Card"; import MatchRadarChart from "./match_radar_chart"; const useStyles = makeStyles((theme) => ({ card: { padding:15, borderRadius: 7, minWidth: 330, maxWidth: 330,...
/* Unit tests for the p2p.js library. TODO: */ 'use strict' const assert = require('chai').assert const util = require('util') util.inspect.defaultOptions = { depth: 1 } // Mocking libraries const Network = require('./mocks/network-mock') const mockOrbitData = require('./mocks/orbitdb-mock') // File under te...
var assetsManager = new function(){ var MAX_PATTERNS = { "images/bar/blood.png": 1, "images/bar/inlayer.png": 1, "images/characters/monster-01.png": 1, "images/characters/monster-02.png": 1, "images/characters/monster-03.png": 1, "images/characters/sing_effect.png": 15 }; var s = window.lo...
import React, { useRef } from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { isEqual } from 'lodash'; import setFieldData from 'final-form-set-field-data'; import { CustomPropertiesEdit } from '@k-int/stripes-kint-components'; import { handleSaveKeyCommand } from '@...
var bookingData, noticeData; //调入复查项目 function loadItems() { modalSwitch = false; bookingData = {medicalCard: null, totalAmount: 0, chosenReexaminationItems: [], targetTime: null , available: true, process: false}; //预约提交数据格式 noticeData = {itemName: [], itemPrice: []}; $.get("item/load", afterLoadItems);...
// Import external dependencies import React, { useState, useEffect } from "react"; import socketIOClient from "socket.io-client"; import axios from "axios"; // Import local components import logo from "../images/logo192.png"; import Navbar from "../components/Navbar/index"; import Header from "../components/Header/in...
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.defineProperty(target, des...
function Calculator() { this.graph = null; this.colors = ["black", "crimson", "darkorange", "gold", "green", "blue", "indigo", "purple"]; this.numResults = 0; this.curves = []; this.reset = function() { this.numResults = 0; this.graph = JXG.JSXGraph.initBoard("gra...
var groundHeight; var mountain1; var mountain2; var tree; var moon; var sun; var darkness; var cloud1; var cloud2; function setup() { createCanvas(800, 600); // Set the groundHeight proportional to the canvas size groundHeight = (height / 4) * 3; // Initalise the mountain objects with properties to...
import QuizLogic from "./QuizLogic.js" import MainMenu from "./MainMenu.js" import * as UI from "./UI.js" const GameSettings = (() => { const settings = { difficulty: "medium", quantity: 10, category: null, overlayIsOpen: false, desiredQuantity: 10, maxAvailable: 50 } const restoreSetti...
import React from 'react' import styled, { css } from 'styled-components' import { Icon } from '@blueprintjs/core' import PropTypes from 'prop-types' import Badge from './Badge' const fontTypes = css` position: relative; color: ${({theme, color, invertColor}) => color ? color : invertColor ? theme....
var createError = require("http-errors"); var express = require("express"); var path = require("path"); var cookieParser = require("cookie-parser"); var logger = require("morgan"); var passport = require("passport"); var ensureLoggedIn = require("connect-ensure-login").ensureLoggedIn; var flash = require("connect-flash...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Enum = undefined; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symb...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); 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 ("va...
import React from 'react' import styled from 'styled-components'; import { GatsbyImage, getImage } from 'gatsby-plugin-image'; import { graphql, useStaticQuery } from 'gatsby'; const Card = styled.div` background-color: white; border-radius: 7px; padding:1.5rem; -webkit-box-shadow: 4px 4px 6px 0px rgba(...
var fs = require('fs'); require.extensions['.aes'] = function (module, filename) { module.exports = fs.readFileSync(filename, 'utf8'); }; const expect = require('chai').expect; const PS = require("./dist/bundle.js"); const CSmall = 'contract Foo =\n entrypoint init() = ()'; const CLarge = require("./staking_co...
const test = require('ava') const { vanillaPuppeteer, addExtra } = require('../../test/util') const Plugin = require('.') test('stealth: will have convincing mimeTypes', async t => { const puppeteer = addExtra(vanillaPuppeteer).use(Plugin()) const browser = await puppeteer.launch({ headless: true }) const page...
var SlayerMasters = { SPRIA : { id : 8462, combatLevel : 3, slayerLevel : 1 }, TURAEL : { id : 8480, combatLevel : 3, slayerLevel : 1 }, MAZCHNA : { id : 8481, combatLevel : 20, slayerLevel : 1 }, ACHTRYN : { id : 8465, combatLevel : 20, slayerLevel : 1 }, VANNAKA : { id : ...
import { hex2rgb } from '../utils/utils.js'; import { colorsRgb, wikiColorsRgb } from '../data/colors.js'; const RGBCOLORS = { ...wikiColorsRgb, ...colorsRgb }; const COLORS = 256 ** 3; // number of colors in rgb integer space const PRIMES = [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67,...
import React, { useState, useEffect } from 'react'; import instagramText from './images/instagram.png'; import './App.css'; import Post from './Post'; import { db, auth } from "./firebase"; import Modal from '@material-ui/core/Modal'; import { makeStyles, Button, Input, withStyles } from '@material-ui/core'; import Ima...
'use strict'; // Test the asychronous raspio-i2c methods // Assumes that a DS1621 temperature sensor is wired up to the Pi var assert = require('assert'), I2C = require('../').I2C, i2c = new I2C(); var DS1621_ADDR = 0x48, CMD_ACCESS_CONFIG = 0xac, CMD_ACCESS_TL = 0xa2; // Wait while non volatile memory busy...
//Not for pages that handle navigation var oldRgb= oldU= oldW= 140, clock; const DLY=1500, //Canvas SUB=0; PLY= setPl(); var FN; function CSfn(ic, rgb, U, W, r, g, b, oRGB, oW, oU){ var V= oRGB*(1-ic) + rgb*ic; let _X= 0.0266813*V -6, _PN= _X<0? -1: 1; var brt= _PN*0.473474*Math.pow(Math.abs(_X), 1/7)+ 2.2, vrt=V<...
/* global all, bots, command, config, master, rootdir */ /* eslint no-undef: "error" */ import fs from "fs"; import path from "path"; import lodash from "lodash"; import { hasAuth } from "./auth.js"; import { getRandomInt } from "./tools.js"; async function loadPlugins() { let plugins = {}; const enableList = { ....
import React, { Component } from 'react' import { connect } from 'react-redux' import TimeBlock from './TimeBlock' import { selectTimelineTimeBlocks } from '../../../../reducers/timeblocksFilters' import { addNewTimeBlock, deleteNewTimeBlock, proxyUpdateTimeBlockTimes, updateTimeBlock } from '../../../../actions/timebl...
import React, { useState, useContext, useEffect } from 'react'; import { StyleSheet } from 'react-native'; import { useFocusEffect } from '@react-navigation/native'; import { ThemeContext } from 'styled-components'; import database from '@react-native-firebase/database'; import { Title, Intern, KeysTitleText, Key, ...
"use strict"; var Particle = function(){ this.id = null; this.type = null; this.x = null; this.y = null; this.circle = null; this.text = null; this.index = null; this.show_labels = true; return this; } Particle.prototype.getRandomId = function(){ var id = ''; for (var i = 0...
import { Vector3, Scene, BoxGeometry, WebGLRenderer, PerspectiveCamera, Mesh, sRGBEncoding, MeshPhongMaterial, AxesHelper, Cache, } from 'three' import { WorldSys } from './sys/WorldSys' import { SocketSys } from './sys/SocketSys' import { UiSys } from './sys/UiSys' import { InputSy...
import TypedMap from './Data/TypedMap.js'; import TypedList from './Data/TypedList.js'; import DistributedResource from './Net/IIP/DistributedResource.js' import MemoryStore from './Stores/MemoryStore.js'; import IndexedDBStore from './Stores/IndexedDBStore.js'; import IResource from './Resource/IResource.js'; import...
/* By: VINT64 All code copied from Stack Overflow and other places keeps its respective licenses. All original code is unlicensed (more info https://unlicense.org ) */ //uses Document let index = 0; function ComOver(x, y, width, height, text, editorMode, listeners){ const COMMENT_VERTICAL_OFFSET = 5; const COM...
const { etherGasCost, etherMantissa, etherUnsigned, sendFallback } = require('../Utils/Ethereum'); const { makeMToken, fastForward, setBalance, setEtherBalance, getBalances, adjustBalances, } = require('../Utils/Moma'); const exchangeRate = 5; const mintAmount = etherUnsigned(1e5); const mintToken...
const ageTypeEnum = { NEWBORN: 0, LESS_THEN_6: 1, GREATER_THEN_6: 2, CHILD: 3 }; var appliedDrugs = []; $('input[type=radio][name=age]').change(function() { if (this.value == 'child') { $("#age").show(); } else { $("#age").hide(); } }); $( "#start" ).click(func...
let Systembolaget = require('../bolaget'); let Person = require('../person.js'); let assert = require('assert'); module.exports = class SystembolagetTest { testSystembolagetConstructor(){ // när vi skapar en instans av systembolaget så skall // den få en array av personer som befinner sig...
import { extend, foreach, type } from "../func/util"; import ModuleLoader from "./ModuleLoader"; import requestEventHandler from "./requestEventHandler"; import amHistory from "./history/core"; /** unmountStructure ( structure: Object ) Return Type: void Description: 卸载结构 当更新页面时,相应的结构也将会变化 ...
const fs = require('jsdoc/fs'); const env = require('jsdoc/env'); const path = require('jsdoc/path'); // code-snippets Map const snippetsMap = {}; const tagsMap = {}; const attributesMap = {}; const TYPE_LIST = [ 'string', 'number', 'boolean', 'array', 'function', 'object', ]; const MD_TYPE_MAP = { param...
import React from 'react' import { Scaler } from 'dapparatus' import i18n from '../i18n' let metaReceiptTracker = {} export default class Advanced extends React.Component { constructor(props) { super(props) this.state = { changingAvailable: {} } } render() { let { dollarDisplay, buttonStyl...
'use strict'; var browserSync = require('browser-sync'); // Save a reference to the `reload` method var reload = browserSync.reload; var del = require('del'); var glob = require('glob'); var gulp = require('gulp'); var pkg = require('./package.json'); var plugins = require('gulp-load-plugins')(); var proxyMiddleware =...
import { Drawer, DrawerBody, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerContent, DrawerCloseButton, Box, useColorModeValue, Stack, FormLabel, Input, InputGroup, InputLeftAddon, InputRightAddon, Select, Textarea, useDisclosure, Button, ...
import moment from 'moment' import help from './help' export function animeAttachment (anime, extended) { let text = '' let fields = [] let title_link = process.env.KITSU_HOST + '/anime/' + anime.slug let fallback = anime.canonicalTitle + ' - ' + title_link if (anime.synopsis) { text = anime.synopsis ...
/* Copyright 2018 <NAME> 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 in writing, software distribu...
import React from 'react'; import { Table, Button, Select, Form, DatePicker, InputNumber } from 'antd'; import {connect} from "react-redux"; import {getStaffList} from "../../../apis/index"; import moment from "moment/moment"; import {batchEditTestPlan, getTestPlan} from "../../../apis"; import ...
// @ts-check const env = require('./env'); const tmi = require('tmi.js'); /** * @typedef {import("./pages/obs-overlays/types").TwitchChat} TwitchChat * @typedef {import("./pages/obs-overlays/types").TwitchChatSocketListenerEvents} TwitchChatSocketListenerEvents * @typedef {import("./pages/obs-overlays/types").Twitc...
import { gPrecision, clamp, approximateEqual } from "../math/Math"; import { clone, toFixed, forall } from "../utils/array"; import { Quaternion } from "../math/Quaternion"; import { Vector3, v3 } from "../math/Vector3"; import { rotateByUnitVectors } from "./points"; export function vectorYCompare(a, b) { return ...
const Alexa = require('alexa-sdk') const moment = require('moment') // "Alexa, give me the birthday countdown for {Person}" // Who do you want a birthday countdown for? // When is Maria's birthday? // Tell me the date of Maria's birthday // There are two months and twenty six days until Maria's birthday const APP_ID ...
'use strict'; let arrayImgName = [ 'bag.jpg', 'banana.jpg', 'bathroom.jpg', 'boots.jpg', 'breakfast.jpg', 'bubblegum.jpg', 'chair.jpg', 'cthulhu.jpg', 'dog-duck.jpg', 'dragon.jpg', 'pen.jpg', 'pet-sweep.jpg', 'scissors.jpg', 'shark.jpg', 'sweep.png', 'tauntaun.jpg', 'unicorn.jpg', 'unicorn.jpg', 'water-can....
import debounce from 'lodash.debounce' import examples from './examples' import temme, { cheerio, temmeParser, version } from 'temme' import { EXAMPLE_MODE, EXAMPLE_NAME } from './constants' import { loadContentFromUri, saveContentToUri } from './uriUtils' import { debouncedSaveContentToLocalStorage, loadContentFro...
import ConnectionGroup from '../connection-group/index'; const hooks = { read: { nodes: [], fields: [], }, write: [], update: [], request: [], }; /** * An empty plugin object. Every plugin group * will boil down to one of these. * @type {Object} */ export const base = { /** * Lifecycle hook...
/** * 可拖拽表格 */ import React, { PureComponent, Fragment } from 'react'; import { Table, Alert, } from 'antd'; import styles from './index.less'; import { Resizable } from 'react-resizable'; import { isNotBlank } from '@/utils/utils'; function initTotalList(columns) { const totalList = []; columns.forEach(col...
function createDanmuEntry(special, medal, sender, content) { let danmuEntry = document.createElement('span') if (special) { danmuEntry.className = 'danmu_entry special' } else { danmuEntry.className = 'danmu_entry' } if (medal) { danmuEntry.appendChild( createMedal(medal.guardLevel, medal.na...
const header = { // all the properties are optional - can be left empty or deleted homepage: 'https://rawat2511.github.io/', title: 'SR.', } const about = { // all the properties are optional - can be left empty or deleted name: '<NAME>', role: 'MERN Stack Developer', description: "Aspiring Web Develope...
import path from 'path'; import {promises as fs} from 'fs'; import {fileURLToPath} from 'url'; import t from 'libtap'; import {grabImage, testBrowser} from '@cfware/tap-selenium-manager'; import {FastifyTestHelper} from '@cfware/fastify-test-helper'; import calculateSize from './calculate-size.js'; const cwd = path....
import React from 'react'; import './representation.css'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { toggleGridOrCardDisplay, displayEventModal, deleteEvent } from '../../../.././data/actions'; import Month from './components/Month/Mon...
import axios from 'axios'; import { isBbox, isMultiPolygon, isPolygon } from '../../components/common/Map/utils/geoUtils'; import { getRequestBody, getUrlFromCurl } from '../../components/process/requests/parseRequest'; import { isEmpty } from '../../utils/commonUtils'; import { CUSTOM } from '../../utils/const/const';...
const fs = require('fs'); const ACData = require("adaptivecards-templating"); const { CardFactory } = require('botbuilder'); require('isomorphic-fetch'); const { Client } = require("@microsoft/microsoft-graph-client"); const config = require('../config/default.json'); getAdaptiveCard = (req, res) => { const client ...
// function // alert("Welcome"); function get_regions() { $.ajax({ type: "GET", url: "get-regions-api", datatype: "application/json", success: function (response) { // console.log(response); let data = response.data; $.each(data, function (index...
/** * @author <NAME> (<EMAIL>/<EMAIL>). Copyright MSF UK 2016. * * Main is the main class that is called from both Android and iOS on application startup. * It initializes the application and controls which scene is rendered to the end user through the Navigator component. */ import React from "react"; import {Na...
// // Created by <NAME> on 18/3/9. // illuspas[a]gmail.com // Copyright (c) 2018 Nodemedia. All rights reserved. // const Logger = require('./node_core_logger'); const EventEmitter = require('events'); const { spawn } = require('child_process'); const dateFormat = require('dateformat'); const mkdirp = require('mkdi...
/** * Created by esabbath on 5/23/16. */ $(function() { $(document).on('submit', 'form', function (e) { var $form = $(this); /*login and register is working with redirect*/ if ($form.data('no-ajax')) { return true; } /* Check if form is already validated retur...
// cubemap_dynamic.js var viewer = two.ui.scene_viewer(panel); //two.ui.orbit_controls(viewer); viewer.viewport.autorender = false; var scene = viewer.scene; if(init) { this.count = 0; this.lon = 0.0; this.lat = 0.0; this.phi = 0.0; this.theta = 0.0; var camera = viewer.camera; camera.fov = 60....
var count = parseInt(document.getElementById("cookieCount").innerText); var cursorNumber = parseInt(document.getElementById("cursorCount").innerText); var grandmaNumber = parseInt(document.getElementById("grandmaCount").innerText); var farmNumber = parseInt(document.getElementById("farmCount").innerText); var mineN...
const execa = require('execa') const path = require('path') const waitOn = require('wait-on') const kill = require('kill-port') const fs = require('fs-extra') const tmp = require('tmp') const set = require('lodash/set') const get = require('lodash/get') const { updatePackageJson, revertPackageJson } = require('./helper...
/*! * WebRTC-MCU * git https://github.com/xivistudios/webrtc-mcu * Copyright(c) 2018-2023 <NAME> * MIT Licensed */ "use strict" /** * Module dependencies. */ const assert = require("assert") /** * 获取值类型 * @private */ function ValuesType (Arguments) { /* * 排除一种情况 * 单个参数验证 * 类型直接取类型构造函数的na...
var superagent = require('superagent'), debug = require('debug')('liftie:weather'), moment = require('moment'), idmap = require('./opensnow'), limiter = require('../tools/limiter'), apikey = process.env.OPENSNOW_API_KEY; module.exports = fetch; // 12 times a minute var limit = limiter(12, 'minute'); functi...
'use strict'; const passport = require("passport"); const requestAuth = passport.authenticate('jwt', { session: false }) module.exports = function(app, db, server) { // General routes var uploadController = require('./controllers/UploadController'); app.route('/api/upload') .post( (req, res) => {...
// Copyright 2018 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
import TreeBuilder from './builder.js'; const dTree = { VERSION: '/* @echo DTREE_VERSION */', init: function(data, options = {}) { var opts = _.defaultsDeep(options || {}, { target: '#graph', debug: false, width: 600, height: 600, hideMarriageNodes: true, callbacks: { ...
/** * This module provides a means by which CanvasXpress for Python code can be generated. * Example: See cxp_code_gen_example.js */ /** * Formats an object into a string acceptable for use in the generated Python code. * @param json_compliant_object The value to format. * @param code_indent The number of spaces...
/** * @module SteamPaths * * @property {Path} root - The root of the Steam installation. * @property {Number} id64 - The current user's Steam ID64. * @property {Number} accountId - The current user's Steam3::account ID * @property {Array} all - All of the configuration file paths except steamapps skins. * @prope...
var _popups = {}; function popupInit() { var els = document.getElementsByClassName("popup"); while(els.length) { var name = els[0].getAttribute("name"); _popups[name] = new popup(els[0]); } if (typeof(MutationObserver) == "function") { var observer = new MutationObserver(function(mutations...
/** * @module meteoJS/thermodynamicDiagram/axis */ import { getNormalizedTextOptions } from './Functions.js'; import PlotArea from './PlotArea.js'; /** * Definitions for the labels of an axis. * * @typedef {module:meteoJS/thermodynamicDiagram~textOptions} * module:meteoJS/thermodynamicDiagram/axis~labelsOpt...
'use strict'; var blessed = require('blessed'); const logger = require('../util/Logger.js'); const clipboard = require('../util/Clipboard.js'); const CheckboxListDialog = require('./CheckboxListDialog.js'); const MessageDialog = require('./MessageDialog.js'); const tagConfig = require('../util/TagConfig.js'); const Fi...
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. "use strict"; var fs = require('fs'); var fsExtra = require('fs.extra'); var path = require('path'); var tscore = require('./tscore'); function startsWith(s, pref...
// MIT © 2018 azu "use strict"; const path = require("path"); const spawn = require("cross-spawn"); const readPkg = require("read-pkg"); const validatePkgName = require("validate-npm-package-name"); const { extractJSONObject } = require("extract-first-json"); /** * @param {string} [filePathOrDirPath] * @returns {Prom...
import { module, test } from 'qunit'; import { fillIn, find, visit, currentURL, waitFor } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import Fixtures from '@cardstack/test-support/fixtures' import { createCards } from '@cardstack/test-support/card-ui-helpers'; import { setupMockUser,...
import React, {useContext, useEffect, useLayoutEffect, useRef, useState} from "react"; import {Platform, ScrollView, StyleSheet, View} from "react-native"; import {ActivityIndicator, Button, IconButton, Subheading} from "react-native-paper"; import {showMessage} from "react-native-flash-message"; import DateTimePicker ...
"use strict"; /* eslint no-bitwise: off*/ var debug, DynamicBuffer; /** * Returns an empty frequency table including the stop bit (256). * * @return {Object} */ function makeEmptyFrequencyTable() { var i, map; map = {}; for (i = 0; i < 256; i += 1) { map[i] = 0; } map[256] = 1; ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ResultViewer = void 0; var _react = _interopRequireDefault(require("react")); var _reactDom = _interopRequireDefault(require("react-dom")); var _propTypes = _interopRequireDefault(require("prop-types")); function _interopRequire...
const mongo = require('../mongo'); const config = require('../config.json') const leaderboardSchema = require('../schemas/leaderboard-schema'); const { default: axios } = require('axios'); const Discord = require('discord.js'); module.exports = { name: 'leaderboard', description: 'Leaderboard for League of Leg...
var bnr = document.querySelector('.j-bnr'), sld = bnr.querySelector('.j-slide'); window.addEventListener('load', function () { var bnrIdx = 0;// 当前轮播图位置 var bnrCache = [];// 缓存轮播图的DOM节点 /** * [ptrCtrlBnr 滑块指示器控制轮播] * @param {[DOM node]} elem [整个轮播图DOM节点] * @param {[Integer]} index [滑块指示器当前位置] * @par...
/* * Copyright 2016 Battelle Energy Alliance, 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...
import React, { Component } from "react"; import { connect } from "react-redux"; import { FormGroup, Input, InputGroup, InputGroupAddon, Label, Button, Col, Row, Progress } from 'reactstrap'; import * as actions from "../../Store/Actions/MediaActions"; import ClipboardJS from "clipboard"; new ClipboardJS(...
const WebSocket = require('ws'); const request = require('request'); const low = require('lowdb'); const FileSync = require('lowdb/adapters/FileSync'); const adapter = new FileSync('db.json'); const DB = low(adapter); const JOIN_ROOM = "JOIN_ROOM"; const SET_ROOM_CONFIG = "SET_ROOM_CONFIG"; const PORT = 10050; const...
import React,{Component,PropTypes} from 'react'; import {observer} from 'mobx-react' import {inject} from '../store/index' import { Button, Image, View ,StyleSheet,Text} from 'react-native'; import {Picker,InputItem,Toast} from 'antd-mobile' import {NavBar,Item,IPickerItem,VCode} from '../component/index' import Icon f...
import React, { Component, useState, useEffect } from 'react' import { web3, kit } from '../../root' import { StyleSheet,Text, TextInput,TouchableOpacity, KeyboardAvoidingView, Image, View, StatusBar } from 'react-native' import { requestTxSig, waitForSignedTxs, requestAccountAddress, waitForAccountAuth, FeeCurrency } ...
// addCommasToNumber adds commas to a number at the thousands places. function addCommasToNumber(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } // formatUnixTime takes a unix timestamp from the blockchain and // returns a date. function formatUnixTime(unixTime) { var date = new Date(unixTime * ...
$(document).ready(function() { var urlPath = window.location.pathname; if(urlPath.match(/2018\/$/)) { handleHomeAlert(); } if(urlPath.match(/login/)) { handleLoginErrors(); } if(urlPath.match(/speaker\/.+/) || urlPath.match(/proposals\/.+\/[submit|edit]/)) { ...
import React, { useContext, useState, useEffect } from "react"; import PropTypes from "prop-types"; import { useHistory } from "react-router-dom"; import axios from "axios" import Swal from 'sweetalert2' import SharedContext from "../../../SharedContext"; const CardTable = ({ color }) => { const history = useHistor...
// // Helpers // var ServiceWorker = require('./service-worker').ServiceWorker; // // CacheManager // /* switch (appCache.status) { case appCache.UNCACHED: // UNCACHED == 0 case appCache.IDLE: // IDLE == 1 case appCache.CHECKING: // CHECKING == 2 case appCache.DOWNLOADING: // DOWNLOADING == 3 case appCach...
import React, { useState, useEffect } from 'react'; import { useParams } from "react-router-dom"; import './Resume.css'; import API from '../../utils/API'; import JobList from '../../components/Lists/JobList/JobList'; import EduList from '../../components/Lists/EducationList/EducationList'; import CertList from '../../...
import superagent from 'superagent'; import google from 'google'; const geocoderService = new google.maps.Geocoder(); const autocompleteService = new google.maps.places.AutocompleteService(); const placesService = new google.maps.places.PlacesService(document.createElement('div')); const queryCache = {}; const autoco...
import { MESSAGE_TYPE } from './app'; /** * Transaction Type is a Wallet contruct used internally * @typedef {Object} TransactionTypes * @property {'transfer'} TOKEN_METHOD_TRANSFER - A token transaction where the user * is sending tokens that they own to another address * @property {'transferFrom'} TOKEN_METHOD_...
import './style.css' import * as THREE from 'three' import * as dat from 'dat.gui' // Canvas const canvas = document.querySelector('canvas.webgl') // Scene const scene = new THREE.Scene() // setting let setting = { particleSpread: 500, particleSpeed: 0.005, nParticle: 25000, particleSize: 0.05 } // Debu...
import React, {Component} from 'react'; import CartItem from './CartItem' class Cart extends Component { constructor() { super(); this.state = { cart: [], cartObject: [], cartPrice: 0, confirmFrame: "", }; this.displayConfirmation = t...