text stringlengths 3.07k 16k |
|---|
"use strict"
let pagamentoSatispay=false;
$(document).ready(function(){
let visualizzaCarrello = sendRequestNoCallback("/api/visualizzaCarrello","GET");
visualizzaCarrello.done(function(data){
console.log(data.data);
// alert("figa");
visualizza(data.data);
});
let myModal = $("#m... |
import React from "react";
// reactstrap components
import {
UncontrolledTooltip,
Button,
} from "reactstrap";
import { SERVER_URL, imgx } from "actions/common";
class Course extends React.Component {
constructor(props){
super(props);
this.state ={
id:null,
}
}
render() {
let {... |
// Holds the actually used web3 object
var web3;
// Logged in address
var myaddress;
// Selected Ethereum network
var networkid;
// If true, the an etehreum provider is available
var connected;
// If true, user is logged in at the ethereum provider
var loggedin;
// Establish connection to ethereum
function initEt... |
const tf = require('@tensorflow/tfjs')
require('@tensorflow/tfjs-node');
const nlp = require('lorca-nlp')
const shuffle = require('shuffle-array')
const fs = require('fs')
Array.prototype.extend = function (other_array) {
/* You should include a test to check whether other_array really is an array */
other_ar... |
import * as THREE from 'three';
import { extend } from '../../../utils/index';
import { RenderingPlugin } from '../RenderingPlugin';
import { EffectComposer } from './EffectComposer.js';
import { RenderPass } from './pass/RenderPass.js';
class PostProcessor extends RenderingPlugin {
static defaults = {
autoresi... |
'use strict';
var urlParser = require('url').parse,
lwm2mId = require('lwm2m-id'),
lwm2mCodec = require('lwm2m-codec'),
_ = require('busyman');
var cutils = {};
cutils.getTime = function () {
return Math.round(new Date().getTime()/1000);
};
/*********************************************************
... |
import Phaser from 'phaser';
import ScrollBg from '../Entities/ScrollBg';
import { getLocalScores, getName } from '../localStorage';
import { setApiScore } from '../api';
class GameOver extends Phaser.Scene {
constructor() {
super({ key: 'GameOver' });
}
preload() {
this.load.audio('intro', 'assets/intr... |
'use strict';
var Alexa = require('alexa-sdk');
var APP_ID = "amzn1.ask.skill.bd898084-7a07-4fde-ba4b-74b6cdad08b4";
var SKILL_NAME = 'Prime Numbers';
exports.handler = function (event, context, callback) {
var alexa = Alexa.handler(event, context);
alexa.APP_ID = APP_ID;
alexa.registerHandlers(handlers);... |
import { lcgrand } from "./generator";
let tableItem;
const tableItem_null = {
system_clients: [],
system_event_type: null,
server_status: null,
num_in_queue: null,
time_arrival: [],
time_last_event: null,
sim_time: null,
event_list: [null, null, null],
num_delay: null,
total_of_delays: null,
are... |
/*jshint esversion: 6, laxcomma: true, asi: true*/
const fs = require('fs')
const Store = require('electron-store')
const getFeed = require('./rss-to-json');
const getRSS = (feed) => new Promise((res, rej) =>
getFeed.load(feed, (e, rss) => e ? rej(e) : res(rss)));
module.exports = {
getRSS: (feed) => new Promise(... |
/**
* Created by antonio on 14/06/17.
*/
function StringSet() {
var setObj = {}, val = {};
this.add = function(str) {
setObj[str] = val;
};
this.contains = function(str) {
return setObj[str] === val;
};
this.remove = function(str) {
delete setObj[str];
};
t... |
import React, { useState } from "react";
import clsx from "clsx";
import PropTypes from "prop-types";
import moment from "moment";
import PerfectScrollbar from "react-perfect-scrollbar";
import axios from "axios";
import { url } from "../../Constants";
import {
Icon,
Box,
Button,
Card,
Table,
TableBody,
T... |
import React, { useState, useEffect, forwardRef } from 'react';
import PropTypes from 'prop-types';
import OutsideClickHandler from 'react-outside-click-handler';
import cnames from 'classnames';
import { usePopper } from 'react-popper';
import posed from 'react-pose';
import Card from '../Card';
import Box from '../Bo... |
import React, { useEffect,useState } from 'react';
import { useHistory } from 'react-router-dom';
import {db} from "../../firebase.js";
import "../../index.css";
import { Table } from 'reactstrap';
import MaterialTable from 'material-table';
import TextField from '@material-ui/core/TextField';
import Projectpage from "... |
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
/**
* Square Component
* @param {object} props
* @param {boolean} props.highlight
* @param {string} props.value
* @param {function} props.onClick
*/
function Square(props) {
return (
<button
className={props.highlight ... |
const uuidv4 = require("uuid/v4");
const DATETIMESTAMP = Date.now();
const { getText } = require("../language/");
const sumUpTotals = (transactions, fieldName) =>
Object.values(transactions || {}).reduce((a, b) => {
transactions =
(b && b[fieldName] && parseFloat(b[fieldName].replace(/,/g, ""))) || 0;
... |
const _ = require('highland')
const { denodeify } = require('./util')
const chalk = require('chalk')
const { docopt } = require('docopt')
const read = denodeify(require('read'))
const readFile = denodeify(require('fs').readFile)
const writeFile = denodeify(require('fs').writeFile)
const yaml = require('js-yaml')
const... |
import React from 'react';
import Button from '@material/react-button';
import HomeState from '../lib/home-state';
import MaterialIcon from '@material/react-material-icon';
import PropTypes from 'prop-types';
import strToColor from '../lib/strToColor';
import Radio from './Radio.react';
import SmartAppClient from '../l... |
'use strict'
var util = require('util')
var Tesseract = require('tesseract.js')
var fs = require('fs')
var path = require('path')
var handlebars = require('Handlebars')
var handlebarsIntl = require('handlebars-intl')
handlebarsIntl.registerWith(handlebars)
var wordsOfInterest = ['NAME', 'SEX', 'CITY', 'EMPLOYMENT']
... |
"use strict";
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.verifyToken = exports.tokenProvided = exports.acronymExists = exports.validateAcronym = void 0;
var _regenerator = _interopRequireDefault(requir... |
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
const game = {
namespaced: true,
state: {
curTurn: null,
message: null
},
getters: {
getCurTurn: state => state.curTurn,
getMessage: state => state.message
},
mutations: {
... |
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
ActivityIndicator,
Dimensions,
RefreshControl,
ScrollView,
TouchableHighlight,
ListView,
RecyclerViewBackedScrollView,
TouchableOpacity,
Image
} from 'react-native';
import LoadingView from './LoadingView'
import {Map, S... |
const cookie = require('cookie');
const createDebug = require('debug');
const jwt = require('jsonwebtoken');
const randomString = require('random-string');
const got = require('got');
const ms = require('ms');
const {
HTTPError,
NotFoundError,
PermissionError,
TokenError,
} = require('../errors');
const sendEma... |
const Interaction = require('../../Structures/Interaction.js')
const { MessageActionRow, MessageButton, MessageEmbed, MessageAttachment } = require('discord.js')
const { drawHeart, applyText } = require('../../Util/canvasUtil.js');
const { createCanvas, loadImage, registerFont } = require('canvas')
module.exports = cl... |
import React from 'react'
import _ from 'lodash'
import PropTypes from 'prop-types'
import arrayMove from 'array-move'
import { AutoSizer } from 'react-virtualized'
import { sortableContainer, sortableElement } from 'react-sortable-hoc'
import { defaultTableRowRenderer, Table, Column } from 'react-virtualized'
impo... |
require('url-search-params-polyfill');
const http = require('http');
const _ = require('underscore');
const fetch = require('node-fetch');
const Base64 = require('js-base64').Base64;
const argv = require('argv');
const args = argv.option({
name: 'apihost',
short: 'h',
type: 'string',
description: 'Defi... |
// Special thanks to The Mushroom Kingdon page for these sound files!
// See: http://www.themushroomkingdom.net
var coin_sound = new Audio("assets/audio/smw_coin.wav");
var defeat_sound = new Audio("assets/audio/smb_defeat.wav");
var victory_sound = new Audio("assets/audio/smb_victory.wav");
// Special thanks to HelpT... |
var child_process = require('child_process');
var util = require('util');
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
components: {
src: [
'node_modules/long/dist/long.js',
'node_modules/bytebuffe... |
/**
* JTSage-DateBox
* @fileOverview Build the datebox files
*
* DO NOT RUN THIS FILE DIRECTLY! CALL FROM NPM!
*
* # npm run [ build-latest | build-release ]
*
* @author J.T.Sage <<EMAIL>>
* @author {@link https://github.com/jtsage/jtsage-datebox/contributors|GitHub Contributors}
* @license {@link https:/... |
/* globals dat, AMI*/
var newRenderer = setRenderer();
var container = newRenderer.container;
var renderer = newRenderer.renderer;
var scene = new THREE.Scene();
var camera = setCamera();
var controls = setControls();
function onWindowResize() {
const numberOfDirectionsToRecalculateZoom = 2;
camera.canvas ... |
var npms = {
'express-ws':'express-ws',
'body-parser':'body-parser',
};
var options = {
moduleCode : moduleCode,
browserFiles : ["qrcode-val-browser.js","node_modules/subtle-crypto-window/dist/subtle-crypto-window.js"],
nodeCode : nodeJS,
browserCode : browser,
npmPackages : npms... |
/**
* 1. Long comment start
* 2. Long comment body
* 3. Comment end
* 4. Class line
* 5. Constructor
* 6. Method
* 7. Variable
* 8. Method call
* 9. Function end
*/
// 1. 2. 3. 4. 5. 6. 7. 8. ... |
// $(function () {
// $("#btnADD").click(function () {
// //接收用户输入的列数据
// // var id=prompt("ID:");
// // var name=prompt("名字:");
// // var jianjie=prompt("简介:");
// // var banji=prompt("班级:");
// // var teacher=prompt("老师:");
// var id = document.getElementBy... |
//just a hack, multi line title wasn't working
smart_email_textarea = document.querySelector("#txtarea_body_smart");
smart_email_textarea.title = smart_email_textarea.title.replace(/\\n/g, '\n');
//prevent form submission
document.querySelector("#simple-form").addEventListener("submit", function(){return false;});
doc... |
var browserify = require('browserify'),
watchify = require('watchify'),
jadeify = require('jadeify'),
notifier = require('node-notifier'),
prettyTime = require('pretty-hrtime'),
source = require('vinyl-source-stream'),
buffer = require('vinyl-buffer'),
gulp = require('gulp'),
webserver = require('gulp-w... |
/*
* @Author: ShiJunJie
* @Date: 2021-02-01 16:26:05
* @LastEditors: ShiJunJie
* @LastEditTime: 2022-03-02 08:55:55
* @Descripttion: 用户相关 APi 接口
*/
import https from '../utils/https'
import storage from 'good-storage'
// import router from '/@/plugins/router/index'
import { message } from 'ant-design-vue'
con... |
var result = null;
//文字追加ボタン
$(".button-add").on('click', function(){
textAdd(String($(this).data('value')));
});
//ACボタン
$(".button-cut").on('click', function(){
textDelete();
});
//平方根を求めるボタン
$(".button-sqrt").on('click', function(){
calcsqrt();
$(".result").val(result);
});
//10進数に変換ボタン... |
const Discord = require('discord.js');
const { Collection, Client, MessageEmbed, Intents } = require('discord.js');
require('dotenv').config();
const { MessageAttachment } = require('discord.js');
const date = new Date();
const fs = require('fs');
const ms = require('ms');
const moment = require('moment');
const db = r... |
import React, { Component } from "react";
import "./App.css";
import Election from "./build/Election.json";
import getWeb3 from "./getWeb3";
const initState = {
value: '',
storageValue: null,
web3: null,
accounts: null,
contract: null,
options: null,
result: null,
remainingTime: null
}
class A... |
window.onload = function() {
ajax = new objetoAjax();
catalogoContents = document.getElementById('catalogo--contents');
renderNextLevelHierarchy();
$(document).ready(function() {
checkAcceptCookies();
});
getDataPromo();
hero();
// mesAlert();
}
var catalogBlocked = false;
var j... |
$(document).on("ready", function(){
showMessageTradeBan();
//moved sidebar
function movedSidebar() {
var scroll_position = $(document).scrollTop();
var header_height = $('.navbar').outerHeight();
var $sidebar = $('.sidebar-right');
if (scroll_position >= 0 && scroll_position... |
const HOVER_COLOR = '#16c1f3',
element = '#map__container',
center = [-6.398681, 53.410675],
dData = dublincoco.features[0].properties,
percentage = d3.format('.2%'),
thousands = d3.format(',.3s'),
popFormat = d3.format(',.5r'),
maplocale = d3.formatLocale({
'thousands': ',',
'currency': ['€', '']... |
var board = [];
var score = 0;
var hasConflicted = [];
var n = getQueryString('k');
var d = getQueryString('d');
var randx = 0;
var randy = 0;
var pieces = [];
var len;
var index = 0;
var delay = 1000;
if(d!=null){
delay = d;
}
$(document).ready(function () {
prepareForMobile();
//初始化棋盘格
init();
... |
import {
Alert,
AlertIcon,
Box,
Select as ChakraSelect,
Stack
} from '@chakra-ui/core'
import {faDownload} from '@fortawesome/free-solid-svg-icons'
import get from 'lodash/get'
import React from 'react'
import {useDispatch, useSelector} from 'react-redux'
import {setSearchParameter} from 'lib/actions'
import... |
import base58 from 'bs58';
import {sha256} from 'js-sha256';
import axios from 'axios';
export function XchainAddrToEvm(addr) {
var result = ''
try {
// 判断是否是合约账号;判断合约账户地址仅支持 XC11111111111@xuper, xuper后缀,go-sdk有相同问题。
if (determineContractAccount(addr)){
result = contractAccountToEVM... |
// Load dependencies
import { ZERO_ADDRESS } from '@openzeppelin/test-helpers/src/constants';
import { advanceBlockTo, latestBlock } from '@openzeppelin/test-helpers/src/time';
import chai from 'chai'
import chaiAsPromised from 'chai-as-promised'
chai.use(chaiAsPromised)
const { expect } = chai
// Import utilities fro... |
/******************************************************************************
Crossday Discuz! Board - Common Modules for Discuz!
Copyright 2001-2005 Comsenz Technology Ltd (http://www.comsenz.com)
*******************************************************************************/
var sPop = null;
var postSub... |
import {
ANSI,
UNICODE,
msAsEllapsedTime,
msAsDuration,
byteAsMemoryUsage,
} from "@jsenv/log"
import { EXECUTION_COLORS } from "./execution_colors.js"
export const createExecutionLog = (
{
executionIndex,
fileRelativeUrl,
runtimeName,
runtimeVersion,
executionParams,
executionResu... |
importScripts('tinyxmlsax.js');
importScripts('tinyxmlw3cdom.js');
self.onmessage = function(e) {
var data = e.data;
var result = '';
try {
var parser = new XMLViewer(data);
result = parser.getHTML();
} catch (e) {
throw new Error(e.message);
}
parser = null;
self.postMessage(result);
};
fun... |
// Data I need to persist in a way that is accessible from document scope...
var clickDrag = new Array();
var clickX = new Array();
var clickY = new Array();
var context = document.getElementById('mycanvas').getContext("2d");
var input = [];
var label = [1,0,0];
var model = tf.sequential();
var myCurrentArgMax = 0;
var... |
var mysql = require("mysql");
var inquirer = require("inquirer");
var connection = mysql.createConnection({
host: "localhost",
// Port MySQL is using
port: 3306,
// MySQL credentials
user: "root",
// MySQL password
password: "<PASSWORD>!#",
database: "employee_DB"
});
connection.co... |
'use strict';
const TAG_ISO_14443_3 = 'TAG_ISO_14443_3';
const TAG_ISO_14443_4 = 'TAG_ISO_14443_4';
const promisify = require('nyks/function/promisify');
const Event = require('eventemitter-co');
const log = require('debug')('nfc');
const SCARD_STATE_PRESENT = 'SCARD_STATE_PRESENT';
const... |
const axios = require('axios');
const middy = require('@middy/core');
const createError = require('http-errors');
const httpSecurityHeaders = require('@middy/http-security-headers');
const httpErrorHandler = require('@middy/http-error-handler');
/**Make API call to get the handle from the username
* Sample handle: 9f... |
import React, {Component} from 'react';
import {
Text,
View,
StyleSheet,
ActivityIndicator,
Image,
KeyboardAvoidingView,
TouchableOpacity,
ScrollView
} from 'react-native';
import {NavigationActions} from 'react-navigation';
import customstyles from '../../../assets/styles/customstyles';... |
// Javascript function library for style.php
// These javascript functions all update color and font previews as
// the settings change (called by onchange event). Colors are
// converted from HSL color space to hex RGB using a javascript function
// Updates all displays
function updateall() {
updategradient();
up... |
const User = require('../models/User');
const Post = require('../models/Post');
const passport = require('passport');
const mongoose = require("mongoose");
const multer = require("multer");
const cloudinary = require('../helpers/helper');
const notificationSchema = require('../models/Notification');
const pushnotificat... |
//GLOBAL CONTAINER TO PRINT RESULT
let resultContainer = document.getElementById('resultContainer');
document.getElementById('inputProductOffer').disabled = true;
//Square
function setSquareSide(side){
let squareSide = side;
return squareSide;
}
let getSquarePerimeter = (side) => {
let squarePerimeter = ... |
import {isNullString,isEmptyArray,isNullOrUndef,isFunction, hasName} from '../utils/assertion'
import {splitToArray} from '../utils/common'
import {addMethods} from './validateConfig'
// 类:校验字段
class VaForm {
constructor(el,vn,rule,name){
this.dom = el
this.vnode = vn
this.rules = rule
... |
import dotenv from 'dotenv';
import mongoose from 'mongoose';
import cors from 'cors';
import express from 'express';
import morgan from 'morgan';
import Person from './models/person.js';
dotenv.config({ path: '.env' });
const uri = process.env.MONGODB_URI;
const app = express();
app.use(cors());
app.use(express.stat... |
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useState, useEffect, useRef, useCallback } from 'react';
import Tile from '../Tile';
import Player from '../Player';
import Inventory from '../Inventory';
import { Directions } from '../../utils/directions';
import { createBuilding } from '../../utils/cre... |
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
window.initMap = function() {
var enableStreetView = window.Laravel.map.enableStreetVi... |
var THREE = require('three');
// require('./utils/threeSafety');
window.THREE = THREE;
var ManagedView = require('threejs-managed-view');
var LifeSimulation = require('./');
var makeCubeletTexture = require('./makeCubeletTexture');
var urlparam = require('urlparam');
var view = new ManagedView.View({
skipFrames: 10
})... |
// Generate the Top N chart
function generateTopN(type, dataCsv) {
// Elements ID
var chartId = 'chart-pattern-finder-top-' + type.toLowerCase();
var chartIdStatus = chartId + '-status';
// Hide status element
$('#' + chartIdStatus).hide();
// Show chart element
$('#' + chartId).show();
... |
/* EdgeVPNio
* Copyright 2021, University of Florida
*
* 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, modif... |
/* eslint-disable max-lines */
import * as bitcoin from 'bitcoinjs-lib';
import generateAddress from '../../crypto/bitcoin/generateAddress';
import { add as addExternalAddress } from '../bitcoin/wallet/addresses/external';
import {
UNIT_BTC,
UNIT_SATOSHIS,
convert as convertAmount,
getBitcoinNetwork
} from '..... |
import ReactDOM from 'react-dom';
import React, { useEffect } from 'react';
import useSignUpForm from './../../hooks/useCheckRegister';
import Loading from './../../custom_modules/loading_white_full.svg'
/* *************************************************************
|
|
| Register Modal file
|
|... |
const assert = require('assert').strict;
const fs = require('fs');
const lineReader = require('line-reader');
const parser = require('@babel/parser');
const traverse = require('@babel/traverse').default;
// var acornLoose = require("acorn-loose");
const transform_jsonl = require('./transform_jsonl');
var inFilepath... |
const TWO_STARS = 20;
const ONE_STAR = 29;
const WINNER = 160;
const CARD_UP = 10;
const PAIR_MATCHED = 20;
const FIRST_CARD_UP = 0;
const SECOND_CARD_UP = 1;
// Shuffle function from http://stackoverflow.com/a/2450976
function shuffle(array) {
let currentIndex = array.length,
temporaryValue, randomIndex;
... |
/*
* @license
* cocotte-datasource v0.5.1
* Copyright(c) 2014 <NAME> <<EMAIL>>
* MIT Licensed
*/
module.exports = Datasource;
/*global window*/
// クライアント用
if (typeof window === 'object') {
if (!window.Cocotte){
window.Cocotte = {};
}
window.Cocotte.Datasource = Datasource;
}
/**
* dependencies
*/
v... |
import React, { Fragment, useState, useEffect, useContext } from 'react'
import client from '../../vendors/feather'
import { PostCrContext } from '../../store/contexts/posts/postCrContext'
import {
InputLabel,
Select,
CircularProgress,
MenuItem,
Grid,
} from '@material-ui/core'
import { Ap... |
console.log('TexasQuiz');
// global
var startButtonHtml = document.querySelector("#startButton");
var quizContainerHtml = document.querySelector("#quizContainer");
var questionHtml = document.querySelector("#question");
var answersHtml = document.querySelector("#answers");
var oneHtml = document.querySelector("... |
//declare constiables for button click/submit event
let thisSearch = '';
const liEl = $("<li>");
const currentTime = moment().hour();
const now = moment().format('dddd, MM/DD/YY');
const storedCities = JSON.parse(localStorage.getItem("saved-cities")) || [];
let currentCity;
//do not show the clear button on page loa... |
/*
Henriksens-Algorithm: A software to visualize Henriksens Algorithm.
Copyright (C) 2016 <NAME>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) ... |
var coverage_addline = function(fuzzer, id, time) {}
var filter_coverage = function (tmin, tmax) {}
d3.csv("http://0.0.0.0:8888/data/coverage.csv", function(data) {
// set the dimensions and margins of the graph
/*var margin = {top: 10, right: 30, bottom: 30, left: 60},
width = 460 - margin.left - margin.r... |
/** ****************************************************************************************************
* File: PioneerPage.js
* Project: pioneer
* @author <NAME> <<EMAIL>> on 13-Jun-2019
*******************************************************************************************************/
'use strict';
const
... |
//** @jsx jsx */
import React, { useState, useRef } from "react"
import { Text, Box, Flex, jsx } from "theme-ui"
import SmoothCollapse from "react-smooth-collapse"
import minusIcon from "@public/minus-icon.svg"
import { useSite } from "@layouts/SiteContext"
import Button from "@modules/ui/Button"
import { groupBy } fr... |
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"]... |
// v1.1.2
var https = require('https');
var zlib = require('zlib');
var crypto = require('crypto');
const ENV = process.env;
var endpoint = ENV.es_endpoint;
// Set this to true if you want to debug why data isn't making it to
// your Elasticsearch cluster. This will enable logging of failed items
// to CloudWatch L... |
// @ts-nocheck
var text =
"<!DOCTYPE html>" +
document.getElementsByTagName("html")[0].innerHTML +
"</html>";
text = text
.replace(/\s*(\n\s*)+/gi, "")
.replace(/\s+(?= )/g, "")
.split("");
// 计算出单个字符的宽高
var span = document.createElement("span");
span.innerHTML = ".";
var canvas = document.getElementById("... |
//image URLs
var whiteSVG_Icon = safari.extension.baseURI + 'PiP_Toolbar_Icon_white_new.svg';
var blackSVG_Icon = safari.extension.baseURI + 'PiP_Toolbar_Icon_new.svg';
safari.self.addEventListener("message", messageHandler); // Message recieved from Swift code
window.onfocus = function() {
previousResult = null;
... |
import {
getCommonCard,
getCommonContainer,
getCommonHeader,
getLabelWithValue,
getBreak,
getLabel,
getCommonParagraph
} from "egov-ui-framework/ui-config/screens/specs/utils";
import { prepareFinalObject } from "egov-ui-framework/ui-redux/screen-configuration/actions";
import {
ge... |
import {
render as preactRender,
hydrate as preactHydrate,
options,
toChildArray,
Component
} from 'preact';
import { applyEventNormalization } from './events';
const CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|st... |
import React, {Component, PropTypes} from 'react';
import Title from 'react-title-component';
import AppBar from 'material-ui/AppBar';
import IconButton from 'material-ui/IconButton';
import spacing from 'material-ui/styles/spacing';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import {darkWhite, lightWhit... |
/* *
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
'use strict';
import H from '../../Core/Globals.js';
import U from '../../Core/Utilities.js';
var isArray = U.isArray, merge = U.merge, seriesType = U.seriesType;
var SMA = H.seriesTy... |
/* global fetch */
import React, { Component } from 'react';
import { StaticMap } from 'react-map-gl';
import DeckGL from '@deck.gl/react';
import { ScatterplotLayer, ArcLayer } from '@deck.gl/layers';
import { BrushingExtension } from '@deck.gl/extensions';
import { scaleLinear } from 'd3-scale';
// Set your mapbox t... |
const fs = require('fs')
const path = require('path')
const puppeteer = require('puppeteer')
const axios = require('axios')
const rimraf = require('rimraf')
const commentHooks = require('@ff0000-ad-tech/comment-hooks')
const debug = require('@ff0000-ad-tech/debug')
const log = debug('cs-plugin-dps-renderer:assets')
... |
const trimEnd = require('lodash/trimEnd')
const Document = require('./Document')
const FILENAME_WITH_EXTENSION_REGEX = /(.+)(\..*)$/
/**
* Class representing the file model.
* @extends Document
*/
class CozyFile extends Document {
/**
* async getFullpath - Gets a file's path
*
* @param {string} dirID ... |
import { registerBidder } from '../src/adapters/bidderFactory.js';
import * as utils from '../src/utils.js';
import { BANNER } from '../src/mediaTypes.js';
import { getStorageManager } from '../src/storageManager.js';
// #region Constants
export const BIDDER_CODE = 'adplus';
export const ADPLUS_ENDPOINT = 'https://ssp... |
/* eslint-disable object-curly-spacing */
/* eslint-disable max-len */
import React, { useEffect } from 'react';
import CustomButton from '../../components/CustomButton/CustomButton';
import SearchBar from '../../components/SearchBar/SearchBar';
import classes from './Home.module.css';
import PersonCardSummary from '..... |
// Modules to control application life and create native browser window
const {app, BrowserWindow, dialog, Tray, Menu} = require('electron')
const path = require('path')
const fs = require('fs');
const captureWebsite = require('capture-website');
const log = require("electron-log");
log.transports.console.level = 'sill... |
import { counter } from './utils.js';
/**
* A class that wraps up our 2D platforming player logic. It creates, animates and moves a sprite in
* response to WASD/arrow keys. Call its update method from the scene's update and call its destroy
* method when you're done with the player.
*/
const maxVelocityY = 800;
co... |
import html from '../../libs/html.js';
import { initial_state, reducer } from './reducer.js';
import { helpers } from '../../shared-store/index.js';
import params from '../../libs/params.js';
import Menu from '../../components/menu.js';
import Repository, { isRealm } from '../../models/repository.js';
import Repositor... |
const RNG = require('random-seed');
const ValidationError = require('../../errors/validation');
module.exports = class CircularBalancedMapService {
constructor(randomService, starService, starDistanceService, distanceService, resourceService, gameTypeService) {
this.randomService = randomService;
... |
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js';
import {Draw, Modify, Translate} from '../src/ol/interaction.js';
import {MultiPoint, Point} from '../src/ol/geom.js';
import {OSM, Vector as VectorSource} from '../sr... |
/**
*
* CustomFileUpload
*
*/
import React, { memo, useState, useRef, useEffect } from 'react';
import PropTypes from 'prop-types';
import { each } from 'lodash';
import styled from 'styled-components';
import { Spin, Alert, message, Modal, Button } from 'antd';
import { Icon } from '@ant-design/compatible';
impor... |
"use strict";
// npm--------------------------------------------Function without argument--------------------------------------------
export function isoNum() {
return 42;
}
// --------------------------------------------------- Function with arguments -------------------------------------
export function myFct(a... |
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'
import React, { useEffect, useState } from 'react'
import { withRouter } from 'react-router-dom'
import { useMedia } from 'react-use'
import { Box, Flex, Text } from 'rebass'
import styled from 'styled-components'
import { Divider } from '../../components'
i... |
import React from 'react';
import PropTypes from 'prop-types';
import { withTranslation } from 'react-i18next';
import ScrollArea from 'react-scrollbar';
/* import {
Row,
Col,
Button,
Modal,
ModalHeader,
ModalBody,
ModalFooter,
Form,
Input,
} from 'reactstrap'; */
import Row from 'reactstrap/lib/Ro... |
/**
* @license
* 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.