text stringlengths 3.07k 16k |
|---|
'use strict';
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]; } } } return target; };
var fetch = require('./fetch');
var types = re... |
'use strict';
/*******************************************************************************
* Copyright (c) 2015 IBM Corp.
*
* All rights reserved.
*
* Communication between the CP browser code and this server is sent over web
* sockets. This file has the code for processing and responding to message sent
* t... |
/*
* Copyright © 2019 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated... |
// Each element in the lists represents a different KOH concentration.
// The first value is a and the second is b in the following exponential equation:
// rate = a * exp(b * temperature)
var si100Params = {20:[1.14841169, 0.05380941],
25:[1.11669074, 0.0537997 ],
30:[1.06355582... |
import React, { Component } from "react";
import TopBar from "../TopBar";
import { Redirect } from "react-router-dom";
//import Footer from '../Footer';
import ActionBar from "./ActionBar";
import Post from "./../Post";
import SideBar from "../SideBar";
import { Grid, createMuiTheme, Button, Drawer } from "@material-ui... |
/*
Functions to support refreshing a portlet.
Copyright (c) 2003,2008, Oracle and/or its affiliates. All rights reserved.
*/
var interval = null;
var delay = 10000; // 10 seconds
var portletRefreshStarted = false;
var refreshers = new Array(0);
var refresherAcks = new Array(4); // refreshAcknowledgments, used to ... |
var gulp = require('gulp'),
less = require('gulp-less'),
sass = require('gulp-sass'),
browserSync = require('browser-sync').create(),
header = require('gulp-header'),
cleanCSS = require('gulp-clean-css'),
rename = require("gulp-rename"),
replace = require('gulp-replace'),
uglify = requir... |
import Promise from 'bluebird';
import cheerio from 'cheerio';
import R from 'ramda';
import { cl, request, shorthandSkills, trinksCon } from '../helpers';
import championify from '../championify';
import Log from '../logger';
import progressbar from '../progressbar';
import store from '../store';
import T from '../tr... |
/**
*
*/
var work = new Array();
var wait = new Array();
var weld = new Array();
var websocketURL;
var socket;
var redata;
var symbol=0;
var machine;
//name改为namex
var namex;
$(function(){
//焊工总数name.length
$.ajax({
type : "post",
async : false,
url : "td/allWeldname", ... |
/****************************
* Sentence Games for PS! *
* Inspired by fender & ASL *
* Rewrote by Insist *
****************************/
"use strict";
const badEndings = ["the", "and", "a", "an", "or", "with", "to"];
function cleanWord(word) {
let reg = /[^a-zA-Z0-9 :]/g;
let clean = Chat.escapeHTML(word);
... |
// 对Date的扩展,将 Date 转化为指定格式的String
// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,
// 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
// (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
/*eslint no-extend-native: ["error", { "exc... |
import gl from 'gl';
import {JSDOM, VirtualConsole} from "jsdom";
import {PNG} from 'pngjs';
import request from 'request';
import sinon from 'sinon';
let lastDataFromUrl = null;
// The following is the mocking of what's needed in window and global for the tests to run.
const {window} = new JSDOM('', {
// Send js... |
import React from "react"
import styled from "styled-components"
import { darkTheme, lightTheme } from "./themes"
const CompetenciesWrapper = styled.div `
/* background: linear-gradient(180deg, ${props => props.theme === 'light' ? lightTheme.earth : darkTheme.earth} 10%, ${lightTheme.lavaRed} 85%);
@media only... |
import React, { Component, Fragment } from 'react'
import { connect } from 'react-redux'
import { FormattedMessage, injectIntl, useIntl } from 'react-intl'
import { MenuItem } from 'react-bootstrap'
import { withRouter } from 'react-router'
import PropTypes from 'prop-types'
import qs from 'qs'
import SlidingPane from ... |
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import PageItem from '../PaginationPageItem';
const List = styled.ul`
display: flex;
list-style-type: none;
justify-content: center;
align-items: center;
`;
const LEFT_PAGE = 'LEFT'... |
const MockedExchange = artifacts.require('./MockedExchange.sol')
const VEN = artifacts.require('./VEN.sol')
const { assertFail, assertEqual } = require('./utils.js')
var crypto = require('crypto')
contract('MockedExchange', accounts => {
const acc0 = accounts[0]
const acc1 = accounts[1]
const acc2 = acc... |
/**
* Copyright 2012-2017, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var isNumeric = require('fast-isnumeric');
var Lib = require('../../lib');
var Axes = require('../../plots/car... |
/*
* Copyright 2021-2022 Inclusive Design Research Centre, OCAD University
* All rights reserved.
*
* Handles endpoints:
* /sso/
* /sso/google - trigger SSO for Google OAuth2 provider
* /sso/google/login/callback - handle OAuth2 callback from Google
*
* Licensed under the New BSD license. You may not use this ... |
const fs = require('fs');
const {isNil} = require('ramda');
const assert = require('assert');
const SuitestError = require('./SuitestError');
const {
getErrorMessage,
getInfoErrorMessage,
normalizeErrorType,
responseMessageCode,
} = require('./socketErrorMessages');
const t = require('../texts');
const {mapLogLevel... |
function notateValue(value) {
if (isString(value)) value = Number(value);
if (isFinite(value)) {
switch (game.settings.notation) {
case notations[0]:
if (value >= 1e6) {
//This return statement is for scientific notation for numbers above 1,000,000.
let m = (value / 10 ** Math.... |
// TODO loadBlock & loadLayer : layers = {} !=!=!=! [] !!!
var player = {};
/**
* DEPENDENCIES
*/
var utils = require('./utils');
var audioLib = require('audiolib');
require('./mediator').installTo(player);
/**
* PARAMS
*/
var channelCount = 2, // :) no more krakz yeah!
bufferSize = 4096, // why ???
sampleRa... |
/**
* Upload your own GWAS page: custom validations (and eventually nicer upload interface)
*/
// 1. Custom validations for upload form
import Vue from 'vue';
import pako from 'pako';
import App from '../../vue/gwas_upload.vue';
import { isHeader } from 'localzoom/src/gwas/sniffers';
import { makeParser } from 'l... |
const THREE = require('../../services/threejs');
const isMobile = require('../../services/mobileDetection')();
const ee = require('../../services/eventEmitter');
const COMPONENTS = require('../Engine/Entity/listEntity');
COMPONENTS.Ground = require('../Engine/Ground');
COMPONENTS.Light = require('../Engine/Light');
CO... |
const { format: formatDate } = require('date-fns');
const sha512 = require('js-sha512');
const btoa = require('btoa');
const PAYMENT_ERRORS = require('./utils/paymentErrors');
const toBase64 = (u8) => btoa(String.fromCharCode.apply(null, u8));
const sha512ToBase64 = (input) => toBase64(sha512.digest(input));
const g... |
// ==UserScript==
// @name AMQ Short Sample Radio
// @namespace SkayeScripts
// @version 1.3.2
// @description Loops through your entire list to not answer songs. Pushes difficulty for them down as fast as possible.
// @author <NAME> || FokjeM & TheJoseph98
// @match https://animemusicquiz... |
/* eslint-disable complexity */
import React from 'react'
import {connect} from 'react-redux'
import {ResponsiveBar} from '@nivo/bar'
import {fetchTransactions} from '../store/transactions'
import {fetchBudget} from '../store/budgets'
class BudgetsBarGraph extends React.Component {
// componentDidMount() {
// t... |
const express = require('express');
// Import and require mysql2
const mysql = require('mysql2');
const inquirer = require('inquirer');
const cTable = require('console.table');
const PORT = process.env.PORT || 3001;
const app = express();
// Express middleware
app.use(express.urlencoded({ extended: false }));
app.u... |
const { app, BrowserWindow, ipcMain, dialog, Notification } = require('electron')
const path = require('path')
const fs = require('fs')
let mathJaxVersion = null; // initial value
let win = null; // initial value
function webPrefProp (webPref) {
let wp =
{
nodeIntegration: false,
contextIsolation: t... |
// https://github.com/LearnBoost/socket.io-client
// https://github.com/voodootikigod/node-serialport
var SerialPort = require("serialport").SerialPort;
var serialPort = new SerialPort("/dev/cu.usbserial-AH001BS6", /*{ baudrate: 57600 },*/ false); // this is the openImmediately flag [default is true]
var clientio = r... |
'use strict';
function Move(x, y, piece_id) {
if (arguments.length == 3)
this.m = x << 4 | y | piece_id << 8;
else if (typeof x == 'number')
this.m = x;
else if (x == '----')
this.m = 0xffff;
else {
var xy = parseInt(x.substring(0, 2), 16);
var blk = 117 - x.charCodeAt(2); // 117 is 'u'
... |
'use strict'
const assert = require('assert')
const has = require('./has.js')
const MissingEnvError = require('./missing-env-error.js')
const {
TRUE_VALUES,
FALSE_VALUES
} = require('./boolean-values.js')
const VALID_BOOLEANS = new Set([
...Array.from(TRUE_VALUES)
, ...Array.from(FALSE_VALUES)
])
class RegExpE... |
/** When your routing table is too long, you can split it into small modules**/
import Layout from '@/views/layout/Layout'
const heaRouter = {
// TODO : 1 Level
path: '/hea',
component: Layout,
redirect: '/hea/baseInfo/',
name: 'health',
meta: {
title: '보건',
icon: 'peoples'
},
// TODO : 2 Level... |
import React, { Component } from 'react';
import Grid from '@material-ui/core/Grid';
import Button from '@material-ui/core/Button';
import { withStyles } from '@material-ui/core/styles';
import Files from 'react-files';
import ModalLoadingAlert from '../ModalLoadingAlert';
import PDFProvider from '../../../lib/provider... |
import React, { useState, useEffect } from 'react'
import HarmonogramList from '../components/harmonogram/HarmonogramList'
import HarmonogramOwnList from '../components/harmonogram/HarmonogramOwnList'
import uuid from 'uuid/v4'
const Harmonogram = () => {
const initItem = [
{ id: uuid(), text: "REGISTRATI... |
/**********************************************************************
* Copyright 2020 <NAME> <<EMAIL>>
*
* 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/... |
const chalk = require('chalk');
const packagejs = require('../../package.json');
const semver = require('semver');
const BaseGenerator = require('generator-jhipster/generators/generator-base');
const jhipsterConstants = require('generator-jhipster/generators/generator-constants');
module.exports = class extends BaseGe... |
// Removal List
var lootToRemove = [
["Botania:manaResource", "Botania", ["dungeonChest"]],
["Botania:manaBottle", "Botania", ["dungeonChest"]],
["Botania:lexicon", "Botania", ["dungeonChest"]]
];
var removals = [
["ingot", "minecraft:iron_ingot", null],
["pickaxe", "minecraft:iron_pickaxe", null],
["pick... |
// Copyright 2017 <NAME>.
//
// 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 w... |
const ERRORS = {
CONSTANTS: {
MIN_ARRAY: `Enum expected argument 'constants' to be an array of length >= 2`,
ARRAY: `Enum expected argument 'constants' to be a non-empty array`,
ARRAY_LENGTH: `Enum expected argument 'constants' to have even length`,
NAME: (c, i) => {
return 'Enum constants must... |
/**
* runtime Text renderer
* renders a mobiledoc to Text
*
* input: mobiledoc
* output: Text (string)
*/
import ImageCard from '../cards/image';
import RENDER_TYPE from '../utils/render-type';
const LINE_BREAK = '\n';
import {
MARKUP_SECTION_TYPE,
LIST_SECTION_TYPE,
CARD_SECTION_TYPE,
IMAGE_SECTION_TYP... |
const debugMod = require( 'debug' );
const program = require( 'commander' );
const packagejson = require( './package.json' );
const server = require( 'express' )();
const Traceroute = require( './traceroute' );
const promclient = require( 'prom-client' );
const EXPORTER_MINIMUM_FREQUENCY = 10000;
const E... |
import './Main.css';
import React from 'react';
import AssetRow from '../AssetRow/AssetRow';
import LiabilityRow from '../LiabilityRow/LiabilityRow';
import CurrencySelector from '../CurrencySelector/CurrencySelector'
class Main extends React.Component {
constructor() {
super();
this.state = {
netWort... |
import React from "react";
import Layout from "../../../layout/Layout";
import { Link } from "react-router-dom";
import { observer } from "mobx-react";
import { Pagination} from "antd";
import RefundStore from "../../../mobx/finance/apidsp/refund-stroe";
import ChongzhiModal from "./modal/chongzhiModal"
import RefundMo... |
$('#agregarMateria').click(function () {
if (validarAux()) {
cantidad = parseFloat($('#aux_cantidad').val())
costo = parseFloat($('#aux_costo').val()).toFixed(2)
material_id = $('#aux_material').find('option:selected').val()
text_material = $('#aux_material').find('option:selected').... |
import React from 'react';
import propTypes from '../../../node_modules/prop-types/index.js';
import defineProperty from '../../../node_modules/@babel/runtime/helpers/defineProperty.js';
import _styled from 'styled-components';
import classCallCheck from '../../../node_modules/@babel/runtime/helpers/classCallCheck.js';... |
// 混合
import { mapState } from 'vuex';
// page
export const pageMixin = {
data() {
return {};
},
created() {
this.mx_setAppPageToolsMap();
return _.isFunction(this.refreshPage) && this.refreshPage();
},
activated() {
const refreshDataCallbackMap = this[this.$Constants.REFRESH_DATA_CALLBACK_MA... |
/**
* This is 1-to-1 rewrite of hyperapp version:
* https://github.com/dangvanthanh/hyperapp-todomvc
*/
import { component, html, key, render } from "1more";
const ENTER_KEY = 13;
const uuid = () => {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => {
const r = (Math.random() * 16) | 0,
... |
import {server as WebSocketServer} from 'websocket';
import http from 'http';
import util from 'util';
import repl from 'repl';
import colors from 'colors/safe';
import Game from './game/main.js';
const MAX_CONCURRENT_CONNECTION = 2;
var game = new Game();
// Default is false. Set to the connection if the server i... |
'use strict';
const fs = require('fs');
const path = require('path');
const async = require('async');
exports.register = function () {
this.outbound = require('../outbound');
this.queue_dir = require('../outbound/queue').queue_dir;
}
exports.hook_capabilities = function (next, connection) {
if (connecti... |
const { path, datatypes: { isString }} = require('@vuepress/shared-utils')
const checkFile = (file, key) => {
if (isString(file)) {
return key === file
} else if (Array.isArray(file)) {
return file.includes(key)
} else if (file && typeof file === 'boolean') {
return true
} else {
return false
... |
/* 声明全局变量 */
var bookId = undefined;
var bookIds = {};
const DefaultBackupName = "默认设置"
const StorageErrorMsg = "存储出错"
const BackupKey = "backup";
window.shelfForPopup = {shelfData: undefined};
//用于记录 popup 是否请求复制目录
var isCopyContent = false
const DefaultRegexPattern = {replacePattern:'',checked:false}
var mpTempData =... |
// Copyright 2019-2021, University of Colorado Boulder
/**
* Visual representation of the effective E-field (E_effective) between the capacitor plates.
*
* @author <NAME> (PixelZoom, Inc.)
* @author <NAME> (PhET Interactive Simulations)
* @author <NAME> (PhET Interactive Simulations)
*/
//modules
import Proper... |
var path = require('path');
var express = require('express');
var bodyParser = require('body-parser');
var port = process.env.PORT || 8000;
var cors = require('cors');
var logger = require('morgan');
var knex = require('./db/knex');
const bookshelf = require('bookshelf')(knex);
var app = express();
app.set('views', p... |
const fs = require('fs');
const MAGIC = "\xda\x1ameta";
const MAGIC_LEN = 6;
const MAJOR_VERSION = 1;
const MINOR_VERSION = 0;
let toRealString = (b) => {return b.toString()};
let toByte = (b) => {return b.readUInt8()};
let toUInt32 = (b) => {return b.readUInt32BE()};
let toUInt64 = (b) => {return b.readDoubleBE()};... |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-fetches'
import {
isAInvalidFileSize,
isAInvalidDimension,
isAInvalidExtension,
} from '_components/utils/file-validations'
import DialogCaptureImage from '_components/organisms/dialog-capture-image'
import... |
import React, { Component } from 'react';
import { I18n } from 'react-i18next';
import Checkbox from '../Checkbox/Checkbox';
import styles from '../OrderInitial.scss';
import { Helmet } from 'react-helmet';
import styled from '@emotion/styled';
import OrderPreReleased from '../../OrderPreReleased/OrderPreReleased';
imp... |
import React, { Component } from 'react';
import ReactDOM from "react-dom";
import "../css/Stage.css";
// 获取图片的相关数据
let imageDatas = require('../data/imgData.json');
// 将图片名信息转成路径信息
imageDatas = ((img) => {
for (let i = 0, j = img.length; i < j; i++) {
let singleImgData = img[i];
singleImgData.img... |
// Unchanging variables
const Discord = require('discord.js');
const client = new Discord.Client();
const fs = require('fs');
const fileName = "./store/reactions.json";
// Bot config
const config = require('./config.json');
const prefix = config.prefix;
client.config = config;
client.once('ready', () => console.log('R... |
import React, { Component } from 'react';
import {
StyleSheet,
View,
Dimensions,
LayoutAnimation
} from 'react-native';
import { Input, Button } from 'react-native-elements';
import { colors } from '../common/theme';
import language from '../common/language';
import languageJSON from '../common/la... |
module.exports = {
toggleSkipState
};
/* TODO: Why need this settings in the config? Remove it and change to global variable in this file */
if (!store.has('settings.skipscenes')) {
store.set('settings.skipscenes', false);
}
let skipScenes = store.get('settings.skipscenes');
/* extend loacales words */
let i18nP... |
var place_num = 0;
$(document).ready(function () {
get_data();
$('#btn_send').click(function () {
var selected_place = $('.btn_div.row').attr('id');
selected_place = Number(selected_place.substring(selected_place.length - 1));
set_data(selected_place);
});
});
function dropdow... |
// Game Board
let gameBoard = [0,0,0,0,0,0,0,0,0];
// Variable to see if game is still going
let gameStillGoing = false;
// The winner of the game
let winner = null;
// The line that displays winner
const winnerLine = document.querySelector("#winner");
// html squares
const squares = document.querySelectorAl... |
function generateStars(el, numb , width = "12px" , isReadonly = true , isCustom = '' , rateFill = '#fcfc0d'){
el.rateYo({
rating: numb,
starWidth: width,
ratedFill: rateFill,
normalFill: '#c5c9cc',
spacing: '4px',
fullStar: true,
readOnly: isReadonly,
... |
import React, {Component, PropTypes} from 'react';
import {Row, Col, Card, Tabs, Select, Checkbox, Popconfirm, Button, Icon,Upload, Table, Form, Input, InputNumber, DatePicker, Divider, Modal, Tooltip, AutoComplete, message} from 'antd';
import ReactDOM from 'react-dom';
import moment from 'moment';
import {baseAddress... |
// import { SIGN_OUT_SUCCESS } from 'src/auth/action-types';
const SIGN_OUT_SUCCESS = 'SIGN_OUT_SUCCESS';
import {
CREATE_FLIGHT_SUCCESS,
REMOVE_FLIGHT_SUCCESS,
FILTER_FLIGHTS,
LOAD_FLIGHTS_SUCCESS,
UPDATE_FLIGHT_SUCCESS,
UNLOAD_FLIGHTS_SUCCESS,
} from './action-types';
import moment from 'moment'; // 2.20... |
//Polyfills
if (!String.prototype.startsWith) {
String.prototype.startsWith = function(searchString, position){
return this.substr(position || 0, searchString.length) === searchString;
};
}
Number.isFinite = Number.isFinite || function(value) {
return typeof value === 'number' && isFinite(value);
};
co... |
const errors = require('arsenal').errors;
const assert = require('assert');
const config = require('../../../conf/Config');
const ObjectQueueEntry = require('../../../lib/models/ObjectQueueEntry');
const BackbeatTask = require('../../../lib/tasks/BackbeatTask');
const BackbeatMetadataProxy = require('../utils/Backbea... |
var EPSILON = 0.000001;
function Camera(){
this.HALF_PI = Math.PI/2;
this.VEC4_1 = glMatrix.vec4.fromValues(1,0,0,0);
this.VEC4_2 = glMatrix.vec4.fromValues(0,1,0,0);
this.VEC4_3 = glMatrix.vec4.fromValues(0,0,1,0);
this.VEC4_4 = glMatrix.vec4.fromValues(0,0,0,1);
this.VEC3_1 = g... |
const fs = require('fs');
const path = require('path');
const util = require('ys-utils');
const cluster = require('cluster');
const IPCMessage = require('ipc-message');
const childprocess = require('child_process');
const debug = require('debug')('mutify:master');
const agentWorkerFile = path.resolve(__dirname, './age... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
const qiniu = require('qiniu-js')
import request from "@/utils/request"
let uploadMsg = {
ingredientForm: [],
ingredientFormStr: [],
_ingredientForm: [],
hazardForm: [],
hazardFormStr: [],
_hazardForm: [],
tagFile: [],
tagFileStr: [],
_tagFile: [],
officialDocuments: [],
officialDocumentsStr: [],... |
/*!
* Copyright (C) 2015 SequoiaDB Inc.
*
* 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 applic... |
import Hammer from 'hammerjs';
import * as PIXI from 'pixi.js';
import { mapEvents, eventListeners, MapDataManipulator, utils } from '../../core/index';
/*-----------------------
-------- PUBLIC ---------
-----------------------*/
/**
* Pixelized minimap works in situations, where you map a symmetrical map. E.g. hex... |
const t = {}
t.loading = 'Loading...'
t.brand = {}
t.brand.lg = 'D2Admin Fish'
t.brand.mini = 'Fish'
t.add = 'Add'
t.delete = 'Delete'
t.deleteBatch = 'Delete'
t.update = 'Edit'
t.query = 'Query'
t.export = 'Export'
t.handle = 'Action'
t.confirm = 'Confirm'
t.cancel = 'Cancel'
t.logout = 'Sign Out'
t.prompt = {}
t.... |
// Map widget that searches for "places" with the Google Maps API.
// Provides a map load event with argument `map`.
// Provides a place change event with argument `place`.
// Example where parentMapFunction and parentPlaceFuntion are defined within
// the calling scope:
// <div nep-place-search
// on-map-load="... |
'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 from "react";
import { Tabs, Tab, Table, TextInput, Select } from "react-materialize";
import { connect } from "react-redux";
import {
getReviews,
updatePreferredName,
updatePreferences,
} from "../store/user";
import { setReviews } from "../store/reviewList";
import ReviewList from "./ReviewList";
i... |
var token = $('input[name="_token"]').val();
function resetSubcategoryTable () {
$(".sub-category-main-c").css('display','block');
$(".category-table-dis").css('display','none');
$(".category-table-dis").find('tbody').html('');
$(".category-name-search").val('');
$(".subcategory").css('display','block... |
const User = require('../app/models/user')
const Swipe = require('../app/models/swipe')
const socketObj = require('../config/socketObj')
const db = require('../app/models/')
let currentUser = 'no user connected';
let online = socketObj.getAllConnections();
module.exports = function(app, passport, io) {
// show th... |
/*
* Interpol (HTML Composition Language)
* Licensed under the MIT License
* see doc/LICENSE.md
*
* @author <NAME> (kode4food.it)
*/
"use strict";
var nodeunit = require('nodeunit');
var interpol = require('../lib');
var evaluate = interpol.evaluate;
exports.lists = nodeunit.testCase({
"List comprehensions":... |
import { currentTriggerDefinition } from "../triggers";
import { getAP, andJoin } from "../util";
import {
getResistCost,
getLegalChoicesForStep,
unwrapSecrets,
validateTargetCombination
} from "../targets";
import log from "../log";
import { targetMode } from "../cardinfo";
import { getObliterateTargets } from... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va... |
'use strict'
var Config = require('../config')
var FB = require('../connectors/facebook')
var {Wit, log} = require('node-wit')
var MyWit = require('./WitHTTPApi')
var request = require('request')
var sqlite3 = require('sqlite3').verbose()
var db = new sqlite3.Database('./database.db')
var firstEntityValue = function... |
//var debugMode = true;
if (!window["debugMode"]) {
window["debugMode"] = false;
}
var hasInjected = false;
var sessionKey = "WebGLInspectorEnabled" + (debugMode ? "Debug" : "");
function getExtensionURL() {
if (window["chrome"]) {
return chrome.extension.getURL("");
} else if (window["sa... |
/*
* grunt-html-fragment
* https://github.com/gexiaowei/grunt-html-fragment
*
* Copyright (c) 2015 <EMAIL>
* Licensed under the MIT license.
*/
'use strict';
var cheerio = require('cheerio');
var path = require('path');
var os = require('os');
module.exports = function (grunt) {
var isWin = (os.platform()... |
import React, { useState, useEffect, useCallback, useRef } from 'react'
import { useEventListener } from '../hooks/useEventListener.js'
import IsDevice from './IsDevice.js'
function CursorCore({
color = '204, 255, 255',
outerAlpha = 0.3,
innerSize = 8,
innerScale = 0.7,
outerSize = 8,
outerScale = 5,
}) {
... |
import { request } from './network.js';
import env from './env.js';
import { removeError } from './form_validation.js';
const urlParams = new URL(window.location).searchParams;
const checkin = document.querySelector('#check-in');
const checkout = document.querySelector('#check-out');
let selecting = false;
let current... |
// MIT License
// Copyright (c) 2020 theqoobee, qoobes
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modif... |
#!/usr/bin/env node
import fs from 'fs';
import prompt from 'prompt';
import requestLib from 'request';
import colors from 'colors/safe';
const ENDPOINT = process.argv[2] || 'http://iotlogic.kkiro.kr/';
let user = null;
let devices = null;
let device = null;
const request = requestLib.defaults({
jar: true,
base... |
/*
Copyright 2015 OpenMarket Ltd
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, software
... |
// Allows users to create a sequence that keeps repeating. Example use case: to test out melodies.
var NeedsTimingInfo = true;
var activeNotes = [];
function HandleMIDI(event) {
if (event instanceof NoteOn) {
// add note to array
activeNotes.push(event);
}
// else if (event instanceof NoteOff) {
// // remove... |
// Modifications copyright 2020 Caf.js Labs and contributors
/*!
Copyright 2013 Hewlett-Packard Development Company, L.P.
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.or... |
var ct = require('cotest'),
P = require('../dist/index.js')
if (!P.D) {
// @ts-ignore
var JSDOM = require('jsdom').JSDOM //eslint-disable-line global-require
var win = (new JSDOM).window
P.setDocument(win.document)
}
var el = P.element
function toString(nodes) {
var str = ''
if (nodes) for (var i=0; i<nodes... |
const include = require('../lib/include') (module);
const sg = include('@cdr0/sg') || require('@cdr0/sg');
const debug = require('./debug');
const {_} = sg;
const {
promisify,callbackify
} = ... |
/**
* Copyright 2018 <NAME>. This source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*
* Main file for the KGBot
*
* @author <NAME> <zacklukem#7074>
*
*/
const fs = require('fs');
const Discord = require('discord.js');
const logg... |
/*global Common, Capture */
/* jshint unused: true */
var REQUEST_TIMEOUT = 60 * 1000;
// var clearHashHosts = [];
var handleRequestTypes = ['main_frame', 'sub_frame', 'xmlhttprequest'];
var connections = [];
var listeningTabs = {};
var tabsObj = {};
var popup = {
runOnLoads: []
};
chrome.browserAction.setBadgeT... |
import { useEffect, useState } from 'react';
import Confetti from 'react-confetti';
import Loader from 'react-loader-spinner';
import keepit from '../images/keepit.png';
import Running from '../images/WealthyNaiveHorseshoecrab-max-1mb.gif';
import StopRunning from '../images/Stop_running.png';
import './practice.css';
... |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import InstructorApiCalls from '../../javascript/InstructorApiCalls'
import Course from './Course'
import Button from 'react-bootstrap/Button'
import LoadingScreen from '../loading/LoadingScreen'
import Toolbar from '../menu/Toolbar'
import Cre... |
"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 no-script-url */
import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import { Row, Col, Card, Form, Input, Modal, Button, message, Popconfirm, Icon } from 'antd';
import StandardTable from '@/components/StandardTable';
import { formItemLayout, formLayout } from '@/u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.