text
stringlengths
3.07k
16k
import {Event_Emitter} from '../../../libs/event_emitter.js'; import {Events, GATT_Service_List} from './types.js'; import {WebBluetooth_ID} from './id.js'; import {event_path} from '../../../helper/compatibility.js'; import style from './webbluetooth.css'; const template = document.createElement('template'); templat...
// BRING IN REACT, USESTATE, REACT-BOOTSTRAP MODULES import React, { useState } from 'react'; import { Container, Card, Button, Modal, Form } from 'react-bootstrap'; // BRING IN AUTHENTICATION SERVICES FUNCTIONS import Auth from '../../utils/auth'; // STYLING import 'bootstrap/dist/css/bootstrap.min.css' // BRING IN QU...
// Allows the navbar to toggle which section the user is looking at document.getElementById("passengerInfo").classList.toggle("hidden"); var currentPage = 1; function changeSection() { document.getElementById("passengerInfo").classList.toggle("hidden"); document.getElementById("flightlist").classList.tog...
global.Promise = require('bluebird'); const commando = require('discord.js-commando'); const Currency = require('./currency/Currency'); const Experience = require('./currency/Experience'); const { oneLine } = require('common-tags'); const path = require('path'); const Raven = require('raven'); const winston = require(...
'use strict'; var gulp = require('gulp'); var gutil = require('gulp-util'); // var path = require('path'); var sass = require('gulp-sass'); // var stylus = require('gulp-stylus'); // var nib = require('nib'); var eslint = require('gulp-eslint'); var pug = require('gulp-pug'); var exec = require('child_process').exec;...
/* soundSling Demo Sketch - 1-Axis sound diffusion - Added graphics to show curve and current sound location [<NAME> - 2018] */ var mgr, nexusDiv1, nexusDiv2, button, slider, client, context; var seatClicked = false; var curveCalc = []; var speakerMean = 0.;//this is set to be the location chosen by the user ...
var playerItems = []; var aiItems = []; var playerRequirements = []; var aiRequirements = []; var ingredients = ["Eggs", "Lettuce", "Milk", "Flour", "Sugar", "Wheat", "Rice", "Bread"] var wheelSpinning = false; let theWheel = new Winwheel({ 'outerRadius' : 212, // Set outer radius so wheel fits insi...
/* Have the function FoodDistribution(arr) read the array of numbers stored in arr which will represent the hunger level of different people ranging from 0 to 5 (0 meaning not hungry at all, 5 meaning very hungry). You will also have N sandwiches to give out which will range from 1 to 20. The format of the array will b...
export const aliases = { // @expo/snack-static/react-native-logo.png is an alias that is // implemented in the runtime, and uses by the react-native image docs '@expo/snack-static': '0.0.1', '@expo/snack-static/react-native-logo.png': '0.0.1', }; export const dependencies = { '37.0.0': { ...aliases, ...
let { WzwLauncher } = require("./platform/WzwLauncher"); let { Clicker } = require("./platform/Clicker"); let Games = require("./games/index"); /** * 建立一个启动器。 * @type {WzwLauncher} */ let launch = new WzwLauncher("#screen", { testspan: document.querySelector("#testspan") }); // 注册游戏 ...
import React, { Component } from 'react'; import './Dashboard.scss'; import axios from 'axios'; import Input from '../Input/Input.js'; import Responses from '../Responses/Responses.js'; import Filters from '../Filters/Filters.js'; import AtAGlance from '../AtAGlance/AtAGlance.js'; import Sort from '../Sort/Sort.js'; c...
/** * Created by kay on 23/6/17. * This pivoting algorithm was used from json.pivot * https://github.com/z5h/json.pivot/blob/master/src/jp.js */ let jsonPivot = (function() { let SortedSet = (function () { function find(val, array, comparator) { let l = 0; let r = array.length...
import * as React from 'react'; import { TopToolbar, ListButton, Tab, Show, SimpleShowLayout, TabbedShowLayout, RichTextField, DateField, Datagrid, ReferenceField, TextField, ImageField, NumberField, BooleanField, EditButton, } from 'react-admin'; import { Lea...
/** MIT License Copyright (c) 2020 Openlaw 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, distr...
const ms = require('ms') const guildModel = require('../models/guild.model'); const LeaftaEmbed = require('../Structure/Client/Embed'); const config = require('../Structure/Config/client'); module.exports.event = async(message) => { const client = message.client; message.content = message.content ?? ""; ...
'use strict'; const ibmdb = require('ibm_db'); //For connecting to DB const Pool = require("ibm_db").Pool // For connection pooling const async = require('async'); const first_names = ["Jim", "John", "Michael", "Omar", "Phyllis", "Mary", "Sheena", "Bob", "Robert", "Ignis", "Ingrid", "Amanda", "Jennifer", "Noah"] let...
import '../crafty/bounce.js' import { doCirclesOverlap } from '../crafty/circle.js' import '../crafty/face-detection.js' import '../crafty/score.js' import '../crafty/video.js' import { fitViewportToScene } from '../crafty/viewport.js' export class FacePong { constructor(boardWidth = 640, boardHeight = 960) { th...
#!/usr/bin/env node /* Copyright 2013 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dist...
import React, { useState, useLayoutEffect } from "react"; import { Helmet } from "react-helmet"; import { Button } from "react-bootstrap"; import Icon, { iconNames } from "../components/icon"; const KatacodaPanelToggleClosed = ({ onClick }) => ( <div className="d-flex align-items-center mt-5 mb-5"> <div classNam...
// JSWR by GDavid // Copyrgiht (C) 2018 Number.prototype.nearestShift = function() { var n = this; var m = n; for(var i = 0; m > 1; i++) { m = m >>> 1; } if (n & 1 << i-1 && 1 << i+1 <= Number.MAX_SAFE_INTEGER) { i++; } return i; } Array.prototype.closestTo = function (num) { var arr...
var Helper = require('./helper'); function Promise(planned, name, parentPromise) { this.name = name; this.state = new StatefulResult(); this.logics = new LogicPack(); this.queue = []; this.isFirstResolving = true; if (Helper.isDefined(planned)) { this.log('start', this, null); this.attempt(planned...
const RESERVED_ARRAY = [ // Reserved and used at ECMAScript 4 "as", "break", "case", "catch", "class", "const", "continue", "default", "delete", "do", "else", "export", "extends", "false", "finally", "for", "function", "if", "import", "in", "instanceof", "is", "namespace"...
/* global HTMLElementPlus */ // Exposes a beat uniform and an analyser uniform for use in the shader // fires a 'beat' event each time a beat is triggered in the audio input /** * Required params: Threshold */ /** * @customelement vj-otg-audio-uniform * @description Makes two uniforms in the shader: * - `beat...
require('dotenv').config(); const { writeFileSync, readFileSync } = require('fs'); const puppeteer = require('puppeteer'); const jsdom = require('jsdom'); const nodeFetch = require('node-fetch'); const { getZipCode, getNeighbourhoodData, convertResidentsToPercentage} = require('./utils/utils'); const WIDTH = 1920; con...
const scripts = [{ type: 'raw', name: 'interest-map', raw: 'https://raw.githubusercontent.com/bring-larry-to-life/scriptable-widget-interest-map/main/widget.js', forceDownload: false, storedParameters: { "apiKey": "testtest" } }, { type: 'raw', name: 'busyness-calendar', raw: 'https://ra...
import React from "react"; const SvgFlutter = props => ( <svg id="flutter_svg__Layer_1" data-name="Layer 1" viewBox="0 0 216.3 77.9" width="216.3px" height="77.9px" {...props} > <defs> <style> { ".flutter_svg__cls-1{fill:none}.flutter_svg__cls-3{fill:transparent;...
import React, { Component } from 'react' import { connect } from 'react-redux' import Router from 'next/router' import cookie from 'cookie' import { Toast } from 'antd-mobile' import uuid from 'uuid/v4' import reduxPage from '@reduxPage' import { getUser } from '@actions' import { http, setShare } from '@utils' import ...
const debug = require('debug') const dayjs = require('dayjs') const BigNumber = require('bignumber.js') const utc = require('dayjs/plugin/utc') const yargs = require('yargs/yargs') const { hideBin } = require('yargs/helpers') const constants = require('../constants') const db = require('../db') dayjs.extend(utc) con...
/* jshint node: true */ 'use strict'; const through = require('through2'); const svg2png = require('svg2png'); const gutil = require('gulp-util'); const PluginError = gutil.PluginError; const PLUGIN_NAME = 'gulp-mobile-icons'; /** * List of all sizes for which PNGs need to be created */ const SIZES = { /** ANDRO...
import React from 'react' import { fireEvent, wait } from '@testing-library/react' // eslint-disable-next-line import/no-unresolved import { renderWithRedux, createReduxStore } from 'testUtils' import App from 'components/App' import { MemoryRouter } from 'react-router-dom' import { getFixtureResourceTemplate } from '....
import { MetricsPanelCtrl } from 'grafana/app/plugins/sdk'; import {defaults} from 'lodash'; import 'leaflet'; import 'leaflet-ant-path'; import './lib/hexbinLayer.js'; import './lib/leaflet-heat.js'; import './css/hexbin.css'; import './css/map-panel.css'; const panelDefaults = { mapOptions: { latlon: [ 5...
'use strict'; const SQL = require('sql-template-strings'); class PingsQueries { constructor(db) { this.db = db; } /** * Enables or disables pings for an item in a channel * @param {TextChannel} channel The channel where to enable notifications * @param {string} item The item to set ping status for...
import React, { useEffect, useState } from 'react'; import { useSelector } from 'react-redux'; import Tabs from '../../components/Tabs'; import ProperitiesPanel from './components/ProperitiesPanel'; import BlockCodePanel from './components/BlockCodePanel'; import VariablePanel from './components/VariablePanel'; const...
var colors = require('colors'); var util = require('util'); var EventEmitter = require('events').EventEmitter; const readline = require('readline'); /* options: { items: [ { onSelect?: () => void; value: string; text: string; } ]; header?: string; onQuit?: () => void; startIndex?: ...
/* eslint-disable */ import React from 'react' import PropTypes from 'prop-types' import { withStyles } from '@material-ui/core/styles' import Button from '@material-ui/core/Button' import FormControl from '@material-ui/core/FormControl' import Input from '@material-ui/core/Input' import InputLabel from '@material-ui/c...
function Group(digits, total, mix, negative, time) { this.digits = digits; this.total = total; this.mix = mix; this.negative = negative; this.nums = new Array(total); this.generator = new Array(); this.millisec = time * 1000; this.answer = 0; } Group.prototype.generate = function(qIndex...
// Store our API endpoint as queryUrl. var queryUrl = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.geojson"; // Perform a GET request to the query URL/ d3.json(queryUrl).get(function (data) { // Once we get a response, send the data.features object to the createFeatures function. createFeatu...
import { get, post, put, del } from './requester.js'; const userKinveyModule = 'user'; const collectionKinveyModule = 'appdata'; // const partials = { // header: './templates/common/header.hbs', // footer: './templates/common/footer.hbs' // }; const app = Sammy('#root', function () { this.use('Handlebars...
import rss from "rss-converter" import checkNotification from "./check-notification.js" import chalk from "chalk" import moment from "moment" import fs from "fs" import path from "path" import { fileURLToPath } from "url" import { google } from "googleapis" import { token_api } from "./get-yt-api.js" const youtube =...
"use strict"; // configure path to perl-script var hostname = window.location.hostname; var cgipath = "/cgi-bin/slides_loader/"; var loadscript = "load_data_serial.pl"; var scriptpath = "https://"+hostname+cgipath+loadscript; console.log (scriptpath); // variables for file loading and progressbar // array for hol...
d3.select().__proto__.attrs = function(obj) { Object.keys(obj).forEach(k => this.attr(k.split(/(?=[A-Z])/).join('-').toLowerCase(), obj[k])); return this; }; const getColor = i => d3.interpolateRainbow(i); const getId = s => s+'-'+`${Math.random()}`.substr(2); const $ = (...args) => document.querySelector(...args); co...
const Utils = require('./utils.js'); const Space = require('../models/space.js'); class MoveCalculator { constructor(board, space, side) { this.board = board; this.side = side; // game is set for Space, but not space_proxy this.space = ((space instanceof Space) ? space : this.board.space(space.x, sp...
'use strict'; const { wxAppConfig } = require('pconfig'); exports.main = async (event, context) => { //event为客户端上传的参数 console.log('event : ', event) let params = event.params || {} var tokenApiUrl = `https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wxAppConfig.appid}&secret=${wx...
/* global $CC, Utils, $SD */ $SD.on('connected', (jsonObj) => connected(jsonObj)); function connected(jsn) { var keyArray = ["up", "down", "reset", "left", "right", "aitoggle"]; for (var keyAction in keyArray) { $SD.on('com.roguedarkjedi.dogcam.'+keyAction+'.keyDown', (jsonObj) => action.onKeyDown(jsonObj)); ...
/* * App reducer */ import { CREATE_PRIVATE_INC_ACCOUNT, IMPORT_PRIVATE_INC_ACCOUNT, CREATE_TEMP_INC_ACCOUNT, IMPORT_TEMP_INC_ACCOUNT, UPDATE_ACCOUNT, LOAD_ACCOUNTS, LOAD_ACCOUNTS_SUCCESS, LOAD_ACCOUNTS_FAILURE, TOGGLE_INFO_DIALOG, TOGGLE_PAPPS_MENU_LIST, CLOSE_PAPPS_MENU_LIST, COUNT_UP_REQUE...
//Build client const Discord = require('discord.js'); const client = new Discord.Client(); const token = require('./settings.json').token; const fs = require('fs'); let log = null; async function saveLog() { //console.log( 'Current log:', JSON.stringify(log,""," ") ); if( log ) { fs.writeFileSync('./log.jso...
const { app, BrowserWindow, globalShortcut, ipcMain, Menu, nativeTheme, session, shell } = require('electron') const autoUpdater = require('electron-updater').autoUpdater const is = require('electron-util').is const Store = require('electron-store') const schema = { appHeight: { type: 'number', ...
import debounce from 'lodash.debounce'; export const DEBOUNCE_WAIT = 40; /** @typedef {(frame: HTMLIFrameElement) => void} FrameCallback */ /** * FrameObserver detects iframes added and deleted from the document. * * To enable annotation, an iframe must be opted-in by adding the * `enable-annotation` attribute. ...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _iconSelect = require('choerodon-ui/lib/icon-select'); var _iconSelect2 = _interopRequireDefault(_iconSelect); var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); var _classCallCheck3 = _interopRequireDefault(_cl...
"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...
import React from 'react' import { borderColor, darkColor, lightColor } from '../assets/constants'; import { insideOutsideMultiply } from '../functions'; class Slider extends React.Component { constructor(props) { super(props) const circleX = insideOutsideMultiply(props.limit, 100, props.value) this.state = {...
const express = require('express'); const bodyParser = require('body-parser'); const {body, validationResult, param} = require('express-validator'); const swaggerUi = require('swagger-ui-express'); const {MonitorApp} = require('eth-bulk-monitor-client-nodejs'); const Blockchain = require('./blockchain'); const Storage ...
//POMODORO_TIMER_COUNT = 5; //INTERVAL_TIMER_COUNT = 3; //RINGING_TIME = 2; POMODORO_TIMER_COUNT = 25 * 60; INTERVAL_TIMER_COUNT = 5 * 60; RINGING_TIME = 5; NEUTRAL = 0; FOCUSING = 1; TAKING_INTERVAL = 2; var timeout_id; var timer_count = POMODORO_TIMER_COUNT; var status = NEUTRAL; function changeBgcolorToWhite() { ...
import React, { Component } from 'react'; import './App.css'; import { Link } from 'react-router-dom' var buildRandom = function(data){ var random = [] var idsAdded = [] var getRandomIntInclusive = function(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (ma...
import Http from './http-utils'; import Utils from './coinswap-utils'; import axios from 'axios'; class ChangeAPIWorker { API_URI = 'https://api.changenow.io/v1/'; //API_URI = 'https://api.stealthex.io/api/v2/'; buildUrl({ url, params }) { const query = []; for (let key in params) { ...
window.onload=function() { document.getElementById('loading_mask').style.display='none'; } // 4 switches for the buttons function activeSwitch_1() { document.getElementById('posts_button').setAttribute('class', 'active'); document.getElementById('igtv_button').setAttribute('class', 'none'); document.getEleme...
/** * 资源注入到html * * webpack.config.js: * html: { * inject: function(data) { * // data.file, data.compilation, data.tag, data.options * return file.file; * } * } * * output files: * dist/ * css/ * commons~pageA~pageB~pageD-chunk-327fe913.css * js/ * commons~pageA~...
var Author = require('../models/author') var Book = require('../models/book') var async = require('async') var {regexReqFilter} = require('../utils') // Display list of all Authors list = function (req, res, next) { res.render('author_list', {title: 'Author List'}) } load_grid = function (req, res, next){ Author...
var os = require('os') var _ = require('lodash') var oo = require('@carbon-io/carbon-core').atom.oo(module); var _o = require('@carbon-io/carbon-core').bond._o(module); /****************************************************************************** * @class SwaggerDescriptorGenerator */ module.exports = oo({ _ct...
/** * @adobe/react-spectrum-workflow (c) by Adobe * * @adobe/react-spectrum-workflow is licensed under a * Creative Commons Attribution-NoDerivatives 4.0 International License. * * You should have received a copy of the license along with this * work. If not, see <http://creativecommons.org/licenses/by-nd/4.0/>. **/ ...
// DOM variables const bankBalanceElement = document.querySelector('#bankBalance'); const loanBalanceElement = document.querySelector('#loanBalance'); const workBalanceElement = document.querySelector('#workBalance'); const bankLoanElement = document.querySelector('#bankLoan'); const bankLoanBtnElement = document.que...
import React from 'react'; import Typography from '@material-ui/core/Typography'; import {createMuiTheme } from '@material-ui/core/styles' import {Route, Switch, Link,BrowserRouter} from 'react-router-dom'; import Tab from 'react-bootstrap/Tab' import Tabs from 'react-bootstrap/Tabs' import Table from 'react-bootstrap...
'use strict'; import React, {Component} from 'react'; import { View, Text, StyleSheet, ListView, Image, ScrollView, Platform } from 'react-native'; import ModalDropdown from 'react-native-modal-dropdown'; import Ionicons from 'react-native-vector-icons/Ionicons'; import { connect } from 're...
/* eslint-disable react/button-has-type */ import React, { Component } from 'react'; import { withRouter } from 'react-router-dom'; import { Consumer } from '../../context/AuthContext'; import '../../firebase'; import { doSignOut } from '../../firebase/auth'; import Header from '../../components/Header/Header.Component...
const { and, or } = require('./index.js') const isEven = n => n % 2 === 0 const isPositive = n => n > 0 const isBig = n => Math.abs(n) >= 1000 describe('and', () => { test('return true with no predicates', () => { expect(and()(1)).toBe(true) }) test('return result of single predicate', () => { expect(...
// // Copyright (c) 2017 Cisco Systems // Licensed under the MIT License // // Lib for converting markdown to HTML var showdown = require('showdown'); // Custom extension for adding nofollow to anchor links var anchorAttributes = { type: 'output', regex: /(<a.+<\/a>)/g, replace: (match, $1) => { re...
import React, { useState, useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; import { push } from "connected-react-router"; import R from "ramda"; import S3 from "react-aws-s3"; import PageLayout from "../../organisms/PageLayout"; import Button from "react-bulma-companion/lib/Button"; imp...
const Promise = require('bluebird'); const RequestPromise = require('request-promise'); const cheerio = require('cheerio'); const randomUseragent = require('random-useragent'); const resolve = require('../../resolvers/resolve'); async function Afdah(req, sse) { const movieTitle = req.query.title; // These ar...
var APIKey = "823016d80c8b85490616d6e0ed68f34a"; userCities = []; function loadCities(){ //get city array from localStorage var citiesStr = localStorage.getItem("cities"); if(citiesStr !== null){ userCities = JSON.parse(citiesStr); } //iterate through array, building divs for each city ...
/** * 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...
'use strict'; let originHref = location.href; console.log('Oring href', originHref); /* * API * */ const Api = function() { }; let cache = {}; Api.prototype.getInfo = function(linkObj, cb) { if(cache[linkObj.id]) { return cb(cache[linkObj.id]); } let href = linkObj.href; let fb = 'https://l.facebo...
/** * Created by raychen on 16/9/18. */ import {userSchema} from '../../models/userSchema' import {github_userSchema} from '../../models/github_userSchema' import {github_repoSchema} from '../../models/github_repoSchema' import {my_userSchema} from '../../models/mysql-models/my_userSchema' import {connect, logger} f...
/* * MIT License * * Copyright (c) 2016 yanbo * * 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, m...
'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...
/* eslint no-undef: 0 */ import React, { Component } from 'react'; import './App.css'; import '../node_modules/tracking/build/tracking-min'; import '../node_modules/tracking/build/data/face'; import Webcam from 'webcamjs'; import resemble from 'resemblejs'; import Modal from 'react-modal'; const debounce = (func, wait...
/* * file-content-extractor.js * https://github.com/ericsteele/retrospec.js * * Copyright (c) 2014 <NAME> * Licensed under the MIT license. * https://github.com/ericsteele/retrospec.js/blob/master/LICENSE */ 'use strict'; // node libs var FS = require('fs'), // file system path = require('path'); // u...
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; import _extends from "@babel/runtime/helpers/esm/extends"; import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode } from "vue"; import { computed, ref, defineComponent, nextTick } from 'vue'; import Transition, { get...
export default { namespaced: true, state: { my_web_token: false, //weather user has login already my_roles: [], my_permissions: [], access: {}, }, getters: { }, mutations: { INI_MY_LOGIN_ROLES_PERMISSIONS(state) { try { state....
import Search from "./models/Search"; import { element, renderLoader, clearLoader, elementStrings } from "./base"; import * as searchView from "./views/searchView"; import * as recipeView from "./views/recipeView"; import * as listView from "./views/listView"; import * as likeView from "./views/likeView"; import Recipe...
const prevIds = []; /*********************** * Function Definitions * ************************/ function createSubProdRows(products) { const subProducts = products.sub_products; if (!($("#moreProducts").css('display') === 'none')){ $("#moreProducts").on("hidden.bs.modal", function(e) { $...
let ctx; let cols = 5; let rows = 5; let p = []; let shuffle; let bingo; let totalValue = 0; let ontime; function setup() { ctx = createCanvas(301, 301); ctx.parent('bingo-panel'); var c = 1; for (let i = 0; i < rows; i++) { p[i] = []; for (let j = 0; j < cols; j++) { p[i][j] = new grid(i * 60, j * 60, c); ...
import {bold, cyan, dim} from 'chalk'; import figures from 'figures'; export const descriptions = { project: `Scaffold a new Node.js project with ${bold.yellow('Babel')}, ${bold('ESLint')}, and ${bold.magenta('Jest')}`, app: `Scaffold a new ${bold('web application')} - basically a project with CSS, bundling, a...
const bcryptjs = require('bcryptjs'); const jwt = require('jsonwebtoken'); const queryString = require('query-string'); const Axios = require('axios'); const mogoose = require('mongoose'); const { validationResult } = require('express-validator'); const User = require('../../access/models/user'); const Rol = requi...
import React, {useState} from 'react'; import { Text, View, SafeAreaView, Image, ScrollView, FlatList, StyleSheet, } from 'react-native'; import DocumentPicker from 'react-native-document-picker'; import ImagePicker from 'react-native-image-crop-picker'; import Ionicons from 'react-native-vector-icons/Ion...
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.hasOwnProperty(p)) d[p] =...
// http://suncalc.net/ // gradient colors from https://cdpn.io/rDEAl import getHours from 'date-fns/getHours'; const momentOfDay = (hour) => { let momentOfDay = ''; if (hour >= 20 || hour <= 5) { momentOfDay = 'Night'; } else if ((hour >= 8 && hour < 18) || hour <= 17) { momentOfDay = 'Day'; } else { ...
import React, { useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { useForm } from "react-hook-form"; import { createPlaylist, updatePlaylist, // updatePlaylistReset, } from "../../redux/playlist/playlist-actions"; import { playlistStateSelector } from "../../redux/playlist/...
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl...
import { quadtree } from 'd3-quadtree'; import { Sprite } from 'pixi.js'; export function solveCollision(circles, options) { const opts = options || {}; const tree = quadtree() .x(function (d) { return d.xp; }) .y(function (d) { return d.yp; }); if (opts.extent !== undefined) tree.ext...
'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...
/** *############################################################################### # Copyright (c) 2012-2020 <NAME> <EMAIL> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software withou...
var collections = require('../collections'); var renderer = require('./renderer'); var behavior = { updateRenderState : function() { this.renderState = { points : [], lines : [], polygons : [] } this.clearRegionLinks(); this._updateRenderState('California'); var f = null, rend...
import React , { Component } from 'react'; import axios from '../../axios'; // import Aux from '../hoc/Aux/Aux' import Modal from '../../components/UI/Modal/Invoice/Modal'; import PropTypes from 'prop-types'; // ES6 import { withRouter } from "react-router"; import './Home.css'; import { Button,Nav,NavDropdown } from '...
import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { Switch, Route, useRouteMatch, useHistory, } from "react-router-dom"; import Icon from '@mui/material/Icon'; import Button from '@mui/material/Button'; import Dialog from '@mui/material/Dialog'; import DialogTitle fro...
const {global, flatObject} = require("./utils"); const {defineProperties} = Object; const {toString} = Object.prototype; let typesCount = 0, invalidMask; //eslint-disable-next-line no-bitwise const isValidMask = (mask) => !(mask & invalidMask); const api = { TYPE_ANY: -1, isValidMask, list: {} }; co...
import $ from 'jquery'; import _ from 'underscore'; import clut from './clut'; import {trackEvent} from './analytics'; import {isSmall} from './responsive-helpers'; // performs a simple mapping from the html input elements // to a javascript options objects that is then consumed by // the editor for rendering class Co...
import dayjs from "dayjs"; import matchSorter from "match-sorter"; import { isEqual, get } from "lodash-es"; import jump from "jump.js"; const DATE_TIME_FORMAT_SIMPLE = "D MMM YYYY, HH:mm:ss"; export function createUUID() { // http://www.ietf.org/rfc/rfc4122.txt var s = []; var hexDigits = "0123456789abcdef"; ...
const Discord = require('discord.js'); const client = new Discord.Client(); client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); }); var prefix = "-"; client.on('message', message => { if (message.author.id === client.user.id) return; if (messag...
import test from 'ava' import sinon from 'sinon' import attachHandlers from '../src/attachHandlers' import bot, { fakeController } from './helpers/mockBot' const sendMessage = (text) => fakeController.trigger('direct_mention', [bot, { channel: 'foo', user: '<EMAIL>', text }]) const testMessages = (t, ...
import React from 'react' import PropTypes from 'prop-types' import { Link, graphql } from 'gatsby' import Layout from '../components/Layout' import BlogRoll from '../components/BlogRoll' import { Typography, Button, Grid } from '@material-ui/core'; import { menuItems, MENU_ITEM_INDEX } from '../constants'; import nya...