text
stringlengths
3.07k
16k
/** * @license * Copyright 2018 Google LLC. 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 required by a...
/* Move Counter is initally set 0 * Initally the number of chances provided is 3 * DOM selecter to read and update the chances counter */ var moveCounter = 0; var move = document.getElementById('moves'); var chance = 3; var ch = document.getElementById('chances'); ch.innerHTML = chance; // Enemies Function var En...
import { bindAll, isUndefined, debounce } from 'underscore'; import { View } from '../../common'; import { isObject } from '../../utils/mixins'; const clearProp = 'data-clear-style'; export default class Property extends View { template() { const { pfx, ppfx } = this; return ` <div class="${pfx}label"...
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b)...
import React from "react"; import Header from "./Header"; import Footer from "./Footer"; import Container from "./Loading"; import { withStyles, makeStyles } from "@material-ui/core/styles"; import Table from "@material-ui/core/Table"; import Checkbox from "@material-ui/core/Checkbox"; import Button from "@material-ui/...
/* eslint-disable */ const crypto = require('crypto'); const axios = require('axios'); const querystring = require('querystring'); /* SPARCS SSO V2 Client for NodeJS Version 1.0 (verified) Made by SPARCS SSO Team - appleseed Dependencies: node ^10, axios ^0.18 */ class Client { constructor(clientId, secretKey, isBet...
/* Math Kit Copyright (c) 2014 - 2019 <NAME> The MIT License (MIT) 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, cop...
import crypto from 'crypto'; import R from 'ramda' import util from 'util' import l from '../../common/logger' // the UI often extracts the address, chops off the first 2 (usually 0x), and shows first and last 3 const HIDDEN_TEXT = 'did:none:HIDDEN' // if you change this, edit uport-demo/src/utilities/claims.js const ...
/** * Copyright 2013 the PM2 project authors. All rights reserved. * Use of this source code is governed by a license that * can be found in the LICENSE file. */ var vizion = require('vizion'); var cst = require('../constants.js'); var eachLimit = require('async/eachLimit'); var debug = require('debug'...
import firebase from "firebase/app"; import "firebase/auth"; import { database, auth, f } from '../firebase' import AsyncStorage from "@react-native-async-storage/async-storage"; import { GoogleSignin, statusCodes, } from '@react-native-google-signin/google-signin'; export const SIGNUP = 'SIGNUP'; export cons...
import { layoutGroup, bookCategory, freeBook } from '../../utils/httpOpt/api' import tool from '../../utils/util' import { logoutTap2 } from "../../utils/login"; const app = getApp() let pageNo = 1 Page({ data: { colorStyle: app.sysInfo.colorStyle, backgroundColor: app.sysInfo.backgroundColor, screen: app...
// The MIT License (MIT) // // Copyright (c) 2014-2020 Camptocamp SA // // 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 // u...
import some from 'lodash/some' import mergeWith from 'lodash/mergeWith' import isFunction from 'lodash/isFunction' import isUndefined from 'lodash/isUndefined' import defaults from 'lodash/defaults' import map from 'lodash/map' import get from 'lodash/get' import uniq from 'lodash/uniq' import toPath from 'lodash/toPat...
/** @format */ const prio = settings.cqpPrio || ["deprel", "pos", "msd", "suffix", "prefix", "grundform", "lemgram", "saldo", "word"] const parseDateInterval = function (op, val, expanded_format) { let out val = _.invokeMap(val, "toString") if (!expanded_format) { return `$date_interval ${op} '${v...
// Core import React, { useState } from "react"; import axios from "axios"; import { Avatar, Input, Tooltip, Space } from "antd"; import { useSelector } from "react-redux"; import styled from "styled-components"; import { Link } from "react-router-dom"; import { useTranslation } from "react-i18next"; // Local import A...
/*global jQuery*/ ;(function($){ 'use strict'; var defaults = { tabSelector: 'li', // qualified within `this` panelSelector: '.panels li', // qualified within document activeClass: 'active', // also used for finding the initially active panel inactiveClass: null, panelShow: function (panel) { ...
const core = require("@actions/core"); const { ShortcutClient } = require("@useshortcut/client"); const ESCAPE = { ">": "&gt;", "<": "&lt;", "&": "&amp;", "\r\n": " ", "\n": " ", "\r": " ", }; const ESPACE_REGEX = new RegExp(Object.keys(ESCAPE).join("|"), "gi"); async function hasStoriesForIteration( sh...
/** * @module ol/source/ImageArcGISRest */ import {inherits} from '../index.js'; import ImageWrapper from '../Image.js'; import {assert} from '../asserts.js'; import {listen} from '../events.js'; import EventType from '../events/EventType.js'; import {containsExtent, getHeight, getWidth} from '../extent.js'; import {...
import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import { Droppable } from 'react-beautiful-dnd'; import PropTypes from 'prop-types'; import DraggableQuizComponent from './DraggableQuizComponent'; import DraggableProfileComponent from './DraggableProfileComponent'; import { QuizS...
const sqlite = require("better-sqlite3") const outputDb = new sqlite("./output/data.sqlite") const INSERT_LIMIT = 25000 const escapeSingleQuotes = (str) => str.replace(/'/g, "''") const columnsToNorm = [ "text", "lexeme", ] const normalizeGreekValues = obj => { const r = Object.assign({},obj) columnsToNorm.forEa...
// line intersection helper function: does line segment (p1,p2) intersect segment (p3,p4) ? function line_intersect(p1, p2, p3, p4) { var denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y); if (denom === 0.0) return false; // parallel lines var ua = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y ...
/******************************************************************************** * Copyright 2017 Cognizant Technology Solutions * * 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 * *...
import React, {Component} from 'react'; import 'whatwg-fetch'; import ListItems from './list-items'; class RecordList extends Component { constructor() { super(); this.state = { records: null, toCompare: null, projectsWithStatus: [], error: null, ready: false, ...
'use strict'; module.exports = evaluate; function evaluate(scope, randomer, args) { var name = args[0]; if (unary[name] && args.length === 2) { return unary[name]( evaluate(scope, randomer, args[1]), scope, randomer ); } else if (binary[name] && args.len...
import path from 'path' import React from "react" import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import Moment from "react-moment" import File from "../File" import GridFile from "../GridFile" import { handleOpenPopup } from '../../actions/optionPopup' import prettyFileIcons from '....
/* eslint-disable jsx-a11y/label-has-for */ import React from 'react'; import { useSettings } from '../context/settings'; import { useSfx } from '../hooks/use-sfx'; import { Photos } from './photos'; import styles from '../styles/bio.module.css'; import Facebook from '../assets/facebook.svg'; import Linkedin from '../a...
var assert = require('assert'); var R = require('../ramda'); var cloneDeep = require('..'); describe('clone numbers, strings and booleans', function() { it('should clone integers', function() { assert.equal(-4, cloneDeep(-4)); assert.equal(9007199254740991, cloneDeep(9007199254740991)); }); ...
var mout = require('mout'); var Q = require('q'); var RegistryClient = require('bower-registry-client'); var ResolveCache = require('./ResolveCache'); var resolverFactory = require('./resolverFactory'); var createError = require('../util/createError'); function PackageRepository(config, logger) { var registryOptio...
import React from 'react' import {browserHistory} from 'react-router' import PropTypes from 'prop-types' import './PageLayout.scss' import {withStyles} from 'material-ui/styles' import classNames from 'classnames' import Drawer from 'material-ui/Drawer' import AppBar from 'material-ui/AppBar' import Toolbar from 'mate...
/* * Planck.js * The MIT License * Copyright (c) 2021 <NAME>, <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * t...
'use strict'; var _ = require('lodash'); var url = require('url'); var crypto = require('crypto'); var _RX_TIME_EXT_P = new RegExp('[^0-9]+$'); function timeToMillis(timeString) { var matched = _RX_TIME_EXT_P.exec(timeString), num = timeString, period = 'ms'; if (matched !== null) { num = timeStr...
/* =========================================================== */ // # 36ke var myObject={ foo:"bar", func:function(){ var self=this; console.log("outer func: this.foo="+this.foo) // bar console.log("outer func: self.foo="+self.foo) // bar ;(function(){ console.log("inner func: t...
// Sync // --------------- var _ = require('lodash'); var Promise = require('./base/promise'); // Sync is the dispatcher for any database queries, // taking the "syncing" `model` or `collection` being queried, along with // a hash of options that are used in the various query methods. // If the `transacting` opt...
/** * Cascade module * * @module sszvis/cascade * * sszvis.cascade is a module that can be useful for creating nested data structures. * It can be used in similar ways to d3.nest, but should not be conflated with d3.nest, * since it provides different behavior. * * The cascade class is not a data structure. Ra...
import ui from "../soonui"; import { createElement, text, append, addClass, prop } from "../common/html/html-utils"; import { initTitle, masterLoaded } from "./common"; // import { createAjaxRequest } from "../components/ajax-extend"; // ui.page.ajax = createAjaxRequest({ // baseUrl: "http://10.0.0.5:8080", // ...
/* eslint-disable jsx-a11y/control-has-associated-label */ import React from 'react'; import PropTypes from 'prop-types'; import numeral from 'numeral'; import styles from './index.module.less'; const getBufferedEnd = (currentTime, buffered) => { if (!buffered) { return 0; } for (let i = buffered.length - 1;...
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use ...
// Copyright (C) 2013, <NAME> <<EMAIL>> // // 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, publ...
var assert = require('assert'); var dict = require('./dict'); var Parser = require('./parser'); var Handlers = require('./handlers'); var JSONPath = function() { this.initialize.apply(this, arguments); }; JSONPath.prototype.initialize = function() { this.parser = new Parser(); this.handlers = new Handlers(); };...
/* * Copyright (C) 2017 Dremio Corporation * * 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...
var IP = getCookieIP(); var PORTA = getCookiePort(); var idedificio = getCookieIDBuilding(); var anni_presenti_consuntivi = []; var div_tabella = document.getElementById("tabella_consuntivi"); var tabella= "<table id='tabella_consuntivi' data-toggle='table' data-height='auto' data-pagination='true' >"+ ...
description("Test animation of use element where the instance is also animated with animate and animateTransform"); createSVGTestCase(); // Setup test document var rect = createSVGElement("rect"); rect.setAttribute("id", "rect"); rect.setAttribute("x", "10"); rect.setAttribute("y", "10"); rect.setAttribute("width", "1...
import axios from '@/utils/request' import { LOGOUT, MY_MENU } from '@/utils/interface' import QS from 'querystring' import $router from '@/router/index' import utils from '@/utils/utils' import $store from '@/store/index' import menuArr from '@/config/menus' import { Homes, title } from '@/config/config.default.js' im...
'use strict'; const { tools } = require('@iobroker/js-controller-common'); const CLI = require('./messages.js'); const CLICommand = require('./cliCommand.js'); const {formatValue} = require('./cliTools'); const ALIAS_STARTS_WITH = 'alias.'; /** Command iobroker state ... */ module.exports = cl...
const MethodHandler = require( './method' ); const JWTValidator = require( './jwt' ); const Protection = require( './protection' ); const constants = require( './constants' ); const TypedHandler = require( '../typed' ); const responseProcessor = require( './response' ); const { processCookies } = require( './cook...
const { getSiteConfig } = require('../config') const mjml2html = require('mjml') const nodemailer = require('nodemailer') const aws = require('aws-sdk') const cartData = require('./cartData') const encConf = require('./encryptedConfig') const { SUPPORT_EMAIL_OVERRIDE } = require('./const') const head = require('./tem...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in m...
import { FRAME_DURAITON, G, KEY_OBJECT_EVENT_GET_OFFSET, KEY_OBJECT_FRAME, KEY_OBJECT_ON_UPDATE, KEY_PLAYER_DEATH_FRAME, KEY_STAGE_ENDING_CUT_SCENE, KEY_STAGE_ENDING_CUT_SCENE_FRAME, KEY_STAGE_ENDING_CUT_SCENE_INDEX, KEY_STAGE_ENDING_CUT_SCENE_KEY, KEY_STAGE_INITIATE, KEY_STAGE_IS_WAVE_CLEAN, ...
import React, { Component, Fragment } from 'react'; import { Alert, Card, CardHeader, CardText, CardBody, CardTitle, CardSubtitle, Button, Label, Input, Modal, ModalHeader, ModalBody, ModalFooter, FormGroup } from 'reactstrap'; import PropTypes from 'prop-types'; import GalleryImageComponent from './../../containers/m...
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
const pushCheckbox = document.querySelector('.js-push-toggle-checkbox'); function urlBase64ToUint8Array(base64String) { const padding = '='.repeat((4 - base64String.length % 4) % 4); const base64 = (base64String + padding) .replace(/\-/g, '+') .replace(/_/g, '/'); const rawData = window.atob(base64); ...
const path = require(`path`) const fs = require(`fs-extra`) const gifFrames = require(`gif-frames`) const sizeOf = require(`image-size`) let Reporter = console /** * @typedef {object} PluginOptions * @property {string} root Project's working directory. Absolute path. * @property {string} src Where all the interact...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _moment = _interopRequireDefault(require("moment")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { return _arrayWithoutHol...
'use strict'; var helpers1 = require('./helpers'); var helpers = require('../helpers'); var _ = require('lodash'); // Class Compiler // ------- function ClassCompiler(tree, classBuilder) { this.tree = tree; this.method = classBuilder.method; this.schemaName = classBuilder.schemaName; this.classNameRaw = cla...
import React, { useState, memo, useRef, useCallback, } from 'react'; import { Form as Unform } from '@unform/web'; import { FiCheckCircle, FiX } from 'react-icons/fi'; import { store } from 'react-notifications-component'; import Axios from 'axios'; import * as Yup from 'yup'; import api from '../../../../service...
var doc = new jsPDF(); var query; var base64Img = null; var margins = { top: 70, bottom: 40, left: 30, width: 550 }; var specialElementHandlers = { '#editor': function (element, renderer) { return true; } }; var Orders = function () { var init = function () { handleRepor...
var request = require('request'); var url = require('url'); var _ = require('underscore'); var InfluxDB = function(host, port, username, password, database, logFunction) { this.options = { host : host || 'localhost', port : port || 8086, username ...
import React from 'react'; import { Link } from 'react-router-dom'; import { Table } from 'reactstrap'; import { Remarkable } from 'remarkable'; import RemarkableReactRenderer from 'remarkable-react'; import { linkify } from 'remarkable/linkify'; import DOMPurify from 'dompurify'; import hljs from 'highlight.js/lib/cor...
import React, {Component} from 'react'; import PropTypes from 'prop-types'; // CSS import './Champions.css'; // Material-UI Components import Grid from "@material-ui/core/Grid"; import TextField from '@material-ui/core/TextField'; import Typography from '@material-ui/core/Typography'; import { withStyles, withTheme }...
const pFinally = require('p-finally'); const supertest = require('supertest-light'); const extractStack = require('extract-stack'); const { Keystone } = require('@keystone-alpha/keystone'); const { WebServer } = require('@keystone-alpha/server'); const { MongooseAdapter } = require('@keystone-alpha/adapter-mongoose'); ...
/** * @fileoverview Manager for the Box Metadata Resource */ 'use strict'; // ----------------------------------------------------------------------------- // Typedefs // ----------------------------------------------------------------------------- /** @typedef {string} MetadataFieldType */ /** * Metadata enum o...
import React, { PureComponent } from "react"; import Dragger from "./Dragger"; import DraggerContainer from "./DraggerContainer"; import { noop, formatSeconds, leftZero } from "../libs/utils"; const TrimmerOverLay = props => { return ( <div className="rvt-trimmer" style={{ width: props.width, left: p...
import * as types from './types' import { store } from '../index' import apiMachine from '../../api/machines' import apiApp from '../../api/app' import { thunkAddToMachine as addToMachine, thunkRemoveFromMachine as removeFromMachine } from '../menu/actions' import { showPopup } from '../popup/actions' functio...
import React, { useState } from "react"; import { FiChevronRight, FiX } from "react-icons/fi"; import Layout from "../components/Layout"; import give_illust from "../images/give_illust.svg"; import online_illust from "../images/online_illust.svg"; import cheque_illust from "../images/cheque_illust.svg"; import { firest...
import React from 'react' import {connect} from 'react-redux' import { fetchAllTowns, fetchZCTAs, fetchTownZCTAs} from '../store/towns' import store from '../store' /** * COMPONENT */ class Towns extends React.Component { constructor() { super() this.allTowns = false this.changeTown = this.changeTown.b...
import React, { Fragment } from "react"; import { observer, inject } from "mobx-react"; import { types, getRoot, getType } from "mobx-state-tree"; import AudioControls from "./Audio/Controls"; import ObjectTag from "../../components/Tags/Object"; import ObjectBase from "./Base"; import ProcessAttrsMixin from "../../mi...
"use strict"; var url = require("url"); var path = require("path"); var excludeList = require("./exclude"); var utils = exports; /** * @param {Object} res * @param {Object} req * @param {Object} config */ utils.removeExcludedHeaders = function removeHeaders (res, req, config) { config.exc...
const fs = require("fs") const path = require("path") const { VM } = require("vm2") const crypto = require('crypto') class Base { constructor({ dir, mainDir = '', root = '', filename = '', moreInfo = false } = {}) { this.dir = dir // 基包和mainDir相同,分包 =mainDir+root this.mainDir = mainDir || dir // .../xx/_645...
/** * 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...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPixelThresholds = exports.config = undefined; var _rafSchd = require('raf-schd'); var _rafSchd2 = _interopRequireDefault(_rafSchd); var _getViewport = require('../../window/get-viewport'); var _getViewport2 = _interopRequireD...
"use strict"; import React, { Children, PropTypes, Component } from 'react'; import Immutable, {Map, List} from 'immutable'; import SmartPanel from './SmartPanel'; export default class SmartContainer extends Component { constructor(props){ super(props); if(this.props.model===undefined) { this.s...
// Required Packages const zmq = require('zeromq') require('dotenv').config() const bigInt = require('big-integer') // Required Classes const utils = require('./Utils') BigInt.prototype.toJSON = function () { return this.toString() } BigInt.prototype.fromJSON = function () { return BigInt(this) } class Guard { /** ...
// TODO: update group functionality import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { ActivityIndicator, Button, Image, FlatList, StyleSheet, Text, TouchableOpacity, View, } from 'react-native'; import { graphql, compose } from 'react-apollo'; import { NavigationActi...
const Spritesmith = require('spritesmith'), fs = require("fs"), jimp = require('jimp'); const helpers = ` @mixin sprite-width($sprite) { width: nth($sprite, 5); } @mixin sprite-height($sprite) { height: nth($sprite, 6); } @mixin sprite-position($sprite) { $sprite-offset-x: nth($sprite, 3); $sprite-of...
// Path Following (Complex Path) // The Nature of Code // The Coding Train / <NAME> // https://youtu.be/LrnR6dc2IfM // https://thecodingtrain.com/learning/nature-of-code/5.7-path-following.html // Path Following: https://editor.p5js.org/codingtrain/sketches/dqM054vBV // Complex Path: https://editor.p5js.org/codingtrai...
import './polyfillFetchInEdge'; import 'isomorphic-fetch'; import createLogger from 'cf-util-logger'; const logRequest = createLogger('http:request'); const logError = createLogger('http:error'); const logSuccess = createLogger('http:success'); // Store beforeSend callbacks. let beforeSendCallbacks = []; /** * Mod...
const fs = require('fs'); const path = require('path'); const execa = require('execa'); const npmRunPath = require('npm-run-path'); const findUp = require('find-up'); const sass = require('sass'); const IMPORT_REGEX = /\@(use|import|forward)\s*['"](.*?)['"]/g; const PARTIAL_REGEX = /([\/\\])_(.+)(?![\/\\])/; function ...
$(document).on('ready', function () { loadtire1(); loadtire2(); loadsticker(); loadtotal(); $("#bttireamount1").on('change', function () { calculatetire1(); }); $("#btlosttime").on('change', function () { calculatetire1(); }); $("#btstandard").on('change', function ()...
Parse.initialize("2RD3MsL6Lf8FgGRkgNNehB0r5RvJRr0km7rZb9VS", "ygZYx64QQISpshuwxWhyQgEKGDnXRtvldz9E0VDA"); var Candidate = Parse.Object.extend('Candidate'); function isAuthenticated() { // CHECK THE USER STORED IN SESSION FOR A CUSTOM VARIABLE // you can do this however you want with whatever variables you set...
const getConfig = require('next/config'); const runtimeConfig = getConfig.default() || { publicRuntimeConfig: { NODE_ENV: process.env.NODE_ENV, ENV: process.env.ENV, }, }; const publicRuntimeConfig = runtimeConfig.publicRuntimeConfig; const { ENV, NODE_ENV } = publicRuntimeConfig; console.log('Setup: ', NOD...
/** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ /* global window, document, setTimeout */ import clone from 'lodash/clone'; import throttle from 'lodash/throttle'; import noop from 'lodash/noop'; import AugmentedEvent from './Augmen...
const twgl = require('twgl.js'); const RenderConstants = require('./RenderConstants'); const Skin = require('./Skin'); const Silhouette = require('./Silhouette'); /** * Attributes to use when drawing with the pen * @typedef {object} PenSkin#PenAttributes * @property {number} [diameter] - The size (diameter) of the...
"use strict"; const isInline = (token) => token && token.type === "inline"; const hasMyWords = (token, myWords) => { if (token) { for (let i = 0; i < myWords.length; i++) { if (myWords[i].pattern.test(token.content)) { // console.log("Word Replacement Time"); return true; } } } return false; }; f...
import React from 'react' import styled from 'styled-components' import './FAQs.css' import Link, {navigateTo} from 'gatsby-link' import kebabCase from 'lodash/kebabCase' import { Overlay, OverlayHeader, OverlayBody } from '../components/overlay' const queryString = require('query-string'); import episodes from '../u...
/** * Copyright (c) 2015, Facebook, Inc. All rights reserved. * * Facebook, Inc. ("Facebook") owns all right, title and interest, including * all intellectual property and other proprietary rights, in and to the React * Native CustomComponents software (the "Software"). Subject to your * compliance with these t...
/** * Save the state of the application to localStorage * @param state Object */ import { mapObject, mapObjectByKeyAndValue } from "../utils/mapObject"; import Character from "../domain/Character"; import PlayerProfile from "../domain/PlayerProfile"; import groupByKey from "../utils/groupByKey"; import Mod from "../...
/** * @module ol/webgl/TileTexture */ import EventTarget from '../events/Target.js'; import EventType from '../events/EventType.js'; import ImageTile from '../ImageTile.js'; import TileState from '../TileState.js'; import WebGLArrayBuffer from './Buffer.js'; import {ARRAY_BUFFER, STATIC_DRAW} from '../webgl.js'; imp...
const canvas = document.getElementById("shape"); const ctx = canvas.getContext("2d"); let rStroke = 1; let cStroke = 1; let sStroke = 1; let lStroke = 1; let cPushArray = new Array(); let cStep = -1; $("#drawFig").click(function() { let selectedValue = $(".shapeSelect").val(); if (selectedValue == 2) { let rect...
/* eslint-disable react/prop-types */ import React, { Component } from 'react'; // 引入 ECharts 主模块 const echarts = require('echarts/lib/echarts'); // 引入柱状图 require('echarts/lib/chart/bar'); // 引入提示框和标题组件 require('echarts/lib/component/tooltip'); require('echarts/lib/component/title'); require('echarts/lib/component/too...
#!/usr/bin/env node const fs = require("fs"); const path = require("path"); const a11yColor = require("a11ycolor"); const Color = require("color"); const options = require("yargs-parser")(process.argv.slice(2)); const cssOutputFilename = "color-tokens.css"; const defaults = { outputDirPath: "sass", outputFilename...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const LRUCache = require('lru-cache'); // ugly code end const onigasmH_1 = require("./onigasmH"); const OnigString_1 = require("./OnigString"); const cache = new LRUCache({ dispose: (scanner, info) => { const status = oniga...
chrome.storage.sync.get(null, function (data) { var returnData = getData(data); init(returnData); }); function init(returnData) { var url = new URL(window.location.href); var pathName = url.pathname; var validPage = false; var elementKey = ''; var keyType = 'id'; var buttonPos = 'both'...
import $ from "jquery"; /** * Print variable contents * TODO: jsdoc this */ export const fn_print_r = function (value) { fn_alert(fn_print_array(value)); } /** * Show alert * @param {string} msg Message * @param {boolean} not_strip Strip HTML-tags from message * TODO: jsdoc this */ export const fn_alert =...
import * as Utils from "../utils.js"; import * as Physics from "../game/physics.js"; import * as Sprites from "../graphics/sprite.js"; /** * Component : A level background image */ const Backdrop = { name: "backdrop", init: async function Backdrop_init(initOptions, levelGrid, pixelCanvas) { this.width...
var keymaster = require('./lib/keymaster.js') var inherits = require('inherits') var events = require('events') var keyTable = { 8 : 'backspace' , 9 : 'tab' , 13 : 'enter' , 16 : 'shift' , 17 : 'ctrl' , 18 : 'alt' , 19 : 'pausebreak' , 20 : 'capslock' , 27 : 'esc' , 32 : 'spacebar' , ...
/** * * wechaty: Wechat for Bot. and for human who talk to bot/robot * * Class Io * http://www.wechaty.io * * Licenst: ISC * https://github.com/zixia/wechaty * */ const EventEmitter = require('events') const WebSocket = require('ws') const co = require('co') const log = require('./n...
// ==UserScript== // @name ImgSkraper // @namespace https://github.com/totocheku/ImgSkraper/ // @version 0.1 // @description Scrap all the <img> on the web page and show them in side bar for easy viewing // @author totocheku // @match http://www.xossip.com/* // @grant none // @updat...
import axios from './axios'; const Pi = window.Pi; var piUser; var piApiResult; export const authenticatePiUser = async () => { // Identify the user with their username / unique network-wide ID, and get permission to request payments from them. const scopes = ['username','payments']; try{ piUs...
"use strict"; const { inherits } = require("util"); const { join } = require("path"); const async = require("async"); const { assert } = require("chai"); const randomString = require("random-string"); const env = process.env.NODE_ENV || "development"; const config = require("../../config/config")(env); const Attribute...