text stringlengths 3.07k 16k |
|---|
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'
import serializeForm from 'form-serialize'
import PropTypes from 'prop-types'
import { fetchAddPost, fetchPostById, fetchEditPost } from '../../Actions/postAction'
import { fetchCategories } from '../.... |
import PointerDownCache from './pointer-down-cache';
import SelectionManager from './selection-manager';
import DragManager from './drag-manager';
import { getElementsByClassName } from './util/ms-polyfills';
const MIN_DRAG_DISTANCE_SQUARED = 5 ** 2;
export default class ElementManager {
constructor(app) {
this... |
"use strict";
/**
* forked from https://github.com/goessner/markdown-it-mdKatex
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.mdKatex = void 0;
var katexClassName = 'zenn-katex';
var preHandler = function (str, beg) {
var prv = beg > 0 ? str[beg - 1].charCodeAt(0) : false;
return (... |
import React, { useEffect, useState, useContext } from "react"
import { useImmerReducer } from "use-immer"
import Page from "./Page"
import { useParams, Link, withRouter } from "react-router-dom"
import Axios from "axios"
import LoadingDotsIcon from "./LoadingDotsIcon"
import StateContext from "../StateContext"
... |
const Koa = require('koa')
const Http = require('http')
const Socket = require('socket.io')
const { v4: uuidv4 } = require('uuid')
const app = new Koa()
const server = Http.createServer(app.callback())
const io = Socket(server)
const SERVER_HOST = "localhost"
const SERVER_PORT = 8080
const maxPlayersPerRoom = 6
let ... |
const base_url = 'https://api.football-data.org/v2/';
const myHeaders = new Headers();
myHeaders.append("X-Auth-Token", "2<PASSWORD>");
const requestOptions = {
headers: myHeaders
};
function status(response) {
if (response.status !== 200) {
console.log("Error : " + response.status);
return Pr... |
const isISODate = d => new Date(d) !== 'Invalid Date' && !isNaN(new Date(d)) && d === new Date(d).toISOString()
const dateFormat = d => `${d.getFullYear()}-${span(d.getMonth() + 1)}-${span(d.getDate())} ${span(d.getHours())}:${span(d.getMinutes())}:${span(d.getSeconds())}`
const span = i => `${i < 10 ? '0' : ''}${i}`
... |
/**
* 换行符
*/
const LINE_BREAK = '\r\n'
/**
* 生成 boundary 字符串
* @returns 随机生成的 boundary 字符串,如:----XiaoMingFormData2iAmuWOms5E9tuMq
*/
const genBoundary = () => {
const base = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
let boundary = '----XiaoMingFormData'
for (let i = 0, len = base.leng... |
const webpack = require('webpack')
const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const cesiumSource = 'node_modules/cesium/Build/Cesium'
// const cesiumSource = 'static/cesium'
module.exports = {
/* 部署生产环境和开发环境下的URL:可对当前环境进行区分,baseUrl 从 Vue CLI 3.3 起已弃用,要使用publicPath */
/* b... |
'use strict';
function rKLandingPagesCapitaliseFirstLetter(string)
{
return string.charAt(0).toUpperCase() + string.substring(1);
}
/**
* Initialise the quick navigation form in list views.
*/
function rKLandingPagesInitQuickNavigation()
{
var quickNavForm;
var objectType;
if (jQuery('.rklandingpag... |
/*!
* lib/dateJuggler.js
* teamwork-ds (https://github.com/dstegen/teamwork-ds)
* Copyright 2021 <NAME> <<EMAIL>>
* Licensed under MIT (https://github.com/dstegen/teamwork-ds/blob/master/LICENSE)
*/
'use strict';
// Required Modules
const moment = require('moment');
const config = require('../main/models/model-c... |
/*
Generative Automata w/ Web MIDI
==============================
- Built for the Novation LaunchPad MK2 by <NAME> (george.mand.is)
- Generative code taken from Tero Parviainen's (teropa.info) slides as seen at Fullstack London 2017 (teropa.info/generative-music-slides/)
- Additional inspiration from <NAME>'... |
const chalk = require('chalk');
const fs = require('fs-extra');
const path = require('path');
const {showHelp} = require('yargs');
// Detect whether `dir` is inside a Basys project directory
function detectBasysProject(dir) {
while (true) {
if (dir === path.dirname(dir)) break;
if (fs.existsSync(path.join(di... |
import * as THREE from "three";
import * as Tags from "../tags";
import { createSpriteMaterial } from "./materials";
import defined from "./defined";
const planeGeo = new THREE.PlaneGeometry(1, 1, 1, 1);
planeGeo.translate(0, 0.5, 0);
export class WayfinderSpriteMaterial extends THREE.MeshBasicMaterial {
c... |
import Prism from 'prismjs';
import PrismComponents from 'prismjs/components';
/**
* @type {Object<string, string | string[]>}
*/
const lang_dependencies = {};
/**
* @type {Object<string, string>}
*/
const lang_aliases = {};
for (const key in PrismComponents.languages) {
const element = PrismComponents.languag... |
import { squareMoveSequences } from './constants'
export const getMoveHIstoryFromSnakeBody = (history, snake) => {
let hashSnake = {}
snake.map((part, idx) => {
hashSnake[part] = idx
})
return [...history.filter((m) => hashSnake.hasOwnProperty(m.position))]
}
export const isSquareMove = (nex... |
const {
CUBE_INDICES,
CUBE_NORMALS,
CUBE_VERTICES,
CubeCameraUniform,
CubeTextureUniform,
ModelMatUniform,
NormalMatUniform,
PerspectiveMatUniform,
Shader,
Vec3Attribute,
ViewMatUniform,
Vec3Uniform,
} = require('../../../dist');
const {mat4, vec3, vec4} = require('gl-matrix');
const {Mesh} = re... |
import {
Box,
Button,
CircularProgress,
Dialog,
DialogActions,
DialogContent,
DialogTitle,
Divider,
Slide,
Slider,
Stack,
Typography,
} from "@mui/material";
import React from "react";
import Cropper from "react-easy-crop";
import { green } from "@mui/material/colors";
import { makeStyles } from... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va... |
import React, { useState } from "react";
import { animated, useSpring } from "react-spring";
import "bootstrap/dist/css/bootstrap.min.css"
import { Col, Row } from 'react-bootstrap'
function Arrow({ id, rot, text, blog, big }) {
const [show2, setShow2] = useState(false);
const [showText, setShowText] = useSt... |
"use strict";
import React from 'react';
import { render } from 'react-dom';
import Ajax from '../lib/Ajax';
import {Button, Dialog} from 'react-weui';
const {Alert} = Dialog;
export default class Like extends React.Component {
getIsLike = () => {
let i_like = window.pageData.profile.i_like;
if ... |
//Sprite variabless
var warrior;
var warrior_img;
var ground;
var ground_img;
var box;
var box_img;
var slash;
var slash_img;
var enemy_knight;
var enemy_knight_img;
//Arrays
var grounds = [];
var boxes = [];
var slashes = [];
var enemies = [];
//New Arrays
var yValues = [];
//Key/Movement booleans
var isLeft = ... |
/** @format */
import React, { memo, useEffect, useState } from "react";
import styled from "styled-components";
import { v4 as uuidv4 } from "uuid";
import { useDispatch } from "react-redux";
import NumberFormat from "react-number-format";
import { setRemoveFromBasketState } from "../features/basket/basketSlice";
imp... |
import styled from 'styled-components';
import mediaQueryFor from '../../_global_styles/responsive_querie';
import { colors } from '../../colorVariables';
import { Button } from '@material-ui/core';
import { withStyles } from '@material-ui/core/styles';
import TextField from '@material-ui/core/TextField';
const styles... |
// Electron
const { ipcRenderer, Main, shell } = require('electron');
// Socket.io-client
const io = require('socket.io-client');
//----------Initialize----------//
// Global Variable
const AppData = {
Clips: {},
Nodes: {
asd: (function () { return document.getElementById('info'); })(),
... |
import React, { Component } from 'react';
import injectSheet from 'react-jss';
import { scaleLinear } from 'd3-scale';
import { line as d3Line, curveCardinal } from 'd3-shape';
import { axisBottom, axisLeft } from 'd3-axis';
import { select as d3Select } from 'd3-selection';
import { format as d3Format } from 'd3-forma... |
import {drawKeyPoints, drawSkeleton} from '../config/posenet_utils'
import React, {Component} from 'react'
import * as posenet from '@tensorflow-models/posenet'
import './PoseNet.scss'
import { Image, Stage, Layer, } from 'react-konva'
import Konva from 'konva'
const devCamID = '<KEY>'
const successColor = '#42f44e'
... |
"use strict";
const aws = require("aws-sdk");
const sharp = require("sharp");
const { supportImageTypes, corsAllowAllHeaders } = require("./constant");
const HufferConfig = require("./config");
const dutils = require("./dimensions");
const logger = require("./logger");
class HufferEdge {
/**
*
* @param Huffe... |
/***********************************/
/* Main Intel Security Tool Module
/***********************************/
var app = angular.module('SecurityAdminToolsHub', [
'ngRoute'
,'ui.bootstrap'
,'nvd3'
, 'ngResource'
, 'datatables', 'datatables.buttons' ,'datatables.bootstrap' ,'datatables.light-columnfilter... |
const catchAsync = require("../utils/catchAsync");
const ENVConfig = require("../config/config");
const { configService, estateService, newsService, sitemapService } = require("../services");
const { beautifyPhoneNumber } = require("../utils/beautifyString");
const {
normalizeEstateData,
normalizeEstatesData,
... |
'use strict';
var leftPic = document.getElementById('left-image');
// var leftPicText = document.getElementById('left-img-text');
var middlePic = document.getElementById('middle-image');
// var middlePicText = document.getElementById('middle-img-text');
var rightPic = document.getElementById('right-image');
// var rig... |
/**
* 1.数组扁平化
*/
const arr01 = [
1,
2,
3,
[4, 5, 6, [7, 8, 9, [10, 11, 12], 13, 14], 15],
16,
17,
[18, 19, [20, 21, 22]],
];
function flatten(arr) {
if (Array.isArray(arr)) {
return arr.reduce((a, b) => {
return a.concat(Array.isArray(b) ? flatten(b) : b);
}, []);
}
// code here
... |
import React from 'react';
import moment from 'moment';
import Tooltip from '@material-ui/core/Tooltip';
import Icon from '@material-ui/core/Icon';
import IconButton from '@material-ui/core/IconButton';
import createMuiTheme from '@material-ui/core/styles/createMuiTheme';
import MuiThemeProvider from '@material-ui/core... |
import { store } from '../../../../redux/store'
import { setOrder } from '../../../../redux/modules/checkout'
import { getOrder, reportToSentry } from '../global'
import { updatePayment } from '../../../services/checkout'
import { hasIn } from 'lodash'
export const getGiftCards = order => {
order = order || getOrder... |
let conversion_buffer = new ArrayBuffer(8);
let float_view = new Float64Array(conversion_buffer);
let int_view = new BigUint64Array(conversion_buffer);
BigInt.prototype.hex = function() {
return '0x' + this.toString(16);
};
BigInt.prototype.i2f = function() {
int_view[0] = this;
return float_view[0];
};
BigInt.pr... |
var config = require('./config/config');
var probable = require('probable');
var callNextTick = require('call-next-tick');
var getRandomVerbs = require('./get-random-verbs');
var changeCase = require('change-case');
var WanderGoogleNgrams = require('wander-google-ngrams');
var createIsCool = require('iscool');
var isc... |
const fs = require("fs");
const inquirer = require("inquirer");
// const validator = require("email-validator");
const Engineer = require("./lib/Engineer");
const Intern = require("./lib/Intern");
const Manager = require("./lib/Manager");
const Employee = require("./lib/Employee");
const buildIntern = "";
const buildMa... |
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview Mutator for differential fuzzing.
*/
'use strict';
const babelTemplate = require('@babel/template').default;
const babelTypes = ... |
import { first, isEmpty, last } from 'lodash';
import moment from 'moment';
import ReactGA from 'react-ga';
import React, { Component, PropTypes } from 'react';
import Loader from 'react-loader';
import { connect } from 'react-redux';
import { browserHistory } from 'react-router';
import { bindActionCreators } from 're... |
/*global Phaser*/
var game = new Phaser.Game(1366, 675, Phaser.AUTO, '');
var game_state = {};
game_state.main = function() {};
game_state.main.prototype = {
preload: function() {
game.load.image('sky', 'assets/sky.png');
game.load.image('ground', 'assets/platform.png');
game.load.imag... |
/* global faceapi, createProgress */
/**
* Converts given Canvas to HTMLImageElement.
*
* @param {Canvas} canvas Canvas from which Image is created
* @returns {Promise} Resolving to HTMLImageElement
*/
function convertCanvasToImage(canvas) {
return new Promise(resolve => {
const base64ImageDataURL = canvas.t... |
import React, {Component} from 'react';
import {View, Text, Image, StyleSheet, Dimensions, ImageBackground, TouchableWithoutFeedback, Platform} from 'react-native';
import {connect} from 'react-redux';
import store from '../state/store';
import * as types from '../state/actions/actions';
import Num_Hands from './settin... |
// ==========================================================================
// Plyr UI
// ==========================================================================
import captions from './captions';
import controls from './controls';
import i18n from './i18n';
import support from './support';
import utils from './u... |
/**
* Copyright (c) 2014, salesforce.com, inc.
* 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 co... |
import React, { useEffect, useState } from "react";
import { ScrollView, Text, View } from "react-native";
import Toast from "react-native-root-toast";
import {
faFilter,
faFolderOpen,
faRandom,
faReplyAll,
faSave,
faSortAlphaDown,
faSortAlphaUp,
faSortDown,
faSortUp,
faTrash,
faUndoAlt,
} from "@... |
const AppContext = require('../AppContext');
const fs = require('fs');
const moment = require('moment');
/**
* This class manages JSON array file, with a maximum number of entries
*/
class RollingList {
constructor(feedName, filePrefix, maxItems = 20,
allowDuplicateItems = true, uniqueIdentifierDelegate... |
'use strict';
// array to store all products
Product.allProducts = [];
// total clicks
Product.totalClicks = 0;
// track previously displayed products
Product.lastDisplayed = [];
// access elements from DOM
var sectionEl = document.getElementById('products-section');
var img1El = document.getElementById('img1');
var ... |
'use strict';
var Rate = require('./rate.model.js');
var logger = require('../../config/logger');
var TypeChecker = require('../../utils/checkObjects');
var mongoose = require('mongoose');
var _ = require('lodash');
/**
* Get list of rates
* restriction: 'admin'
*/
exports.index = function(req, res) {
Rate.find(... |
import canvasQuad from './canvasQuad'
import settings from '../settings'
import state from './state'
import {
Vector2
} from 'three';
export let ui = canvasQuad([2, 1.8]);
let elements = [];
let oldX = 0;
export const TUTORIAL = {
START: {
body: `
1. Spot all the dead/lazy pixels\n
Press ENTER VR at the bot... |
// 组件第三方包引用
import React, { Component } from "react";
import { connect } from "dva";
// eslint-disable-next-line import/no-extraneous-dependencies
import router from "umi/router";
// import classnames from 'classnames';
import moment from "moment";
import {
Button,
Table,
Form,
Select,
Input,
Co... |
import mongoose from 'mongoose'
import asyncHandler from 'express-async-handler'
import Transaction from '../models/transactionModel.js'
import User from '../models/userModel.js'
// Method GET
// Route api/transactions/:id
// Desc. Get all the user's transactions
// Access Private
const getAllTransactions = ... |
let questions, selectedQuestionIds=[], selectedQuestions=[], filtered_questions=[];
$(function() {
// load the external data
d3.csv("./assets/data/TRIVIAOUTLETQUIZDATA.csv").then(function(flatData) {
questions = flatData;
let q_type = flatData.map(function(d) {
return d['Q_TYPE']
... |
const currentHtml = location.href.replace(location.hash, "").replace("#", "");
window.brewquire = async (url, options = {}) => {
// phase 1: prepare options
options.transform = await loadTransform(options);
// phase 2: download all code
options.packageLock = await loadPackageLock(options);
const context = awa... |
/* globals JSLang, phpVars */
/* exported hideMsgBox, regCallback */
var $Elements = {MsgSpace: null, MsgBox: null};
var isCaptchaEnabled = undefined;
function showMsgBox (Text, Color) {
if ($Elements.MsgSpace.css("opacity") == 0) {
$Elements.MsgSpace.animate({opacity: 1}, 250);
}
$Elements.MsgBox... |
const champions = {
266: require('./aatrox.png'),
103: require('./ahri.png'),
84: require('./akali.png'),
12: require('./alistar.png'),
32: require('./amumu.png'),
34: require('./anivia.png'),
1: require('./annie.png'),
22: require('./ashe.png'),
136: require('./aurelionsol.png'),
268: require('./az... |
import React from "react";
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import * as bridge_params from "./Bridge";
import * as config from "./Config";
import { AppContext } from './Context';
import { prepareDisplayName } from "./Common";
import { SelectTab, ImportTab, ResultTab } from './compon... |
'use strict';
import {
createAction, handleActions
}
from 'redux-actions';
import TableOfContentsApi from 'api/tableOfContents/TableOfContentsApi';
import _ from 'lodash';
// ------------------------------------
// Constants
// ------------------------------------
export const STREAMS_SET_STREAMS = 'STREAMS_SET_STRE... |
/*
* 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 may not u... |
let _ = require('underscore');
let queryGrammar = require('./ohm/grammar');
let syntaxActionsMap = {
'nonemptyListOf': flattenNonemptyListOf,
'spaced': flattenSpaced,
'parented': flattenParented,
'boolOperator': flattenBoolOperator,
'longNegation': flattenLongNegation,
'simpleNegation': flatten... |
/* eslint-env jest */
import PropTypes from 'prop-types'
import React from 'react'
import { View, Text } from 'react-native'
import Renderer from 'react-test-renderer'
import { StyleProvider, Stylesheet, stylable } from '../src'
const TitleText = stylable('Title')(Text)
const DescrText = stylable('Descr')(Text)
cons... |
import React from 'react';
import { withRouter } from 'react-router-dom';
import WebsiteHeader from './../../IndividualComponents/WebsiteHeader'
import CustomSelect from './../../IndividualComponents/CustomSelect'
import CustomButton from './../../IndividualComponents/CustomButton'
import {getAugmentMaterials} from './... |
"use strict";
let allProducts = [];
let nameOfProduct = [];
let numOfClickArray = [];
let numOfShowArray = [];
let clicksColor = [];
let showColor = [];
// eslint-disable-next-line no-unused-vars
let numOfRound = 25;
function Product(name, filepath) {
this.name = name;
this.filepath = filepath;
this.noShow = 0;
... |
//Time formats docs: http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
//Timezones docs: http://joda-time.sourceforge.net/timezones.html
function DateTool(options) {
var t = this;
t._options = {
timezone: 'GMT',
format: "yyyy-MM-dd"
};
t.options(options);
... |
/*
Dentist Signup Form - Format Submission Data
================================================================================
This is used to format the form data before it is sent to the server. It must
be called by the `onSubmit` function passed to the `<DentistSignupForm>`
component.
*/
const formatDentistSignup... |
// リクエスト解析
const hrefSplit = location.href.split('?');
const pageUrl = hrefSplit[0];
const pageParam = (hrefSplit[1]) ? hrefSplit[1].split('=')[1] : undefined;
const pageParamSplit = (pageParam) ? pageParam.split(':') : [];
const targetLibName = pageParamSplit[0] || 'pixi';
const targetTestName = pageParamSplit[1] || '... |
function buildSettingsPanels() {
/////////////////////////
///////// Links /////////
/////////////////////////
const linksPanel = document.querySelector('.settings-panel-links-items');
linksPanel.innerHTML = '';
// Get all existing links
const links = JSON.parse(localStorage.getItem('userLi... |
import ReactNative, {Dimensions, StyleSheet} from "react-native";
const {height, width} = Dimensions.get("window");
const APP_ICON = require("../../assets/images/RWAppIcon.png");
const BACKGROUND_BLACK_GRADIENT = require("../../assets/images/RWBlackGradient.png");
const BACKGROUND_BLUE_GRADIENT = require("../../asset... |
import React from 'react'
import './WapcardTemplate.scss'
import ProfilePicture from '../../../components/Misc/ProfilePicture/ProfilePicture'
import $ from 'jquery'
import 'jquery-circle-progress'
import {
Col,
Row,
Progress
} from 'reactstrap'
import DotProgress from '../../../components/Misc/DotProgress/DotPro... |
import { gl, hexToRgb } from './utils';
import Drawer from './Drawer';
import { NoiseHandler } from './NoiseGenerator';
import { Controls, SliderControl, GradientControl } from './Controls';
import tinygradient from 'tinygradient';
import IcosahedronGeometry from './IcosahedronGeometry';
import SphereGeometry from './... |
import React, { useState } from 'react';
import Board from './Board';
import calcWinner from '../calcWinner';
import '../App.css';
const styles = {
header: {
backgroundColor: 'lightblue',
fontSize: 'var(--headerFontSize)',
fontWeight: '800',
padding: 'var(--headerPadding)',
textAlign: 'center',
... |
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
import Select from 'react-select';
import 'bootstrap/dist/css/bootstrap.css';
import Avatar from '@material-ui/core/Avatar';
import CssBaseline from '@mate... |
#!/usr/bin/env node
var fs = require('fs'),
_ = require('underscore'),
Sprinter = require('../sprinter'),
formatter = require('./cli-output-format'),
argv = require('minimist')(process.argv.slice(2)),
sprinter,
availableCommands,
command, commandArgs, kwargs,
githubUsername, githubPasswo... |
/**
* Extensions for calculating the accessible name
*/
import ariaExtensions from '../aria-extensions';
import symbol from '../symbol';
// An implementation of the text alternative computation
// https://www.w3.org/TR/accname-aam-1.1/#mapping_additional_nd_te
const controlRoles = ['textbox', 'combobox', 'listbox', ... |
import localforage from "localforage";
const noCacheHeaders = new Headers();
// noCacheHeaders.append('pragma', 'no-cache');
// noCacheHeaders.append('cache-control', 'no-cache');
const noCacheInit = {
method: "GET",
headers: noCacheHeaders,
};
export const md5FetchJSON = async (prefix, uri) => {
console.log("u... |
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import {camelize, loadJS} from './Utilities/Utils'
const BOOL_PROPS_TO_CLASS_NAMES = {
small: 'rev-Map--small',
medium: 'rev-Map--medium',
large: 'rev-Map--large',
}
const BOOL_PROPS = Object.keys(BOOL_... |
/* eslint-disable indent */
/* eslint-disable new-cap */
/* eslint-disable no-multi-spaces */
/* eslint-disable semi */
/* eslint-disable no-trailing-spaces */
/* eslint-disable no-redeclare */
/* eslint-disable no-unused-vars */
/* eslint-disable no-undef */
'Strict'
var AllItemsImages = [];
var clicksArr = []; // a... |
const MerkleTools = require('merkle-tools');
const SHA256 = require('crypto-js/sha256');
const elliptic = require('elliptic');
const secp256k1 = new elliptic.ec('secp256k1');
const sha3 = require('js-sha3');
const BytesUtilities = require('./BytesUtilities');
const _slicedToArray = (function () {
function slice... |
"use strict";
var fs = require('fs');
var async = require('async');
var Promise = require('promise');
var path = require('path');
var logger = require('./logger');
var DefaultLocalizer = (function () {
function DefaultLocalizer(root, defaultLocale) {
if (defaultLocale === void 0) { defaultLocale = 'en'; }
... |
var _ = require('underscore');
var release = require('./release.js');
var isopackets = require("./isopackets.js");
var config = require('./config.js');
var utils = require('./utils.js');
var auth = require('./auth.js');
var selftest = require('./selftest.js');
var randomString = function (charsCount) {
var chars = '... |
const fs = require('fs');
const crypto = require('crypto');
const url = require('url');
var coins = require("./coins.js");
var credentials = require("./credentials.js");
var currentCoin = process.env.BTCEXP_COIN || "BTCV";
var rpcCred = credentials.rpc;
if (rpcCred.cookie && !rpcCred.username && !rpcCred.password &... |
import fetch, { Headers } from 'node-fetch'
import crypto from 'crypto-js'
import moment from 'moment'
/**
* TODO
*
*/
/**
* RUNTASTIC APP WORKFLOW
*
* All API calls are done via "post" function.
* "authenticate" --> get accessToken.
* "sessions" with accessToken --> get list of all session.
* "session" w... |
/*
Copyright 2018 615283 (<NAME>), 2019-2020 synapses
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 agree... |
import React, {useState} from 'react'
import Grid from '@material-ui/core/Grid'
import Typography from '@material-ui/core/Typography'
import TextField from '@material-ui/core/TextField'
import {makeStyles} from '@material-ui/core/styles'
import InputLabel from '@material-ui/core/InputLabel'
import MenuItem from '@mater... |
"use strict";
var _react = _interopRequireDefault(require("react"));
var _reactRedux = require("react-redux");
var _redux = require("redux");
var _reduxImmutablejs = require("redux-immutablejs");
var _testUtils = _interopRequireDefault(require("react-dom/test-utils"));
var _reactDom = _interopRequireDefault(requi... |
import * as API from 'api'
export const animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'
export function inArray (needle, haystack, argStrict) {
let key
let strict = !!argStrict
if (strict) {
for (key in haystack) {
if (haystack.hasOwnProperty(key) &... |
import functionalComponentInstance from './functionalComponentInstance';
import { PureComponent } from './Component';
import { mergeState, callLifeCycle } from './utils';
import { setRef } from './refs';
import { runEffects, cleanEffects } from './hooks';
import { addHandler } from './mountHandlerQueue';
import upda... |
import React, { useRef } from "react"
import { graphql, Link } from "gatsby"
import arrow from "../assets/icons/right-arrow.svg"
import LowerFooter from "../components/LowerFooter"
import Worldwide from "../components/Worldwide"
import SectionMarquee from "../components/SectionMarquee"
import TriggerText from "../compo... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import {
Modal, Button,
FormGroup, ControlLabel, FormControl
} from 'react-bootstrap';
import Datetime from 'react-datetime';
import { Icon } from 'react-fa';
import * as actions from '../../actions';
import * as actionsTypes from '..... |
var extended = require("./../extended"),
has = extended.has,
isUndefinedOrNull = extended.isUndefinedOrNull,
trim = extended.trim,
trimLeft = extended.trimLeft,
trimRight = extended.trimRight;
function createParser(options) {
options = options || {};
var delimiter = options.delimiter || ","... |
import { Base } from '../../../../Machine/Base/Base.js';
import { Factory } from '../../../../Factory/Factory.js';
import { fixTags, compareTags } from '../../../../Util/tags.js';
import { Item } from '../../../../Item/Item.js';
import { del } from '../../../../Util/del.js';
import { MicroFactoryInput } from './MicroFa... |
const _ = require('underscore');
const uuid = require('uuid');
const BaseAbilityWindow = require('./baseabilitywindow.js');
const TriggeredAbilityWindowTitles = require('./triggeredabilitywindowtitles.js');
class TriggeredAbilityWindow extends BaseAbilityWindow {
constructor(game, properties) {
super(game... |
/**
* Module dependencies
*/
var util = require('util');
var assert = require('assert');
var _ = require('@sailshq/lodash');
var async = require('async');
var Sails = require('sails').Sails;
var SocketIORedisAdapter = require('socket.io-redis');
var ioredis = require('ioredis');
var redis = require('redis');
var lif... |
import { html } from 'lit-element';
import { unsafeHTML } from 'lit-html/directives/unsafe-html';
import marked from 'marked';
import '@/components/api-request';
import '@/components/api-response';
/* eslint-disable indent */
export function callbackTemplate(callbacks) {
return html`
<div class="req-res-title" s... |
// GruntFile for building the final compiled files from the core.
// Run using NodeJS and the Grunt module
var fs = require("fs");
var dirs = {
core: "src/core",
i18n: "src/i18n",
build: "build"
};
var getI18NFiles = function () {
return fs.readdirSync(dirs.i18n);
};
var buildMinifyFileList = function (dev) {
var... |
import React from "react"
import { Link } from "@reach/router"
import { AnimatedCaret } from "../icons"
import { animated, useSpring } from "react-spring"
import useMeasure from "react-use-measure"
import { ResizeObserver } from "@juggle/resize-observer"
import OutsideClickHandler from "react-outside-click-handler"
imp... |
import React from "react";
import MainLayout from "../../HighOrderComponents/MainLayout";
import { useSelector } from "react-redux";
import MainBackground from "../../components/MainBackground/MainBackground";
import OffCanvasMediaList from "../../components/OffCanvasMediaList/OffCanvasMediaList";
import { useFetchSele... |
import React, { useRef, useState } from 'react';
import PropTypes from 'prop-types';
import { truncate } from 'lodash';
import { FormattedMessage, injectIntl } from 'react-intl';
import styled, { css } from 'styled-components';
import { CollectiveType } from '../lib/constants/collectives';
import roles from '../lib/co... |
/// <reference path="vector2.js" />
/// <reference path="drawing.js" />
"use strict";
const GameSnapshot = function (snakePosition, snakeDireciton, snakeAlive, snakeLength, palletPosition) {
this.snakePosition = snakePosition;
this.snakeDireciton = snakeDireciton;
this.snakeAlive = snakeAlive;
this.sn... |
import React, { useCallback, useContext, useMemo, useRef, useState } from 'react';
import PropTypes from 'prop-types';
import CardPropType from 'proptypes/CardPropType';
import { Button, Col, Form, ListGroupItem, Row, Spinner } from 'reactstrap';
import { csrfFetch } from 'utils/CSRF';
import AutocompleteInput from ... |
'use strict'
var chai = require('chai')
var expect = chai.expect
var helper = require('../../lib/agent_helper')
var ParsedStatement = require('../../../lib/db/parsed-statement')
var Transaction = require('../../../lib/transaction')
function makeSegment(options) {
var segment = options.transaction.trace.root.add('M... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.