text stringlengths 3.07k 16k |
|---|
import { Context } from "../components/Store";
import { useContext, useEffect, useState } from "react";
import { makeStyles } from "@material-ui/core/styles";
import Grid from "@material-ui/core/Grid";
import Paper from "@material-ui/core/Paper";
import Chat from "../components/Chat";
import TextField from "@material-u... |
"use strict";
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
exports.__esModule = true;
exports.randomWithoutSeed = randomWithoutSeed;
exports.arrayShuffle = arrayShuffle;
exports.getRandomFunc = getRandomFunc;
exports.Random = void 0;
var _values = _interopRequireDefau... |
const express = require("express");
const bodyParser = require("body-parser");
const session = require("express-session");
const RedisStore = require("connect-redis")(session);
const bcrypt = require("bcrypt");
const NodeRSA = require("node-rsa");
const db = require("./lib/db");
const Post = require("./lib/Post");
con... |
import handleForms from "./forms.js"
// LTS Form content
const ltsFormContent = `
<label class="sidebar-form-label stacked-inputs">
<input type="checkbox" class="sidebar-form-checkbox" data-layer-type="filter" data-legend-type="lts" name="existing-conditions" value="lts-1" checked>
LTS 1
</labe... |
import React, { Component, Fragment } from "react";
import { TableBody } from "@material-ui/core";
import Header from "./header";
import Row from "./row";
import PinnedTable from "./PinnedTable";
import DialogTable from "./DialogTable";
import { StyledTable, StyledTableHead } from "./TableStyles";
class ... |
"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... |
var splits = null;
const dom = new DOMParser();
async function dropHandler(event) {
event.preventDefault();
if (event.dataTransfer.items) {
for (let i = 0; i < event.dataTransfer.items.length; i++) {
if (event.dataTransfer.items[i].kind == 'file') {
let file = event.dataTransfer.items[i].getAsFile();
le... |
/**
*
* WebSocketPage
*
*/
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { compose } from 'redux';
import { useInjectSaga } from 'utils/injectSaga';
import { useInjectReduce... |
import { Form, Input, Button, Divider, Select, InputNumber, Icon } from 'antd';
import React from 'react';
import { FormattedMessage } from 'react-intl';
import {
isRequired,
isMaxLength,
normalizeEmptyString,
} from '@/modules/shared/helpers/errors/formValidations';
import withEnhancedForm from '@/modules/shared... |
import styled from 'styled-components';
export const ArticleContainer = styled.article`
grid-column: span 3;
padding: 0;
font-family: "Helvetica Neue",Helvetica,Arial,Sans-Serif;;
font-weight: 400;
border-bottom:none;
color: black;
@media (max-width: 900px){
/* featured item on the right */
grid... |
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const math = require('remark-math');
const katex = require('rehype-katex');
/** @type {import('... |
import lux from "lux.js";
import { extend, set as _set, get as _get, all, cloneDeep, pick as _pick, reduce as _reduce } from "lodash";
import projectStore from "./projectStore";
// overwrite existing selections with those provide - used to clear child values in cascading logic
function updateSelections( store, updated... |
const superagent = require("superagent");
const Util = require('./Util');
/**
* HexoDB -
* Your own database, maintained on Glitch or Repl.it
* Created by Fizuku | Fizx | FizxCreations.
*/
class Database {
/**
* Creates HexoDB instance
* @param {string} HexoShard Repl.it project domain
* @... |
import React, { Fragment } from 'react';
import _ from 'lodash';
import 'antd/lib/card/style/css';
import 'antd/lib/form/style/css';
import 'antd/lib/button/style/css';
import 'antd/lib/checkbox/style/css';
import 'antd/lib/upload/style/css';
import 'antd/lib/message/style/css';
import 'antd/lib/input-number/style/css'... |
import React, { Component } from 'react';
import window from 'global'
const mySpecialWindowFunction = () => {
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
};
const themes = [
'normal.day',
'normal.day.grey',
'normal.day.transit',
'normal.night',
'normal.night.grey',
'reduced.night',... |
import React from "react";
import Box from "@material-ui/core/Box";
import Typography from "@material-ui/core/Typography";
import { useApi } from "common/utils/api";
import { useHistory, useLocation } from "react-router-dom";
import {
broadCastChannel,
useStoreSyncedWithLocalStorage
} from "common/utils/store";
im... |
const TOKEN_KV_KEY_PREFIX = 'token:'
const TOKEN_HOST_PERMISSIONS = ['view', 'update']
export class Token {
constructor(id, info) {
this.id = id
this.name = info.name || null
this.description = info.description || null
this.type = info.type
const permissions = info.permissions || {}
this.hos... |
//const { cv, imdecode,cvTranslateError } = require('opencv-wasm');
//const {imdecode} = require('./opencv.js');
//const cv = require("@techstark/opencv-js");
//const cv4node = require('opencv4nodejs');
const { createWorker } = require('tesseract.js');
const PSM = require('tesseract.js/src/constants/PSM.js')
const OEM ... |
import React, { Component } from "react"
import PropTypes from "prop-types"
import Helmet from "react-helmet"
import { StaticQuery, graphql } from "gatsby"
import { MuiThemeProvider, createMuiTheme } from "@material-ui/core/styles"
import Icon from "@material-ui/core/Icon"
import injectSheet from "react-jss"
import Too... |
//=============================================================================
// Yanfly Engine Plugins - Test Play Assist
// YEP_TestPlayAssist.js
//=============================================================================
var Imported = Imported || {};
Imported.YEP_TestPlayAssist = true;
var Yanfly = Yanfly ||... |
import {
getAllUserCollections,
getCollection,
createDeck,
removeFromCollection,
removeCollection
} from '../store/reducers/user.js'
import Collection from './Collection'
import DisplayCard from './DisplayCard'
import {connect} from 'react-redux'
import React, {Component} from 'react'
import Backend from 'rea... |
'use strict'
// I use "const" throughout just like I use 'final' in Java:
// to avoid shooting myself in the foot.
// By convention, I only uppercase the names of true global constants,
// generally strings
const express = require('express');
const exphbs = require('express-handlebars');
const bodyParser = require('... |
var fist;
/** The following is setting up and running codes for the frenzy mode. */
export default new Phaser.Class({
Extends: Phaser.Scene,
initialize:function frenzy ()
{
Phaser.Scene.call(this, { key: 'frenzy' });
},
init: function(data){
//Receiving values from the... |
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/**
* Test controller logic - used by unit test harness to embed tests in
* conent shell.
*/
// Cle... |
import React from 'react'
import PropTypes from 'prop-types'
import moment from 'moment'
import styles from './index.less'
import { Form, TimePicker, Button, Row, Col, DatePicker, Input, Cascader, Switch ,Icon,Select,} from 'antd'
import {wrapAuth} from "../../utils/wrapAuth";
const FormItem = Form.Item;
const MonthPic... |
/***************************************************************************************************
* *
* (c) 2018, 2019 Quantstamp, Inc. This content and its use are governed by the license terms at *
* <https://raw.gi... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const EXPORTED_SYMBOLS = ["S4EToolbars"];
const CI = Components.interfaces;
const CU = Components.... |
import React, { Component, PropTypes } from 'react';
import WebpackBinEditor from './editor';
import WebpackBinViewer from './viewer';
import DefaultLoaders from './loaders';
const COMP_VERSION = 2;
class WebpackBinComponent extends Component {
upgradePropsVersion1toVersion2 = (props) => {
const { selectedIndex... |
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
toastr.options = {
"closeButton": true,
"debug": true,
"newestOnTop": true,
"progressBar": false,
"positionClass": "toast-top-right",
"preventDuplicates": false,
"onclick": null,
... |
import React, {Component} from 'react';
import Urls from './components/Urls';
import './App.css';
class App extends Component {
constructor(props) {
super(props);
this.state = {
urls: [],
url: 'https://www.govt.nz/',
updateTimerId: -1
};
this.h... |
import React from 'react';
import {Link} from 'react-router-dom';
import Base from '../components/Base';
import {ChangePostTextField, ChangePostImage, ViewPostInDetail, DeletePost} from '../helper/coreApiCalls';
import { IsAuthenticated } from '../../auth/helper';
import { CKEditor } from '@ckeditor/ckeditor5-react';
i... |
const configureGAM = require('@endeavor-business-media/package-shared/config/gam');
const config = configureGAM({ basePath: 'LEDS' });
config
.setAliasAdUnits('default', [
{ name: 'lb1', templateName: 'LB1', path: 'default/lb1' },
{ name: 'lb2', templateName: 'LB2', path: 'default/lb2' },
{ name: 'rail1... |
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var realms = [Realm.current(), Realm.create()];
// Check stack trace filtering across security contexts.
var thrower_script =
"(function () { Realm... |
import { Dialog, Transition } from '@headlessui/react';
import { Fragment, useState } from 'react';
import { Plus, XSquare } from 'react-feather';
import { useForm } from 'react-hook-form';
import toast from 'react-hot-toast';
import { axios } from '../../axios';
import { useFormElement } from '../../store/form_elemen... |
import { wipeDatabase, removeIndexes, postQuery, updateHash} from 'utilities/DBConnection'; //
import request from 'superagent';
import {SET} from 'reducerActions';
import _ from 'lodash';
//Import json from local file. Await for database to be wiped via promise before continuing..
export function importJSON(dataFile... |
#! /usr/local/bin/node
/*jslint node:true */
// provisionKvm.js
// ------------------------------------------------------------------
// load a JKS into Apigee Edge KVM
//
// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in complianc... |
import React from 'react'
import Markdown from 'react-markdown'
import { memoize } from 'memo'
import { emptyS, emptyA, emptyO } from 'utils'
import { applyTemplate } from 'templates'
import { repr } from 'tables'
import { compileActive } from 'workflow'
import Input from 'Input'
import Bool3 from 'Bool3'
import Mar... |
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import annotationSelector from '../../../state/selectors/visualization/annotation-selector';
import columnSelector from '../../../state/selectors/visualization/columns-selector';
import dimensionSelector from '../../../state/selectors/visualiza... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... |
// ______ ____ ___ _______ __________ ______ ____ ______________
// __/ _ \/ __ \/ _ )/ __/ _ \/_ __/ __ \ _/ _ |_/ /__/ __/ __/ _/
// _/ , _/ /_/ / _ / _// , _/ / / / /_/ / / __ |/ /__/ _/_\ \_/ /
// /_/|_|\____/____/___/_/|_| /_/ \____/ /_/ |_/____/___/___/___/
//
// -
// Jean_Tinguely 0.1 by Roberto [jea... |
const fs = require("fs");
const path = require("path");
const mkdirp = require("mkdirp");
const resolveFrom = require("resolve-from");
const fastGlob = require("fast-glob");
const parseUrl = require("url").parse;
const through = require("through2");
const toString = require("stream-to-string");
const getHrefs = require... |
// Code that is no longer used, which might be useful in the future.
//
// True, it could be fetched out of git history, but it's easier to keep track
// of useful chunks this way, without cluttering the code with commented out
// regions.
// TODO: add issue tracker link.
var TEMP_ITEM_TEXT =
'todoist-shortc... |
const teacher9 = new MapObject(53),
desk901 = new MapObject(2),
desk902 = new MapObject(2),
desk903 = new MapObject(2),
desk904 = new MapObject(2),
desk905 = new MapObject(2),
desk906 = new MapObject(2),
desk907 = new MapObject(2),
desk908 = new MapObject(2),
desk909 = new MapObject(2),
de... |
import { Inputs, Events, SFX } from '../Constants';
import BaseBrain from './BaseBrain';
import TetrominoManager from './TetrominoManager';
import Grid from './Grid';
import { AttackBlock } from './Block';
const KEY_REPEAT = function(inputCode){
const arrowRepeat = 10;
switch (inputCode){
case Inputs.Rotate:
... |
/** @license ISC License (c) copyright 2017 original and current authors */
/** @author <NAME> (evil) */
var VERSION = 3
var _defineUnion = require('../core/defineUnion')
var _equals = require('../core/equals')
var _implements = require('../core/implements')
var _innerConcat = require('../core/innerConcat')
var _insp... |
const URL_ENCRYPT = 'https://guyujiezi.com/api/encrypt';
const URL_NONCE = 'https://guyujiezi.com/api/nonce';
const FONT_NAME = '思源黑体';
Zepto($ => {
let background = chrome.extension.getBackgroundPage();
let calcShadowtextCapacity = (shadowtext) => {
let list = shadowtext.split('');
let dedupli... |
// csrf_token is defined in html
var slots = [];
var dates = [];
var datesToSlotsMap = new Map();
var slotsMap = new Map();
var calendar_data = "";
function Slot(d, s, e, id) {
this.date = d;
this.startTime = s;
this.endTime = e;
this.id = id;
}
function timeSlotClicked(d, s, e, id) {
var p = doc... |
const fileUpload = require('express-fileupload');
const path = require('path');
const fs = require("fs")
const express = require("express")
const morgan = require("morgan")
// let __path = path.join(__dirname,"../files/")
const bodyParser = require("body-parser");
const { stratify } = require('d3');
const Fit = requi... |
import React , { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import {Link, hashHistory} from 'react-router';
import *as goodsActions from '../js/actions/goodsAction';
import GoodsCell from '../components/goodsCell';
import Loading from '../components/l... |
/*eslint-env node*/
/**
* @module Server:Storage:Redis
* @author pmeijer / https://github.com/pmeijer
*/
'use strict';
var redis = require('redis'),
Q = require('q'),
RedisProject = require('./redisproject');
// Data structure (for projectId guest+test):
// guest+test = hashMap(objectHash, objectStr)
// g... |
'use strict';
module.exports = {
meta: {
type: 'layout',
fixable: 'code',
docs: {
description: 'Enforces consistent decorator position on properties and methods',
category: 'Style',
recommended: true,
url:
'https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/... |
'use strict';
let request = require('request-promise');
let iconv = require('iconv-lite');
let cheerio = require('cheerio');
let upload = require($ROOT + '/base/qiniu');
let async = require('async');
let conf = require('./config.json');
let Mongo = require($ROOT + '/mongo');
let baseUrl= 'http://www.mm131.com/';
let i... |
import React from 'react';
import { cleanup, fireEvent } from 'react-testing-library';
import 'jest-dom/extend-expect';
import TimespanInlineForm from '../TimespanInlineForm';
import { renderWithRedux, testSmData } from '../../services/testing-helpers';
import Peaks from 'peaks';
// Set up a redux store for the tests
... |
import {assign, isArray, isObject, isDate, isEqual, secureHtml, MapList} from '../utils';
import pipe from '../pipe';
/**
* scope服务
* @param param0
*/
const scope = ({$ctx}) => {
const factory = (obj) => {
let series = {};
let watchers = new MapList;
return assign(Object.create({
$create(obj)... |
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
import { VRM } from '@pixiv/three-vrm';
import { VRMSchema } from '@pixiv/three-vrm';
import { VRMUtils } from '@pixiv/three-vrm';
import * as THREE from 'three';
import Logger from '../../utils/Logger.js';
import PositionDiffBuffer from '../PositionDi... |
'use strict';
var path = require('path');
var log = require('../log');
var config = require('../config-options');
var fileutils = require('../file-utils');
var StringBuilder = require('../string-builder');
var Makefile = require('./makefile');
var MakeRule = require('./make-rule');
var MakeVariable = require('./make... |
function createMapDiagram(node, holder, settings) {
if (node === undefined || node === null) {
return;
}
// Array
if (Array.isArray(node)) {
var arrayHolder = $("<div/>", {
class: "traceryparse-array map-array",
}).appendTo(holder);
if (settings.classes) {
arrayHolder.addClass(se... |
'use strict';
// proof of life?
console.log('Hello world!');
// create hours array
let hourOfDay = ['6 a.m.', '7 a.m.', '8 a.m.', '9 a.m.', '10 a.m.', '11 a.m.', '12 a.m.', '1 p.m.', '2 p.m.', '3 p.m.', '4 p.m.', '5 p.m.', '6 p.m.', '7 p.m.'];
// element 'cookieSales' from table in sales.html
let listOfCookies = do... |
document.querySelector('form').addEventListener('submit', submit);
let sample = [];
// let sample = [
// { x:110, y: 44, r: 10 },
// { x:116, y: 31, r: 10 },
// { x:124, y: 43, r: 10 },
// { x:129, y: 45, r: 10 },
// { x:131, y: 56, r: 10 },
// { x:138, y: 79, r: 10 },
// { x:142, y: 57, r:... |
var THERAHint = (function (undefined) {
var THERAHint = {};
THERAHint.version = '@VERSION';
THERAHint.release = '@RELEASE';
THERAHint.rules = {};
//默认配置
THERAHint.defaultRuleset = {
'tagname-lowercase': true,
'attr-lowercase': true,
'attr-value-double-quotes': true,
// 'doctype-first': t... |
import React from 'react'
import PropTypes from 'prop-types'
import { withStyles } from '@material-ui/core/styles'
import { connect } from 'react-redux'
import { updateUserById } from '../store/actions/usersActions'
import {
CssBaseline,
FormGroup,
FormControlLabel,
TextField,
Button,
Checkbox,
Paper,
T... |
/* eslint-disable react-hooks/rules-of-hooks */
import React, { useState } from 'react'
import { useRouter } from 'next/router'
import { server } from 'config'
import fetch from 'libs/fetch'
import { format } from 'date-fns'
import Link from 'next/link'
// components
import ListTable from 'components/Tables/ListTable.... |
/**
* # authpost
*
*
* This library contains low-level methods for communicating with the Samurai
* payment gateway. You should never need to access these methods directly.
*
* The `makeRequest` method is used to send requests to the gateway using the
* credentials that have been set using the `config.configur... |
import Matrix4 from '../vector/matrix4.js';
import Color from '../vector/color.js';
const Shape = {
Circle(sprite, vetices) {
let length = ((sprite.width + sprite.height) / 20) | 0;
let radian = (2 * Math.PI) / length;
let cx = 0.5;
let cy = 0.5;
let rx = 0.5;
let ry = 0.5;
if (sprite.clip) {
rx = sp... |
import React from 'react'
import ReactHtmlParser, { processNodes, convertNodeToElement, htmlparser2 } from 'react-html-parser'
import Link, { withPrefixSVG } from '../../utils/temp-link'
import lazy from 'lazy.js'
import styles from './CountyMaps.module.scss'
import VIEWBOXES from '../../../data/viewboxes_offshore.y... |
/* eslint-disable react/prop-types */
import React, { Component } from 'react';
import { graphql } from 'gatsby';
import Img from 'gatsby-image';
import BackgroundImage from 'gatsby-background-image';
import { Col, Container, Row } from 'react-bootstrap';
import parse from 'html-react-parser';
import Layout from '../co... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.bulmaColorTools = exports.stringToHsl = exports.strValFromColorDef = exports.getNameValFromColorDef = exports.newRgb = exports.newHsl = void 0;
const Color = require("color");
function lightness(color) {
return color.hsl().color[2]... |
/** Action Creators:
* https://redux.js.org/basics/actions#action-creators
*/
import {
CLEAR_VIEWPORT,
SET_ACTIVE_SPECIFIC_DATA,
SET_SERVERS,
SET_VIEWPORT,
SET_VIEWPORT_ACTIVE,
SET_VIEWPORT_LAYOUT,
SET_VIEWPORT_LAYOUT_AND_DATA,
SET_USER_PREFERENCES,
} from './constants/ActionTypes.js';
import {
E... |
Ti.include(Titanium.Filesystem.resourcesDirectory + "helpers/apiHelper.js");
Ti.include(Titanium.Filesystem.resourcesDirectory + "controls/RightMenu.js");
Ti.include(Titanium.Filesystem.resourcesDirectory + "constants/appConstants.js");
var globals = require('globals').Globals;
var styles = require('globals').Styles;
... |
'use strict';
let gulp = require('gulp');
const fileinclude = require('gulp-file-include');
const server = require('gulp-server-livereload');
let cleanCSS = require('gulp-clean-css');
let uglify = require('gulp-uglify-es').default;
let fs = require('fs');
let criticalCss = require('gulp-penthouse');
let gcmq = require(... |
//1. String concatenation
console.log(`string literals: 1+2=${1 + 2}`);// string literals: 1+2=3
console.log('my' + 'cat'); //mycat
//2. Numeric operators
console.log(1 + 1);//add : 2
console.log(2 ** 3); //exponentiation : 8
//3. Increment and decrement operators
let counter = 2;
const preIncrement = ++counter;
cons... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Carousel = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _react = _interopRequireWildcard(require("react"));
var _Array = require("fp-ts/lib/Array");
var _exports = require("../../hel... |
import React, { Component } from 'react'
import { Link } from 'react-router-dom'
import Nav from './navbar'
import axios from 'axios'
class Register extends Component {
constructor(props){
super(props);
this.state = {
name: '',
address: '',
city: '',
... |
import OutsideClickHandler from "react-outside-click-handler";
import React, { useState, useEffect, useRef } from "react";
import { ChromePicker } from "react-color";
import { Controlled as CodeMirror } from "react-codemirror2";
import "codemirror/lib/codemirror.css";
import "codemirror/mode/javascript/javascript";
i... |
import { combineReducers } from 'redux-immutable'
import {
SUBMIT_LOCALLY,
RESET,
DELETE
} from './actions';
import WAOs from '../util/WAOs';
import SearchBagUtil from '../util/SearchBagUtil';
import { reducer as reduxFormReducer } from "redux-form/immutable";
import Common from '../util/common';
import {a... |
/**
* const prefixCls = 'style-293578';
* const images = '/static/images/src/event/redPacket/Register';
* @Author: czy0729
* @Date: 2018-11-19 10:17:30
* @Last Modified by: czy0729
* @Last Modified time: 2018-11-19 10:19:23
* @Path bt_mb_new /src/event/redPacket/Register/index.js.git
*/
import React from 'react... |
var Promise = require("bluebird")
var fs = require('fs')
Promise.promisifyAll(fs)
var util = require('util')
var path = require('path')
var crypto = require('crypto')
var colors = require('colors')
var express = require('express')
var multiparty = require('multiparty')
var bodyParser = require('body-parser')
var g... |
window.CP.PenTimer.MAX_TIME_IN_LOOP_WO_EXIT = 6000;
var image = null;
var ImageGray = null;
var ImageSkyblue = null;
var ImageRed = null;
var ImageRainbow = null;
var OriginalImage = null;
function UploadImage() {
//alert("Your file loaded!");
var fin = document.getElementById("user");
//var filename = fin.val... |
import React from 'react';
import PropTypes from 'prop-types';
import reducer, {initialState} from '../reducer/reducer';
import {SimpleDragDropContext} from '../context';
import {
onDragEndAC,
onDragStartAC,
onMovingAC,
onRevalidatedAC,
registerDroppableItemAC,
unregisterDroppableItemAC,
updateElementPosi... |
var async = require('async');
var helpers = require('../../helpers');
var badCiphers = [
'Protocol-SSLv2',
'Protocol-SSLv3',
'DHE-RSA-AES128-SHA',
'DHE-DSS-AES128-SHA',
'CAMELLIA128-SHA',
'EDH-RSA-DES-CBC3-SHA',
'ECDHE-RSA-RC4-SHA',
'RC4-SHA',
'ECDHE-ECDSA-RC4-SHA',
'DHE-DSS-AES256-GCM-SHA384',
'DHE-RSA-AES... |
import React from "react";
import {
TextField,
Input,
InputAdornment,
Typography,
Container,
CssBaseline,
Grid,
Button,
} from "@material-ui/core";
import ChipInput from "material-ui-chip-input";
import { withRouter } from "react-router-dom";
import { editRecipe, getRecipe } from "../../services/recipes... |
const uuid = PubNub.generateUUID();
const lostPoints = 3;
const plusPoints = 1;
var IS_ONLINE = false;
var mySide = -1;
var channel = 'lobby';
var myName = null;
var myOpponent = null;
var inGame = false;
var games = {};
const pubnub = new PubNub({
publishKey: '<KEY>',
subscribeKey: '<KEY>',
uuid: uuid,
... |
import ReplaceTokens from 'nyc-lib/nyc/ReplaceTokens'
const common = {
getCommunityBoardNum() {
const cBoard = this.get('community_board').toString()
return `${parseInt(cBoard.substring(1))}`
},
getBoroNum() {
const cBoard = this.get('community_board').toString()
return cBoard.substring(0,1)
},
getBoroNam... |
const CLI = require('./cli');
const Template = require('./template');
const parse = require('./parser');
const cp = require('template-copy');
const path = require('path');
const UNKNOWN_TARGET = 'target:unknown';
export default class Make extends CLI {
// Used to generate the help output
get ex... |
import React, { PureComponent } from 'react'
import trans from 'trans'
import queryString from "query-string"
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles/index'
import colors from '../../../../style/colors'
import AppBar from '@material-ui/core/AppBar';
import Logo from 'com... |
import React from "react";
import {
Text,
ActivityIndicator,
View,
StyleSheet,
TouchableOpacity
} from "react-native";
import * as api from "../api";
export default class PlayerCompleteScreen extends React.Component {
state = {
playerName: this.props.navigation.state.params.playerName,
gameName: th... |
import {
assert,
assertEquals,
assertThrows,
assertThrowsAsync
} from "../testing/asserts.js";
import * as path from "../path/mod.js";
import {
isFormFile,
matchAfterPrefix,
MultipartReader,
MultipartWriter,
scanUntilBoundary
} from "./multipart.js";
import {StringWriter} from "../io/writers.js";
cons... |
const apktool = require("./apktool");
const path = require("path");
const fs = require("fs-extra");
const { exec } = require("child_process");
const Discord = require("discord.js");
const SX_REPO = "https://github.com/SxClient/SxClient.git";
const DOWNLOAD_APKTOOL = "https://bitbucket.org/iBotPeaches/apktool/downloads... |
var zoneAPI = "https://api.covid19india.org/zones.json";
var dataAPI = "https://api.covid19india.org/v2/state_district_wise.json";
function loadMapScenario() {
var map = new Microsoft.Maps.Map(document.getElementById('myMap'), {});
Microsoft.Maps.l... |
import { joinRoom, selfId } from "https://cdn.skypack.dev/trystero";
var isChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
var peer = new Peer(selfId);
peer.on("open", function(id) {
console.log("My peer ID is: " + id, selfId);
});
peer.on("connection", handlePeerConnect);
const ... |
var util = require('util'),
path = require('path'),
yeoman = require('yeoman-generator'),
c = require('../lib/common');
var KleiGenerator = module.exports = function KleiGenerator(args, options, config) {
yeoman.generators.Base.apply(this, arguments);
this.argument('modulename', { type: String, requi... |
// generated on 2020-03-06 using generator-webapp 4.0.0-8
const { src, dest, watch, series, parallel, lastRun } = require('gulp');
const gulpLoadPlugins = require('gulp-load-plugins');
const browserSync = require('browser-sync');
const del = require('del');
const autoprefixer = require('autoprefixer');
const cssnano = ... |
// Chat client code.
// Keep track of the last message received (to avoid receiving the same message several times).
// This global variable is updated every time a new message is received.
var timestamp = 0;
// URL to contact to get updates.
var url = null;
// How often to call updates (in milliseconds)
var CallInt... |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styled from 'styled-components';
import { withStyles } from 'material-ui/styles/index';
import GridList, { GridListTile, GridListTileBar } from 'material-ui/GridList';
import Typography from 'material-ui/Typograph... |
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
// Bug 587970 - Provide ability "Update all now" within 'Available Updates' screen
var gManagerWindow;
var gProvider;
function test() {
waitForExplicitFinish();
gProvider = new MockProvider();
gProv... |
import { dispatchCustomEvent, formatTime } from "./utils.js";
import { addTracksToPlaylist, clearPlaylistTracks } from "./playlist/playlist.manage.js";
import { getPlaylistById, createPlaylist, updatePlaylist } from "./playlist/playlist.js";
import { showPlayerMessage } from "./player/player.view.js";
import { initGoog... |
const gooseWidth = 120;
const gooseHeight = 66;
const minSpeed = 0.5; // represents fraction of speed.
const minTime = 3;
// hitbox constants
const headHitboxW = 22;
const headHitboxH = 22;
const headHitboxOffsetX = 86;
const headHitboxOffsetY = 28;
const bodyHitboxW = 36;
const bodyHitboxH = 28;
const bodyHitboxOffse... |
const http = require('http');
const express = require('express');
const cors = require('cors');
const helmet = require('helmet');
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');
const _ = require('lodash');
const log4js = require('log4js');
const Logger = require('./src/utils/L... |
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; va... |
var express = require('express');
var http = require('http');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var session = require('express-session');
var MongoStore = require('conn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.