text
stringlengths
3.07k
16k
'use strict'; const autoprefixer = require('autoprefixer'); const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const Optim...
//Uses the minimax algorithm //Reference material from https://medium.freecodecamp.org/how-to-make-your-tic-tac-toe-game-unbeatable-by-using-the-minimax-algorithm-9d690bad4b37 function toggleDarkLight() { var body = document.getElementById("body"); var currentClass = body.className; body.className = currentClas...
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(ta...
'use strict'; var path = require('path'), fs = require('fs'), assign = require('object-assign'), snakeCase = require('snake-case'); // make a note of the calling file's path, so that we can resolve relative // paths. this only works if a fresh version of this module is run on every // require(), so import...
//const STAKO_API_URL = 'https://stako.org/api/v1/'; const STAKO_API_URL = "http://127.0.0.1:5000/v1/"; const STAKO_AUTH_URL = STAKO_API_URL + 'auth/stako'; const STAKO_USER_URL = STAKO_API_URL + 'user/'; function clearCache() { chrome.storage.local.remove('STAKO_TOKEN'); chrome.storage.local.remove('USER'); }...
// Initialize Cola var d3cola; function createD3Cola() { return cola.d3adaptor().convergenceThreshold(0.1); } // Communication stuff var port = 56250; var ghci = new WebSocket("ws://localhost:" + port); var nodes; var links; ghci.onopen = function (event) { $("#connectionMessage").text("Connected."); } g...
// note the the number of difficulty classes is fixed at 3, for now window.dClass = ["easy", "medium", "hard"]; window.dTitle = ["Easy", "Med", "Packet"]; window.numPacketsDict = {"easy": 0, "medium": 0, "hard": 12}; window.numPackets = window.dClass.map(x=>window.numPacketsDict[x]); window.scoreValues = [1, 3, 7]; if...
module.exports = { metadata: { plugin: "roomLight", label: "Room Light", role: "actor", family: "roomLight", deviceTypes: ["microcontroller/microcontroller"], services: [ {id: "toggleLight", label: "Toggle Light"}, { id: "dimmer...
const animationCalc = require("./animation-calc"); const deepExtend = require('./deepExtend'); // What is a step? An interation that is a multiple of t delta. Current T = T0 + step * Tdelta // Set of the variables in their state at that point. // The inputs are replicated into each of the steps. // The object for...
import React, { Component } from "react"; import MuiThemeProvider from "@material-ui/core/styles/MuiThemeProvider"; import AppBar from "@material-ui/core/AppBar"; import Button from "./components/Button"; import axios from "axios"; // import Menu from "./components/Menu"; import TextField from "./components/TextField";...
/** * * WeightDialog * */ import { formikPropsHelpers } from 'components/FormikUI/utils'; import { getTurnToScales } from 'components/GoodsWeight/utils'; import * as GoodsWeight from 'components/GoodsWeight/components'; import { columns } from 'components/GoodsWeight/header'; import React from 'react'; import PropT...
import View from "../../../View.js"; import SVG, { svgCircularPath } from "../../../SVG.js"; import { isValueBetween, PI2 } from "../../../../model/core/math/MathUtils.js"; import { assert } from "../../../../model/core/assert.js"; let idCount = 0; function generateCurveId() { const r = `radial-text-curve${idCoun...
const palette = ['rgb(7, 7, 7)', 'rgb(31, 7, 7)', 'rgb(47, 15, 7)', 'rgb(71, 15, 7)', 'rgb(87, 23, 7)', 'rgb(103, 31, 7)', 'rgb(119, 31, 7)', 'rgb(143, 39, 7)', 'rgb(159, 47, 7)', 'rgb(175, 63, 7)', 'rgb(191, 71, 7)', 'rgb(199, 71, 7)', 'rgb(223, 79, 7)', 'rgb(223, 87, 7)', 'rgb(223, 87, 7)', 'rgb(215, 95, 7)', 'rgb(21...
/* bucketsort.js implementation of bucket sort, in an attempt to partially answer this question: Implement, numerically test, and explain two different sorting algorithms with different O() behaviors on randomly chosen lists of numbers with various sizes n. Use two different programming languages and codin...
import React from 'react' import { NavigationActions } from 'react-navigation' import { StyleSheet, Text, View, TouchableOpacity, KeyboardAvoidingView, Animated } from 'react-native' import { white, darkBlue, red, turquoise } from '../utils/colors' import { SubmitButton } from './SubmitButton' import { connect } from '...
/* TODO: make csv upload input TODO: add events for edge highlighting on node click */ var i, s, o, csv_header, unique_category_counts, step = 0, arbitraryCsvFile="https://dothey.github.io/assets/calhacks_greys_edit.csv"; function createGraph(g){ if (typeof s != "undefined...
import React, { useEffect } from 'react'; import PrivateNav from "../components/layout/PrivateNav" import { Row, Form, Button } from "react-bootstrap"; import { Line } from 'react-chartjs-2'; import axios from "axios"; import GraphModal from "../components/layout/competition/graphModal" function CompetitionPage(props)...
'use strict'; const redis = require('redis'); const bluebird = require('bluebird'); bluebird.promisifyAll(redis.RedisClient.prototype); bluebird.promisifyAll(redis.Multi.prototype); const config = require('./config')(process.env.NODE_ENV); const log = require('./logger')('Cache'); const options = { host: config.RE...
const webpack = require('webpack') const path = require('path') const paths = require('./paths') const HtmlWebpackPlugin = require('html-webpack-plugin') const MiniCssExtractPlugin = require('mini-css-extract-plugin') const postcssNormalize = require('postcss-normalize') module.exports = env => { /** * env为packag...
var headers = {"Access-Control-Allow-Headers":"*"}; function setHeader(xhr) { xhr.setRequestHeader(headers); } function loadSet(jData) { var json = null; $.ajax({ async: false ,global: false ,url: jData ,headers: headers ,crossDomain:true ,dataType: "json" ,success: function (data) {json = data;} ,f...
// get map collection records from tnris api // inject map collection records into html; append html to template html // helper functions function buildDownloadsTable(downloads) { var tableRows = ''; var mapDownloads = JSON.parse('[' + downloads + ']'); mapDownloads = mapDownloads.sort(function(a,b) { var aN...
export const usaStatesAbbr = [ { label: "Alabama", value: "AL", id: "01" }, { label: "Alaska", value: "AK", id: "02" }, { label: "American Samoa", value: "AS", id: "60" }, { label: "Arizona", value: "AZ", id: "04" }, { label: "Arkansas", value: "AR", id: "05" }, { label: "California", value: "CA", id: "06" ...
var firebaseConfig = { apiKey: "AIzaSyCzp5LM-_hOtjUCCaMPPz2J8A8Mt0aSlo8", authDomain: "testecandidata.firebaseapp.com", databaseURL: "https://testecandidata-default-rtdb.firebaseio.com", projectId: "testecandidata", storageBucket: "testecandidata.appspot.com", messagingSenderId: "1002876958696",...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPlatformWorker = exports.isPlatformBrowser = exports.isPlatformServer = exports.PLATFORM_WEB_WORKER = exports.PLATFORM_NODE = exports.PLATFORM_JS_DOM = exports.PLATFORM_BROWSER = void 0; var tslib_1 = require("tslib"); var component_...
const { exec, execSync } = require('child_process'); const ora = require('ora'); const git = require('git-exec'); const co = require('co'); const prompt = require('co-prompt'); const chalk = require('chalk'); const fs = require('fs'); const path = require('path'); const { sep } = path; const targz = require('targz'); c...
'use strict' //code from https://github.com/Open-SL/Matrix_Strassen_Multiplier/blob/master/index.js exports.handler = async (event) => { const p = getP(event, event.pId); const resultObject = {}; resultObject[`p${event.pId}`] = p; return resultObject }; function strassen(A,B){ var n = A.length;...
/** * Created by huyunting on 2018/5/2. */ import React, { PureComponent } from 'react'; import moment from 'moment'; import { connect } from 'dva'; import { List, Card, Row, Col, Radio, Input, Progress, Pagination, Select, Dropdown, Menu, Avatar } from 'antd'; import { routerRedux } from 'dva/router'; import Cookie ...
var backgroundsetted = false; function setbackground(backgroundurl) { ext = backgroundurl.substr(backgroundurl.lastIndexOf(".")); background = document.getElementById("background"); background.innerHTML = ""; if (ext == ".png" || ext == ".jpg" || ext == ".gif") { var backgroundimg = document.cr...
require('./src/styles/rodal.css') /** * Implement Gatsby's Browser APIs in this file. * * See: https://www.gatsbyjs.org/docs/browser-apis/ */ /** __ _ _ _ / / ___ __ _ __| | ___ ___ _ __(_)_ __ | |_ ___ / / / _ \ / _` |/ _` | / __|/ __| '__| | '_ \| _...
// Copyright (c) 2015 Uber Technologies, Inc. // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, ...
import React from 'react' import { graphql } from 'gatsby' import Content from '../components/Content.js' import Layout from '../components/Layout.js' import Image from '../components/Image' import ButtonDispensary from '../components/ButtonDispensary' import ButtonBuyGyro from '../components/ButtonBuyGyro' import Sli...
class AlphaCheckers { constructor(objs) { this.checkers = objs.map(o => new AlphaChecker(o.ele, o.click, o.mousedown, o.dragstart, o.wheel)); } check(e) { return [...this.checkers].reverse().find(c => c.isOnPixel(e)); } click(e) { var _a; (_a = this.check(e)) === null || _a === void ...
const filereader = require('./utils/filereader') const raw = filereader.readFile('day22.data', '\n') const debug = require('debug')('day22:') // Basic inverse const moduleInverse = (pos, size, modBy) => { let i = 0, last = pos while (last != 0) { last -= modBy if (last < 0) last += size i++ } retu...
import {extend, transformData} from '../utils'; import {ModuleSystem} from './ModuleSystem'; import {ModuleManager} from './ModuleManager'; import {ManagerError, CompositionError} from './errors'; /** * @class Component * @category core * @param {Object} [params] - The parameters object. * @param {Object} [instruc...
const numberElement = document.getElementsByClassName("number"); const screenInput = document.getElementById("input"); const screenOutput = document.getElementById("output"); const clear = document.getElementById("clear"); function tecla(elementoHTML, valor) { this.elementoHTML = elementoHTML; this.valor = va...
import React, { Component } from 'react'; import PayrollForm from './payrollForm'; class Payroll extends Component { constructor() { super(); this.state = { 'countries': [{ "name": "Please Select", "value": "" }, { "name": "Norway", "value": "norway" }, { "name": "Finland", "value": "fin...
module.exports = { MidiDevices: MidiDevices, } var midi = require('midi'); // ALSAがデフォルトで作るこれをopenPortすると即座にもう一個ポートが増えるらしく、無限増殖する // ので、とりあえず名前で除外しておく(どうするのが正しい?) var IGNORE_PATTERNS = ["Midi Through", "RtMidi Output Client", "RtMidi Input Client"]; function foundInIngnoreList(name){ for(var i=0; i<IGNORE...
import utils from '@weavy/dropin-js/src/common/utils'; import postal from '@weavy/dropin-js/src/common/postal'; import turbo from './turbo'; import browser from './browser'; import WeavyConsole from '@weavy/dropin-js/src/common/console'; const console = new WeavyConsole("overlay"); const _overlays = new Map(); docum...
import React, { Component } from "react"; import { ethers } from 'ethers'; import * as fetch from 'node-fetch'; // import Web3Modal from "web3modal" // import SimpleStorageContract from "./contracts/SimpleStorage.json"; import Shop from "./contracts/Shop.json"; import BlockChainArt from "./contracts/BlockChainArt.jso...
document.querySelector('body').addEventListener('keypress', function (event) { if(disabled){ return; } if (document.activeElement.nodeName == "INPUT" || document.activeElement.nodeName == "TEXTAREA") { // if (KeyBindings.hasBindings(event.key)) { return; // } } if (ev...
/* * @Date: 2021-01-23 21:46:30 * @LastEditors: kanoyami * @LastEditTime: 2021-02-18 12:35:46 */ // Modules to control application life and create native browser window const { app, BrowserWindow, ipcMain, Menu } = require('electron') const url = require('url') const init = require("./services/init") init.startup()...
let g_intro_script = "" + "# 123\n\n" + "##\n/en Evalhalla Survey /;\n/fr Sondage Evalhalla /; \n\n" + "###\n/en It's easy to make a survey. /;\n/fr Il est facile de faire une sondage. /; \n" + "\n" + "*Q:\n/en Have you clicked on 'tutorial' yet? /;\n/fr Avez-vous déjà cliqué sur 'tutorial'? /; \n" ...
import BoardController from './BoardController.js' export const Color = { BLACK: 'BLACK', WHITE: 'WHITE' } export default function (game) { this.player1 = game.player1 this.player2 = game.player2 this.turn = game.turn this.currentPlayer = game.currentPlayer this.board = game.board this.check = game.ch...
const AbstractRendererLeaf = require('@zwerm/composite-bs-client/leafs/renderer/AbstractRendererLeaf'); const $ = require('jquery'); const { DateTime } = require('luxon'); const linkifyString = require('linkifyjs/string'); const StaMPBuilder = require('@stampit/stamp/MessageBuilder'); /** * A simple message renderer....
import unique from 'unique-selector'; const cacheTask = []; const selectors = new Map(); const { assign } = Object; const toggleMiddleware = {}; const anon = 'anonymous_'; function getMiddlewareName(userMiddleware, i) { const raw = userMiddleware.displayName || userMiddleware.name || anon + i; return [raw, raw ...
import React from 'react'; import PropTypes from 'prop-types'; import {Card, CardBody, HeadingText, NrqlQuery, Spinner, AutoSizer, PlatformStateContext} from 'nr1'; import {VitalItem} from './vital-item.js' export default class CoreWebVitalsVisualization extends React.Component { // Custom props you wish to be c...
var xhr = new XMLHttpRequest(); xhr.open('GET', "http://52.78.67.177/plays", true); xhr.send(); var movie; var theater; var date; var response; var a=0, b=0; var result= new Array(); var movieList = new Array(); var theaterList = new Array(); var timetableList = new Array(); xhr.addEventListener("readystatechange", pro...
/****************Create Multiple Modal********************/ function createNewModal(clicked_btn){ var layerIdArray = clicked_btn.id.split("_"); var layerId = parseInt(layerIdArray[1]); //Check's if the same id modal already exists or not. if($("#myModalBody_" + layerId).length == 0) { var ne...
'use strict'; // Must declare variables before use const CMD_DEFER_TIME = 1000; // Timeout when using commandDefer const TICK_PERIOD = 1000; // In-built tick interval const POLL_PERIOD = 5000; // Continuous polling function interval const HUE_TIMEOUT = 5000; // Timeout for h...
/** * Copyright 2021 tison <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
var EMOJIHANDLER = EMOJIHANDLER || new emojiHandler(); // http://apps.timwhitlock.info/emoji/tables/unicode - refer surrogate const MINLENGTH = 2; const MAXLENGTH = 7; function emojiHandler(){ var input; var os; var emojiStore; var active = false; var fileUrl; } emojiHandler.prototype.addInputById = function(i...
function cargarGeneros(){ $("#tablaGeneros").dataTable().fnDestroy(); $('#tablaGeneros').DataTable({ 'paging':true, 'info':true, 'filter':true, 'staveSave':true, 'ajax':{ "url":baseurl+"Cconfig/getGeneroConfigControler", "type":"POST", //"data":{ //"p1":p1, //"p2":p2 // } dataSrc:'' }, 'columns':...
let Web3 = require("web3"); let web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); let CheckList = artifacts.require("CheckList"); let Vendor = artifacts.require("Vendor"); let ProductDispatcherStorage = artifacts.require("ProductDispatcherStorage"); let ProductEngine = artifacts.require("Produ...
const net = require("net"); const path = require("path"); const uWS = require("uWebSockets.js"); const crypto = require("crypto"); const pipename = str => process.platform == "win32" ? `\\\\.\\pipe\\${str.replace(/^\//, "").replace(/\//g, "-")}` : str; const SOCKET_FILE = path.resolve(__dirname, "..", "unix.sock"); c...
import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { makeStyles } from '@material-ui/core/styles'; import { graphql, createFragmentContainer, commitMutation } from 'react-relay/compat'; import { Store } from 'react-relay/classic'; import Button from '@ma...
'use strict'; var yeoman = require('yeoman-generator'); var chalk = require('chalk'); module.exports = yeoman.generators.Base.extend({ initializing: function () { this.pkg = require('../package.json'); }, prompting: function () { var done = this.async(); this.log(chalk.green('\n.............DD8...
/* applibrary.js * Copyright (c) 2019-2020 by <NAME>, https://github.com/david-asher */ 'use strict'; /** * Collection of utilities for JSON, objects, events, web request. * @module applib */ // this is the global event emitted that all modules and the main app should share const eventsHandler = require('events'...
import { useRef, useEffect } from "react"; export const composeHandlers = (...handlers) => event => { for (const handler of handlers) { handler && handler(event); if (event.defaultPrevented) { break; } } }; export const difference = (a, b) => { const s = new Set(); for (const v of...
const cfnCR = require('cfn-custom-resource') const AWS = require('aws-sdk') const UPSERT = 'UPSERT' const DELETE = 'DELETE' const NO_MATCH_NAME_ERROR = 'Unable to find any matching zones at all given provided domain name' const NO_EXACT_MATCH_NAME_ERROR = 'Unable to find an exact matching zone given provided domain n...
var express = require('express'); var app = express(); var http = require('http').Server(app); var io = require('socket.io')(http); var path = require('path'); const vm = require('vm'); const util = require('util') var gameloop = require('node-gameloop'); app.set('port', (process.env.PORT || 5000)); var games = {}; v...
links = document.links; var date = new Date(); var year = date.getFullYear().toString(); var month = (date.getMonth()+1).toString()[1]?(date.getMonth()+1).toString():"0"+(date.getMonth()+1).toString(); var day = date.getDate().toString()[1]?date.getDate().toString():"0"+date.getDate().toString(); var today = [year, ...
/* name#id.class.class?a=v&a=v:"text"#tid, ... */ Element.prototype.addClass = function( className ) { if( this.className.length == 0 ) { this.className = className; } else { var classes = this.className.split( /\s+/ ); if( classes.indexOf( className ) == -1 ) { classe...
const BASE_FONTS = ['sans-serif', 'serif', 'monospace']; const BASE_FONT_METRICS = { // Android Fonts Roboto: { capHeight: 1456, ascent: 1900, descent: -500, lineGap: 0, unitsPerEm: 2048, }, RobotoMono: { capHeight: 1456, ascent: 2146, descent: -555, lineGap: 0, unitsPerE...
import React,{useEffect,useState} from "react"; // @material-ui/core components import { makeStyles } from "@material-ui/core/styles"; import io from 'socket.io-client'; import axios from 'axios'; import Icon from "@material-ui/core/Icon"; import {useHistory} from 'react-router-dom'; import {useDispatch,useSelector} f...
// ############################################################################# // ############################### Logging ################################ var { createLogger, format, transports } = require('winston') var path = require('path') var { combine, timestamp, label, printf } = format var myFormat = pr...
import React from 'react'; import {withRouter, Redirect} from 'react-router-dom'; /** * Form component to create or edit a user */ class UserForm extends React.Component { constructor(props) { super(props); this.handleUsernameChange = this.handleUsernameChange.bind(this); this.handleEma...
var Script = require('./script'); var ECKey = require('./eckey'); var conv = require('./convert'); var util = require('./util'); var BigInteger = require('./jsbn/jsbn'); var BIP32key = require('./bip32'); var Transaction = require('./transaction').Transaction; var TransactionIn = require('./transaction').Transaction...
const SITE_NAME = "NAME" const PORT = "9000"; const IP = "192.168.127.12" $ = args => { return document.getElementById(args) } function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } render = args => { $("title").textContent = SITE_NAME; var heading = new Vue ({ el : "#heading", d...
function puzzle_click(event) { const TIMEOUT_MS = 300; CLICK_EVENT = event; function single_click() { PUZZLE_CLICK_STATE = 0; do_word(CLICK_EVENT, "{{ url_for('uipuzzle.puzzle_click_across') }}"); } function double_click() { PUZZLE_CLICK...
/* CONSTANTS AND GLOBALS */ const width = window.innerWidth * 0.8, height = window.innerHeight * 0.8, margin = { top: 30, bottom: 60, left: 60, right: 30 }, radius = 4; // these variables allow us to access anything we manipulate in init() but need access to in draw(). // All these variables are empty before we ...
'use strict' import { app, BrowserWindow, ipcMain } from 'electron' // 注意这个autoUpdater不是electron中的autoUpdater const { autoUpdater } = require('electron-updater') const log = require('electron-log') /** * Set `__static` path to static files in production * https://simulatedgreg.gitbooks.io/electron-vue/content/en/us...
import React from 'react'; import { connect } from 'react-redux'; import queryString from "query-string"; import Button from "react-bootstrap/Button"; import {isArray} from "lodash"; import { withRouter} from "react-router"; import './artist-albums-list.css'; import {changeNavTitle} from "../../actions/navTitle"; impor...
/* Gale-Shapley Algorithm Implementation in NodeJS The input file contains a JSON (JavaScript Object Notation) with the preferences of the men and women that need to be matched. To maintain simplicity all the men and women have been assigned a unique ID Men have been assigned even numbers : [0, 2, 4, ..] Women hav...
var path = require("path"), queue = require("d3").queue, mkdirp = require("mkdirp"), rimraf = require("rimraf"), serverSettings = require("../lib/settings/"), transports = require("../lib/transports/"), logger = require("../lib/logger/"), Profiler = require("../lib/profiler.js"), probe =...
import React, { Component, Suspense, lazy } from 'react'; import { FormattedHTMLMessage } from 'react-intl'; import PropTypes from 'prop-types'; import GraphSpinner from '../../Shared/LoadingSpinners/GraphSpinner'; import LexiconModal from '../../Shared/Lexicon/LexiconModal/LexiconModal'; import classes from './Resul...
// Function to find the minimum in an array of moments. function minMoment(dates) { var start = moment(new Date(9999, 0, 1)); dates.forEach((date) => { if (moment(date).isBefore(start)) { start = moment(date); } }); return start } // Function to find the maximum of an arra...
// #!/user/bin/node 'use strict'; 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...
function UnoFileSystem_GetFileName(path) { const pathArray = path.split("/"); const lastIndex = pathArray.length - 1; return pathArray[lastIndex]; } function UnoFileSystem_GetShareFileType(shareFile, isUtf8) { if (shareFile.ContentType && !isEmpty(shareFile.ContentType) && shareFile.ContentType != 'a...
/** * @prettier * @copyright (c) 2020 - present, HGC-AB * @licence This source code is licensed under the MIT license described and found in the * LICENSE file in the root directory of this source tree. */ const AuthenticateHandler = require('../authenticate/authenticate-handler') const { InvalidArgumentError, ...
import React, { useContext, useState, useEffect } from "react"; import PropTypes from "prop-types"; import { Link, useHistory } from "react-router-dom"; import axios from "axios" import Swal from 'sweetalert2' import SharedContext from "../../../SharedContext"; const CardTable = ({ color }) => { const history = use...
const Discord = require('discord.js'); const finduser = require(`../utilityFunc/finduser.js`); const { Users, SoulLink, Characters, Shops, ShopListing, Items, CharItems} = require('../dbObjects'); const {prefix,currencyUnit} = require("../config.json") const { Op } = require('sequelize'); module.exports = { name: 'sho...
//this is a sketch made using a dataset from the pedometer of my phone. //lines correspond to number of steps recorded. //line 日关注度的累计 - 表示情绪分布 //bubbles correspond to number of calories burned. //bubbles 大小->关注度 //alpha value corresponds to the recorded speed. // 速度 -> //background circles are used for scale....
var express = require('express'); var router = express.Router(); var ad = require('../config/ad.json'); var ldapClient = require('../lib/ldap-client'); var request = require('request'); var fs = require('fs'); var moment = require('moment'); var debug = require('debug')('dataU'); var dataconfig = require('../config/dat...
'use strict'; var through = require('through2'); var rework = require('rework'); var reworkFunc = require('rework-plugin-function'); var urlUtils = require('url'); var nodePath = require('path'); var crypto = require('crypto'); var fs = require('fs'); var os = require('os'); var extend = require('extend'); var isImage...
import React , { Component, Fragment } from 'react'; import DustbinTbodyMenus from '../DustbinTbodyMenus'; import DustbinTrMenus from '../DustbinTrMenus'; import Rename from '../Rename'; import Attribute from '../Attribute'; import { icon, common } from '../../images'; import '../Tables/table.less'; class DustbinTable...
import React, {useEffect, useState} from 'react'; import { Inertia } from '@inertiajs/inertia'; import { InertiaLink, usePage } from '@inertiajs/inertia-react'; import Layout from '@/Shared/Layout'; import LoadingButton from '@/Shared/LoadingButton'; import TextInput from '@/Shared/FormElements/TextInput'; import Selec...
export class KgpTutorialButton{ constructor(domId, kgp, listeners = {}){ this.domId = domId this.kgp = kgp this.listeners = listeners this.init() } init(){ /*d3.select("#"+this.domId).remove() // trash button this.tutoButton = this.kgp.addSvgButton("\uf059",this.domId,"hint-tuto",0,57,...
window.addEventListener("load", () => { init(); window.startButton.addEventListener("click", startAnts); window.caveButton.addEventListener("click", generateCave); window.fieldButtons.addEventListener("click", changeMode); window.locker.addEventListener("click", changeLock); }); window.boost1.addEv...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va...
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { Container, Accordion, Ref, Divider, Label, Grid, Sticky, Menu, } from 'semantic-ui-react'; import history from '@history'; import { CopyButton, Loader, Error } from '@components'; import { Or...
"use strict"; 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.definePrope...
const Discord = require("discord.js"); const db = require("quick.db"); const timer = now => { const focus = number => { if (number.toString().length !== 2) { return "0" + number.toString(); } return number; }; return `Date : ${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()} | Time...
function getTable() { ; $.ajax({ url: '/admin/tables/' + $("#tables").val(), type: 'get', success: function (result) { result = result.result; console.log(result); var columns = []; var colHeaders = []; result['tableInfo'].forE...
function getColor(d) { return d > 70 ? "#800026" : d > 60 ? "#BD0026" : d > 50 ? "#E31A1C" : d > 40 ? "#FC4E2A" : d > 30 ? "#FD8D3C" : d > 20 ? "#FEB24C" : d > 10 ? "#FED976" : "#FFEDA0"; } function loadData() { $.ajax({ dataType: "json", url: "Health...
var spMinterContract = null; var subsMinterContract = null; var spContract = null; var spContract2 = null; var idSpContract = null; var subsContract = null; var idSubsContract = null; var ptContract = null; var spPrice, subsPrice; var enoughFund = false; var val = 0; var dai = 0; var business = true; var reference = nu...
import React from 'react' import Select from 'react-select' import { observer } from "mobx-react" import CheckboxedMultiSelect from 'components/checkboxed-multi-select' import classNames from 'classnames' const ErrorFeedback = observer(({errorMessages}) => { if (!errorMessages) { return null } ret...
var _ = require('lodash'); var async = require('async'); var mime = require('mime'); var infoToMarkdown = require('./conversions/infoToMarkdown'); var statusToTags = require('./conversions/statusToTags'); var classToTags = require('./conversions/classToTags'); exports.export = function (db, callback) { // Export f...
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { bindActionCreators } from "redux"; import { connect } from "react-redux"; import { Card } from 'antd'; import { faCircleNotch } from "@fortawesome/free-solid-svg-icons/faCircleNotch"; import { showDepositModal, showTransferModal, showWithd...
var width = d3.select("#map").node().getBoundingClientRect().width / 1.05, height = window.innerHeight / 1.15, centered; var projection = d3.geoMercator() .scale(7500) .translate([width / 2, height / 2]) .center([5.4, 52.2]); var path = d3.geoPath() .projection(projection); var svg = d3.select('#map').ap...
// define our restaurant default values var Model = { restaurants: [ { name: '<NAME>', description: 'Massive, fresh burgers and a great selection of craft beer.', position: {lat: 37.900009, lng: -122.062241} }, { name: 'Mixed Grain', ...