text stringlengths 3.07k 16k |
|---|
import React from "react"
class EmailSignature extends React.Component {
constructor() {
super();
this.state = {
name: '<NAME>',
title: 'Fictional Consultant',
phone: '0115 959 XXXX',
social: true
}
this.toggleSocial = this.toggleSocial.bind(this);
}
toggleSocial() {
... |
const express = require('express');
const router = express.Router();
const bodyParser = require('body-parser');
const jsonParser = bodyParser.json();
const User = require('../models/user.model');
const Group = require('../models/group.model');
const generateToken = (n) => {
const randomToken = require('random-toke... |
import { Component } from 'react';
import { createForm } from 'rc-form';
import { connect } from 'dva';
import Nav from 'components/nav';
import { DatePicker } from 'antd-mobile';
import {
List,
InputItem,
Picker,
TextareaItem,
Button,
WhiteSpace,
Toast,
Icon,
ActivityIndicator,
} from 'components';
i... |
/* eslint-disable no-cond-assign */
import React, { Component } from 'react';
import { BrowserRouter, NavLink, Route, Switch } from 'react-router-dom';
import './App.css';
import Spotify from 'spotify-web-api-js';
import client from './client';
import welcome from './img/welcome.png';
// import history from "./history... |
document.getElementById("camera").onclick = callPython;
document.getElementById("picture").onclick = callPython;
document.getElementById("convert").onclick = callPython;
document.getElementById("edit").onclick = callPython;
document.getElementById("save").onclick = callPython;
document.getElementById("delete").onclick ... |
import { Code, Col, Div, Grid, Heading, Icon, Row, Text } from '../components';
import { RichText, Slices } from '../../components';
import { bodySizes, headingSizes } from '../variables/fonts';
import { colors } from '../variables/colors';
import { flexboxgrid } from '../variables/flexboxgrid';
import { modal } from '... |
require('webrtc-adapter')
MAX_SEND_RETRY_COUNT = 5
const convertToProtobufCompatibleBuffer = require('./convert-to-protobuf-compatible-buffer')
const Errors = require('./errors')
module.exports =
class PeerConnection {
constructor (props) {
const {
localPeerId, remotePeerId, fragmentSize, iceServers, con... |
/**
* Provide a built-in WebServer used to service Duktape commands. Primarily
* a REST service provider. The following are exposed:
*
* POST /run - Execute the JavaScript code supplied in the POST data.
* GET /run/<name> - Execute the contents of the file named.
* GET /files - Return a JSON encoded list of ... |
import Constantes from '../../constantes/Sistema';
import Moment from 'moment';
export const refrescarSesion = firebase => {
return new Promise((resolve, eject) => {
firebase.auth.onAuthStateChanged(user => {
if (user) {
user.getIdToken(true);
resolve();
}
});
});
};
export con... |
"use strict";
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.prototype ? "symbol" : typeof obj; };
var _slicedToArray = function () {... |
const $ = require('jquery');
const _ = require('lodash');
const utils = require('../../components/libs/utils');
/* ngInject */
function individualCtrl($scope, $state, $location, Business, $timeout, configs) {
const ind = this;
ind.id = ($state.params.constructor === Object && angular.equals($state.params, {}) || !$... |
const request = require('request');
const cheerio = require('cheerio');
const _ = require('lodash');
const moment = require('moment-timezone');
const fs = require('fs');
const writeFileAsync = (fileName, data) => {
return new Promise((resolve, reject) => {
fs.writeFile(fileName, data, (err, res) => {
if (e... |
import {Axis} from './Axis';
import {VDOM} from '../../ui/Widget';
import {isUndefined} from '../../util/isUndefined';
import {isArray} from '../../util/isArray';
export class CategoryAxis extends Axis {
declareData() {
super.declareData(...arguments, {
inverted: undefined,
uniform: undefin... |
// variables to hold the stimulus details
var timeStartTest = ''; // test start time
var timeStopTest = ''; // test stop time (same time as the end of final symbol display time )
var timeStartStim = ''; // time the stimulus appears in the cell
var timeStopStim = ''; // time the stimulus disappears from the screen - e... |
import React, { Component } from 'react'
import { Redirect, Route, Switch } from 'react-router-dom'
import { connect } from 'react-redux'
import DocumentTitle from 'react-document-title'
import pathToRegexp from 'path-to-regexp'
import { enquireScreen, unenquireScreen } from 'enquire-js'
import { ContainerQuery } from ... |
const ipc = require('electron').ipcRenderer;
const { remote } = require('electron');
const htmlspecialchars = require('htmlspecialchars');
const MarkdownIt = require('markdown-it');
const markdown = new MarkdownIt;
let guildsArray, channelsGroup, voiceChannels, textChannels, channels;
function enableServerListeners() ... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import Datetime from 'react-datetime';
import Input from './Input';
import Select from './Select';
import Button from './Button';
import Icon from './Icon';
import H3 from './H3';
import NagSuggest from... |
import React from 'react'
import {connect} from 'react-redux'
import {fetchAllCelebrities} from '../store/celebrities'
import {Link} from 'react-router-dom'
import AddCelebrityForm from './addCelebrityForm'
import {fetchAddedItem} from '../store/orders'
import AddCart from './addCart'
class AllCelebrities extends Reac... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Wifi_Handler_1 = __importDefault(require("../Wifi-Handler"));
const WPAPersonalProfile_1 = __impor... |
const express = require('express')
const router = express.Router()
const SettingsModel = require('./../models/settingsModel');
const ProfileModel = require('./../models/profileModel');
const settingsModel = require('./../models/settingsModel');
const catchAsyncErrors = require('../middlewares/catchAsyncErrors')
const ... |
/* Copyright 2014 Open Ag Data Alliance
*
* 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 agr... |
'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 ('v... |
//@ts-check
const fs = require("fs");
const PDFDocument = require("pdfkit");
function createInvoice(invoice, path) {
let doc = new PDFDocument({ size: "A4", margin: 50 });
generateHeader(doc);
generateCustomerInformation(doc, invoice);
generatePlanDetails(doc, invoice);
generateInvoiceTable(doc, invoice);
... |
const router = require( 'express' ).Router();
const { User, Game, UserGame } = require( '../../models' );
const fetch = require('node-fetch');
const ensureAuthenticated = require('../../utils/auth');
// GET /api/users
router.get('/', ( req, res ) => {
User.findAll( {
include: [
{
... |
const calculate = {
calories: (sex) => {
let BMR = 0;
const age = document.getElementById('age').value;
const height = document.getElementById('height').value;
const weight = document.getElementById('weight').value;
const activity = document.getElementById('activity').value;
if (sex === 'Male... |
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var mongoose = require('mongoose');
// var index = require('./routes/index');
// var users = require... |
/**
* Copyright 2015 IBM Corp.
*
* 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 wr... |
import FuseScrollbars from '@fuse/core/FuseScrollbars';
import { styled } from '@mui/material/styles';
import Fab from '@mui/material/Fab';
import Hidden from '@mui/material/Hidden';
import Icon from '@mui/material/Icon';
import IconButton from '@mui/material/IconButton';
import Paper from '@mui/material/Paper';
import... |
const request = require('request');
const _ = require('underscore');
const lo = require('lodash');
const Discord = require('discord.js');
const { prefix, data_url } = require('../config.json');
// const data_url = 'http://localhost:5000/api?id=1ZnuIjEIdYeRjPaBp1i76a3W9cuVuahswB-zbS0i-qYc&sheet=1';
module.exports = {
... |
/** @typedef {import('./Cookie').CookieOptions} CookieOptions */
/* eslint-disable no-control-regex */
const fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
/**
* A Cookie object.
* It is based on https://github.com/pillarjs/cookies/blob/master/lib/cookies.js
*/
export class Cookie {
/**
* Const... |
// this is an example build script; several actions are for demonstration purposes
var
fs = require("fs"),
requireLazy = require("require-lazy"),
options = require("./options.js").config,
config = require("./app.build.json"),
MARKER1 = "//ISSUE4 - onBuildWrite MARKER",
onBuildWrite1Calls = 0;
config.onBuildWrite... |
const Modal = {
open(){
//Abrir modal
//Adicionar a classe active ao modal-overlay
document.querySelector('.modal-overlay').classList.add('active');
},
close(){
// Fechar o modal
// Remover a class active do modal-overlay
document.querySelector('.modal-overlay... |
#!/usr/bin/env node
"use strict";
/* Copyright 2019 Google LLC
* 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
* ... |
// Main page JavaScript file.
$(document).ready(function() {
$.modalForm({ // global settings for modal popups
labelOk: I('OK'),
labelCancel: I('Cancel'),
titleIcon: 'img/zabbix16.png',
titleColor: '#444',
disableF5: true
});
$('#treeLoading').hide(); // animated "loading" GIF
$('#toolbox').hide(); // n... |
import OpenSeadragon from 'OpenSeadragon';
/**
* OSD ajax wrapped in promise.
*
* @param url
* @param json
* @returns {Promise}
*/
export function fetch(url, json=true) {
return new Promise((resolve, err) => {
OpenSeadragon.makeAjaxRequest(url, (response) => {
return json ? resolve(JSON.parse(respons... |
import { logger } from "../logger";
import {
timeout,
activeOrders,
timeoutWithClear,
clean_orders,
cancel
} from "./util";
import buy_order_handle from "./buy_order_handle";
import buy_order_status_changed from "./buy_order_status_changed";
import sell_order_handle from "./sell_order_handle";
const uuid_v4 =... |
'use strict';
// ==================================================================================
// system.js
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
// Copyright: (c) 2014 - 2017
// Author:... |
import {Template} from 'meteor/templating';
import {Session} from 'meteor/session';
import {FlowRouter} from 'meteor/kadira:flow-router';
import Helper from '/client/imports/helper';
import {Settings} from '/lib/imports/collections/settings';
import Enums from '/lib/imports/enums';
import {AceEditor} from 'meteor/arch:... |
/**
* Blobs controller / RESTful API CRUD routes and controller
* see for more info -https://scotch.io/tutorials/using-mongoosejs-in-node-js-and-mongodb-applications
* includes all crud operations
*
* Route Definition:
* app.METHOD(PATH, HANDLER)
* Where:
* app is an instance of express.
* METHOD is an HTTP r... |
var _ = require('ep_etherpad-lite/static/js/underscore');
// messages sent to outside
var COMMENT_ACTIVATED_MESSAGE_TYPE = 'comment_activated';
var DATA_CHANGED_MESSAGE_TYPE = 'comments_data_changed';
var NEW_DATA_MESSAGE_TYPE = 'comments_set_changed';
// messages coming from outside
var DELETE_COMMENT_MESSAGE_TYPE =... |
/**
* APEX Client Extension Browser
*
* This module is loaded as "preload" in an Electron Webview and thus injects
* some global APIs into the loaded Website (=APEX Page).
* Those APIs encapsulate Electron method calls and communicate back to the Main
* process.
* For security reasons no Electron API should be a... |
const fs = require('fs')
const path = require('path')
const prompt = require('prompt');
const chalk = require('chalk');
const { MintKnight, MintKnightWeb } = require('../src/index')
require('dotenv').config();
const log = console.log;
const error = chalk.bold.red;
const warning = chalk.hex('#FFA500'); // Orange color
... |
$(document).ready(function() {
$(".campoCPF").keypress(function() {
var c = $(this).val();
if (c.replace(/\./g, '').replace(/\-/g, '').replace(/\_/g, '') !== '')
mascaraPrincipal(this, cpf);
}).blur(function() {
var c = $(this).val();
if (c.replace(/\./g, '').replace... |
// Class names
var emItem = "eMALItem";
var selClass = "emSelected";
// Whether we're on the manga list or not
var isManga = window.location.href.split("/")[3] === "mangalist";
// Stores the last object the user clicked on
var lastSelected = null;
// Stores the csrf token
var csrf = null;
function getSelected() {
... |
/*
This file is part of crypu.js.
crypu.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
crypu.js is distributed in the hope... |
var NoMatch = function(path, tried) {
this.path = path;
this.urlpatterns = tried;
};
NoMatch.prototype = new Error();
var NoReverseMatch = function(path) {
this.path = path;
};
NoReverseMatch.prototype = new Error();
var ReverseRegex = function(original, tokens, minArgs) {
this.original = original;
... |
'use strict'
/**
*
* This takes the input of the spreadsheet and transforms the data to
* application friendly graphql node. This will allow the app to easily filter, sort and
* group the data using graphql queries and have it ready to be displayed on our site.
*
* We have added additional logic here to display t... |
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
require('es6-promise').polyfill();
const deepAssign = require('deep-assign');
const EmailTemplate = require('email-templates').EmailTemplate;
const mkdirp = require('mkdirp');
const nunjucks = require('nunjucks');
var pkg = {
sync: {
p... |
export class Gaucho {
constructor(config) {
this.configuration = config;
this.bindTogglers(document);
this.togglePipelines(document);
setTimeout(() => {
this.startPolling(config, (data) => this.updateStatus(data, this));
}, 3000);
}
bindTogglers(elem) {
for(const button of elem.queryS... |
import {useState,useEffect } from "react"
import Button from "@material-ui/core/Button"
import {Line} from "react-chartjs-2"
import Api from "../api/Api"
import { Row } from '@mui-treasury/components/flex';
import { WiHumidity } from "react-icons/wi";
import { FaHeartbeat, FaHeart } from "react-icons/fa";
import { Typ... |
// react core
import React, { useEffect, useState } from 'react';
//material UI styles state and associated components
import { makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
im... |
"use strict";
/**
* Module Dependencies
*/
const parent = require('./ipc')(process);
const {app, ipcMain, BrowserWindow, powerSaveBlocker, protocol} = require('electron');
const join = require('path').join;
const fs = require('fs');
const _ = require("lodash");
const async = require("async");
const template = requi... |
const DB = require('../class/DB')
const fs = require('fs')
const moment = require('moment')
const smol = require('smol')
const Schema = require('../class/Schema')
module.exports = {
description: 'Migrate database tables',
args: [
'action?=: Action to perform',
'steps?#: Number of steps to migrate (default ... |
import crypto from 'crypto';
/**
* Utility methods for working with duotone URLs
*
* @module duotone
*/
/**
* The canonical string reference to a duotone is the 'spec'
* defined by the photo scaler routing rules.
*
* @link www.meetup.com/meetup_api/docs/sign/photo_transform/
* @param {String} light the hex v... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _Util = _interopRequireDefault(require("./Util"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/*
* MIT License
*
* Copyright 2021-present xiaolu521
*
... |
"use strict";
var $__utils_46_js__,
$__Map_46_js__,
$___46__46__47_has_45_native_45_symbols_46_js__;
var $__0 = ($__utils_46_js__ = require("./utils.js"), $__utils_46_js__ && $__utils_46_js__.__esModule && $__utils_46_js__ || {default: $__utils_46_js__}),
isObject = $__0.isObject,
registerPolyfill = $__... |
/* global __DEV__ */
// Import the entire 'phaser' namespace
import Phaser from 'phaser'
// Import the Phaser3d plugin
import Phaser3D from '../../plugins/phaser3D/Phaser3D'
// Get the important pieces from three.js
import * as THREE from 'three'
import '../../plugins/phaser3D/OrbitControls'
import 'three/examples/js... |
//let depth = 510; let target = {x: 10, y: 10}
let depth = 6084; let target = {x: 14, y: 709}
let ext = {y:20, x:22};
let erosionLevelMap = [], map = [], fastestMap = [];
let regionTypeName = ['rocky', 'wet', 'narrow'];
let gear4RegionType = [['torch', 'climb'], ['climb', 'none'], ['torch', 'none']];
let regionTypeSign... |
import * as _ from "../deps/underscore-1.10.2-esm.js"
import { nil } from "../header.js"
import { to_write, inspect } from "./_writer.js"
import Class from "./class.js"
import BiwaSet from "./set.js"
import { isPair } from "./_types.js"
//
// Pair
// cons cell
//
const Pair = Class.create({
initialize: function(ca... |
"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... |
'use strict';
// TODO: fix
const fs = require('fs-extra')
const { readdirSync, statSync } = require('fs-extra')
const { join } = require('path')
const path = require('path')
var glob = require("glob")
const yaml = require('js-yaml')
const safeLoadYaml = require("./shared/load-yaml")
var chalk = require('chalk');
var... |
/**
* Copyright (C) 2011 BonitaSoft S.A. BonitaSoft, 32 rue <NAME> - 38000
* Grenoble This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2.0 of the License, or (at your option)
* ... |
/**
* @file Defines the API for MD Ripple
* @author <NAME> <<EMAIL>>
* @copyright DGTLife, LLC 2016
*/
import { Meteor } from 'meteor/meteor';
/**
* Compute the CSS styles for size and position of the ripple.
* @param {string} origin - 'center'|'offset', i.e. where should the ripple
* o... |
var canvas = document.getElementById('fahadcanvas');
var ctx = canvas.getContext("2d");
canvas.style.border = "thick solid #0000FF";
// canvas width and height
var canvasWidht = canvas.width;
var canvasHeight = canvas.height;
// display starting content
ctx.beginPath();
ctx.fillStyle = "Red";
ctx.font = "30px ... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('va... |
/* eslint-disable no-trailing-spaces */
/* Magic Mirror
* Node Helper: MMM-WeasleyClock
*
* By {{AUTHOR_NAME}}
* {{LICENSE}} Licensed.
*/
var NodeHelper = require("node_helper");
const mqtt = require("mqtt");
const fs = require("fs");
const {Howl, Howler} = require("howler");
var client;
module.exports = NodeHe... |
'use strict';
const paths = ['bag.jpg', 'banana.jpg', 'bathroom.jpg', 'boots.jpg', 'chair.jpg', 'cthulhu.jpg', 'dog-duck.jpg', 'pet-sweep.jpg', 'scissors.jpg', 'shark.jpg', 'sweep.png', 'usb.gif', 'water-can.jpg', 'wine-glass.jpg'];
const names = ['bag', 'banana', 'bathroom', 'boots', 'chair', 'cthulhu', 'dog-duck', 'p... |
import InputFieldComponent from '../input-field';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { guidFor } from '@ember/object/internals';
import { triplesForPath } from '@lblod/submission-form-helpers';
import rdflib from 'browser-rdflib';
import { v4 as uuidv4 } from 'uu... |
/* eslint-disable no-unused-vars */
import React, { useState } from "react";
import TextField from "@material-ui/core/TextField";
import Select from "@material-ui/core/Select";
import {
MuiPickersUtilsProvider,
KeyboardTimePicker,
KeyboardDatePicker,
} from "@material-ui/pickers";
import GridItem from "components... |
'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 ("valu... |
let state = {
"currentIndex": 0,
"currentFont": "default",
"fonts": {
"MaShanZheng": "font-family: 'Ma Shan Zheng', cursive;",
"LongCang": "font-family: 'Long Cang', cursive;",
"default": "",
"QingKeHuangYou": "font-family: 'ZCOOL QingKe HuangYou', cursive;",
"ZhiMangXing": "font-family: 'Zhi ... |
////WORD PROCESING FUNCTIONS
// takes a string and returns it splitted letter by letter
var aWsplittedF = (analizedWord) => {
var analizedWordSplit = analizedWord.split('')
return analizedWordSplit
}
// takes a string and returns an array that distinguish between consonants , open vowels and closed vowals, making ... |
export const adaptForReact = (updateStore, storeRef) => ({
updateStore: (keyName, result) => {
if (typeof keyName === 'function') {
updateStore({
type: 'bulkUpdate',
result: keyName(storeRef.store)
})
} else if (['runDataSuppliers', 'userActionBeingExecuted'].includes(keyName)) {
... |
'use strict'
const FILTER_CONDITIONS = require('./filter.conditions')
const SPECIAL_CHARS = [
'-',
'[',
']',
'/',
'{',
'}',
'(',
')',
'*',
'+',
'?',
'.',
'^',
'$',
'|'
]
const replaceStr = (str, from, to) => {
const regExp = RegExp(`(.?)(${from})`, 'gi')
return str.replace(regExp, ... |
import React, {useState, useEffect} from 'react';
import {
StyleSheet,
View,
Text,
FlatList,
TouchableOpacity,
ActivityIndicator,
} from 'react-native';
import {
Container,
CardContainer,
CardContent,
CardHeader,
DataCol,
DataItem,
DataValue,
} from './styles';... |
'use strict';
var EventEmitter = require('eventman');
var inherits = require('inherits');
var amgui = require('../amgui');
var Ease = require('./Ease');
var defineCompactProperty = require('../utils/defineCompactProperty');
function Key(opt, timeline) {
EventEmitter.call(this);
this.timeline = timeline;
... |
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Button } from 'react-bootstrap';
import { product, apiPath } from 'config';
import { apiFormatUrl } from 'helpers/utils';
import { upload as uploadErrors } from 'helpers/userMessaging';
imp... |
/**
* Copyright 2018 The Pennsylvania State University
* @license Apache-2.0, see License.md for full text.
*/
import { LitElement, html, css } from "lit";
/**
* `rich-text-editor-source`
* a standalone rich text editor
### Styling
`<rich-text-editor-source>` uses RichTextStyles variables,
as well as an additi... |
const Apify = require('apify');
const moment = require('moment');
const Handlebars = require('handlebars');
const fs = require('fs');
// Include format number helpers for handlebars
const NumeralHelper = require("handlebars.numeral");
NumeralHelper.registerHelpers(Handlebars);
const htmlTemplate = fs.readFileSync('./t... |
/*
If form is complete, stores info into global array building_info
*/
// =============================================================================
function store_form_input(){
if(form_is_valid_and_complete()){
// store info
// store units
if(imperial_selected()){
buildi... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _recompose = require("recompose");
var _InputFormDialog = _interopRequireDefault(require("../Dialogs/InputFormDialog"));
var _styles = require("@materi... |
import React, { Component } from 'react';
import { Dimensions, StyleSheet, ScrollView, View } from 'react-native';
import PropTypes from 'prop-types';
import { Icon, Button } from 'native-base';
import ScreenDisplay from './ScreenDisplay';
import Widget from './Widget';
import Timer from '../Timer';
import { colors } f... |
/* eslint-disable react/jsx-props-no-spreading */
/* eslint-disable react/require-default-props */
/* eslint-disable react/forbid-prop-types */
import React,{useState} from 'react'
import { useForm,Controller } from "react-hook-form"
import Grid from '@material-ui/core/Grid'
import { Container , Box } from '@material-u... |
import React, { useEffect, useState } from 'react'
import axios from 'axios'
import {
Box, Typography, InputLabel, MenuItem, Button,
FormControl, Select, Checkbox, TextField, FormControlLabel
} from '@mui/material';
import Pagination from '@mui/material/Pagination';
import DateAdapter from '@mui/lab/AdapterDat... |
import { foodColors, foodListArray } from '../../../constants/food';
import { directions } from '../../../constants/directions';
import { snake, speedLevels } from '../../../config/game';
import { rand, getNextNumberInRange } from './utils';
import { UPDATE_SNAKE, CREATE_NEW_FOOD, ADD_NEW_HEAD, UPDATE_CURRENT_HEAD, REM... |
const bigInt = require('big-integer');
const sha1 = require('js-sha1');
const memoize = require('lodash/memoize');
const {
hexString2ArrayBuffer
} = require('./util');
// ...
const groups = {
1024: {
N: new bigInt(
'EEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0... |
const assert = require('assert');
const { Tables } = require('./database-schema');
const geneUtils = require('../genetics/utils');
function QueryType(name, prefixes) {
this.name = name;
this.prefixes = prefixes;
}
function Keyword(name, sql) {
this.name = name;
this.sql = sql;
}
function QueryParser(database)... |
'use strict';
//Visitor greeting
let visitorName =prompt('Hello, What is your name?');
const userName= function (user) {
console.log('You are welcome '+visitorName+ '. Let us start the game! Your are allowed to answer by Yes/No or Y/N only.' );
return ('You are welcome '+visitorName+ '. Let us start the game! Your are ... |
'use strict';
//all your libraries
const express = require('express');
const app = express();
const cors = require('cors');
const superagent = require('superagent');
require('dotenv').config();
const pg = require('pg');
//this bouncer (cors) would let a highschooler into the bar
app.use(cors());
const client = new pg.C... |
import styled from "styled-components";
import { motion } from "framer-motion";
import { useSelector } from "react-redux";
import { useHistory } from "react-router-dom";
import { smallImage } from "../assets/utils/utils";
import apple from "../assets/img/apple.svg";
import gamepad from "../assets/img/gamepad.svg";
impo... |
const {ipcMain, dialog} = require('electron');
const {execFile} = require('child_process');
const {existsSync, readFile, writeFile} = require('fs');
const findProcess = require('find-process');
const fetch = require("node-fetch");
const OPEN_SIGN_IN_WINDOW = 'open-sign-in-window';
const OPEN_SIGN_UP_WINDOW = 'open-sig... |
'use strict';
var gulp = require('gulp'); // Base gulp package
var babelify = require('babelify'); // Used to convert ES6 & JSX to ES5
var browserify = require('browserify'); // Providers "require" support, CommonJS
var notify = require('gulp-notify'); // Provides notification to both the console and Growel
var re... |
/**
* A SendGrid API key, email and template id must be set using the firestore cli in the terminal by running:
*
* firebase functions:config:set sendgrid.apikey="my-api-key" sendgrid.fromemail="greenup-sender-email" sendgrid.teaminvitetemplateid="invitation-template-id" sendgrid.joinrequesttemplateid="join-... |
const fs = require('fs');
const path = require('path');
const inquirer = require('inquirer');
const colors = require('ansi-colors');
const mkdirp = require('mkdirp-promise');
const { execSync } = require('child_process');
const { promisify } = require('util');
const writeFile = promisify(fs.writeFile);
const { log } =... |
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const data = new Vuex.Store({
state: {
inventory: {
shown: false,
},
currentView: 'homeScreen',
currentViewOptions: ['homeScreen', 'playGame'],
gameScreen: 'mapScreen',
terminal_send_show:"",
textToBeAdded:"",
addTer... |
function openOpenSlice(openPath1, openPath2) {
const p1 = openPath1.clone(false);
const intersections = p1.getIntersections(openPath2);
const res = [];
let lastRes = p1;
res.push(lastRes);
for (const intersection of intersections) {
lastRes = lastRes.split(intersection);
if (lastRes) {
res.p... |
var types = {
"++" : "INCREMENT",
"--" : "DECREASE",
"+=": "PLUS_EQUAL",
"*=": "MULTIPLY_EQUAL",
"-=": "MINUS_EQUAL",
"/=": "DIV_EQUAL",
"^=": "BT_EQUAL",
"|=": "MOD_EQUAL",
"WORD": "WORD",
" ": "SPACE",
'"': "STRING",
"'": "STRING",
"//": "COMMENT",
"/*": "COMMENT",
"function": "FUNCTION"... |
var canvasMaxWidth = 8192
var aDayWidth = 14
var monthHeight = 25
var dayHeight = 20
var aMonthMaxDayNumber = 31
var aMonthMaxWidth = aDayWidth * aMonthMaxDayNumber
var aCanvasMaxMonthNumber = parseInt(canvasMaxWidth / aMonthMaxWidth)
function getYearAndMonthList(start, end) {
var startDate = new Date(start),
start... |
import React from 'react'
import { connect } from 'react-redux'
import { Link, withRouter } from 'react-router-dom'
import { Menu, Layout } from 'antd'
import store from 'store'
import { Scrollbars } from 'react-custom-scrollbars'
// import _ from 'lodash'
import styles from './style.module.scss'
const { Sider } = Lay... |
import React, { forwardRef } from 'react';
import { Formik } from 'formik';
import InputMask from 'react-input-mask';
import { useToasts } from 'react-toast-notifications';
import Firebase from '../firebase';
import Modal from './Modal';
import { useAuth } from '../context/authContext';
import { validateNewContact } f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.