text stringlengths 3.07k 16k |
|---|
/*
CUSTOM FORM ELEMENTS
Created by <NAME>
www.ryanfait.com
The only things you may need to change in this file are the following
variables: checkboxHeight, radioHeight and selectWidth (lines 24, 25, 26)
The numbers you set for checkboxHeight and radioHeight should be one quarter
of the total height of the image wan... |
// MIT License
//
// Copyright (c) 2020 CADCloud
//
// 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, me... |
const store = require('Storage');
const boolFormat = (v) => v ? "On" : "Off";
function showMainMenu() {
const mainmenu = {
'': {
'title': 'App Manager',
},
'Free': {
value: undefined,
format: (v) => {
return store.getFree();
},
onchange: () => {}
},
'Compact... |
'use strict';
const _ = require('lodash');
const cheerio = require('cheerio');
const fs = require('fs');
const marky = require('marky-markdown');
const path = require('path');
const util = require('../common/util');
const basePath = path.join(__dirname, '..', '..');
const docPath = path.join(basePath, 'doc');
const r... |
// Getting our favour data
var data = require('../data.json');
var user = require('../user.json');
exports.view = function( req, res ) {
// Count up all stats and find the favour that you requested
var completed = 0;
var inDebt = 0;
var userName = user.user.name;
var birthday = user.user.birthday;
var link = ... |
require('electron-reload')(__dirname);
const electron = require('electron');
const { app, BrowserWindow, Menu, Notification, ipcMain, Tray } = electron;
const config = {
clientId: '26940866-2575-4627-B2A4-DFF5972172B3',
clientSecret: '<KEY>',
clientAssertion:
'<KEY>',
authorizationUrl: 'https://app.vssps.v... |
import Vue from 'vue'
import VueRouter from 'vue-router'
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import '../theme/index.css'
import globle from './assets/js/global.js'
import App from './App.vue'
import qs from 'qs'
import es6Promise from 'es6-promise'
import axios from 'axio... |
const fs = require("fs");
const path = require("path");
const mkdirp = require("mkdirp");
const tmp = require("tmp");
const util = require("util");
const rollup = require("rollup");
const svelte = require("rollup-plugin-svelte");
const resolve = require("rollup-plugin-node-resolve");
const commonjs = require("rollup-p... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
var asp = require('bluebird').promisify;
var Promise = require('bluebird');
var glob = require('glob');
var path = require('path');
var url = require('url');
var getLoadDependencies = require('./trace').getLoadDependencies;
var fromFileURL = require('./utils').fromFileURL;
var toFileURL = require('./utils').toFileURL... |
import React, { useState, useEffect, useRef } from "react";
import Highcharts from "highcharts/highstock";
import HighchartsReact from "highcharts-react-official";
import axios from "axios";
import Select from "react-select";
import DataTabs from "./tabs";
import { Box, Card, Main } from "grommet";
import { isBrowser, ... |
import * as Web3 from 'web3';
import {
AppBar,
Box,
Button,
Chip,
Container,
Grid,
Input,
InputLabel,
Link,
MenuItem,
Select,
Toolbar,
Typography,
} from '@mui/material';
import { alpha, makeStyles } from '@mui/styles';
import { useEffect, useState } from 'react';
co... |
import * as support from './_support';
import * as options from './_defaults';
import * as settings from './_settings';
import { percentage2number } from './_helpers';
import { extend } from '../helpers';
var DragEvents = /** @class */ (function () {
/**
* Create the gestures.
* @param {HTMLElement} surfa... |
#!/bin/node
const commandLineArgs = require('command-line-args');
const beautify = require('js-beautify').js_beautify;
const Sequelize = require('sequelize');
const moment = require('moment');
const migrate = require('../lib/migrate');
const path = require('path');
const _ = require('lodash');
const optionDefinitio... |
var fs = require('fs')
var path = require('path')
var images = require('images')
var http = require('http')
URL = {
'gaode': 'http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}',
'gaode.image': 'http://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
... |
import { getJobDataAll, getJobDataUser, getUserPercentile } from '../../utils/API';
export const CHART_ALL = 'CHART_ALL';
export function getChartAllData() {
return async (dispatch, getState) => {
try {
const data = await getDBData();
const apiResAll = data[0];
const apiResUser = data[1];
... |
// Copyright 2011 <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, publish, ... |
import React from 'react'
import { graphql, Query, withApollo } from 'react-apollo';
import { Comment } from 'semantic-ui-react'
import moment from 'moment'
import SendMessage from '../components/SendMessage'
import { CREATE_MESSAGE_MUTATION, MESSAGES_QUERY, MESSAGE_SUBSCRIPTION } from '../graphql/message'
import FileU... |
var courriersEntrantsBrouillonTable;
var checkedelementsCourrierEntrantBrouillon = [];
var boxes;
$(document).ready(function () {
courriersEntrantsBrouillonTable = $(
"#courriers_entrant_brouillon_datatables"
).DataTable({
processing: true,
serverSide: true,
pageLength: 100,
bInfo: false,
i... |
import * as React from 'react'
import { useWindowSize } from '../hooks/useWindowSize'
import { getRGBAColor } from '../utils'
import { cellSize } from '../constants'
import { exportData } from '../export-data'
const generateRandomColor = () => Math.floor(Math.random() * 255)
const AppStateContext = React.createConte... |
var express = require('express');
var router = express.Router();
var Account = require('../models/account');
var Event = require('../models/event');
var userLogic = require('../logic/userLogic');
var multer = require('multer');
var http = require('http');
//Last modified by <NAME>
var upload = multer({
dest: 'publi... |
var parser = require('can-view-parser');
var domEvents = require('can-util/dom/events/events');
var nodeLists = require('can-view-nodelist');
var makeFrag = require('can-util/dom/frag/frag');
var childNodes = require('can-util/dom/child-nodes/child-nodes');
var canReflect = require("can-reflect");
require("can-util/do... |
const express = require('express');
const moment = require('moment');
const router = express.Router();
const {
web3,
isAddress,
getStakedBalance,
getStakedRewards,
getStakedTimeLeft,
getBNBBalance,
getAccountCharacters,
getAccountWeapons,
getAccountSkillReward,
getIngameSkill,
getCharacterExp,
... |
function SiriWave(opt) {
this.opt = opt || {};
this.K = 2;
this.F = 6;
if (!devicePixelRatio) devicePixelRatio = 1;
this.width = devicePixelRatio * (this.opt.width || 320);
this.height = devicePixelRatio * (this.opt.height || 100);
this.MAX = (this.height / 2) - 4;
this.speed = this.o... |
const fs = require('fs');
const BasicQueue = require('better-queue');
const MemoryStore = require('better-queue-memory');
const SqlStore = require('better-queue-sql');
const _ = require('lodash');
// Improvements to SqlStore
SqlStore.prototype.getTaskStates = function(n, fields, cb) {
const self = this;
const firs... |
const logger = require('./logger');
const {performance} = require('perf_hooks');
class ParticalSwarmOpt{
constructor(cfg = {iter: 10, size: 128, phi1: 0.5, phi2: 0.5, neighbors: 10, vMax: 0.5}, predict, J) {
this.cfg = cfg;
this.predict = predict;
this.J = J;
}
rand(a, b) {
return (b - a) * Math... |
/***
* This file showcases all of react-native-slang features.
* We use native-base for our UI components
*
* Copyright (c) 2017-2019 Slang Labs Private Limited. All rights reserved.
***/
import React, {Component} from 'react';
import Slang from 'react-native-slang';
import {StyleSheet, ScrollView} from 'react-n... |
require('dotenv').config();
const { existsSync, writeFileSync, mkdirSync, createWriteStream } = require("fs");
const { join } = require("path");
const sharp = require('sharp');
const fetch = require('node-fetch');
const SRC_FOLDER = join(process.cwd(), "src");
const ASSETS_FOLDER = join(process.cwd(), "static");
co... |
"use strict";
var numCardsPulled = 0;
var player = {
cards: [],
score: 0,
money: 100
};
var dealer = {
cards: [],
score: 0
};
document.getElementById("player-money").innerHTML = "Your money: $" + player.money;
document.getElementById("hit-button").disabled = true;
document.getElem... |
var _ = require('underscore')
var request = require('request')
var util = require('util')
var S = require('string')
module.exports = function (config, context) {
var slackApi = config.slackApi
/**
* Get application config from slackConfig
* @param {Object} snsMessage
* @return {Object}
*/
var getApp... |
import { Stage, CanvasLayer, CanvasSprite } from 'tigerface-display';
import { Point, Line, Circle, Rectangle, Polygon, Curve, Arc } from 'tigerface-shape';
const stage = new Stage({
fps: 16,
width: 400,
height: 400,
style: {
'background-color': 'rgba(255,255,0,0.3)',
},
}, document.getElem... |
/**
* APP 权限设置模块
*/
import { Tab, Tabs, Tree, toast } from 'amis';
import { eachTree, mapTree } from 'amis/lib/utils/helper';
import { map } from 'lodash';
import React, { useEffect, useRef, useMemo } from 'react';
import { routeLimitKey } from "../../constants";
import { getLimitMenus } from "../../routes/limit";
im... |
'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 ("... |
/*
The MIT License (MIT)
Copyright (c) 2015 University of East Anglia, Norwich, UK
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 ... |
#!/usr/bin/env node
'use strict'
var addStream = require('add-stream')
var conventionalChangelog = require('conventional-changelog')
var fs = require('fs')
var meow = require('meow')
var tempfile = require('tempfile')
var _ = require('lodash')
var resolve = require('path').resolve
var cli = meow(`
Usage
con... |
import { World, Desert } from '../../../babylon/js/vrspace-min.js';
//collisions:
//group296_sand_houses:lambert6_0 - ground
//group_296_lambert52,53,(57),61,(62),66
//group_296_lambert:51_0,54,64,65,(77),80,83,88-fountain,
var collisionObjects = [
//"group296_sand_houses:lambert6_0", // we have own ground, not requir... |
// Copyright IBM Corp. 2013,2016. All Rights Reserved.
// Node module: loopback-connector-rest
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
var traverse = require('traverse');
var debug = require('debug')('loopback:connector:rest');
var g = require('s... |
import path from 'path';
import { Exec, Logger, PluginManager, FileUtils, Resolver, Common } from 'rnv';
import compareVersions from 'compare-versions';
const {
getAppFolder,
getAppTemplateFolder,
getConfigProp,
getFlavouredProp,
addSystemInjects
} = Common;
const { logTask, logWarning } = Logger;... |
// Copyright 2019 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 in ... |
// This file is the code for the server. All server code goes in this file only! The server will talk to each player.
// This is the port that the server will run on. Change it by changing this declaration. But keep it 2000 for now pls.
const PORT = 2000
// These are essentially imports. They are grabbing express for... |
function change(small, row) {
document.getElementsByClassName("smol")[row].src = small;
}
function lucky() {
var image = ["carlson.jpg", "johnston.jpg", "morrill.jpg", "shepherd.jpg", "snyder.jpg", "walter.jpg"];
document.getElementById("bigboi").src = image[Math.floor(6 * Math.random())];
}
let isRotating=... |
import React, { useLayoutEffect } from 'react'
import { Link } from 'react-router-dom'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { withRouter } from 'react-router'
import HomeLayout from '../../../../layouts/HomeLayout'
import Icon from '../../../../components/Icon'
import TabsSwi... |
import express, {Router} from 'express';
import session from 'express-session';
import mongoSessionStore from 'connect-mongo';
import cors from 'cors';
import vhost from 'vhost';
import Config from '../../../Config/Config.server';
import DB from '../../DB/index';
import APIError from '../errors/APIError';
import CSRFTo... |
'use strict'
let _ = require('lodash')
let normalizeName = function (id) {
/* eslint-disable */
return id.replace(/\.|\-|\{|\}/g, '_').split(" ").join("_")
/* eslint-enable */
}
let getPathToMethodName = function (opts, m, path) {
if (path === '/' || path === '') {
return m
}
// clean url path for req... |
/**
* @flow
*/
import React from 'react'
import styled from 'styled-components'
import { darken, rgba } from 'polished'
import {
Logo,
Divider,
RoundButton,
Icon,
Loader
} from '../../common/components'
import {
Label,
Input
} from '../../features/form/components/fragments/LabeledInput'
import { Loadin... |
'use strict'
const { ipcMainInternal } = require('@electron/internal/browser/ipc-main-internal')
// The history operation in renderer is redirected to browser.
ipcMainInternal.on('ELECTRON_NAVIGATION_CONTROLLER_GO_BACK', function (event) {
event.sender.goBack()
})
ipcMainInternal.on('ELECTRON_NAVIGATION_CONTROLLER... |
var scaleFactor = 1;
var apiResult;
function drawClockArc(ctx, radius, lineWidth, color, endAngle) {
var startAngle = 0.25 * Math.PI;
var center_x = 150;
var center_y = 150;
ctx.beginPath();
ctx.arc(center_x, center_y, radius, startAngle, endAngle);
ctx.lineWidth = lineWidth;
ctx.strokeStyle = color;
... |
// forked from demouth's "ASCII Art" https://jsdo.it/demouth/dxX2
setTimeout(function(){
var img = document.createElement("img");
var img2 = document.createElement("img");
var counter = 0;
img.onload = function(e){
counter += 1;
if(counter == 2)
animateFunction()
}
img2.on... |
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
goog.module('mr.LoggerTest');
goog.setTestOnly('mr.LoggerTest');
const Config = goog.require('mr.Config');
const Logger = goog.require('mr.Logger');
des... |
var http = require('http');
var https = require('https');
var querystring = require('querystring');
var url = require('url');
var EventProxy = require('eventproxy');
var config = require('../config');
var U = require('../util');
var db = require('../models/db');
var mUser = require('../models/user');
var mSizegroup =... |
import {buildPathUrl, buildRequestUrlPath, buildAuthHeader } from '../utils'
/**
* Retrieves a list of content items by reference name.
* @memberof AgilityFetch.Client.Content
* @param {Object} requestParams - The parameters for the API request.
* @param {string} requestParams.referenceName - The unique reference ... |
import React, { useState, useRef } from 'react';
import { Table, Input, InputNumber, Popconfirm, Form, Typography, Space, Button } from 'antd';
import Highlighter from 'react-highlight-words';
import { SearchOutlined } from '@ant-design/icons';
import 'antd/dist/antd.css'
const originData = [];
for (let i = 0; i < 10... |
"use strict";
/*
Copyright (c) 2017 by Autodesk, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, ... |
'use strict';
const assert = require('bsert');
const Network = require('../lib/protocol/network');
const Address = require('../lib/primitives/address');
const Claim = require('../lib/primitives/claim');
const FullNode = require('../lib/node/fullnode');
const consensus = require('../lib/protocol/consensus');
const owne... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Atlas = void 0;
const fs_1 = __importDefault(require("fs"));
const Environment_1 = require("./En... |
import React, { Component } from "react";
import classnames from "classnames";
import WatchedQueries from "./WatchedQueries";
import Mutations from "./Mutations";
import Explorer from "./Explorer";
import Inspector from "./Inspector";
import { Sidebar } from "./Sidebar";
import Apollo from "./Images/Apollo";
import G... |
import React, {useEffect, useState} from 'react'
import {
CButton,
CCard,
CCardBody,
CCardFooter,
CCol,
CContainer,
CForm,
CInput,
CInputGroup,
CInputGroupPrepend,
CInputGroupText,
CRow
} from '@coreui/react'
import CIcon from '@coreui/icons-react'
import Loading from "../../../components/Common... |
const lang = {
zh: {
name: '只能是汉字、字母、数字、下划线',
code: '只能是字母、数字、下划线',
trim: '两边不能有空格',
phone: '联系方式格式不正确',
telphone: '办公电话格式不正确(010-8888888)',
identity_format_error: '身份证号格式错误',
identity_code_error: '地址编码错误',
identity_check_error: '校验位错误',
Email: '邮箱格式不正确',
number_unique_zero: '输... |
/*jshint laxcomma:true asi:true */
var net = require('net')
, util = require('util')
, EventEmitter = require('events').EventEmitter
var debugOut = console.log.bind(console)
module.exports = function(port, host, debug) {
if(!port) port = 8080
if(!host) host = '127.0.0.1'
return new Argyle(port, host, debug... |
//React
import React, {useState} from 'react';
import { Link, Redirect } from 'react-router-dom';
// CSS
import './cadastroHospede.css';
// Componentes
import NavBar from '../../components/Navbar';
import Footer from '../../components/Footer';
//Conexão com a API
import useHospedeAPI from '../../helpers/HospedesApi'... |
import { ApolloLink, Observable } from 'apollo-link';
// import React from 'react';
import { withApollo } from 'react-apollo';
// import PropTypes from 'prop-types';
// import { LayoutCenter } from '../../../common/components';
import { getItem, setItem, removeItem } from '../../clientStorage.web.js';
// import Featur... |
console.log("Basic Example - loading object");
var camera, scene, renderer;
var width = 600;//window.innerWidth; //= 600;
var height = 400;//window.innerHeight; // = 400;
var loadedObj;
var rotation = 0;
var group;
var cube;
var mouseX = 0, mouseY = 0;
var windowHalfX = width / 2;
var windowHalfY = height / 2;
var c... |
let mix = require('laravel-mix');
let SVGSpritemapPlugin = require('svg-spritemap-webpack-plugin');
let svgSpriteDestination = "client/dist/images/sprite.svg"
mix.webpackConfig({ plugins:
// [ new SVGSpritemapPlugin({ src: 'client/src/images/*.svg', filename : svgSpriteDestination, svgo : {removeTitle : true} }) ... |
'use strict';
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as DocumentActions from '../actions/documentActions';
import { Formats } from './documentTextSection';
import ComponentWithPopup from './componentWithPopup';
import { getTimeMessage } fr... |
import React from "react";
import fetch from "isomorphic-fetch";
import MainLayout from "components/MainLayout";
import HomeUser from "components/HomePageComponents/HomeUser";
import {
getCurrentUrl,
extractSourceSetSlug,
addCommasToNumber,
getMenuItemUrl
} from "lib";
import { NUMBER_OF_USER_GUIDES_TO_SHOW ... |
const mongoose = require('mongoose');
const mongooseHistory = require('../lib/mongoose-history');
const uniqueValidator = require('mongoose-unique-validator');
const mongooseautopopulate = require('mongoose-autopopulate');
const common = require('../helpers/common');
var Float = require('mongoose-float').loadType(mongo... |
var chart = c3.generate({
bindto: '#cpu',
data: {
x: 'x',
rows: [
['x', 'user', 'system']
],
types: {
user: 'area',
system: 'area'
},
groups: [['user', 'system']]
},
transition: {
duration: 100
},
point: {
... |
// This is a JavaScript file
var application_key = "<KEY>";
var client_key = "<KEY>";
var ncmb = new NCMB(application_key, client_key);
var Places = ncmb.DataStore("Places");
var map = new OpenLayers.Map("map");
var mapnik = new OpenLayers.Layer.OSM();
map.addLayer(mapnik);
// マーカーを表示するためのレイヤーを準備
var mar... |
import React, { Fragment, Component } from "react";
import axios from "axios";
import "./getSchools.css";
import PlacesAutocomplete, {
geocodeByAddress,
getLatLng,
} from "react-places-autocomplete";
import { AuthContext } from "../Context/AuthContext";
import { ToastContainer, toast } from "react-toastify";
import... |
var Canvas = require("canvas"),
fs = require("fs"),
Image = Canvas.Image;
var classifySkin = function(r, g, b) {
var rgbClassifier =
r > 95 &&
g > 40 &&
g < 100 &&
b > 20 &&
Math.max(r, g, b) - Math.min(r, g, b) > 15 &&
Math.abs(r - g) > 15 &&
r > g &&
... |
import { compact, uniqBy, pick } from 'lodash'
import stelace, { fetchAllResults } from 'src/utils/stelace'
import * as types from 'src/store/mutation-types'
import * as api from './api'
import { date } from 'quasar'
import { populateAsset } from 'src/utils/asset'
import { populateUser } from 'src/utils/user'
export a... |
import React, { Fragment, useEffect, useState } from "react";
import PropTypes from "prop-types";
import { useTranslation } from "react-i18next";
import {
Card,
CardContent,
CardHeader,
Grid,
Button,
Box,
makeStyles,
IconButton
} from "@material-ui/core";
import CloseIcon from "mdi-material-ui/Close";
i... |
/*
* Copyright 2019 is-land
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... |
// -*- mode: js; js-indent-level:2; -*-
/* Copyright 2018-present Samsung Electronics Co., Ltd. and other contributors
*
* 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... |
/*
* Copyright 2018 - 2021 Swiss Federal Institute of Technology Lausanne (EPFL)
*
* 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.
*
* U... |
import React, {useEffect }from 'react';
import { connect } from 'react-redux'
import {BrowserRouter, Switch, Route } from 'react-router-dom';
import { Home, Moldes, AddMolde, UpdateMolde, Machines, AddMachine, UpdateMachine, Material, AddMaterial, UpdateMaterial, Models, AddModel, UpdateModel,
Issues, AddIssue, Upda... |
export function randint(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
export function generateNumberOfBombs(max_value) {
return randint(max_value * 0.2, max_value * 0.8);
}
function isValidPosition(i, j, max_rows, max_columns) {
return (i > -1 && i < max_rows) && (j > -1 && j < max_columns);
}
... |
import Vue from 'vue'
import storage from '@/common/storage'
import { STORAGE_KEY, PROBLEM_LEVEL } from '@/common/constants'
import api from "@/common/api"
import store from '@/store'
// function submissionMemoryFormat (memory) {
// if (memory === undefined || memory ===null || memory === '') return '--'
// // 104... |
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _ty... |
/**
* @module els/common/setting_elements
*/
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.... |
var fs = require('fs')
var path = require('path')
var EventEmitter = require('events').EventEmitter.prototype
var matchesStart = require('./matches_start')
var minimatch = require('minimatch')
var Set = require('set')
/*
A file info keeper keeps the stat objects and watcher object for a collection of files (or direc... |
import React, { useState, useEffect } from 'react';
import { SearchOutlined, Close, Search } from '@mui/icons-material';
import {
CircularProgress,
Container,
Divider,
Grid,
InputAdornment,
TextField,
List,
Dialog,
Button,
AppBar,
Toolbar,
IconButton,
Typography,
... |
import React, { Component } from 'react';
import { Redirect } from 'react-router-dom';
import Section from 'shared/components/section/section';
import FormButton from 'shared/components/form/formButton/formButton';
import { patchBackend } from 'shared/utils/apiHelper';
import Identifier from './formComponents/identifie... |
/*
* author : <NAME> ( hiro )
* <EMAIL>
*
* phyShit.js
*/
window.requestAnimationFrame = window.requestAnimationFrame
|| window.webkitRequestAnimationFrame
|| window.mozRequestAnimationFrame
|| window.oRequestAnimationFrame
|| window.msRequestAnimationFrame
|| function(callback) {
window.setTimeout(callbac... |
/* Copyright (C) 2016 NooBaa */
import template from './namespace-resources-table.html';
import ConnectableViewModel from 'components/connectable';
import ko from 'knockout';
import { deepFreeze, createCompareFunc, throttle } from 'utils/core-utils';
import { realizeUri } from 'utils/browser-utils';
import { includesI... |
import React from "react";
import VoteModuleFilter from "./VoteModuleFilter";
class VoteModuleResults extends React.Component {
state = {
chosenStature: "all",
chosenIndividualType: "",
by: "entity"
};
abbreviateNumber(value) {
var newValue = value;
if (value >= 1000) {
var suffixes = [... |
'use strict';
/**
* Log management.
*/
const BbPromise = require('bluebird');
const _ = require('lodash');
const chalk = require('chalk');
const moment = require('moment');
const os = require('os');
function getApiLogGroupName(apiId, alias) {
return `API-Gateway-Execution-Logs_${apiId}/${alias}`;
}
module.exports... |
const { execSync } = require('child_process')
const { PrismaClient, load_balancer_scheme_enum, task_definition_cpu_memory_enum } = require('@prisma/client');
const pkg = require('./package.json');
// TODO replace with your desired project name
const PROJECT_NAME = pkg.name;
const REGION = process.env.AWS_REGION ?? ''... |
(function () {
// The width and height of the captured photo. We will set the
// width to the value defined here, but the height will be
// calculated based on the aspect ratio of the input stream.
var width = 320; // We will scale the photo width to this
var height = 0; // This will be computed based... |
/* eslint-disable one-var, one-var-declaration-per-line, no-unused-vars,
prefer-const, import/no-mutable-exports */
/**
* `safeCall` is used by our modified babel-plugin-safe-bind.js.
* `export` is stripped in the final output and is only used for our NodeJS test scripts.
*/
export let
// window
SafeCustomE... |
/*
* Copyright 2020 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wr... |
import { COLUMNS } from './consts';
const startPositionObject = {
a8: 'bR',
b8: 'bN',
c8: 'bB',
d8: 'bQ',
e8: 'bK',
f8: 'bB',
g8: 'bN',
h8: 'bR',
a7: 'bP',
b7: 'bP',
c7: 'bP',
d7: 'bP',
e7: 'bP',
f7: 'bP',
g7: 'bP',
h7: 'bP',
a2: 'wP',
b2: 'wP',
c2: 'wP',
d2: 'wP',
e2: 'wP',
... |
import offset from "./offset.js";
import websomFetch from "./fetch.js";
import Entity from "./entity";
let scriptsStillLoading = {};
let listeners = {};
export default (store, packages, context) => ({
on(event, cb) {
if (!listeners[event])
listeners[event] = [];
listeners[event].push(cb);
},
trigger(eve... |
const express = require('express');
const path = require('path');
const fs = require('fs');
const yaml = require('js-yaml');
const morgan = require('morgan');
const log4js = require('log4js');
const bodyParser = require('body-parser');
const SwaggerUI = require('express-swaggerize-ui');
const rfs = require('rotating-fi... |
const { minify } = require("terser");
const postcss = require("postcss");
const autoprefixer = require("autoprefixer");
const importer = require("postcss-import");
const csso = require("postcss-csso");
const { writeFile, readFile, readFileSync, readdirSync, stat } = require("fs");
const { resolve, join } = require("pat... |
const Buffer = require('buffer/').Buffer
const keccak256 = require('js-sha3').keccak256;
const { ETH_ABI_LATTICE_FW_TYPE_MAP } = require('./constants');
const NAME_MAX_SZ = 100;
const HEADER_SZ = 5 + NAME_MAX_SZ; // 4 byte sig + name + 1 byte param count
const CATEGORY_SZ = 32;
const PARAM_SZ = 26; // 20 byte name + 6 ... |
'use strict';
var UrlView = require('../pages/UrlView');
var SimpleModalView = require('../mixins/SimpleModalView');
var DialogueView = require('../mixins/DialogueView');
var HeaderEditorView = require('../pages/HeaderEditorView');
var tempPage = [
'<div class="top-row">',
'<di... |
import '@testing-library/jest-dom/extend-expect';
import { configure } from '@testing-library/react';
import { configureAxe, toHaveNoViolations } from 'jest-axe';
import jestFetchMock from 'jest-fetch-mock';
import preloadAll from 'jest-next-dynamic';
jest.mock('next/dist/client/router', () => {
const router = requi... |
const appRoot = require('app-root-path')
const { createLogger: _createLogger, format, transports } = require('winston')
require('winston-daily-rotate-file')
const deepmerge = require('deepmerge')
const moment = require('moment')
const { combine, colorize, timestamp, json, printf, errors } = format
const colorizer = co... |
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.