text
stringlengths
3.07k
16k
import React, { useEffect, useState } from 'react' import PropTypes from 'prop-types' import { Image, StyleSheet, Text } from 'react-native' import Button from 'components/Button' import { colors } from 'theme' import { Box, Column, Heading, Row, ScrollView, View } from 'native-base' import { firestore, storage } from ...
import React, { Component } from 'react'; import { Link } from 'gatsby'; import moment from 'moment'; import DialogWrapper from '../DialogWrapper'; import GetSkus from '../inputs/GetSkus'; import InputChecker from '../inputs/InputChecker'; import { statesAbb } from '../../constants/Data'; import Paths from '../../co...
/** * Copyright (c) 2017-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ const React = require('react'); const CompLibrary = require('../../core/CompLibrary.js'); const MarkdownBlock = CompLibrary.MarkdownBlo...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var IllegalArgumentError_1 = require("../Errors/IllegalArgumentError"); var InvalidJSONLDSyntaxError_1 = require("../Errors/InvalidJSONLDSyntaxError"); var URI_1 = require("../RDF/URI"); var Utils = tslib_1.__im...
import React, { useState } from "react"; import { FixedSizeList as List, areEqual } from "react-window"; import { Droppable, Draggable, DragDropContext } from "react-beautiful-dnd"; import { Song } from "../Components/CollectionView"; import Text from "../Components/WrapperComponents"; import MdRepeat from "react-ionic...
$(function () { /* -------------------------------------------Eventos------------------------------------------- */ $('#guardar-registro').on('submit', function (e) { e.preventDefault(); let datos = $(this).serializeArray(); console.log(datos); $.ajax({ type: $(this).attr('method'), ...
const c = require('../../backCore'); const logger = c.getLogger(); const { glob } = require('./main_global.js'); const fs = require('fs'); const mbo = require('./main_buildObj.js'); const me = require('./main_evdev.js'); const { SendToJnoda } = require('./main_cluster.js'); const { CMD_server_reboot, CMD_restart_sett...
'use strict'; // ============ Server Initialization ============ const server = require('../index.js'); const CAS = server.of('/CAS'); // ============ IMPORTS ============ require('dotenv').config({ path: '../.env' }); const mongoose = require('mongoose'); const { WhiteDeckModel, BlackDeckModel } = require('./schem...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } }...
const _ = require('lodash') const md = require('./template') module.exports = prBody const branchFailed = () => md` <summary>💥 This branch failed. How to proceed</summary> I suggest you find out what dependency update is causing the problem. Adapt your code so things are working nicely together again. [next-update]...
import React, {useEffect, useState} from 'react'; import SpotifyWebAPI from 'spotify-web-api-js'; import AsyncStorage from '@react-native-async-storage/async-storage'; import { Text, View, TouchableOpacity, Dimensions, ScrollView, FlatList } from 'react-native'; import firebase from "firebase"; import "@firebase/firest...
import { useState, useEffect } from 'react'; import Head from 'next/head'; import fire from '../config/fire-config'; import Layout from '../components/Layout' import CreatePost from '../components/CreatePost'; import Link from 'next/link'; import { Container, Row, Col, Navbar } from 'react-bootstrap'; import 'bootstrap...
const AWSXRay = require('aws-xray-sdk'); const XRayExpress = AWSXRay.express; const express = require('express'); const fs = require('fs'); // Capture all AWS clients we create const AWS = AWSXRay.captureAWS(require('aws-sdk')); AWS.config.update({region: process.env.DEFAULT_AWS_REGION || 'us-west-2'}); // Capture al...
/*! * Tony.JS WebAudio Library - http://github.com/pendragon-andyh/tony.js/ * Copyright 2014, <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, including without li...
'use strict'; /** * @file options test * @module logger-request * @subpackage test * @version 0.0.1 * @author hex7c0 <<EMAIL>> * @license GPLv3 */ /* * initialize module */ var logger = require('..'); var app = require('express')(); var cookie = require('cookie-parser'); var request = require('supertest'); va...
"use strict"; var _slicedToArray = require("babel-runtime/helpers/sliced-to-array")["default"]; var _regeneratorRuntime = require("babel-runtime/regenerator")["default"]; var _require$portal_detector = require("flying-squid").portal_detector; var detectFrame = _require$portal_detector.detectFrame; var generatePorta...
const cors = require('cors') const express = require('express') const cookieParser = require('cookie-parser') const SpotifyLens = require('./Lens') const { errorHandler, writeToFile } = require('./utils') const inquirer = require('inquirer') const open = require('open') const { SPOTIFY_SCOPES: scopes, PROMPT: prompt } ...
// // facebookiface.js // // interface to facebook messenger api // // author: carlos <<EMAIL>> exports.createFBInterface = createFBInterface; module.export = Facebook; const util = require('util') _fbmsg = require('./facebookmsg'); const bodyParser = require('body-parser'), crypto = require('crypto'),...
import { CitizenHomeCard, CitizenTruck, Loader } from "@egovernments/digit-ui-react-components"; import React, { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { Link, useRouteMatch } from "react-router-dom"; import FSMCard from "./components/FsmCard"; import CheckSlum from "./pageComp...
/* TODO: - security: sign updates to rows, only owner of key can update that row - if NOT host, detect when host removes heartbeat or heartbeat times out - use local timestamps in case client's clock is wrong */ module.exports = HostedRoom var Doc = require('crdt').Doc var inherits = require('util').inherits v...
/*jslint browser: true, devel: true, eqeq: true, plusplus: true, sloppy: true, vars: true, white: true*/ /*eslint-env browser*/ /*eslint 'no-console': 0*/ //array met te raden woorden var woorden = ['bathory', 'venom', 'razor', 'immortal', 'grave', 'sodom', 'satyricon', 'graveland', 'suffocation', 'kreator'...
"use strict"; function RigidShape(xf) { this.mLine = new LineRenderable(); this.mLine.setColor([1, 1, 1, 1]); this.mXform = xf; this.mAcceleration = engine.Physics.getSystemAcceleration(); this.mVelocity = vec2.fromValues(0, 0); this.mType = ""; this.mInvMass = 1; this.mInerti...
// Get the canvas and context for drawing const canvas = document.getElementById('ant'); const ctx = canvas.getContext('2d'); // Some constant values const color = { white: '#ecf0f1', green: '#2ecc71', red: '#e74c3c', blue: '#3498db', gray: '#171717' } const tile = { clear: { rotate: 90 }, red: { ...
const Sequelize = require('sequelize'); const dateTime = require('node-datetime'); const Decimal = require('../definitions/decimal'); const Log = require('../definitions/Log'); const Strategy = require('./Strategy'); const Indicator = require('../definitions/Indicator'); const Trade = require('../models/Trade'); const ...
'use strict' import React, { Component, StyleSheet, View, Image, Text, ListView, TouchableHighlight, PropTypes, Dimensions, InteractionManager } from 'react-native' import {Icon} from 'react-native-icons' import teamInfo from '../../utils/team-map' import TeamDetailPlayer from './TeamDetailPlayer'...
import Promise from 'promise'; import request from 'then-request'; import requestStream from 'http-basic'; import {pack} from 'tar-pack'; import {PassThrough} from 'barrage'; import Heroku from 'heroku-client'; function addErrorContext(err, message) { const originalMessage = (err.body && err.body.message) ? err.body...
'use strict' const Cache = use('Cache') const { HttpException } = use('@adonisjs/generic-exceptions') const UserModel = use('App/Models/User') const AnnotationModel = use('App/Models/Annotation') const StringHelper = use('App/Helpers/StringHelper') const TokenizationHelper = use('App/Helpers/TokenizationHelper') co...
import md5 from 'blueimp-md5'; import { LASTFM_API_KEY, LASTFM_SECRET } from './keys'; export const parseTitle = (text) => { text = text.replace(/(?:official )?(?:lyric )?(?:video|audio)/gi, '') .replace(/[ ([]?hq[)\] ]?/gi, '[-]') .replace(/[ ([]?hd[)\] ]?/gi, '[-]') .replace(/[AB] ?\d/, '...
var fs = require('fs'); var Handlebars = require('handlebars'); var gravatar = require('gravatar'); var _ = require('underscore'); var _s = require('underscore.string'); var moment = require('moment'); var handlebarsHelpers = require('./lib/handlebars_helpers'); // Utity Methods ( need be moved to a separate file) // ...
/** * 资料文件上传 */ import React from 'react'; import '../style/drive.upload.scss'; import $ from 'jquery'; import Ui from '../../../utils/weixin'; import Http from '../../../utils/http'; import {SERVER_BASE_PATH} from '../../../global.config'; let _this; const apis = [ {"id":"uploadAgreement","url":"/dealer/api/v1...
const React = require('react'); const SEARCH_HOTKEYS = ["s", "/"]; const SEARCH_MAX_SUGGESTIONS = 5; const SEARCH_PATHS = null; class SearchBox extends React.Component { constructor(props) { super(props); this.textInput = React.createRef(); this.state = { query: "", focused: false, foc...
import React, { Fragment, useEffect, useContext, useState } from 'react'; import { Link } from 'react-router-dom'; import Interweave from 'interweave'; import NotFound from '../notFound'; import Hero from '../../components/elements/hero/hero'; import Button from '../../components/elements/button'; import Tag from '../....
import React, { Component } from 'react'; import { Text, View, Image, ScrollView, TouchableOpacity } from 'react-native'; import { Actions } from 'react-native-router-flux'; import { Button, NavBar, Card } from '../components/common'; import { ImageUpload } from '../resources/icons'; import { db, storage } from '../con...
import React from 'react'; import PropTypes from 'prop-types'; import { Check } from '@styled-icons/fa-solid/Check'; import { uniqBy } from 'lodash'; import { useRouter } from 'next/router'; import { FormattedMessage, useIntl } from 'react-intl'; import styled from 'styled-components'; import { addAuthTokenToHeader } ...
import React, { Component } from 'react' import PropTypes from 'prop-types' import Helmet from 'react-helmet' import styled from 'styled-components' import Link from 'gatsby-link' import Header from '../components/Header' import Footer from '../components/Footer' import Sidebar from '../components/Sidebar' import Marg...
import React from "react"; import styled from "styled-components"; import { BaseContainer } from "../../helpers/layout"; import { Button } from "../../views/design/Button"; import {getDomain} from "../../helpers/getDomain" const FormContainer = styled.div` margin-top: 2em; display: flex; flex-direction: column; ...
/*! * <NAME> * * MIT Licensed */ /** * Module dependencies. */ var fs = require('fs'), parse = require('url').parse, path = require('path'), mime = require('mime'), compress = require('compress'), staticSend; try { staticSend = require('connect').static.send; } catch (e) { staticSend = require('exp...
const template = `<div class="user-detail"> <div class="section-info"> <p class="title">信息面板</p> <div class="user-base-info"> <img class="avatar" :src="userInfo.avatar" alt="ERROR" draggable="false" /> <div class="public-info"> <p class="user-id"> <span class="label">用户账号</span> <span>{{ userIn...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }...
// Retrieving the Plain Text and Key let inp_1 = document.getElementById("inp_1"); let inp_2 = document.getElementById("inp_2"); // Retrieving the Fields to Display the Outputs let out = document.getElementById("out"); let t_area = document.getElementById("t_area"); let text = document.getElementById("txt"); let ret...
/* * The MIT License (MIT) * * Copyright (c) 2015 - present Instructure, Inc. * * 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 ri...
import React from 'react'; import i18next from 'i18next'; import backend from 'i18next-xhr-backend'; import { initReactI18next } from 'react-i18next'; import moment from 'moment'; import * as ls from './localStorage'; let _defaultLanguage = 'en'; let _currentLanguage; function getCurrentLanguage() { if (_currentLa...
import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import * as Yup from 'yup'; import moment from 'moment'; import SingleDateField from '../ui/SingleDateField'; import SingleDropdownField from '../ui/SingleDropdownField'; import PageSpinner from '../ui/PageSpinner'; import { For...
var contractAddress = '0xBD0dc23e8dDFA18a11f466Ca1Ac15Aed991654C5'; var ownerAddress = '0x27Fe75BD164c92BA21c1fd617dF1135bd2520375'; var spinArray = ['animation900','animation1080','animation1260','animation1440','animation1620','animation1800','animation1980','animation2160']; const web3 = new Web3(Web3.givenProvider...
const Desklet = imports.ui.desklet; const St = imports.gi.St; // Shell Toolkit const GLib = imports.gi.GLib; const Util = imports.misc.util; const Mainloop = imports.mainloop; const Lang = imports.lang; const Settings = imports.ui.settings; const Main = imports.ui.main; const Gio = imports.gi.Gio; const Gettext = impor...
const User = require('./userSchema'); const Activity = require('./activitySchema'); const Exercises = require('./exercisesSchema'); module.exports = { _errorHandler: (err) => { res.send(err.message); }, showUser: (req, res) => { console.log(req.body.usermail); const usermail = req.b...
import data from "@solid/query-ldflex"; import { AccessControlList } from "@inrupt/solid-react-components"; import { permissionHelper } from "@utils"; import { createDoc, createDocument } from "../utils/ldflex-helper"; import auth from "solid-auth-client"; import FileClient from "solid-file-client"; const PATH_BASE = ...
//utilities functions and classes const {randRoom, randPiece} = require('./utilities/utils') const Player = require('./utilities/player') const Board = require('./utilities/board') const cors = require('cors') //set up express server const express = require('express') const mongoose = require('mongoose') const http = ...
const VscodeError = require('../Errors/VscodeError'); const ErrorTypes = require('../Errors/ErrorTypes'); const KeywordOrderCheck = require('../Checks/KeywordOrderCheck'); /** * @description Parse a string enum. * @type {EnumParserType} */ const EnumParser = { /** * @description Initialize an instace of EnumParse...
var map, infoWindow; var markers = []; map = new google.maps.Map(document.getElementById('map'), { center: {lat: 1.564317, lng: 103.745903}, zoom: 11 }); infoWindow = new google.maps.InfoWindow; // zoom to aduan from gridview $(document).on("click", ".zoom", function(){ ...
/** * @des Return max width and height inscribed in a certain rectangle,limited maxWidth, maxHeight. preserves the proportions * @param srcWidth * @param srcHeight * @param maxWidth * @param maxHeight * @returns {{w: number, h: number}} */ function calculateAspectRatio(srcWidth, srcHeight, maxWidth, maxHeight) ...
'use strict'; var mongoose = require('mongoose'); var opportunitieSchema = mongoose.Schemas.Opportunitie; var _ = require('lodash'); // var populateWrapper = require('../helpers/callbackWrapper').populate; module.exports = function (models) { return new function () { this.getByParam = function (options, c...
const gpath = require('./gulpfile.path.js'); const gdel = require('./gulpfile.del.js'); const gulp = require('gulp'); const watch = require('gulp-watch'); const rename = require('gulp-rename'); const shell = require('gulp-shell'); const pump = require('pump'); const removeFil...
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty; var __hasOwnProp = Object.prototype.hasOwnProperty; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) =>...
import { rgba } from 'polished' import { css } from 'styled-components/macro' // styled-system expects breakpoints to be an array, but we're sticking to // named breakpoints as it's easier to read. export const breakpoints = [] breakpoints.mediumPhonePlus = '360px' breakpoints.tabletPlus = '768px' breakpoints.dualCol...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Form = Form; exports.Control = Control; exports.useFormModel = useFormModel; exports.Select = exports.TextArea = exports.Input = exports.default = void 0; var _react = _interopRequireWildcard(require("react")); var _setPropTypes =...
import React from "react"; import { func, objectOf, arrayOf, string } from "prop-types"; import { Link } from "react-router-dom"; import { Table } from "antd"; import { uniqBy, isEmpty } from "lodash"; import * as router from "@/constants/routes"; import * as Strings from "@/constants/strings"; import NullScreen from "...
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...
// ********************************************************************************* // api-routes.js - this file offers a set of routes for displaying and saving data to the db // ********************************************************************************* // Dependencies // =====================================...
/* Copyright 2011 Google 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 in w...
'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...
/** * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ /** * Used ...
import dayjs from 'dayjs' import { html, dispatch } from 'hybrids' import MtA, { handleScroll } from '@/components/a' import mangakakalot from '@/assets/mangakakalot.png' import fanfox from '@/assets/fanfox.png' import manganelo from '@/assets/manganelo.png' export const UNREAD = -1 const _ensureDiv = (host, e, fn) =...
/* * Converts mapeo data from hyperlog to kappa-core * * $ migrate <syncfile> <output-dir> * * Example: * $ migrate sinangoe.mapeodata output/ */ if (process.argv.length !== 4) { console.log('USAGE: node index.js SYNCFILE OUTDIR') process.exit(0) } var path = require('path') var through = require('throu...
"use strict"; /******************************************************************************** * Copyright (c) 2017-2018 TypeFox and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/lega...
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const os_1 = require("os"); const path_1 = require("path"); const child_process_1 = require("child_proce...
import React, { useState, useRef } from "react"; import { useDispatch, useSelector } from "react-redux"; import Router from "next/router"; import _difference from "lodash/difference"; // Actions import * as accountActions from "../../redux/actions/accountActions"; import * as contractDetailActions from "../../redux/ac...
// Middleware var express = require('express'); // Requires var nunjucks = require('nunjucks'), favicon = require('serve-favicon'), connectLivereload = require('connect-livereload'), morgan = require('morgan'), compress = require('compression'), meth...
import React from "react"; import { Link, useParams } from "react-router-dom"; import { candidateSummaryUrl, stateSummaryApiUrl } from "../urls"; import { Card, Header, Icon, List, Loader, Message, Popup, Responsive, Segment, } from "semantic-ui-react"; import { candidateDisplayName } from "../helpers...
import { sparqlEscapeUri, uuid } from 'mu'; import { writeToFile } from './graph-helpers'; import { querySudo as query, updateSudo as update } from '@lblod/mu-auth-sudo'; import { NamedNode, graph as rdflibGraph, parse as rdflibParse, namedNode, serialize, literal } from 'rdflib'; import request from 'request'; const ...
import fs from 'fs'; import Key from '../lib/database/models/Key.js'; import KeyInfo from '../lib/database/models/KeyInfo.js'; import Languages from '../lib/database/models/Languages.js'; import Revision from '../lib/database/models/Revision.js'; import Revisions from '../lib/database/models/Revisions.js'; import isVal...
import expectThrow from '../zeppelin-solidity/test/helpers/expectThrow'; var RewardToken = artifacts.require("../contracts/RewardToken.sol"); var assert = require("assert"); contract('RewardToken', function(accounts){ var token; var owner = accounts[0]; var sender = accounts[1]; var receiver = accounts[2]; ...
const htmlparser = require('htmlparser2'); const trimEnd = require('lodash/trimEnd'); const defaultFormat = require('./formatter'); const { limitedDepthRecursive, splitCssSearchTag } = require('./helper'); // eslint-disable-next-line import/no-unassigned-import require('./typedefs'); // Which type of tags should not...
'use strict'; const { TSError, logError, get, cloneDeep, pRetry } = require('@terascope/utils'); const { makeLogger } = require('../../../../../workers/helpers/terafoundation'); const K8sResource = require('./k8sResource'); const k8sState = require('./k8sState'); const K8s = require('./k8s'); const { getRetryConfi...
const { Node } = require("./Node"); const { Logger } = require("../logger"); const { Packets } = require("../packets"); const { FLOOD, REPLY, ENQUEUED, PACKET_COLOR } = require("../constants"); const { getObject } = require("../JSParse"); // This assumes color of all packets is to be same, for separate color of each ...
// Drag Object // an object that makes an unlimited number DynLayers draggable // 19991010 // Copyright (C) 1999 <NAME> // Distributed under the terms of the GNU Library General Public License // Available at http://www.dansteinman.com/dynapi/ var zIndex = 20; function Drag() { this.obj = null; this.array = new Arr...
function cellStyle(value, row, index) { var classes = ["active", "success", "info", "warning", "danger"]; return index % 2 === 0 && index / 2 < classes.length ? { classes: classes[index / 2] } : {} } function rowStyle(row, index) { var classes = ["active", "success", "info", "warning", "danger"...
/*Main vue js*/ require('./bootstrap'); window.Vue = require('vue'); window.moment = require('moment'); import Vue from 'vue'; import VueRouter from 'vue-router'; import vbclass from 'vue-body-class'; import BootstrapVue from 'bootstrap-vue'; import AmCharts from 'amcharts3'; import AmSerial from 'amcharts3/amchart...
import React, { useState, useEffect } from 'react'; import clsx from 'clsx'; import PropTypes from 'prop-types'; import PerfectScrollbar from 'react-perfect-scrollbar'; import EmployeeService from '../../../services/EmployeeServices'; import Popup from "../../../components/controls/Popup"; import ProfileDetails from "....
function calcCentroidInRange(data, start, end) { const count = end - start; let rSum = 0; let gSum = 0; let bSum = 0; let aSum = 0; for (let i = start; i < end; i++) { const element = data.get(i); rSum += (element & 0xFF); gSum += (element >>> 8 & 0xFF)...
//Checking for production or development state for ENV if (process.env.NODE_ENV !== "production") { require('dotenv').config(); } //Require all the important dependencies at the top const express = require('express'); const app = express(); const path = require('path'); const mongoose = require('mongoose'); //requ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const { pow, floor } = Math; const TWO_POW_7 = pow(2, 7); const TWO_POW_14 = pow(2, 14); const TWO_POW_21 = pow(2, 21); const TWO_POW_28 = pow(2, 28); const TWO_POW_35 = pow(2, 35); const TWO_POW_42 = pow(2, 42); const TWO_POW_49 = pow(2, 49);...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = require('babel-runtime/helpers/extends'); var _extends3 = _interopRequireDefault(_extends2); var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); var _classCallCheck3 = _interopRequireDefault(_classC...
// Formatted by StandardJS async function loadImage (source, width, height) { return new Promise(resolve => { const image = new Image(width, height) image.addEventListener('load', () => resolve(image)) image.addEventListener('error', error => reject(error)) image.src = source }) } async function g...
// Start at with the first element in the array. // Compare that element to the element next to it and // swap if neccessary. This "bubbles" the largest element // to the end of the array. // Repeat until all elements are sorted. const bubbleSort = a => { const n = a.length for (let i = 0; i < n - 2; i++) { for...
/*For converting into JSON Format*/ $.fn.serializeObject = function () { var o = {}; var a = this.serializeArray(); $.each(a, function () { if (o[this.name] !== undefined) { if (!o[this.name].push) { o[this.name] = [o[this.name]]; ...
// global variables var currentCity; var APIkey = "81f51e0aad6e42c02f096b9b679089ee" var today = moment() console.log("Linked") // function that gets the current weather information function getCurrentWeather (event){ // get the city name from the user input var city = document.querySelector("#searchCity").v...
/* * @Author: czy0729 * @Date: 2020-07-15 00:12:36 * @Last Modified by: czy0729 * @Last Modified time: 2020-09-03 11:19:36 */ import anime from '@constants/anime' import { getTimestamp } from './index' import { getPinYinFirstCharacter } from './thirdParty/pinyin' export const ANIME_AREA = ['日本', '中国'] export cons...
const MACRONAME = "Searing_Smite.0.3.js" /***************************************************************************************** * Original downloaded from https://www.patreon.com/posts/searing-smite-56611523 * * 11/09/21 0.0 Cry Posted Version which seems fine * 12/27/21 0.1 JGB Add lighting effect for the "on...
import { useState } from 'react'; import { defineMessages } from 'react-intl'; import routing from '../../services/routing'; const formMessages = defineMessages({ signupSubmitText: { id: 'hummingbird.CampaignForm.signupSubmit.text', description: 'Text for submit button', defaultMessage: 'Submit', }, ...
import React, { useRef, useEffect, useState } from 'react' import propTypes from 'prop-types' import classNames from 'classnames' import { Thumb } from './Thumb' import keymap from '../../../utils/enums/keymap' import styles from './DualThumb.module.scss' const thumbsMap = { LOWER: 0, UPPER: 1, } const changeValu...
/* eslint-disable react/no-unescaped-entities */ /* eslint-disable jsx-a11y/label-has-associated-control */ import React from 'react'; import Layout from '../components/layout/Layout'; import AboutBanner from '../assets/crownBanner.jpg'; const About = () => { return ( <Layout> <section> <div classN...
// 开箱统计 chrome.runtime.onMessage.addListener( function (request, sender, sendResponse) { if (request.action == "request") { var url = new URL(request.url) if (url != null) { console.log(request.url) if (url.pathname.startsWith("/account/AjaxLoadMoreHi...
import React, { useState } from 'react'; import { useDropzone } from 'react-dropzone'; import "./FileManagementComponent.css"; import axios from 'axios' const FileManagementComponent = ({ userDataRef }) => { //state for checking file size const [fileSize, setFileSize] = useState(true); // for file upload...
/** * @module */ import BasePluginStamp from './base-plugin-stamp'; /** * @lends ScreenSharePlugin */ const properties = { /** * @override */ name: 'janus.plugin.videoroom', memeberList: {}, vid_local_screen: document.createElement('video'), room_id: 1234, }; /** * @lends ScreenSharePlugin.proto...
import React, { Component, PropTypes } from 'react'; import { ART, View, Animated, Easing } from 'react-native'; import { roundingRange } from "../implements"; import GestureAware from './vendor/GestureAware'; import { attachTitleHandlers, enableCrosshair, enableCoords, getTooltipBac } from './subparts';...
import React, { PropTypes } from 'react'; import autoBind from 'react-autobind'; import Slick from 'react-slick'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import Alert from 'react-s-alert'; import './city_page.css'; import Link from '../../../components/link/link'; import { get...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLik...
// Block key is the string x|y|z representing its global coords. export function getBlockKey(x, y, z) { return x + "|" + y + "|" + z; } export function parseBlockKey(key) { var arr = key.split("|"); return [parseInt(arr[0]), parseInt(arr[1]), parseInt(arr[2])]; } // helper to swap item to end and pop(), i...
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; var jsoncontent = []; init_launch(); document.addEventListener('DOMContentLoaded', function() { document.getElementById("addentry").a...