text stringlengths 3.22k 29.5k |
|---|
const axios = require('axios')
const cryptoObj = window.crypto || window.msCrypto
const storage = window.localStorage
const storageName = 'hexo-plugin-matataki:#' + window.location.pathname
const keySalt = textToArray('fan8AGM8uBt0Ep3oLiph')
const ivSalt = textToArray('XDUSdgPjUPWgLXnrPqtl')
const mainElement = docu... |
import React, { Component } from "react";
import gql from "graphql-tag";
import TextField from "@material-ui/core/TextField";
import Autocomplete from "@material-ui/lab/Autocomplete";
import { connect } from "react-redux";
import { withApollo } from "react-apollo";
import { normalizedMapDispatchToProps } from "../helpe... |
import { onUserGesture } from "../events/onUserGesture";
import { isArray, isDefined, isNullOrUndefined, isNumber } from "../typeChecks";
const graph = new Map();
const children = new WeakMap();
const names = new WeakMap();
function add(a, b) {
if (isErsatzAudioNode(a)) {
a = a.output;
}
if (isErsat... |
var _ = require("lodash");
var cmakejs = require("cmake-js");
var CMLog = cmakejs.CMLog;
var Bluebird = require("bluebird");
var fs = Bluebird.promisifyAll(require("fs-extra"));
var semver = require("semver");
var path = require("path");
var environment = cmakejs.environment;
var zlib = require("zlib");
var tar = requi... |
let kuro
let _msg
let _stickers = {}
let _table = 'stickers'
let assets = './files/stickers'
const fs = require('fs')
const axios = require('axios')
const FormData = require('form-data')
const concat = require('concat-stream')
exports.init = function(bot) {
kuro = bot
// Create sticker folder if it doesn't exist
f... |
import each from 'lodash/fp/each';
import filter from 'lodash/fp/filter';
import find from 'lodash/fp/find';
import findIndex from 'lodash/fp/findIndex';
import flow from 'lodash/fp/flow';
import head from 'lodash/fp/head';
import identity from 'lodash/fp/identity';
import invertBy from 'lodash/fp/invertBy';
import map... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _axios = _interopRequireDefault(require("axios"));
var _SpVuexError = _interopRequireDefault(require("../../../errors/SpVuexError"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? ... |
import React, { useContext } from 'react';
import { green, red } from '@material-ui/core/colors';
import { makeStyles, useTheme } from '@material-ui/core/styles';
import AddIcon from '@material-ui/icons/Add';
import Breadcrumbs from '@material-ui/core/Breadcrumbs';
import Button from '@material-ui/core/Button';
import... |
const fs = require("fs");
const path = require("path");
const MSG = require("./constants").MSG;
let isValidString = r => "string" == typeof r && r.length;
module.exports = {
config: (r, e) => {
if (e.hasOwnProperty("isDebug")) {
if (typeof e.isDebug != "boolean") throw new TypeError(MSG.E... |
const _ = require('lodash');
const uid = require('uid');
const update = require('immutability-helper');
const actions = require('./actions');
const utils = require('./utils');
const SWIPE_DELAY_TOLERANCE = 100;
const initialState = {
clusters: {},
clients: {},
swipes: [],
};
function createReducer (config) {
... |
/* Functions regarding the GPS devices tree */
var gps_observer = {
observe : function(subject, topic, data) {
subject = subject.QueryInterface(Components.interfaces.IGPSDevInfo);
if (topic == "gps_changed") {
gpsView.update_gps(subject);
gpsStatusbar.update_gps(subject);
} else if (topic == "gps_remo... |
const ethers = require('ethers');
const wallets = require('./wallets.js');
const dc = require('./datacollection.js');
const sema = require('async-sema');
// Constants
var defaultDeployGasLimit = module.exports.defaultDeployGasLimit = 4600000;
var defaultEvalGasLimit = module.exports.defaultEvalGasLimit = 1000000;
va... |
"use strict";
/* eslint-disable */
var leopardUrl;
var leopardEmbedSrc = null;
function isLeopard(scriptElem) {
var srcValue = scriptElem.getAttribute("src");
return srcValue && srcValue.indexOf("embed-leopard.js") !== -1;
}
var leopardPageScripts = document.getElementsByTagName("script");
for (var i = 0; i... |
function get_dict_keys(dict){
var v_list = [];
for(var key in dict){
v_list.push(key);
}
return v_list;
}
function get_dict_values(dict){
var v_list = [];
for(var key in dict){
v_list.push(dict[key]);
}
return v_list;
}
//随机取数组中的数值。
function getArrayItems(arr, num) {
... |
const { WAConnection, MessageType, Presence, MessageOptions, Mimetype, WALocationMessage, WA_MESSAGE_STUB_TYPES, ReconnectMode, ProxyAgent, GroupSettingChange, waChatKey, mentionedJid, processTime } = require("@adiwajshing/baileys")
const imgbb = require('imgbb-uploader')
const moment = require("moment-timezone")
co... |
var notes = require('./notes.js'),
diatonic = require('./diatonic.js');
_ = require('../../underscore');
function unison(note) {
return note
}
function second(note, key) {
return diatonic.interval(key, note, 1);
}
function third(note, key) {
return diatonic.interval(key, note, 2);
}
function fourth(note, key) {... |
/* eslint-disable no-bitwise */
import {findPos} from './Util.js';
/**
* Whether a value is `null` or `undefined`.
* @param {any} val
* @returns {boolean}
*/
const isNullish = (val) => {
return val === null || val === undefined;
};
/**
* Encapsulate slider functionality for the ColorMap and ColorBar -
* could b... |
'use strict';
var _ = require('underscore');
var ValuesStore = require('../../utils/valuesStore');
var objectUtils = require('../../utils/object');
var templatesInit = require('./templates');
var blocksInit = require('./blocks');
var operatorsInit = require('./operators');
var modifiersInit = require('./modifiers');
... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
// TODO: decaffeinate suggestions which may need checking:
// DS205: Consider reworking code to avoid use of IIFEs
// decaffeinate docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
'use babel';
let sbAtomSonicPi;
const {CompositeDisposable} = require('atom');
const osc ... |
import React, { Component, PropTypes } from 'react';
import { StyleSheet, Text, View, Animated, TouchableOpacity, Platform } from 'react-native';
import ActionButtonItem from './ActionButtonItem';
const alignItemsMap = {
"center" : "center",
"left" : "flex-start",
"right" : "flex-end"
}
const shadowHeight = 12... |
const main = require("../main.js")
const config = require("../../config.json")
const discord = require("discord.js")
class RegexModule {
constructor(module, msgString) {
this.Module = module
this.MessageString = msgString
}
}
class RegexStore {
constructor(module, matches){
this.Module = module
this.Matche... |
/* global process, __dirname, Promise */
//const config = require('./config.js')
const handleFileFromArgvArray = require('./lib/cli/handleFileFromArgvArray.js')
const execShellCommand = require('./lib/cli/execShellCommand.js')
const path = require('path')
const fs = require('fs')
const getFilelistFromFolder = requir... |
window.onbeforeunload = function(){return false;};
$(document).ready(function(){
window.addEventListener('keyup',keypress_event, false);
});
var current_playing = '';
var url_update = new URL(window.location.href);
var search = url_update.searchParams.get('album');
console.log(search);
function keypress_event(e){
... |
const Youtube = require('simple-youtube-api');
const ytdl = require('ytdl-core');
const ffmpeg = require('ffmpeg');
const youtube = new Youtube(process.env.YOUTUBE_API_KEY);
module.exports = {
name: 'play',
description: "Play a song in your channel.",
async execute(message, queue) {
try {
... |
import React from 'react'
import styled from 'styled-components'
import { Title1, Title2, Title3, Text, Column, Row } from '../theme/index'
import Link from 'gatsby-link'
import Footer from '../components/footer'
const A = styled.a`
text-decoration: underline;
color: #fff;
padding: 0.1em 0;
`
const others = [
... |
import React, { useState, useEffect } from 'react'
import { FaCheck } from 'react-icons/fa'
import useDynamicRefs from 'use-dynamic-refs';
import { useNavigate } from "react-router-dom";
import ScrollToTopOnMount from '../../../../utils/ScrollToTop';
import { getAnalytics, logEvent } from "firebase/analytics";
const W... |
/**
* Created by DrTone on 18/08/2017.
*/
//Representation for expenditure objects
//Constants
const DATE_LABEL = {
X_OFFSET: 0,
Y_OFFSET: -5,
Z_OFFSET: 10
};
const EXPEND_LABEL = {
X_OFFSET: 0,
Y_OFFSET: 17.5,
Z_OFFSET: 0
};
const LABEL_SCALE = new THREE.Vector3(45, 45, 1);
const EXPENSE_COL... |
(function () {
//页面注入任务表单
var newElement = document.createElement('div');
var html = "<div id=\"secKillForm\">\n" +
" <div class=\"secKill-logo\">\n" +
" 新增秒杀\n" +
" </div>\n" +
" <div class=\"secKill-filed\">\n" +
" <span class=\"secKill-name\">秒杀商品:</span><br/>\n" +
... |
const oauth2orize = require('oauth2orize');
const passport = require('passport');
const { BasicStrategy } = require('passport-http');
const { Strategy : ClientPasswordStrategy } = require('passport-oauth2-client-password');
const uid = require('uid2');
class OAuthServer {
constructor(db, streamingRest, isDebug) {
t... |
import React, { Component, useState, useEffect } from "react";
import { Map, GoogleApiWrapper, Marker, InfoWindow } from "google-maps-react";
import useApi from "../../Hooks/useApi";
import { useHistory } from "react-router-dom";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
faAngleDown,... |
const { User, Submission, Config } = require("../schema");
const { config } = require("../common");
const express = require("express");
const axios = require("axios");
const rp = require("request-promise");
const cheerio = require("cheerio");
const dotenv = require("dotenv");
dotenv.config();
const GRAPHQL_URL = proc... |
import parseAudioMetadata from 'parse-audio-metadata';
import AudioModel from '../audio/audio-model-class';
import audioAPI from '../audio/audio-api';
import PlayerUI from './player-ui';
import Utils from './utils';
const filterCrossOriginUrl = (tracks) => {
const sourceTracks = (tracks && Array.isArray(tracks)) ? t... |
import React, { Component } from 'react';
import { connect } from 'dva';
import _ from 'lodash';
import { Tree, Icon, Popover, Button, Modal } from 'antd';
import TableLayout from 'layouts/TableLayout';
import ExModal from 'components/ExModal';
import { createSimpleRestActions } from 'utils/createSimpleRestModel';
impo... |
//DepthKit.js plugin for Three.js
/**
* Originally written by
* @author mrdoob / http://mrdoob.com
* @modified by obviousjim / http://specular.cc
*/
/* Made into a plugin after the completion of the Tzina project by
* @author juniorxsound / http://orfleisher.com
* @modified by avnerus / http://avner.js.org
*... |
import CryptoJS from 'crypto-js';
import jc from 'json-cycle';
import { keccak512 } from 'js-sha3';
import moment from 'moment';
import _ from 'lodash';
import Wallet from '../apis/wallet/wallet';
import { getLocalStorage, setLocalStorage, sendMessage } from './browserService';
import config from '../app.config';
impor... |
/*
* Project: ZilPay-wallet
* Author: Rinat(lich666dead)
* -----
* Modified By: the developer formerly known as Rinat(lich666dead) at <<EMAIL>>
* -----
* Copyright (c) 2019 ZilPay
*/
import { v4 } from 'uuid'
import { filter, take, map } from 'rxjs/operators'
import { from } from 'rxjs'
import {
SecureMessage... |
const utils = require("./utils");
const structs = require("./structs");
/**
* searchIterator - An adaptable graph search algorithm
* Returns an Iterator usable with `next()`.
* @param {(Object|Array)} subject The Object/Array to access.
* @param {(Queue|Stack)} targetTuples An instance of `Queu... |
/*
This script reads all database schema files and creates a *.bolt file,
which then will be used to create the database.rules.json
run with:
npm run main db/rules/create_rules.js
*/
import fs from "fs"
import path from "path"
const chalk = require('chalk');
// TODO: Match rules path with stores !!
// TODO: Create A... |
/**
* Minimum RPM for counting a wheel set as spinning (brake temperature can increase)
*/
const WHEEL_RPM_THRESHOLD = 10;
/**
* Scale factor for heat up
*/
const HEAT_UP_SCALE = 0.00002;
const BASE_HEAT_UP_FACTOR = 0.003;
/**
* Scale factor for cool down
*/
const BASE_COOL_DOWN_FACTOR = 0.00085;
const BASE_SP... |
/*==============================================================================
Event Parameter Example
Copyright (c), Firelight Technologies Pty, Ltd 2012-2016.
This example demonstrates how to control event playback using game parameters.
=============================================================================... |
"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... |
/*eslint-disable*/
const Cesium = require('cesium/Cesium')
import primitives from './primitives'
/**
* 动态画实体
*/
export default class entityFactory {
constructor(obj) {
//初始化
this.options = null
switch (obj.type) {
case 'triangleMeasure':
this.createTriangleMeasure(obj.data)
break... |
const test = require('assert');
const sut = require('../build/hebrew-code-util');
describe('Hebrew', () => {
it('Is Consonant', () => {
test.ok(sut.isConsonant('א'), 'א isConsonant');
test.ok(sut.isConsonant('ה'), 'ה isConsonant');
test.ok(!sut.isConsonant('b'), '! b isConsonant');
test.ok(!sut.isCon... |
function getData(display) {
for (const i of info) {
if (i['display'] == display) {
return i;
};
};
}
function gcd (a,b){
if (b == 0){
return a
}
return gcd (b, a % b)
}
if( typeof Element.prototype.clearChildren === 'undefined' ) {
Object.defineProperty(Elemen... |
// ==UserScript==
// @name SO-mod-userscripts Options
// @description Adds right sidebar to modify options of installed userscripts from the repo https://github.com/samliew/SO-mod-userscripts
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
// @version 1.4.3
//
// @... |
//////////////////////////////////////////////////////////////////////
// this file is used by browserify to produce the 'bundle.js' file //
//////////////////////////////////////////////////////////////////////
// handles the `Run test` and `Save test` button click
let bench = {
oncycle: null,
teardown: null,
ti... |
/*
"dynamic" basically just means that this command is not cached with sw
instead this module loads "dynamic" op from github / uses terminalCache
it may be tempting to think that "dynamic" means that crosshj/fiug-beta/terminal/bin
files are ran autommatically, but this is not the case
basically, this file just short... |
const fs = require('fs');
const path = require('path');
const gravatar = require('hexo/lib/plugins/helper/gravatar');
const { date } = require('hexo/lib/plugins/helper/date');
const urlFor = require('hexo/lib/plugins/helper/url_for');
const utils = require('./utils');
const pkg = require('../package.json');
const confi... |
import Head from 'next/head'
import Image from 'next/image'
import { useEffect, useRef, useState } from 'react'
import { Game } from 'monkfish'
import { Chessboard, INPUT_EVENT_TYPE, MARKER_TYPE, COLOR} from 'https://cdn.skypack.dev/cm-chessboard'
import {
Container,
Button,
Grid,
GridItem,
IconButton,
Head... |
'use strict';
var angular = require('angular');
var Highcharts = require('highcharts');
window.Highcharts = Highcharts;
require('highcharts/modules/exporting')(Highcharts);
require('highcharts/modules/boost')(Highcharts);
require('highcharts/modules/sunburst')(Highcharts);
angular
.module('portal')
.factory('... |
const tldts = require('tldts')
const tdsStorage = require('./storage/tds.es6')
const constants = require('../../data/constants')
const parseUserAgentString = require('../shared-utils/parse-user-agent-string.es6')
const browserInfo = parseUserAgentString()
const settings = require('./settings.es6')
const load = require(... |
import React, { Fragment } from 'react';
import moment from 'moment';
import { connect } from 'dva';
import router from 'umi/router';
import { Tabs, Form, Input, InputNumber, Row, Col, Icon, DatePicker, Button, Divider, Skeleton } from 'antd';
import { upload2Backend, apiDelete } from '@/utils/apirequest';
import Imag... |
// Connect to the MySQL Database
const mysql = require('mysql2');
const cTable = require('console.table');
const inquirer = require('inquirer');
// const { async } = require('rxjs');
// Create Connection
const con = mysql.createConnection(
{
user:'root',
password:'<PASSWORD>',
database:'org... |
var queue_id = parseSearch('queue_id');
var clientQueue = [];
var currentStage = -1;
var highlightStage = -1;
var sidebarContainerHasMouse = false;
var sidebarContainerLastInputTime = 0;
function getClientSong() {
if (clientQueue.length <= 0 ||
currentStage < 0 ||
currentStage >= clientQueue.length) {
... |
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {ListPropertyUpdateBehavior, ListPropertyUpdateBehaviorInterface} from 'chrome://resources/js/list_property_update_behavior.m.js';
import {html, mi... |
const OFFSET_X = 400;
const OFFSET_Y = 400;
const GLOBAL_SCALE = 0.01;
const GRAVITY = 9.81 * 5;
const OBJ_MIN_RADIUS = 1000;
const CONTAINER_RADIUS = 30000;
const CONTAINER_WIGGLE_MAG = 4000;
const CONTAINER_WIGGLE_SPEED = 0.5;
const SPAWN_AREA = 500;
const RATIO = 0.10;
let canvas;
let context;
let frameCount ... |
'use strict';
var tableHeaders = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
var months = ['January', 'Feburary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
// Get the first day of the month by submitting the month and year,... |
/*
Copyright [2016] [Relevance Lab]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
/**
* Copyright reelyActive 2019
* We believe in an open Internet of Things
*/
// Constants
const SORT_BY_OPTIONS = [
'\u21e1 transmitterId',
'\u21e3 transmitterId',
'\u21e1 receiverId',
'\u21e3 receiverId',
'\u21e1 rssi',
'\u21e3 rssi'
];
const RDPS = ' / ';
const EVENT_ICONS = [
'fas ... |
let balance;
const currency = "€";
const COLORS = [
"#FFF05A",
"#FFD25A",
"#FFAA5A",
"#FF785A",
"#F06449",
"#FFC759",
"#FFA959",
"#FF7F59",
"#FF5964",
"#EF4755",
"#CC5803",
"#47A9EF"
];
// Fetch data a soon as the page is loaded
document.addEventListener("DOMContentLoaded", event => {
//const... |
// pages/dingdan/dingdan.js
var app = getApp()
var util = require('../../utils/util.js');
Page({
/**
* 页面的初始数据
*/
data: {
array: ['1间', '2间', '3间', '4间', '5间', '6间', '7间', '8间', '9间', '10间', '11间', '12间'],
index: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// 调用函数时,传入ne... |
import React, { Component } from "react";
import { connect } from "react-redux";
import { Link, Redirect, withRouter } from "react-router-dom";
import { Fade } from "react-reveal";
import {
GlobalRelativeCanvasComponent,
PageHeaderComponent,
} from "../../../components";
import "./style.scss";
import {
getActiveD... |
const _ = require('lodash')
const { to_a } = require('./utils')
class DbTablePrototype {
constructor(config, DB) {
this.name = config.name
this.DB = DB
this.methods = config.methods ? Object.keys(config.methods) : []
this.foreign_keys = [].concat(config.foreign_keys)
this.relations = {}
for (let name i... |
import React from 'react'
import { BrowserRouter as Router, Route, Link, NavLink, Redirect } from 'react-router-dom'
import { Container, Table, Message, Menu, Form, Button } from 'semantic-ui-react'
import Image from './KenSchwaber.jpg'
const NavBar = () => (
<Menu inverted>
<Menu.Item link>
<NavLink ex... |
'use strict';
var config = {
checks: false,
verbose: false
};
// Create an array with n numbers for iteration
var cycles = [];
while(cycles.length < 1) { // Too little
//while (cycles.length < 25) { // Ok (disable console.time with this one as the hz is too high)
//while(cycles.length < 1000) { // Too much, but u... |
import React, { useState, useEffect } from "react";
import {
View,
Text,
FlatList,
StatusBar,
StyleSheet,
ActivityIndicator,
Button,
TouchableOpacity,
TextInput,
Image,
ScrollView,
Linking,
} from "react-native";
import ListItem from "../components/ListItem";
import RoundButton from "../compon... |
import _ from 'underscore';
import cn from 'classnames';
import op from 'object-path';
import ReactPlayer from 'react-player';
import { Scrollbars } from 'react-custom-scrollbars';
import React, { forwardRef, useEffect, useImperativeHandle } from 'react';
import Reactium, {
__,
ComponentEvent,
useDerivedSt... |
'use strict';
$(window).on('load', function(){
// $('.preloader').fadeOut(1000); // set duration in brackets
init();
});
$(document).ready(function() {
owlCarousel();
isotope();
magnificPopup();
});
/* --- initialize functions on window load here -------------- */
function init() {
headerShrink()... |
import {
Browser,
Store,
Selectors,
Defaults
} from './core/globals'
import ReactDOM from 'react-dom'
import init from './core/init'
/* Utility functions */
import defer from './utils/defer'
import prefix from './utils/prefix'
import find from './utils/fin... |
let currEnemy;
let gameText;
let player = {};
let enemies = 0;
let crazyCatLady1;
let crazyCatLady2;
let crazyCatLady3;
let setButtons = {
"showAttacksHideEnemies": function(){
$("#enemyButtons").css("visibility", "hidden");
$("#attackButtons").css("visibility", "visible");
},
"hideRestart... |
export const prefix = '/api/v2'
// region 模块前缀
export const module_auth = '/auth'
export const module_admin = '/admin'
export const module_basic = '/basic'// 海露基础服务
export const module_xinan = '/xinan'// 海露基础服务
export const module_auth_prefix = prefix + module_auth
export const module_admin_prefix = prefix + module... |
const PNAME = 'node-ll'
process.title = PNAME
const os = require('os')
if (os.platform() !== 'darwin') {
console.error('仅支持 Mac OS 系统 !')
exit(1)
}
const fs = require('fs')
const fsp = fs.promises
const path = require('path')
const { execSync } = require('child_process')
const chalk = require('chalk')
const { e... |
var Alloy = require('alloy'),
_ = Alloy._,
Backbone = Alloy.Backbone,
InAppBilling = require('ti.inappbilling');
/**
* @class InApp
*
* In-app purchases support for Android
*/
var InApp = {
getReceipt: function(callback) {
Ti.API.error('Android In-App Billing does not have receipts.');
},
/*
* Make an in-app... |
function calcBannerTitleImg() {
if (window.matchMedia('(max-width: 700px)').matches) {
$('.signable img').attr(
'src',
'https://download.pingcap.com/images/banners/techday2019-mobile.jpg'
)
} else {
$('.signable img').attr(
'src',
'https://download.pingcap.com/images/community/ac... |
$("input[data-type='currency']").on({
keyup: function () {
formatCurrency($(this));
},
blur: function () {
formatCurrency($(this), "blur");
},
change: function () {
formatCurrency($(this), "blur");
}
});
function formatNumb... |
const path = require('path')
const debug = process.env.NODE_ENV !== 'production'
const configView = require("./static/mock/zbfx.json")
const configtest = require("./static/mock/test.json")
const PrefaceData = require("./static/mock/PrefaceData.json")
const Preface = require("./static/mock/Preface.json")
const tableData... |
// =====================================================================
// Add blob to document
// xpath: file:content or files:files or ?
// single: boolean if xpath is a single blob property or a list
// name: blob name
function addDocumentBlob(doc, blob, xpath, single, name) {
Console.info(" function addDocument... |
"use strict";
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, ... |
function u_getRelativeUrlId() {
var rel_url = window.location.pathname;
// may need to strip off the hash
var pos = -1;
if (window.location.anchor)
pos = rel_url.lastIndexOf(window.location.anchor);
if (pos > -1)
rel_url = rel_url.substring(0, pos);
// may need to strip off the q... |
// MODULES //
import React, { Fragment, useState } from 'react';
import PropTypes from 'prop-types';
import logger from 'debug';
import FormControl from 'react-bootstrap/FormControl';
import FormLabel from 'react-bootstrap/FormLabel';
import FormGroup from 'react-bootstrap/FormGroup';
import FormText from 'react-boots... |
/**
* Created by Kiyoshitaro on 07/05/2018.
*/
import React from 'react';
import PropTypes from 'prop-types';
import * as registerManageMeetingRoomAction from "../actions/registerManageMeetingRoomAction";
import {connect} from "react-redux";
import {bindActionCreators} from "redux";
import FormInputText from '../..... |
const Web3 = require("web3");
const Contract = require("@truffle/contract");
const HDWalletProvider = require("@truffle/hdwallet-provider");
const XRegExp = require('xregexp');
const Fs = require('fs');
const argv = require('yargs')
.env('ALLOWLIST')
.command('activate <validator>', 'activates a validator for t... |
const debug = require('debug')('divvy');
const fs = require('fs');
const ini = require('ini');
const path = require('path');
const Utils = require('./utils');
const Constants = require('./constants');
/**
* In support of globbing, we turn the operation value into
* a regex. We don't want to support full regex keys ... |
import React, { Component } from 'react'
import firebase from '../scripts/firebase.js';
import Chat from './Chat.js'
import { ContextAPI } from './Context.js';
import '../css/Video.css';
import { Button } from 'antd';
import SplitterLayout from 'react-splitter-layout';
import 'react-splitter-layout/lib/index.css';
impo... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("../util");
var VBox = /** @class */ (function () {
function VBox(r1, r2, g1, g2, b1, b2, hist) {
this._volume = -1;
this._count = -1;
this.dimension = { r1: r1, r2: r2, g1: g1, g2: g2, b1: b1, ... |
const $ = new Env('网易云音乐')
$.VAL_session = $.getdata('chavy_cookie_neteasemusic')
$.CFG_retryCnt = ($.getdata('CFG_neteasemusic_retryCnt') || '10') * 1
$.CFG_retryInterval = ($.getdata('CFG_neteasemusic_retryInterval') || '500') * 1
!(async () => {
$.log('', `🔔 ${$.name}, 开始!`, '')
init()
await signweb()
... |
// scene/demo-specific variables go here
var sceneIsDynamic = true;
var earthRadius = 6360;
var atmosphereRadius = 6420;
var altitude = 2000.0;
var camFlightSpeed = 300;
var sunAngle = 5.1;
var sunDirection = new THREE.Vector3();
var cameraWithinAtmosphere = true;
var UniverseUp_Y_Vec = new THREE.Vector3(0,1,0);
//var ... |
/**
* js main lib Scarab
* @author <EMAIL>
*/
/*
* main object
*/
var scarabfe = {
ajax_data: null,
ajax_func: {
post: [{
call: {
},
form: {
}
}]
},
ajax_datavalue: null,
jEle: null,
activeVersions: ["MSXML2.XMLHttp.5.0",
"MSXML2.XMLHttp.4.0",
"MSXML2.XMLHttp.3.0",
"MSXML2.XMLHt... |
'use strict';
const RainbowS2sStarterKit = require('rainbow-s2s-starterkit-nodejs');
const s2sStarterkitConfig = require('./config/config.json');
const loaderConfig = require('./config/bot-loader-params.json');
var fs = require('fs');
var path = require('path');
var spawn = require('child_process').spawn,
out = f... |
import { Fragment, useState, useEffect } from "react";
import { Link } from "react-router-dom";
import PropTypes from "prop-types";
import Container from "@mui/material/Container";
import Icon from "@mui/material/Icon";
import Popper from "@mui/material/Popper";
import Grow from "@mui/material/Grow";
import Grid from "... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$(document).ready(function(){
$.ajax({
type: 'GET',
url: '//aglum.lnx.warwick.ac.uk/it/computers',
//data... |
import { gameReducer, isValidMove } from '/game.js'
import { List, Map } from '/modules/immutable/dist/immutable.es.js';
import { addError } from '/js/errors.js'
import { addResult, matchList } from '/js/matchList.js'
import { fetchTimeout } from '/js/fetchTimeout.js'
import { addMessage } from '/js/messages.js'
import... |
import { sbcUtils } from "./sbcUtils.js"
import { sbcConfig } from "./sbcConfig.js"
export class sbcSettings {
// Toggle Debug Mode, which will post log data to the console
static toggleDebugMode () {
sbcConfig.options.debug && sbcUtils.log("Toggling debug mode")
sbcConfig.options.debug = game... |
// Logic of the Cannon Game
var canvas; // the canvas
var context; // used for drawing on the canvas
// constants for game play
var TARGET_PIECES = 7; // sections in the target
var MISS_PENALTY = 2; // seconds deducted on a miss
var HIT_REWARD = 3; // seconds added on a hit
var TIME_INTERVAL = 25; // screen refresh i... |
const patterns = require('@freesewing/pattern-info').list
const options = require('@freesewing/pattern-info').options
const addDupe = (option, from, to) => {
let slug = `/docs/patterns/${from}/options/${option.toLowerCase()}/`
if (!patternOptions[slug]) patternOptions[slug] = { find: from, replace: [to] }
else p... |
//When the document is ready. Kick of things.
$(document).ready(function(){
BATH.init();
//add to body
//oncontextmenu="return false"
socket.emit("test", {where: null});
socket.on("tagRemoved", function (data) {
console.log("Removed tag",data);
});
socket.on("tag", function (data) {
console.log(... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
import React, { useState, useEffect, useRef } from "react";
import PaginationComponent from "react-reactstrap-pagination";
// reactstrap components
import {
Badge,
Card,
CardHeader,
CardFooter,
DropdownMenu,
DropdownItem,
UncontrolledDropdown,
DropdownToggle,
Table,
Container,
Row,
Button,
Co... |
"use strict";
// Load plugins
const autoprefixer = require("gulp-autoprefixer");
const browsersync = require("browser-sync").create();
const cleanCSS = require("gulp-clean-css");
const del = require("del");
const gulp = require("gulp");
const header = require("gulp-header");
const merge = require("merge-stream");
cons... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.