text stringlengths 3.22k 29.5k |
|---|
const chalk = require('chalk')
const fs = require('fs')
var start = new Date().getTime();
let args = process.argv.slice(2);
let pathToFile = args[0]
let debug = false
if (args[1] === 'debug')
debug = true
let outputName = pathToFile.split("/");
outputName = outputName[outputName.length-1]
outputName = outputName.rep... |
import React, {
useState,
useMemo,
useRef,
useEffect,
Fragment,
useLayoutEffect
} from 'react';
import { useWorker } from 'react-hooks-worker';
import { navigate, Link } from '@reach/router';
import Hotkeys from 'react-hot-keys';
import {
formatSearchResponse,
getSelectedNamespace,
formatSearchComman... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _head = _interopRequireDefault(require("ramda/src/head"));
var _last = _interopRequireDefault(require("ramda/src/last"));
var _curry = _interopRequireDefault(require("ramda/src/curry"));
function _interopRe... |
const semver = require('semver')
const packageJson = require('../../../package.json')
const {
sanitisePackageJson,
semverToVersion,
getMaxSemver,
inferPackageVersion,
addDevDependencies,
isPackageInstalled,
getPackagesToInstall
} = require('../../../scripts/lib/package-utils')
const { expect } = require('... |
import React, { Component } from "react";
import { withStyles } from "@material-ui/core/styles";
import axios from "axios";
import Typography from "@material-ui/core/Typography";
import FormControl from "@material-ui/core/FormControl";
import InputLabel from "@material-ui/core/InputLabel";
import Select from "@material... |
var util = require('util');
var assert = require('assert');
var defineClass = require('library/class/defineClass.js');
var Class = require('library/class/Class.js');
var DirectoryReader = require('./DirectoryReader.js');
var SegmentInfos = require('./SegmentInfos.js');
var SegmentReader = require('./SegmentReader.js');... |
$(function () {
$("#jqGrid").jqGrid({
url: '../trashtab/list',
datatype: "json",
colModel: [
// 隐藏主键
{ label: '主键id', name: 'id', width: 50, key: true ,hidden : true },
{ label: '路段名', name: 'street', width: 80 , formatter: function(value, options, row){
return $.isPlainObjec... |
var snake;
var apple;
var snakeGame;
window.onload = function(){
snakeGame = new snakeGame(900,600,30,100)
snake = new Snake([[6,4], [5,4], [4,4], [3,4], [2,4]], "right");
apple = new Apple([10,10]);
snakeGame.init(snake,apple);
}
document.onkeydown = function handleKeyDown(e){
var key = e.keyCode;
var new... |
'use strict';
var util = require('crypto-lib').util;
//
// Controller
//
var WriteCtrl = function($scope, $window, $filter, $q, appConfig, auth, keychain, pgp, email, outbox, dialog, axe, status, invitation) {
var str = appConfig.string;
var cfg = appConfig.config;
// set default value so that the popo... |
import { Tree } from './Tree.js';
import { Panel } from './Panel.js';
import { ExpertAlien } from './ExpertAlien.js';
import { HelpBubble } from './HelpBubble.js';
var numsToInsert;
var tasks;
var singleTon;
var panel;
var expert;
var controls;
var data;
var keyF;
var spacebar;
const node_77 = {x:880, y:813, name: "no... |
import Vue from 'vue'
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const messages = {
en: {
home: "Home",
about: "About me",
ownSentence : "There are two kinds of professionals; Those who are preparing to obtain a better job and we are ready to change the world.",
name: "Name",
citizen: "Citizen",
age... |
var GameSettings = {
width: 20,
height: 20,
solidWalls: false,
apple_pos: {left: 2, top: 2},
forceQuit: false,
speed: 300,
}
function sliderInput(input, outputId){
document.getElementById(outputId).innerHTML = input;
}
function applySettings(settings){
settings.width = parseInt(d... |
// shortcut
function $(id) {
return document.getElementById(id);
}
// createElements
function div(loc) {
var x = document.createElement("div");
loc.appendChild(x);
return x;
}
function input(loc,_placeholder = "") {
var x = document.createElement("input");
x.autocomplete = "off";
x.type = ... |
"use strict";
const events = require( 'events' );
const jsonGate = require( 'json-gate' );
const pem = require( './pem.js' );
const time = require( './time.js' );
const DefinitionSink = require( './definition-sink.js' );
const HormoneSink = require( './hormone-sink.js' );
// The hormone names must not start or end ... |
'use strict';
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const koa = require('koa');
const serve = require('koa-static');
const cors = require('kcors');
const open = require('opn');
const chalk = require('chalk');
const artTemplate = require('art-template')... |
/**
* Implement texture asset type.
*
* |-- copyright and license --|
* @package Shaku
* @file shaku\lib\assets\texture_asset.js
* @author <NAME> (<EMAIL> | http://ronenness.com)
* @copyright (c) 2021 <NAME>
* @license MIT
* |-- end copyright and license --|
*
*/
'use strict';
const Asset ... |
import algolia from 'algoliasearch/lite';
import algoliaHelper from 'algoliasearch-helper';
import { version } from '../package.json';
import {
serialize as serializeHelper,
deserialize as deserializeHelper,
} from './helper-serializer';
import sanitizeResults from './sanitize-results';
export const FACET_AND = '... |
/* global window, document */
// Dependencies
import { forwardRef, useEffect, useImperativeHandle } from 'react';
import PropTypes from 'prop-types';
// Helper
import { isValidString } from './utils/helper';
import { loadScript } from './utils/widget';
const TawkMessenger = forwardRef((props, ref) => {
useEffect(()... |
import React from "react";
import clsx from "clsx";
import { makeStyles, useTheme } from "@material-ui/core/styles";
import Drawer from "@material-ui/core/Drawer";
import CssBaseline from "@material-ui/core/CssBaseline";
import AppBar from "@material-ui/core/AppBar";
import Toolbar from "@material-ui/core/Toolbar";
imp... |
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
// Since this code will be running in the Cloud Functions enviornment
// we call initialize Firestore without any arguments because it
// detects authentication from the environment.
const firestore = admi... |
$(function () {
//弹出添加新地址的弹框
$(".btn-add-addr").click(function () {
$(".pop-default").css("display", "block");
});
//关闭新地址的弹框
$(".pop-close").click(function () {
$(".pop-default").css("display", "none");
});
//验证收货人
$("input[name=receiver]").blur(function () {
... |
import { timeParse } from 'd3-time-format'
import { scaleLinear, scaleOrdinal } from 'd3-scale'
import { min, max } from 'd3-array'
import { createTextGauger } from '../../lib/textGauger'
import {
calculateAxis,
subsup,
runSort,
groupBy,
deduplicate,
unsafeDatumFn
} from './utils'
import {
sansSerifMed... |
// layerLists.js
// Manage the layer lists.
import React from 'react';
import { render } from 'react-dom';
import Layer from '/imports/mapPage/longlist/Layer.js';
import rx from '/imports/common/rx.js';
import Select22 from '/imports/component/Select22.js';
import sort from '/imports/mapPage/longlist/sort.js';
// How... |
var elements = require('../gameClient/scripts/elements.js');
var cfg = require('../config.js');
function Tracker(){
}
Tracker.prototype.checkPlayerRequirements = function(player, check){
// Cancel if immunity
if(player.buffs.immunity !== undefined)
return false;
// Cancel if cooldown
... |
const index = {
title: '供应商档案',
active: ['未激活', '已激活', '已失效'],
search: {
config: {
search: '搜索',
more: '更多',
less: '简化',
reset: '重置'
},
filters: [
{key: 'supplierCode', title: '供应商代码', type: 'text'},
{key: 'supplierName', title: '中文名称', type: 'text'},
{key: 'a... |
$(document).ready(function () {
$("#file-change-logo").on('change', function() {
var file = this.files[0];
var reader = new FileReader();
reader.onload = function(){
var srcBase64 = reader.result;
frappe.ajax({
type: "POST",
url: `/api/method/erpx_hrm.utils.company.upload_company_logo`,
no_str... |
import {assert} from '@webex/test-helper-chai';
import testUtils from './testUtils';
require('dotenv').config();
const sparkTestUsers = require('./sparkTestUsers');
let userSet, alice, bob, chris;
// TODO: Merge all the test it sections into one
describe('plugin-meeting', () => {
before(() => sparkTestUsers.gen... |
$.fn.extend({
insertAtCursor : function(myValue) {
var $t = $(this)[0];
if (document.selection) {
this.focus();
sel = document.selection.createRange();
sel.text = myValue;
this.focus();
} else if ($t.selection... |
import * as PIXI from 'pixi.js';
import GameObject from './components/game-object';
import GameCharacter from './components/game-character';
import GameAttack from './components/game-attack';
import GameUI from './game-ui';
import ObservablePoint from './observable/point';
import TextTooltip from './tooltips/text-tool... |
var _ = require('underscore');
var Backbone = require('backbone');
var utils = require('../../../../mixins/utilities');
var UIConfig = require('../../../../config/ui.json');
var async = require('async');
var jqIframe = require('blueimp-file-upload/js/jquery.iframe-transport');
var jqFU = require('blueimp-file-upload/js... |
// Added extra lines to test how dynamic the code is.
// You can add as many lines as you want with as many stations as you want
// as long as each array has 'Union Square' somewhere in the array.
var lines = {
N: ["Times Square", "34th", "28th", "23rd", "Union Square", "8th"],
L: ["8th", "6th", "Union Square", "3r... |
/**
* 自定义网站配置
*/
const config = {
title: "AHAI Nav", //website title
subtitle: "AHAI's Index", //website subtitle
logo_icon: "globe", //select your logo by semantic-ui icon (you can get more info at:https://semantic-ui.com/elements/icon.html)
hitokoto: true, //use hitokoto... |
/*
* == BSD2 LICENSE ==
* Copyright (c) 2015, Tidepool Project
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
* This program ... |
import {APPEND, PREPEND, ALIGN} from "../consts";
import {getStyleNames, assignOptions, fill} from "../utils";
// ALIGN
const {START, CENTER, END, JUSTIFY} = ALIGN;
/**
* @classdesc The GridLayout is a layout that stacks cards with the same width as a stack of bricks. Adjust the width of all images to the same size... |
'use strict';
const url = require('url');
const querystring = require('querystring');
const _ = require('lodash');
const Boom = require('boom');
const JSON_API_KEYS = ['id', 'type', 'relationships', 'meta', 'links'];
// options.bus - Object *required*
// options.baseUrlPrefix - String ex: "/v2".
// options.allowPart... |
import React, {Component} from 'react';
import styled from '@emotion/styled';
import {css} from 'emotion';
import {noop} from 'lodash';
import PropTypes from '../../../utils/propTypes';
import {match, parse} from './utils/autosuggest-highlight';
import {ice} from '../../../variables/colors';
import {fontNormal} from... |
/**
*
* FailList
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Helmet } from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import { createStructuredSelector } from 'reselect';
import { compose } from 'redux';
import { take, call... |
// const Message = require('./db/models/GameChat/message')
// const Channel = require('./db/models/GameChat/channel')
// const { fire } = require('../util')
const randomName = ['Fritter', 'Fizband', 'JollyGreenDwarf', 'MeatShield', 'Come\'on?', 'Buckethead', 'Capt<NAME>eland', 'American Eagle', 'Moo Soup', 'Blue Whale'... |
import React from "react";
import {
ActivityIndicator,
StyleSheet,
Image,
Text,
View,
Dimensions,
PanResponder,
Button,
ScrollView,
TextInput,
TouchableOpacity
} from "react-native";
import { bindActionCreators } from "redux";
import { connect } from "react-redux";
import {
widthPercentageToDP a... |
const fs = require('fs');
const Int64LE = require("int64-buffer").Int64LE;
const UInt64LE = require("int64-buffer").Uint64LE;
export default class GFF {
constructor(filename = null) {
this.filename = filename;
this.fd = null;
this.header = null;
this.root = null;
if (this.filename) {
this.load();
}
}
... |
// ......................................................... fonctions ......................................................... //
//afficher warning "pb réseau "
function warning(){
noLoading.style.display = 'block' ;
}
//ne pas afficher warning
function noWarning(){
noLoading.style.display = 'none' ;
}
// ... |
'use strict'
var C = require('./constants.js')
var Dynamite = require('./dynamite.js')
var Flame = require('./flame.js')
var Goal = require('./goal.js')
class Player {
constructor(id, pos) {
this.id = id
this.type = 'player'
this.pos = pos
this.dx = 0
this.dy = 0
this.hp = C.PLAYER_HP
this.goals = 0
... |
/*
frida-fuzzer - frida agent instrumentation
------------------------------------------
Written and maintained by <NAME> <<EMAIL>>
Based on American Fuzzy Lop by <NAME>
Copyright 2019 <NAME>. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use t... |
/*
A script that will sign and broadcast an ethereum transaction to the network, then shows the result in the console.
WARNING!
If executed this script will send ether, be sure the info is correct before you run this!
Alternatively you should use a test net with test ether first before running this on the main net.... |
/**
* only p5 stuff
*/
import urlA from '../../images/alphabets/A.png';
import urlB from '../../images/alphabets/B.png';
import urlC from '../../images/alphabets/C.png';
import urlD from '../../images/alphabets/D.png';
import urlE from '../../images/alphabets/E.png';
import urlF from '../../images/alphabets/F.png';
i... |
var authorizationsArr = []; // add authorizations
var authorizationUpdateArr = []; // get authorizations of the ontology
var authorizationsIds = []; // get authorizations ids for actions
var authorizationObj = {}; // object to receive authorizations responses.
var DashboardsCreateController = function() {
... |
function convertChapterToXML(chapterNumber, subChapterNumber, isTwoLevel, chaptersXMLFile) {
let enclosingTag;
if(chapterNumber === 0) enclosingTag = "about";
else enclosingTag = subChapterNumber === 0 ? "chapter" : "subchapter";
chapterXML = loadChapterInfoFromInputsToXML(enclosingTag, chapterNumber, subChapt... |
'use strict'; // eslint-disable-line
const async = require('async');
const crypto = require('crypto');
const path = require('path');
const zookeeper = require('node-zookeeper-client');
const Logger = require('werelogs').Logger;
function _genRandomHexChars(len) {
return crypto.randomBytes(Math.ceil(len / 2))
... |
/*
_____
/ ____| /\
| | ___ _ __ ___ _ __ __ _ _ __ ___ / \ _ __ _ __ __ _ _ _ ___
| | / _ \| '_ ` _ \| '_ \ / _` | '__/ _ \ / /\ \ | '__| '__/ _` | | | / _... |
/**
* Google Maps Viewer
*
* @author <NAME> <https://github.com/doishub>
* @version 0.0.10
* @licence https://github.com/doishub/google-maps-viewer/blob/master/LICENSE
*/
var GoogleMapsViewer = (function () {
'use strict';
var Constructor = function (mapId, settings) {
var pub = {};
var ... |
const v8Util = process.atomBinding('v8_util')
const {ipcRenderer, isPromise} = require('electron')
const resolvePromise = Promise.resolve.bind(Promise)
const bufferUtils = require('../common/buffer-utils')
const remoteObjectCache = v8Util.createIDWeakMap()
// An unique ID that can represent current context.
const co... |
var path = require('path');
require.paths.unshift(path.join(__dirname, 'vendor'),
path.join(__dirname, 'journey'));
var sys = require("sys"),
http = require("http"),
events = require('events'),
fs = require("fs"),
url = require('url');
var querystring = require('querystring');
// ... |
import React from "react";
import { withGoogleMap, GoogleMap, withScriptjs, Marker } from "react-google-maps";
import MapDirectionsRenderer from './MapDirection.js';
import LocationSearchInput from './SearchBar.js';
import DestinationList from './DestinationList.js';
import SimpleDialogDemo from './AlertBox.js';
import... |
import React, { Component } from "react";
import DatePicker from "react-datepicker";
import Nav from "./Nav.js";
import Graph from "./graph.js";
import "react-datepicker/dist/react-datepicker.css";
import axios from "axios";
import styles from "../Styling/Grid.css";
import moment from "moment";
import Modal from "./Mod... |
import React, { useState, useContext } from "react";
import {
StyleSheet,
View,
Image,
TouchableOpacity,
KeyboardAvoidingView,
SafeAreaView,
Platform,
Keyboard,
TouchableWithoutFeedback,
Dimensions,
TextInput,
} from "react-native";
import { Picker } from "@react-native-picker/picker";
import { B... |
'use strict';
// Depends on model.js
function importDocuments() {
var container = document.getElementById("content-container");
var importedSplashHeader = document.querySelector('link#splash_and_header-link').import;
insertImportedElement(container, importedSplashHeader.querySelector('.header'));
// TODO... |
/* eslint-disable no-unused-vars */
import React, { Component } from 'react';
import {
Alert,
Badge,
Button,
ButtonGroup,
ButtonToolbar,
Col,
FormGroup,
Glyphicon,
Grid,
Label,
PageHeader,
Row,
} from 'react-bootstrap';
import {
CLUB_ALREADY_EXISTS,
CLUB_UPDATED,... |
import { useQuery, useMutation } from '@apollo/react-hooks'
import { utils as coinUtils } from '@lamassu/coins'
import { Box, Dialog, DialogContent, DialogActions } from '@material-ui/core'
import Grid from '@material-ui/core/Grid'
import { makeStyles } from '@material-ui/core/styles'
import gql from 'graphql-tag'
impo... |
import React from 'react';
import Alert from 'react-bootstrap/lib/Alert.js';
import metadataProvider from '../../lib/metadataProvider.js';
import MetaFormGroup from '../groupComponents/MetaFormGroup.js';
import GlyphButton from '../GlyphButton.js';
import Glyphicon from 'react-bootstrap/lib/Glyphicon.js';
import Dropdo... |
import EventEmitter from 'events';
import Models from '../models/index';
import getConnection from '../utils/getConnection';
import getDefaults from '../utils/getDefaults';
const amazonJobHandler = new EventEmitter();
amazonJobHandler.on('start', (event) => {
if (!amazonJobHandler.isActive) {
amazonJobHandler.... |
const {
Game,
AUTO,
Timer,
Point,
Physics,
Keyboard
} = Phaser;
const game = new Game(800, 600, AUTO, "", { preload: preload, create: create, update: update });
let spaceship, bullet, bullets, asteroids = [];
let bulletTime = 0;
let level = 1;
let textAcc = null;
let gameOverObj = {
mode: "disabled",
... |
/* global module require */
const ugs = require('./ultimate-guitar-scraper/lib/index.js');
const fs = require('fs');
const request = require('request');
const cheerio = require('cheerio');
const debug = true;
const noteToIndex = {
'A': 1,
'A#': 2, 'Bb': 2,
'B': 3,
'C': 4,
'C#': 5 , 'Db': 5,
... |
import 'babel-polyfill';
import path from 'path';
import debug from 'debug';
import Koa from 'koa';
import logger from 'koa-logger';
import Router from 'koa-router';
import koaStatic from 'koa-static';
import koaMount from 'koa-mount';
import convert from 'koa-convert';
import bodyparser from 'koa-bodyparser';
import ... |
/**
* 图片压缩,默认同比例压缩
* @param {file} file
* @param {Object} obj
* obj 对象 有 width, height, quality(0-1)
* @param {Object} callback
* 回调函数有一个参数,base64的字符串数据
*/
// function resize (file, obj = {width: 512, height: 512, quality: 0.5}) {
// let pm = new Promise((resolve, reject) => {
// var fr = new FileReader()... |
document.addEventListener("deviceready", onDeviceReady, false);
var db = window.openDatabase("gastos", "1.0", "local database", 200000); //will create database Dummy_DB or open it
var results=0;
//function will be called when device ready
function onDeviceReady(){
db.transaction(populateDB, errorCB, ... |
import { elemenetGetId, elemenetGetClass, body } from '../main/function.js'
function weatherGet(city, day) {
var httpRequest = new XMLHttpRequest();
day = day - 1;
function dayTo(str) {
return str.match(/\(([^)]*)\)/);
}
function dayTo2(str) {
return str.split(/\(.*?\)/);
}
... |
import {Col, Row} from "react-bootstrap";
import Button from "react-bootstrap/Button";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faArrowLeft, faArrowRight, faChevronLeft, faChevronRight} from "@fortawesome/free-solid-svg-icons";
import React, {useContext, useEffect, useState} from "react";... |
import { List,Map,Record,Set } from 'immutable';
import { buildClientSchema } from '../../node_modules/graphql/utilities/buildClientSchema';
import { parse as gqlParse } from '../../node_modules/graphql/language/parser';
import { print } from '../../node_modules/graphql/language/printer';
import { validate } from '../.... |
var cxG4K = 0;
var Qr1x = 8;
var document = {
location: {
"ancestorOrigins": {},
"href": "https://music.163.com/#/song?id=1900998233",
"origin": "https://music.163.com",
"protocol": "https:",
"host": "music.163.com",
"hostname": "music.163.com",
"port": "",
... |
/**
* @file 任务详情
* @author jinzhan, Lohoyo
*/
import Component from '@lib/san-component';
import {Terminal} from 'xterm';
import {FitAddon} from 'xterm-addon-fit';
import {WebLinksAddon} from 'xterm-addon-web-links';
import ClientAddon from '../client-addon/client-addon';
import PromptsList from '../prompts-form/pr... |
var loc = require("locale");
var waypoints = require("Storage").readJSON("waypoints.json")||[{name:"NONE"}];
var wp = waypoints[0];
var wp_bearing = 0;
var candraw = true;
var direction = 0;
var dist = 0;
var savedfix;
var previous = {
dst: '',
wp_name: '',
course: 180,
selected: false,
};
/*** Drawing ***... |
/*global d3*/
/*global ws*/
var activeSubject = "";
var sentimentTweets = {};
var sentimentStats = {};
var sentimentChart;
function addSubject(id, screen_name_en, picture, keywords, startTimestamp) {
var subject = {
identifier: id,
displayname: screen_name_en,
description: "",
pictureURL: pi... |
import React from "react";
import { ResponsiveBar } from "@nivo/bar";
import axios from "axios";
import theme from "../../../Constants/Theme";
class DestinationCountryChart extends React.Component {
constructor(props) {
super(props);
this.state = {
users: [],
totalCount: 0,
... |
const fs = require('fs').promises;
const { strict: assert } = require('assert');
const OBJFile = require('obj-file-parser');
const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const prettier = require('prettier');
const { parse } = require('svg-parser');
/**
* Parse a material setting... |
const osmosis = require("osmosis");
const sbd = require("sbd");
const syllable = require("syllable");
const pos = require("pos");
const lexer = new pos.Lexer();
const tagger = new pos.Tagger();
const rhyme = require("rhyme");
const fs = require("fs");
const filePath = "poem/SW_EpisodeIV.txt";
function getRandomElem... |
var fs = require('fs');
var csv = require('fast-csv');
var BigNumber = require('bignumber.js');
var common = require('./common/common_functions');
var global = require('./common/global');
/////////////////////////////ARTIFACTS//////////////////////////////////////////
var contracts = require('./helpers/contract_addres... |
import moment from 'moment';
//-- Variables -----//
//-- Constructor -----//
function MergeHotGridList(gridHeader, model, isDataObj) {
//if ( gridHeader.constructor.name == "GridHeader" ) //에러처리
this.offsetRow = gridHeader.depth+1;
this.colInfos = gridHeader.colInfos;
this.values = [];
this.model ... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
const CONFIG_NAME = 'form-config:v1';
function resetSpawnForm() {
document.getElementById('spawn_form').reset();
setSimplePartition(window.SLURM_DATA.default_partition);
}
function setVisible(element, visible) {
if (visible) {
element.removeAttribute('hidden');
} else {
element.setAttribute('hidden', ... |
import { Box, Button, Grid, TextField } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import ShoppingCartIcon from '@material-ui/icons/ShoppingCart';
import { Alert } from '@material-ui/lab';
import { unwrapResult } from '@re... |
import React, { useState, useEffect } from "react";
import { graphql } from 'gatsby'
import PropTypes from "prop-types"
import { Link } from "gatsby"
import Layout from "../components/layout";
import SEO from "../components/seo";
import Header from "../components/header";
import exterior from "../images/exterior.png"
i... |
import '../env'
import url from 'url'
import Twit from 'twit'
import log from './logger'
import { timer } from './utils'
import TwitterV2 from 'twitter-v2'
import emojiRegex from 'emoji-regex'
import { AllHtmlEntities } from 'html-entities'
import { flatten, EVERYTHING } from 'flatten-tweet'
const emojiMatch = emojiRe... |
import { create, useTheme, Label, color, Slider, ease, ColorSet, Image, Button, Sprite } from '@amcharts/amcharts4/core'
import { projections, MapChart, MapPolygonSeries } from '@amcharts/amcharts4/maps'
import { parties } from '@scbd/am4-map-base/src/config/parties'
import am4theme... |
/**
* Data Structure
* prices: [{
* name: 'BTC/ETH',
* current: 0.32522334612,
* unit: 'ETH',
* low: 0.273295272,
* high: 0.35235235,
* vol: 3252.1,
* change: 0.2352,
* fix: 5,
* }]
*/
import Decimal from 'decimal.js-light';
import QUERY, { fetch } from './querys';
import { message } from '.... |
// var music = new buzz.sound("/audio/background", {
// formats: [ "mp3", "ogg" ],
// preload: true,
// autoplay: false,
// loop: true
// });
// var musicTime = 4.55;
var levels = [
[new Music('jungle', 120), JungleTransition],
[new Music('dub', 120), DubTransition]
];
// Load first level's music
levels[0][0].lo... |
/* globals
PIXI,
foundry,
Ray,
ClockwiseSweepPolygon,
*/
"use strict";
import { distanceSquared } from "./utilities.js";
/*
Intersect or union a polygon with a circle without immediately converting circle to a polygon.
Steps to find the points of a polygon representing the intersect or union:
- For each step below,... |
/* global google:false*/
class ScoreController {
constructor(_, NgMap, toastr, $interval, $state, $window, $timeout, $scope, $log, AudioService, SocketService, GameService, ScoreService, mapsKey) {
'ngInject';
this._ = _;
this.$log = $log;
this.toastr = toastr;
this.$state = $state;
this.$win... |
// single line comment
/*
multi
line
comment
*/
/**
* documentation comment
*/
"use strict"; // directive that tells the compiler to enforce type assignments and other syntax rules that are usually "loose"
/*
JavaScript is a loosely-typed language, not untyped!
Primitive types:
... |
/*
* The copyright in this software is being made available under the BSD License, included below. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license.
*
* Copyright (c) 2013, Digital Primates
* All rights reserved.
*
... |
/*
Copyright 2019 <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, softwa... |
"use strict";
var path = require("path");
var fs = require("fs");
var os = require("os");
var dotenv = require("dotenv");
var minimist = require("minimist");
var mkdirp = require("mkdirp");
var recursiveReadDir = require("recursive-readdir-sync");
var terser = require("terser");
var remap = require("./index.js");
v... |
import _ from 'lodash';
const CourseDateUtils = {
validationRegex() {
// Matches YYYY-MM-DD
return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;
},
isDateValid(date) {
return /^20\d{2}-\d{2}-\d{2}/.test(date) && moment(date).isValid();
},
formattedDateTime(datetime, showTime = false) {... |
import './Menu.js';
import { deepContains, elementsFromPoint, indexOfItemContainingTarget } from './utilities.js';
import { merge } from './updates.js';
import * as symbols from './symbols.js';
import PopupSource from './PopupSource.js';
const menuTagKey = Symbol('menuTag');
const documentMouseupListenerKey = Symbol('... |
// const MOCK = true;
const MOCK = (location.href.search('localhost') != -1 ||
location.href.search('127.0.0') != -1);
let websocketsConn;
let stopRequested = false;
const gamma = 2.2;
const invGamma = 1 / gamma;
let addOutLine_impl;
$(function () {
if (typeof (addOutLine) !== "undefined") {
addOutLine_... |
'use strict'
/**
* Module dependencies.
*/
const { fs, path, logger, chalk } = require('@vuepress/shared-utils')
/**
* Expose createBaseConfig method.
*/
module.exports = function createBaseConfig ({
siteConfig,
sourceDir,
outDir,
base: publicPath,
themePath,
markdown,
tempPath,
cliOptions: {
... |
import $ from 'dom7';
import Utils from '../../utils/utils';
import Support from '../../utils/support';
import Framework7Class from '../../utils/class';
class Tooltip extends Framework7Class {
constructor(app, params = {}) {
super(app, params);
const tooltip = this;
const defaults = Utils.extend({}, ap... |
/**
* Module, which is responsible for code editor based on very powerful Monaco editor
* component.
*
* @author flatline
*/
import React from 'react';
import ReactDOM from 'react-dom';
import './Code.scss';
import {ControlledEditor} from '@monaco-editor/react';
import { monaco } from '@monaco-editor/react';
imp... |
import _ from 'lodash';
import fs from 'fs';
import path from 'path';
import { ImageElement } from 'appium-base-driver';
import { imageFromScreenshot, getCanvasByRect, canvasFromImageData,
elementImageFromScreenshot } from './image';
import { asyncmap, retry } from 'asyncbox';
import labels from './labels';
import * ... |
//
// Copyright [2020] [<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 i... |
const regl = require('regl')({extensions: ['OES_texture_float'], pixelRatio: 1});
const intersect = require('ray-plane-intersection');
const length = require('gl-vec3/length');
const subtract = require('gl-vec3/subtract');
const gpu = require('./utils')(regl);
const shape = [150, 150];
const size = [40, 40];
const dx =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.