text stringlengths 3.22k 29.5k |
|---|
import React from 'react';
import PropTypes from 'prop-types';
import { numberWithCommas, trimValue } from 'utils/helpers';
import { connect } from 'react-redux';
import ReactTooltip from 'react-tooltip';
import NodePropagationChart from 'components/NetStats/NodePropagationChart';
import Container from './Container';
i... |
// ==UserScript==
// @name Trello Search Results Mod
// @namespace http://aggrippino.com
// @version 0.1
// @description Minor modifications to the Trello search results page
// @author <NAME>
// @match https://trello.com/search*
// @grant GM_addStyle
// ==/UserScript==
const title... |
init();
function init(){
var key;
const keyInput = document.querySelector('.keyID');
keyInput.addEventListener("keyup", function(event) {
if (event.key === "Enter") {
key = document.querySelector('.keyID').value;
enterSession(key);
}
});
}
function enterSession(key){
// ... |
/**
* Created by jlee on 12/04/15.
*/
/**
* email-topic related container
*/
var newman_top_email_topic = (function () {
var chart_bar_ui_id = 'chart_horizontal_bar_topics';
var chart_bar_ui_jquery_var = '#' + chart_bar_ui_id;
var chart_donut_ui_id = 'chart_donut_topics';
var chart_donut_ui_jquery_var = ... |
window.onload = () => {
//console.logtrimCanvas);
/*for (let i = 0; i < 200; i++) {
let star = document.createElement("div");
star.className = "star";
star.style.top = Math.random() * 100 + "%";
star.style.left = Math.random() * 100 + "%";
document.body.appendChild(star);
}*/
$("#dateForm").... |
const axios = require("axios");
const { cyan, green, magenta, red, yellow } = require("chalk");
const { Api } = require("eosjs/dist/eosjs-api");
const { JsonRpc } = require("eosjs/dist/eosjs-jsonrpc");
const { JsSignatureProvider } = require("eosjs/dist/eosjs-jssig");
const { PrivateKey } = require("eosjs/dist/eosjs-ke... |
'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)) {
... |
function Transition(elem) {
this.elem = elem;
this.styles = {};
}
Transition.cubicBezier = {
'def' : this['ease-out-quad'],
'in' : 'ease-in',
'out' : 'ease-out',
'in-out' : 'ease-in-out',
// 'swing'
// 'snap' : 'cubic-bezier(0,1,0.5,1)'... |
/* */
var AWS = require('./core');
var Api = require('./model/api');
var regionConfig = require('./region_config');
var inherit = AWS.util.inherit;
AWS.Service = inherit({
constructor: function Service(config) {
if (!this.loadServiceClass) {
throw AWS.util.error(new Error(), 'Service must be constructed wi... |
import React, { Component } from "react";
import {
View,
ScrollView,
ListView,
TouchableOpacity,
ImageBackground,
Platform,
Image,
Text,
TextInput,
Share,
ActivityIndicator,
RefreshControl
} from "react-native";
import styles from "./style";
import container from "../../Styles/container";
import... |
import { StaticImage } from "gatsby-plugin-image"
import React from "react"
import styled from "styled-components"
import {
FaPlay,
FaPauseCircle,
FaStepBackward,
FaStepForward,
} from "react-icons/fa"
import { IconContext } from "react-icons"
import { graphql, useStaticQuery } from "gatsby"
// import { setItem... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.PostgresDriver = void 0;
var _pg = require("pg");
var _helper = require("./helper");
var _select = require("./builders/select.builder");
var _insert = require("./builders/insert.builder");
var _delete = require("./builders/dele... |
/* global document */
/*
The code for finding out the BPM / tempo is taken from this post:
http://tech.beatport.com/2014/web-audio/beat-detection-using-web-audio/
*/
"use strict";
const OfflineContext = window.OfflineAudioContext || window.webkitOfflineAudioContext;
function analyzeTempo(analyzedFilePath, audioPr... |
/*
* workflow index.js
*/
/*----------------- nav bar control -------------------------- */
$(document).ready(function() {
$(document).ajaxStart(function() {
var $loading = $(".loading");
$loading.show();
})
$(document).ajaxStop(function() {
var $loading = $(".loading");
$loading.hide();
})
... |
import React, { Component } from 'react'
import {
View,
StyleSheet,
TextInput,
Alert,
TouchableOpacity,
BackHandler,
Image,
DatePickerIOS,
Animated,
Platform,
DeviceEventEmitter
} from 'react-native'
import DatePicker from 'react-native-datepicker'
import { KeyboardAwareScrollView } from 'react-n... |
var editing = false;
var timeline, list, editButton, addButton, cancelButton, acceptButton;
var editingDay;
var oldProgram;
window.onload = function () {
timeline = document.getElementById('timeline');
list = document.getElementById('list');
editButton = document.getElementById('edit-button');
addButto... |
// Libraries
var Config = require('./config');
var Logger = require('./Logger');
var Player = require('./Player');
var Food = require('./food');
var Packet = require('./packet');
// Imports
var WebSocket = require('ws');
function GameServer() {
this.config = Config;
this.logger = new Logger();
this.logger.setVe... |
fs = require('fs')
let input = fs.readFileSync('sample', 'utf8')
function hex2bin(hex) {
/*
Takes one hex digit and returns the binary string. The string always has 4 digits
*/
let bin = parseInt(hex, 16).toString(2)
while (bin.length < 4) {
bin = "0" + bin
}
return bin
}
function ... |
const fetch = require('node-fetch');
/**
* @description Retrieves the edit link for a task based on its name
* @param {firebase-admin} admin - Firebase admin instance
* @param {string} name - name of the Task
* @param {string} uid - The user's ID
* @returns
*/
async function getEditLink(admin, name, uid){
va... |
let size = 50;
let canvasWidth, canvasHeight;
let tileDropdown, gridCheckbox, starsCheckbox;
Array.prototype.last = function() {
return this[this.length - 1];
};
function setup() {
canvasWidth = windowWidth;
canvasHeight = windowHeight;
createCanvas(canvasWidth, canvasHeight);
background(240);
... |
/* .. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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.apach... |
'use strict';
const exec = require('child_process').exec;
const mkdir = require('mkdirp').sync;
const Fs = require('fs');
const Path = require('path');
const Async = require('async');
const Config = require('./Config');
const Logger = require('serverlog');
const console = new Logger({consoleTime: false});
console.inf... |
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import getEventKey from '../global/get-event-key';
import Select from '../select/select';
import TagsList from '../tags-list/tags-list';
import Caret from '../caret/caret';
import '../input-size/input-size.... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { ANALYZE_FOR_ENTRY_COMPONENTS, ChangeDetectionStrategy, ChangeDetectorRef, ComponentFactory, ComponentFactory... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
import React from 'react';
import {
Dimensions,
Modal,
Platform,
AppState,
Alert,
StyleSheet,
View,
ScrollView,
KeyboardAvoidingView,
TextInput,
TouchableOpacity,
} from 'react-native';
import Text from '../../components/MyText';
import AsyncStorage from '@react-native-async-storage/async-storage'... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { push as pushRoute } from 'connected-react-router'
import { trackPage, profilePage } from 'utils/route'
import { Scrubber } from '@audius/stems'
import { RepeatMode } from 'store/queue/types'
import {
repostTrack,
undoRepostTra... |
const POINTS_PER_MILLIMETER = 72 * 0.0393701;
const FONT_SIZE = 12;
const PAGE_SIZE = {
name: 'A4',
width: 210 * POINTS_PER_MILLIMETER,
height: 297 * POINTS_PER_MILLIMETER,
margin: 50,
};
const DOWNLOAD_LINK = Meteor.isClient ? (() => $('<a></a>').hide().appendTo($('body')))() : null;
function downloadFile(b... |
import OAuthPopup from './popup.js';
import {
camelCase,
isFunction,
isString,
objectExtend,
joinUrl, makeRequestOptions,
} from '../utils.js';
import sha256 from 'crypto-js/sha256';
import Base64 from 'crypto-js/enc-base64';
import WordArray from 'crypto-js/lib-typedarrays';
import Promise from "../promise"... |
//创建人:FH fh313596790qq(青苔)
jQuery(function()
{
$ = jQuery ;
//templatemo_banner_slide camera function
$('#templatemo_banner_slide > div').camera({
height: 'auto',
loader: 'bar',
playPause: false,
pagination: false,
thumbnails: false,
hover: false,
opac... |
import Quill from "quill";
const Delta = Quill.import("delta");
// Binds autoformat transforms to typing and pasting
export class Autoformat {
constructor(quill, options) {
this.quill = quill;
this.options = options;
this.transforms = options;
this.registerTypeListener();
this.registerPasteLis... |
// @flow
import React, {
Component,
} from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Alert, Platform, Keyboard } from 'react-native';
import _ from 'lodash';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
import { co... |
var fs = require('fs');
var path = require('path');
var URL = require('url');
var toFileUrl = require('./jsdom/utils').toFileUrl;
var defineGetter = require('./jsdom/utils').defineGetter;
var defineSetter = require('./jsdom/utils').defineSetter;
var style = require('./jsdom/level2/style');
var features = require('./js... |
/**
---
It is easy to duplicate any of the methods to and modify them for new API endpoints.
The service requires a few dependencies, which must be installed.
Install:
npm install axios json-bigint --save
// index.js
const Meraki = require('meraki-service');
const meraki = new Meraki('YourAPIKey','https://api.mer... |
/**
* 通用封装仓库
*
* 作者 : GP14
*
* v : 0.0.1
*
* time : 2019/08/06
*
* */
/**
* countDown : 倒计时方法;
* @param {string : "2019/08/10" | array : [2019,8,10] } time * 必填参数;
* @param {string : "date"} [,accuracy] 表示返回的日期经度为天;
*/
function countDown(time , accuracy){
var timer_string = typeof time ... |
var Adapter = require('src/adapter.js');
var bidfactory = require('src/bidfactory.js');
var bidmanager = require('src/bidmanager.js');
var adloader = require('src/adloader.js');
var utils = require('src/utils.js');
var adaptermanager = require('src/adaptermanager');
var StickyAdsTVAdapter = function StickyAdsTVAdapter... |
"use strict";
// Require Node.js Dependencies
const { join } = require("path");
const { mkdtemp, rmdir, access } = require("fs").promises;
const os = require("os");
// Require Third-party Dependencies
const { red, white, yellow, cyan, gray, green } = require("kleur");
const combineAsyncIterators = require("combine-as... |
/******************************************************************************
*
* Copyright (c) 2017, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
import * as d3 from ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var path = require("path");
var fs = require("fs-plus");
var colors = require("colors");
var glob = require("glob");
var Svgo = require("svgo");
var camelcase_1 = require("camelcase");
var rimraf = require("rimr... |
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* @Tenzin
* Description: Component displaying the documents received by the practitioners
* Created: 13 Aug 2018
* Last modified: 17 Oct 2018
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
import Reac... |
/**
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
*/
import {THREE} from "../../../dist/THREEAddPhysics.module.js";
let LegacyJSONLoader = function ( manager ) {
if ( typeof manager === 'boolean' ) {
console.warn( 'THREE.JSONLoader: showStatus parameter has ... |
"use strict";
module.exports = Scope;
var contains = require("lodash/collection/contains");
var traverse = require("./index");
var defaults = require("lodash/object/defaults");
var globals = require("globals");
var flatten = require("lodash/array/flatten");
var extend = require("lodash/object/extend");
var object... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
import React, { useEffect, useState } from "react";
import { useParams, Link } from "react-router-dom";
import loadingLogo from "../assets/loading.gif";
import IndividualGame from "./IndividualGame";
import IndividualPlayer from "./IndividualPlayer";
import defaultImg from "../assets/no-image.png";
const SingleTeam = ... |
const { config, devMode } = require('./config');
const webpack = require('webpack');
const WebpackBar = require('webpackbar');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin');
const TerserJSPlugin = requ... |
const express = require('express'),
{ ensureAuthenticated } = require('../config/auth'),
location = process.cwd() + '/src/website/files/userContent/',
{ UserSchema } = require('../../models'),
fs = require('fs'),
{ company } = require('../../config'),
{ logger, createThumbnail, isFresh } = require('../../utils'),... |
'use strict'
const { xmlbuilder } = require('@sap/cds-foss')
const ExpressionKind = require('../../odata-commons').uri.Expression.ExpressionKind
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'
const SVG_PREFIX = 'svg:'
const X_UNIT = 100
const Y_UNIT = 55
const X_BOX = 85
const Y_BOX = 35
const Y_OFF = 8
const F... |
import React from 'react';
import ReactNative, {
StyleSheet,
TextInput,
Image,
Dimensions,
ToastAndroid,
BackAndroid,
} from 'react-native';
import { connect } from 'react-redux';
import { authenticate, createUser, accessTokenLogin } from '../actions/user';
import SpinningIcon from './SpinningIcon';
impo... |
/**
* ### Модуль сборки *.js по описанию метаданных
* © <NAME> http://www.oknosoft.ru 2014-2016
* @module metadata-prebuild
*/
"use strict";
var through = require('through2');
var path = require('path');
var gutil = require('gulp-util');
var PluginError = gutil.PluginError;
var File = gutil.File;
module.e... |
/* eslint-disable react/prop-types */
import React, { useState, useEffect, useMemo } from 'react';
import { Formik } from 'formik';
import * as Yup from 'yup';
import { toast } from 'react-toastify';
import {
setSeconds,
setMinutes,
setHours,
startOfHour,
addMinutes,
addHours,
getMinutes,
getDayOfYear,
... |
// Copyright (c) 2021 Uber Technologies, 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 rights
// to use, copy, modify, merge... |
import React from "react";
const currentcategory = sessionStorage.getItem("category")
export default function define(runtime, observer) {
const main = runtime.module();
main.variable(observer()).define(["html","drawBubbles"], function*(html,drawBubbles)
{
yield html`
<div id="chart">
<div id="tooltip"
... |
import Timer from './timer.js'
import { AudioPlayer } from './audio.js'
import { VideoPlayer } from './video_player'
import { PLAYLIST, LAST_SONGS_PLAYLIST } from './playlist.js'
import { getNextFont, NUMBER_OF_TEXT_AREA } from './font-list'
import SVGTextAnimate from '../vendors/svg-text-animate-fork/src/svg-text-anim... |
/**
* Copyright 2012-2019, Plotly, 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.
*/
'use strict';
var isNumeric = require('fast-isnumeric');
var Lib = require('../../lib');
var _ = Lib._;
var Axes = require('.... |
/**
# Object Path Methods
Copyright ©2016-2019 <NAME>
> Note that these are low-level methods that `b8r` does not expose.
> `b8r.getByPath` and `b8r.setByPath` are deprecated (use `b8r.set` and `b8r.get` instead).
> See the [Data Registry](?source=source/b8r.registry.js) documentation for more useful information.
... |
import {
PlaneBufferGeometry,
InstancedBufferGeometry,
InstancedBufferAttribute,
Sphere,
Box3,
Vector3
} from 'three'
const GlyphsGeometry = /*#__PURE__*/(() => {
const templateGeometries = {}
function getTemplateGeometry(detail) {
let geom = templateGeometries[detail]
if (!geom)... |
var util = require('./util');
var RTCPeerConnection = require('./adapter').RTCPeerConnection;
var RTCSessionDescription = require('./adapter').RTCSessionDescription;
var RTCIceCandidate = require('./adapter').RTCIceCandidate;
/**
* Manages all negotiations between Peers.
*/
var Negotiator = {
pcs: {
data: {},
... |
var Departures = {
BODY: undefined,
vvoList: undefined,
departureRows: new Array(),
MAX_DEPARTURES_TO_SHOW: 8,
//offsetForTime: -3600000,
offsetForTime: 0,
init: function()
{
Departures.BODY = document.getElementsByTagName("body")[0];
Departures.vvoList = document.getElementsByClassName("wrappe... |
import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';
import { WebView } from 'react-native-webview';
import * as utils from './utils/utils';
import fusonChartsOptions from './utils/options';
export default class ReactNativeFusionCharts extends Component {
constructor(props) {
... |
var CKAN = {};
var isNodeModule = (typeof module !== 'undefined' && module != null && typeof require !== 'undefined');
if (isNodeModule) {
var _ = require('underscore')
, request = require('request')
, queryString = require('query-string')
;
module.exports = CKAN;
}
(function(my) {
my.Client = func... |
import cytoscape from 'cytoscape';
import graphml from "cytoscape-graphml";
import tsv from "../../cytoscape-tsv.js";
import fcose from "cytoscape-fcose";
import coseBilkent from "cytoscape-cose-bilkent";
import cola from "cytoscape-cola";
import layvo from "cytoscape-layvo";
import layoutUtilities from "cytoscape-layo... |
import React from 'react';
import { Button, HireMe } from './Button.js';
import Close from '../images/close-popup.png';
import styled from 'styled-components';
import Colors from '../Colors';
import * as Mixins from '../Mixins';
import { media, mediaMin } from '../MediaQueries';
import { withTheme } from 'styled-compon... |
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
import _extends from "@babel/runtime/helpers/esm/extends";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _typeof from "@babel/runtime/hel... |
'use strict';
const _ = require('lodash');
class AwsCompileStreamEvents {
constructor(serverless) {
this.serverless = serverless;
this.provider = this.serverless.getProvider('aws');
this.hooks = {
'package:compileEvents': this.compileStreamEvents.bind(this),
};
}
isValidStackImport(varia... |
'use strict';
import Element from './Element';
import DOMBuilder from './DOMBuilder';
import PropsReader from './PropsReader';
const {Objects, Seq, Reader} = mojo;
Array.from = (items) => Seq.from(items).toArray(); // TODO - get rid of this
const registeredComponentAdapters = {
};
/**
* The base component class.
... |
let fs = require('../core/fs.js');
let async = require('async');
//var Plugins = require('../core/plugins.js');
var utils = require('../utils/utils.js');
//var Npm = require('../pipeline/npm.js');
//let currentWeb3Version = require('../../package.json').dependencies.web3.replace("^","");
const webpack = require("webpac... |
'use strict';
var React = require('react'),
QuillToolbar = require('./toolbar'),
QuillMixin = require('./mixin'),
T = React.PropTypes;
// Support React 0.11 and 0.12
// FIXME: Remove with React 0.13
if (React.createFactory) {
QuillToolbar = React.createFactory(QuillToolbar);
}
// Support React 0.12 and 0.13+
// ... |
'use strict';
const _ = require('lodash');
const BbPromise = require('bluebird');
const ServerlessError = require('../../../../../../../../classes/Error').ServerlessError;
const defaultApiGatewayLogFormat = [
'requestId: $context.requestId',
'ip: $context.identity.sourceIp',
'caller: $context.identity.caller',
... |
import React, {Component} from 'react';
import '../App.css' ;
import { Link } from 'react-router-dom';
import {connect} from 'react-redux';
import ReactTooltip from 'react-tooltip';
import 'react-rangeslider/lib/index.css';
import AlertModal2 from './AlertModal2';
import { removeFromWatch, removeFromWatch2, watch, logO... |
import FluentError from "./error.js";
// This regex is used to iterate through the beginnings of messages and terms.
// With the /m flag, the ^ matches at the beginning of every line.
const RE_MESSAGE_START = /^(-?[a-zA-Z][a-zA-Z0-9_-]*) *= */mg;
// Both Attributes and Variants are parsed in while loops. These regexe... |
// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of ... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: %hermes -non-strict -O -target=HBC %s | %FileCheck --match-full-lines %s
// RUN: %hermes -non-strict -O -target=HBC -emit-... |
/*
* <<
* wormhole
* ==
* Copyright (C) 2016 - 2017 EDP
* ==
* 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 ... |
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const path = require('path');
const Module = require('module');
const os = require('os');
const process = require('process');
const program = require('commander');
const options = program.opts();
const glob = require('glob');
const markdownlint = require('m... |
"use strict";
/**
* Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author <NAME> <<EMAIL>>
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SymmetryOperator = void 0;
var interpolate_1 = require("../../mol-math/interpolate");
var mol_... |
import React, { useContext, useState, useEffect, useRef } from 'react';
import Avatar from '@material-ui/core/Avatar';
import Button from '@material-ui/core/Button';
import CssBaseline from '@material-ui/core/CssBaseline';
import TextField from '@material-ui/core/TextField';
import Breadcrumbs from '@material-ui/core/B... |
var game;
// main game options
var gameOptions = {
gameWidth: 1000,
gameHeight: 800,
tileSize: 100
};
// current level
var levelNumber = 0;
var isPlayerMoving = false;
// when the window finishes loading...
window.onload = function () {
game = new Phaser.Game(gameOptions.gameWidth, gameOptions.gameH... |
/**
* Encryption
*/
let secret;
function encrypt(key, value) {
let result = '';
for (let i = 0; i < value.length; ++i) {
result += String.fromCharCode(key[i % key.length].charCodeAt(0) ^ value.charCodeAt(i));
}
return result;
}
function decrypt(key, value) {
let result = '';
for (let... |
'use strict';
var
util = require('util'),
path = require('path');
var
Transform = require('stream').Transform,
Promise = require('bluebird');
var
findIndex = require('find-index');
var
logger = require('../../../logger'),
utils = require('../../../utils');
var
log = logger.child({component: 'factor-source-... |
var path = require('path');
var Promise = require('bluebird');
var fs = Promise.promisifyAll(require('fs-extra'));
var spawnAsync = require('child-process-promise').spawn;
var execAsync = require('child-process-promise').exec;
var ArduinoBuilder = function() {};
ArduinoBuilder.prototype.BuildSketch = function(option... |
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: light-gray; icon-glyph: calendar-alt;
const kCalName = "<YOUR_CAL_HERE>";
const kReminderListName = "<YOUR_REMINDER_LIST_HERE>";
const kDayColor = "#c35b22";
const kWeekendColor = "#d19847";
const kMainBackground... |
import { isArrayHasData, UID } from '../../core/util';
import { extendSymbol } from '../../core/util/style';
import Size from '../../geo/Size';
import Geometry from '../../geometry/Geometry';
import Marker from '../../geometry/Marker';
import Label from '../../geometry/Label';
import VectorLayer from '../../layer/Vecto... |
"use strict";
require("core-js/modules/es.symbol");
require("core-js/modules/es.symbol.description");
require("core-js/modules/es.symbol.iterator");
require("core-js/modules/es.array.concat");
require("core-js/modules/es.array.iterator");
require("core-js/modules/es.object.get-own-property-descriptor");
require(... |
//https://github.com/bgrins/TinyColor
var addSwatch = document.getElementById('add-swatch');
var modeToggle = document.getElementById('mode-toggle');
var swatches = document.getElementsByClassName('default-swatches')[0];
var colorIndicator = document.getElementById('color-indicator');
var userSwatches = document.getEl... |
import React from "react";
import * as Api from "./api";
import * as Constant from "./constants";
// History Entity Types
export const BUS = "School Bus";
export const OWNER = "Owner";
export const USER = "User";
export const ROLE = "Role";
export const INSPECTION = "Inspection";
export const CONTACT = "Contact";
//... |
import React, {
cloneElement,
Children,
forwardRef,
useContext,
useMemo,
useState,
} from 'react';
import { ThemeContext } from 'styled-components';
import {
backgroundAndTextColors,
colorIsDark,
normalizeBackground,
normalizeColor,
} from '../../utils';
import { defaultProps } from '../../default-... |
/****************************************************************************
Copyright (c) 2020 <NAME>., Ltd.
https://www.cocos.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-fr... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TCP_transport = exports.getFakeTransport = exports.setFakeTransport = void 0;
/**
* @module node-opcua-transport
*/
const chalk = require("chalk");
const events_1 = require("events");
const node_opcua_assert_1 = require("node... |
const { NanoresourcePromise: Nanoresource } = require('nanoresource-promise/emitter')
const HypercoreProtocol = require('hypercore-protocol')
const hyperswarm = require('hyperswarm')
const codecs = require('codecs')
const pump = require('pump')
const maybe = require('call-me-maybe')
const STREAM_PEER = Symbol('network... |
import parseLabelValue from './utils/parse-label-value';
const getMaxZoomLevel = (width, height) =>
{
const largestDimension = Math.max(width, height);
if (largestDimension < 128)
return 0;
return Math.ceil(Math.log((largestDimension + 1) / (256 + 1)) / Math.log(2));
};
const incorporateZoom = (i... |
var browser = browser || chrome;
var timer;
var mutationObserver = new MutationObserver(function(mutations) {
for (var mutation of mutations)
{
if (mutation.target == undefined)
continue;
if (typeof(mutation.target.querySelectorAll) != 'function')
continue;
if ($('.edit-container-inner')... |
// Stores an argument given to insertElement
class SchedEntity {
constructor(value, color) {
this.value = value;
this.color = color;
}
}
// The current line of execution is halted, but the screen is still responsive
// to user input.
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ... |
/**
* Private ModalManager helper
* Handles controlling modal stacking zIndexes and body adjustments/classes
*/
import Vue from '../../../utils/vue';
import { getAttr, hasAttr, removeAttr, setAttr, addClass, removeClass, getBCR, getCS, selectAll, requestAF } from '../../../utils/dom';
import { isBrowser } from '../.... |
// Load modules
var Fs = require('fs');
var Path = require('path');
var Boom = require('boom');
var Hoek = require('hoek');
var Joi = require('joi');
// Additional helper modules required in constructor
// Declare internals
var internals = {};
internals.defaults = {
// defaultExtension: '',
// path: '',
... |
/*
* grunt-contrib-qunit
* http://gruntjs.com/
*
* Copyright (c) 2013 "Cowboy" <NAME>, contributors
* Licensed under the MIT license.
*/
'use strict';
var request = require("request");
var monkeytestjs = function(grunt) {
// Nodejs libs.
var path = require('path');
// External lib.
var phantomjs = re... |
// run like so:
// mocha -R spec Craziness/yep.js
// ===============================================================================
// HUGE DISCLAIMER AND WARNING:
// Don't be an interview jerk and ask questions like "What does {} + [] returns?".
// That's just mean.
// ==============================================... |
const PIPI = 2 * Math.PI
function makePt (x, y) {
return {
x: x,
y: y
}
}
function addOffset (pt, offset) {
return {
x: pt.x + offset.x,
y: pt.y + offset.y
}
}
function sleep (ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
// Meter provides basic drawing and math utilities ... |
import React, { useState, useEffect } from 'react';
import { connect } from 'react-redux';
import { useParams } from 'react-router-dom';
import Title from '../../../Components/Masterclass/CreateMasterclass/Title';
import Category from '../../../Components/Masterclass/CreateMasterclass/Category';
import Info from '../.... |
'use strict';
const _ = require('lodash');
class KinesisStream {
constructor(stream, defaults) {
this.stream = stream;
this.defaults = defaults;
this.stream.cleanName = this.__sanitizeName(this.stream.name);
this.config = _.merge(
{
retention: 24,
... |
/*
AppController.js
Copyright (c) 2014-2022 <NAME>, et al
Released under the MIT License
*/
import { make, exists, getIpc } from "./Utils.js";
import { UIAlert } from "./UIAlert.js";
import { UIUpdateNotify } from "./UIUpdateNotify.js";
import { AutoUpdateController } from "./AutoUpdateController.js";
import { op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.