text
stringlengths
3.07k
16k
import React from 'react' import { connect } from 'react-redux' import { isEqual } from 'lodash' import { closeModal, openAlert } from 'actions/uiAction' import { fetchL1LPBalance, fetchL2LPBalance, getFarmInfo } from 'actions/farmAction' import Button from 'components/button/Button' import Modal from 'components/mod...
class SegmentGroup { constructor() { this.segments = []; } formatCSV(reverse, format, step, header, robotPath) { let str = ''; if(header) { str += header + '\n'; } for (let i = 0; i < this.segments.length; i++) { str += this.formatSegment(i, r...
"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, { Component } from 'react'; import {FormLayout,TextField,Button, Icon,Select,TextStyle,Pagination, Page,Layout,Card,Thumbnail,ResourceList} from '@shopify/polaris'; import {ResourcePicker} from '@shopify/polaris/embedded'; import EditRentalProductPopup from './editrentalproductpopup'; class Re...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = generateNavigationsJSON; var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); var _asyncToGenerator2 ...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { withStyles } from '@material-ui/core/styles'; import Avatar from '@material-ui/core/Avatar'; import CssBaseline from '@material-ui/core/CssBaseline'; import FormControl from '@material-ui/core/FormControl'; import Input from '@ma...
const core = require('@actions/core'); const github = require('@actions/github'); const repoOwner = core.getInput('dummyRepoOwner'); const repoName = core.getInput('dummyRepoName'); const myToken = core.getInput('dummyRepoToken'); const myAltToken = core.getInput('dummyRepoAltToken'); const octokit = github.getOctokit...
import { migrationMaker, placeLimitOrder, setPrice, drawSaiAndMigrateToDai, migrateSaiToDai } from '../helpers'; import { mockCdpIds } from '../helpers/mocks'; import { ServiceRoles, Migrations } from '../../src/constants'; import { mineBlocks, takeSnapshot, restoreSnapshot } from '@makerdao/test-helper...
/** * NOTES: * 1.This function will record the arguments as a string unless we come up with an alternative argument * 2. This function will assume that everything passed in is a query, not a mutation. * 3. This function accepts one query operation which contains one/multiples queries as input * 4. We won't worry a...
/* global weekendstatus */ import L from 'leaflet' import 'leaflet-rastercoords' const TILES = '/tiles/{z}/{x}/{y}.png' const TILES_RETINA = '/tiles/{z}/{x}/{y}@2x.png' const RASTER_IMAGE_SIZE = [ 8192, // original width of image 8192 // original height of image ] const INITIAL_VIEW = { lat: 33.57458, lng: -63...
import React,{Component} from "react"; import mirror, { connect,actions } from 'mirrorx'; import {FormattedMessage, FormattedDate, FormattedNumber} from 'react-intl'; import {Select} from 'tinper-bee'; import {flattenJsonId,getCookie} from 'utils'; const Option = Select.Option; class HeaderLeft extends Component { ...
var request = require("request"); var fs = require('fs'); var unescapeHTML = require('underscore.string/unescapeHTML'); var base = { sourceUrl: "http://www.qtworldsummit.com/sessionsjson/", //http://localhost/2015.json", lastUpdated: new Date(), schedule: [], __scheduleMap: {}, } var detail = { // session_id => ...
import bitcoin from 'bitcoinjs-lib'; import wif from 'wif'; import axios from 'axios'; import {CoinType} from "../constants"; import coinSelect from 'coinselect'; import {usingNetwork} from 'blockchain.info/pushtx'; import Big from 'big.js'; class BitcoinWallet{ constructor(url, option) { this.option = option; ...
/** * GitHub Activity Widgets * @author <NAME> ( http://ben.balter.com ) * Adapted from: https://github.com/benbalter/github-widgets/blob/master/github-widgets.js */ var gitHubWidgets = { base: 'https://api.github.com/', el: document.getElementById("github-widget"), org: null, repo: null, type: null, limi...
// Here is the starting point for your application code. // Small helpers you might want to keep import './helpers/context_menu.js'; import './helpers/external_links.js'; // All stuff below is just to show you how it works. You can delete all of it. import { remote, screen} from 'electron'; import jetpack from 'fs-je...
"use strict"; const fs = require('fs'); const Epoll = require('epoll').Epoll; const async = require('async'); const ORANGE_PI_PINS = { //'1' : 3.3v //'2' : 5v '3' : 12, //'4' : 5v '5' : 11, //'6' : ground '7' : 6, '8' : 198, //'9' : ground '10' : 199, '11' : 1, '12' : 7, ...
import inquirer from 'inquirer'; import { getRemoteBranches, getCurrentBranch } from 'shipjs-lib'; import fs from 'fs'; import path from 'path'; import formatMessage from './formatMessage'; import integrations from './CI'; import runStep from '../runStep'; export default async ({ dir }) => await runStep({}, async ()...
import React, { Component } from 'react'; import { FlatList, Image, View, Dimensions, StyleSheet, TouchableOpacity, ActivityIndicator, } from 'react-native'; const images = [ 'https://images.unsplash.com/photo-1551316679-9c6ae9dec224?w=800&q=80', 'https://images.unsplash.com/photo-1562569633-622303ba...
var User , _ = require('underscore') , passport = require('passport') , LocalStrategy = require('passport-local').Strategy , TwitterStrategy = require('passport-twitter').Strategy , FacebookStrategy = require('passport-facebook').Strategy , GoogleStrategy = require('passpo...
var g_grupoInfo = {}; var g_asistencias = new Array(); var g_mapAsistencias = new Map(); function loaded(event){ events(event); } function events(event){ bringData(); } function searchonfind(num) { var table = $(`#table`).DataTable(); let val = $(`#barraBuscar`).val(); let result = tab...
const core = require("@actions/core"); const github = require("@actions/github"); const { context } = require("@actions/github/lib/utils"); const octokit = github.getOctokit(process.env.GITHUB_TOKEN); //#region Inputs const oneApprovalLabelName = core.getInput("one-approval-label-name"); const twoApprovalsLabelName = ...
// Iniciando biblioteca var resize = new window.resize(); resize.init(); // Declarando variáveis var imagens; var imagem_atual; // Quando carregado a página $(function ($) { setTimeout(function(){ $(".notificacao").slideUp(); }, 8000); // Quando selecionado as imagens $('#ima...
JSON.isAJSONString = (object) => { try { JSON.parse(object); } catch (e) { return false; } return true; }; class RunrunTasks { constructor() { this._tasks; if(!localStorage.getItem("reminderEnabled")) localStorage.setItem("reminderEnabled", true); if(!localStorage.getItem("reminde...
'use strict'; import Ajv from 'ajv'; import ajvKeywords from 'ajv-keywords'; import crypto from 'crypto'; import Exedore from 'exedore'; import Immutable from 'immutable'; import _ from 'lodash'; // Since `registry` is immutable, it acts like a global private variable. Even if someone outside of this module gets // a...
var protodef = require(__dirname+'/protodef.js'); var termTypes = protodef.Term.TermType; var datumTypes = protodef.Datum.DatumType; var net = require('net'); function createLogger(poolMaster, silent) { return function(message) { if (silent !== true) { console.error(message); } poolMaster.emit('lo...
var $output, $user, $phrase, $domain, $length, $info, $help; $(document).ready(function () { $user = $('#inputUser'); $output = $('#outputPassword'); $phrase = $('#inputPhrase'); $domain = $('#inputDomain'); $length = $('#inputLength'); $info = $('#outputInfo'); $help = $('#info'); if...
import React from 'react'; import * as yup from "yup"; import valid from "card-validator"; import {useFormik} from "formik"; import axios from "axios"; import {useHistory} from 'react-router-dom'; import ReactPaginate from 'react-paginate'; const Purchase = () => { const [btnState, setBtnState] = React.useState(''...
const view = `article_value_view` const materialized = `article_value_materialized` const drop_view = `article_activity_b_view` const drop_materialized = `article_activity_b_materialized` exports.up = (knex) => knex.raw(/*sql*/ ` drop view ${drop_view} cascade; create view ${view} as select *, base_s...
const {OPERATOR_KEY, OPERATOR_ID, NETWORK} = require("./variables"); const { AccountId, PrivateKey, Client, FileId, Hbar } = require('@hashgraph/sdk'); const { AddressBook, HcsIdentityNetworkBuilder, HcsIdentityNetwork } = require("../dist"); const MIRROR_NODE_TIMEOUT = 30 * 1000; cons...
/// <binding Clean='clean' /> 'use strict'; // process.env.BROWSERIFYSHIM_DIAGNOSTICS=1 var gulp = require("gulp"), argv = require('yargs').argv, rimraf = require("rimraf"), concat = require("gulp-concat"), cssmin = require("gulp-cssmin"), gulpif = require("gulp-if"), rename = require("gulp-re...
const generateSlug = require('./src/gatsby/node/generateSlug') /* eslint-disable no-param-reassign */ const name = '<NAME>' const siteMetadata = { name, bio: "I'm a programmer from Himalayas, I listen to Metal and eat Rice. No I don't smoke, drink, or do drugs.", title: `${name} - Full-stack Developer, Software ...
import React, { useState, useEffect } from 'react'; import styled from 'styled-components'; // Axios configuration for backend server is defined here import client from '../client.js'; // Source: https://codepen.io/samuelkraft/pen/Farhl // Source: https://leaverou.github.io/bubbly/ // Source: https://codepen.io/sward...
import TWEEN from '@tweenjs/tween.js/dist/tween.esm.js'; import { emitter } from "../../emitter" import { createBlinkerSphere } from '../../components/blinker_sphere' import { AdditiveBlending, Mesh, Vector3, BufferGeometry, BufferAttribute, Line, LineBasicMaterial, PointLight, TextureLoader, PlaneGeometry, MeshBasicMa...
/** * @fileOverview Command-line interface for Woodman's precompiler */ /*global process, console*/ var fs = require('fs'); var fsExt = require('node-fs'); var precompile = require('./precompile'); var _ = require('underscore'); var woodman = require('../dist/woodman'); /** * Prints program usage * * @function ...
const {log} = require("console"); const {promisify} = require("util"); jest.setTimeout(100_000); const sleep = promisify(setTimeout); let NEAR, sys, keyStore, masterKeyPair, masterAccount; beforeAll(async function () { NEAR = await nearlib.connect(nearConfig); keyStore = nearConfig.deps.keyStore; masterKeyPai...
const DomainResource = require('./DomainResource'); const DateTimeScalar = require('./scalars/DateTime.scalar'); class ProcessRequest extends DomainResource { constructor(opt) { super(opt); this.__resourceType = 'ProcessRequest'; Object.assign(this, opt); } // This is a ProcessRequest resource static get __...
'use strict'; const Assert = require('assert'); const Bmh = require('../src/index.js'); const Jsc = require('jsverify'); describe("Unit tests", function() { describe("bmhs.generateSkipTable", function() { it("Boundary tests", function() { const checkFinite = (val) => { const bm...
"use strict"; // This file borrows heavily from the actions "downloadTool" function: // https://github.com/actions/toolkit/blob/27f76dfe1afb2b7e5e679cd8e97192d34d8320e6/packages/tool-cache/src/tool-cache.ts var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === ...
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import {createTokenizer} from './FormatterWorker.js'; export const CSSParserStates = { Initial: 'Initial', Selector: 'Selector', Style: 'Style', ...
let incorrectAudio, correctAudio; loadAudios(); const AudioContext = window.AudioContext || window.webkitAudioContext; const audioContext = new AudioContext(); let totalCount = 0; let correctCount = 0; let answerPos = 0; const problems = []; loadConfig(); function loadConfig() { if (localStorage.getItem("darkMode") ...
// Enable pusher logging - don't include this in production Pusher.logToConsole = true; var pusher = new Pusher(config.PUSHER_APP_KEY, { encrypted: true }); var channel = pusher.subscribe('private-status'); channel.bind('client-is_online', function (data) { console.log(data.studentId + " is online.."); ...
var callAjax = function(url, data, button) { var output = {}; $.ajax({ url: url, type: data.type, data: data, async: data.async, beforeSend: function() { if(button !== undefined) { button.button('loading'); } for(var id in data.container) { var con = $(data.con...
// 0.1 Libraries process.env.DOTENV_LOADED || require('dotenv').config(); require('colors'); const debug = require('debug')('gmail'); const fs = require('fs'); const path = require('path'); const Utils = require('./utils'); const readline = require('readline'); const { google } = require('googleapis'); const SCOPES = ...
/* * K2HR3 REST API * * Copyright 2017 Yahoo! Japan Corporation. * * K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers * common management information for the cloud. * K2HR3 can dynamically manage information as "who", "what", "operate". * These are stored as roles, resources, policies in K2hd...
/** * Progress module to view and update progress * @module progress */ import React, { Component } from 'react'; import axios from 'axios'; // import '../node_modules/bootstrap/dist/css/bootstrap.min.css'; import Card from 'react-bootstrap/Card' import Button from 'react-bootstrap/Button' import './progress.css' /...
const _ = require('lodash'); const Readable = require('stream').Readable; module.exports = { /** * Create hash-table from array of objects * @param {Array} array - the array to convert * @param {String|Function} key - the name of the key property, or function that calculate the key * @param {Fu...
'use strict' /* * Required Gulp Packages */ // default gulp package const gulp = require('gulp') // gulp utilities const concat = require('gulp-concat') const util = require('gulp-util') const rename = require("gulp-rename") const changed = require('gulp-changed') // gulp compile packages const sass = require('g...
//Dates: 'june' or 'may' const ambig = require('../_ambig') const dates = `(${ambig.personDate.join('|')})` let list = [ // ==== Holiday ==== { match: '#Holiday (day|eve)', tag: 'Holiday', reason: 'holiday-day' }, // the captain who // ==== WeekDay ==== // sun the 5th { match: '[sun] the #Ordinal', tag: 'We...
const Twit = require('twit'); const auth = require('./authentication') const mongoose = require('mongoose'); const app = require('express')(); const port = process.env.PORT || 3000; //importing the application routes //importing the models from the models folder in the twitschema module const { data_, mentio...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototy...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. 'use strict'; var Base = require('azure-iot-amqp-base').Amqp; var endpoint = require('azure-iot-common').endpoint; var PackageJson = require('../package.json'); var tr...
//-------------------// //-------------------// //-------------------// // CONSTANTS //-------------------// //-------------------// //-------------------// const readline = require('readline').createInterface({ input: process.stdin, output: process.stdout }); const assert = require('assert/strict'); const fs ...
const AWS = require("aws-sdk"); const debug = require('debug')("sqsd"); const error = require('debug')('sqsd:error'); const _ = require('lodash'); const axios = require("axios") const delay = time => new Promise(res=>setTimeout(res,time)); function Defer() { let resolve, reject; const promise = new Promise(fu...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { TableCell, TableSortLabel, InputBase } from '@material-ui/core'; import { AutoSizer, Column, Table as VTable } from 'react-virtualized'; import './Table.css'; function applySort(data, sortKey, sortDirection) { const comparitor =...
import { useState, useRef, } from 'react'; import { FormattedMessage, useIntl, } from 'react-intl'; import PropTypes from 'prop-types'; import ReactRouterPropTypes from 'react-router-prop-types'; import { isEmpty, } from 'lodash'; import { Button, Paneset, Pane, PaneFooter, Icon, } from '@folio/str...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import Dropzone from 'react-dropzone'; import FormData from 'form-data'; import PropTypes from 'prop-types'; import * as mealActions from '../../redux/Action/mealAction'; import * as actions fro...
import {post,get} from "@/api/request.js" export const userLogin = (params) => post("/auth/login", params);//登录接口 export const goodsList = (params) => post("/item/list", params);//商品列表 export const putItemsShelf = (params) => post("/item/onShelves", params);//商品上架 export const upItemList = (params) => post("item/upIte...
import { shuffle, getValue } from "./cards.js"; import { getBestHand, getName } from "./hands.js"; //'use strict' //var cards = require('./cards'); //var hands = require('./hands'); var stage = 0; var commonCards = []; var players = [{name: "John"}, {name: "Paul"} //, {name: "George"}, {name: "Ringo"} ]; var bestPl...
"use strict"; $(window).load(function() { //Preloader /** Loader */ var loader = $(".loader"); var wHeight = $(window).height(); var wWidth = $(window).width(); var o = 0; loader.css({ top: wHeight / 2 - 2.5, left: wWidth / 2 - 200 }); do { loader.animate( { width: o ...
/** * @fileoverview This component takes care of the sign in function. * */ import { useState } from "react"; import Avatar from "@mui/material/Avatar"; import Button from "@mui/material/Button"; import CssBaseline from "@mui/material/CssBaseline"; import TextField from "@mui/material/TextField"; import Link from "...
const {until, WebElement} = require('selenium-webdriver'); const Utils = require('../../utils'); const {Logger, isUndefined, isObject, isString, isFunction} = Utils; const isDefined = function(val) { return !isUndefined(val); }; const Element = require('../../element'); const {Locator} = Element; class ElementGlobal...
import React from "react"; import PropTypes from "prop-types"; import { makeStyles } from "@material-ui/core/styles"; import AppBar from "@material-ui/core/AppBar"; import Tabs from "@material-ui/core/Tabs"; import Tab from "@material-ui/core/Tab"; import Typography from "@material-ui/core/Typography"; import Box from ...
var extractThumbnail = function(html) { return html; } var getThumbnail = function(url, success) { var fail = function() { var image1 = new Image(); image1.src = "images/noimg.png"; success(image1); } if(url) { $.get('get_picture?' + $.param({'url': url}), function(data)...
/** Color/Gradient Selectors */ let dropDown = document.querySelector('.color_gradient_selector') let optionColor = document.querySelector('.option_color'); let optionGradient = document.querySelector('.option_gradient'); let buttons = document.querySelectorAll('button'); let modal = document.querySelector('.modal'); ...
class Commander{ constructor(){ this.history = [] this.defaults = { 'send': { 'params': { 'protocol': ['tcp', 'udp', 'file', 'stream'], 'name': [], 'id': [] }, 'default_param': 'protocol', 'default_value': 'name', 'input': true ...
'use babel' import { client } from '../connection' import tcp from '../connection/process/tcp' import { CompositeDisposable } from 'atom' import { paths } from '../misc' import modules from './modules' import * as pty from 'node-pty-prebuilt' import { debounce, once } from 'underscore-plus' import { customSelector } f...
$('head').prepend('<script defer src="https://use.fontawesome.com/releases/v5.6.3/js/all.js"></script>'); var originalWasu = '<div id="wasu-msg" class="dislogMsg"><div id="wasu-msg-contain"><div class="closeMsg" style="width: 100%; height: 100%;"></div><div id="wasu-msg-content"><div class="w-title"><span id="wasu-msg-...
const { describe, it } = require("mocha"); const { expect } = require("chai"); const request = require("supertest"); const cheerio = require("cheerio"); let $ = null; /** * Checks the page's `<h2>` heading. * @param {string} headingText - The expected `<h2>` element text content. * @param {number} level - The expe...
import PropTypes from 'prop-types'; import styled from 'styled-components'; import { screenUtilities, printUtilities } from '@bootstrap-styled/css-utils/lib/_api'; import { ifThen } from '@bootstrap-styled/css-mixins/lib/conditional'; import alignUtils from '@bootstrap-styled/css-utils/lib/align'; import backgroundUtil...
var fs = require('fs'); var path = require('path'); var log4js = require('log4js'); var cnf = require('../config'); var {utils, EventFactory, MongoDB} = require('../util'); var logger = log4js.getLogger(path.basename(__filename)); class ModuleOperator extends EventFactory { constructor(){ super(); this.wai...
const fs = require('fs'); const path = require('path'); const _ = require('lodash'); const appEmulation = require('./app-emulation'); const serveStatic = require('serve-static'); const { createElement: h } = require('react'); const createGenerateClassName = require('material-ui/styles').createGenerateClassName; const M...
import Player from '../objects/player'; import Level from '../objects/level'; import combat from './combat'; const columns = 30; const rows = 13; const gameLog = []; let currentLevel = 1; const createLevel = (player) => Level(columns, rows, player, currentLevel++); const canMoveToTile = (tileToMove) => { return !...
"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...
/** * Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author <NAME> <<EMAIL>> * * Color conversion code adapted from chroma.js (https://github.com/gka/chroma.js) * Copyright (c) 2011-2018, <NAME>, BSD license */ import { Color } from '../color'; import { Hc...
import axios from 'axios'; import Head from 'next/head'; import { useState } from 'react'; import Swal from 'sweetalert2'; import Animation from '../components/Animation/Animation'; import Info from '../components/Info'; import Waves from '../components/Waves'; const Clearance = () => { const [shipmentId, setShipmen...
// 安装步骤 const fs = require('fs'); const exec = require('child_process').exec; var conf = getAppConfig("./settings/", "appSettings.js"); var commandJson = { help: { desc: "显示帮助", com: "help" }, initAll: { desc: "生成环境:打包与数据库环境准备", com: initAll }, test:{ desc: "测...
const inquirer = require('inquirer'); const connection = require('./connection'); const uuid = require('./helpers/uuid'); function getEmployees() { // INNER JOIN role ON employee.role_id = role.id connection.query('SELECT employee.id, employee.first_name, employee.last_name, employee.manager_id, role.id AS "ro...
import React, { Component } from 'react' import { connect } from 'react-redux' import * as actions from '../../store/actions/index' import DeductionInput from './deductionInput/deductionInput' import { BlueButton, GreenButton } from '../buttons/buttons' import Modal from '../modal/modal' import css from './deductions...
/* * @author park * A user database object uses: * nodes, theNodes for what this user creates * inbox, theInbox for inbox */ var constants = require('../constants'); var Database = require('../drivers/file_database_driver'); var CommonModel; var User, instance; User = function() { var self = this; ...
import React, { Component } from "react"; import { withRouter } from "react-router-dom"; import Header from "../../components/Result/Header"; import { deleteID, deleteModel, deleteTeacher, deleteSetting, getID, getModel, getTeacher, getSetting, } from "../../utils/session_storage"; import { message, Row...
/** * Welcome to Pebble.js! * * This is where you write your app. */ var UI = require('ui'); var Accel = require('ui/accel'); var ajax = require('ajax'); var timerHandle = null; var g_hostName = '192.168.65.11'; // REST call function executeLightsAudioMethod(methodName, methodParams) { console.log('executeRem...
var app = { inicio: function() { this.iniciaFastClick(); this.iniciaBotones(); }, iniciaFastClick: function () { FastClick.attach(document.body); }, iniciaBotones: function() { // Boton Camara var buttonAction = document.querySelector('#boton-camara'); buttonAction.addEventListener('...
import React from 'react' import PropTypes from 'prop-types' import { FormattedMessage, injectIntl } from 'react-intl' import { Bar, Header } from 'components/UI' import { Form, Input, OpenDialogInput } from 'components/Form' import ConnectionDetailsTabs from './ConnectionDetailsTabs' import messages from './messages' ...
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &...
import React, { useEffect, useState } from 'react'; import { makeStyles } from '@material-ui/styles'; import { Box, Card, CardContent, CardHeader, Grid, Button, Divider, CardActions, FormControlLabel, Switch, CircularProgress } from '@material-ui/core'; import axios from 'axios'; import { Acti...
/* This example requires Tailwind CSS v2.0+ */ import styles from '../styles/Home.module.css' import { Fragment } from 'react' import { Popover, Transition } from '@headlessui/react' import SwitchHorizontalIcon from '@heroicons/react/outline/SwitchHorizontalIcon' import { Menu } from '../components/menu' import { Ghos...
/** * Created by smog on 4/24/2016. */ module.exports = { convertNumberToText: buildGeoString }; // //var fs = require('fs'); // //var result = buildGeoString('123456789123456789123456789123456789123456789123456789123456789123'); ////var result = buildGeoString('396745'); // //fs.writeFile('test.txt',result,fu...
import * as ls from "./ls.js"; import * as util from "./utilities.js"; let todoList = []; export default class ToDos { // a class needs a constructor constructor(parentId, lskey) { this.parentId = parentId; this.parentEl = util.qs(`#${this.parentId}`); this.lskey = lskey; this.todoList ...
const HandlebarsDirectory = require('handlebars-directory') const recursive = require("recursive-readdir") const fs = require('fs-extra') const imagemin = require('imagemin') const imageminMozjpeg = require('imagemin-mozjpeg') const imageminPngquant = require('imagemin-pngquant') const imageminGifsicle= require('image...
"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 mapboxgl from 'mapbox-gl'; import directions from '../js/directions'; import fetchNearest from '../js/nearest'; import {setHash} from '../js/history'; import AerialToggle from '../js/aerialtogglecontrol'; import PitchToggle from '../js/pitchtogglecontrol.js'; import mapStyle from '../style/osm-liberty.json'; le...
function drawPieChart(candidate) { var id = String(candidate._id).slice(-5); var p = Math.max(0, d3.precisionFixed(0.05)); var formatPercent = d3.format("." + p + "%"); var women = candidate.totalwomen / candidate.total; var men = candidate.totalmen / candidate.total; var dataset = candidate.topProvinces;...
'use strict' const expect = require('chai').expect const geneHoodPackData = require('../data-test/test.geneHood.pack.json') const Gene = require('./Gene') describe('Gene', function() { describe('constructor', function() { it('should build gene', function() { const geneMetadata = geneHoodPackData.genes[0] c...
colorMeTired() var allMeTimes=[] var times=$('.times'); $('.saveBtn').on('click', function bigSaveBoy(){ var timY1 = moment().format('H') if(timY1 == 8){ $('#T1').addClass('present') }else if(timY1 > 8){ $('#T1').addClass('past') }else if(timY1 < 8){ $('#T1').addClass('future') } localStorage....
// @ts-check /** * @typedef {function} AddEventListener * @param {string} eventName Name of event to add * @param {EventListener} callback Callback when event is fired * @returns {void} */ /** * @typedef {object} ServiceWorkerGlobalScope * @property {function} skipWaiting skip the waiting * @property {AddEven...
// Week 2 - Functions // In the following exercises, you will need to place your code or answer underneath each // exercise prompt. // First try answering these without using references or looking up any information. // Then, check your answer by using references and/or running your code. // You can run your JS code ...
/* Copyright (C) 2016 NooBaa */ import ko from 'knockout'; import { domFromHtml } from 'utils/browser-utils'; import * as templates from './tooltip-templates'; import { deepFreeze, runAsync } from 'utils/core-utils'; const hiddenTooltipData = { template: null, css: '', style: { display: 'none'} }; functi...
var enemyindicator, base1, enemy1, fakeenemy, player, enemy2, lightblock, enemyindicatorimg, playerimg, roof, roofenemy1, rooflightblock, finish, collideno = 0, invisiblebase; var playbutton, howtoplay, hidder; var gameState = "menu"; //lucid function preload(){ enemyindicatorimg = loadImage('sprites/light.png'); ...
import { useState } from "react"; import parseISO from "date-fns/parseISO"; import { GET_ALL_PARENT_ABSENCE_REQUESTS } from "../../graphql/query"; import { useQuery, useMutation } from "@apollo/client"; import { DELETE_ABSENCE_REQUEST } from "../../graphql/mutations"; import { AbsenceRequestCard } from "../AbsenceReque...
let appRoot = require('app-root-path'); let constants = require(`${appRoot}/local_modules/constants`); let functions = require(`${appRoot}/local_modules/localFunctions`); //validate & sanitize form data const validator = require('validator'); //parse incoming request bodies using body-parser middleware const ...