text stringlengths 3.07k 16k |
|---|
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(ex... |
import Vue from 'vue'
import Vuex from 'vuex'
import * as $api from "../common/api.js"
import * as $common from "../common/common.js"
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
isLogin: uni.getStorageSync('isLogin') || false, // 记录用户登录状态
version: "1.0.0", //当前系统版本
sysName: "蚂蚁量化", ... |
// Generated by ReScript, PLEASE EDIT WITH CARE
'use strict';
var Curry = require("bs-platform/lib/js/curry.js");
var $$String = require("bs-platform/lib/js/string.js");
var SimpleTest = require("./simpleTest.bs.js");
var cssClassName = "Comment Comment-hidden";
var discount = 26;
SimpleTest.assertEqual(26, discoun... |
'use strict';
var ws = require('ws'),
Peer = require('./peer.js'),
Gateway = require('./gateway.js'),
Network = require('./network.js'),
debug = require('debug')('p2ptv');
/**
* P2PTV is the livestreaming module.
*
* options - An object that specifies the configuration of this instance.
* signal... |
import React from "react";
import "../css/Dash.css";
import pPic from "../assets/teacherprofile.svg";
import axios from "axios";
/**
* class Enseignant Dash
*/
class EnsDash extends React.Component {
/**
* @param {*} props the forwarded parameters
*/
constructor(props) {
super(props);
t... |
var fs = require('fs');
var fse = require('fs-extra');
var path = require('path');
var RETRY_INTERVAL = 16000;
function readFileSafe(file) {
try {
file = fs.readFileSync(file, {encoding: 'utf8'});
} catch(e) {
file = null;
}
return file || '';
}
function readJsonSafe(file) {
try {
file = fse.r... |
/*
* mixelblocks-discordbot | Copyright (C) 2022 | mixelblocks.de
* Licensed under the MIT License
*
*
* $$\ $$\\$\ $$\ $$\ $$\
* \__| $$ $$ | $$ | $$ | $$ |
* $$$$$$\\$... |
function onepixLoadStaticJSONcustom(path, newMaterials, castShadows, receiveShadows) {
$('#debug #models').html("loading static JSON model");
// load JSON model-----------------------------------///
var loader = new THREE.JSONLoader(manager);
var deferred = $.Deferred();
// loader.load('... |
/* global $ */
// Clock object is self contained, and has everything
// necessary to make all the calculations for the project.
// All the GUI stuff is handled in other functions/the
// main document.ready function.
var clock = {
resetRequested: false, // used to evaluate whether the reset button was pressed.
isSt... |
/*
* @CreateTime: Apr 7, 2019 11:22 AM
* @Author: <NAME>
* @Contact: <EMAIL>
* @Last Modified By: <NAME>
* @Last Modified Time: Apr 7, 2019 11:24 AM
* @Description: Modify Here, Please
*/
import React, { Component } from "react";
import {
View,
Text,
FlatList,
StyleSheet,
TextInput,
Animated,
Dimensions... |
/**
* Guardian visuals interactive project
*
* ./utils/analytics.js - Add Google analytics
* ./utils/detect.js - Device and env detection
*/
var getJSON = require('./utils/getjson');
var template = require('./html/base.html');
var mapTemplate = require('./html/map-template.html');
var constituencyQuoteBlockTempla... |
import React, { createContext, useContext, useState, useEffect } from 'react';
import Cookie from 'js-cookie';
// Get our API clients (Commerce.js + Sanity)
import { getSanityClient } from './sanity';
import commerce from './commerce';
// Set our initial context states
const initialContext = {
// Set page component... |
const git = require('simple-git').gitP
const pathLib = require('path')
const fs = require('fs')
const Visualisation = require('./lib/visualization')
const Cache = require('./lib/cache').Cache
const RepositoryLock = require('./lib/lock').Lock
const localRepoPath = pathLib.join(__dirname, '.repos')
const cache = Cache()
... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
Animated,
Picker,
StyleSheet
} from 'react-native';
import KDHeader from './KDHeader'
export default class KDContent extends Component {
constructor(props) {
super(props);
this.s... |
const chai = require("chai");
const sinon = require("sinon");
const sinonChai = require("sinon-chai");
chai.use(sinonChai);
const assert = chai.assert;
const deepClone = require("../src/index");
describe('deepClone', () => {
it('是一个函数', () => {
assert.isFunction(deepClone);
});
it('能复制基本数据类型', () => {
c... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.VListGroup = void 0;
require("../../../src/components/VList/VListGroup.scss");
var _vue = require("vue");
var _useColors2 = require("../../effects/use-colors");
var _useElevation2 = require("../../effects/use-elevation");
var _... |
const fs = require('fs-extra')
const Koa = require('koa')
const Router = require('koa-router')
const chalk = require('chalk')
const path = require('path')
const koaStatic = require('koa-static')
const open = require("open")
const chokidar = require('chokidar')
const cheerio = require('cheerio')
const detect = require('... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _extends = require('./extends-5150c1f4.js');
var _styled = require('styled-components');
var React = require('react');
var index = require('./index-37353731.js');
var web = require('./web-7e5f0d11.js');
var ButtonIcon = require('./Button... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
//'use strict'; // it disable global var!!
var bitcore = require('bitcore');
delete global._bitcore;
var bitcore_lib = require('bitcore-lib');
var PaymentProtocol = require('bitcore-payment-protocol');
delete global._bitcore;
var explorers = require('bitcore-explorers');
var express = require('express');
var bodyParse... |
import {
Box,
Button,
Card,
CardContent,
Container,
Grid,
makeStyles,
Link,
Snackbar,
Tab,
Tabs,
Typography,
} from '@material-ui/core';
import Alert from '@material-ui/lab/Alert';
import firebase from 'firebase/app';
import { useContext, useEffect, useState } from 'react';
import { useCollectio... |
import * as tslib_1 from "tslib";
import { Component, Input } from '@angular/core';
import { Storage } from '@ionic/storage';
import { HttpClient } from '@angular/common/http';
import { LoadingController } from '@ionic/angular';
import { UserinfoService } from '../services/userinfo.service';
import { AuthenticationServ... |
const express = require("express"),
Campground = require("../models/campground"),
router = express.Router(),
mdw = require("../middleware"),
// eslint-disable-next-line no-unused-vars
dotEnv = require("dotenv").config(),
multer = require("multer"),
cloudinary = require("cloudinary"),
{ check, oneOf, validationR... |
//
// Generators in Node.js: Common Misconceptions an Three Good Use Cases
// https://strongloop.com/strongblog/how-to-generators-node-js-yield-use-cases/
//
// Further reading on topic:
// https://medium.com/@tjholowaychuk/callbacks-vs-coroutines-174f1fe66127#.uqol9beow
// http://jlongster.com/A-Study-on-Solving-Callb... |
import * as util from '../../util';
import * as math from '../../math';
let defaults = {
fit: true, // whether to fit the viewport to the graph
padding: 30, // the padding on fit
startAngle: 3 / 2 * Math.PI, // where nodes start in radians
sweep: undefined, // how many radians should be between the first and l... |
// Declaring & initializing the global variables
let words = [{name: "<NAME>", clue:"Pirates"}, {name: "BLEACH", clue: "Bankai"}, {name: "NARUTO", clue: "Ninja"}, {name: "<NAME>", clue:"Kaaaa-Meeee"}, {name: "<NAME>", clue:"dangerous notebook"}, {name: "BAKUMAN", clue:"how to create manga"}, {name:"HUNTER X HUNTER", cl... |
import React, { useState, useEffect } from "react";
import { StyleSheet, Text, View, Image, TouchableOpacity } from "react-native";
import { Color } from "../../constant/color";
import I18n from "i18n-js";
import { NumberCard } from "../../components/Card";
import Badge1 from "../../assets/badges/badge1.svg";
import Ba... |
import {createTheme, IconButton, Snackbar} from '@material-ui/core';
import CircularProgress from '@material-ui/core/CircularProgress';
import Dialog from '@material-ui/core/Dialog';
import DialogTitle from '@material-ui/core/DialogTitle';
import Drawer from '@material-ui/core/Drawer';
import LinearProgress from '@mate... |
/*
Ce fichier comporte toutes les fonctions pour l'exercice sur les tables de routage.
*/
function drawTextBG(ctx, txt, font, x, y, padding) {
padding = padding || 5;
//ctx.save();
ctx.font = font;
ctx.textBaseline = 'top';
ctx.fillStyle = '#ff0';
var width = ctx.measureText(txt).w... |
#!/usr/bin/env node
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc ... |
var LeeAlgorithm = require("../src/leeAlgorithm");
let db = require('electron').remote.getCurrentWindow().db;
let game;
let scl = 20;
let food;
let w;
let h;
var leeAlgorithm;
var arrayF;
var barriers = [];
const Figures =
{
StartPosition: 0,
EmptySpace: -1,
Destination: -2,
Path: -3,
Barrier: -4,
}
functio... |
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { createPoint, updatePoint, removeComment, toggleEdit, updateComment } from '../actions/index';
import customSort from '../lib/sort';
import { Row, Col, Button, FormGroup, FormControl } from 'react-boots... |
import React, { Component } from "react";
import { withStyles } from "@material-ui/core/styles";
import Stepper from "@material-ui/core/Stepper";
import Step from "@material-ui/core/Step";
import StepLabel from "@material-ui/core/StepLabel";
import StepConnector from "@material-ui/core/StepConnector";
import Paper from... |
const express = require('express')
const parser = require('body-parser')
const cors = require('cors')
const Web3 = require('web3')
const svgCaptcha = require('svg-captcha')
const session = require('express-session')
const tokenConfig = require('./tokenConfig')
const rateLimit = require('express-rate-limit')
require('d... |
import Ember from 'ember';
import FactoryGuy from './factory-guy';
import Sequence from './sequence';
import MissingSequenceError from './missing-sequence-error';
import $ from 'jquery';
/**
A ModelDefinition encapsulates a model's definition
@param model
@param config
@constructor
*/
var ModelDefinition = funct... |
"use strict";
const { rs } = require('./streams');
const deline = str => str.split(",").map((v,c) => v=="" ? [] : (c===4 ? v.split(";").map(v=>+(v)) : +(v)));
const indexReads = (env, filename, density=5000) => {
let cb = 0;
let ci = 1;
const out = {0:cb};
return rs([line => {
const pos = +(line.split(',')[0]);... |
var ws;
var Pin = url.href.split("/").slice(-1)[0];
var ConnectInter;
var KeyboardShortcuts;
var KeyEvents = new Map();
var GameEnd = false;
//Setting up all the variables in the javascript file
$(".winningdiv").hide(); //Hiding the Winning div
HideControls(); //Make sure that it hides the control since it doesn't know... |
LCARSScreen = function(id, title, width, height, properties) {
if(id != undefined) { /** Prevent execution when used for inheritence and not instantiation. */
this.id = id;
this.title = title;
this.subtitle = "";
this.width = width;
this.height = height;
this.properti... |
import HomeSound from "../sounds/home.mp3";
import TimeSound from "../sounds/time.mp3";
import WaterSound from "../sounds/water.mp3";
import ChildSound from "../sounds/child.mp3";
import WorldSound from "../sounds/world.mp3";
import SchoolSound from "../sounds/school.mp3";
import StudentSound from "../sounds/stud... |
// Items
const menu = [
{
id: 1,
title: "Tteokbokki",
category: "Korea",
price: 10.99,
img: "https://twoplaidaprons.com/wp-content/uploads/2020/09/tteokbokki-top-down-view-of-tteokbokki-in-a-bowl-500x500.jpg",
desc: `Spicy rice cakes, serving with fish cake.`,
},
{
id: 2,
title: "... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Redirect, withRouter } from 'react-router-dom';
import { Col, Row } from 'reactstrap';
import { faEnvelope, faHome, faUser } from '@fortawesome/free-solid-svg-icons';
// Components
import Breadcrumb from '../../../../components/B... |
/**
* Generator of random text.
* Exports function that produces it.
*/
import allArticles from './tokens/articles';
import allConnectors from './tokens/connectors';
import allEmojis from './tokens/emojis';
import allStops from './tokens/stops';
import allWords from './tokens/words';
const initialTokens = [
'Jam... |
/**
* Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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.o... |
import React from 'react'
import PropTypes from 'prop-types'
import { graphql } from "gatsby"
import { BgImage } from 'gbimage-bridge'
import Hero from "../common/ui/Hero"
import NextPrevMenu from '../common/ui/menus/NextPrevMenu'
import parse from "html-react-parser"
import SEO from "../containers/SEO"
import CTA from... |
import $ from 'jquery';
import iconpicker from 'fontawesome-iconpicker';
import 'fontawesome-iconpicker/dist/css/fontawesome-iconpicker.css';
import _ from 'underscore';
import Backbone from 'Backbone';
import uniqid from 'uniqid';
import datepicker from 'bootstrap-datepicker';
import 'bootstrap-datepicker/dist/css/boo... |
const utils = require('../../../helpers/_utils/utils')
const modelReport = require('../models/model')
const aggileModel = require('../../../models/aggile-admin/aggileAdminModel')
const pathView = `${__dirname}/../views`
const _ = require('lodash')
const reports = [
{ name: 'pedidoFabrica', templateId: '#template-r... |
'use strict'
const os = require('os')
const path = require('path')
const {test} = require('tap')
const chalk = require('chalk')
const cli = require('../')
const config = require('../lib/conf.js')
const Seeli = require('../lib/seeli.js')
const Command = require('../lib/command/index.js')
const FIXTURE_DIR = path.join(_... |
function total() {
setTimeout(function () {
var S = 0;
$.each($('.total'), function () {
var $ul_total = $(this).prev('ul').find("input[type='checkbox']");
var s = 0;
var n1 = 0;
$.each($(this).prev('ul').find(".number"), function (i) {
... |
const mv = require('macroverse')
// This defines the URL pattern we match and how to extract the parameters.
const URL_PATTERN = /^https?:\/\/[^\/]+\/vre\/v1\/chain\/([0-9]+)\/token\/([0-9]+)$/
addEventListener('fetch', (e) => {
// The request is e.request
e.respondWith(handle(e.request))
})
// Format a number a... |
const { tableMenu } = require('node-terminal-menu')
const { memoize, removeRepeatedItems } = require('../utils')
const { getOption, setDefaultOptions } = require('../startup')
const { bindKey } = require('../key-bindings')
const prompt = require('../prompt')
const { history, dirHistory } = require('../history')
const ... |
import { isFunction, assertNever, findCorrespondingEntity } from "./shared";
export const BASIC_CONFLICT_RESOLUTION_STRATEGIES = ["takeServer", "takeClient", "lastUpdated", "askClient"];
export class LeanSyncServer {
constructor(config) {
this.config = config;
}
// handles sync requests made by clie... |
/**
* @name ElkArte Forum
* @copyright ElkArte Forum contributors
* @license BSD http://opensource.org/licenses/BSD-3-Clause
*
* This software is a derived product, based on:
*
* Simple Machines Forum (SMF)
* copyright: 2011 Simple Machines (http://www.simplemachines.org)
* license: BSD, See included ... |
import React, { useState, useEffect } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { withRouter } from "react-router";
import {
Grid, Form, Button, Icon, Popup, Checkbox, Divider, Message, Menu, Label,
} from "semantic-ui-react";
import AceEditor from "react-ace";
im... |
import React from 'react';
import { Upload } from 'antd';
import { createForm } from 'rc-form';
import {
List,
InputItem,
TextareaItem,
Button,
Toast,
Icon,
WhiteSpace,
WingBlank,
Picker,
Modal
} from 'components';
import TitleBox from 'components/titlecontainer';
// import Record from 'components/R... |
import React, { useState, useEffect, useContext } from 'react'
import { useMutation, useQuery, useApolloClient } from '@apollo/react-hooks'
import gql from 'graphql-tag'
// Styles
import { Button, Dialog, FormGroup, InputGroup, Classes, H3 } from '@blueprintjs/core'
// Data Stuffz
import { AuthContext } from '@shared... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// Include required modules
var addons = require("../../../../lib/addons");
var modalDialog = requi... |
const express = require("express");
const app = express();
const bodyParser = require("body-parser");
const BlockChain = require("./blockchain");
const uuid = require("uuid/v1");
const farmbuddy = new BlockChain();
const port = process.argv[2];
const rp = require("request-promise");
const nodeAddress = uuid()
.split... |
import './HomeScreen.css'
import { Link, withRouter } from 'react-router-dom'
import {
Heading,
VStack,
HStack,
Image,
Tag,
Text,
Spinner,
useToast,
Grid,
Avatar,
} from '@chakra-ui/react'
import { useState, useEffect, useReducer } from 'react'
import axios from 'axios'
import { connectToInfuraIpfs,... |
import React from 'react'
import useSetState from '../../hooks/useSetState'
import { PermissionPrinperm } from './permissions_prinperm'
import { PermissionPrinrole } from './permissions_prinrole'
import { PermissionRoleperm } from './permissions_roleperm'
import { Select } from '../input/select'
import { Sharing } fro... |
import React, { Component } from 'react'
import { withRouter } from 'react-router-dom'
import { Typography} from '@material-ui/core'
import { Link } from "react-router-dom"
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCel... |
//定义我的好友申请表格每行按钮
function gpOperateFormatter(value, row, index) {
return [
'<a class="edit" href="javascript:void(0)" title="处理">',
'<i class="glyphicon glyphicon-edit"></i>',
'</a>',
'<a class="remove ml10" href="javascript:void(0)" title="删除">',
'<i class="glyphicon glyphic... |
function restoreOptions() {
console.log("restoreOptions ("+options.series+")");
if (options.series.length){
for(var serie in options.series) {
var input = document.getElementById(options.series[serie]);
if (input){
input.setAttribute("checked", "1");
$(input).parent().css("font-weight", "bold");
... |
/**
* A simple and flexible system for world-building using an arbitrary collection of character and item attributes
* Author: Atropos
* Software License: GNU GPLv3
*/
// Import Modules
import { IronswornActor } from './actor.js'
import { IronswornItemSheet } from './item-sheet.js'
import { IronswornActorSheet } f... |
const fsx = require('fs-extra');
const path = require('path');
const getGitUsername = require('./gitTools/git-user-name');
const { ACTIONS } = require('./constants');
const CONFIG_DIRECTORY = 'features';
const FLAGS_FILENAME = 'flags.json';
const FEATURES_TYPEDEF_FILENAME = 'features.d.ts';
const ENVIRONMENTS_FILENA... |
#!/usr/bin/env node
/* tslint-fix parses the output of tslint and automatically fixes the issues */
const fs = require('fs');
const os = require('os');
const c = console;
const help = function() {
c.log("> tslint -c tslint.json **/*.ts > tslintout.txt");
c.log("Then run the fixer");
c.log("> tslint-fix tslinto... |
// packages
import React, { useEffect, useState, useCallback, useContext } from 'react';
// styles
import './Nav.css';
// context
import GenderContext from '../../context/GenderContext';
const range = (from, to, step = 1) => {
let i = from;
const range = [];
while (i <= to) {
range.push(i);
i += step;
... |
// SequencedGestureTrigger.js
// Version: 0.0.1
// Event: Lens Initialized
// Description: Send triggers if a sequenced hand gesture set is detected (start gesture and end gesture)
/*
this script would detect two gestures in sequence to each other defined in getGesture()
NOTE: If first gesture is lost before second ge... |
import moment from 'moment';
import * as config from '../config/client';
export const calculateTradingValue = ( amount, price ) => ( amount * price ).toFixed( 5 );
export const getFiatSign = fiat => config.FIAT_SIGN[ fiat ];
export const getFiatCodeLetter = fiat => config.FIAT_THREE_CODE_LETTER[ fiat ];
export cons... |
// Dot
function Dot(centerX, centerY, minRadius, maxRadius, radiusSteps, canvasContext) {
var that = this;
this.centerX = centerX;
this.centerY = centerY;
this.minRadius = minRadius;
this.maxRadius = maxRadius;
this.radiusSteps = radiusSteps;
this.canvasContext = canvasContext;
this.radiusStep = ((maxRadius - m... |
/*
* One Drive API
* 使用官方API挂载
* token -x-> generateAuthUrl --code--> getToken
*/
const name = 'OneDriveAPI'
const version = '1.0'
const protocols = ['oda']
const defaultProtocol = 'oda'
const fs = require('fs')
const clientMap = {}
const oauthUrl = 'https://login.microsoftonline.com/common/oauth2/v2.0';
c... |
/* eslint-disable global-require,import/no-extraneous-dependencies,no-unused-vars */
import webpack from 'webpack';
import { argv } from 'yargs';
import {
inSrc,
inNodeModules,
inCoreRoot,
inModules,
} from '../../build-scripts/utils/path-utils';
function getTestsGlobs(testPaths, postfix = 'test') {
return ... |
/*---
includes: [compatFs.js, compatBuffer.js, compatWebcrypto.js, runTsuite.js, webCryptoUtils.js]
flags: [async]
---*/
async function test(params) {
let r;
let encoder = new TextEncoder();
let keyMaterial = await crypto.subtle.importKey("raw", encoder.encode(params.pass),
... |
// Example
// =======
// Connect to a remote VSCP daemon and start to receive events from the
// server. We use the "rcvloop" command here to just sit and wait for
// event when they come in. And alternative is of course to use the
// event polling command "retr" to read an event in the input queue and
// the "chkdata"... |
// === Begin environment setup
/**
* The XD environment does not provide setTimeout or clearTimeout.
* React uses these, so we need to stub them out for now.
*/
window.setTimeout = function(fn) { fn() }
window.clearTimeout = function() {}
/**
* The XD environment does not provide btoa, atob, Blob, or FormData.
*... |
/*--------------------------------------------------------------------------------------------------------
| Helpers
--------------------------------------------------------------------------------------------------------*/
function atualizarTabela(url, tabela)
{
$.get(url, function(data){
//Converter a resposta e... |
import uuidv4 from 'uuid/v4';
/***********************
* Private Functions
***********************/
function addQueryToQueries(q, queries) {
queries[q.id] = q;
}
function addQuerySignature(q, signatures) {
let key = querySignature(q.conditions);
if (signatures[key] && signatures[key] != q.id)
th... |
require("es5-shim")
require("babel/polyfill")
let fetch = require('./fetcher')
import Backbone from 'backbone'
import $ from 'jquery'
import React from 'react'
import ButtonToolbar from 'react-bootstrap/lib/ButtonToolbar'
import _ from 'underscore'
var Bootstrap = require('react-bootstrap')
Parse.initialize("R0Y7jHbv... |
function canCast(srcId, dstId){
return srcId && !!typeIdArray[srcId][dstId];
}
function canCastUnsafe(srcId, dstId){
return srcId && typeIdArray[srcId][dstId];
}
function dynamicCast(src, dstId){
if (src != null && !canCastUnsafe(src.typeId$, dstId)) {
throw $ClassCastException(new ClassCastException);
}... |
function getLastInputIdNumber() {
const urls = document.getElementById('urls');
if (urls.childElementCount > 0) {
const lastChildId = urls.lastElementChild.id;
const lastNumUsed = parseInt(lastChildId.split('-')[3], 10);
return lastNumUsed;
}
return -1;
}
function addItem(inputNumber, inputValue) {... |
var _ = { result: require('lodash.result') }; // see: https://git.io/vaRhs
var formatHotelFacts = require('./format-hotel-facts');
var imageMap = require('./ne-hotel-images-map.json');
function mapHotelsById (hotels) {
return (!hotels) ? {} : hotels.reduce(function (obj, hotel) {
obj[hotel.wvId] = hotel;
ret... |
import React, { useState, useEffect } from 'react';
import { confirmAlert } from 'react-confirm-alert';
import { Link, useHistory } from 'react-router-dom';
import { FaTrash, FaEdit } from 'react-icons/fa';
import { toast } from 'react-toastify';
import Button from '@material-ui/core/Button';
import { makeStyles } from... |
var express = require('express');
var http = require('http');
var https = require('https');
var path = require('path');
var server = require('socket.io');
var pty = require('pty.js');
var fs = require('fs');
var uuid = require('node-uuid');
var mkdirp = require('mkdirp');
var exec = require('child_process').exec;
var ... |
'use strict';
let DigsEmitter = require('digs-common/digs-emitter');
let j5 = require('johnny-five');
let _ = require('lodash');
let Promise = require('bluebird');
let ascoltatori = Promise.promisifyAll(require('ascoltatori'));
let qlobberFsq = require('qlobber-fsq');
const TIMEOUT = 1e4;
const EXPECTED_ENVIRONMENT_K... |
// Logic starts once the DOM is loaded complete
$(document).ready(function () {
var materialR = 0;
var map = 0;
var late;
var lnge;
//When the button is clicked, grabs the information from the input boxes
$("#submitBtn").click(function geocode(event){
event.preventDefault();
... |
'use strict';
var debug = require('debug')('wpml:compiler')
var assign = require('object-assign')
var escape = require('escape-html')
var linkify = require('./linkify')
var config = require('./config')
// generate long enough string for code indenation
var INDENT = (function (len) {
for (var str = ' '; str.lengt... |
import React, { Component } from 'react';
import { Image } from 'react-bootstrap';
import './ViewerLogin.css';
import PhoneNumberForm from './PhoneNumberForm';
import VerificationCodeForm from './VerificationCodeForm';
import DisplayNameForm from './DisplayNameForm';
import BattleEnded from '../BattleEnded';
import Ba... |
const blackjack = require('discord-blackjack')
const {
MessageEmbed
} = require('discord.js')
const balanceSchema = require('../models/balance-schema')
module.exports = {
name: 'blackjack',
description: 'Play a game of blackjack',
category: 'Fun',
slash: true,
cooldown: '20s',
o... |
import {Tile} from "./Tile.js";
import InfoBox from "./InfoBox.js";
import LevelTiles from "./LevelTiles.js";
import EditLayer from "./EditLayer.js";
import SelectionLayer from "./SelectionLayer.js";
import Port from "./Port.js";
export default class LevelView extends HTMLElement {
_levelTiles;
_editTiles;
_info... |
import React from 'react';
import { FormBtn, Switch } from "../Form";
import './style.css'
function DjEvent(props) {
const monthNumber = props.eventDate.slice(5,7)
const month = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"][month... |
import React from 'react';
import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { pkg, carbon } from '../../settings';
import '../../utils/enable-all'; // must come before component is imported (directly or indirectly)
import { TagSet } from '.'... |
const fs = require('fs');
const path = require('path');
const Joi = require('joi');
const CONFIG_FILE = path.join(__dirname, '.config.json');
const OLD_CONFIG_FILE_BACKUP = path.join(__dirname, '.config.json.old');
const oauthSchema = Joi.object({
web: Joi.object({
client_id: Joi.string().required(),
... |
import React, { useState, useEffect } from 'react';
import MaterialTable from "material-table";
import axios from 'axios';
import {Modal, TextField, Button} from '@material-ui/core';
import {makeStyles} from '@material-ui/core/styles';
import { Add as AddIcon } from '@material-ui/icons';
const columns= [
{ title: 'I... |
var express = require('express')
, http = require('http')
, bodyParser = require('body-parser')
, DataStore = require('nedb')
//gestion des uploads
, fs = require('fs')
//gestion de l'authentification par jeton
, jwt = require('jwt-simple')
, _ = require('underscore')
, app = express()
, http_p... |
import React, {useState, useEffect} from 'react';
import 'antd/dist/antd.css';
import { Layout, Space, List, Col, Row, Avatar, Form, Input, Button, Select } from 'antd';
import { Link } from 'react-router-dom'
import { UserOutlined } from '@ant-design/icons';
import {useParams} from 'react-router';
import axios from '... |
const puppeteer = require("puppeteer");
const cors = require("cors");
const express = require("express");
const app = express();
const port = process.env.PORT || 8080;
app.use(cors());
app.listen(
port,
() => console.log(`Its Alive on http://localhost:${port}`)
);
app.use(express.json());
app.get('/get', (req, ... |
#! /usr/bin/env node
'use strict';
import R from 'ramda';
import debounce from 'debounce';
import fs from 'fs';
import path from 'path';
import { spawn } from 'child_process';
import chokidar from 'chokidar';
import getFlattenedDependencyTree from './get-dependency-tree';
import { info, error } from './loggers';
... |
//import Answers from './Answers';
import '../styles/layout/game.scss';
import React, { useState } from 'react';
import Header from './Header';
import ResumenQuestion from './ResumenQuestion';
import ResumenGame from './ResumenGame';
//import ls from './services/localStorage';
const Game = (props) => {
//cons... |
// Run dotenv
require("dotenv").config();
const Discord = require("discord.js");
const bot = new Discord.Client();
let timeout = 900000;
bot.once("ready", () => {
console.log(`Logged in as ${bot.user.tag}!`);
while (timeout <= 900000) {
timeout++;
}
});
bot.once(`reconnecting`, () => {
console.log(`Reconne... |
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possib... |
// *****************************************************************
// =================================================================
// ---------------- Map Visualizer for Indonesia ---------------- ||
// --- Land Cover/ Land Use, Concessions & Conservation Areas --- ||
// =========================================... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.