text
stringlengths
3.07k
16k
const url = 'https://football-teams-3e351.firebaseio.com/'; import elements from './htmlElements.js'; elements.loaded.singleBtn.addEventListener('click', loadSingle); elements.loaded.allBtn.addEventListener('click', loadAll); elements.create.btn.addEventListener('click', createRecord); elements.loaded.body.addEventLis...
import React from "react"; import Header from "./Header"; import JSONPreview from "./JSONPreview"; import FacebookPostPreview from "./FacebookPostPreview"; import InstagramPostPreview from "./InstagramPostPreview"; import axios from "axios"; // import FacebookLogin from "react-facebook-login"; import { FacebookLogin } ...
import React, { useEffect, useState, useContext } from "react"; import * as am4core from "@amcharts/amcharts4/core"; // import * as am4charts from "@amcharts/amcharts4/charts"; import * as am4maps from "@amcharts/amcharts4/maps"; import am4geodata_worldLow from "@amcharts/amcharts4-geodata/worldLow"; import am4themes_a...
"use strict"; var net = require('net'), colors = require('colors'), utils = require('./helper'), _ = require('lodash'), CLI_UNIX_SOCKET_FILE = "swamp_cli.sock", WAIT_FOR_SOCK_FILE_MAX_RETRIES = 10, WAIT_FOR_SOCK_FILE_INTERVAL = 100, END_DELIMITER = "[=!=SWAMP_DATA_END=!=]"; var conn = null...
import React from 'react'; // import Card from 'react-bootstrap/Card'; import allen from "../../assets/images/allenstone.jpg"; import alien from "../../assets/images/lifeform_background.jpg"; import blog from "../../assets/images/112373497-053d4900-8caf-11eb-9127-f38ffec41fe1.png"; import notes from "../../assets/imag...
$(document).ready(() => { const indexPage = new IndexPage(); indexPage.registerEventHandlers(); }); class IndexPage { constructor() { this.excludePictureIndexes = []; this.deletablePictureIds = []; } // イベントハンドラの追加 registerEventHandlers() { // 初期表示 this.refresh(); // 画像の追加(同じファイルを選択で...
$(document).ready(function () { getWeather(); // add a spinner icon to areas where data will be populated $('#condition').html('<i class="fa fa-spinner fa-pulse fa-3x"><\i>'); $('#wind-speed').html('<i class="fa fa-spinner fa-pulse fa-3x"><\i>'); }); // Array for autocomplete cities and their weather stations ...
import _ from 'lodash'; import React, {Component} from 'react'; import {StyleSheet, ScrollView} from 'react-native'; import {View, Button, Wizard, Text, RadioGroup, RadioButton, TextField, Toast} from 'react-native-ui-lib'; const flavors = ['Chocolate', 'Vanilla']; const initialFlavor = flavors[0]; const stepTypes = _...
var util = require('util'); // // Helpers // function noop() {} ANSI_COLORS = { pass: function() { return '\033[32m'; }, // Green fail: function() { return '\033[31m'; }, // Red neutral: function() { return '\033[0m'; } // Normal }, NO_COLORS = { pass: function() { return ''; }, fail: functio...
import React from 'react' import ReactTable from 'react-table' import Heading from '@instructure/ui-elements/lib/components/Heading' import Link from '@instructure/ui-elements/lib/components/Link' import List from '@instructure/ui-elements/lib/components/List' import ListItem from '@instructure/ui-elements/lib/compone...
"use strict"; 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 = Refl...
// Module Imports and instances const Discord = require("discord.js"); const client = new Discord.Client(); const fs = require("fs"); const fetch = require("node-fetch"); const jimp = require("jimp"); const sql = require("sqlite"); (async() => { await sql.open("./src/db.sqlite"); await sql.run("CREATE ...
var B2 = process.env.HWVERSION==2; var Layout = require("Layout"); var locale = require("locale"); var fontHeading = "6x8:2"; var fontValue = B2 ? "6x15:2" : "6x8:3"; var headingCol = "#888"; var running = false; var fixCount = 0; var startTime; var startSteps; // This & previous GPS readings var lastGPS, thisGPS; var ...
/** * @file * @copyright 2020 <NAME> * @license MIT */ import { classes, isFalsy, pureComponentHooks } from 'common/react'; import { createVNode } from 'inferno'; import { ChildFlags, VNodeFlags } from 'inferno-vnode-flags'; import { CSS_COLORS } from '../constants'; const UNIT_PX = 12; /** * Coverts our rem-li...
const toast = swal.mixin({ toast: true, position: 'top-right', showConfirmButton: false, timer: 3000 }); let myCheckbox = $("[name='switch-checkbox']"); let loading = $('.loading'); $(document).ready(function () { $('select').select2(); }); myCheckbox.bootstrapSwitch(); myCheckbox.on('switchCha...
var RTL$ = require("eberon/eberon_rtl.js"); var Errors = require("js/Errors.js"); var M = require("js/Module.js"); var Object$ = require("js/Object.js"); var Procedures = require("js/Procedure.js"); var Record = require("js/Record.js"); var ScopeBase = require("js/ScopeBase.js"); var String = require("js/String.js"); v...
title = "SCAFFOLD"; description = ` [Tap] Change angle [Hold] Scaffold `; characters = [ ` ll lll ll ll ll l `, ` llllll llllll `, ` l ll ll ll lll ll `, ` llllll ll l l ll l l llllll l l l l `, ` llllll ll l l ll l l llllll ll ...
const { performance } = require('universal-perf-hooks'); const FSM = require('./FSM'); const NFA = require('./NFA'); const NFAState = require('./NFAState'); const { convertToBasicOperators } = require('../utils'); const { EPSILONTOKEN } = require('./Lexer'); const { Lexer } = require('./Lexer'); const { TOKEN_TYPE } =...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GMap = void 0; var _react = _interopRequireWildcard(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; ...
import React, { useCallback, useEffect, useRef, useState } from 'react'; import Head from 'next/head'; import { Box, Button, Grid, Container, Table, TableBody, TableCell, TablePagination, TableContainer, TableRow, Typography, Dialog, DialogContent, DialogActions, Dial...
const errorAddEvent = require("../../../../important/AristosStuff/AristosLogger/AristosLogger") .addError; /* media model Queries */ const FindAllMedia = require("../../../../important/admin/adminModels/queries/media/FindAllMedia"); /* media categories Queries */ // const FindAllMediaCategories = require("../../../....
import adapter from '../src/AnalyticsAdapter'; import adapterManager from '../src/adapterManager'; import CONSTANTS from '../src/constants.json'; import * as utils from '../src/utils'; const { EVENTS: { BID_REQUESTED, BID_TIMEOUT, BID_RESPONSE, BID_WON } } = CONSTANTS; const prebidVersion = '$prebid.version$'; con...
import React, { Component } from "react"; import firebase from "firebase"; import { View, Text, StyleSheet, Image, TouchableOpacity } from "react-native"; import { ScrollView } from "react-native-gesture-handler"; import { widthPercentageToDP as wp, heightPercentageToDP as hp } from "react-native-responsive-screen"...
import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import { Main, NotAuthorized, PageHeader, PageHeaderTitle } from '@redhat-cloud-services/frontend-components'; import { Card, CardBody } from '@patternfly/react-core'; import {...
/* * Camera wrapper class */ 'use strict'; var Constants = require('Constants'); var Object3DUtil = require('geo/Object3DUtil'); var _ = require('util'); function Camera(fov, aspect, near, far) { THREE.PerspectiveCamera.call(this, fov, aspect, near, far); } Camera.prototype = Object.create(THREE.PerspectiveCamer...
// Get the pizza size price and add it to the running Total // then pass that running total to the next function so // the next function will add a particular total to the running total and so on... // // Keep doing this until you get all items added to the running total. // // Just remember that the syntax will...
{ "translatorID": "d93c14fb-d327-4540-b60a-327309ea512b", "label": "Journal of Electronic Publishing", "creator": "<NAME>", "target": "^https?://quod\\.lib\\.umich\\.edu/j/jep", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", "las...
var struct = require('./structure'); var vector = require('./vector'); var control = require('./control') var sketch = require('./sketch'); var Vec2 = vector.Vec2; function debugLog(team, message) { // TODO(michael): This only works on the client. Make it a no-op on the server var msg = "\n" + message; if (team ...
/*\ module-type: library This handles the fetching and distribution of relink settings. \*/ var settings = require('$:/plugins/flibbles/relink/js/settings.js'); var Widget = require("$:/core/modules/widgets/widget.js").widget; function MacroConfig(wiki, parent, title) { this.macros = Object.create(null); this.par...
const Mage = require("./Mage.js"); const fs = require("fs"); const path = require("path"); const request = require("request"); const Cleverbot = require("cleverbot-node"); const cbot = new Cleverbot(); exports.config = process.env; cbot.configure({botapi: this.config.CLEVERBOTKEY}); global.Mage = Mage; exports.autoGr...
import React, { useState } from 'react' import { graphql, StaticQuery } from 'gatsby' import styled from 'styled-components' import SEO from '@components/SEO' import Layout from '@components/Layout' import Section from '@components/Section' import Heading from '@components/Heading' import LayoutHeroMobile from '@compo...
var uploadFile = Backbone.Model.extend({ }); var File = Backbone.Model.extend({ methodUrl: { 'create': '/files/', 'delete': '/files/' }, initialize: function(file) { _.bindAll(this, 'links'); }, urlRoot: "/files/", // sync: function(method, model, options) { //...
/* eslint-disable no-continue */ const { Collection } = require('discord.js') const { convertDate } = require('../../util/util') module.exports = async (client, message) => { if ( message.author.bot || (message.guild && (message.guild.id !== client.config.guildID || !message.guild.available)) ) return if (me...
const todoHeader = { template: ` <header class="header"> <h1>todos</h1> <input class="new-todo" placeholder="What needs to be done?" autofocus v-model="todoName" @keyup.enter="addTodo"> </header> `, data() { return { todoName: '' } }, methods: { addTodo() { // 1. 非空校验 if(this.todoName.tr...
'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 ("val...
import * as dict from "./dict.js"; window.onload = typing_test($('#type-input'), $('#generated-text')); // Brain of the website. // Responsible for input handling and stats tracking. var int_id; function typing_test(input, output, active = false) { var generated_text = generate_text(300, dict.get()); var outpu...
/* * Functionality to display album show pages in lightbox */ import { createDiv, getData, mapElements } from './dom-helpers'; import { IMAGE_QUERY_STRING_KEY, setImageUrl, clearImageUrl } from './history'; const imageLinks = document.querySelectorAll('.post-thumbnails a'); const slideData = initializeSlideData(ima...
// Docs version 1.0.0 // declare module cf{ // // } // interface cf{ // ConversationalForm: any; // } // export type ConversationalForm = any; // interface ConversationalForm = any; // declare var ConversationalForm: any; var ConversationalForm = (function () { function ConversationalForm() { } return Co...
var SwordsSuit = { name : 'Swords', desc : 'Swords focus on the realm of the intellect. When associating swords with the air element, think of percussion, the clash of a blade, and the sound it makes as it slices through the air. Keywords are intellegince, logic, conflict', suit : 'Spades', element : 'a...
'use strict'; const { performance } = require('perf_hooks'); const tape = require('tape'); const { RTCVideoSink, RTCVideoSource } = require('..').nonstandard; const { fromBits, toBits } = require('./lib/bits'); const { I420Frame } = require('./lib/frame'); const { negotiateRTCPeerConnections } = require('./lib/pc');...
import React, { PureComponent } from 'react' import styled from 'styled-components' import { media } from 'style/containers' import colors from 'style/colors' import trans from '../../../../../../trans' import HalfColumn from '../../../../../../components/HalfColumn/index' import CardHeaderComponent from '@material-ui/...
import express from 'express'; const app = express(); import fs from 'fs'; import path from 'path'; import opn from 'opn'; import chalk from 'chalk'; import {resolveNodeModuleFile} from '../file/file.js'; import {readTestFileToObject} from '../test/format-tests.js'; import {writeGoldensManifest} from '../generate/gener...
let sections = []; let pages = []; const cards = []; let cardIndex = 0; const msalConfig = { auth: { clientId: "ba2f1a99-9e68-453e-a298-b21c86520911", authority: "https://login.microsoftonline.com/common" }, cache: { cacheLocation: "localStorage", storeAuthStateInCookie: tr...
import _ from "lodash"; import getVersion from "../../../version.js"; export { Application, ApplicationManager, ApplicationModel, determineUIStatus, getWarnings }; function Application(data) { for (var key of Object.keys(data)) { this[key] = data[key]; } } Application.prototype.actionsVisible = fals...
// TODO: Remove error logging and throw errors instead /* Exports: - getWinetricksPackages(callback) - getWineVersion(callback) - init(callback) - isWindowsPath(path) - processExiting(done) - spawn(command, args, options) - startServer(callback) - stopServer() - unixPath(paths, callback) - window...
import React, { PropTypes as T } from 'react' import ReactDOM from 'react-dom' import {Icon} from 'antd' import marked from 'marked' import cNames from 'classnames' import './editor.less' //asd const MdEditor = React.createClass({ propTypes: { content: T.string, children: T.node }, getInitialState () { ...
import React, { Component, PropTypes } from 'react'; import { getSelection, setSelection } from 'react/lib/ReactInputSelection'; import StringMask from './StringMask'; const SLOW_MODE_DELAY = 20; const keys = { BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, ...
import React, { useState } from "react"; import { useHistory } from "react-router"; import Input from "@material-ui/core/Input"; import InputAdornment from "@material-ui/core/InputAdornment"; import SearchIcon from "@material-ui/icons/Search"; import SubjectIcon from "@material-ui/icons/Subject"; import ScheduleIcon fr...
var max = 0; var isInsert = false; var isAdmin = true; var userid = 0; var cardno = 0; var transno = 0; $(document).ready(function () { // load home.php as default $.get("menus/home.php", function (data) { $('#page-wrapper').html(data); }); //check if this user is admin or not $.ajax({ ...
import { SETUP_FANTASY_DRAFTROOM, INCREMENT_DRAFT, START_DRAFT, PAUSE_DRAFT, GET_ALL_PLAYERS, DRAFT_PLAYER, DRAFT_KEEPER, END_DRAFT, UPDATE_TEAM_NAME, TOGGLE_AUTOPICK, UPDATE_KEEPER, UPDATE_KEEPER_ROUND, UPDATE_KEEPERS, } from '../types'; import getPickNum from '../../utils/getPickNum'; const...
/** * index.js * - All our useful JS goes here, awesome! */ var start; var totaltime = 0; var myArray = []; var mic = 0; var problemText = ""; var module; // Show an element var show = function(elem) { elem.style.display = "block"; }; // Hide an element var hide = function(elem) { elem.style.display = "none"; ...
import React from 'react'; import ReactDOM from 'react-dom'; import { Cmd, Sub } from '../lib'; import { pair, MatchResult } from '../lib/fp'; import * as Random from '../lib/random'; import * as Http from '../lib/http'; import * as Time from '../lib/time'; import * as Websocket from '../lib/websocket'; import { Realm...
const globby = require('globby') const path = require('path') const fs = require('fs') const prettierx = require('prettierx') const lintStaged = require('lint-staged') const { createIgnorer, isSupportedExtension, getOptions, getScm, getRanges, getPathInHostNodeModules, createMatcher } = require('./utils')...
import React, { Component } from 'react'; import SettingsStyles from '../../styles/Settings'; import { View, Text, TouchableOpacity, ScrollView, Image, Alert } from 'react-native'; import { Overlay, } from 'react-native-elements'; import Toast from 'react-native-root-toast'; import Default...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Button, Modal, Form, InputGroup, Col, Row} from 'react-bootstrap' import { dbRacesToPaddlers } from '../../Firebase'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { addPaddlerToRace, updateRace } from '...
//import Vue from 'vue' //import Router from 'vue-router' import routes from './routers' import store from '@/store' import { LoadingBar, Spin } from 'iview' import { setToken, getToken, getHid, canTurnTo } from '@/libs/util' import config from '@/config' const { homeName } = config Vue.use(VueRouter) const router = n...
import React, { useRef, useState, useEffect } from 'react' import { useEventListener } from '@/hooks' import './index.scss' // 滑动输入条组件,在播放页面有使用 const Slider = props => { const { min = 0, // 最小值 max = 100, // 最大值 step = 1, // 步长,需要能被max-min整除 value = 0, // 相对min和max的当前值,比如max为歌曲总时长s,那么value就可以设为歌曲的当前时...
import { base_url } from './consts.js'; import { call } from './consts.js'; import {getProfile} from './apiPersonal.js'; const $cartList = document.querySelector('.cart__list'); const $cartTotal = document.querySelector('.cart__total__text'); const $payModal = document.querySelector('.js-pModal'); const $closePayModal ...
import React, { useState, useEffect, useContext } from 'react'; import axios from 'axios'; import { useHistory, useParams } from 'react-router-dom'; import useProtectedRoute from '../Hooks/useProtectedRoute'; import Menu from '../Components/Menu/index' import Loading from '../Components/Loading/index' import CarrinhoC...
// Le réseau de neurones que j'ai fait pour codingame // ( https://www.codingame.com/training/hard/binary-neural-network---part-1 et https://www.codingame.com/training/expert/binary-neural-network---part-2 ) // pas du tout optimisé, ni pratique, mais il marche // vaguement modifié pour l'occasion (initialisation des po...
import React from 'react' import Layout from 'components/layout' import SEO from 'components/seo' import SiteTitle from 'components/siteTitle' import Content from 'components/content' import Form from 'components/form' import Input from 'components/input' import { request, serialize } from 'utils' import AjaxButton fr...
'use strict'; /* Modules import */ const gulp = require('gulp'); const path = require('path'); const del = require('del'); const argv = require('minimist')(process.argv.slice(2)); const sass = require('gulp-sass'); const ts = require('gulp-typescript'); const imagemin = require('gulp-imagemin'); const browserSync = ...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Redirect } from 'react-router-dom'; import Form from '../../components/UI/Form/Form'; import Spinner from '../../components/UI/Spinner/Spinner'; import * as inputUtils from '../../components/UI/Input/utils'; import { inputSubTyp...
import path from 'path'; import * as cheerio from 'cheerio'; import beautify from 'js-beautify'; import { assetResolve } from '@chialab/node-resolve'; import { useRna } from '@chialab/esbuild-rna'; /** * @typedef {import('esbuild').Metafile} Metafile */ /** * Cheerio esm support is unstable for some Node versions....
'use strict'; /** this module provides functions for reading and writing local files, as well as functions for preparing data that is about to be written */ // Node.js built-ins const path = require('path'); // foreign modules const findReferences = require('@blinkmobile/json-as-files').findReferences; const pify ...
/* eslint no-nested-ternary: 0 */ /* eslint no-confusing-arrow: 0 */ /* eslint no-mixed-operators: 0 */ /* eslint no-plusplus: 0 */ /* eslint max-len: 0 */ import hypercubeGenerator from './hypercube-generator'; const cities = ['Copenhagen', 'Malmo', 'Lund', 'Helsingborg', 'Barcelona', 'Berlin', 'Amsterdam', 'Prag', ...
var v0 = (function (){ return ({foo : "bar"}); }); (v0.CreateAndShow) = (function (v1, v2, v3){ var v4 = new v0(v1); v4.show(v2, v3); return v4; }); (function (){ (this.stepBackward) = (function (){ (this.$tokenIndex) -= 1; while((this.$tokenIndex) < (0)){ (this.$row) -= 1; if((this.$row) < (0)){ (this.$row) = 0; retur...
import React from "react"; import Modal from 'react-modal'; import {Icon} from "antd"; import GeneralizeManageStore from "../../../../mobx/generalizeSupport/generalize-manage-store"; import {observer} from "mobx-react"; import HintAlert from "../../../common/HintAlert"; import Client from "../../../../common/lead-api";...
function owlCaro() { $("#owl-demo").owlCarousel({ autoPlay: 3000, //Set AutoPlay to 3 seconds items :5, itemsDesktop : [640,5], itemsDesktopSmall : [414,2], navigation : true }); } $(document).ready(function() { const init = { method: 'GET', cache: 'default' }; fetch('https://api.openw...
import React, { Component, PropTypes } from 'react' import ReactDOM from 'react-dom' import moment from 'moment' import $ from 'jquery' import regularStyles from './geschaeft.css' import pdfStyles from './geschaeftPdf.css' import isDateField from '../../src/isDateField' import validateDate from '../../src/validateDate'...
const {BillyRonk} = require('./Mtn'); const {insertData} = require('./insertData'); const path = require("path"); const {pool} = require('../../startup/mySql') const {convertToNaira, getMinutes, getVAT} = require('../helper'); const { MTNCHARGEAMOUNTS, FIVEHUNDRED, THREEM, TENM, ...
var Changeset = require("ep_etherpad-lite/static/js/Changeset"); /* * Translates epl operations to XML * @param apool * @param dropAttributes attributes to be ignored * @param commentCollector collects referenced comments * */ var OperationsToXmlTranslator = function(apool, dropAttributes, commentCollector, seri...
"use strict"; var Distribution = function(vectors) { /* * Class Distribution * Wrapper for a Fisherian distribution */ // Save the passed vectors (Pole or Direction) this.vectors = vectors; this.mean = this.meanDirection(); // Fisher parameters this.R = this.mean.length; this.N = vectors.len...
/* eslint-disable no-shadow */ /* eslint-disable react/prop-types */ // import libraries import React, {useRef, useState} from 'react'; import { Text, View, Modal, Image, FlatList, Platform, StyleSheet, TouchableOpacity, I18nManager, TextInput, } from 'react-native'; import FloatingLabel from './Tex...
const fetch = require('node-fetch'); const dateFormat = require('dateformat'); const redis = require('redis'); const { promisify } = require('util'); const { Op } = require('sequelize'); const models = require('../models'); const redisClient = redis.createClient(process.env.REDIS_URL || null); const get = promisify(r...
var path = require('path'); var fs = require('fs'); var settings = require(path.join(__dirname, '../settings.js')); Function.prototype.clone = function () { return this.bind({ ...this }); }; module.exports.isFile = (pathItem) => { var ext = path.extname(pathItem); if (ext === settings.SERIES_EXTENSION ||...
import React, {Component} from 'react'; import PropTypes from 'prop-types'; import transitions from '../styles/transitions'; function getStyles(props, context, state) { const {datePicker} = context.muiTheme; const {selectedYear} = state; const isLandscape = props.mode === 'landscape'; const styles = { roo...
import React, { Component, PropTypes } from 'react'; import styles from '../Chat.css'; import ToggleDisplay from '../utils/ToggleDisplay'; import convertMedia from '../utils/convertMedia'; import MdMic from 'react-icons/lib/md/mic'; import MdMessage from 'react-icons/lib/md/message'; import MdOndemandVideo from 'react-...
//Including independent module source code for packaging const ablBook = require('./activity/activity-book.js'); import RxJS from 'rx'; const jQuery = window.jQuery; import feathers from 'feathers-client'; import localstorage from 'feathers-localstorage'; import feathersRx from 'feathers-reactive'; import superagent ...
$(document).on('submit', '.medicineform', function(e){ var barcode = $('.barcodeinput').val(); e.preventDefault(); var d = new Date(); var month = d.getMonth()+1; var day = d.getDate(); var today = d.getFullYear() + '-' + (month<10 ? '0' : '') + month + '-' + (day<10 ? '0' : '') + day; $.post(baseU...
import path from 'path' import defu from 'defu' import tailwindConfig from './tailwind.config' const domain = process.env.BASE_URL.match(/^https?:\/{2,}(.*?)(?:\/|\?|#|$)/)[1] const defaultConfig = (docsOptions) => ({ target: 'static', ssr: true, srcDir: __dirname, privateRuntimeConfig: { githubToken: pr...
import React from 'react'; import {withStyles} from '@material-ui/core/styles'; import { MuiThemeProvider } 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 ColorPicker from '@iobroker/adapter-rea...
var api = { console: { autoLoad: false} }; var express = require('express'), router = api.router = express.Router(), docRouter = require('docrouter').docRouter; module.exports = api; docRouter(router, '/api/someplugin', function(router) { router.get('/json/:tparam1/:tparam2', function(req, res) { ...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { ClipLoader } from 'react-spinners'; import classNames from 'classnames'; import { loadPackages } from '../utils'; import { Loader, HeaderNavigation, MainHeader, SearchForm, MovieGridItem, Pagination } from '../components'...
const AWS = require("aws-sdk"); const dynamoDB = new AWS.DynamoDB.DocumentClient({ region: process.env.DYNAMODB_REGION, }); // 日付フォーマット function formatDate(date, format) { format = format.replace(/yyyy/g, date.getFullYear()); format = format.replace(/MM/g, ("0" + (date.getMonth() + 1)).slice(-2)); format = for...
import React from 'react'; import { Link } from "gatsby" import { useState, useEffect } from "react" import clsx from 'clsx'; import { makeStyles, withStyles } from '@material-ui/core/styles'; import SwipeableDrawer from '@material-ui/core/SwipeableDrawer'; import Drawer from '@material-ui/core/Drawer'; import Button f...
// --- Confirm window --- function myModal(id, paramPamPam) { $('#myModal').modal('show'); $('#YesButton').off('click'); $('#YesButton').on('click', function(){ $('#'+id).submit(); }); $("#myModal .modal-body").text(paramPamPam); } // --- Ajax in add_book and home (find text in input) --- ...
class Book { constructor(isbn, bookName, authorName, publisherName, publishYear, pages, description, website) { this.isbn = isbn; this.bookName = bookName; this.authorName = authorName; this.publisherName = publisherName; this.publishYear = publishYear; this.p...
const flatten = arr => [].concat(...arr); const {isArray} = Array; const notFound = -1; const tokensAsMillitokens = tokens => BigInt(tokens) * BigInt(1e3); const uniq = arr => Array.from(new Set(arr)); /** Calculate multi-probe ignore adjustments Treat all hops except the first as already used, so as not to overlap...
/* * @project: TERA * @version: Development (beta) * @license: MIT (not for evil) * @copyright: <NAME> (Vtools) 2017-2020 [<EMAIL>] * Web: https://terafoundation.org * Twitter: https://twitter.com/terafoundation * Telegram: https://t.me/terafoundation */ global.PROCESS_NAME = "CONVERT"; const crypto = requir...
import Marker, { joinMarks } from './marker'; import queryFunc from './query'; import sanitize from './sanitize'; function mergeFound(founds) { const result = founds[0]; founds.slice(1).forEach(found => { found.forEach((x, i) => x.forEach(y => result[i].push(y))); }); return result; } function check(found) ...
/** * Tencent is pleased to support the open source community by making Tars available. * * Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. * * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except * in compliance with the License. You may obtain a c...
/** * @file Provides a simple template resolver, that replaces variables in double curly brackets with the values of a given object. * @version {@link https://github.com/JohT/data-restructor-js/releases/latest latest version} * @author JohT * @version ${project.version} */ "use strict"; var module = templateResolv...
import { Layout } from './layout'; function easeQuadratic(t) { return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t; } function easeCubic(t) { return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1; } function easeInCubic(t) { return t * t * t; } function easeOutCubic(t) { return (--t) ...
var MAX_CYCLES = 3; var currentCycle = 0; // 请求函数 var request = (functionId, body = {}) => fetch("https://api.m.jd.com/client.action", { body: `functionId=${functionId}&body=${JSON.stringify( body )}&client=wh5&clientVersion=1.0.0`, headers: { "content-type": "applic...
'use strict'; var common = require('../common/controller'); var script = require('../common/scriptController'); var libertyCtrl = require('./libertyController'); var calibrus = require('../calibrus/calibrusController'); var portalCtrl = require('../common/portalController'); var libertyConfig = require('./config') // v...
import * as React from 'react'; import { StyleSheet, View, Image, TouchableOpacity, Dimensions, ImageBackground } from 'react-native'; // import Text from "../constants/Text" import Colors from "../constants/Colors" import { Text, Icon } from 'galio-framework'; import { useNavigation } from '@react-navigation/native'; ...
const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; const Cr = Components.results; Cu.import('resource://gre/modules/CSPUtils.jsm'); Cu.import("resource://testing-common/httpd.js"); var httpserv = null; const POLICY_FROM_URI = "allow 'self'; img-src *"; const POLICY_PORT = ...
import React, { Component } from "react"; import SimpleStorageContract from "./contracts/SimpleStorage.json"; import getWeb3 from "./getWeb3"; import "./App.css"; import { TODO_LIST_ABI, TODO_LIST_ADDRESS } from './config'; class App extends React.Component { constructor(props){ super(props) this...
/* * Before you run this command, be sure the Mongo container is up and running. * * The purpose of this script is to update a pre-0.3.9 Unfetter database to 0.3.9. */ const mongoose = require('mongoose'); const argv = require('./cli.service').argv; /** * Required schemas for this update. */ const UserSchema =...