text stringlengths 3.07k 16k |
|---|
/*******************************************************************************
* Licensed Materials - Property of IBM
* (c) Copyright IBM Corporation 2019. All Rights Reserved.
*
* Note to U.S. Government Users Restricted Rights:
* Use, duplication or disclosure restricted by GSA ADP Schedule
* Contract with IB... |
const _ = require('lodash');
const { BagItProfile } = require('../../bagit/bagit_profile');
const { Choice } = require('./choice');
const { Constants } = require('../../core/constants');
const { Context } = require('../../core/context')
const { Field } = require('./field');
const { Form } = require('./form');
const in... |
import Head from 'next/head'
import clsx from 'clsx'
import clamp from 'lodash.clamp'
import db from '~/life-expectancy.json'
const WEEKS_IN_ONE_YEAR = Array.from({ length: 52 })
const LIFE_IN_YEARS = Array.from({ length: 100 })
const ONE_WEEK_IN_MS = 6048e5
function getNthByStep(i, step) {
const nth = i + 1
i... |
import './style.css';
import count from './count';
const modal = (item, iiif, imageId, id) => {
const { body } = document;
const popUp = document.createElement('div');
popUp.id = 'overlay';
body.append(popUp);
popUp.innerHTML = `
<div id=${id} class="modal">
<img src="${iiif}/${imageId}/full/... |
/* DATA TYPES ************************************************************* */
/* Declare variables and assign string, boolean, undefined and null data types */
let firstName = '<NAME>';
let lastName = 'Garcia';
let maritalStatus = 'solo';
let nation = 'Galicia';
let age = 29;
let myAge = 29
let yourAge = 30;
let favo... |
let { burnHandler, normalizeTx, normalizeOutput } = require('./common.js')
let getSigHash = require('./sigHash.js')
let ed25519Account = require('./ed25519Account.js')
let secp256k1Account = require('./secp256k1Account.js')
let multisigAccount = require('./multisigAccount.js')
let accounts = require('./accounts.js')
c... |
/*
Copyright 2021 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... |
const { Command } = require('@sakaruzero/klasa');
const ptnEmbed = require('@sakaruzero/djs-pagination');
const Discord = require('discord.js');
module.exports = class extends Command {
constructor(...args) {
super(...args, {
enabled: true,
aliases: ['pbirthday'],
description: language => language.get('CMD... |
import router from '../../router/index'
import storage from '../../helpers/BrowserStorage'
function initialState () {
return {
boardSize: {width: null, height: null},
showKickoffButtons: true,
showBoardSizeSelector: false,
showSavedStates: false,
savedStates: [],
sh... |
const address = require('address')
const externalIPLib = require('external-ip')
const moment = require('moment-timezone')
const path = require('path')
const timetable = require('timetable-fns')
const url = require('url')
const data = require('./data')
const reAirline = /^[A-Z0-9]{2}$/
const reFlightNo = /^[A-Z0-9]{2}... |
import React from "react";
import PropTypes from 'prop-types';
// Controllers
function togglePlay() {
var audioPlayer = document.getElementById("audioPlayer");
if (document.getElementById("playButton").classList.contains("oi-media-play")) {
// is playing
document.getElementById("playButton"... |
import React from 'react';
import PropTypes from 'prop-types';
import {Typography, Grid, Button, Box, List, ListItem} from '@material-ui/core';
import {makeStyles, useTheme} from '@material-ui/core/styles';
import {Link} from 'gatsby';
import ResponsiveVideo from '../shared/ResponsiveVideo';
import LessonButton, {Primi... |
/* global YoastSEO: true, wpseoTermScraperL10n, YoastReplaceVarPlugin, console, require */
var isUndefined = require( "lodash/isUndefined" );
var getIndicatorForScore = require( "./analysis/getIndicatorForScore" );
var TabManager = require( "./analysis/tabManager" );
var updateTrafficLight = require( "./ui/trafficLi... |
import React, { Component } from 'react';
import {Card, CardHeader, CardText} from 'material-ui/Card';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
import Dialog from 'material-ui/Dialog';
import ErayCardChart from './_erayCardChart';
import { observer } from 'mo... |
import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import { observer } from 'mobx-react';
import { Modal, Form, Select, Tooltip } from 'choerodon-ui';
import { stores, Content } from 'choerodon-front-boot';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'l... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... |
'use strict';
var StringPrep = require('./lib/stringprep');
// All of our StringPrep fallbacks work correctly
// in the ASCII range, so we can reliably mark
// ASCII-only JIDs as prepped.
var ASCII = /^[\x00-\x7F]*$/;
function bareJID(local, domain) {
if (local) {
return local + '@' + domain;
}
... |
const log = (c1, c2) => console.log.bind(window.console, '%c%s', `color: ${c1}; background: ${c2}; font-size: 10px; border-radius: 2px; font-weight: bold; padding: 2px`);
const logi = log('#284271', '#a8e9ff');
const logw = log('#7c4400', '#ffd06f');
const loge = log('#be0000', '#ffcaca');
logw("ReDevTools", "ReDevTool... |
/*********************************************
* @ <NAME>, <NAME>, <NAME>
* Carnegie Mellon University 2022
*********************************************/
import React from 'react';
import {Input, Form, InputNumber, Button, Select, Radio, Tooltip} from 'antd';
import {AlignLeftOutlined, AlignCenterOutlined, AlignRigh... |
const output = require('./output/index');
const input = require('./input/index');
module.exports.init = function(host, dev) {
if (dev) {
return Promise.resolve(() => {
output.logInfo('Connecting to ' + host + ' ...');
});
} else {
return output.figlet('Time Bomb', output.logPlay).then(() => {
... |
const express = require ('express');
const Jimp = require ('jimp');
const app = express ();
const port = process.env.PORT || 8080;
const randomBetween = (a, b) => a < b ? Math.floor(Math.random() * b) + a : Math.floor(Math.random() * a) + b
const quotes = require ('./quotes');
const imgSize = {width: 506, height: ... |
import React, { useState, useEffect } from "react";
import { graphql } from "gatsby";
import Img from "gatsby-image";
import { useCart } from "react-use-cart";
import queryString from "query-string";
import { navigate } from "@reach/router";
import {
Heading,
FormLabel,
Select,
Button,
Grid,
Tabs,
Tab,
... |
import React, { useContext } from 'react';
import { Button } from '@material-ui/core';
import { NavHashLink as NavLink } from 'react-router-hash-link';
import { makeStyles } from '@material-ui/core/styles';
import Typewriter from "typewriter-effect";
import './Landing.css';
import { ThemeContext } from '../../contexts... |
var quizID;
var answer;
var json_result;
var type = '';
var optionLength;
var openID;
var title;
function getTestDetail(){
openID = document.getElementById('openID').innerHTML;
quizID = document.getElementById('quizID').innerHTML;
$.post("http://112.124.101.41/mike_server_v01/index.php/Wechat/Index/getTestDetail"... |
/**
* MIT License
*
* Copyright (c) 2018 Click to Cloud Pty Ltd
*
* 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... |
import React, { useRef, useEffect } from 'react';
import makeStyles from '@mui/styles/makeStyles';
import TextField from '@mui/material/TextField';
import IconButton from '@mui/material/IconButton';
import Button from '@mui/material/Button';
import Paper from '@mui/material/Paper';
import { blue, grey } from '@mui/mat... |
import format from 'date-fns/format';
import { clearContent, createElem } from './util.dom';
import { localModule } from './storage/local';
import apiModule from './api';
const weatherUIModule = () => {
const api = apiModule();
const ls = localModule();
const getWithSup = (kelvin) => {
const span = createEl... |
require('dotenv').config()
const { Console } = require('console')
const fs = require('fs')
const Section = require('../models/section')
const SectionInArticle = require('../models/sectionInArticle')
const errorLog = require('./error.log')
exports.create = (req, res, next) => {
const newSectionInArticle = {
... |
/*
* Copyright 2018-present, Synopsys, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const fabric = require('../fabric');
const Table = require('cli-table3');
const fs = require('fs');
const {handleErrors} ... |
#!/usr/bin/env node
const bip39 = require('bip39')
const bip32 = require('bip32')
const program = require('commander');
const prompts = require('prompts');
var bitcoin = require('bitcoinjs-lib');
const Metaverse = require('metaversejs');
var bip66 = require('bip66')
const PRETTY_OUTPUT_INDENT = 4
program
.vers... |
import React from 'react'
import {
View,
StyleSheet,
Text,
SectionList,
ImageBackground
} from 'react-native'
import {
WhiteSpace,
WingBlank,
} from '@ant-design/react-native'
import Icon_antDesign from 'react-native-vector-icons/AntDesign'
import Icon_ionicons from 'react-native-vector-i... |
const apiKey = '532425e25b21324eaa26b04d5260968c';
const searchForm = document.querySelector('#search-form');
const searchInput = document.querySelector('#search-input');
const displayMainForecast = (location, icon, status, temperature) => {
const weatherLocation = document.querySelector('#weather-location');
const... |
const express = require('express');
const {
db
} = require('./db');
const bodyParser = require('body-parser');
const app = express();
const expressLayouts = require('express-ejs-layouts');
const flash = require('connect-flash');
const session = require('express-session');
const passport = require('passport... |
// subtract a move from the remaining ones
function consumeMove() {
remainingMoves--;
remainingMovesEl.innerHTML = "Remaining Moves: " + remainingMoves;
if (remainingMoves < 0) {
console.log("You lost");
isLevelLost = true;
isLevelWon = false;
showDefeatDialog();
}
}
// UI interaction
function... |
/*
******************************************************************************
Copyright (c) 2016 Particle Industries, Inc. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Fo... |
import toastCSS from '../../style/toast.css'
export function log() {
if (__DEV__) {
console.log.apply(console, arguments)
}
}
export function draw(elem, color = 'red') {
if (__DEV__ && elem) {
if (Array.isArray(elem)) {
elem.forEach(el => {
el.style.outline = '2px solid ' + color
})
... |
const crypto = require('crypto');
const Dicer = require('dicer');
const S3 = require('../../lib/fileS3.js');
const util = require('../../lib/util.js');
// Load configuration
const config = require('../../config.json');
// Create regexes
// Content-Disposition filename regex: "filename=xxx"
const ContentDispositionFil... |
var fs = require('fs');
const Ajv2020 = require("ajv/dist/2020");
const addFormats = require("ajv-formats");
var ajv = new Ajv2020({ strict: false });
addFormats(ajv);
var localize = require('ajv-i18n');
var X3DJSONLD = require('./X3DJSONLD.js');
X3DJSONLD = Object.assign(X3DJSONLD, { processURLs : function(urls) { re... |
//--------Building Maps-----------------//
//create the tile layers for the background of the map (use leaflet provider demo)
var defaultMap = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> c... |
import React, { Fragment, useEffect, useState } from "react";
import UserAvatar from "react-user-avatar";
import { Link } from "react-router-dom";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { Button, Modal } from "react-bootstrap";
import Spinner from "../layout/Spinner";
import D... |
// This is an in-memory livedb database.
//
// Its main use is as an API example for people implementing database adaptors.
// This database is fully functional, except it stores all documents &
// operations forever in memory. As such, memory usage will grow without bound,
// it doesn't scale across multiple node proc... |
function isComplex(value) {
return typeof value === "object" && value != null;
}
class CustomProxy {
constructor(target, parentProxPub = null) {
this._proxies_ = new Map();
this._value_ = target;
this._assignListeners_ = new Set();
this._mutationListeners_ = new Set();
this._fillListeners_ = new... |
import React, {Component} from 'react';
import './styles.css';
import Brand from '../../components/Brand'
import {HOME, screenPaths} from '../../navigation/Routes'
import withRedirect from '../../navigation/withRedirect'
import {
isMobile
} from "react-device-detect";
import withWindowDimensions from '../../lib/withW... |
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useSnackbar } from 'notistack'
import { Power3 } from 'gsap'
import TweenLite from 'gsap/umd/TweenLite'
import IconAccountCircle from '@material-ui/icons/AccountCircle'
import Visibility from '@material-u... |
const {
CssBaseline,
ThemeProvider,
Typography,
Container,
Box,
Button,
Input,
LinearProgress,
IconButton,
Select,
MenuItem,
TextField,
Dialog,
DialogContent,
Step,
Stepper,
StepLabel,
Snackbar
} = MaterialUI;
function App() {
const [formBuilder, setFormBuilder] = React.useState(... |
import { useState, useEffect } from "react";
import Avatar from "@mui/material/Avatar";
import Button from "@mui/material/Button";
import CssBaseline from "@mui/material/CssBaseline";
import TextField from "@mui/material/TextField";
import axios from "axios";
import Link from "@mui/material/Link";
import Grid from "@mu... |
const invalid = 'invalid!';
const notAllowed = 'notAllowed!';
var args;
var definedOptions;
var isEmpty = function (obj) {
if (obj == null) return true;
if (obj.length > 0) return false;
if (obj.length === 0) return true;
if (typeof obj !== 'object') return true;
for (let key in obj) {
if (hasOwnPropert... |
'use strict';
var { URL } = require('url');
var compileurl = require('path-to-regexp').compile;
var request = require('superagent');
var assert = require('assert');
const hasOwn = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
const isString = (input) => typeof input === 'string';
const isNum... |
import path from 'path';
import express from 'express';
import cookieParser from 'cookie-parser';
import bodyParser from 'body-parser';
import cors from 'cors';
import { Server as httpsServer } from 'https';
import { Server as httpServer } from 'http';
import fs from 'fs';
import socketIO from 'socket.io';
import sched... |
import EventBus from "diagram-js/lib/core/EventBus";
import RuleProvider from 'diagram-js/lib/features/rules/RuleProvider';
import { Label, Root, Shape } from 'diagram-js/lib/model';
import Settings from '../../utils/Settings';
import UmlNodeType from '../../utils/UmlNodeType';
import UmlConnectionType from "../../util... |
import { Account, Action } from "./TasitSdk";
const { Contract, ERC721, ConfigLoader } = Action;
import { expect, assert } from "chai";
import config from "./config/default";
import {
mineBlocks,
createSnapshot,
revertFromSnapshot,
confirmBalances,
gasParams,
setupContracts,
setupWallets,
duration,
c... |
// blackjack
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var suits = ['spades', 'clubs', 'hearts', 'diams'];
var values = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K'];
var deck;
var playerCards = [];
var playerValue... |
'use strict';
//--PROJECT--//
var gulp = require('gulp'),
watch = require('gulp-watch'),
prefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
fileinclude = require('gulp-file-include'),
cssclean = req... |
#! /usr/bin/env node
var async = require('async'),
clc = require('cli-color'),
fs = require('fs'),
cp = require('child_process'),
spawn = cp.spawn,
config,
files = [];
function initGrind(otherDir) {
// `whateverSync()` methods are okay here, because this is initialization stuff. Also, because I'm lazy.
var us... |
/**
*
* @param name
* @param value
* @param min
*/
export const setCookie = function (name, value, min) {
if (min) {
var date = new Date();
date.setTime(date.getTime() + (min * 60 * 1000));
var expires = "; expires=" + date.toGMTString();
}
else {
expires = "";
}
... |
const HighlightFeaturesModel = Backbone.Model.extend(/** @lends HighlightFeaturesModel.prototype */{
/**
* @class HighlightFeaturesModel
* @description Class to highlight via gfi selected vector features.
* @extends Backbone.Model
* @memberof Tools.GFI
* @constructs
* @property {object... |
var href = document.location.href;
var result_number = href.split('man_health_number=')[1];
$('#result').html(Number(result_number).toFixed(0));
if (localStorage.email != "undefined"){$('input[name="entry.1560393608"]').val(localStorage.email);}
if (localStorage.name != "undefined"){$('input[name="entry.12004... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
import styled from 'styled-components';
import { withEither, withMaybe } from '../../components/higher-order-components';
import Avatar from '../../components/Avatar';
import MobileC... |
'use strict';
function TabControl(base)
{
this.base = base;
this.tab_list = this.base.querySelector('[role="tablist"]');
this.buttons = this.tab_list.querySelectorAll('[role="tab"]');
let handler_click = this.on_tab_click.bind(this);
let handler_keydown = this.on_tab_keydown.bind(this);
for (let button of this.b... |
import React, { useContext, useState } from 'react';
import socket from '../Socket';
import { GeneralContext } from '../App';
import { withStyles, TextField, Button } from '@material-ui/core';
import CheckRoundedIcon from '@material-ui/icons/CheckRounded';
import styles from '../Styles/HomePage.module.css';
import Tool... |
var terrain = L.tileLayer(
"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",
{
attribution:
"© <a href='https://www.mapbox.com/about/maps/'>Mapbox</a> © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> <strong><a href='https://www.mapbox.com/map-feedba... |
import cn from "classnames";
import getHeight from "dom-helpers/height";
import PropTypes from "prop-types";
import React from "react";
import { findDOMNode } from "react-dom";
import dates from "./utils/dates";
import { accessor, elementType } from "./utils/propTypes";
import {
segStyle,
eventSegments,
en... |
import React, {Component, PropTypes} from 'react';
import ReactDOM from 'react-dom';
import shallowEqual from 'recompose/shallowEqual';
import Popover from '../Popover/Popover';
import CheckIcon from '../svg-icons/navigation/check';
import ListItem from '../List/ListItem';
import Menu from '../Menu/Menu';
const nested... |
import React, { useState, useEffect, useRef } from 'react';
import { useStaticQuery, graphql } from 'gatsby';
import { CSSTransition, TransitionGroup } from 'react-transition-group';
import styled from 'styled-components';
import { srConfig } from '@config';
import sr from '@utils/sr';
import { Icon } from '@components... |
import { canUseDOM } from "exenv";
import { useRef, useState, useEffect, useCallback } from "react";
import {
calculatePrecision,
preventNonNumberKey,
roundToPrecision,
} from "./utils";
import usePrevious from "../usePrevious";
function useLongPress(callback = () => {}, speed = 200) {
const [isPressed, setIsP... |
import React, { Component } from "react";
import { drizzleConnect } from "@drizzle/react-plugin";
import PropTypes from "prop-types";
import { autoBind } from "react-extras";
import Text from "../basics/Text";
import IndicatorD from "../basics/IndicatorD";
import Oracle from "../../contracts/solidityjson/Oracle.json";
... |
/*jshint globalstrict:false, strict:false */
/* global fail, arango, getOptions, assertTrue, assertEqual, assertNotEqual */
////////////////////////////////////////////////////////////////////////////////
/// @brief teardown for dump/reload tests
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2010-2012 triagens Gm... |
import React from 'react';
import {prefixUrl} from '@mapbox/batfish/modules/prefix-url';
import urls from './urls';
import {version} from '../../package.json';
import {highlightJavascript, highlightMarkup, highlightShell} from './prism_highlight';
import Copyable from './copyable';
class QuickstartCDN extends React.Co... |
/*============================================================================*\
Rocket store for Express Session
(c) Copyrights Paragi, <NAME> 2019
Provide session storage functions for express session.
License: MIT
\*============================================================================*/
const rsdb... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {
Dimensions,
Image,
Linking,
Platform,
Text,
TouchableOpacity,
TouchableWithoutFeedback,
... |
/* eslint-disable no-mixed-operators */
const Jimp = require("jimp");
// https://github.com/zeit/pkg/issues/321#issuecomment-408297777
// sizes for pkg
const sizeList = [16, 32, 48, 64, 128];
const err = new Error("Please give me an png image of 256x256 pixels.");
err.code = "ESIZE";
module.exports = function(filepat... |
const root = typeof window !== 'undefined' ? window : global;
const Animate = (global => {
const time =
Date.now ||
(() => {
return +new Date();
});
const desiredFrames = 60;
const millisecondsPerSecond = 1000;
let running = {};
let counter = 1;
return {
/**
* A requestAnimatio... |
// Copyright 2017 <NAME>. All Rights Reserved.
// Copyright 2016 <NAME>. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the 'License');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LI... |
/*
* This file is part of the nivo project.
*
* Copyright 2016-present, <NAME>.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import React, { Component, Fragment } from 'react'
import { TransitionMotion, spring } from 'react-moti... |
/* B"H
*/
const Users = require( "./users");
const { ObjectId } = require('bson');
const { client } = require('./mongo');
const collection = client.db(process.env.MONGO_DB).collection('posts');
module.exports.collection = collection;
const list = [
{
src: "https://bulma.io/images/placeholders/1280x960.pn... |
'use strict';
var Buffer = require('safe-buffer').Buffer;
var encoding = require('encoding');
var sharedFuncs = require('./shared');
/**
* Comparator function for comparing msgid
* @param {Object} object with msgid prev
* @param {Object} object with msgid next
* @returns {number} comparator index
*/
function com... |
'use strict';
const { ipcRenderer } = require('electron');
const immutabilityHelper = require('immutability-helper');
const markdown = require('markdown-it')();
const sanitizeHtml = require('sanitize-html');
const fs = require('fs');
const {
CHANNEL_OPEN_FILE_DIALOG_MARKDOWN,
CHANNEL_OPEN_FILE_DIALOG_MARKDOWN_FILE... |
/*!
* Bootstrap Grunt task for parsing Less docstrings
* http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
var markdown = require('markdown').markdown;
function markdown2html(markdownString) {
// the slice removes the <p>...<... |
'use strict';
const AsyncLock = require('async-lock');
const lock = new AsyncLock({ timeout: 15000 });
// nodeDefId must match the nodedef in the profile
const nodeDefId = 'VEHICLECOND';
function delay(delay) {
return new Promise(function(waitforit) {
setTimeout(waitforit, delay);
});
}
module.exports = fun... |
import { defineMessages } from 'react-intl';
const MESSAGES = defineMessages({
actions: {
defaultMessage: 'Actions',
id: 'iaso.label.actions',
},
dataSources: {
defaultMessage: 'Data Sources',
id: 'iaso.label.dataSources',
},
dataSourceName: {
defaultMessage:... |
import GL from '@luma.gl/constants';
import {Vector3, Matrix4} from 'math.gl';
import {Ellipsoid} from '@math.gl/geospatial';
const TYPE_ARRAY_MAP = {
UInt8: Uint8Array,
UInt32: Uint32Array,
Float32: Float32Array,
UInt64: Float64Array
};
const GL_TYPE_MAP = {
UInt8: GL.UNSIGNED_BYTE,
Float32: GL.FLOAT,
... |
import Head from 'next/head'
import Meta from '@hackclub/meta'
import { useRouter } from 'next/router'
import { EmojiImg } from '../../components/emoji'
import Feed from '../../components/feed'
import Message from '../../components/message'
import Reaction from '../../components/reaction'
import FourOhFour from '../404... |
import { useState, useEffect, useCallback } from 'react';
import styled from '@emotion/styled';
import { Renderer } from '@k8slens/extensions';
import { layout } from '../styles';
import { Section } from '../Section';
import { useExtState } from '../../store/ExtStateProvider';
import { useConfig } from '../../store/Con... |
/*
* Announcements chat plugin
* By Spandamn
*/
'use strict';
class Announcement {
constructor(room, announcement) {
this.announcementNumber = ++room.gameNumber;
this.room = room;
this.announcement = announcement.source;
this.supportHTML = announcement.supportHTML;
this.timeout = null;
this.timeoutMins =... |
import { stringify } from "query-string";
import {
fetchUtils,
GET_LIST,
GET_ONE,
GET_MANY,
GET_MANY_REFERENCE,
CREATE,
UPDATE,
UPDATE_MANY,
DELETE,
DELETE_MANY,
} from "react-admin";
export const httpClient = (url, options = {}) => {
options.credentials = "include";
return fetchUtils.fetchJson... |
import React from 'react';
// import ReactDOM from 'react-dom'
import { connect, } from 'react-redux';
import {
changeMediaEntryMethod,
updateFormContent,
clearAddMediaForm,
changeMediaType,
} from '../store/addMediaForm';
import { addMediaToStory, } from '../store/media';
import { addBlobToS3, getMediaUrl, } f... |
'use strict';
var XRegExp = require('xregexp');
var assert = require('assert');
// globStringToRegex from: http://stackoverflow.com/a/13818704/403571
function regexpQuote(str, delimiter) {
// http://kevin.vanzonneveld.net
// + original by: booeyOH
// + improved by: <NAME> (http://magnetiq.com)
// + impro... |
'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(_classCal... |
import _ from 'lodash';
import queryString from 'query-string';
export const defaultTwitterUrlOptions = {
link: typeof document !== 'undefined' ? document.location.href : null,
text: null,
hashtags: null,
via: null,
related: null,
customQueryParams: null
};
export const defaultTwitterBaseUrl = 'https://twitter.c... |
import escapeStringRegexp from 'escape-string-regexp';
import {
RegExtras,
} from 'regextras/dist/main-umd';
import iterateJsdoc from '../iterateJsdoc';
const otherDescriptiveTags = new Set([
// 'copyright' and 'see' might be good addition, but as the former may be
// sensitive text, and the latter may have ju... |
import { __ } from 'embark-i18n';
import {buildUrl, deconstructUrl, recursiveMerge} from "embark-utils";
const async = require('async');
const chalk = require('chalk');
const path = require('path');
const { dappPath } = require('embark-utils');
import cloneDeep from "lodash.clonedeep";
import { COVERAGE_GAS_LIMIT, GAS_... |
/**
* Copyright 2017 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
/* jshint node:true */
const path = require('path');
const fs = require('fs');
const webpack = require('webpack');
const packageJson = require('./package.json');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { CleanWebpackPlugin } = requ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.merkleProof = merkleProof;
var _bigInteger = require('big-integer');
var _bigInteger2 = _interopRequireDefault(_bigInteger);
var _helpers = require('../helpers');
var _generic = require('../types/generic');
var _validate = requ... |
/**
*
*
* ImgPreview
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { get, has, isArray, isEmpty, size } from 'lodash';
import cn from 'classnames';
import BkgImg from '../../assets/icons/icon_upload.svg';
import ImgPreviewArrow from '../ImgPreviewArrow';
import ImgPreviewHint from '... |
'use strict';
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { retur... |
// TODO (jimmywarting): in the feature use conditional loading with top level await (requires 14.x)
// Node has recently added whatwg stream into core
import './streams.cjs';
/** @typedef {import('buffer').Blob} NodeBlob} */
// 64 KiB (same size chrome slice theirs blob into Uint8array's)
const POOL_SIZE = 65536;
... |
import styled from 'styled-components';
const iconBackground = (iconURL) => `
background-image: url(${iconURL});
background-position: top right;
background-repeat: no-repeat;
background-size: 30px;
`;
export const BMCScreen = styled.div`
height: 100vh;
display: grid;
grid-template-rows: 60px auto;
pad... |
const walletService = require("../models/walletModel");
const UserService = require("../models/userModel");
const uuid = require("uuid");
const paypal = require('paypal-rest-sdk');
paypal.configure({
'mode': 'sandbox', //sandbox or live
'client_id': 'AdwSTeWJSFnq0J5a2xC_Ny9-yNFiDgQZRKOoMdZBvqkKKgWwC2PbxmVgDjtt... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _lodash = require("lodash");
var _bluebird = _interopRequireDefault(require("bluebird"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
let PassThrough; // ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.