text stringlengths 3.22k 29.5k |
|---|
"use strict";
require('colors');
const fabcoinInitializationSpec = require('./initialization');
const fabcoinRPC = require('./rpc');
const childProcess = require("child_process");
const path = require('path');
var OutputStream = require('../../output_stream').OutputStream;
const crypto = require('crypto');
const crypto... |
var AWS = require('aws-sdk');
var sqs = new AWS.SQS({region: 'us-east-1'});
var lambda = new AWS.Lambda({region: 'us-east-1'});
var sns = new AWS.SNS();
var https = require('https');
var ses = new AWS.SES({apiVersion: '2010-12-01'});
//var ddb = new AWS.DynamoDB({apiVersion: '2012-10-08'});
var docClient = new AWS.Dyna... |
import vehicleBlockTypes from './vehicleBlockTypes.js';
class DomRenderer {
constructor() {
this.elements = {}; // Look-up object
this.showConnections = true;
this.highlightConnectionIds = [];
this.zoom = 1;
}
static convertSnakeCaseToPlainText(text) {
return text.split('-').join(' ');
}
static getVeh... |
const React = require('react');
const D3Component = require('idyll-d3-component');
const d3 = require('d3');
const H = require('hilbert');
const Path = require('svg-path-generator');
const IMAGE_BASE = 'https://d1qh62yyj9qkpe.cloudfront.net'
const jitter = (d, j = 40) => {
// return d;
return d + j * (Math.random... |
/**
* Time series database to store metrics.
*
* A metric is an immutable map with the following keys:
*
* time int required Number of seconds since UNIx epoch.
* name string required Name of the time series this metric belongs to.
* value number required Value of the metric
* tags... |
var inquirer = require("inquirer");
var axios = require("axios");
const fs = require('fs');
const convertFactory = require('electron-html-to');
var userName = "";
var userInfo = {};
var htmlStr = "";
var queryURL = "https://api.github.com/users/";
const colors = {
green: {
wrapperBackground: "#c3e3c1",
... |
import * as Const from './const'
import {C, M} from "./const"
import {isNull} from "@metro5/utils";
import {lpad} from "@metro5/cake";
class Datetime {
constructor() {
let args = [].slice.call(arguments);
this.value = new (Function.prototype.bind.apply(Date, [this].concat(args) ) );
if (... |
function createSvgFromPoints(points){
var path = null;
for (var i=0; i<points.length; i++){
if (i === 0){
path = `M${points[i].x} ${points[i].y}`;
} else {
path += ` L${points[i].x} ${points[i].y}`;
}
}
return path;
}
function pointDistance(start,end){
let distance = 0;
const dx = (... |
import React, { Component } from 'react';
import { Button } from 'antd';
// 需要提前安装md5-->npm install md5 --save
// import md5 from "md5"; // 加载md5
// import { stringify } from 'qs';
import 'ztree'; // 加载ztree
let ztreeIndex = 1;
let newCount = 1;
let className = 'dark',
curDragNodes,
autoExpandNode;
// 是否需要渲染ztree的... |
"use strict";
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
var _defineEnumerableProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineEnumerableProperties"));
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regene... |
import React from 'react';
import { Form,Avatar,Input,Button,Card} from 'antd';
import WETH from '../../../common/Loopring/ethereum/weth'
import {generateAbiData} from '../../../common/Loopring/ethereum/abi'
import * as fm from '../../../common/Loopring/common/formatter'
import * as math from '../../../common/Loopring/... |
const bunyan = require('bunyan');
var rootLogger = bunyan.createLogger({ name: 'shr-json-javadoc' });
var logger = rootLogger;
function setLogger(bunyanLogger) {
rootLogger = logger = bunyanLogger;
}
// Converts a card object into the formatted string representing cardinality
function cardToString(card) {
let min ... |
#!/usr/bin/env node
const XLSX = require('xlsx-style')
const fuzz = require('fuzzball');
const Const = require('./Constants')
const { allowedList, excludeList} = require('./Config')
const getCellForSheet = (sheet, column, row) => {
const add = { c: column, r: row };
const ref = XLSX.utils.encode_cell(add);
re... |
var prompt = require('prompt');
var Promise = require('bluebird');
var find = require('../find');
var fs = require('fs');
var path = require('path');
var exists = fs.existsSync;
var write = fs.writeFileSync;
var read = fs.readFileSync;
var _ = require('lodash');
function resolveGroup(options, gitlab) {
if (option... |
const DataFrame = require(`dataframe-js`).DataFrame
const csv = require(`csv-parser`)
const fs = require(`fs`)
const path = require("path")
const results = []
const iso_codes = [
"AG",
"AI",
"AW",
"BB",
"BL",
"BM",
"BQ",
"BS",
"BZ",
"CU",
"CW",
"DM",
"DO",
"GD",
"GF",
"GP",
"GY",
"H... |
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defi... |
/*jshint node:true*/
var fs = require('fs'),
path = require('path'),
utils = require('../lib/utils'),
EventEmitter = require('events').EventEmitter,
logger = require('winston').loggers.get('mimik'),
stepFileProcessor = require('./StepFileProcessor'),
DriverFactory = require('./drivers'),
Moc... |
/*
Saarland ESF 2007-2013
Download link: http://www.saarland.de/dokumente/tp_sff/Beguenstigtenverzeichnis_13_14.pdf
Github Referenz: https://github.com/os-data/eu-structural-funds/issues/37
*/
var scrapyard = require("scrapyard");
var async = require("async");
var path = require("path");
var request = require("r... |
import React, { Component } from "react";
import { useLocation } from "react-router-dom";
import SeatPicker from "react-seat-picker";
import { Card, Button, Container, Row, Col } from "react-bootstrap";
const calcSeats = () => {};
export default class Seats extends Component {
submitSeatsFinal() {
for (let rows... |
function ajaxReq(h, a, g, c) {
var f = j();
f.open(h, a, true);
var d = setTimeout(function () {
f.abort();
console.log("XHR abort:", h, a);
f.status = 599;
f.responseText = "request time-out"
}, 9000);
f.onreadystatechange = function () {
if (f.readyState != 4) {
return
}
clearTimeout(d);
if (f... |
import { Vector2, Vector3, Vector4, Matrix4, Euler } from 'three';
import { default as BrownDistortion } from '../cameras/distortions/BrownDistortion';
import { default as EbnerDistortion } from '../cameras/distortions/EbnerDistortion';
import { default as FishEyeDistortion } from '../cameras/distortions/FishEyeDistort... |
const Discord = require("discord.js");
const client = new Discord.Client();
var fs = require('fs');
const DISCORD_TOKEN = process.env.DISCORD_TOKEN;
const COUNTING_DOWN = {}
const ROASTS = [
`Your family tree is a fucking circle.`,
`I'd give you a nasty look but you've already got one.`,
`If you're going to be... |
const Observable = require("tns-core-modules/data/observable").Observable;
const getViewById = require("tns-core-modules/ui/core/view").getViewById;
const ObservableArray = require("tns-core-modules/data/observable-array").ObservableArray;
const frame = require("tns-core-modules/ui/frame");
const TextField = require("t... |
// server.js
var express = require('express'),
app = express(),
path = require('path'),
favicon = require('serve-favicon'),
morgan = require('morgan'),
bodyParser = require('body-parser'),
winston = require('winston'),
cors = require('cors'); // Allows other sites to use our API without restriction
... |
/* jshint -W097 */
/* jshint strict: false */
/* jslint node: true */
/* jshint expr: true*/
const expect = require('chai').expect;
const setup = require('./lib/setup');
const request = require('request');
let objects = null;
let states = null;
const PORT = 18183;
const TEST_STATE_ID = 'simple-api.0.testNumber';... |
import Color, {util} from "./rec2020.js";
const rec2020 = Color.spaces.rec2020;
Color.defineSpace({
// Only the PQ form of ICtCp is implemented here. There is also an HLG form.
// from Dolby, "WHAT IS ICTCP?"
// https://professional.dolby.com/siteassets/pdfs/ictcp_dolbywhitepaper_v071.pdf
// and
// Dolby, "Perce... |
const { MessageEmbed } = require(`discord.js`);
const { fetchuser } = require(`../utils/fetchuser`);
const ReactionInterface = require(`../utils/ReactionInterface`);
const Library = require(`../lib/index.js`);
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor... |
import React, { Component,Fragment } from 'react';
import PropTypes from "prop-types";
import { Modal,Loading } from 'tinper-bee';
import Btns from 'ac-btns';
import AcGrids from 'ac-gridcn';
import cloneDeep from 'clone-deep'
import 'ac-btns/build/Btns.css';
import 'ac-gridcn/build/Gridcn.css';
import request from 'ut... |
var GoogleAuth;
var isAuthorized;
const SCOPE = "https://www.googleapis.com/auth/spreadsheets";
const spreadsheetId = "1Y2Bvmysv6gdX958EJohAKXxUa5eEc80p-i4QKs7Zhak";
function handleClientLoad() {
gapi.load("client:auth2", initClient);
}
function initClient() {
var discoveryUrl =
"https://www.goog... |
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
//
// Copyright 2018-2020 The Board of Trustees of the Leland Stanford Junior University
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Licen... |
/* ----- FlipPanel class ----- */
var FlipPanel = function(parent, callback, opts) {
// Set up properties
this.parent = parent;
this.callback = callback;
// Handle optional parameters
this.nx = opts.hasOwnProperty('nx') ? opts.nx : 2;
this.ny = opts.hasOwnProperty('ny') ? opts.ny : 3;
this.imgFront = opts.hasO... |
/* eslint-disable camelcase */
'use strict';
require('dotenv').config();
const TelegramBot = require('node-telegram-bot-api');
const geolib = require('geolib');
const mongoose = require('mongoose');
const helpers = require('./helpers');
const captions = require('./captions');
const kb = require('./button');
const keyb... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.logout = exports.register = exports.auth = exports.me = exports.update = undefined;
exports.default = function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultUser;
var action = argum... |
import { createStitches } from '@stitches/react';
import {
gray,
mauve,
slate,
sage,
olive,
sand,
tomato,
red,
crimson,
pink,
plum,
purple,
violet,
indigo,
blue,
sky,
mint,
cyan,
teal,
green,
grass,
lime,
yellow,
amber,
orange,
brown,
bronze,
gold,
grayA,
mauv... |
const CELL = {
DEAD: 0,
ALIVE: 1
};
/**
* The AnimtationController controls the drawing on the canvas.
* The drawing function itself is passed from the Game class to the AnimtationController.
*/
class AnimationController {
stop = false;
frameCount = 0;
fps;
fpsInterval;
startTime;
now;
then;
ela... |
import fadePopup from './assets/popupFade';
const privacy = () => {
const linkPrivacy = document.querySelectorAll('span.link-privacy'),
popupPrivacy = document.querySelector('.popup-privacy');
popupPrivacy.style.cssText = 'transition: opacity .5s ease; opacity: 0;'
linkPrivacy.forEach(item => {
item.ad... |
// instanceManager 测试实例 管理器
const utils = require('lisa.utils')
const l = require('locale.node')
const reqNeedsAndOutpusSxy = require('./req.needsAndOutputsSxg')
const resNeedsAndOutputSxy = require('./res.needsAndOutputsSxg')
const LustJson = require('lustjson.js')
const reqTranslateSxg =require('./req.translateSxg'... |
const puppeteer = require('puppeteer')
const fs = require('fs')
const { promisify } = require('util')
const exists = promisify(fs.stat)
const path = require('path')
let didRedirect = false
const downloadsInProgress = []
const fromTargetUrl = res => res.url().endsWith('consultaPublica.xhtml')
const hasDisplay = 'contai... |
const TRACE = true;
const DEBUG = true;
const TESTING = true;
const CHARS = "abcdefghijklmnopqrstuvwxyz '";
const R = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1];
let rIndex = 0;
if (TRACE) console.log('travesty.js loaded');
// export function log(str) {
// if (DEBUG) console.log(str);
// }
export functio... |
'use strict';
var express = require('express');
var app = express();
var fs = require("fs");
var path = require('path');
var crypto = require('crypto');
var request = require('request');
var bodyParser = require('body-parser');
////////////////////////////////////////////////////////////////////////
//
// This script... |
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
/// <reference path="Titanium-vsdoc.js" />
/// <reference path="jquery-1.4.1-vsdoc" />
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#... |
/**
* This file will handle all the functions related to firebase auth.
*
* Note that the following lines would need to be added to any html
* file that wishes to use firebase auth:
* <script src="https://www.gstatic.com/firebasejs/7.17.1/firebase-app.js"></script>
* <script src="https://www.gstatic.com/firebasej... |
function box(flag, mine, clicked, neighborsWithMine){
this.flag = flag;
this.mine = mine;
this.clicked = clicked;
this.neighborsWithMine = neighborsWithMine;
};
var timer = 0;
var numberOfMines = 0;
var gameBoard;
var gameBoardWidthAndHeight;
var gameOver;
var numberOfFlags = 0;
$(document).ready(func... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
var StrongColor = "rgba(241,81,85,1)";
var Base = `h1, h2, h3, h4, h5, p, li, strong, ::slotted(*) {
font-family:"Quicksand_Book";
}`
class Menu extends HTMLElement {
constructor() {
super();
this._pages = [{
code : "index",
name : "Home",
link ... |
export const DDP_PROTOCOL_VERSION = '1';
export const DEFAULT_SOCKET_ID = 'default';
// These states also applies to connection, but:
//
// 1. queued is usually void
// because "connect" message has highest priority so it's hardly ever waiting in queue
// 2. pending = "connecting", and ready = "connected" of cours... |
const { getColorsByMonomer, basicShape } = require('./utils');
const { config } = require('../config');
function buildLine(fromX, fromY, toX, toY) {
const line = document.createElement('line');
line.setAttribute('x1', fromX);
line.setAttribute('y1', fromY);
line.setAttribute('x2', toX);
line.setAttribute('y2... |
/**
*
* Detail
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
// import { FormattedMessage } from 'react-intl';
import { createStructuredSelector } from 'reselect';
import { Line } from 'react-chartjs-2';
import { compose } from 'redux';
import injectSag... |
// page initialization
$(document).ready(function() {
// add upload app icon listener
$("#change_app_icon").change(function(event) {
submitChangeAppIcon(this);
});
initPageView();
var nextVersion = generateNextPossibleVersion(application.versions);
var uploadRevisionUrl = appCreationPage... |
var NUM_ROWS = 20;
var NUM_COLS = 10;
var BLOCK_WIDTH = 30;
var BLOCK_HEIGHT = 30;
var TICK_MS = 400;
var CURSOR_LEFT = 37;
var CURSOR_RIGHT = 39;
var CURSOR_DOWN = 40;
var KEY_a = 65;
var KEY_d = 68;
var KEY_r = 82;
var KEY_ENTER = 13;
var KEY_SPACE = 32;
var blockPiece = [
[0, 0, 0, 0],
[0, 1, 1, 0],
[0, 1, 1,... |
/**
* Created by irisroyalty on 16-12-3.
*/
var process = require("child_process");
function mainTest() {
var secrets = [
"tip defense crater attitude soccer weird liquid episode reopen robust subway lunar",
"chicken puzzle twin hurt ice season fashion tackle garbage any shaft dentist",
... |
import Moment from "moment";
import { demoMode, demoDate } from "../utils";
let deviceFileObjectsFiltered = [];
let deviceFileContentsFiltered = [];
let chartDataDevices = {};
export const pieOptionsFunc = () => {
return {
maintainAspectRatio: false,
tooltips: {
callbacks: {
label: function (i... |
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _store = require('store');
va... |
// String formatter
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] != 'undefined' ? args[number] : match;
});
};
var cards = [];
var activeCard;
var started = false;
var enabled = false;
var startTi... |
/***********************************************************************
The MIT License (MIT)
Copyright 2020 (c) kyomic <<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 restric... |
import { isarray } from "../../fachwerk.js";
export const parseSheet = data => {
return data.feed.entry.map(entry => {
return Object.keys(entry)
.map(field => {
if (field.startsWith("gsx$")) {
return [field.split("$")[1], entry[field].$t];
}
})
.filter(field => field)
... |
// require packages
const fs = require('fs');
const http = require('http');
const Random = require('random-js');
const request = require('request');
const Twit = require('twit');
const webshot = require('webshot');
// initiate package settings
const r = new Random();
const T = new Twit({
consumer_key: proces... |
/*
This file contains all of the functions related to the submission.xlsx file
*/
/// save airtable api key
const addAirtableKeyBtn = document.getElementById("button-add-airtable-key");
// Save grant information
const presavedAwardArray1 = document.getElementById(
"select-presaved-grant-info-list"
);
const addAward... |
/*--------------------------------------*/
/* Contenedores */
/*--------------------------------------*/
var ctnBotonera = new ContainerJS("#ctnBotonera");
var ctnBuscador = new ContainerJS("#ctnBuscador");
var ctnTabla = new ContainerJS("#ctnTabla");
var ctnModalCrear = new ContainerJS("#modalCrear");
... |
import html from 'nanohtml'
import morph from 'nanomorph'
import style from 'dom-css'
import indicateLoading from '../indicateLoading'
import hoverMenuButton from './hoverMenuButton'
import menuItem from './menuItem'
const scrollHoverButtonSize = 20
export const styles = css`
@import "./colors.less";
.menu {
... |
///////////////////////////////////////////////////////////
// "Live Clock" script - Version 2.6
// By <NAME> (<EMAIL>)
//
// Get the latest version from:
// http://www.zip.com.au/~astroboy/liveclock/
//
// Based on the original script: "Upper Corner Live Clock"
// available at:
// - Dynamic Drive (http://www.dynamicdr... |
/* JavaScript Benchmark.
*
* ### constructor
*
* |Name |Desc |
* |-------|----------------------|
* |fn |Code for speed testing|
* |options|Benchmark options |
*
* Available options:
*
* |Name |Desc |
* |------------|----------------------------... |
loadPersonJS=false;
masterData=null;
function showFirstServiceRequests(max) {
var counter=0;
var hided=false;
$("div.service-request").each(function() {
counter=counter+1;
if (counter<=max) {
$(this).css("display", "");
}
else if ($(this).css("display")=="none")
hided=true;
});
i... |
var rest = require('rest');
var mime = require('rest/interceptor/mime');
var errorCode = require('rest/interceptor/errorCode');
var defaultRequest = require('rest/interceptor/defaultRequest');
function isFunction(val) {
return typeof val === 'function';
}
function isObject(val) {
if (val === null) {
r... |
const $ = (id) => document.getElementById(id);
var inputContainer = $('main-input');
var presetsMain = $('main-presets');
var presetsContainer = $('presets-container');
var screenButton = $('screen-button');
var screenshotting = false;
var maxWidth = 0;
var maxHeight = 0;
const createDevice = (name, width, height) =... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import HistoryHeader from './history-header/history-header';
import HistoryData from './history-data/history-data';
import { withStyles } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableBody from '@ma... |
/*
* ==================================================
* _____ _
* | |___ ___ |_|___
* | | | _| -_|_ | |_ -|
* |_____|_| |___|_|_| |___|
* |___|
*
* By <NAME> (windy) and contributors
* (C) SpongePowered 2016-2017 MIT License
* https://github.com/SpongePowered/Ore
*
... |
/*
* Copyright (c) 2015-2016, Salesforce.com, Inc.
* All rights reserved.
* Licensed under the MIT license.
* For full license text, see LICENSE.md file in the repo root or
* https://opensource.org/licenses/MIT
*/
'use strict';
let d3 = require('d3');
let _ = require('lodash');
let chronological = {
type: 'c... |
/**
*
* @author <NAME> <<EMAIL>>
* @since 2.4.1
* @package eDonate\Build
* @license http://opensource.org/licenses/MIT MIT
* @copyright 2015 Agence Ecedi http://ecedi.fr
*/
'use strict';
/* global require */
/* global console */
/* global __dirname */
//require
var gulp = require('gulp');
var concat = require... |
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import {
Field,
CustomSelect,
Checkbox,
Button,
Icon
} from 'aqueduct-components';
import debounce from 'lodash/debounce';
// constants
import {
FLOOD_TYPE_OPTIONS,
EXPOSURE_OPTIONS
} from 'constants/risk';
// utils
import... |
class Ray {
constructor(origin, direction) {
this.origin = origin;
this.direction = direction;
}
}
class RayCamera {
constructor(width, height) {
this.width = width;
this.height = height;
}
// Return a row-major array of rays, one per pixel.
rayGrid() {
throw new Error('not implemented... |
Array.prototype.find=function(callback){
var ret = [];
for(var i=0,l=this.length;i<l;i++){
if(callback(this[i]))
ret.push(this[i]);
}
return ret.length <= 0 ? null : ret;
}
function getSourceObj(sourceText) {
// 清除不需要的信息
sourceTex... |
var table;
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } });
$(document).ready(function(){
table = $('#drivers').DataTable({
'ajax': {
'url': "/getDriverAprovedsView",
'type':"GET",
},
'responsive' : true,
'autoWidth' : false,
'destroy' ... |
/**
* Copyright © 2021 Wuyuan Info Tech Co., Ltd. All rights reserved.
* License: MIT
* Site: https://wuyuan.io
* Author: zyz
* Updated: 2020/12/30
* Created: 2020/12/16
**/
'use strict';
var BaseServiceClass = require('./service-base');
const { Pool, Client } = require('pg')
var async = require('async');
va... |
var fs = require('fs');
var path = require('path');
var _ = require('lodash');
var benchmark = require('benchmark');
var mustache = require('mustache');
var deepEqual = require('deep-equal');
var npm = require('npm');
var async = require('async');
var jsonStringifySafe = require('json-stringify-safe');
var format = req... |
function preparePlayers() {
preparePlayerMyself();
// Animate the movement
scene.registerBeforeRender(function () {
if (players) {
for (var i in players) {
players[i].move();
// to-do: check if we need to load new ground tiles
}
}
... |
/**
* WechatBot
* - https://github.com/gengchen528/wechatBot
*/
const { Wechaty } = require('wechaty');
const schedule = require('./schedule/index');
const config = require('./config/index');
const untils = require('./utils/index');
const superagent = require('./superagent/index');
// const getNews = require('./get... |
import React, { useState, useEffect } from 'react'
import { mermaidAPI } from 'mermaid'
import { useStore } from '../../../hooks/useStore'
import MermaidCard from './MermaidCard'
import './styles.scss'
const MermaidRenderer = ({ nodes, layout }) => {
const { repName } = useStore()
const [mermaidGraph, setMermaidG... |
//1
function cloneDeep(obj) {
let copy;
// обрабатывает 3 simple types и так же null || undefined
if (!obj || typeof obj != 'object') return obj;
//Обрабатывает дату
if (obj instanceof Date) {
copy = new Date();
copy.setTime(obj.getTime());
return copy
}
//Обра... |
const { DBConfig, allQ, showAllRows, runQ } = require("../DB");
const { _jsonError, getNowSeconds, generateRandNum } = require("../misc");
const { fetchUserHeroes, fetchHero, updateUserHero, giveUserHero } = require("../models/Heroes");
const { fetchUserItemsIds, fetchItem, fetchRandomItem, deleteItemById, saveUserItem... |
/*
* Jira Ticket:
* Created Date: Tue, 10th Nov 2020, 16:13:18 pm
* Author: <NAME>
* Email: <EMAIL>
* Copyright (c) 2020 The Distance
*/
import React, {useEffect, useState} from 'react';
import {View, Text, Dimensions, Platform, ActionSheetIOS} from 'react-native';
import {ScaleHook} from 'react-native-design-to... |
/*
[JspRun!] (C)2007-2011 JspRun Inc.
This is NOT a freeware, use is subject to license terms
$RCSfile: post_editor.js,v $
$Revision: 1.4 $
$Date: 2011/01/04 10:27:03 $
*/
function checklength(theform) {
var message = bbinsert && wysiwyg ? html2bbcode(getEditorContents()) : (!theform.parseurloff.checked ? parse... |
'use strict';
import { Markup } from './Markup'
import * as MarkupTypes from './MarkupTypes'
import { createMarkupPathSvg, composeRGBAString, setAttributeToMarkupSvg,
updateMarkupPathSvgHitarea, checkLineSegment, addMarkupMetadata } from './MarkupsCoreUtils'
import { cloneStyle } from './StyleUtils'
import { EditM... |
const os = require('os');
const path = require('path');
const cp = require('child_process');
const net = require('net');
const fs = require("fs");
const request = require('request');
const compareVersions = require('compare-versions');
const { error } = require('console');
const PGLET_VERSION = "0.1.12";
var pgletExe... |
/*jshint esnext:true, eqnull:true, undef:true */
/*globals require */
'use strict'; /*jshint -W097 */
import {Klass} from './classviz.es6.js';
import {DEFAULT_COLORS} from './utils.es6.js';
var dataSym = Symbol();
var d3 = require('d3');
import {
dataPointSchema,
timeDataPointSchema,
dataSeriesSchema,
timeDa... |
export default function(locale, short = false) {
const plural = plurals[locale.substr(0,2)] || plurals._default
return short ? plural.replace(/^.*plural=/, '').slice(0,-1) : plural
}
const plurals = {
"_default" : "nplurals=2; plural=(n != 1);",
"ach": "nplurals=2; plural=(n > 1);",
"af": "nplurals... |
var global_usuario_solisito = 0;
$(document).ready(function () {
//inicializacin de los objetos
$("#contador_reguistros").attr("disabled", true)
$("#m_folio").attr("disabled", true)
$("#m_estatus").attr("disabled", true)
$("#m_sucursal").attr("disabled", true)
$("#m_consepto").attr("disabled", ... |
import '../../App.css';
import React from 'react';
import JsonRpcClient from 'react-jsonrpc-client';
import { useState, useEffect, useRef } from 'react';
import { Form, Button, Row, Col } from 'react-bootstrap';
import { SetProductToUpdateDetails } from '../../Components/actions/ProductActions';
import ReactPaginate fr... |
"use strict";
////////////////////////////////////////////////////////////////
// GLSL
////////////////////////////////////////////////////////////////
const vs_projection =
`#version 300 es
precision highp float;
in vec4 aVertexPosition;
in vec4 aVertexColor;
uniform vec4 uCameraPosition;
uniform mat4 uModelMat;... |
import fs from 'fs'
import path from 'path'
import webpack from 'webpack'
import sources from 'webpack-sources'
const { ConcatSource, SourceMapSource, OriginalSource } = sources
const {
util: { createHash },
} = webpack
const NS = path.dirname(fs.realpathSync(__filename))
const pluginName = 'extract-plugin'
cons... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = R... |
import merge from 'lodash/merge';
import { notificationNew } from './notifications';
// PARSERS:
import { gffParser } from '../parsers/gff';
import { metaParser } from '../parsers/metadataParser';
import { updateLineGraphData } from './lineGraph.js';
import { roaryParser } from '../parsers/roaryParser';
import { plotPa... |
/*
* If not stated otherwise in this file or this component's Licenses.txt file the
* following copyright and licenses apply:
*
* Copyright © 2020 Tata Elxsi Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Y... |
// @remove-file-on-eject
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same d... |
var assert = require('chai').assert
// PART 0: Write a function called squareDance() that squares each number in an array.
var array = [4,16,25,36]
var squareDance = function(array) {
var total = []
for (var index = 0; index < array.length; index = index + 1) {
var square = array[index] * array[index]
... |
'use strict';
import React, { Component } from 'react';
import { Image, View, Text, StyleSheet, RefreshControlBase } from 'react-native';
import firestore from '@react-native-firebase/firestore';
import auth from "@react-native-firebase/auth";
import CustomButton from './CustomButton';
// React Native module for a Ti... |
import React, { Component } from 'react';
import {connect} from "react-redux";
import { Modal } from 'reactstrap';
import {LineChart, Line, CartesianGrid, ReferenceLine, XAxis, ResponsiveContainer} from 'recharts';
import {FacebookIcon, TwitterIcon} from 'react-share';
import {set_order_close_modal} from '../actions/me... |
let outerVideoId = "M7lc1UVf-VE"
// Calls the play video function on the server
function playVideo(rn) {
socket.emit('play video', {
room: rn
});
}
// Calls the sync function on the server
function syncVideo(rmnum) {
let currTime = 0
let state
const videoID = outerVideoId
switch (... |
/*
Copyright (c) 2018 ZSC Dev Team
*/
var cC_ModuleName = [];
var cC_ModuleAdr = [];
function cC_getContractFullName(contractName) {
if (contractName == 'TestToken') {
return "./zsc/db/EthCore/ZSCTestToken.sol:ZSCTestToken";
} else if (contractName == 'AdmAdv') {
return "./zsc/adm_adv.sol:AdmA... |
"use strict";
exports.__esModule = true;
var tslib_1 = require("tslib");
var utils_1 = require("./utils");
var functions = require('firebase-functions');
var admin = require('firebase-admin');
exports["default"] = functions.https.onRequest(function (req, resp) { return tslib_1.__awaiter(void 0, void 0, void 0, function... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.