text
stringlengths
3.07k
16k
/** * MIT License * Copyright (c) 2021 <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, publi...
/** * Copyright 2020 Phenix Real Time Solutions, Inc. All Rights Reserved. * * 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 * * Unle...
import React, { useState } from 'react'; import { withFormik, Form, Field } from 'formik'; import * as Yup from 'yup'; import axios from 'axios'; // import { useInput } from './CustomHooks/InputHook' import styled from 'styled-components'; // import loadForm from './old pages/Form.js'; import { Link } from 'react-route...
// Initialize connection variable var STATUS = false; // Variables for camera parameters var exposure; var frameRate; var pixelClock; var AWB1; var AWB2; var AFR1; var AFR2; var AE1; var AE2; var IMAGE; var ROSURL; var imageSubscriber; var feedbackSubscriber; // Initialize settings init(); function init() { $("#con...
var faqCounter = 1; var segmentNo = 1; // keep account of active segment var activeSegment = 1; document.getElementById('faqContent').innerHTML += ` <div class="ui segment" id="faqSegment${segmentNo}" style="display:none;min-height:140vh;"> </div> ` fetch("./faq_dump/faq1.json") .then(response => response...
/** * TinyAnimate * version 0.3.0 * * Source: https://github.com/branneman/TinyAnimate * Author: <NAME> <<EMAIL>> (http://bran.name/) * License: MIT * * Functions: * TinyAnimate.animate(from, to, duration, update, easing, done) * TinyAnimate.animateCSS(element, property, unit, from, to, duration, easing,...
//Массивы для флагов показать/скрыть var vcc_a = new Array() var gnd_a = new Array() var fb_a = new Array() var drain_a = new Array() var nc_a = new Array() var drv_a = new Array() var aaa_a = new Array() var sss_a = new Array() //Массивы для значений селекта var selArr_vcc = new Array() var selArr_gnd = new ...
"use strict"; // lets do some fun var canvas = loadCanvas("tmpCanvas");//document.getElementById('canvas'); var imgSrcs = []; var images = []; var selDiv = ""; var index = 0, hindex = 0; var homographies = []; var orb = {}; var stitchImgs = []; var stat2 = new profiler(); stat2.add("features");...
import React, { useState, useEffect } from 'react'; import clsx from 'clsx'; import Card from '@material-ui/core/Card'; import * as colors from '@material-ui/core/colors'; import Chip from '@material-ui/core/Chip'; import PerfectScrollbar from 'react-perfect-scrollbar'; import moment from 'moment'; import 'moment/local...
import React, { Component } from 'react' /* Import Form Items */ import Input from '../formitems/input'; // import Select from '../formitems/Select'; //import CheckBox from '../formitems/CheckBox'; import Button from '../formitems/Button'; //import { cloneNode } from '@babel/types'; export class FormContainer extends...
import Hashids from "hashids"; import uuid from "uuid/v4"; import moment from "moment"; import BadWords from "bad-words"; import { buildingTypes, levels } from "@resttlers/engine"; import { throwError } from "../http/error"; const mapSettlement = ({ id, name, leader, level, score, createdAt }) => ({ id, name, l...
const Circuit = require('./circuit'); const Draw = require('./draw'); const Editor = require('./editor'); const Gate = require('./gate'); const Workspace = require('./workspace'); module.exports = class Application { constructor(canvas, nqubits) { const app = this; this.workspace = new Workspace(a...
const { assert, skip, test, module: describe, only } = require('qunit'); const { GPU } = require('../../src'); describe('features: math object'); function mathProps(mode) { const props = ['E','LN10','LN2','LOG10E','LOG2E','PI','SQRT1_2','SQRT2']; const gpu = new GPU({ mode }); for (let i = 0; i < props.length; ...
var currentDate = moment().format('L'); var API_KEY = "&appid=86945d052a2d837006278947c1238951"; var cities = JSON.parse(localStorage.getItem('cities')) || []; // console.log(cities) //if enter is pressed by user trigger the on(click) function $("#search-input").keyup(function (event) { // Number 13 is the "Enter...
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import difference from 'lodash.difference'; import find from 'lodash.find'; import Keyboard from './Keyboard'; class Piano extends React.Component { static propTypes = { audioContext: PropTypes.instanceOf(window....
const chai = require('chai'); const expect = chai.expect; const sinon = require('sinon'); const jQuery = require('jquery'); const jsdom = require('jsdom'); const { JSDOM } = jsdom; const document = global.document = new JSDOM('<html><body></body></html>'); const window = global.window = document.window; const...
// Variables used by Scriptable. // These must be at the very top of the file. Do not edit. // icon-color: deep-green; icon-glyph: download; // if you move the file, please adjust this, otherwise this script doesn't know where it is and downloads it again const filePath = "lib/moment.js"; const remoteUrl = "https://ra...
import React, { Component } from 'react' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import Dialog from 'material-ui/Dialog' import Dropzone from 'react-dropzone' import FlatButton from 'material-ui/FlatButton' // import Moment from 'moment' import * as Jimp from 'jimp' import { kee...
import React, { useEffect, useState, useRef } from 'react'; import { Box, Flex, Stack, Text, Link, useColorMode, Button, HStack, Heading, Select, Spinner, } from '@chakra-ui/react'; import _ from 'lodash'; import Reviews from './Reviews'; import { useAlbum } from '../../providers/albumProvider'; i...
/* * Copyright (c) 2022 MarkLogic Corporation * * 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 ...
var request = require( 'request' ); var moment = require( 'moment' ); var async = require( 'async' ); /* var Fitbit = require( './lib/Fitbit' ); function persistToken( token, cb ) { fs.writeFile( 'token.json', JSON.stringify( token ), cb ); } var fitbit = new Fitbit( config, persistToken ); // fetc...
/* Copyright [2016] [Relevance Lab] 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 agreed to in writing, software d...
import Joi from 'joi'; import Model from '../models/db'; import status from '../helpers/StatusCode'; import userInfo from '../helpers/userInfo'; class BookingController { static booking() { return new Model('bookings'); } static user() { return new Model('users'); } static trips() { return new ...
function MemoryGameJS(){ // Matching Game const modal = document.getElementById("modal-m"); const reset = document.querySelector(".reset-btn"); const playAgain = document.querySelector(".play-again-btn"); const movesCount = document.querySelector(".moves-counter"); // emoji art for the cards const deckCards = [ "cac...
var async = require('async'); var cluster = require('cluster'); var events = require('events'); var express = require('express'); var mkdirp = require('mkdirp'); var fse = require('fs-extra'); var util = require('util'); var Db = require('./services/db.js'); var Log = require('./services/log.js'); var Err = require('....
const {remote} = require('electron') const clipboard = remote.clipboard const validUrl = require('valid-url') const config = remote.require('./config') const updater = remote.require('./updater') const fileHandler = remote.require('./fileHandler') const rpc = require('../utils/rpc') const hints = require('./hints') c...
import PropTypes from 'prop-types'; import React from 'react'; import Avatar from '@atlaskit/avatar'; import Button, {ButtonGroup} from '@atlaskit/button'; import Spinner from '@atlaskit/spinner'; import Badge from '@atlaskit/badge'; import Tooltip from '@atlaskit/tooltip'; import CodeIcon from '@atlaskit/icon/glyph/...
/** * Copyright 2017 OpenStack Foundation * 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 agreed to in ...
// jshint node: true, esversion: 6, asi: true // Get your bot's secret token from: // https://discordapp.com/developers/applications/ // Click on your application -> Bot -> Token -> "Click to Reveal Token" // Put it in config.json as 'botToken' const Discord = require('discord.js') const client = new Discord.Client()...
enchant(); Runner = enchant.Class.create(Sprite, { initialize: function(image) { var game = enchant.Game.instance; Sprite.call(this, 150, 150); this.image = game.assets[image]; this.ONE_STEP = 6; }, step: function() { this.x += this.ONE_STEP; if (this.frame <...
import React, { Component } from "react"; import MuiThemeProvider from "@material-ui/core/styles/MuiThemeProvider"; import MyButton from "./components/Button"; import axios from "axios"; import TextField from "./components/TextField"; import "./index.css"; import Modal from "./components/Modal"; import Paper from "@mat...
const element = (e) => document.querySelector(e); // DOM elements const slider = element("#slider"); const playIcon = element("#play-icon"); // variables let isPlaying = false; let duration = 0; let currentTime = 0; // prettier-ignore let playList = [ { title: "Time", artist: "<NAME> & <NAME>", album: "...
"use strict"; function _arrayBufferToBase64(arrayBuffer) { let base64 = ''; const encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; const bytes = new Uint8Array(arrayBuffer); const byteLength = bytes.byteLength; const byteRemainder = byteLength % 3; const mainLength...
import createParser from 'rockey-css-parse'; import isString from 'lodash/isString'; import * as classnames from 'rockey-css-parse/utils/classnames'; import { getClassName, getAnimationName, getMixinClassName, } from './css/getClassName'; import insert from './styleSheets'; import wrapTemplateStrings from './ut...
var EntitySelection = require('../../../entities/EntitySelection'); var System = require('../../../entities/systems/System'); var SystemBus = require('../../../entities/SystemBus'); var PhysicsPlaneDebugShape = require('../../../addons/physicspack/shapes/PhysicsPlaneDebugShape'); var PhysicsCylinderDebugShape = require...
import React from 'react' import { Paper, withStyles, TextField, Button, Typography } from '@material-ui/core' import { connect } from 'react-redux'; import agent from '../agent'; const styles = theme => ({ root: { width: '82%', marginLeft: '9%', marginTop: theme.spacing.unit * 3, }, ...
/* -------------------------------------------------- */ /* CACHE SELECTORS /* -------------------------------------------------- */ var animScene = $(".anim-scene"), animFloat = $(".anim-float"), animHorizontal = $(".anim-horizontal"), animRocket = $(".anim-rocket"), animStarWars = $(".anim-perspective-scroll"); ...
var assert = require("assert"); var Vec3 = require('vec3').Vec3; var mineflayer = require('../../../index'); module.exports = inject; function inject(bot) { bot.test={}; bot.test.callbackChain=callbackChain; bot.test.sayEverywhere=sayEverywhere; bot.test.clearInventory=clearInventory; bot.test.becomeSurviv...
// Variables for Coding Quiz let quizDescript = document.getElementById("quizDescipt"); let startBtn = document.getElementById("startBtn"); const questionContEl = document.getElementById("ques-container"); let randomQues; let currentQuestionIndex; const questionEl = document.getElementById("question"); const answerBtnE...
 // AUTOCOMPLETE var $keywordsInput = $('#search-location'); var $submitOnConfirm = $('#search-location').data('submit-on-selection'); var $defaultValue = $('#search-location').data('default-value'); if ($keywordsInput.length > 0) { $keywordsInput.wrap('<div id="autocomplete-container" class="das-autocompl...
import React, { Component } from 'react'; import { compose } from 'redux'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { getAllGames } from '../reducers'; import { fetchGames, createNewGame } from '../actions'; import { withStyles } from '@material-ui/styles'; import { Car...
'use strict'; /* ////////////////////////////// Scoping in Practice ////////////////////////////// function calcAge(birthYear) { const age = 2037 - birthYear; function printAge() { let output = `${firstName}, you are ${age}, born in ${birthYear}`; console.log(output); if (birthYear >= 1981 && ...
const FILE_TO_IMPORT = '200-row-allianz.ttl'; const JDBC_CONFIG_NAME = 'jdbc_config'; const QUERY = "PREFIX ex:<http://example.com/#>\n" + "PREFIX base:<http://example/base/>\n" + "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>\n" + "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" + "PR...
import React from 'react'; import { BrowserRouter as Router, Route, Link, Redirect, withRouter } from 'react-router-dom'; import styled from 'styled-components'; import TextField from 'material-ui/TextField'; import trim from 'lodash/trim'; import PropTypes from 'prop-types'; import MuiThemeProvider from 'material-ui/...
import React, {Component} from 'react'; import {connect} from 'react-redux'; import { bindActionCreators } from 'redux'; import { Grid, Paper, Tabs, Tab, IconButton, List, ListItem, ListItemAvatar, ListItemText, ListItemSecondaryAction, Avatar, } from '@material-ui/core'; imp...
import urlExist from 'url-exist' import Grader from './grader.js' import plimit from 'p-limit' import { JSDOM } from 'jsdom' /** * These code are so bad, Adpro lecturers would cringe * May god forgive me for writing this heresy */ const zip = (...rows) => [...rows[0]].map((_,c) => rows.map(row => row[c])); async...
import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; import { OuterSubscriber } from '../OuterSubscriber'; import { subscribeToResult } from '../util/subscribeToResult'; /* tslint:disable:max-line-length */ /** * Delays the emission of items from the source Observable by a given time...
import Vue from 'vue' import Router from 'vue-router' // import HelloWorld from '@/components/HelloWorld' // Base const search = r => require.ensure([], () => r(require('../components/search')), 'search') const dialogue = r => require.ensure([], () => r(require('../frames/dialogue/dialogue')), 'dialogue') const addre...
import React from 'react'; import clsx from "clsx"; import classNames from "clsx"; import { Card, CardHeader, CardContent, CardActions, Grid, AppBar, Toolbar, Typography, IconButton, Button, TextField, Snackbar, CssBaseline } from '@material-ui/core'; import { Men...
import SharpenWasm from 'SharpenWasm'; // flags; // VDOMElements; const _VDOM_ATTRIBUTES_ = 1; const _VDOM_CHILDREN_ = 2; const _VDOM_HASH_ = 3; const _VDOM_TAGNAME_ = 4; const _VDOM_TYPE_ = 5; const _VDOM_INNERTEXT_ = 6; // domTypes; const _DOM_TYPE_RELAY_ = 1; const _DOM_TYPE_ENDPOINT_ = 2; const _DOM_TYPE_EMPTY_ = ...
/* * Copyright 2016-2020 <NAME>. (http://www.onehippo.com) * * 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 appl...
'use strict'; /** * Validation Context which holds all information about a validation context * @param {string} uuid context identifier (optional) * @constructor */ function ValidationContext(uuid) { var that = this; this.uuid = uuid; this.global = undefined; this.fieldErrors = {}; this.knownFi...
import { Card, CardText } from "material-ui/Card" import { Grid, Row, Col } from "react-flexbox-grid" import { Table, Column, Cell } from "fixed-data-table-2" import DeploymentAction from "../DeploymentAction/DeploymentAction" import DeploymentDistribution from "../DeploymentDistribution/DeploymentDistribution" import ...
/** * This sample demonstrates a simple skill built with the Amazon Alexa Skills * nodejs skill development kit. * * This skill can generate text using an LSTM on the CSAIL servers. **/ 'use strict'; const Alexa = require('alexa-sdk'); //===========================================================================...
var _ = require("underscore"); var fs = require("fs"); var utils = require("../public/js/shared_utils.js"); var BATCH_LIMIT = 100; exports.appendToFile = function (filePath, dataStr) { var stream = fs.createWriteStream(filePath, { flags: "a", encoding: "utf8", mode: "0666", }); stream.write(dataStr)...
import React, { useState, useEffect } from "react"; import { ExcelRenderer } from "react-excel-renderer"; import "antd/dist/antd.css"; import { Table, Upload, Button } from "antd"; import { UploadOutlined } from "@ant-design/icons"; import { CCard, CCardHeader, CCardBody, CCardFooter, CButton, CRow, CCol...
var NUMBERS = '0123456789'; var LOWERCASE_CHARACTERS = 'abcdefghijklmnopqrstuvwxyz'; var UPPERCASE_CHARACTERS = LOWERCASE_CHARACTERS.toUpperCase(); var SPECIAL_CHARACTERS = '!@#$%^&*()'; var HEX_CHARACTERS = NUMBERS + 'abcdef'; /** * Generates a random number between 1 and 6 unless different min/max values are suppli...
var h = require('h'); var expr = require('expr-eval'); var Plotly = require('plotly.js'); var css = require('insert-css'); var minimize = require('../'); var parser = new expr.Parser(); var mouseChange = require('mouse-change'); var transpose = require('transpose'); css(` #graph { position: absolute; top: 0; rig...
const crypto = require('crypto') const path = require('path') const fse = require('fs-extra') const globby = require('globby') const fixedRootFiles = [ 'favicon.ico', 'humans.txt', 'robots.txt', 'sitemap.xml', 'manifest.json', 'sw.js', 'service-worker.js', '.well-known' ] const fixedNamesPatterns = ['...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireWildcard(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); var _reactToastify = require("react-toastify"); require("react-toastify/dist/ReactToastify...
const postcss = require('postcss'); const { utils } = require('base-css-image-loader'); const meta = require('./meta'); const { default: CSSFruit, Background, URL } = require('css-fruit'); CSSFruit.config({ forceParsing: { url: true, 'image-set': true, length: true, percentage: true...
const regl = require('regl')({ pixelRatio: 1, extensions: ['EXT_shader_texture_lod', 'angle_instanced_arrays'] }) const mat4 = require('pex-math/Mat4') const vec3 = require('pex-math/Vec3') const rnd = require('pex-random') const sphere = require('primitive-sphere')() const GUI = require('./local_modules/pex-gui') ...
'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 ("...
import React, { Suspense, useMemo } from 'react'; import {Helmet} from 'react-helmet'; import { useParams, } from "react-router-dom"; import Favicon from 'react-favicon'; import Tippy from '@tippyjs/react'; import 'tippy.js/dist/tippy.css'; // optional import ID from '../../components/ID.jsx'; // import CraftsTabl...
/* * @Author: [JokerChen] * @Date: 2020-06-13 13:52:21 * @LastEditors: [JokerChen] * @LastEditTime: 2020-06-19 11:05:27 * @Description: 传感器控电数据上传接口 * */ //传感器类 //SensorData:传感器接收的数据 var Sensor = function () { //传感器对应串口 this.SensorOtherPort= ""; //传感器请求数据 this.SensorRequestData = ""; //传感器相应数据 ...
var args = process.argv.slice(2); const pg = require('pg') var http=require('http'); var serverip=require('my-local-ip')() var servername=require('os').hostname(); var fs = require('fs'); var port=args[0]; var appdate=+new Date(); var config = require('./dbconfig.json'); var dbuser = process.env.dbuser || config.dbu...
#! /usr/bin/env node /* allow-require-me.js The MIT License (MIT) Copyright (c) 2018-2018, Reactive Sets 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 witho...
import {utils as utils_} from '../../core/utils/utils'; //get rid of compiler mess var utils = utils_; var RoiLoadingQueue = function(options) { this.options = options; // states this.stateDownloaded = 'downloaded'; this.stateFailed = 'failed'; this.stateBegin = 'begin'; // queues this...
import * as PIXI from "pixi.js"; import * as Matter from "matter-js"; import Box from "./entities/box"; import { TILES_MAP } from "./tileset_helper"; import { loadAnimation } from "./animations"; import PhysicsZone from "./physics/zone"; const World = Matter.World; const physicsZoneMapping = { antigrav_beam1: "an...
$.ajaxSetup({ //Token deve ser enviado assim que a pagina é carregada pq o datatable não consegue fazer a requisição headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); var table = null; $(document).ready(function(){ $("#newEvent").on("clic...
// Copyright (c) 2017 The Odin Authors. All Rights Reserved // // 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 appl...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _mongoose = require('mongoose'); var _mongoose2 = _interopRequireDefault(_mongoose); var _response = require('./response.model'); var _response2 = _interopRequireDefault(_response); var _section = require('./section.model'); var _s...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
/* ------- MAPA ------- */ // define margens e tamanho da tela var margin = {top: 25, right: 50, bottom: 25, left: 50}, width = d3.select(".map-div").node().getBoundingClientRect().width, height = d3.select(".map-div").node().getBoundingClientRect().height + 100; // seleciona o SVG e define su...
import axios from "axios"; const API = axios.create({ baseURL: "https://adopsiku.herokuapp.com" }); // const API = axios.create({ baseURL: "http://localhost:5000" }); API.interceptors.request.use((req) => { if (localStorage.getItem("profile")) { req.headers.authorization = `Bearer ${ JSON.parse(localStor...
'use strict'; import React, { Component, View, Dimensions, Text, TouchableHighlight, ListView, StyleSheet, Navigator, ScrollView } from 'react-native'; import moment from 'moment'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import f from 'tcomb-form-native'; imp...
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.defineProperty(target, de...
/** * Created by Hary on 6.4.2017 г.. */ const Article = require('mongoose').model('Article'); const User = require('mongoose').model('User'); const UserLog = require('mongoose').model('UserLog'); const DeletionArchive = require('mongoose').model('DeletionArchive'); function authenticaation(req) { let errorMsg...
import React, { Component } from 'react'; import Select from 'react-select'; import 'react-select/dist/react-select.css'; import { Button } from 'bloomer'; import { connect } from 'react-redux'; import DOMPurify from 'dompurify'; import _ from 'lodash'; import { clearErrors } from '../../../redux/actions/profileAction...
import PropTypes from "prop-types"; import React, { Fragment, useEffect, useState } from "react"; import { Tab, Tabs } from "react-bootstrap"; import BootstrapTable from "react-bootstrap-table-next"; import shumlex from "shumlex"; import API from "../API"; import { shaclEngines } from "../components/SelectEngine"; impo...
const geoip = require('geoip-lite') const _ = require('lodash') const { transformPoolUpgrade } = require('./expansion/config/pool-upgrade') const { createClaimDefTransform } = require('./expansion/domain/claim-def') const { createNodeTransform } = require('./expansion/pool/node') const { transformNymAttrib } = require(...
if (!window.location.origin) { window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : ""); } $.getUrlParam = function (name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1)....
var express = require("express"); var app = express(); var server = require("http").Server(app); var io = require("socket.io")(server); var path = require("path"); var favicon = require("serve-favicon"); var bodyParser = require("body-parser"); var ipfsAPI = require("ipfs-api"); var multer = require("multer"); var Rat...
const fetch = require("node-fetch"); const base64 = require("Base64"); const fs = require("fs"); const readline = require("readline"); const path = "./keys.js"; let keys = require(path); // const originBranch = process.argv[2] || "develop"; // const reppo = process.argv[3] || "cxs-client"; /** * Formats query so we...
const express = require('express'); const mongodb = require('mongodb') const request = require('request'); const app = express(); const server = require('http').createServer(app) const io = require('socket.io').listen(server) const mongo_url = 'mongodb://localhost:27017/rally' const mongo = mongodb.MongoClient() app...
const ENTER = "Enter"; const ESC = "Escape"; const CLASS_NAME_FALSE = "false"; const CLASS_NAME_COMPLETED = "completed"; const URL_NAME_COMPLETED = "#completed" const URL_NAME_ACTIVE = "#active" const URL_NAME_ALL = "#"; const TODO = document.getElementById("todo-list"); const TODO_INPUT = document.getElementById("new...
/* * 28 August 2016 <NAME> @abdullah */ var getParents = require('./helpers') var selectionPolify = require('./polyfill.js') selectionPolify.start(); ;(function () { function Selo(props) { if (!props.els) { var log = props.log != undefined ? props.log : true if (log) { console.log("...
var THREE = require('three'); var DEG2RAD = Math.PI / 180, SPEED = 1400.0, SolariFlap; SolariFlap = function (textureSet, x, y) { var origX = x, origY = y; x = x + 3; y = y - 10; var flapWidth = textureSet.faceWidth * 3 / 4, flapHeight = textureSet.faceHeight * 2 / 3, top = new THREE.Mes...
"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 (reso...
import {SearchPropertyContainer, ShadowMember, RemoveMemberShadow} from './../../core/utility.js' import Factory from './../factory.js'; import Vector2 from './../../core/vector2.js'; import AssetManager from './../../core/assetmanager.js'; import * as Editor from './sceneeditor.js'; import Assets from './../assettable...
const audio = document.getElementById('beep'); class App extends React.Component { state = { breakCount: 5, sessionCount: 25, clockCount: 25 * 60, currentTimer: 'Session', isPlaying: false } constructor(props) { super(props); this.loop =...
let randomInt = function (min, max) { // inclusive min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive }; let randomFloat = function (min, max) { // exclusive return min + (Math.random() *...
'use strict'; // Module Dependencies const axios = require('axios'); var express = require('express'); var bodyParser = require('body-parser'); var errorhandler = require('errorhandler'); var http = require('http'); var path = require('path'); var request = require('request'); var...
import _get from '../utils/get'; import mapValues from '../utils/map-values'; import actionTypes from '../action-types'; import batchActions from './batch-actions'; import { getValidity, getForm, isValid, isInvalid } from '../utils'; import { trackable } from '../utils/track'; const focus = trackable((model) => ({ ...
/** * This example illustrates a 20-sided die roller using two seven-segment * displays and two daisy-chained 74HC595 shift registers. * * The button is a "momentary off" button. * * See docs/breadboard/seven-segment-daisy-chain.png * for the wiring. */ var five = require("../lib/johnny-five.js"), async = req...
import { isObservable, isPropObservable, objectWatchProp, setupObjState, setupPropAsObservable } from "../objectWatchProp.js"; import {throwIfThisIsPrototype} from "@purtuga/common/src/jsutils/throwIfThisIsPrototype.js"; import {getPropertyDescriptor, isArray, isObject, objectKeys} from "@purtuga/co...
import React, { PureComponent } from 'react'; import styled from 'styled-components'; import colors from '../../styles/colors'; import { Link } from 'react-router-dom'; const MenuContainerGrid = styled.div` // min-width: 1200px; z-index: 99; display: grid; display: -ms-grid; grid-template-rows: 67px 1px; g...
import React from 'react'; import Button from '@material-ui/core/Button'; import Grid from '@material-ui/core/Grid'; import { makeStyles } from '@material-ui/core/styles'; import { blue, indigo, green } from '@material-ui/core/colors'; import Typography from '@material-ui/core/Typography'; import Paper from '@material-...
/** * BSD 3-Clause License * * Copyright (c) 2021, <NAME>, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice...
var DS = require('dslink'), os = require('os'), df = require('node-diskfree'), provider = new DS.NodeProvider(), gbToBytes = 1024 * 1024 * 1024, pollerInterval = 2000, linkName = 'system-dslink', lastAverage; // var cpuAverage = function () { // //Initialise sum of idle and time of cores and fetch CPU info...