text stringlengths 3.07k 16k |
|---|
const _ = require('lodash');
const C = require('./Calculations.js');
module.exports = class BattleSnake {
constructor(width, height, myId, snakes) {
this.id = myId;
this.width = width;
this.height = height;
this.unavailableSpaces = this.getUnavailableSpaces(snakes);
// Must initialize in this or... |
var fs = require("fs");
var path = require("path");
var yaml = require("js-yaml");
var request = require("request-sync");
var _ = require("lodash");
var pathUtils = require("./urls");
var contexts = require("./reference-contexts");
var resolveLocal = require("./json-reference").resolveLocal;
var jsonSearch = require(".... |
var SOURCES = window.TEXT_VARIABLES.sources;
var PAHTS = window.TEXT_VARIABLES.paths;
window.Lazyload.js([SOURCES.jquery, PAHTS.search_js], function() {
var searchData = window.TEXT_SEARCH_DATA ? initData(window.TEXT_SEARCH_DATA) : {};
function memorize(f) {
var cache = {};
return function () {
var k... |
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subC... |
var AppConfig = require('../config');
var Sync = require('sync');
var common = require('../common');
var request = require('request');
var Excel = require('exceljs');
var dateFormat = require('../routes/common').dateFormat;
var randomNum = require('../routes/common').randomNum;
var _ = require('lodash');
var mysql_db =... |
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) { try { step(gene... |
// /*
// 1. make a method that toggles all completed properties to be true or false
// If(all completeds are true){make them all false}
// else(make them all true)
const model = {};
const view = {};
const controller = {};
const todos = {
todoList: [{todo: "default 1", completed: false}, {todo: "default 2", co... |
/**
* Created by <NAME> on 2017.12.26
* Copyright (c) 2017 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, ... |
const SidebarAbstract = require('./SidebarAbstract.js');
const SidebarDialogs = require('./SidebarDialogs.js');
// const AppIcon = require('../../icons/AppIcon.js');
class SidebarMain extends SidebarAbstract {
constructor(params) {
super(params);
this._components = {
SidebarDialogs: this.newC(SidebarDialogs,... |
import {tiles} from './model/tilesPack';
var shuffle = require('shuffle-array');
export class Game {
constructor() {
this.tilesCount = tiles.length;
this.$board = $('#board');
this.$centerOfBoard = $('#center');
this._prepareBoard();
this._placeTiles();
this._addH... |
'use strict';
// MODULES //
var debug = require( 'debug' )( 'from-postgres-cursor:stream' ),
Readable = require( 'readable-stream' ).Readable,
copy = require( 'utils-copy' ),
Cursor = require( 'pg-cursor' ),
validate = require( './validate.js' );
// VARIABLES //
var DEFAULTS = require( './defaults.json' );
/... |
import React from 'react'
import './Veg.css'
import PlayArrowIcon from '@material-ui/icons/PlayArrow';
import Button from '@material-ui/core/Button';
import ShoppingBasketIcon from '@material-ui/icons/ShoppingBasket';
import veggiePattren from './veggie-assets/veggie-pattren.png'
import Top from './veggie-ass... |
const builtinReplacements = [
['Є', 'Ye'], ['І', 'I'], ['Ї', 'Yi'], ['Ґ', 'G'], ['є', 'ye'], ['і', 'i'], ['ї', 'yi'], ['ґ', 'g'], // Ukrainian
['α', 'a'], ['β', 'v'], ['γ', 'g'], ['δ', 'd'], ['ε', 'e'], ['ζ', 'z'], ['η', 'i'], ['θ', 'th'], ['ι', 'i'], ['κ', 'k'], ['λ', 'l'], ['μ', 'm'], ['ν', 'n'], ['ξ', 'ks'... |
import { joinCoupling } from 'spectra-nmr-utilities';
const globalOptions = {
h: {
nucleus: '1H',
nbDecimalDelta: 2,
nbDecimalJ: 1,
observedFrequency: 400
},
c: {
nucleus: '13C',
nbDecimalDelta: 1,
nbDecimalJ: 1,
observedFrequency: 100
},
f: {
nucleus: '19F',
nbDecimal... |
import { range, zeros, add, multiply, sin } from 'mathjs';
import { csp } from './csp';
import fft from 'fft.js';
/**
* Signal processing operations
* @deprecated since version 1.1
* @namespace signal
* @memberof module:bcijs
*/
var fftCache = {};
export let signal = {};
/**
* Compute the power spectral densi... |
const configureGAM = require('@endeavor-business-media/package-shared/config/gam');
const config = configureGAM({ basePath: 'BTR' });
config
.setAliasAdUnits('default', [
{ name: 'lb1', templateName: 'LB1', path: 'default/lb1' },
{ name: 'lb2', templateName: 'LB2', path: 'default/lb2' },
{ name: 'rail1'... |
import Extent from 'Core/Geographic/Extent';
import GeoJsonParser from 'Parser/GeoJsonParser';
import KMLParser from 'Parser/KMLParser';
import GpxParser from 'Parser/GpxParser';
import VectorTileParser from 'Parser/VectorTileParser';
import Fetcher from 'Provider/Fetcher';
export const supportedFetchers = new Map([
... |
const Unit = require('./unit');
var MarkdownIt = require('markdown-it');
var _ = require('lodash');
class MeasureCondition {
constructor(req, item) {
this.id = item["id"];
this.action = item["attributes"]["action"];
this.condition = item["attributes"]["condition"];
this.condition_c... |
let sx = 635;
let sy = 325;
let res = 4;
let shapeColors = new Map();
let pichiMap;
let finder;
class m_point {
constructor(x, y, color) {
this.x = x;
this.y = y;
if (color > 0.55) {
this.bit = 1;
}
else {
this.bit = 0;
}
this.colorStrength = color;
}
}
function setup() {
... |
'use strict';
import Chart from '../core/core.js';
import StylePoint from '../elements/element.stylePoint';
import styleHelpers from '../helpers/helpers.style';
var helpers = Chart.helpers;
var valueOrDefault = helpers.valueOrDefault;
var getHoverColor = styleHelpers.getHoverColor;
var BubbleController = Chart.cont... |
/**
* GoogleChart component.
*
* Site Kit by Google, 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
*
... |
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import styled from 'styled-components';
import StyledTag from '../../components/StyledTag';
import CollectiveNavbar from '../collective-navbar';
import Container from '../Container';
i... |
//localStorage functions
let storeChoice = function(key, value) {
return window.localStorage.setItem(key, value);
};
let clearDatabase = function() {
return window.localStorage.clear();
};
let showDatabase = function() {
$('tbody').html("");
let winCount = 0;
let orderedStorage = Object.entries(window.localStora... |
/// <reference types="./CSMHelper.d.ts" />
/// <reference lib="dom" />
import {
Box3,
Box3Helper,
BufferAttribute,
BufferGeometry,
DoubleSide,
Group,
LineBasicMaterial,
LineSegments,
Mesh,
MeshBasicMaterial,
PlaneBufferGeometry,
} from "../../../src/Three.js";
class CSMHelper extends Group {
co... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... |
const fs = require('fs')
const { readFile, readFileBytes } = fs
const path = require('path')
const { baseName, fileName } = path
const rx = [
[/`/g, '`'], // replace backticks
[/\$\{([^}]+)\}/g, '${$1}'] // replace literal variables - ${x}
]
function sanitize (str) {
return str
.replace(rx[0][0],... |
import { meshBounds, Text } from "@react-three/drei";
import { useFrame } from "@react-three/fiber";
import { useEffect, useRef } from "react";
import { Color, Vector3 } from "three";
import { ENMethods, ENState } from "./ENState";
let MyIO = ({ idx, io = "input", node, socket, e, total }) => {
let v3 = new Vector3(... |
var users = [];
if(localStorage.getItem('db_usuarios') == null)
{
localStorage.setItem('db_usuarios',JSON.stringify(users));
}
if (localStorage.getItem('usuarioCorrente') != null) {
var usuarioCorrente = JSON.parse(localStorage.getItem('usuarioCorrente'));
}
/*------Estrutura de dados
function Usuario()
{
... |
"use strict";
const EventEmitter = require("events");
const Codec = require("./codec.js");
const { Io } = require("./io.js");
const { Db } = require("./db.js");
const { Rinfo } = require("../transport/transport.js");
const { Handshake } = require("./handshake.js");
const { Whoami } = require("../whoami/whoami.js");
co... |
const debug = require('debug')('silknow:crawlers:met-museum');
const cheerio = require('cheerio');
const url = require('url');
const BaseCrawler = require('./base');
const Record = require('../models/record');
function safeUrlResolve(from, to) {
if (!to) return null;
return url.resolve(from, to);
}
class MetMuse... |
import React, { createRef, useEffect, useRef, useState } from 'react';
import styled, { css } from 'styled-components';
import T from 'prop-types';
import mapboxgl from 'mapbox-gl';
import syncMove from '@mapbox/mapbox-gl-sync-move';
import config from '../../../config';
import { glsp } from '../../../styles/utils/the... |
import { __decorate, __metadata } from "tslib";
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { icons } from 'eva-icons';
let IconsComponent = class IconsComponent {
constructor() {
this.evaIcons = [];
this.icons = {
nebular: [
'nb-alert',
... |
const apiKey = "<KEY>";
const myurl = "https://api.openweathermap.org/data/2.5/";
const forecast = "forecast?appid=";
const weatherCall = "weather?appid=";
const currentDate = moment().format('MM/DD/YYYY');
let searchHistory = [];
let fiveDayArray = [];
// thanks to w3schools for this bit of code and teaching me the... |
'use strict';
const config = require('../config');
const _ = require('lodash');
const jwt = require('jsonwebtoken');
//arn:aws:lambda:us-east-1:375194658163:function:sales-orders-shop-dev-
//al final del arn se agrega el nombre del la funcionpo
const authorizeUser = (userScopes, methodArn) => {
const hasValidScop... |
'use strict';
const BaseClient = require('./BaseClient');
const ApplicationCommand = require('../structures/ApplicationCommand');
const CommandInteraction = require('../structures/CommandInteraction');
const { Events, ApplicationCommandOptionType, InteractionType, InteractionResponseType } = require('../util/Constants... |
import React, { Component } from "react";
import { Input, Button, Modal, Form, Spin, Icon, message } from "antd";
import Base from "components/main/Base";
import FormUtils from "lib/formUtils";
import Team from "model/Assets/team";
import style from "./EditUserModal.scss";
const TextArea = Input.TextArea;
const Fo... |
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import { ReactiveDict } from 'meteor/reactive-dict';
import _ from 'underscore';
import { modal, call } from '../../../../../app/ui-utils';
import { t, handleError, APIClient } from ... |
import React, { useContext, useCallback } from 'react'
import PropTypes from 'prop-types'
import {
Avatar,
DataTable,
Button,
Thumbnail,
Caption,
DisplayText,
ResourceList as PolarisResourceList,
TextStyle,
} from '@shopify/polaris'
import { getSizedImageUrl } from '@shopify/theme-images'
import Resour... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _assign = require('babel-runtime/core-js/object/assign');
var _assign2 = _interopRequireDefault(_assign);
var _stringify = require('babel-runtime/core-js/json/stringify');
var _stringify2 = _interopRequireDefault(_stringify);
var _... |
const Discord = require("discord.js");
const url = require("url");
const path = require("path");
const express = require("express");
const passport = require("passport");
const session = require("express-session");
const Strategy = require("passport-discord").Strategy;
const config = require("../config");
const ejs = r... |
import randomFloat from "random-float";
import db from "../../utils/database.js";
import { loadYML } from "../../utils/yaml.js";
const artifactCfg = loadYML("artifacts");
const { artifacts, domains, weights, values } = artifactCfg;
const propertyName = [
"生命值",
"生命值",
"防御力",
"防御力",
"元素充能效率",
"元素精通",
"攻击力... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import DefaultEditor from '../containers/default_editor.js';
import SetDefaultsControl from '../components/set_defaults_control.js';
import ConfirmationEmailEditor from '../components/confirmation_email_editor';
import { createEvent, verif... |
/*
author: <NAME>
*/
import React, { Component } from 'react';
import LeftNav from '~/src/theme/components/homepage/LeftNav';
import RightSection from '~/src/theme/components/homepage/RightSection';
import ReactTable from 'react-table';
import 'react-table/react-table.css';
import '~/src/theme/css/sparks.css';
imp... |
import React from 'react';
import { connect } from 'react-redux';
import { toggleFeature, updateFeatureGroups, updateFeatureUsers, updateFeaturePercentage } from '../redux/actions';
import Api from '../redux/async';
import AddBadge from './AddBadge';
import Grid from '@material-ui/core/Grid';
import GroupIcon from '@ma... |
$(function () {
$("#idformdados").submit(function (event) {
event.preventDefault();
var valor_tem_curriculo = $("#curriculo_CPF:first");
var valor_verifica = valor_tem_curriculo.attr('data_value');
var contador = 0;
var valor_id_user = $("#id_user").attr('data_value');
... |
// Dependencies
const gulp = require('gulp')
const pkg = require('./package.json')
const sass = require('gulp-sass')
const autoprefixer = require('gulp-autoprefixer')
const header = require('gulp-header')
const pixrem = require('gulp-pixrem')
const uglify = require('gulp-uglify')
const rename = require('gulp-rename')
c... |
'use strict'
const config = require('./config.json')
const fs = require('fs-extra')
const getMetadataFromPackageJSON = require('../infer')
const os = require('os')
const packager = require('..')
const path = require('path')
const pkgUp = require('pkg-up')
const util = require('./util')
function createInferElectronVer... |
const debug = require('debug')('metalsmith-twitter-card');
const url = require('url');
const extname = require('path').extname;
const escape = require('escape-html');
const cheerio = require('cheerio');
// List of available card types, see https://dev.twitter.com/cards/getting-started
// with required and allowed prop... |
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbo... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.... |
const webpackConfig = require('./webpack.config.js');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const webpack = require('webpack');
const { readFileSync } = require('fs');
const { dirname, join, relative, resolve, sep } = require('path');
const nsWebpack = require('@nativescript/webpack');
const C... |
const execute = require("demokit/execute");
const { convert, Scene } = require("./coordinate-space");
const uuid = require("uuid").v4;
const { delay } = require("bluebird");
const { span } = require("./html");
module.exports = async function callout({ children, from, to, space = Scene, window })
{
const id = "c... |
/**
* js/page/admin/reports/datasets/filters/_form.js
*/
let $ = require('jquery');
let meta = require('Services/meta');
let fieldTypeOperators = {
'checkbox': ['checked', 'unchecked'],
'date': ['equals', 'greater_than', 'greater_than_equals', 'less_than', 'less_than_equals', 'between', 'has_value', 'does_n... |
/**
* User: ingo
* Date: 10.05.13
* Time: 21:45
*/
function toMap(objectList, keyName) {
var map = {};
for (var x = 0; x < objectList.length; x++) {
// console.log("map: "+objectList[x][keyName]+" = "+objectList[x]);
map[objectList[x][keyName]] = objectList[x];
}
return map;
}
funct... |
var configuration = JSON.parse(ConfigJsonRead());
var profileActive = null;
var profileInitialized = false;
var profileScreenshot = false;
var profiles = {};
var windowUpdateTime = 0;
var windowsByHwnd = {};
var windowsByName = {};
var status = 0;
var statusTime = 0;
LogitechKeyboard.SetKeyboardType(GetConfigValue("k... |
import * as R from 'ramda'
import { uuidv4 } from '@core/uuid'
import * as ObjectUtils from '@core/objectUtils'
import * as StringUtils from '@core/stringUtils'
import * as NodeDefValidations from './nodeDefValidations'
// ======== NODE DEF PROPERTIES
export const nodeDefType = {
integer: 'integer',
decimal: 'de... |
import { FixData } from './base.js'
class CSV {
constructor(data, config) {
this._data = data
this._decoder = new TextDecoder('utf-8')
this._config = config
this._delimiter = this._config?.delimiter || ','
}
get data() {
return this._data
}
async load(urlOrFile) {
if (urlOrFile instanceof File) {
... |
// routes/router.js
const express = require("express");
const router = express.Router();
const bcrypt = require("bcryptjs");
const jwt = require("jsonwebtoken");
const db = require("../lib/db.js");
const userMiddleware = require("../middleware/users.js");
const uuid = require("uuid");
const model = require('../lib/a... |
/* eslint-disable */
/* eslint-disable no-restricted-syntax */
/* eslint-disable no-throw-literal */
import { appData, } from '../store';
import { Utils } from '../utils/index';
const ONE_DAY_INMS = 24 * 3600000;
const HOURS2_INMS = 7200000;
function calcType() {
const now = new Date();
const hs = now.getHours(... |
/**
* Copyright 2017 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... |
var toposort = require('toposort')
var Factory = require('./factory').Factory
function Singular(options) {
this._isRunning = false
this._isStarting = false
this._isStopping = false
this._resolveOnStop = []
options = options || {}
var config = options.config || {}
var modules = options.modules || {}
... |
var sortType = 0
var sortMode = 1
var incomes = []
const incomeStyle = "income";
const outcomeStyle = "outcome";
$(document).ready(function() {
$.ajax({
url:"api/v1/income/"
}).then(function(data) {
var userNamePlaceholder = document.getElementById("username");
var userName = g... |
'use strict';
const crypto = require('crypto');
const $ = require("lodash");
module.exports = {
/**
* 启动活动
* @url user/pub/test1 前端调用的url参数地址
* @description 此函数描述
* @params {Object} data 请求参数
* @params {String} uniIdToken 用户token
* @params {String} userInfo 当前登录用户信息(可信任,仅kh目录下的函数有此值)
* pub目录下请... |
// Returns a license badge based on which license is passed in
// If there is no license, returns an empty string
function renderLicenseBadge(license) {
if (!license) {
return "";
} else {
if (license === "Apache License 2.0") {
return `[
const { default: PQueue } = require('p-queue')
/*
* Derived from https://github.com/ipfs-shipyard/ipfs-companion/blob/master/add-on/src/contentScripts/linkifyDOM.js
*/
;(function (alreadyLoaded) {
if (alreadyLoa... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
var _defineProperty3 = _interopRequireDefault(_define... |
/**
* @license
* Copyright 2019 <NAME>
* SPDX-License-Identifier: Apache-2.0
*/
const assert = require('assert');
const lib = require('../dist/index.js');
const testCasesSimple = [
['breveté', 'F', 'S', 'brevetée'],
['muni', 'F', 'P', 'munies'],
['fabriqué', 'M', 'S', 'fabriqué'],
['luxueux', 'F', ... |
//
//https://www.google.ca/search?q=Refused+to+execute+inline+script+because+it+violates+the+following+Content+Security+Policy+directive%3A+%22script-src+'self'+chrome-extension-resource%3A&oq=Refused+to+execute+inline+script+because+it+violates+the+following+Content+Security+Policy+directive%3A+%22script-src+'self'+c... |
import React from 'react'
import { useTable, useFilters, useGlobalFilter, useAsyncDebounce, useSortBy } from 'react-table'
import { Table } from 'reactstrap'
// A great library for fuzzy filtering/sorting items
// import matchSorter from 'match-sorter'
// Define a default UI for filtering
export function GlobalFilter(... |
const path = require("path")
const _ = require("lodash")
//const paginate = require("gatsby-awesome-pagination")
//const PAGINATION_OFFSET = 7
const fs = require("fs")
//const contributers = require("./.all-contributorsrc")
const createPosts = (createPage, createRedirect, edges) => {
edges.forEach(({ node }, i) => ... |
//Сортирует DSL теги.
function onstart() {
if (process.argv.length === 5 && o.utils.fileExists(process.argv[3])) {
// node nodereplacer.js -stags input.txt output.txt
o.inputfile = process.argv[3]
o.outputfile = process.argv[4]
if (o.outputfile !== null && path.isAbsolute(o.outputfile)) {
o... |
import React, { useState } from 'react';
import { useForm } from 'react-hook-form';
import axios from 'axios';
import SweetAlert from 'sweetalert';
const Alter = (plan) => {
let nomePlano;
nomePlano = plan.plan.plan.plano;
const {register, handleSubmit, errors} = useForm();
const [... |
const { gql, ApolloServer, UserInputError } = require("apollo-server");
const axios = require("axios");
const DataLoader = require("dataloader");
const typeDefs = gql`
type Room {
id: ID!
name: String
capacity: Int
}
type Speaker {
id: ID!
first: String
last: String
favorite: Boolean... |
const token = require('./token.json').token
const TelegramBot = require('node-telegram-bot-api')
const bot = new TelegramBot(token, { polling: true })
let botId
const games = {}
const gameMaster = {}
const playerGames = {}
bot.getMe().then(botUser => {
botId = botUser.id
}).catch(console.error)
const joinGame ... |
"use strict";
var ActiveChecklist = {};
var paneldebug1;
var paneldebug2;
function AddChecklistItem(name, descr)
{
var panel = $.CreatePanel('Panel', $('#ChecklistBoxs'), name);
panel.BLoadLayoutSnippet("ChecklistBox");
var pic = "file://{images}/custom_game/misc/" + name + ".png";
panel.FindChildTraverse('Chec... |
var mlog = require('mocha-logger');
var scheduler = require('..');
var expect = require('chai').expect;
var moment = require('moment');
var sinon = require('sinon');
describe('@momsfriendlydevco/scheduler', ()=> {
/**
* Curry function to return if date A equals date B without millisecond precision
* @param {Date} ... |
/*!
* 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... |
const Map = require("collections/map");
const path = require("path");
const rqAll = require("require-all");
const { split } = require("smart-splitter");
// This is used to camelcase argument keys in the args object
const camelCase = require("camelcase");
const resolveCommand = require("./util/resolve-command.js");
... |
'use strict';
const Service = require('egg').Service;
class SystemService extends Service {
// 保存用户上报的数据
async saveSystemData(ctx) {
const query = ctx.request.body;
const type = query.type;
// 参数校验
if (!query.system_domain && type === 'web') throw new Error('新增系统信息操作:系统域名不能为空'... |
import { assign } from './utils.js';
import { noop } from './utils.js';
export * from './dom.js';
export * from './keyed-each.js';
export * from './spread.js';
export * from './transitions.js';
export * from './utils.js';
export function blankObject() {
return Object.create(null);
}
export function destroy(detach) {... |
// ag-grid-polymer v0.0.5
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this... |
var types = require('../');
var assert = require('assert');
var util = require('util');
var Walker = require('node-source-walk');
describe('module-types', function() {
// Checks whether of not the checker succeeds on
// a node in the AST of the given source code
function check(code, checker, harmony) {
var f... |
// handles the clicking of an entity
function clickEntity(entity) {
// remove entity if activeTool is erase
if(sidebar.activeTool == "erase") {
var undoObject = removeEntity(entity);
// if entity was removed, push undoObject to undoHanlder
if(undoObject)
undoHandler.push([undoObject]);
}
}
// ... |
import { Box, FormLabel, makeStyles } from '@material-ui/core';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import FormGroup from '@material-ui/core/FormGroup';
import Grid from '@material-ui/core/Grid';
import Select from '@material-ui/core/Select';
import Slider from '@material-ui/core/Slider';... |
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import {
Avatar,
Box,
Card,
CardContent,
Divider,
Grid,
Typography,
makeStyles,
Button,
Menu,
MenuItem,
Dialog,
DialogActions,
DialogContent,
DialogTitle,
DialogContentText
} from '@mate... |
var margin = {top: 30, right: 20, bottom: 30, left: 50},
width = 600 - margin.left - margin.right,
height = 400 - margin.top - margin.bottom;
var svg = d3.select("#ticker")
.append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.... |
import React, { Component } from 'react';
import { Route, Link, withRouter } from 'react-router-dom';
import '../App.css';
import QRCode from 'qrcode.react';
import axios from 'axios';
import io from 'socket.io-client';
const Web3 = require('web3');
const web3 = new Web3();
web3.setProvider(new web3.providers.HttpProv... |
// const csvWriter = require('csv-write-stream');
const responses = require('./seedingData.js').responses;
const maker = require('./seedingData.js').maker;
const items = require('./seedingData.js').items;
const faker = require('faker');
const fs = require('fs');
const { Readable } = require('stream');
// const createCs... |
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 ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
const webpack = require("webpack");
const path = require("path");
const glob = require("glob");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCssAssetsPlugin = requ... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { exportCSV, exportJSON } from '../actions/ExportActions';
import Button from '../patterns/Button';
import Panel from '../patterns/Panel';
import ResultsTable from '../components/ResultsTable';
import ResultsLis... |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &... |
import React from 'react'
import PropTypes from 'prop-types'
import Link from 'gatsby-link'
import {
Highlight,
Snippet,
Index,
Configure,
connectAutoComplete,
} from 'react-instantsearch-dom'
import Autosuggest from 'react-autosuggest'
import { Spirit } from '../../../styles/spirit-styles'
import ... |
'use strict';
var cachedPipes = []; //cache of existing pipes
var newPipes = []; //placeholder for newly created newPipe
var connectors = null;
angular.module('pipes', [],function() {
})
.factory('pipesService',function($q, $http, $location){
function cache(){
return _.union( cachedPipes, newPipes )
}
re... |
import fs from 'fs';
import prettyBytes from 'pretty-bytes';
/**
* Check if a given file exists and can be accessed.
* @param {string} filename
*/
export async function fileExists(filename) {
try {
await fs.promises.access(filename, fs.constants.F_OK);
return true;
} catch (e) {}
return false;
}
/**
* Chec... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
// EVEN WINS
//
// Converted from BASIC to Javascript by <NAME>. (nanochess)
//
function print(str)
{
document.getElementById("output").appendChild(document.createTextNode(str));
}
function input()
{
var input_element;
var input_str;
return new Promise(function (resolve) {
... |
'use strict';
var cip = require('cip-js');
var Q = require('q');
// Used to parse a UTF16-LE to UTF16-BE string.
var Iconv = require('iconv').Iconv;
var config = require('../../shared/config');
var cipClient = new cip.CIPClient(config.cip.client);
cipClient.initSession = function(forceInit) {
if (!this.isConnected... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.