text stringlengths 3.07k 16k |
|---|
import Phaser from "phaser";
import colours from '../../shared/assets/colours'
import caravanSprite from '../../game/assets/caravan_above.png'
import carSprite from '../../game/assets/car_above.png'
import bushSprite from '../../game/assets/bush.png';
const calculateVelocity = (angle, distance) => {
const radians =... |
/// <reference types="cypress" />
describe("Reset Project No Auth", () => {
beforeEach(() => {
cy.goToStart();
fillProjectInfo(projectInfo);
cy.goToNextPage(); // Go to Page 2
fillProjectSpecifications(specs);
});
it("from spec page", () => {
resetProjectAndTest(checkProjectIsEmpty);
});
... |
/* [MS-OLEPS] v20130118 */
/* [MS-OSHARED] v20130211 */
/* [MS-OLEPS] 2.2 PropertyType */
{
var VT_EMPTY = 0x0000;
var VT_NULL = 0x0001;
var VT_I2 = 0x0002;
var VT_I4 = 0x0003;
var VT_R4 = 0x0004;
var VT_R8 = 0x0005;
var VT_CY = 0x0006;
var VT_DATE = 0x0007;
var VT_BST... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }... |
import React, { Component } from 'react';
import { withTranslation } from 'react-i18next';
import LabelInput from '../common/LabelInput';
import ResetButton from '../common/ResetButton';
class Hedge extends Component {
constructor(props) {
super(props);
this.state = {
ogBet: '',
... |
var express = require('express'),
fs = require('fs'),
path = require('path'),
request = require('request'),
ipfsAPI = require('ipfs-api'),
dns = require('dns'),
url = require('url'),
mime = require('mime-types'),
common;
var metahub_srv = "bokeh-metahub.service.consul."
var photohub_srv = "bokeh-photohub-4001.service... |
const { AbiCoder } = require('web3-eth-abi');
const BN = require('bn.js');
const { GeneratorParams, FieldVector, Convolver } = require('../algebra.js');
const bn128 = require('../../utils/bn128.js');
const utils = require('../../utils/utils.js');
class AnonProof {
constructor() {
this.serialize = () => {
... |
/* eslint-disable dot-notation */
/* eslint-disable quote-props */
/* eslint-disable max-len */
/* eslint-disable radix */
const validator = require('validator');
const axios = require('axios');
const crypto = require('crypto');
const Offer = require('../../models/Offer');
const locationUtils = require('../../utils/lo... |
const { remote, ipcRenderer } = require('electron');
const fs = require('fs');
const button_evaluate = document.getElementById('button_evaluate');
const button_cancel = document.getElementById('button_cancel');
// JSON variable
var last_season = null;
var players = null;
//////////////////////////////////////////... |
/*
* Copyright 2015-2018 <NAME>, <NAME>, <NAME>, <NAME>
*
* This file is part of WepSIM.
*
* WepSIM 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 Lice... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var CacheCollection_1 = require("../abstract/CacheCollection");
var IteratorBuilder_1 = require("../iterators/IteratorBuilder");
var LinkedMap_1 = require("../linked-map/LinkedMap");
var LRUMap_1 = require("../l... |
function getRequest (url) {
return new Promise((resolve, reject) => {
let xhttp = new XMLHttpRequest();
xhttp.open('GET', url, true);
xhttp.responseType = 'json';
xhttp.onreadystatechange = () => {
if (xhttp.readyState == 4 ) {
if ( xhttp.status == 200) {
... |
import React, { useState } from 'react'
import {
KeyboardAvoidingView,
StyleSheet,
Text,
View,
ScrollView,
TouchableOpacity
} from 'react-native'
import Icon from '@expo/vector-icons/FontAwesome5'
import { InputArea, InputSelect, Button } from '../components'
import types from '../utils/constants/types.json... |
var gulp = require("gulp"),
rimraf = require('rimraf'),
newer = require('gulp-newer'),
babel = require("gulp-babel"),
webpack = require('webpack-stream'),
sourcemaps = require('gulp-sourcemaps'),
less = require('gulp-less'),
minifyCss = require('gulp-minify-css'),
imagemin = require('gu... |
import React from 'react';
import styled, { css } from 'styled-components';
import { Link, useLocation } from 'react-router-dom';
const StyledBuilderMenu = styled.nav(
({ theme }) => css`
display: flex;
justify-content: space-between;
height: ${theme.builder.menu.height};
background-color: ${theme.bu... |
import Component from "@ember/component";
import { scheduleOnce } from "@ember/runloop";
import discourseDebounce from "discourse-common/lib/debounce";
import { iconHTML } from "discourse-common/lib/icon-library";
import { withPluginApi } from "discourse/lib/plugin-api";
import { emojiUnescape } from "discourse/lib/tex... |
import React from 'react';
import Axios from 'axios';
import shortid from 'shortid';
import { server } from '../../../../config';
class AddPaper extends React.Component {
state = {
numberques: 2,
page: 'basic',
questions: ['Gravitation', 'Gravitation'],
class: 7,
subject: 'Physics',
... |
// Alex - - JS
//String Maker by Alex. Email: <EMAIL>
// Jan 05, 2019
'use strict';
$(".txtParam").on("paste", function (e) {
pasteText(e)
});
// Insert img to txtCodeArea
function pasteHtmlAtCaret(html) {
var sel, range;
if (window.getSelection) {
// IE9 and non-IE
sel = ... |
// @flow
'use strict'
var formats = require('format-message-formats')
var lookupClosestLocale = require('lookup-closest-locale')
var plurals = require('./plurals')
/*::
import type {
AST,
SubMessages
} from '../format-message-parse'
type Locale = string
type Locales = Locale | Locale[]
type Placeholder = any[] // ... |
global.__base = __dirname + '/';
var
use_https = true,
argv = require('minimist')(process.argv.slice(2)),
https = require('https'),
fs = require('fs'),
app = require('express')(),
_ = require('lodash'),
parser = require('xmldom').... |
import {useEffect, useState} from 'react';
import {useParams, useHistory} from 'react-router-dom';
import axios from 'axios';
import {Row, Col, Button, Tabs, Typography, Spin, Modal, Drawer, Tag} from 'antd';
import {
QuestionCircleOutlined,
ReloadOutlined,
CheckCircleOutlined,
WarningOutlined,
SettingFilled,... |
import React, {PropTypes} from 'react';
import PageWrapper from '../layouts/PageWrapper'
import Loading from '../../components/Loading.react'
import FileInput from 'react-file-input'
import { findDOMNode } from 'react-dom'
let initialModel = {
name: '',
team: '',
goal: 0
}
export default class AddTeamPlayerView... |
const commando = require('discord.js-commando');
class CraftCommand extends commando.Command {
constructor(client){
super (client, {
name: 'craft',
group: 'rust',
memberName: 'craft',
description: 'Displays the current amount of players playing Rust.'
... |
"use strict";
//List of species and their number of villagers.
var species = { "Alligator": 7, "Anteater": 7, "Bear": 15, "Bird": 13, "Bull": 6, "Cat": 23, "Chicken": 9, "Cow": 4, "Cub": 16, "Deer": 10, "Dog": 16, "Duck": 17, "Eagle": 9, "Elephant": 11, "Frog": 18, "Goat": 8, "Gorilla": 9, "Hamster": 8, "Hippo": 7, "H... |
import React from 'react'
import { StyleSheet, Text, View, ImageBackground, TextInput, Image, TouchableOpacity, Dimensions, TouchableWithoutFeedback, Keyboard, ScrollView } from 'react-native'
import { Button } from 'react-native-elements'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'... |
const zlib = require('zlib');
const iconv = require("iconv-lite");
const Config = require('./config');
const Inc = require('./inc');
let CharacterSetPriority = Config.characterSet.priority;
let CharacterSetDefault = Config.characterSet.default;
let IncCharacterSetPriority = Inc.config.characterSet.priority;
... |
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {Field, formValueSelector} from 'redux-form';
import {html} from 'components';
import './ModelRelationsArrayField.less';
const bem = html.bem('ModelRelationsArrayField');
class ModelRelationsArrayField extends ... |
/*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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.... |
const {Text} = require('./Text');
const {Comment} = require('./Comment');
const {RenderNode} = require('./RenderNode');
const selfClosingTags = require("./utils/selfClosingTags.json");
const {customAttributesRegistry} = require("./default-attributes/CustomAttributesRegistry");
const {customTagsRegistry} = require("./de... |
// Use this link to get the GeoJSON data.
var queryUrl = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.geojson";
var boundariesUrl = "./static/data/PB2002_boundaries.json";
var orogeniesURL = "./static/data/PB2002_orogens.json"
// Create three layerGroups
var earthquake = L.layerGroup();
var plat... |
/* eslint no-underscore-dangle: 0 */
/* eslint no-shadow: 0 */
/* eslint camelcase: 0 */
import defaultStyle from "./defaultStyle";
import StoryLayer from "./StoryLayer";
function StoryMap(data) {
ol.Object.call(this, data);
this.map_ = new ol.Map({
target: data.target,
pixelRatio: 1,
controls: ol.co... |
import React from "react";
import styled from "styled-components";
import Modal_Post from "../elements/Modal_Post";
import { useHistory } from "react-router-dom";
import { useDispatch, useSelector } from "react-redux";
import axios from "axios";
import { actionCreators as postActions } from "../redux/modules/post";
co... |
// The exploration parameter in the Upper Confidence Bound (UCB) algorithm.
// Theoretically it equals to √2, but in practice usually chosen empirically.
const EXPLORATION = 1.4142135623730950488016887242097 // √2
// A node in the m.c. tree
// player: indicate which player's turn it is
// - player == -1 => 'X'
// ... |
"use strict";
let outerIndex=[]
// const CartI = function (name, price, type, path) {
// this.name = name;
// this.price = price;
// this.type = type;
// this.path = path;
// CartI.allProducts.push(this);
// };
// CartI.allProducts = [];
// new CartI("flower1", 15, "lowers", "../assets/accessories/accssories1... |
import Chart from 'chart.js';
Chart.defaults.global.defaultFontColor = 'rgb(20, 33, 61)';
let startupName = '';
let mainScores = [];
let catScores = [];
const ASPECTS = [
'Desirability',
'Financial Feasibility',
'Ambition & Presentation',
'Competition',
];
const buildRadarChart = (userData) => {
const can... |
class Z8_KEYBOARD_STATE {
constructor() {
this.p = [];
for(var i = 0; i < 10; i++) {
this.p.push(0);
}
this.p[0] = 0; // 1 2 3 4 5 6
this.p[1] = 0; // 7 8 9 0 - =
this.p[2] = 0; // Q W E R T Y
this.p[3] = 0; // U I O P [ ]
... |
const fs = require("fs");
const path = require("path");
const {
fetchHerePagination,
promiseFile,
writeStoresCategoriesToFile,
writeStoresToFile
} = require("./storesFunctions.js");
const { promiseFileNew } = require("../categories/categoryFunctions.js");
const { setTimeStore, setTime } = require("../misc/co... |
"use strict";
(function ($) {
"use strict";
pagepiling();
swiperSlider();
headerMenu();
videoPlayer();
labelAnim();
loader();
imageMoving();
sectionScrollbar();
sendForm();
heroParalax();
imageView();
headerFixed();
})();
/* Function for loader */
function loader() {
$(window).on('load',... |
// 实例1 基本使用示例
var picker1 = new myPicker({
cols: ['java', 'c#', 'JavaScript', 'php', 'Python'],
title: "请选择你喜欢的编程语言",
onOkClick: function (values) {
document.querySelector('#example1').textContent = (values[0]);
},
})
document.querySelector('#example1').addEventListener('click', function () {
... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ThreadID = exports.Variant = void 0;
const sync_randombytes_1 = __importDefault(require("@consen... |
import React, {useState, useEffect} from 'react';
import "../static/css/experiment.css";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faAngry } from '@fortawesome/free-solid-svg-icons';
import { faDizzy } from '@fortawesome/free-solid-svg-icons';
import { faSmile } from '@fortawesome/free... |
var applepayMobile;
var applepayDesktop;
var applepayButton;
var showApplePayButton = function () {
applepayButton.addClass("visible");
var ua = navigator.userAgent;
if (ua.match(/iPhone/i) || ua.match(/iPad/i) || ua.match(/iPod/i) || ua.match(/Android/i) || ua.match(/BlackBerry/i) || ua.match(/symbianos/... |
function fanLevelToHK(value, fanLevels) {
if (value === 'AUTO')
return 0
fanLevels = fanLevels.filter(level => level !== 'AUTO')
const totalLevels = fanLevels.length
const valueIndex = fanLevels.indexOf(value) + 1
return Math.round(100 * valueIndex / totalLevels)
}
function HKToFanLevel(value, fanLevels) {
l... |
import React, { Component } from 'react';
import { View, Text, Image, TouchableWithoutFeedback, AsyncStorage } from 'react-native';
import { Actions } from 'react-native-router-flux';
import { Spinner } from './common';
import {
BTC, ETH, ETC, LISK, FACT, AUGUR, RIPPLE, NEM, LTC, BC
} from '../constants/CoinTypes';... |
import { EOL } from 'os';
import crypto from 'crypto';
import { promisify } from 'util';
const Command = Jymfony.Component.Console.Command.Command;
const InputArgument = Jymfony.Component.Console.Input.InputArgument;
const InputOption = Jymfony.Component.Console.Input.InputOption;
const QuestionBuilder = Jymfony.Compo... |
$(function() {
//立即结算按钮
$("#submit-order").click(function() {
location.assign('checkout.html?total='+$(".money-num").text());
});
$('#checkout').click(function(){
location.assign('checkout.html?total='+ $('#payMoneyTxt').text());
});
shop.api.fetchCart(function(response){
console.log(resp... |
const { createMachine, interpret, assign } = require("@xstate/fsm");
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const minHoldTime = 2500; // milliseconds
const checkDelay = 500; // milliseconds, defaults to 500ms or minHoldTime/2 if minHoldTime < 500
const minWaitTime = 1; // seconds
con... |
import React from 'react'
import propTypes from 'prop-types'
import styled from '@emotion/styled'
import { Heading, Preface } from '@open-tender/components'
import { CardButton, CardButtons, CardImage } from '../..'
import MenuItemDetails from './MenuItemDetails'
import MenuItemAllergens from './MenuItemAllergens'
co... |
/**
* Created by HK on 10/23/2016.
*/
var getQueryString = function ( field, url ) {
var href = url ? url : window.location.href;
var reg = new RegExp( '[?&]' + field + '=([^&#]*)', 'i' );
var string = reg.exec(href);
return string ? string[1] : null;
};
var Client = function(nes) {
var socket;
... |
import "uikit/dist/css/uikit.css";
import "../css/popup.css";
import "../css/option.css";
import Text from "./view/Text";
import VerticalList from "./view/VerticalList";
import ColorAvatar from "./view/ColorAvatar";
import Button from "./view/Button";
import HorizontalList from "./view/HorizontalList";
import Model f... |
// Copyright 2020 Breakside Inc.
//
// Licensed under the Breakside Public License, Version 1.0 (the "License");
// you may not use this file except in compliance with the License.
// If a copy of the License was not distributed with this file, you may
// obtain a copy at
//
// http://breakside.io/licenses/LICENSE-... |
import { useEffect, useState } from 'react'
import { TrustedBy } from '../components/trustedByLogos'
import fs from 'fs'
import { calculateStats } from '../lib/statsUtils'
import Img from '../components/cloudflareImage'
import { API } from '../lib/api'
import Loading from '../components/loading'
import bytes from 'byte... |
function mkParser(lang) {
return {
startState: startStateFn,
copyState: copyStateFn,
token: produceTokenFunction(lang),
languageData: {
commentTokens: {line: "#", block: {open: "/*", close: "*/"}}
}
}
}
export const mscgen = mkParser({
"keywords" : ["msc"],
"options" : ["hscale", "wid... |
// Copyright (c) 2020, Battelle Memorial Institute
// All rights reserved.
// 1. Battelle Memorial Institute (hereinafter Battelle) hereby grants
// permission to any person or entity lawfully obtaining a copy of this
// software and associated documentation files (hereinafter "the Software")
// to redist... |
$(document).ready(function() {
let modalBtn = document.getElementById("modal-btn")
let modal = document.querySelector(".modal")
let closeBtn = document.querySelector(".close-btn")
modalBtn.onclick = function(){
modal.style.display = "block"
}
closeBtn.onclick = function(){
modal.style.di... |
import React, { Component } from "react";
import API from "../utils/API";
import Cookies from "js-cookie";
import "../index.css";
import { Background } from "../components/Basics";
import Navigation from "../components/Navigation";
import { Box, ProfileBox, NGOBox, EmployeeBox } from "../components/Box";
import { Title... |
import React, { Component } from 'react'
import { GC_USER_ID } from '../constants'
import { timeDifferenceForDate } from '../utils'
import { graphql } from 'react-apollo'
import gql from 'graphql-tag'
import { Switch, Route, Redirect } from 'react-router-dom'
import { withRouter } from 'react-router'
import { Link } fr... |
import { useState, useRef } from 'react';
import PropTypes from 'prop-types';
import { v4 as uuidv4 } from 'uuid';
import {
Box,
Button,
Drawer,
DrawerBody,
DrawerFooter,
DrawerHeader,
DrawerOverlay,
DrawerContent,
DrawerCloseButton,
useDisclosure,
Center,
Divider,
IconButton,
Heading,
Alert,
AlertIcon,... |
"use strict";
/**
* THIS VERSION IS DEPRECATED. USE `RumbleshipBeeline` and its associated Factory instead!
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.RFIBeeline = exports.HoneycombBeelineFactory = void 0;
class HoneycombBeelineFactory {
// private static tracker: Tracker;
/**
... |
import _pt from "prop-types";
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _exten... |
/**
* @license Copyright 2019 <NAME> All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed... |
import React, { Fragment } from "react";
import PropTypes from "prop-types";
import classNames from "classnames";
import { withStyles } from "@material-ui/core/styles";
import Paper from "@material-ui/core/Paper";
import Typography from "@material-ui/core/Typography";
import Title from "./Title";
import KeywordsList ... |
// Evolutility-UI-React :: toolbar.js
// Toolbar w/ icons for CRUD, export, and charts.
// https://github.com/evoluteur/evolutility-ui-react
// (c) 2017 <NAME>
import React from 'react'
import axios from 'axios'
import { browserHistory, Link } from 'react-router'
import Modal from 'react-modal'
import evoGlobals f... |
// code that runs in the configuration web page
var ConfigData = {};
$().ready(init);
function clearLog()
{
$('#logger').html('');
} // clearLog
function logger(str)
{
console.log('Config.js: ' + str);
} // logger
function init()
{
logger('init start');
$('#b-cancel').click(cancelForm);
$('#b-submit').c... |
// This Component is Skeleton of React Structure for Web Development
// If you want to make other Component, Copy and Refactor this Component.
import React, { Component } from "react";
import cx from "classnames";
import moment from "moment";
import NumericLabel from "react-pretty-numbers";
import { Thumb, Comment } f... |
import game_1800 from "./1800";
import game_1817 from "./1817";
import game_1825 from "./1825";
import game_1825U1 from "./1825-U1";
import game_1825U2 from "./1825-U2";
import game_1825U3 from "./1825-U3";
import game_1825K1 from "./1825-K1";
import game_1825K3 from "./1825-K3";
import game_1825K5 from "./1825-K5";
im... |
import Vue from 'vue'
import VueRouter from 'vue-router'
import store from '../store/index.js'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
Vue.use(VueRouter)
const routes = [
{
path: '/',
component:() => import(/* webpackChunkName:"index" */'../views/Index.vue'),
meta:{title:'博客首页'... |
import React, { useRef, useEffect, useContext, useState, useCallback } from "react";
import PropTypes from "prop-types";
import MapContext from "../../contexts/MapContext";
import { v4 as uuidv4 } from "uuid";
import useMapState from "../../hooks/useMapState";
const getCurrentUrlParameters = () => {
let currentPara... |
// Variables del cuadrado
//Código del cuadrado
console.group('Cuadrados');
// const ladoCuadrado = 5;
// console.log(`Los lados del cuadrado miden: ${ladoCuadrado} cm`);
function perimetroCuadrado(lado) {
return lado * 4;
}
// console.log(`El perímetro del cuadrado es: ${perimetroCuadrado} cm`);
... |
import hasher from 'node-object-hash';
import get from 'lodash.get';
import set from 'lodash.set';
import { createStore } from '@ezs/store';
const hashCoerce = hasher({
sort: false,
coerce: true,
});
// https://gist.github.com/RedBeard0531/1886960
const calculating = (values) => {
const a = values[0]; // ... |
const formulario = document.getElementById("nueva-cita");
const mascotaInput = document.getElementById("mascota");
const propietarioInput = document.getElementById("propietario");
const telefonoInput = document.getElementById("telefono");
const fechaInput = document.getElementById("fecha");
const horaInput = document.g... |
/**
* 编辑
*/
var id = $.getQueryString("id");
var upload = null;
var datepicker = null;
var toc = UE.getEditor('toc-container', {
toolbars: [
['fullscreen', 'source', 'undo', 'redo', 'bold']
],
autoHeightEnabled: true,
initialFrameHeight: 200,
autoFloatEnabled: true
});
var content = U... |
import React, { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import CustomMap from '../customized/CustomMap';
const imagesDirectory = 'images/';
export default function PropertyDetailsComponent(props) {
const propertyDetailsParser = (data) => {
let temp_data = [];
for (let i =... |
/* eslint-disable no-restricted-syntax,no-underscore-dangle */
const { Generator } = require('../generator');
const { User } = require('./entities/user');
const { Board } = require('./entities/board');
const { Column } = require('./entities/column');
const { Heading } = require('./entities/heading');
const { Todo } = r... |
const { expect } = require('../Common');
const {
punycode,
punydecode,
} = require('../../lib/punycode');
describe('#punycode', function() {
context('when using punycode', function() {
it('should return an empty string if no domain is provided', function() {
expect(punycode()).to.be.a('string').and.to.... |
// dot product of two vectors
function dotProduct(vector1, vector2) {
let p = [];
for (let index in vector1) {
p.push(vector1[index] * vector2[index]);
}
return p.reduce((s, e) => s + e);
}
// the classic sigmoid activation function
function sigmoid(x) {
return 1.0 / (1.0 + Math.exp(-x));
}
function der... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getFilesForPost = getFilesForPost;
exports.getMissingFilesForPost = getMissingFilesForPost;
exports.uploadFile = uploadFile;
exports.getFilePublicLink = getFilePublicLink;
require("core-js/modules/web.dom.iterable");
require("core... |
var divlist = [];
var allclearbtn = document.createElement("button");
allclearbtn.setAttribute("class", "circlebutton");
allclearbtn.innerHTML = "Clear ALL";
var randomizebtn = document.createElement("button");
randomizebtn.setAttribute("class", "circlebutton");
randomizebtn.innerHTML = "Randomize Tasks";
document.body... |
'use strict';
const { Readable } = require('stream');
const { join } = require('path');
const fs = require('fs-extra');
/**
* Default sorting order:
* 1. Dirs sorted by basename, taking into consideration whether the platform is case-sensitive.
* 2. Files sorted by basename, taking into consideration whether the p... |
const viewToHeap = {
'Int8Array': 'HEAP8', 'Int16Array': 'HEAP16', 'Int32Array': 'HEAP32', 'Uint8Array': 'HEAPU8', 'Uint16Array': 'HEAPU16',
'Uint32Array': 'HEAPU32', 'Float32Array': 'HEAPF32', 'Float64Array': 'HEAPF364',
}
function array2Heap(module, arrTyped, size) {
var heap = module[viewToHeap[arrTyped.name]]... |
'use strict'
const { expect } = require('code')
const Lab = require('@hapi/lab')
module.exports.lab = Lab.script()
const { describe, it: test } = module.exports.lab
const { DateTime } = require('luxon')
const { convertToTrail } = require('../lib/trail')
describe('createTrail and createTrailFromObject', () => {
t... |
var chai = require('chai');
var assert = chai.assert;
const web3 = require('web3');
var web3_utils = require("web3-utils");
var LeasableCarArtifact = artifacts.require("LeasableCar");
var LeaseAgreementArtifact = artifacts.require("LeaseAgreement");
var AgreementExecutorArtifact = artifacts.require("AgreementExecuto... |
// Pie graph view
var VoodooPieGraphView = voodoo.View.extend({
load: function() {
this.meshes = [];
this.triggerMeshes = [];
// Pie graph data
var data = this.model.data;
this.data = data;
// Create each section
var percentAccumulator = 0.0;
var segmentsPerPercent = 1;
... |
const JsonSchema = require("@hyperjump/json-schema");
const { Core } = require("@hyperjump/json-schema-core");
const Bundle = require("./core");
const validate = {
...JsonSchema.Keywords.validate,
collectExternalIds: (schemaUri, externalIds, ast, dynamicAnchors) => {
const nodes = ast[schemaUri][2];
if (e... |
import React from 'react';
import Layout from '../components/layout';
import Nav from '../components/nav';
import Footer from '../components/footer';
import SEO from '../components/seo';
import Background from '../components/background';
import { Link } from 'gatsby';
import { Container, Row, Col } from 'react-bootstra... |
const { Discord, MessageEmbed } = require("discord.js");
const { stripIndents } = require("common-tags");
const { prefix } = require("../config.json");
module.exports = {
name: "badword",
description: "For add an blacklist word to this server",
guildOnly: true,
usage: "o!badword",
async run(client, msg, args... |
const {
Command
} = require('discord-akairo');
var bpf = require("../helpers/build_permission_function");
var Discord = require("discord.js");
var moment = require('relative-time-parser');
var util = require("../helpers/util");
function buildWarnDM(rulebroken, member, moderator, actionmessage, punishmentdetail) {
... |
import {faExclamationCircle, faPlus} from '@fortawesome/free-solid-svg-icons'
import get from 'lodash/get'
import React, {Component} from 'react'
import {v4 as uuidv4} from 'uuid'
import {DEFAULT_SEGMENT_SPEED} from 'lib/constants/timetables'
import message from 'lib/message'
import {Button} from '../buttons'
import ... |
import { Header, Left, Right, Icon } from 'native-base';
import React, { Component } from 'react';
import { View, Text, StyleSheet, Platform, TouchableOpacity, Keyboard } from 'react-native';
import R from '../global/R';
/*
# Actionbar props
---------------------------------------------------------------------------... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import {
ViroSceneNavigator,
ViroScene,
ViroBox,
ViroMaterials,
ViroNode,
ViroOrbitCamera,
Vi... |
import React from 'react';
import propTypes from '../../../node_modules/prop-types/index.js';
import _styled from 'styled-components';
import { GU } from '../../style/constants.js';
import { textStyle } from '../../style/text-styles.js';
import { useTheme } from '../../theme/Theme2.js';
var _StyledDiv = _styled("div")... |
/* eslint-disable indent */
'use strict';
const radioBtns = document.querySelectorAll('input[name=cards-number]');
const startBtn = document.querySelector('#start-btn');
const cardsContainer = document.querySelector('.cards__list');
let cards = [];
let gameSize = localStorage.getItem('game-size');
let saveData = [];
... |
import { Dialog, Text, Box, Icon, useRecords, useBase, useViewport, Loader} from "@airtable/blocks/ui";
import {FieldType} from '@airtable/blocks/models';
import React, { useState, useRef } from "react";
import { makeStyles } from '@material-ui/core/styles';
import { Tooltip,Button, Typography, Grow, Grid, TextField, ... |
import AV from 'leancloud-storage';
import { Actions } from 'react-native-router-flux';
import {
FEED_ADD,
FEED_DELETE,
FEED_EDIT,
FEED_ADD_FAIL,
FEED_ADD_SUCCESS,
ADD_FEED_LOADING,
FEEDS_FETCH_SUCCESS,
FEEDS_CLEAR,
FEED_DETAIL_FETCH_SUCCESS,
FEED_DETAIL_FETCH_FAIL,
HEADER_IS_REFRESHING,
FOOTER_IS_REFRESH... |
var initial = 2000;
var count = initial;
var counter; //10 will run it every 100th of a second
var initialMillis;
var soundFile;
var mic;
var urlAudio;
var url;
var recorder;
function timer() {
if (count <= 0) {
clearInterval(counter);
stopRecording();
displayCount(0);
return;
... |
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import PropTypes from 'prop-types';
import ReactRouterPropTypes from 'react-router-prop-types';
import { stripesConnect } from '@folio/stripes/core';
import {
LoadingPane,
Paneset,
} from '@folio/stripes/components';
import {
baseManifest,... |
import { StatusBar } from 'expo-status-bar';
import React, {useState} from 'react';
import { StyleSheet, Text, View, TouchableOpacity, Touchable } from 'react-native';
export default function App() {
const [tela, setTela] = useState('menu');
const [jogadorAtual, setJogadorAtual] = useState('');
const [tabuleiro,... |
/**
* File: index.js
* Author: <NAME>
* Date: 2020-05-10
* License: All rights reserved Studio Webux S.E.N.C 2015-Present
*/
"use strict";
const fs = require("fs");
const path = require("path");
const sharp = require("sharp");
const mime = require("mime");
const imageType = require("image-type");
const fileType ... |
const HotelSearchMerger = require("./Merger");
const sorting = require("./sorting");
const filtering = require("./filtering");
const dataUtils = require("./dataUtils");
const Api = require("../Api");
const Poller = require("../Poller");
const DELAYS = [0, 300, 600, 900, 2400, 3800, 5000, 6000, 6000, 6000];
class Hote... |
import { Component } from 'react';
class SpiffeHelper extends Component {
getMillisecondsFromEpoch() {
return new Date().getTime()
}
getAgentExpiryMillisecondsFromEpoch(entry) {
if (typeof entry !== 'undefined') {
return entry.x509svid_expires_at * 1000
}
return ""
}
getEntryExpiryMil... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.