text
stringlengths
3.07k
16k
import React, { useEffect, useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; import DatePicker from 'react-datepicker'; import { useSelector, useDispatch } from 'react-redux'; import { createReserve } from '../redux/reducers/reservationsReducer'; import { getUser } from '../redux/reduc...
"use strict"; let renderArea; let adventures; const adventureContent = {}; const TABLE_START = `<tr><th class="border" colspan="6"></th></tr>`; const TABLE_END = `<tr><th class="border" colspan="6"></th></tr>`; window.onload = function load () { renderArea = $(`#stats`); renderArea.append(TABLE_START); renderAr...
"use strict"; import './styles.scss'; import 'awesomplete'; import 'flatpickr'; import 'flatpickr/dist/l10n/vn.js'; import oboe from 'oboe'; if ('serviceWorker' in navigator) { window.addEventListener('load', () => { navigator.serviceWorker.register('/service-worker.js').then(registration => { ...
import { V } from './util/V.js'; import { Oscillator, Reciver } from './WebAudioModemBufferedCore.js'; V.init(); class Encoder { constructor( encodBtnId, clearBtnId, encodeInputId, pauseDurationId, activeDurationId, progressId ) { this.Oscillator = new Os...
import React, { useState } from "react"; import PropTypes from "prop-types"; // @material-ui/core components import { makeStyles } from "@material-ui/core/styles"; import Table from "@material-ui/core/Table"; import TableHead from "@material-ui/core/TableHead"; import TableRow from "@material-ui/core/TableRow"; import ...
// 3rd party modules const Promise = require('bluebird'); const _ = require('lodash'); const moment = require('moment'); // application modules const logger = require('./logger'); const {MsgIds, Priorities} = require('../models/event'); const toSeconds = milliseconds => milliseconds / 1000; const increase = (obj, p...
import React from 'react'; import clsx from 'clsx'; import PropTypes from 'prop-types'; import {Doughnut} from 'react-chartjs-2'; import { Box, Card, CardContent, CardHeader, Divider, Typography, colors, makeStyles, useTheme } from '@material-ui/core'; import LaptopMacIcon from '@material-ui/icons/Lap...
document.getElementById('shareme').addEventListener('click', share_fb); function share_fb() { var old_value =0,uwd=""; try{ chrome.storage.local.get('p1', function(result){ old_value = parseFloat(result.p1); var old_value2 = document.getElementById("c_score").value; if(old_value){ window.location ...
/** * @file fetches package details from registry */ const fetch = require('node-fetch'); const semver = require('semver'); const getLicenseStr = require('./getLicenseStr'); const getLicenseType = require('./getLicenseType'); const url = require('url'); const printError = require('./printError'); const readline = re...
import React, { useEffect, useState, useRef } from "react"; import { useDispatch, useSelector } from "react-redux"; import { connect } from "../../redux/blockchain/blockchainActions"; import { fetchData } from "../../redux/data/dataActions"; import Socials from "../Socials/Socials"; import "./mintArea.css"; import { Fo...
// Copyright (c) 2016, Intel Corporation. // Sample code demonstrating how to use I2C to communicate with slave devices // Hardware Requirements: // - A Grove LCD // - pull-up resistors for SDA and SCL, we use two 10k resistors, // - Choose resistors that work with your LCD hardware. The ones listed here // ...
/** * Stashmap * Cache objects as key/values wihtin namespaces in memory and let them have a lifetime * For simple and fast caching and retrieving. */ var Stashmap = require('stashmap'); var conflate = require('conflate'); var Timesafe = module.exports = function Timesafe(options){ var defaultOptions = { //...
import React, {Component} from 'react' import PropTypes from 'prop-types' import {connect} from 'react-redux' import UserPanel from '../summary/user-panel' import GoalProgress from '../../ui/goal-progress' import ActivityChart from '../../ui/activity-chart' import {Icon} from 'semantic-ui-react' import { fetchUserG...
// This module is responsible for the "/jobs" view // A user is greeted with a list of every job they are a part of, // whether they created or were invited to the job import React, { useContext, useEffect, useState } from 'react' import { JobsContext } from './JobsProvider' import Paper from '@material-ui/core/Paper...
var actions = require("../lib/actions") var u = require("../lib/utils") var sq = require("../lib/spawnQueue") var motion = require("../lib/motion") var rT = { name: "transporter", type: "transporter", /** @param {Creep} creep **/ run: function(creep) { if(rT.endLife(creep)){ return...
'use strict'; var _chromeBrowser = require('./chromeBrowser'); var _chromeBrowser2 = _interopRequireDefault(_chromeBrowser); var _tabManagerState = require('./tabManagerState'); var _tabManagerState2 = _interopRequireDefault(_tabManagerState); var _tabWindow = require('./tabWindow'); var TabWindow = _interopRequi...
import Particle from './particle' import Vector2 from './vector2' /** * 标准正态分布 */ function standardNormalDistribution() { const numberPool = [] return function () { if (numberPool.length > 0) { return numberPool.pop() } else { const u = Math.random(), v = Math.random() const p = Mat...
//Map from ol.Map //View from ol.View // import { // DragAndDrop, ol.interaction.DragAndDrop // defaults as defaultInteractions, ol.interaction.defaults // } from 'ol/interaction'; //import {ol.format.GPX., ol.format.GeoJSON , ol.format.KML } from '.ol.format'; // import {ol.layer.OSM,...
import styled from "styled-components"; import React from "react"; import { connect } from "react-redux"; const Leftside = (props) => { return ( <Container> <ArtCard> <UserInfo> <CardBackground /> <a> <Photo...
/** * Timepack Util package * @author MillZhang * @date 2017-10-17 13:58:23 * @version 1.1.6 */ class TimepackUtil { constructor() { console.warn(`如需使用fileUploader方法,请先导入qiniu上传组件;`) this.name = "timepack-util"; this.version = '1.1.6'; this.constant = { DOMAIN: 'https://images.cache.timepac...
// class GraphNode { // constructor(val) { // this.val = val; // this.neighbors = []; // } // } // let a = new GraphNode("a"); // let b = new GraphNode("b"); // let c = new GraphNode("c"); // let d = new GraphNode("d"); // let e = new GraphNode("e"); // let f = new GraphNode("f"); //...
// Global Objects var config = require('../../configuration/configuration'); var logger = require('../../middlewares/logger'); var request = require('request-promise'); var head = { // 'authorization' : config.commServerToken, 'Content-Type' : 'application/json; charset=utf-8', 'Accept' : 'application/json', ...
const path = require('path') const expect = require('chai').expect const fs = require('graceful-fs') const npf = require('npm-package-filename') const rimraf = require('rimraf') const ut = require('./lib/utilities') const reconstructMap = require('../reconstruct-map') function shouldNotRunFunc(err, data) { throw n...
/*! ========================================================= * Paper Kit React - v1.3.0 ========================================================= * Product Page: https://www.creative-tim.com/product/paper-kit-react * Copyright 2021 Creative Tim (https://www.creative-tim.com) * Licensed under MIT (https://github.com...
/* * Welcome to your app's main JavaScript file! * * We recommend including the built version of this JavaScript file * (and its CSS file) in your base layout (base.html.twig). */ // any CSS you require will output into a single css file (app.css in this case) require('../css/app.scss'); // Need jQuery? Install ...
'use strict'; const Discord = require('discord.js'); const { Constants: { ApplicationCommandOptionTypes: Types, MessageButtonStyles, InteractionTypes, MessageComponentTypes, }, MessageActionRow, MessageButton, InteractionCollector, } = Discord; const dehumanize = require('parse-duration'); const platfor...
jQuery(document).ready(function($){ var ajaxurl = nc_timezone.ajaxurl; initialize_clock(); $('#nc_place_search_form').submit(function(){ var search = $('#nc_place_search').val(); if (is_valid_place_input(search) ){ $.ajax({ url : ajaxurl, type : 'get', data : { action : 'nc_timezone_search...
var posId = 0; var pref = ""; var ajax = true; var form; function nccAction(event, elem, params, prefix) { ajax = true; if (event != null) { event.preventDefault(); } var nncActionModel = JSON.parse(params); var postData = []; posId = 0; pref = prefix; postData.push({ n...
'use strict'; global.ESL.ns('ESL'); let AssistanceForm = require('../forms/assistance_form'); let CaseNumberForm = require('../forms/case_number_form'); let HouseholdAdultsForm = require('../forms/household_adults_form'); let AdultSignerForm = require('../forms/adult_signer_form'); let AdultSignerSSNForm = require('.....
/* ────────────╮ │ truwrap CLI │ ╰─────────────┴─────────────────────────────────────────────────────────────── */ /* eslint unicorn/no-process-exit:0, node/prefer-global/process: [error] */ import {format} from 'node:util' import {dirname} from 'node:path' import {fileURLToPath} from 'node:url' import yargs from 'y...
/* Copyright 2020 Adobe All Rights Reserved. NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms of the Adobe license agreement accompanying it. If you have received this file from a source other than Adobe, then your use, modification, or distribution of it requires the pri...
var Jsonix = require('jsonix').Jsonix; var XLink_1_0 = require('w3c-schemas').XLink_1_0; var XSD_1_0 = require('w3c-schemas').XSD_1_0; var OWS_1_1_0 = require('ogc-schemas').OWS_1_1_0; var Filter_2_0 = require('ogc-schemas').Filter_2_0; var WFS_2_0 = require('ogc-schemas').WFS_2_0; var GML_3_2_1 = require('ogc-schemas'...
function concatenateArrayBuffers(buffer1, buffer2) { var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); tmp.set(new Uint8Array(buffer1), 0); tmp.set(new Uint8Array(buffer2), buffer1.byteLength); return tmp.buffer; }; var saveByteArray = (function () { var a = document.createElement("a"); ...
describe("Test Promise.all()", function() { it("Return the actual Promise", function(done) { var testResolve = ensureReturnsPromise( () => { let allPromises = Promise.all([tryUrl('/users'), tryUrl('/hobbies'), tryUrl('/favorites')]).then(result => { return result }) /...
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; ...
#!/usr/bin/env node const Table = require('cli-table3'); const fs = require('fs'); const path = require('path'); const spawn = require('cross-spawn'); const yargs = require('yargs'); const { isYarn } = require('is-npm'); const argv = yargs .option('script', { alias: 's', type: 'string', description: 'You...
/* eslint-disable no-bitwise */ // ---------------------------------------------------------------------------- // Decoding infrastructure // ---------------------------------------------------------------------------- const REVERSE_LOOKUP = []; REVERSE_LOOKUP['-'.charCodeAt(0)] = 62; REVERSE_LOOKUP['_'.charCodeAt(0)...
import uuid from "uuid"; import omit from "lodash/omit"; import uniq from "lodash/uniq"; import flatten from "lodash/flatten"; import { logJson, transactionJson } from "../util/esJson"; import createTimer from "../util/createTimer"; import { observable, autorun } from "mobx"; import { Line, LineBuffer, Clear } from "cl...
import _extends from "@babel/runtime/helpers/esm/extends"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { createVNode as _createVNode } from "vue"; var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, ...
import moment from "moment" const state = { exDatas: [], inDatas: [], } const getters = { sumExpenditure(state) { var totalExpenditure = 0; for(var exData of state.exDatas){ totalExpenditure += Number(exData.expend_price); } return totalExpenditure; }, ...
import React from 'react' import { css } from '@emotion/react' import Script from 'react-load-script' import FacebookShare from '../Social/FacebookShare' import TwitterShare from '../Social/TwitterShare' import EmailShare from '../Social/EmailShare' import { styles } from '../../css/css' import ContentImage from './...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDateType = exports.getFestival = exports.getDateDay = exports.getMonthDays = exports.getDateTimestamp = exports.dateToArray = exports.dateFomater = exports.paddingLeft = exports.isArray = exports.isPlainObject = void 0; const obj2str...
const TestToken = artifacts.require('TestToken.sol'); const StrictValidatingReserve = artifacts.require('StrictValidatingReserve.sol'); const LiquidityConversionRates = artifacts.require('LiquidityConversionRates.sol'); const TempBank = artifacts.require('TempBank.sol'); const BN = web3.utils.BN; const {expectRevert} ...
const fast = require('@f5devcentral/f5-fast-core') const uts = require('unix-timestamp') const cron = require('node-cron') uts.round = true const sendMetrics = require('./beaconCall') const alljobs = [] const templates = { bigipSystem: ` definitions: source: default: bigip1 cpu: de...
/* eslint global-require: 0, consistent-return: 0 */ const isProd = process.env.NODE_ENV === 'production'; const config = require('./server/configVo'); const log4js = require('log4js'); const fs = require('fs'); const path = require('path'); const express = require('express'); const bodyParser = require('body-parser')...
const config = require('config'); const supportedEvents = config.has('supported-events') ? config.get('supported-events') : []; const {parseAor, parseEventHeader, getDefaultSubscriptionExpiry} = require('./utils'); const _ = require('lodash'); const assert = require('assert'); const debug = require('debug')('drachtio:s...
function KernelNode(id, label, data) { this.id = id; this.label = label; this.data = data; } KernelNode.prototype.field_equals = function(name, val) { if (this.data.hasOwnProperty(name)) { for (var i = 0; i < this.data[name].length; i++) { if (this.data[name][i]==val) return true; ...
'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 ("...
const algoliasearch = require('algoliasearch'); const chunk = require('lodash.chunk'); const Activity = require('./activity'); /** * give back the same thing as this was called with. * * @param {any} obj what to keep the same */ const identity = obj => obj; const indexState = {} /** * Fetches all records for th...
const fs = require('fs'); const express = require('express'); const bcrypt = require('bcryptjs'); const {ApolloServer, UserInputError} = require('apollo-server-express'); const {GraphQLScalarType} = require('graphql'); const {Kind} = require('graphql/language'); const {MongoClient} = require('mongodb'); const { v4: uui...
import React from "react"; import { LineChart, Line, Brush, ResponsiveContainer, XAxis, YAxis, CartesianGrid, Tooltip } from "recharts"; import { Container, Spinner } from "reactstrap"; import apis from "../scripts/apis"; import DataItem from "./DataItem.js"; import DashboardItem from "./DashboardItem.j...
"use strict"; var canvas; var gl; var program; var numTimesToSubdivide = 5; var index = 0; var positionsArray = []; var normalsArray = []; var numVertices = 36; var texSize = 4; var numChecks = 2; var flag = true; var red = new Uint8Array([255, 0, 0, 255]); var green = new Uint8Array([0, 255, 0, 255]); var b...
import ipfsHandler from './handlers/ipfs.js' import corsHandler from './handlers/cors.js' import makePouch from './make-pouch.js' import makeFalcorServer from './falcor-server.js' import { escapeId } from '../../../edge/lib/escape-id.js' export default function ({ clientConfig, appName, dbConf, schema }) { ...
const { expectEvent, singletons, constants, BN, expectRevert } = require('@openzeppelin/test-helpers'); const IdleToken = artifacts.require('IdleToken'); const IdleRebalancer = artifacts.require('IdleRebalancer'); const IdlePriceCalculator = artifacts.require('IdlePriceCalculator'); const IdleCompound = artifacts.requ...
// TODO support start and end line caps with svg markers // https://stackoverflow.com/questions/11808860/how-to-place-arrow-head-triangles-on-svg-lines // TODO colour transitions between shapes // https://graphicdesign.stackexchange.com/questions/127669/is-it-possible-to-do-smooth-color-transition-between-2-paths-in-i...
/** * Form.react.js * * The form with a username and a password input field, both of which are * controlled via the application state. * */ import React, {Component} from 'react'; import {changeForm} from '../actions/AppActions'; import {History} from 'react-router'; import LoadingButton from './LoadingButton.re...
const path = require("path"); const { app, BrowserWindow, Menu, session } = require("electron"); /// const {autoUpdater} = require('electron-updater'); const { is } = require("electron-util"); const unhandled = require("electron-unhandled"); const debug = require("electron-debug"); const contextMenu = require("electron...
/* * Copyright (c) 2020 BlackBerry Limited. * * 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 ag...
import _ from 'lodash' import { notification } from 'antd'; import Cookies from 'js-cookie'; import React from 'react' let u = { baseUrl:'/api/', rootLevel:1, /*树形根层级*/ rootId:"0", /*树形根Id*/ loadSuccess:false, _:_, cookies:Cookies }; u.ajax = (options)=>{ const NO_LOGIN = -...
//load .env file require("dotenv").config(); const utils = require("./utils"); const path = require("path"); const express = require("express"); const app = express(); const port = 4000; const fs = require("fs"); //=========================================== // CORS stuff // needed for local development, where t...
'use strict '; require('dotenv').config(); const express = require('express'); const cors = require('cors'); const superagent = require('superagent'); const PORT = process.env.PORT || 3030 let app = express(); app.use(cors()); const pg = require('pg'); const client = new pg.Client(process.env.DATABASE_URL); client....
function arrToList(arr) { if (arr.length !== 1) {arr[arr.length-1] = 'and ' + arr[arr.length-1];} return arr.join(', '); } var Project = function(title, date, desc, languages, additional, concepts, linkUrl) { this.title = title; this.date = date; this.desc = desc; this.languages = languages; this.additio...
var hdr = {}; var mimes = require('kc-mime-list'); var ctype = require('kc-fctype'); // Set content type hdr.ctype = function(res, type = 'html', chs = 'utf-8') { var fl = 'f.'+type; var ctv = ctype(fl, mimes); ctv += '; charset='+chs; res.setHeader('Content-Type', ctv); } // Cors hdr.cors = function(...
/** * Miscellaneous utilities. **/ var fs = require("fs"); var util = require("util"); var mime = require("mime"); var crypto = require("crypto"); var url = require("url"); /** TIMER **/ function Timer(delay) { this.delay = delay; } util.inherits(Timer, require("events").EventEmitter); /* Starts the timer, doe...
const fs = require('fs'); const homeDir = require('os').homedir(); const appDir = homeDir + '/MetroGit/'; const uuid = require('uuid'); const { ipcMain, dialog } = require('electron'); const { requireArgParams } = require('../infrastructure/handler-helper'); let window; let secureStorage; let settingsFile; let settings...
"use strict"; var config_1 = require('../config'); var channel_1 = require('../channel'); var data_1 = require('../data'); var fielddef_1 = require('../fielddef'); var vlEncoding = require('../encoding'); var mark_1 = require('../mark'); var type_1 = require('../type'); var util_1 = require('../util'); var config_2 = r...
/******************************************************************************* uBlock Origin - a browser extension to block requests. Copyright (C) 2014-present <NAME> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publish...
const dictionary = { javascript: 'javascript', reactnative: 'javascript', express: 'javascript', node: 'javascript', js: 'javascript', postgres: 'javascript', 'node.js': 'javascript', postico: 'javascript', web: 'javascript', app: 'javascript', redux: 'javascript', reactredux: 'javascript', '.js...
const fs = require('fs') const filename = process.argv[2]; ///////////////////////////// // part 1 ///////////////////////////// class Star { constructor(props){ const { x, y, vx, vy } = props this.x = x this.y = y this.vx = vx this.vy = vy } calculatePositionAtTime(t){ return { x...
import React, { useState, useEffect, Fragment } from 'react'; import styled from 'styled-components'; import { useBlocks, useInterval } from 'redux/hooks'; import { Link as BaseLink } from 'react-router-dom'; import Big from 'big.js'; import { BlockImage, Content, Loading, Sprite as BaseSprite, DataCard } from 'Compone...
'use strict'; let arrayOfObjects=[]; let button1=$('#page1'); let button2=$('#page2'); let arrayOfPage1=[]; let keywords1=[]; let arrayOfPage2=[]; let keywords2=[]; $('document').ready(getData); readDataFromPage2(); function Data(image_url,title,description,keyword,horns){ this.image_url=image_url; this.t...
/* ******************** * * Enumerator functions * * ******************** */ function solve_enumerator(matrix, sizes, upperBound, nCombs, callbacks) { const state = { bestCosts: upperBound, currentCosts: [], currentSolution: [], count: 0, updateInterval: nCombs / 100 + 1,...
import React, { Component } from 'react'; import './App.css'; import vegaEmbed from 'vega-embed'; import Papa from 'papaparse'; //NO PUDE CON LA AUTENTICACION DE MONGO, EL CODIGO QUEDO COMENTADO, PERO FUNCIONA LOCALMENTE class App extends Component { constructor(props){ super(props); this.state= { JSON...
import { useEffect, useContext, useReducer } from 'react'; import styled from 'styled-components'; import classnames from 'classnames'; import { ModalBody, ModalFooter, ModalHeader, Nav, NavItem, NavLink, TabContent, Row, Container, Col, Button } from "reactstrap"; import { Modal } from '../Wrapper'; import { ...
const _ = require('lodash') const path = require('path') const {createFilePath} = require('gatsby-source-filesystem') const {fmImagesToRelative} = require('gatsby-remark-relative-images') const {fluid} = require("gatsby-plugin-sharp") const {orderBy} = require("lodash") const slash = require(`slash`) const { GraphQ...
/* A component that trawls our generated content and reports errors if there are: 1. Broken links between pages on the site. 2. Broken links within a single page. Fires `onResultsAvailable` when the report is ready. This event is fired with the report content itself. The report content is gener...
import React, { Component } from 'react'; import './App.css'; import Conversation from './Conversation.js'; import DiscoveryResult from './DiscoveryResult.js'; import axios from 'axios'; class App extends Component { constructor(props) { super(props); this.state = { context: {}, // A Message Obj...
// // Author: <NAME> <EMAIL> // May 2012 // var ew_HostedZonesTreeView = { model: [ "hostedZones", "loadBalancers"], selectionChanged: function() { ew_HostedRecordsTreeView.display([]); var item = this.getSelected(); if (!item) return; if (!item.nameServers) { ...
// functions specifically for interacting with the HTML (both upon start up and during sessions) // add a new filter function addFilter() { // get filter count var filter_count = document.getElementById('accordion-filters').children.length - 1; // get base filter id and last filter id var filter_id_base = 'filter0...
//数组去重 function arraySet(arr) { if(Array.isArray(arr)){ var newArr = []; for(var i=0; i<arr.length;i++) { if(newArr.indexOf(arr[i]) === -1){ newArr.push(arr[i]) } } return newArr; } } //数组扁平化 function arrayFlat(arr) { if(Ar...
"use strict"; import * as d3 from "d3"; import * as L from 'leaflet'; import d3Tip from "d3-tip"; import {mapConvertNumbers, mapCreateProportions, mapCreateSources} from "./1-preproc.js"; import {initMap, createMapBorders, createMapCircles, updateMap, updateMapCircles} from "./2-map.js"; import {showZoneInfo} from "....
import styled, { createGlobalStyle, css } from 'styled-components'; import withChainSelectorState from 'lumerin-wallet-ui-logic/src/hocs/withChainSelectorState'; import * as ReachUI from '@reach/menu-button'; import PropTypes from 'prop-types'; import React from 'react'; import { DisplayValue, Flex } from '../common';...
import React, {useState, useRef, useEffect} from "react" import Draggable from "react-draggable" import {connect} from "react-redux" import Select from "react-select" import AsyncSelect from "react-select/async" import {clamp, prettyDuration, timestamp, containsJSON} from "./utils.js" import {endpointUrl} from "./endp...
var debug = require('debug')('mysql-connection-manager') var EventEmitter = require('events').EventEmitter var mysql = require('mysql') var defaultOptions = { autoReconnect: true,// Whether or not to re-establish a database connection after a disconnect. reconnectDelay: [ 500,// Time between each attempt in the fi...
var app = require('express')(); var server = require('http').Server(app); var io = require('socket.io')(server); server.listen(80); let connections = []; //connections is an array of objects with the following properties // - roomId: This is the room users are located in // - roundCount: count of rounds that this r...
/** * Zesty.io Content Model Component * When the ZestyLoader [..slug].js file is used, this component will autoload if it associated with the URL * * Label: roadmap * Name: roadmap * Model ZUID: 6-c4e2bb9798-4twn5z * File Created On: Tue May 31 2022 23:39:21 GMT+0800 (Philippine Standard Time) * * Model F...
// Search parameters var city; var date; // Local Storage let history = JSON.parse(window.localStorage.getItem("history")) || []; // Weather data var cityName; var country; var temp; var humidity; var windspeed; var uvIndex; var currentIcon; var lat; var lon; $(document).ready(function() { // Show late...
import { CircularLoader } from '@dhis2-ui/loader' import { theme, sharedPropTypes } from '@dhis2/ui-constants' import { IconErrorFilled24, IconWarningFilled24, IconCheckmark24, } from '@dhis2/ui-icons' import cx from 'classnames' import PropTypes from 'prop-types' import React, { Component } from 'react' im...
import React, { useState } from 'react' import * as yup from 'yup' import searchSchema from '../validation/searchSchema' import styled from 'styled-components' import {axiosWithAuth} from './axiosWithAuth' const Container = styled.div` height: 100vh; font-family: sans-serif; width: 70%; margin: auto...
import React, { Component } from "react"; import logo from "../svg/logo.svg"; import { Link, NavLink } from "react-router-dom"; import { Button } from "./Button"; import { Icon } from "react-icons-kit"; import { ic_keyboard_arrow_right } from "react-icons-kit/md/ic_keyboard_arrow_right"; import styled from "styled-comp...
export const isSupportPassive = () => { let supportsPassive = false try { const opts = {} Object.defineProperty(opts, 'passive', { get () { supportsPassive = true } }) window.addEventListener('test-passive', null, opts) } catch (e) {} return supportsPassive } export const ge...
//Game.spawns['Swamp'].spawnCreep( [WORK, CARRY, MOVE], 'Builder2', { memory: { role: 'builder', task: 0 } } ); //Game.spawns['Swamp'].room.controller.activateSafeMode(); //Game.spawns['Swamp'].room.createConstructionSite( 23, 22, STRUCTURE_TOWER ); //import {myExport} from './role.harvester.js'; //import HarvesterMa...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { browserHistory, withRouter } from 'react-router'; import _ from 'underscore'; import { HotKeys } from 'react-hotkeys'; import DocumentTitle from 'reac...
// function rowAverages(triangle) // { // let avgs = []; // for (let i = 0; i < triangle.length; i++) // { // let sum = 0; // let count = 0; // for (let j = 0; j < triangle[i].length; j++) // { // if (triangle[i][j] != 0) // { // sum += triangle[i][j]; // count++; // ...
/** * @file listScenario.js * @author <NAME> * @brief Zoznam scenarov */ import React, { Component } from 'react'; import { Button, Icon, Input, Popup } from 'semantic-ui-react'; import { compose, graphql, withApollo } from 'react-apollo'; import gql from 'graphql-tag'; import { toast } from 'react-toastify'; impo...
import React from 'react'; import { Form, Modal, Row, Col, } from 'antd'; import { useToggle } from 'react-use'; import moment from 'moment'; import FIELDS from '@/config/fields'; import WrapperComplexFormItem from '@/components/HOC/WrapperComplexFormItem'; // import EmployeeSelectModal from '@/pages/Common/Emplo...
import React, { Component } from 'react'; import { render } from 'react-dom'; import { StaticMap } from 'react-map-gl'; import DeckGL from '@deck.gl/react'; import { GeoJsonLayer } from '@deck.gl/layers'; import { scaleLinear, scaleThreshold } from 'd3-scale'; import colormap from 'colormap'; const TimeSelector = (pr...
import React, { useState, useEffect, useRef } from "react"; import { useCart } from "use-cart"; import "./product.css" import { a, useSpring, config } from "react-spring"; import { useStaticQuery, graphql, StaticQuery } from "gatsby" const Cart = () => { const data = useStaticQuery(graphql` query CartQuery { ...
import React, {PureComponent} from 'react'; import {Formik} from 'formik'; import * as Yup from 'yup'; import {PropTypes} from 'prop-types'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import {withRouter} from 'react-router'; import BlogPostsForm from './BlogPostsForm'; import Landin...
/** * The MIT License * Copyright (c) 2016 Population Register Centre (VRK) * * 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 righ...