text stringlengths 3.07k 16k |
|---|
import { makeAction, createReducer } from 'shared/utils/redux-utils'
const INITIAL_STATE = {
activeIndex: null,
avatars: {
loading: false,
error: null,
list: []
},
mintAvatar: {
loading: false,
error: null,
result: null
},
getDna: {
loading: false,
error: null,
result: n... |
// Assemble API variable selecting "All Earthquakes" from the last 7 days
var queryUrl = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.geojson"
// Grabbing the data with d3...
d3.json(queryUrl, function(data) {
// Send the data.features object to the createFeatures function
createFeatures(dat... |
import { VegoBaseComponent } from 'vego';
import { scaleLinear, scaleBand } from 'd3-scale';
import { max } from 'd3-array';
function scaleBandInvert(scale) {
const domain = scale.domain();
const eachBand = scale.step();
return function (value) {
const i0 = Math.floor((value / eachBand));
co... |
// miniprogram/pages/my/add&amend-site/index.js inDetails
const util = require('../../../util.js')
const ssq = require('../../../ssq.js')
Page({
/**
* 页面的初始数据
*/
data: {
// 组件所需的参数
navbarData: {
showCapsule: 0, //是否显示左上角图标 1表示显示 0表示不显示
title: '收货地址管理', //导航栏 中间的标题
},
height: ge... |
'use strict';
//require('newrelic');
//Get started with New Relic APM and New Relic Insights
//https://rpm.newrelic.com/accounts/681679/applications/setup?destination=web
var express = require('express'),
path = require('path'),
fs = require('fs'),
//watch = require('node-watch'),
mongoose = require('m... |
let board = document.querySelector('.board');
const notification = document.querySelector('.notification');
const notificationText = notification.querySelector(".txt");
const svgNS = "http://www.w3.org/2000/svg";
const xlinkNS = "http://www.w3.org/1999/xlink";
board.onclick = onClick;
let markQueue = [], currentGameW... |
'use babel';
import whenjs from 'when';
let fs = null;
let glob = null;
let path = null;
let os = null;
let CompositeDisposable = null;
let DockerManager = null;
export default {
packageName: 'particle-dev-local-compiler',
subscriptions: null,
loaded: false,
statusBarDefer: whenjs.defer(),
consolePanelDefer: whe... |
"use strict";
var _ = require('lodash');
var async = require('async');
var default_replacer = Symbol('default_replacer');
module.exports = function factory(config) {
var messages = _.clone(require('./messages'), true);
var rules = _.clone(require('./rules'), true);
var replacers = _.clone(require('./repl... |
import Component from "@default-js/defaultjs-html-components/src/Component";
import { define } from "@default-js/defaultjs-html-components/src/utils/DefineComponentHelper";
import { Renderer, Template } from "@default-js/defaultjs-template-language";
import { privateProperty } from "@default-js/defaultjs-common-utils/s... |
import React, {Component} from 'react';
import { NavigationActions } from 'react-navigation';
import AppPreLoader from '../components/AppPreLoader';
import{ ImageBackground, Dimensions, View, TouchableOpacity, FlatList, ActivityIndicator, Image, ScrollView, SafeAreaView, StatusBar } from 'react-native';
import { Ioni... |
import React, { useState, useEffect, useCallback, useRef } from 'react'
import { useEventListener } from './hooks/useEventListener'
import IsDevice from './helpers/IsDevice.js'
/**
* Cursor Core
* Replaces the native cursor with a custom animated cursor, consisting
* of an inner and outer dot that scale inversely b... |
import {flatten, uniqWith, isEqual} from 'lodash'
import moment from 'moment'
async function fetchData(fetch) {
return fetch(`
*[_type == 'work2d'
|| _type == 'work3d'
|| _type == 'correspondence'
|| _type == 'document'
|| _type == 'ephemera'
|| _type == 'floorplan'
|| _type == 'newsClipping'
|| _t... |
import { useState, useEffect } from 'react';
import { Button, TextField } from '@material-ui/core';
import axios from 'axios';
import ipfsClient from "ipfs-http-client";
import { ethers, Contract } from 'ethers';
import Web3Modal from "web3modal";
import ethLogo from './ethLogo.svg';
import './App.css';
import { abi } ... |
/** @license
* Copyright 2017 Google 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
*
* Unless required ... |
import fs from 'fs'
import fsx from 'fs-extra'
import home from 'os-homedir'
import path from 'path'
import {defaultConf} from './swizzle-config'
import defaultsDeep from 'lodash.defaultsdeep'
import omit from 'lodash.omit'
import pick from 'lodash.pick'
export const swizzleFileName = './swizzle.json'
export const rc... |
$(function(){
load(); // Load cheatsheet
});
function load(){
// say "wait" through label and main passage
$("label").html('<span class="loading">読み込み中…</span>');
$("#keyword").hide();
var url = "http://fortawesome.github.io/Font-Awesome/cheatsheet/";
var selector = "div.row";
$.aja... |
'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 ("... |
/**
*
*/
var nAgt = window.navigator.userAgent.toLowerCase();
//alert(nAgt);
var JBrowser = function(){
var self = this;
self.name = navigator.appName;
self.fullVersion = '' + parseFloat(navigator.appVersion);
self.majorVersion = parseInt(navigator.appVersion, 10);
self.versions = function(){
var... |
import React, { Component, ReactNode, View } from "react";
import {
Flex,
Box,
FormControl,
FormLabel,
Input,
Checkbox,
Stack,
Link,
Button,
Heading,
Text,
useColorModeValue,
Textarea,
} from "@chakra-ui/react";
import axios from "axios";
import Cookies from "js-cookie";
import history from ".... |
import pipe from 'lodash/fp/pipe';
import Color from 'color';
const hexColorStrWithHeaderReg = /^#(([0-9a-z]{3})|([0-9a-z]{6}))$/i;
const hexColorStrWithOutHeaderReg = /^(([0-9a-z]{3})|([0-9a-z]{6}))$/i;
const rgbaColorStrReg = /^rgb(a)?\(([\d.]{1,3}(,)?(\s)?){3,4}\)$/i;
/**
* 校验、并过滤,16进制颜色的‘#’
* @param {*} hexColo... |
'use strict';
/*
* Created with @iobroker/create-adapter v1.20.0
*/
// The adapter-core module gives you access to the core ioBroker functions
// you need to create an adapter
const utils = require('@iobroker/adapter-core');
// Load your modules here, e.g.:
// const fs = require("fs");
const axios = require('axios... |
import React from 'react'
import { DataTableStyled } from './styled'
import cx from "classnames";
import ReactTable from "react-table";
import Button from "components/CustomButton/CustomButton.jsx";
import {
Grid,
Row,
Col
} from 'react-bootstrap'
import {
ButtonHero
} from 'components'
import Card from... |
import * as Nav from './nav.js';
import * as Format from './format.js';
/**
* Nav
* expose les différentes méthodes liées à la map
*
*/
var map, mark, positions, distanceTotale, info;
/**
* initialise la map OSM
* @param {*} latitude position initiale
* @param {*} longitude position initiale
* @param {*} n... |
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(d... |
/*
* Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
*/
/*global require, module*/
var exec = require('cordova/exec'),
SqlTransaction = require('./SqlTransaction');
... |
/* eslint-disable */
import Mock from 'mockjs'
let orderCheckout = Mock.mock({
"status": 200,
"message": "ok",
"data": {
"cartlist": {
"items|3": [
{
"goodsId": "@id",
"image_url": "@order(//i1.mifile.cn/a1/pms_1528719455.74358029.jpg,//i1.mifile.cn/a1/pms_1501236937.9673259... |
const WebSocket = require('ws');
const { EventEmitter } = require('events');
// ------ Server ------
/**
* Create a new server
* @constructor
* @param {number} port - Choose the port for the server to listen to.
*/
class Server extends EventEmitter {
constructor(port) {
super();
if (typeof port... |
import React from 'react';
import RecommendedBlock from './RecommendedBlock';
import axios from 'axios';
import { connect } from 'react-redux';
import { setPropDetails } from '../actions/propDetailsActions';
import Header from '../components/Header';
import variables from '../config/config.json';
const mapSt... |
import debounce from 'lodash.debounce';
import { firestore } from '../lib/firebase';
import { useCallback, useContext, useEffect, useState } from 'react';
import { useCollection } from 'react-firebase-hooks/firestore';
import { UserContext } from '../lib/context';
import Login from './login';
import Navbar from '../com... |
import assert from 'assert';
import {vec3} from 'gl-matrix';
export class BBox {
constructor() {
this.vertices = [0,0,1, 1,0,1, 1,1,1, 0,1,1, 0,0,0, 0,1,0,
1,1,0, 1,0,0, 0,1,0, 0,1,1, 1,1,1, 1,1,0,
0,0,0, 1,0,0, 1,0,1, 0,0,1, 1,0,0, 1,1,0,
1,1,1,... |
/* eslint-disable no-console, no-unused-vars */
import fs from 'fs'
import path from 'path'
import colors from 'colors'
import request from 'request'
import loaderUtils from 'loader-utils'
const DEFAULT_OPTIONS = {
publicKey: 'demopublickey',
privateKey: 'demoprivatekey',
statsFilePath: './uploadcare-stats.json'... |
module.exports = { init, formatTime, isCompactView, isTwentyFourHour, isCollapsed }
const path = require('path')
const electron = require('electron')
const app = electron.app
const settings = require('electron-settings')
const config = require('./config')
const tray = require('./tray')
const ipc = electron.ipcMain
con... |
var React = require('react');
var PropTypes = require('prop-types');
var createReactClass = require('create-react-class');
var classNames = require('classnames');
var Subs = Object.assign(
require('../../docs/helpers/users.json'),
require('../../docs/helpers/common.json')
);
var idFormatter = function (title) {
... |
const Rhythm = require('./rhythm');
const Sequencer = require('./sequencer');
/**
* A part of a {@link Section}.
*
* Represents a musical idea, such as a melody, bassline, or drum groove.
* Produces musical notes whose {@link Pitch} (normally) depends on the
* {@link Scale} and {@link Harmony} of the containing {... |
"use strict";
/* eslint no-process-exit:0 */
var fs = require("fs");
var path = require("path");
var Promise = require("bluebird");
var _ = require("lodash");
var git = require("../git");
var service = require("../issue-service");
var config = require("../config");
var templates = path.join(__dirname, "..", "..", ... |
import React,{ useState,useEffect } from 'react'
import PropTypes from 'prop-types';
import styled from 'styled-components'
import { useTable } from 'react-table'
import {useSubscription,useTracker,useMethod} from "react-meteor-hooks"
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';
checkNpmVersi... |
/* eslint-disable no-use-before-define */
import fs from 'fs';
import path from 'path';
import trash from 'trash';
import mkdirp from 'mkdirp';
import {app, BrowserWindow, ipcMain} from 'electron';
let browserWindow;
app.on('ready', createWindow);
app.on('windows-all-closed', () => {
if (process.platform !== 'da... |
DEBUG = true;
function dbg(...args) {
if (DEBUG) { console.debug('[DBG] '.concat(args)); }
}
async function fetchJson(url) {
const resp = await fetch(url, {
headers: {
accept: 'application/vnd.api+json; version=1',
'content-type': 'application/json',
},
}); // the headers are needed for subje... |
/*
This is a derivative of http-logger {https://www.npmjs.com/package/http-logger}
Copyright (c) 2016 <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restri... |
/*!
=========================================================
* Argon Dashboard React - v1.1.0
=========================================================
* Product Page: https://www.creative-tim.com/product/argon-dashboard-react
* Copyright 2019 Creative Tim (https://www.creative-tim.com)
* Licensed under MIT (https:/... |
/*********************************************************************************************************************
* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. *
* ... |
import { loremIpsumData } from './data/lorem-ipsum-data.js';
import { beaconIpsumData } from './data/bacon-ipsum-data.js';
import { rickAndMortyIpsum } from './data/rick-and-morty-ipsum.js';
import { mussumPhraseOne, mussumPhrases } from './data/mussum-ipsum-data.js';
const ipsumTextArea = document.querySelector('#ips... |
import React from 'react';
import styled from 'styled-components'
import moment from 'moment'
import csvFileImage from "../../images/file.png";
import viewPriceImage from "../../images/Price.png";
import calendarImage from "../../images/calendar.png";
import reportImage from "../../images/statistics-report.png";
import... |
#!/usr/bin/env node
const fs = require('fs-extra');
const program = require('commander');
const chalkPipe = require('chalk-pipe');
const figlet = require('figlet');
const moment = require('moment');
const jsdom = require('jsdom');
const puppeteer = require('puppeteer');
const pathToModule = require('global-modules-pa... |
const fs = require('fs');
const redis = require('redis');
const ssh = require('node-ssh');
/*
* State has 4 values:
* 1. OPEN
* 2. CLOSED
* 3. RUN
* 4. COMPLETED
*/
exports.openForRegistration = function (req, res)
{
let client = redis.createClient();
client.del('addresses', function (err) {
console.l... |
import { IconAlert, IconCircleCheck } from '@magnetis/astro-galaxy-icons';
import PropTypes from 'prop-types';
import React from 'react';
import styled from 'styled-components';
import { layout, space } from 'styled-system';
export const inputSizes = {
medium: 'medium',
large: 'large',
};
const inputSizeStyles = ... |
import React, { Component } from "react";
import { observer } from "mobx-react";
import obsSkills from "./obsSkills";
import {
mapObjectToInputsWithAddBtn,
mapArrayOfObjectsToInputsWithAddBtn
} from "../../utils";
import ModalButton from "../Modal/ModalButton";
import AddSkill from "./AddSkill";
const Skills = obs... |
var SIGN_REGEXP = /([yMdhsm])(\1*)/g;
var DEFAULT_PATTERN = 'yyyy-MM-dd';
function padding(s, len) {
var len = len - (s + '').length;
for (var i = 0; i < len; i++) { s = '0' + s; }
return s;
};
export default {
getQueryStringByName: function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&... |
var React = require('react/addons');
var bs = require('react-bootstrap');
var SearchForm = require('./SearchForm.js');
var QueryViewer = require('./QueryViewer.js');
var SearchResults = require('./SearchResults.js');
var TableManager = require('../../managers/TableManager.js');
var xhr = require('xhr');
var Navbar = bs... |
"use strict";
// local modules
const {
FUZZY_FAIL_REASONS,
ALLOWED_INPUT_TIME_UNITS,
TIME_UNIT_IN_SECONDS
} = require("../helpers/constants");
const { parseBool } = require("../helpers/utils");
const cache = require("../cache/cache-db");
const dfformat = require("./formatting");
function isValidTimeDuration({ p... |
/*
* Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
* BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
*
* License for BK-BASE 蓝鲸基础平台:
* ----------------------------------------------------... |
import { readdir, readFile, writeFile } from "fs";
import { promisify } from "util";
import { join } from "path";
import Commander from "commander";
const path = join(
process.cwd(),
"node_modules",
"fastlane-git",
"fastlane",
"swift"
);
Commander.option(
"-o --output <file>",
"File to write results to (... |
/*
* MPU6050 I2C accelerometer and temperature sensor driver
* http://cylonjs.com
*
* Copyright (c) 2013-15 The Hybrid Group
* Licensed under the Apache 2.0 license.
*/
/* eslint camelcase: 0 */
"use strict";
var Cylon = require("cylon");
var I2CDriver = require("./i2c-driver");
/**
* A MPU6050 Driver
*
* ... |
// Altruism.js
var altruism_items = [ //
"If possible, I would return lost money to the rightful owner.", // q0
"I would avoid aiding someone in a medical emergen... |
import React, { PureComponent } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { fromJS } from 'immutable';
import { editNextButtonText, disableBackButton, editBackButtonText, onSelectNextButtonAction, onSelectNextButtonTarget } from '../../actions/winterfellFormBuilder... |
/**
* @file
* Main module of the script.
* Sets up and orchestrates calling the translation service, querying and
* updating the database rows according to the configuration.
* @author lu1sd4
*/
/**
* @type {object}
* @alias module:main~logger
* @description
* Reference to the default logger.
* @see {@lin... |
const express = require('express');
const app = express();
const jwt = require('jsonwebtoken');
const cors = require('cors');
const {promisify}= require('util');
const mysql = require('mysql2');
//pra criptografar senha
const bcrypt = require('bcryptjs');
app.use(express.json());
//midle sera executado primeiro
app.us... |
import React, { useState, useEffect, useReducer } from "react"
import Layout from '../components/layout'
import Image from '../components/image'
import SEO from '../components/seo'
import { Link } from 'gatsby'
import { Card, Elevation, FormGroup, InputGroup, Icon, TextArea, Button, Intent, Tag, ButtonGroup, Alignment ... |
#!/usr/bin/env node
const {join} = require('path')
const {flatten, chain, omit} = require('lodash')
const {outputJson} = require('fs-extra')
const glob = require('glob')
const {ensureArray, readYamlFile, outputCsv, stringCompare} = require('./lib/util')
const departements = require('@etalab/decoupage-administratif/data... |
'use strict';
const webpack = require('webpack');
const paths = require("./paths");
const CaseSensitivePathsPlugin = require("case-sensitive-paths-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");
const PnpWebpackPlugin = require("pnp-webpack-plugin");
const HtmlWebpackPlugin = require("html-web... |
import { setIsChange } from "../setting-panel.js";
function makeTableSortable(tbodyID) {
$(`#${tbodyID}`).sortable({
axis: "y",
items: "tr",
scroll: true,
revert: 200,
scrollSensitivity: 20,
helper: function (e, tr) {
let $originals = tr.children();
let $helper = tr.clone();
... |
"use strict";
// Fisherman's Cap - split into four triangles instead of 6 for a swirl
// Testing using Knitout for the Kniterate
var knitout = require('knitout');
k = new knitout.Writer({
carriers: ['1', '2', '3', '4', '5', '6']
});
k.addHeader('Machine', 'Kniterate');
k.addHeader('Gauge', '7'); // Parameters
// ... |
import React, { PureComponent } from "react";
import planck, { Vec2 } from "planck-js";
import Box from "./Box";
import Mouse from "./Mouse";
const R2D = 180 / Math.PI; // Multiply to convert radians to degrees
const PI2 = Math.PI * 2; // 360 degrees in radians
const worldScale = 40;
class Boxes extends PureComponent... |
let map, heatmap, hmPoints = [], colorPicker,
lampMarkers = [],
lampAlertWindow = null,
markerGroups = [],
securityAlertMarkers = [],
securityAlertInfoWindows = [],
activeLampMarker = null;
const nwLat = 51.450102, nwLng = 5.451532, seLat = 51.443442, seLng = 5.463798;
function initDemo() {
... |
/* carousel */
const carousel = [...document.querySelectorAll('.carousel img')]
let carouselImgIndex = 0
const changeCarousel = () => {
carousel[carouselImgIndex].classList.toggle('active')
if(carouselImgIndex >= carousel.length - 1){
carouselImgIndex = 0
} else{
carouselImgIndex++
}
carousel[carou... |
import React from 'react';
import Icon from 'react-native-vector-icons/Entypo';
import Ionicons from 'react-native-vector-icons/Ionicons';
import { Session } from '../BL/session';
import { ifIphoneX, getStatusBarHeight} from 'react-native-iphone-x-helper';
import { NetInfo } from 'react-native';
import {
Button,
S... |
var zoneid = $('#zoneid').val();
var Users = "https://loyalty-dot-techloft-173609.appspot.com/api/Admins"
var zone = 'https://loyalty-dot-techloft-173609.appspot.com/api/Zones'
var driver = "https://loyalty-dot-techloft-173609.appspot.com/api/Riders"
var updaterider = "https://loyalty-dot-techloft-173609.appspot.com/a... |
// scroll to top functionality
const scrollUp = document.querySelector("#scroll-up");
scrollUp.addEventListener("click", () => {
window.scrollTo({
top: 0,
left: 0,
behavior: "smooth",
});
});
// scroll to top functionality
const goBack = document.querySelector("#go-back");
goBack?.addEventListener("c... |
import arrays from 'arrays';
var RELAXATION_STEPS = 5;
export const makeHeatSolver = function(model) { var
// Basic simulation parameters.
props = model.getModelOptions(),
nx = props.grid_width,
ny = props.grid_height,
relaxationSteps = RELAXATION_STEPS,
// Simulation arrays provided by mode... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListenersController = void 0;
const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
const context_id_factory_1 = require("@nestjs/core/helpers/context-id-factory");
const execution_context_host_1 = require("@nestjs/core/... |
"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... |
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 ("value" in descrip... |
import React from 'react';
// import styled from 'styled-components';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import { withStyles } from '@material-ui/core';
import { addProperty, uploadImage, clearImage } from '../actions/propertyActions';
import styled from 'styled-com... |
const debug = false;
const maxLogLength = 100;
// UI Fields
let logField = null;
let connectButton = null;
let baudrateSelect = null;
function firmwareUpdateInit() {
// Update SumoFirmware version in SumoFirmware panel
$.getJSON('https://api.github.com/repos/robokoding/sumorobot-firmware/releases/latest', fun... |
import React, { useState, useEffect } from "react";
import {
ActivityIndicator,
Modal,
StyleSheet,
ScrollView,
Dimensions,
Platform,
View
} from "react-native";
import { Block, Button, Text, theme } from "galio-framework";
import { LinearGradient } from "expo-linear-gradient";
const { height, width } = ... |
// dkim_signer
// Implements DKIM core as per www.dkimcore.org
var crypto = require('crypto');
var Stream = require('stream').Stream;
var indexOfLF = require('./utils').indexOfLF;
var util = require('util');
function DKIMSignStream(selector, domain, private_key, headers_to_sign, header, end_callback) {
Stream.cal... |
var addressVerify = "";
function machineController($scope,$http) {
$scope.loadActivityLog=function(){
window.location="/activityLog?machineId="+getParameterByName("id");
}
$http.post('/productListJson').
success(function(data, status, headers, config) {
$scope.products = data;
var ... |
// Copyright 2017 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.
goog.module('mr.Sha1');
const BLOCK_SIZE = 512 / 8;
/**
* SHA-1 cryptographic hash constructor.
* @final
*/
class Sha1 {
constructor() {
/**
... |
import React from 'react';
import ReactDOM from 'react-dom';
const redux = require('redux');
import {connect, Provider} from 'react-redux';
// import {Table } from 'react-bootstrap';
import thunk from 'redux-thunk';
// import echarts from 'echarts';
// import lineAction from '../actions/lineAction';
// import FirstPag... |
const express = require("express");
const path = require("path");
const User_controller = require("../controllers/Users_controllers");
const Stream_controller = require("../controllers/Stream_controller");
const Admin_controller = require("../controllers/Admin_controller");
const Patient_controller = require("../contro... |
//cSpell:words amstramgram amst
import AmstramgramAudioPlayer from './amstramgramAudioPlayer.js'
import AmstramgramVideoPlayer from './amstramgramVideoPlayer.js'
import EventEmitter from './tools/eventEmitter.js'
/* -------------------------------------------------------------------------- */
/* ... |
import React, { useState, useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { updateSession, emptySession } from '../../../reducers/sessionReducer'
import MobileTitle from '../MobilePresentational/MobileTitle'
import MobileTopPanel from '../MobilePresentational/MobileTopPanel'
imp... |
'use strice';
alert('welcom to my littel quiz, are you ready?');
var userName = prompt('what is your name', '<NAME>');
alert(' nice to see you ' + userName);
console.log(userName);
alert('please answer with "Yes" or "No".');
/*this is for sum of correct and wrong answer*/
var sumco = 0;
var sumwr = 0;
var sumnon =... |
const {
StringLiteral,
NumberLiteral,
Name,
BinaryExpr,
NegativeExpr,
BlockStmnt,
IfStmnt,
WhileStmnt,
} = require('./ast')
class BasicParser {
constructor() {
this.queue = []
this.operators = {
'=': { priority: 1, isLeftAssoc: false},
'<': { priority: 2, isLeftAssoc: true },
... |
// Initial Value
var empty = "0";
// The numbers being displayed.
var numberBeingEntered = [empty];
var commands = ["+", "-", "*", "/", ".", "-", "**"];
// The Update Function essentially. It updates the numbers on the display.
function adjustNumberBeingEntered() {
// The numbers on the calculator area
var x =... |
const { changeConstantInFile } = require("../../deployers/utils/utils.js");
const dfs = require("@defisaver/sdk");
const hre = require('hardhat');
const { deployContract } = require("../../deployers/utils/deployer");
const {
impersonateAccount,
getProxyWithSigner,
formatExchangeObj,
depositToWeth,
... |
import React, { useEffect, useState } from "react";
import { useHistory } from "react-router";
import firebase from "firebase/app";
import { CircularProgress } from "@mui/material";
function TableOutput() {
const history = useHistory();
const [actions, setActions] = useState(null);
const [productsList, setProduc... |
// @flow
/* eslint-env browser */
'use strict';
/* ::
import {
VChildError,
handleVChildError,
strictParseInt,
parseListCapped,
isEdge,
listPattern,
textInput,
spanNoWrap,
matrixStringLengthBound,
} from './demo_common';
import {
parseHex,
byteLaTeX,
byteArrayComponent,
} from './erasure_code... |
const MIDI = require('../input').MIDI,
LMDB = require('../output').LMDB,
LineChart = require('../plot').LineChart,
chordMap = require('../util/harmonic-matrix').chordMap,
modes = require('../util/harmonic-matrix').modes,
moment = require('moment'),
path = require('path'),
fs = require('fs'),
Promise = r... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _vue = require("vue");
var _css = _interopRequireDefault(require("../constructors/css"));
var _isVueComponent = _interopRequireDefault(require("../utils/isVueComponent"));
var _normalizeProps = _interopR... |
/*
http://stackoverflow.com/questions/28061622/how-to-implement-agenda-list-view-in-fullcalendar-2-2-6
http://www.paulthedutchman.nl/portfolio/?mi=113
*/
fcViews.agendaList = agendaListView;
defaults.buttonText.agendaList='agenda';
defaults.titleFormat.agendaList='W';
defaults.agendaDisType = true;
function a... |
import React from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import ReactDOM from 'react-dom';
import {
Container,
createApp,
UI,
View,
ViewManager
} from 'touchstonejs';
import SideBar from 'react-sidebar';
// App Config
// ------------------------------
const PeopleStore... |
var fs = require('fs');
var ssl = {};
fs.readdirSync('./security').forEach(function(folder){
var stat = fs.statSync('./security/' + folder);
if (stat.isDirectory()){
ssl[folder] = {};
fs.readdirSync('./security/' + folder).forEach(function(file){
var stat = fs.statSync('./security/' + folder + '/' + file);
... |
const coursesRouter = require('express').Router()
const db = require('../models/index')
const { checkAdmin, checkLogin, authenticateToken } = require('../utils/middleware/checkRoute')
const { parseDate } = require('../utils/middleware/dateUtility')
//Get request that returns all courses on current period
coursesRoute... |
const origin = "https://genesysappfoundry.github.io";
// const origin = "http://localhost:8080";
// Keep origin as tld as it's being used
// to check post messages in preview listing.
// root would be the actual root URI of the project.
const root = (origin == 'https://genesysappfoundry.github.io') ?
... |
const axios = require('axios')
const Assignment = require('../../models/assignment')
const peerActivity = require('../../models/peerActivity')
const Log = require('../../models/log')
const config = require('../../config')
var p = {}
var arr = []
var v = new Map()
var temp = []
var count
// start peer learning on an as... |
import React, { Component } from "react";
import {
Card,
CardBody,
CardHeader,
CardTitle,
Badge,
Button,
UncontrolledTooltip,
Modal,
ModalHeader,
ModalBody,
ModalFooter,
Tooltip,
} from "reactstrap";
import "./buttonStyle.css";
import "../../../assets/scss/pages/coming-soon.scss";
import "../..... |
// OSC - Should be used with an OSC relay
/*#include ../osc.js/osc-browser.js*/
var _osc = false,
_osc_timeout = null,
_osc_port,
_osc_ready = false,
_OSC_ENABLE = 0,
_OSC_DISABLE = 1,
_OSC_FRAME_DATA = 2;
var _disconnect = function () {
if (_osc_port) {
_osc_port.close();
... |
import { useRef, useState } from "react";
import { Link, Redirect } from "react-router-dom";
import { useAuth } from "../contexts/AuthContext";
import { useOrder } from "../contexts/OrderContext";
const Order = () => {
const { currentUser } = useAuth();
const { itemToOrder, orderInformation, setOrderInformatio... |
import { useNavigate } from 'react-router-dom'
import { useAuth, useStore, actions } from '../store'
import { convertWeiToEther } from '../helpers/helper'
import { ToastContainer, toast } from 'react-toastify'
import QRCode from 'react-qr-code'
import {
Avatar,
Card,
CardActions,
CardContent,
CardMedia,
Typograp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.