text
stringlengths
3.07k
16k
/* eslint-disable no-shadow */ /* eslint-disable jsx-a11y/click-events-have-key-events */ /* eslint-disable jsx-a11y/no-static-element-interactions */ /* eslint-disable jsx-a11y/label-has-associated-control */ /* eslint-disable react/prop-types */ import React, { Component } from 'react'; import { MDBModal } from 'mdbr...
/*! * sighash-test.js - test sighash types * Copyright (c) 2019, <NAME> (MIT License). * https://github.com/handshake-org/hsd */ 'use strict'; const assert = require('bsert'); const KeyRing = require('../lib/primitives/keyring'); const MTX = require('../lib/primitives/mtx'); const Script = require('../lib/script/...
import Plugin from 'extplug/Plugin'; import Events from 'plug/core/Events'; import friends from 'plug/collections/friends'; const isFriend = (id) => !!friends.get(id); const ChatNotifications = Plugin.extend({ name: 'Chat Notifications', description: 'Shows notification messages in chat for useful events', set...
'use strict'; const fs = require('fs'); const path = require('path'); const url = require('url'); const moment = require('moment'); const models = require('../models'); const config = require('../config'); const logger = require('../utils/logger'); const getNextProfileLink = require('./getNextProfileLink'); const save...
import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSModules from 'react-css-modules'; import header from '../scss/header.scss';//如果省略.scss,虽然在webpack构建本地测试环境时该文件找得到,但是在rollup构建生产环境时该文件找不到。 import {PushdownMenu, PushdownItem} f...
import Vue from 'vue' import Router from 'vue-router' Vue.use(Router) /* Layout */ import Layout from '@/views/layout/Layout' /* Router Modules */ import componentsRouter from './modules/components' import chartsRouter from './modules/charts' import tableRouter from './modules/table' /** note: Submenu ...
import { shallowMount } from '@vue/test-utils'; import 'src/module/sw-settings-custom-field/component/sw-custom-field-list'; import 'src/app/component/grid/sw-grid'; import 'src/app/component/grid/sw-pagination'; const set = { id: '9f359a2ab0824784a608fc2a443c5904', customFields: {} }; let customFields = mock...
import { Link } from "gatsby"; import React, { useState, useEffect } from "react"; import PropTypes from "prop-types"; import { connect } from "react-redux"; import ThemePicker from "./themePicker"; import { useLocalStorage } from "../utils/customHooks"; import LogoAnimation from "./LogoAnimation"; import SmoothCollaps...
const objectql = require('@steedos/objectql'); const steedosAuth = require("@steedos/auth"); const _ = require('underscore'); // 禁止同步子表owner值为主表记录owner值的主表对象 // 禁止后有两个效果 // 1.不再同步该对象的子表记录owner值为主表记录owner值 // 2.不再确认修改子表记录时是否有该主表记录的编辑或只读权限 const DISABLE_RELEVANT_OWNER_VALUE_MASTERS = ["objects"]; const setDetailOwner =...
import ProjectsLayout from '@/layouts/projects/Layout'; import { PropTypes } from 'prop-types'; import React from 'react'; import * as localForage from 'localforage'; import { saveProfile } from '../../core/projects/handleProfile'; import CustomAutocomplete from './CustomAutocomplete'; import { isElectron } from '../.....
'use strict'; var LIVERELOAD_PORT = 35729; var SERVER_PORT = 9000; var fs = require('fs'); var path = require('path'); var mountFolder = function (connect, dir) { return connect.static(require('path').resolve(dir)); }; module.exports = function(grunt) { require('time-grunt')(grunt); //time execut...
/** * Main javascript file to create and display the montly reports. * */ var month = ["January","February","March","April","May","June","July","August","September","October","November","December"]; function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } $(document).ready(functio...
$(document).ready(function () { // ============ // BACK TO TOP \\ ============\\ $(window).scroll(function () { if ($(this).scrollTop() > 150) { $('#back-to-top').fadeIn(); } else { $('#back-to-top').fadeOut(); } }); // scroll body to 0px on click $('#back-to-t...
/* @file: tweets.js @author: <NAME> @data: 08/03/20 @about: REST API file. Allowing for GET, PUT, POST and DELTE requests that our front end can make. Connects to our db to store user information. Passes in the obtained auth middleware via passport to secure API. */ const express = require('expr...
const io = require('socket.io')(3000); const users = {}; const elasticsearch = require('elasticsearch'); const Client = new elasticsearch.Client({ host: 'localhost:9200'}); const googleIt = require('google-it') const avatarNum = 10; async function wait_seconds(sec) { await new Promise(r => setTimeout(r, sec* 100...
import validAttr from "@emotion/is-prop-valid"; import hoist from "hoist-non-react-statics"; import React from "react"; import determineTheme from "styled-components/src/utils/determineTheme"; import { EMPTY_ARRAY, EMPTY_OBJECT } from "styled-components/src/utils/empties"; import generateComponentId from "styled-compon...
var nfe = require("./nfeUtils"), dados = require('./dadosUtils'), formatacoes = require('./formatacoesUtils'), removerMascara = formatacoes.removerMascara, utils = require("gammautils"), mUtils = utils.math, isUndefined = utils.object.isUndefined; function eEan(ean) { if(typeof ean !== 'string' || !/^(?:\d{8}|\...
import * as React from "react"; import Line from "./Line"; import { Tokenizer } from "./tokenizer"; import Cursors from "./Cursors"; // var file = new Tokenizer(readFileSync('../node_modules/acorn/dist/acorn.js', 'utf8')); // var file = new Tokenizer(readFileSync('../node_modules/less/lib/less/contexts.js', 'utf8')); v...
const fs = require('fs'); const spawnSync = require('child_process').spawnSync; /* * get_proc_output(image_name, args) * * takes an image name as a string and arguments as an array and returns its * stdout as a string. throws an exception with the contents of stderr if the * process writes to std_err */ function...
import Camera from 'osg/Camera'; import FrameBufferObject from 'osg/FrameBufferObject'; import { mat4 } from 'osg/glMatrix'; import Node from 'osg/Node'; import Program from 'osg/Program'; import Shader from 'osg/Shader'; import Shape from 'osg/shape'; import Texture from 'osg/Texture'; import Transform from 'osg/Trans...
import React, {Component} from 'react' import styled from 'styled-components' import NavBar from './NavBar' import {Container } from 'reactstrap' import InputPanel from "./InputPanel" import ResultsPanel from "./ResultsPanel" import L from '../utils/Log' import { getApi } from '../utils/WWapApi' import demoAccounts fr...
//App singeltons Alloy.Models.User = Alloy.Models.instance('User'); Alloy.Models.Kaltura = Alloy.Models.instance('Kaltura'); //Init UA // Alloy.Globals.UrbanAirship = require('ti.urbanairship'); var currentWin; var currentPage; var currentWinController; var previousWin = []; /** * Remove duplicate pages from the ba...
'use strict' import isEqual from 'lodash/isEqual' /* Pooled Fetch Requests. * Queues fetch() requests so as to limit the number of concurrently * active requests. Intended for use in browser contexts, where sockets * are a limited resource. * * Requests are grouped into "pools," with an upper limit on active *...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveStyleRules = void 0; var tslib_1 = /*#__PURE__*/require("tslib"); var hash_1 = /*#__PURE__*/require("@emotion/hash"); var core_1 = /*#__PURE__*/require("rtl-css-js/core"); var constants_1 = /*#__PURE__*/require("../consta...
import React from "react"; import clsx from "clsx"; import { makeStyles, useTheme } from "@material-ui/core/styles"; import Drawer from "@material-ui/core/Drawer"; import CssBaseline from "@material-ui/core/CssBaseline"; import AppBar from "@material-ui/core/AppBar"; import Toolbar from "@material-ui/core/Toolbar"; imp...
'use strict'; angular .module('gpxViewer', [ 'ngRoute', 'ngResource', 'gpxViewer.controllers', 'gpxViewer.services', 'gpxViewer.filters', 'ui.bootstrap' ]) .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/:filter?', { templateUrl: 'partials/map.html', ...
/*Global Variables*/ const restartElement = document.querySelector('.restart'); const deckElement = document.querySelector('.deck'); const fragment = document.createDocumentFragment(); const deckNodeList = document.querySelectorAll('.card');/*Create a list that holds all cards*/ const modal = document.querySelector('....
var pathing = require("./pathing.js") var calc_stat = require("./types.js").calc_stat function at(map,coord){ return map[coord.y][coord.x] } function is_empty(map,coord){ return at(map,coord) === "E" } function get_stat_fn(stat_name){ return function(game_state,coord){ return calc_stat(game_state....
import PropTypes from 'prop-types'; import React from 'react'; import { injectIntl, FormattedMessage, FormattedHTMLMessage } from 'react-intl'; import { push } from 'react-router-redux'; import { connect } from 'react-redux'; import { Container, Grid, Box } from '@material-ui/core'; import Alert from '@material-ui/lab/...
import React from "react"; // @material-ui/core components import withStyles from "@material-ui/core/styles/withStyles"; import { withRouter } from "react-router"; // core components import GridItem from "components/Grid/GridItem.jsx"; import GridContainer from "components/Grid/GridContainer.jsx"; import CustomInput fr...
import React from "react"; import PropTypes from "prop-types"; class Scrambler extends React.Component { static propTypes = { text: PropTypes.string, wrap: PropTypes.func, wrapUnscrambled: PropTypes.func, duration: PropTypes.number, renderIn: PropTypes.number, humanLike: PropTypes.bool, t...
var devBuild = false; var items = []; var components; var itemJSON; var entityJSON; var editedFile; var eB = new EventBuilder(); function updateGUI() { if(itemJSON) { var _doneIcon = document.querySelectorAll("div.input i")[1]; _doneIcon.style.display = "inline-block"; } if(entityJSON) { var _doneIcon = docu...
/** * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * 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...
/** * EN language */ const robot = { robotType: 'Robot Type', robotTypePlaceholder: '请选择机器人类型', robotToken: 'WebHook', robotTokenPlaceholder: '请输入群机器人的WebHook', robotSecret: 'Secret', robotSecretPlaceholder: '请输入群机器人的密钥' } const agent = { cabinet: { label:'Cabinet', manager...
// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. /*************************** * TEST ASM.JS CORRECTNESS * ***************************/ // asm.js functions should...
/* eslint no-console: 0 */ import inquirer from "inquirer"; import inquirer_autocomplete_prompt from "inquirer-autocomplete-prompt"; import Model from "../model/Model"; import TreeStringify from "../serializers/TreeStringify"; //? if (FILE_SYSTEM) { import fs from "fs"; import JSONSerializer from "../serializers/JSONSe...
/** * A plugin to enable iOS In-App Purchases. * * Copyright (c) <NAME> 2011 * Copyright (c) <NAME> 2012 * Copyright (c) <NAME> 2013 */ var exec = function (methodName, options, success, error) { cordova.exec(success, error, "InAppPurchase", methodName, options); }; var log = function (msg) { console.l...
/** The following algorithm is the implementation of Fisher-Yates * By coolaj86 * From https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array */ function shuffle(array) { let currentIndex = array.length, randomIndex; // While there remain elements to shuffle... while (cu...
// EXTERNAL IMPORTS import Web3 from "web3"; import React, { Component } from "react"; import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; import { Container } from "react-bootstrap"; // IMPORT COMPONENTS import Header from "./components/Header"; import Home from "./components/Home"; import Crea...
/* Indexing GUI & Indexing/Manifest Sower Jobs (PXP-5786) This test plan has a few pre-requisites: 1. Sower must be deployed and 2. The environment's manifest must have the indexing jobs declared within the sower config block (manifest-indexing & indexd-manifest) 3. The Indexing GUI is only available in data-p...
const deasync = require('deasync-promise'); const $RefParser = require('json-schema-ref-parser'); /** * Capitalize the first letter in a header * * @param {string} str String to Titlecase */ function formatType(str) { return str.charAt(0).toUpperCase() + str.slice(1); } // TODO change / to |, requires core fi...
import { createGlobalStyle } from "styled-components" import { pxToRem, colors, media } from "./helpers" import "sanitize.css" import "sanitize.css/forms.css" import "sanitize.css/typography.css" import "@fontsource/raleway/latin-500.css" import "@fontsource/raleway/700.css" import "@fontsource/raleway/latin-600.css"...
/* * Copyright © 2016 <NAME>, Inc. * * 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 i...
import React from 'react'; import "./marching-square.css"; import Field from "./Field/field"; import { Button, Slider } from '@material-ui/core'; import { withStyles } from '@material-ui/core/styles'; import Tooltip from '@material-ui/core/Tooltip'; import PropTypes from 'prop-types'; /** Code for the custom slider ...
import React, { useEffect, useState } from "react"; import CoinBank from "./components/CoinBank"; import Garden from "./components/Garden"; import SendBack from "./components/SendBank/index"; import StartGame from "./components/StartGame"; import ToolsItem from "./components/ToolsItem"; import { PATH_BACKGROUND_IMAGE...
import React, { useState, useEffect } from "react"; import * as yup from "yup"; import { connect } from 'react-redux'; // eloy: added this to hook up state and actions import { login } from '../actions'; // eloy: added this to hook up state and actions import axios from 'axios'; // imported axios import styled from 'st...
import { Checkbox, Modal, message } from 'antd'; import { Link } from 'react-router-dom'; import React, { useState } from 'react'; import { injectIntl } from 'react-intl'; import PropTypes from 'prop-types'; import { includes } from 'lodash'; import { rewardPostContainerData } from '../../../rewards/rewardsHelper'; imp...
const db = require('../database'); const { DateTime } = require("luxon"); const getProdQuestions = async (id) => { let response = { product_id: id, results: [] } let questions = await db.query(`SELECT * FROM questions WHERE product_id = ${id}`) for (let i = 0; i < questions.length; i++) { let questionInfo = {...
var learning_enabled = true; var host = window.location.host; max_level = ["Easy"]; bienvenues_text = ["Bienvenue", "Welcome", "<NAME>", "Bienvenido", "Danke", "Grazie", "Obrigado", "Cпасибо"]; var score = { "Easy": 0, "Medium": 0, "Hard": 0 }; // Actual assessement quizz const assessment_quiz_dict = [["bonjour"...
/** * Module dependencies. */ var uid2 = require('uid2'); var redis = require('redis').createClient; var msgpack = require('msgpack-js'); var Adapter = require('socket.io-adapter'); var debug = require('debug')('socket.io-redis'); /** * Module exports. */ module.exports = adapter; /** * Returns a redis Adapte...
import React, { Component, Fragment } from "react"; import { connect } from "dva"; import PageHeaderWrapper from "@/components/pageHeaderWrapper"; import { Switch, Form, Input, Button, message, Spin, Card, Table } from "antd"; const FormItem = Form.Item; @Form.create() @connect(({ setting, loading }) => ({ settin...
import React from 'react' import PropTypes from 'prop-types' import './styles.scss' import { Swipeable } from 'react-swipeable' var cx = require('classnames') const EMPTY_FUNC = () => {} const DIRECTION = { RTL: 0, LTR: 1 } export default class Slider3D extends React.PureComponent { static propTypes = { ...
"use strict"; 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]; ...
import { useEffect, useState } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faSearch, faFont, faUser, faSmile, } from "@fortawesome/free-solid-svg-icons"; import Emojizer from "../components/Emojizer"; let subscriptionKey = process.env.REACT_APP_COGNITIVE_API...
import React, { Fragment } from 'react'; import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd'; import PageHeader from '../common/PageHeader'; import { Button, Card, CardBody, CardHeader, Row, Col } from 'reactstrap'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; impor...
/** * Note: * node statistic.js sed_id number_of_test_case * 通过提供初始id,以及测试case来开始测式,不提供参数则使用默认参数 */ var request = require('request'); var log4js = require('log4js'); var log = log4js.getLogger('crawler'); var async = require('async'); var seds = [Number(process.argv[2]) || 2100837269]; for (var i = 3; i < pro...
var CQ = { curTime: '', // 当前时间对象 showTime: '', // 显示时间对象 curYear: '', // 年 curMonth: '', // 月 curDate: '', // 日 curDay: '', // 周几 offsetMonth: 0, // 月的偏移量 isLeapYear: false, // 闰年 calendar: '', init: function(obj){ CQ.initDate(); CQ.calendar = $(obj); CQ.fillDays(); CQ.calendar.find('.ca-head ....
import React, { useState, useEffect } from "react"; import { ethers } from "ethers"; import { Box, Icon, useDisclosure, useToast, Modal, ModalOverlay, ModalContent, ModalCloseButton, ModalBody, Tabs, TabList, TabPanels, Tab, TabPanel, } from "@chakra-ui/react"; import { BsCloudUploadFill } f...
console.log('Hello!'); // objetivo: modelar coisas/conceitos reais como objetos ;) // JS 2015 / ES6: disponibiliza CLASSES // LIVRO > o que faz um livro ser um livro // Classes dependem da ABSTRAÇÃO // ABSTRAÇÃO: selecionar os detalhes importantes para o modelo! class Livro { // abstração do livro > o que é um li...
var fs = require("fs"); var express = require('express'); var bodyParser = require('body-parser'); var md5 = require("md5"); var app = express(); var log4js = require('log4js'); log4js.configure({ appenders: [ {type: 'file', filename: 'logs/app.log', maxLogSize: 10485760, backups: 10, category: 'info'} ...
import { GlForm } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import { nextTick } from 'vue'; import { ApolloMutation } from 'vue-apollo'; import EpicForm from 'ee/epic/components/epic_form.vue'; import createEpic from 'ee/epic/queries/createEpic.mutation.graphql'; import { TEST_HOST } from 'help...
import axios from "axios" import AxiosWithAuth from '../../util/AxiosWithAuth' import jwt_decode from 'jwt-decode' //#region LOGIN export const LOG_IN_START = 'LOG_IN_START' export const LOG_IN_SUCCESS = 'LOG_IN_SUCCESS' export const LOG_IN_FAILED = 'LOG_IN_FAILED' export const loginUser = (credentials) => dispatch =...
const { RecordModel } = require("./models") const mongoose = require('mongoose') const CrawlerService = require('./services/CrawlerService') const amqp = require('amqplib') const config = require('config') const Validator = require('validatorjs') // console.log(process.env) const mq_host = process.env.MQ_HOST || confi...
/* jshint esversion:8 */ import Vue from "vue"; import Vuex from "vuex"; import { language } from "./language"; Vue.use(Vuex); // 应用初始状态 const state = { count: 10, sysname: "", //language language, lang: "cn", //user user: { name: JSON.parse(sessionStorage.getItem("user")) }, token: sessionStora...
/* * Test suite for storage-mozStorage.js * * Tests notifications dispatched when modifying stored logins. * */ const STORAGE_TYPE = "mozStorage"; Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); var expectedNotification; var expectedData; var TestObserver = { QueryInterface : XPCOMUtils.ge...
var request = require('request'); var cheerio = require('cheerio'); var fs = require('fs'); var Q = require('q'); var moment = require('moment'); module.exports = function(connection){ return { sides: ['Left'], cameras: ['A', 'B'], side: null, camera: null, ...
// init map const map = L.map('map').setView([52.178774, 10.559594], 8); let heat = undefined let lastBiggestMapBounds = map.getBounds() let isShowHeadMap = false L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMa...
import { AbstractHDElectrumWallet } from './abstract-hd-electrum-wallet'; const bitcoin = require('bitcoinjs-lib'); const HDNode = require('bip32'); const BlueElectrum = require('../../blue_modules/BlueElectrum'); import { ravencoin, ravencoinTestnet } from '../networks'; /** * HD Wallet (BIP39). * In particular, BI...
var debugB2p = false; var debugConnector = false; /** * Namespace * @author <NAME> * http://en.wikipedia.org/wiki/JSDoc */ var Beer2Peer = { /** * Réinitialise internal randomiser with random.org */ fetchTrueRandomSeed : function(){ new XMLHttpRequest(); $.get('https://www.random.org/integers/?nu...
const OidcToken = require("./oidc-client"); const NodeCache = require("node-cache"); const Jwt = require("jws"); const secureStore = require("oidc-plus4u-vault/lib/securestore"); const fetch = require("node-fetch"); let isAlreadyRunning = false; const MY_TOKEN = "<PASSWORD>"; let oidcTokenCache= new NodeCache({ stdT...
'use strict'; const fs = require('fs-extra'); const path = require('path'); const mustache = require('mustache'); const JpWrap = require('jp-wrap'); const wrap = new JpWrap(40, { trim: false, fullWidthSpace:false, sameWidth:true }); const reportTemplatePath = '../templates/report/'; const filename = 'report...
import { shiftNote, getNoteFreq, getDetuneSpread, changeFreqBySemitones } from '../utils/maths'; import { intToWaveform, waveformToInt, whole } from '../utils/helpers'; import { Observable } from '../observable'; const knobToStereo = (v = 0) => v / 5000; const stereoToKnob = (v = 0) => v * 5000; export default class ...
const baseUrl = window.location.origin + "/onlinevote/"; console.log(new Date()) $(document).ready(function () { $('#numberOfCandidate').on('input', function () { let value = $('#numberOfCandidate').val() let render = '' if (value == 1 || value > 25) { return false } for (le...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import autoBind from 'react-autobind'; import { SCORM, debug } from 'pipwerks-scorm-api-wrapper'; function isNumOrString(item) { if (typeof item === 'number') return true; if (typeof item === 'string' && item.length > 0) return true; r...
const _ = require('lodash'); const uuidv4 = require('uuid').v4; const objectScan = require('object-scan'); // https://github.com/blackflux/object-scan class VnNode { #childs; #data; #eidx; constructor(name, parent=null, data={}, treedict=null) { this.parent = parent; this.#childs = [...
import React, { Component } from 'react' import { Segment, Header, Button, Message, Menu } from 'semantic-ui-react' import { connect } from 'react-redux' import { getUser } from '../actions/userActions.js' import { getItem } from '../actions/itemActions.js' import Search from '../components/Search.js' import Loading f...
import React, { Component } from 'react' import { BigNumber } from 'bignumber.js' import { ListView, View, Text, StyleSheet } from 'react-native' import NextTouchableOpacity from '../../../components/NextTouchableOpacity' import { common } from '../../../constants/common' import transfer from '../../../localization/uti...
// import SHA256 from 'crypto-js/sha256'; import Module from '@lskjs/module'; import { spawn } from 'child_process'; import { ClickHouse } from 'clickhouse-post'; import SHA256 from 'crypto-js/sha256'; import CsvReadableStream from 'csv-reader'; import fs from 'fs'; import path from 'path'; import config from './confi...
(function($) { $.fn.serializeJson = function() { var serializeObj = {}; var array = this.serializeArray(); var str = this.serialize(); $(array).each( function() { if (serializeObj[this.name]) { if ($.isArray(serializeObj[this.name])) { serializeObj[this.name].push(this.value); } el...
import React, { useEffect, useState } from 'react'; // React // Styling and components import styles from '../assets/styles' import trackedItemsLogo from '../assets/img/trackItems.jpg'; import AddNewItemButton from '../components/AddNewItemButton' import ModalTextInput from '../components/ModalTextInput' import Loadin...
import { BaseNumbering } from './BaseNumbering'; import { NodeSVG } from 'Draw/svg/NodeSVG'; import { SVGTextWrapper as TextWrapper } from 'Draw/svg/text'; import { SVGLineWrapper as LineWrapper } from 'Draw/svg/line'; import { Base } from 'Draw/bases/Base'; import { addNumbering } from './add'; import { normalizeAngle...
'use strict' var mongoose = require('mongoose') var express = require('express') var build = require('../index.js')({console: true}) build.config({ response: { method: 'get', data: {}, user: {}, count: 0, hostname: '', type: '', // actions: { // prev: false, // next: false ...
import React from 'react'; import './XYPlot.css'; import {AddRemoveSignals} from '../utilities/AddRemoveSignals.js'; import Plotly from 'plotly.js-basic-dist'; import createPlotlyComponent from 'react-plotly.js/factory'; import {Resizable} from 're-resizable'; const Plot = createPlotlyComponent(Plotly); function zeroO...
'use strict'; /** * This script is used to check and compare DynamoDB balances with chain. * * Usage: node executables/check_balances.js clientIdsStr * * Command Line Parameters Description: * clientIdsStr: It takes clientIds as input * * @module executables/ddb_related_data_migrations/check_balances */ cons...
/* * Velocity - your running companion: Website im Rahmen der Vorlesung "Webprogrammierung" * * © 2018 <NAME>, <NAME>, <NAME> * Lizenz: Creative Commons Namensnennung 4.0 International * * Sie dürfen: * * Teilen — das Material in jedwedem Format oder Medium vervielfältigen * und weiterverbreiten * * ...
/** * @fileOverview A profiler for measuring execution time of JavaScript functions. Note that * you need to run with optimization level -1 for profiling to work. Running * the profiler on optimized code will produce no data. */ const strings = require('ringo/utils/strings'); const log = require('ringo/logging').g...
import * as THREE from "three"; import OrbitControls from "three-orbitcontrols"; import CameraControls from "camera-controls" import { GUI } from "dat.gui"; import * as SCENES from "./scenes/index.js"; //CameraControls.install( { THREE: THREE } ); // Build a world export const build = (width, height, pixelRatio, ) =>...
var xz = require('xz'); var fs = require('fs'); var Processor = function(){ this.launches = {}; //records the launched times for each product this.firstLaunch={}; //records the number of first launches for each product this.eventList={}; //records every event_id as property and the number of occurence as val...
'use strict'; //all required const express = require('express'); const cors = require('cors'); require('dotenv').config(); const superagent = require('superagent'); const pg = require('pg'); const app = express(); app.use(cors()); const PORT = process.env.PORT || 3001; //reading port 3000 from .env const client = n...
import { adjustOpacity, createRasterLayerGetterSetter } from "../utils/utils-vega" import { parser } from "../utils/utils" const MIN_AREA_IN_METERS = 30 const EARTH_DIAMETER = 40075000 function getPixelSize(neLat, width, zoom) { return Math.max( MIN_AREA_IN_METERS / (EARTH_DIAMETER * Math.cos(...
var mysql = require('mysql'); var inquirer = require('inquirer'); require("console.table"); var connection = mysql.createConnection({ host: "localhost", port: 3306, user: "root", password: "<PASSWORD>", database: "employee_trackerDB" }); connection.connect(function (err) { if (err) throw err; console.l...
import React from 'react' import ReactDOM from 'react-dom' import Slide from '../Slide' import { sliderStyle} from '../styles' const SLIDE_MARGIN = 30; const MAX_SLIDE_SPEED = 3; class Slider extends React.PureComponent { constructor(props) { super(props); this._setInitialState(); } ...
import { promises as fs } from 'fs' import { create } from 'xmlbuilder2' import { parseXml } from '../utils/parser' import moment from 'moment-timezone' /** * TODO * Handle heartRatePoints in createTcx and readTcx */ /** * Create a .tcx at the given path, file from data * * @param {string} path - Absolute ...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = require('babel-runtime/helpers/extends'); var _extends3 = _interopRequireDefault(_extends2); var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of'); var _getPrototypeOf2 = _interopRequireDefault(_...
"use strict"; var ASN1_ID_INTEGER = 0x02; var ASN1_ID_BITSTRING = 0x03; var ASN1_ID_OCTETSTRING = 0x04; var ASN1_ID_NULL = 0x05; var ASN1_ID_OBJECTID = 0x06; var ASN1_ID_SEQUENCE = 0x30; var ASN1_DEF_DEFINITE = 0x80; var ASN1_DEF_INDEFINITE = 0x00; function nsizeof(num) { if(typeof(num) !== "number") { return NaN...
console.log('SetTimeout function start ...') setTimeout( () => { console.log('After all the main function complete then event loop pushes the function to call stack ...') }, 0) console.log('SetTimeout function ends........') //window properties console.log(window.innerHeight) //var variable and properties are...
'use strict'; var _path = require('path'); var _path2 = _interopRequireDefault(_path); var _assert = require('assert'); var _assert2 = _interopRequireDefault(_assert); var _resolve = require('resolve'); var _resolve2 = _interopRequireDefault(_resolve); var _fs = require('fs'); var _fs2 = _interopRequireDefault(...
import React from "react"; import { Tag, Input, Tooltip, Avatar, Card, PageHeader, Button } from "antd"; import { PlusOutlined } from "@ant-design/icons"; // const data1 = [ // { // title: "用户名", // }, // ]; // antd 标签组件 看不懂!!!! class EditableTagGroup extends React.Component { state = { tags: ["Tag 1", ...
/** * @author <NAME> <https://github.com/mysticatea> * @copyright 2017 <NAME>. All rights reserved. * See LICENSE file in root directory for full license. */ "use strict" //------------------------------------------------------------------------------ // Requirements //---------------------------------------------...
import { reset } from "./index.js"; import { paintEdge, paintNode, instantPaintNode, displayedNodeData, edgesToWeights, instantPaintEdge, paintMinDistCol, instantPaintMinDistCol, updateTableContents, topSortOrderAppend } from "./graph.js"; export const doDFS = async function() { let r = await dfs...