text
stringlengths
3.07k
16k
var bodyParser = require('body-parser'); var multer = require('multer'); var mongoose = require('mongoose'); var path = require('path'), os = require('os'), fs = require('fs'); const { spawn } = require('child_process'); // Connect to the database mongoose.connect('mongodb+srv://johnharmon96:Z!...
// Default configuration const config = { "Settings": { "Token": "BOT-<PASSWORD>", "Prefix": "-", "ServerID": "YOUR-SERVER-ID", "Storage": "database.db", "DevMode": false }, "Embeds": { "Color": "2f3136" }, "Branding": { "Name": "BrayanBot", "Logo": "https://avatars.githubusercontent.com/u/99198112...
#!/usr/bin/env node 'use strict' const Deployer = require('../lib/Deployer') const deployUtls = require('../lib/utils/DeployUtils') const pkg = require('../package.json') const commander = require('commander') const fs = require('fs') const path = require('path') const vm = require('vm') commander .version(pkg.ver...
import HighlightedInformation from "../../../shared/components/HighlightedInformation"; import React, { forwardRef, useState, useEffect } from "react"; import PropTypes from "prop-types"; import MaterialTable from 'material-table'; import AddBox from '@material-ui/icons/AddBox'; import ArrowDownward from '@material-ui/...
/** * Utility functions for Tags * * 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...
/* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable react/jsx-filename-extension */ import React from 'react'; import { storiesOf, getStorybook } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { withKnobs, text } from '@storybook/addon-knobs'; import { jumpTo } ...
let days=['monday','tuesday','wednesday','thursday','friday','saturday','sunday']; class WardroundImportForm extends BlazeComponent { onCreated(){ super.onCreated(); this.state=new ReactiveDict(); let dayTime={}; days.forEach((day)=>{ dayTime[day]={ selected:false, morning:false, afternoon:fa...
/** * 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 directory. * * * @form...
var ACCURACY = 15, watchId, geohashes, optionHi = {maximumAge:1000, timeout:30000, enableHighAccuracy:false}, optionLo = {maximumAge:1000, timeout:30000, enableHighAccuracy:false}; // latlong to binary function reduce(input, output){ var center = (input[1] + input[2]) * 0.5; if (input[0] > center){ ...
import React from 'react'; import {toBig, toNumber} from "../../../../common/Loopring/common/formatter"; import intl from 'react-intl-universal'; import {getOrders} from "Loopring/relay/order"; import {Card, Table, Pagination,Progress} from 'antd'; const scheam = [ { title: () => intl.get('orders.amount'), n...
/*! * better-scroll / observe-image * (c) 2016-2021 ustbhuangyi * Released under the MIT License. */ // ssr support var inBrowser = typeof window !== 'undefined'; var ua = inBrowser && navigator.userAgent.toLowerCase(); var isWeChatDevTools = !!(ua && /wechatdevtools/.test(ua)); var isAndroid = ua && ua.indexOf...
$(function () { var ul = $(".context_ul_goodsList").children("ul"); $(".J_GoodsDetails").addClass("tab-selected"); $(".context_img_li").eq(0).addClass("context_img_li_hover"); //搜索框验证 $('form').submit(function () { if ($(this).find("input[name='product_name']").val() === "") { ...
/** * Storm bolt for the "Plan9 From Outer Space" tutorial game. * * Implements the (crazy|deluded|extended) Kitten Robbers. * * The KittenRobbers bolt aggregates all points for each user * that are generated within a recent time frame (a "round"). * * At the end of each round, the user with the highest amount ...
// ? See https://github.com/conventional-changelog/conventional-changelog const debug = require('debug')( `${require('./package.json').name}:conventional-changelog-config` ); const escapeRegExpStr = require('escape-string-regexp'); const semver = require('semver'); const execa = require('execa'); // ? Commit types...
"use strict"; var segments_1 = require('./segments'); var lang_1 = require('./facade/lang'); var exceptions_1 = require('./facade/exceptions'); var collection_1 = require('./facade/collection'); function link(segment, routeTree, urlTree, commands) { if (commands.length === 0) return urlTree; var normali...
'use strict'; let productArray = [ 'bag.jpg', 'banana.jpg', 'bathroom.jpg', 'boots.jpg', 'breakfast.jpg', 'bubblegum.jpg', 'chair.jpg', 'cthulhu.jpg', 'dog-duck.jpg', 'dragon.jpg', 'pen.jpg', 'pet-sweep.jpg', 'scissors.jpg', 'shark.jpg', 'sweep.png', 'tauntaun.jpg', 'unicorn.jpg', 'u...
'use strict' var P1600_RHO_OFFSETS = [0, 1, 62, 28, 27, 36, 44, 6, 55, 20, 3, 10, 43, 25, 39, 41, 45, 15, 21, 8, 18, 2, 61, 56, 14] var P1600_ROUND_CONSTANTS = [ 0x00000001, 0x00000000, 0x00008082, 0x00000000, 0x0000808a, 0x80000000, 0x80008000, 0x80000000, 0x0000808b, 0x00000000, 0x80000001, 0x00000000, ...
$(function(){ typeCombobox(); InsframeworkCombobox(); manuCombobox(); statusRadio(); gatherCombobox(); $("#iId").combobox({ onChange:function(){ itemid = $("#iId").combobox("getValue"); gatherCombobox(); } }); $('#dlg').dialog( { onClose : function() { $('#iId').com...
/*! * Copyright (c) 2019, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * Unless required by appli...
import React,{Component} from 'react'; import {Card,CardHeader,CardBody,Row,Col,Button,Label,Input,FormGroup,FormFeedback} from 'reactstrap'; import {Formik,Form} from 'formik'; import * as Yup from 'yup'; import {BootstrapTable,TableHeaderColumn} from 'react-bootstrap-table'; import 'react-bootstrap-table/dist/react-b...
/* 1. Get our avatar attributes -> Sockets ? 2. Preload resources -> DONE 3. Print our avatar -> DONE 4. Set button callbacks -> DONE 5. Save our avatar attributes -> Sockets ? */ //SOCKET CALLBACKS //socket.onopen = () => //{​​ // if(DEBUG==true){​​ console.log('[DEBUG] LOBBY WebSocket connect...
import eventBus from '../Libraries/EventBus.js'; const teamDisplay = Vue.component('team-display', { name: 'team-display', components: { }, props: ['team'], template: ` <div class="teamDisplay"> <div class="teamStats"> <div class="averageRank" :style='{ backgrou...
import React from 'react'; import "../css/index.css"; import { connect } from 'react-redux'; import Modal from 'react-modal'; import { fetchProjects } from '../actions'; import closeIcon from '../images/ic_close.png'; import githubIcon from '../images/ic_github_white.png'; import webIcon from '../images/ic_web_site....
// ==UserScript== // @name 豆瓣読書泥棒 // @namespace https://gimo.me/ // @version 0.3.0 // @description 从日本读书网站摘取书评显示在豆瓣读书条目页面 // @author Yuanji // @match https://book.douban.com/subject/* // @connect booklog.jp // @grant GM_xmlhttpRequest // @license MIT // ==/UserScript== fu...
/** * Copyright (c) 2017 Translation Exchange, Inc. * * _______ _ _ _ ______ _ * |__ __| | | | | (_) | ____| | | * | |_ __ __ _ _ __ ___| | __ _| |_ _ ___ _ __ | |__ __ _____| |__ __ _ _ __ __ _ ___ * | | '__/ _`...
/* * HTTP server with programmable API for adding stubs/mocks. */ var express = require("express"); var http = require("http"); var expect = require("chai").expect; var bodyParser = require('body-parser'); // compare a requestMatcher with a request; if each property // in the requestMatcher matches with a property ...
let { daiAbi, erc20Eip2612Abi } = require("./abis"); let { ethers } = require("ethers"); const { config } = require("./config"); let daiDomainData = { name: config.daiDomainName, version: config.daiVersion, }; /** * Single method to be used for logging purpose. * * @param {string} message Message to be logged ...
/* JavaScript program to draw and update bubble chart Name: <NAME> Studentnumber: 11017503 */ function drawInitialBubble(childrenDict, startyear, endyear, category){ /* This is a function that draws the initial bubble chart. It creates nodes, nodes containing circles and text. source: http://bl.ocks.org/m...
import React from 'react'; import { FormattedMessage } from 'react-intl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import Checkbox from '@material-ui/core/Checkbox'; import Box from '@material-ui/core/Box'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Di...
// // BlackJack // by <NAME> // let suits = ['Clubs','Diamonds','Hearts','Spades']; let cardValues = ['Ace','King','Queen','Jack', 'Ten','Nine','Eight','Seven','Six', 'Five','Four','Three','Two']; // Initialise buttons let textArea = document.getElementById('text-area'); let newGa...
/* globals describe, it */ var assert = require('assert'); var t = require('../index'); var throwsWithMessage = require('./util').throwsWithMessage; var Point = t.struct({ x: t.Number, y: t.Number }); describe('t.struct(props, [name])', function () { describe('combinator', function () { it('should throw i...
const itemInput = document.querySelector(".item-input"); const addButton = document.querySelector(".add-btn"); const list = document.querySelector(".list"); const clearButton = document.querySelector(".clear"); const addNewItem = () => { addItem(itemInput.value, 1, true); } const addItem = (title, quantity, saveL...
/** * Copyright (c) 2018 GrowthFile * * 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...
// test expm1 const assert = require('assert') const approx = require('../../../tools/approx') const math = require('../../../src/main') const complex = math.complex const matrix = math.matrix const sparse = math.sparse const unit = math.unit const expm1 = math.expm1 describe('expm1', function () { it('should expone...
/** * Register.js * * Allow user to register */ 'use strict' /** * ## Imports * * Redux */ import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import {Actions} from 'react-native-router-flux' /** * The actions we need */ import * as validatePersonActions from '../reducers/validat...
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import Link from '../../Link'; import TextInput from '../../TextInput'; import RadioTile from '../../RadioTile'; i...
import {matchPath} from 'react-router-dom' import LANGUAGES, {SHORT_LANGUAGE_MAP, DEFAULT_LANGUAGE} from 'data/LANGUAGES' export const addExtraIndex = (obj, index) => { Object.keys(obj).forEach(key => { const val = obj[key] let newKey = val[index] if (!Array.isArray(newKey)) { newKey = [newKey] } newKey....
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Row, Col, Select, Switch, Input, Button, message } from 'antd'; import { FormattedMessage } from 'react-intl'; import { Client } from '@esteemapp/dhive'; import moment from 'moment'; import currencies from '../../constants/curre...
/** * @component Calendar * @version 3.0.0 * @description 日历组件,基于groupList组件实现。 * * 可通过以下两种方式定义日期范围: * - 传入具体的起、始日期。 * - 传入距离系统当日的间隔天数,默认90。入住时间在离店时间之后,则互换。默认selectionStart、selectionEnd可选择同一天。 * - 默认不能选择今天之前的日期。同时,如果 `selectionStart` 时间在今天之前,会被重置为今天。 * 可以通过 `allowSelectionBeforeToday` 属性来严格按照 `duration` 渲染...
import Ember from 'ember'; import layout from '../templates/components/paper-tabs'; import { ParentMixin } from 'ember-composability-tools'; import ColorMixin from 'ember-paper/mixins/color-mixin'; const { computed, Component, String: { htmlSafe }, inject } = Ember; export default Component.extend(ParentMixin, ColorM...
var fs = require('fs'); var util = require('util'); var path = require('path'); var nameRe = /([^\s]+) (.* )?(\w+)/i; function parseName(n) { var m = n.match(nameRe); if (!m) { console.error("Could not match name: '" + n + "'"); return; } return [m[1], m[2] ? m[2].trim() : null, m[3]]; } function form...
import * as THREE from 'three/build/three.module.js'; import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; const scene = new THREE.Scene(); const bottomScene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 50); const renderer = new...
import { merge, interval } from 'rxjs' import { map, scan, filter, switchMap } from 'rxjs/operators' // eslint-disable-next-line import { tap } from 'rxjs/operators' /* Streams Of Life: pause$ toggle$ tick$ */ // event type constants const WORLD_EVENT_RESET = 1 const WORLD_EVENT_ACTIVE = 2 const WORLD_EVENT_T...
/*global describe, it*/ var chai = require('chai'); var expect = chai.expect; chai.use(require('./helpers')); var lens = require('../src/index').lens; describe('array lens', function() { describe('array at lens', function() { it('gets values', function() { expect(lens.at('key').get([])).to.be.nothing; ...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may n...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may n...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = require("react"); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _extends() { _extends = Object.assign || f...
// Lấy ra ô phép tính var boxCal = document.querySelector(".box-calculation"); // Lấy ra ô kết quả var boxResult = document.querySelector(".box-result"); // Lấy ra các nút phép toán var btnOperation = document.querySelectorAll(".operation"); // Lấy ra nút nhân var boxTimes = document.querySelector(".times"); // Lấ...
require('plug/selectordie/index'); //下拉框插件 require('plug/city-picker/city-picker'); //城市选择插件 require('plug/validate/validate'); let { modifyRules } = require('plug/validate/validate'), //验证插件 uploader = require('modules/upload'), //图片上传插件 { companyForm ,changePassWord,bindEmail} = require('api/Insurance'),//api...
const fs = require('fs'); async function createConfigDomain(options) { var configFile = require(`${__dirname}/../../conf/config.json`); // 清空 configFile.client.domainList = {}; // 先把不命中的都设置下去 for (var i = 0; i < options.domainList.recursive.length; i++) { configFile.client.domainList[optio...
import System from "../basic/System" import SYSTEMS from "../templates/SYSTEMS" import * as smShaders from "../shaders/shadows/SHADOW_MAP.glsl" import ShaderInstance from "../instances/ShaderInstance" import FramebufferInstance from "../instances/FramebufferInstance" import CubeMapInstance from "../instances/CubeMapIn...
var React = require('react'); var UI = require('UI'); var View = UI.View; var Content = UI.Content; var List = UI.List; var Grid = UI.Grid; var Card = UI.Card; var Icon = UI.Icon.Icon; var Badge = UI.Badge.Badge; var Switch = UI.Form.Switch; var Button = UI.Button.Button; var ContactItem = React.createClass({ ren...
/** @module components/system-trend */ import Ember from 'ember'; import fillEmptyPoints from 'capmetrics-web/utils/fill-empty-points'; import transitServiceColors from 'capmetrics-web/utils/service-colors'; let colorizeTrends = function(datum) { for (let i = 0; i < datum.length; i++) { let data = datum[i]; ...
const path = require('path') const webpack = require('webpack') const fs = require('fs') // const ExtractTextPlugin = require('extract-text-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin') const CopyWebpackPlugin = require('copy-webpack-plugin') const { GenerateSW } = require('workbox-webpack-p...
import axios from "axios"; import config from "config-yml"; import queryString from "querystring"; import userController from "./user"; import { renderScreen } from "../utils/ssr"; import { isValidRepository } from "../utils/github"; import interactionController from "./interaction"; import { getStyleLog } from "../uti...
var plan = require('flightplan'); var config = { srcDir: './stable-split-cross-generator', // location on the remote server projectDir: '/opt/projects/stablesplit', // location on the remote server pythonPath: '/usr/bin/python3.6', keepReleases: 3, username: 'kazimiersa', root: 'root' }; plan.target('lo...
import React, { Component} from 'react'; import { Page, Toolbar, BottomToolbar, Segment, ToolbarButton, Modal, ProgressCircular, AlertDialog, Button } from 'react-onsenui'; import { LANG_NONE, LANG_ZH_HK, LANG_ZH_TW, LANG_EN } from './DictEzApp.js'; import { getBase64 } from './ImageUtils.js'; import { callOcrSpace } ...
import React, { Component } from 'react'; import { findDOMNode } from 'react-dom'; import { Modal, Button, Table, Pagination, Message, FormGroup, FormControl, Label, Col, Row } from 'tinper-bee'; import Checkbox from 'rc-checkbox'; import VerifyInput from '../../../../components/verifyInput/index'; import { Base64 } fr...
import Map from 'ol/Map.js'; import View from 'ol/View.js'; import MVT from 'ol/format/MVT.js'; import VectorTileLayer from 'ol/layer/VectorTile.js'; import {get as getProjection,addProjection} from 'ol/proj.js'; import VectorTileSource from 'ol/source/VectorTile.js'; import {Fill, Icon, Stroke, Style, Text} from 'ol/s...
import React, { Component, forwardRef } from 'react'; import { number, string, func, shape, bool, oneOfType, object, } from 'prop-types'; import styled, { css } from 'styled-components'; import noop from 'utils/noop'; import { nobel } from 'styles/colors'; import { primaryFonts, fontSize } from 'styles/f...
var sanitize = require('../util/sanitize'); var config = require('config') const merge = require('merge'); const userHasRole = require('../lib/sequelize-authorization/lib/hasRole'); module.exports = function( db, sequelize, DataTypes ) { var Poll = sequelize.define('poll', { ideaId: { type : DataTypes....
//discussion votes function dis_vote(dis,u_id,v){ //alert("hey "+dis); var votes = $("#dis").text(); $.post( "includes/queries.php", { vote : v, dis_id:dis, uid:u_id }, function(data,status){ //alert("data -> "+data+" status:"+status); if(status=="success"){ votes = Num...
let backgrounds = require( './backgrounds.js' ); let trig = require( './trigonomicUtils.js' ).trigonomicUtils; let backgroundData = { params: {}, bgDataSet: [] }; function createBackgroundDataset() { backgroundData.params.len = backgrounds.length; for (var i = 0; i < backgroundData.params.len; i++) { let thisB...
import React, { Component } from 'react'; import { StyleSheet, View, processColor, Text, Button, } from 'react-native'; import { HorizontalBarChart } from 'react-native-charts-wrapper'; import { widthPercentageToDP as wp, heightPercentageToDP as hp, } from 'react-native-responsive-screen'; import { Badge ...
require('superagent-bluebird-promise'); var request = require('superagent'); var _ = require('lodash'); var debug = require('debug')('deluge-client'); /** * @param {Object=} options - Hash specifying id, apiUrl and password for connecting. * @constructor */ function DelugeClient (options) { this.options = _.mer...
var blackosmUrl = 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', blackosmAttrib = '', blackosm = L.tileLayer(blackosmUrl, { maxZoom: 19 }); var mapDefault = [52.2318, 21.0060, 16, true]; if (localStorage.getItem("mapDefault")) { mapDefault = J...
const Discord = require('discord.js'); const config = require('../config.json'); const { DateTime } = require('luxon'); const prettyMilliseconds = require('pretty-ms'); const devMode = config.devMode; const levelMode = config.levelMode; let levelCooldowns = new Set(); module.exports = async (cobalt, message) => { ...
// Mergesort, Quicksort, Heapsort const testSort = (a, f) => { const original = a.slice(); const res = f(a).slice(); a.sort((a, b) => a - b); if (res.length !== a.length) { console.log(`${original} got sorted as ${res}`); throw new Error(); } for (let i = 0; i < a.length; i++) {...
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import Console from './Console'; import Input from '../containers/Input'; import run, { bindConsole, createContainer } from '../lib/run'; import internalCommands from '../lib/internal-commands'; import ...
/** * @license * Copyright The Closure Library Authors. * SPDX-License-Identifier: Apache-2.0 */ goog.module('goog.structs.QuadTreeTest'); goog.setTestOnly(); const QuadTree = goog.require('goog.structs.QuadTree'); const structs = goog.require('goog.structs'); const testSuite = goog.require('goog.testing.testSuit...
import React, { Component } from "react"; import { Select, Tabs, Table, Form, Popconfirm, Input } from "antd"; import SyntaxHighlighter from "react-syntax-highlighter"; import { vs } from "react-syntax-highlighter/dist/styles/hljs"; import frameworks from "./client-frameworks"; // @ts-ignore import InspectorStyles from...
"use strict"; function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (...
import React from 'react'; class Portada extends React.Component { render() { return ( <div className='Portada'> <section className="portada-inicio" id="portada-inicio"> <div className="texto-encabezado text-xs-center"> <div className=...
const _ = require('lodash'); const path = require('path'); const fs = require('fs-extra'); const fetch = require('node-fetch'); const { createFilePath } = require('gatsby-source-filesystem'); const { siteMetadata } = require('./gatsby-config'); const LATEST_VERSION = siteMetadata.latestAppVersion; exports.onCreateWe...
console.log(document.location); let pathname = document.location.pathname; let pathnamePieces = pathname.split("/"); let fullId = pathnamePieces[2]; let fullIdPieces = fullId.split("-") let placeId = fullIdPieces[0]; let trackerId = fullIdPieces[1]; // TODO: require scripts by building (Webstorm or other bui...
import {toValueString} from './Console'; import * as symbols from './symbols'; import {bytes as bytesSym, nativeObject as nativeObjectSym} from './symbols'; export function pick(object, keys) { const result = {}; for (const key in object) { if (keys.includes(key)) { result[key] = object[key]; } } ...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.upload = void 0; var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); var _asyncToGenerator2 ...
#!/usr/bin/env node /** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * 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 * *...
/** * 词法分析 * @param {string} input */ const tokenizer = input => { let current = 0 const tokens = [] while(current < input.length) { let char = input[current] // 跳过空白符号 if (/\s/.test(char)) { current++ continue } // Punctuator if (/[=(,)+]/.test(char)) { let value = ...
import React, { Component } from 'react' import ReactDOM from 'react-dom'; import withLanguageProps from 'HOC/withLanguageProps' import { PRepsBar, LoadingComponent } from 'app/components' import { convertToPercent } from 'utils' const SORT_TYPE = { RANK: 'RANK', MY_DELEGATION: 'MY_DELEGATION', } @withLanguagePro...
var definitions = { air: [255, 255, 255], ground: [255, 58, 0], brick: [150, 85, 27], question: [247, 255, 0], pipe: [13, 255, 0], solidBrick: [145, 106, 71], coin: [195, 198, 77], goomba: [61, 4, 0] } var level = []; /* pipes = water * coin = death * gomba = block * bri...
/** * Configubot! * A nodeJS configuration manager. The main feature is that you can pass a * predefined set of required config keys, and if they don't exist after * loading the file, it will prompt the user for them. Then will prompt the user * to save the new configuration, and it will crap out the entire config...
'use strict'; function rKEventPhotosCapitaliseFirstLetter(string) { return string.charAt(0).toUpperCase() + string.substring(1); } /** * Initialise the quick navigation form in list views. */ function rKEventPhotosInitQuickNavigation() { var quickNavForm; var objectType; if (jQuery('.rkeventphotosm...
// Import the page's CSS. Webpack will know what to do with it. import '../styles/app.css' // Import libraries we need. import { default as Web3 } from 'web3' import { default as contract } from 'truffle-contract' // Import our contract artifacts and turn them into usable abstractions. import StarNotaryArtifact from ...
const server = require('../../../test-utils/index') const chai = require('chai') const expect = chai.expect chai.use(require('chai-http')) const CveIdRange = require('../../../src/model/cve-id-range') const CveId = require('../../../src/model/cve-id') const User = require('../../../src/model/user') const Org = require...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
import React, { Component, Fragment } from 'react' import { Button, Form, Grid, Header, Image, Message, Segment } from 'semantic-ui-react' import { Mutation } from 'react-apollo' import { Link } from 'react-router-dom' import LogoCircle from '../main_logo_mobile.png' import { SIGN_UP } from '../QUERIES/ALL_QUERIES' cl...
import { addClass, getWrapper } from '../common/ci.utils'; export const wrapBackgroundContainer = (imgNode) => { let previewBox = document.createElement('div'); let contentBox = document.createElement('div'); if (imgNode.children && imgNode.children.length > 0) { wrapAll(contentBox, imgNode.children); } ...
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b)...
const { SlashCommandBuilder } = require('@discordjs/builders'); const { MessageActionRow, MessageButton, MessageEmbed } = require('discord.js'); let color = "#00ccff"; const { Discord } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('help-eco') .setDescription('Economy help c...
"use strict"; // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProp...
require('../lib/git-server') exports.Blob = { "has basic data": function(test) { var blob = new Git.objects.Blob("sha123", "// An example JavaScript file") test.equals(blob.sha, "sha123") test.equals(blob.type, "blob") test.equals(blob.data, "// An example JavaScript file") test.done() } } va...
import React from 'react' import PropTypes from 'prop-types' import { Button, Input, Popconfirm, Table, Popover, Tag } from 'antd' import moment from 'moment' import { nickname } from '../../common/config' import { message } from 'antd/lib' import axios from '../../component/axios' const AdjustContent = (value, maxLen...
////////////////////////////////////////////////////////////////// // // Omlet User Definded code // ///////////////////////////////////////////////////////////////// omletrtc.doc_info = { callback: "Add your redirection URL", appName: "OmletRTC", noun: "poll", displayTitle: "OmletRTC", displa...
const _ = require('underscore'), https = require('https'), crypto = require('crypto'), url = require('url'), urlencode = require('urlencode'), querystring = require('querystring'); ClientOAuth2 = require('client-oauth2'); request = require('request'); const bit4you = function(api_key,api_secret,...
"use strict"; 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 (b.hasOwnPrope...
/** * All allowed states for the Game of Life. */ const State = { dead : 0, alive : 1, /** * Returns the corresponding color for a certain state(dead|alive). * @param {State} aState - accepts a state dead|alive. * @returns - color String which corresponds to this state. */ colorCo...
// a set of functions that are useful for the project var cp = require('child_process'); var net = require('net'); var log = require('util').log; var http = require('http'); var fs = require('fs'); var _ = require('lodash'); var observer = exports.observer = require('./observer'); var queue = require('./queue'); var co...
const jwt = require('jsonwebtoken') const { PrismaClient } = require('@prisma/client') const { getDiscordTokens, getDiscordUserInfo } = require('../helpers/discord-oauth') const { strToBase64, base64ToStr, promiseWrapper } = require('../utils/generic') const prisma = new PrismaClient() const discordOauth = (request,...