text stringlengths 3.07k 16k |
|---|
import React, { useState, useContext } from 'react';
import { useHistory } from "react-router-dom";
import API from '../../utils/API';
import UserContext from '../../utils/UserContext';
import MemberTable from '../MembersTable/MemberTable'
import StudentContent from '../StudentContent';
import TeacherContent from '../T... |
import * as React from "react";
import * as Constants from "~/common/constants";
import * as Actions from "~/common/actions";
import * as Events from "~/common/custom-events";
import { css } from "@emotion/react";
import { ButtonPrimary } from "~/components/system/components/Buttons";
const STYLES_MODAL = css`
text... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
View,
TouchableOpacity,
ToastAndroid,
ListView,
TextInput,
TouchableHighlight,
DeviceEventEmitter
} from 'react-native';
import Came... |
import React from 'react';
import {Image, StyleSheet, View, AsyncStorage, ScrollView, ToastAndroid, KeyboardAvoidingView, Text} from 'react-native';
import MaterialButtonPrimary1 from "./login_symbols/MaterialButtonPrimary1";
import MaterialButtonViolet from "./login_symbols/MaterialButtonViolet";
import MaterialCheckb... |
var express = require('express');
var path = require('path');
var logger = require('morgan');
var compression = require('compression');
var methodOverride = require('method-override');
var session = require('express-session');
var flash = require('express-flash');
var bodyParser = require('body-parser');
var expressVal... |
import React, { useEffect, useState, useRef } from "react";
import journalAPI from "../../utils/journalAPI";
import DeleteBtn from "../../components/DeleteBtn";
import { List } from "../../components/List";
import SpeechRecognition, { useSpeechRecognition } from "react-speech-recognition";
import "./style.css"
import d... |
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import Button from '../components/button'
import '../components/card.sass'
import '../components/notice.sass'
import TeamMember from '../components/teamMember'
import TeamSelect from '../components/TeamSelect'
import EditTeam from '../parts/Edi... |
const os = require('os')
const fs = require('fs')
/**
* 获取本机的真实 ip
*/
exports.getIP = () => {
const ifaces = os.networkInterfaces()
const defultAddress = '127.0.0.1'
let ip = defultAddress
for (const dev in ifaces) {
if (ifaces.hasOwnProperty(dev)) {
ifaces[dev].forEach(details =... |
const { Command } = require('discord.js-commando');
const { MessageEmbed } = require('discord.js');
const Pagination = require('discord-paginationembed');
const fetch = require('node-fetch');
const cheerio = require('cheerio');
const { geniusLyricsAPI } = require('../../config.json');
// Skips loading if not fo... |
import React from "react";
import PropTypes from "prop-types";
const SvgComponent = ({ size, width, height, ...otherProps }) => {
if (size !== height) {
width = width * (size / height);
height = height * (size / height);
}
return (
<svg
width={width}
height={height}
viewBox="0 0 37... |
d3.select("input[value=\"option1\"]").property("checked", true);
var svg = d3.select("body")
.append("svg")
.append("g")
svg.append("g")
.attr("class", "slices");
svg.append("g")
.attr("class", "labelName");
svg.append("g")
.attr("class", "labelValue");
svg.append("g")
.attr("class", "lines");
var width = 960... |
'use strict';
var Scalar = require('./scalar'),
UnitTypes = require('./unit-types'),
Unit = require('./units');
/**
* public constructor ScalarFactory()
*
* creates a new instance of a scalar measurement factory, setup
* with all the fixins
*
* @constructor
*/
var ScalarFactory = function SF() {
t... |
function rand_range(a, b){
return Math.floor(Math.random() * (b - a + 1)) + a
}
function range(a, b){
let reversed = false;
if (a > b){
reversed = true;
[a, b] = [b, a]
}
let ran = Array(b - a + 1).fill().map((x, i) => i + a);
return reversed? ran.reverse() : ran;
}
function repe... |
"use strict";
var Cast = require("js/EberonCast.js");
var EbArray = require("js/EberonArray.js");
var CodeGenerator = require("js/CodeGenerator.js");
var ContextType = require("js/ContextType.js");
var EberonContext = require("js/EberonContext.js");
var EberonContextCase = require("js/EberonContextCase.js");
var Ebero... |
// Copyright 2019 Extreme Networks, 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 applicable law or ag... |
$(function () {
var dateFormat = "mm/dd/yy";
from = $("#fromdate")
.datepicker({
dateFormat: 'mm/dd/yy'
})
.on("change", function () {
to.datepicker("option", "minDate", getDate(this));
});
to = $("#todate").datepicker({
... |
const { SlashCommandBuilder } = require("@discordjs/builders");
const { getEmbed } = require("../util/getEmbed");
module.exports = {
data: new SlashCommandBuilder()
.setName("coins")
.setDescription("lista de moedas"),
async execute(interaction) {
interaction.reply({
embeds: [
getEmbed(
... |
var React = require("react");
var fuz = require("fuzzy");
var $ = require("jquery");
var hoverDirectionEnum = {
up: "UP",
down: "DOWN"
};
var getNewHoverElement = function(dir, list, i, $) {
var toReturn;
if(dir === hoverDirectionEnum.up){
toReturn = $(list[(i - 1)]);
return toReturn.length > 0 ? toReturn : $... |
const {describe, it} = global;
import {Meteor} from 'meteor/meteor';
import fs from 'fs';
import {expect} from 'chai';
import _ from 'lodash';
import Promise from 'bluebird';
import opensearch from "@opensearch-project/opensearch";
import ParseContribution from '../parse_contribution';
import request from 'request';
c... |
///////////////////////////////////////////////////////////////////////////////
// CONSTANTS
///////////////////////////////////////////////////////////////////////////////
const SHOW_AXIS_LINES = false;
const NUM_STARS = 100;
const CAMERA_POS = new THREE.Vector3(-15, 10, -40);
const STAR_SOURCE_POS = new THREE.Vect... |
var Utils = require('../../classes/Utils.js');
var XDate = require('../../lib/xdate.dev.js');
var Logger = require('../../classes/Logger.js');
/**
* Parse irssi log string into the LogData object
* @param {LogRelayer} logRelayer
*/
var IrssiReader = function(logRelayer, channelConfig) {
/**
* @type {... |
import React, { Component, Fragment } from 'react'
import PropTypes from 'prop-types'
import Button from '@material-ui/core/Button'
import Dialog from '@material-ui/core/Dialog'
import DialogTitle from '@material-ui/core/DialogTitle'
import DialogActions from '@material-ui/core/DialogActions'
import DialogContent from ... |
"use strict";
// Create classes Watermelon, Firemelon, Earthmelon, Airmelon. Each of them should inherit the abstract class Melon and its functionality.
// Aside from the abstract functionality, each of the Elemelons should have property elementIndex (Number), which is equal to its weight * the string length of its me... |
"use strict";
//----------DECLARACIONES-------------//
// input filter
const searchText = document.querySelector(".js_formInput");
// button
const searchButton = document.querySelector(".js-formButton");
// ul -- donde se pintan series - selecciono donde se pintan
const listSeries = document.querySelector(".js-search... |
/****************************************************************************
Copyright (c) 2018 <NAME>., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free,... |
// Copyright 2016 Circonus, Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
'use strict';
const spawn = require('child_process').spawn;
const path = require('path');
const nad = require('nad');
const settings = require(path.join(nad.li... |
const {promises: fs} = require('fs');
const path = require('path');
const unique = require('array-unique').immutable;
const datauri = require('datauri');
const {JSDOM} = require('jsdom');
const svg2png = require('svg2png');
const xmlserializer = require('xmlserializer');
const fileNameMap = new Map([
...([
'Ton',
... |
const XLSX = require('xlsx');
var socket = require('../../routes/socket.js');
const async = require("async");
const fs = require('fs');
const importDataIntoNeo4j = require("../importDataIntoNeo4j");
var xlsxToNeo = {
extractWorkSheets: function (sourcexlsx, sheetNames, callback) {
var workbook
i... |
import fhirschema from "../fhir_schema/4.0.1/fhir.schema";
let patient = fhirschema.definitions.Patient;
patient.title = "Patient";
patient.type = "object";
// for (let propertyName in patient.properties) {
// // console.log(propertyName)
// if (['resourceType', 'id', 'meta', 'implicitRules', 'language', 'text',... |
/*
Copyright 2019 Google LLC
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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
/*
* Copyright 2018 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
const q = require('daskeyboard-applet');
const request = require('request-promise');
const logger = q.logger;
const queryUrlBase = 'https://api.atlassian.com';
function getTimestamp() {
var d = new Date(Date.now()),
month = '' + (d.getMonth() + 1),
day = '' + d.getDate(),
year = d.getFullY... |
const core = require('@actions/core');
const exec = require('@actions/exec');
const fs = require('fs');
const github = require('@actions/github');
const io = require('@actions/io');
const stream = require('stream');
const ORIGIN = 'licensed-ci-origin';
async function configureGit() {
const token = core.getInput('gi... |
'use strict';
const PAGE_ACCESS_TOKEN = process.env.PAGE_ACCESS_TOKEN || "<KEY>";
//const APIAI_TOKEN = process.env.APIAI_TOKEN;
//const WEATHER_API_KEY = process.env.WEATHER_API_KEY;
const express = require('express');
const bodyParser = require('body-parser');
const request = require('request');
//const apiai = requ... |
import React from "react"
import { DockLayout } from "rc-dock"
import { IonWorldImageryStyle, ProviderViewModel, buildModuleUrl, createWorldImagery, UrlTemplateImageryProvider, Viewer, Ion } from "cesium"
// eslint-disable-next-line
import { createDefaultImageryProviderViewModels } from "cesium"
import { FiLayers, FiL... |
import React, { Component } from "react";
import { connect } from "react-redux";
import { get_chatlist } from '../../../store/actions/Chat/chatList'
//material-ui import
import { Typography, Button, DialogTitle, Dialog, Checkbox, FormControl, FormGroup, FormControlLabel, Divider, Grid, Fab } from "@material-ui/core";
i... |
const parse = require('./parse.js')
const Helpers = require('./helpers')
class Generator {
constructor () {
this.cache = {}
}
genAPI (domain) {
return `/* eslint-disable */
import axios, { AxiosInstance, AxiosResponse } from 'axios'
import qs from 'qs'
let domain = '${domain}'
let axiosInstance = axios.c... |
let lastTabeId = -1;
let TOEFL_LOGIN_URL = urls.login
let TOEFL_HOME_URL = urls.home
let FEEDBACK_URL = apis.feedback
let CAL_API = apis.calculate
let _TASKS={feedback: '验证码识别反馈,获取更多标注过的训练图片'};
let TASK = 'feedback';
let _CODES={};// cache the codes for each tab, key is the tab id
let _RIGHT_COUNT = 0;
// let LISTENERS... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { workspaceName } from '../../actions/workspaceActions';
import { detectWhitespacesAndReturnReadableResult } from '../../helpers/whitespace';
import Dialog from '../Dialog';
import { withStyles... |
//for toggling of cart model
function openPage() {
document.getElementById("product-cart-details").style.display = "block";
}
function closeCart() {
document.getElementById("product-cart-details").style.display = "none";
}
//optimize steps:
// const requestProduct = axios.get("http://localhost:3000/product");
//... |
import external from '../externalModules.js';
import BaseTool from './base/BaseTool.js';
// Drawing
import { draw, drawRect, getNewContext } from '../drawing/index.js';
import clip from '../util/clip.js';
import getLuminance from '../util/getLuminance.js';
import toolColors from '../stateManagement/toolColors.js';
impo... |
const { List, Map } = require('immutable')
const assert = require('chai').assert
const utils = require('demo-utils')
const { toJS, fromJS, getConfig, getNetwork } = utils
const { BuildsManager, Linker, isLink, Deployer, isDeploy, isCompile, isContract,
createBM, Contract }
= require('demo-contract')
const { untilTx... |
//
// mouseLook.js
// examples
//
// Created by <NAME> on 6/16/15
// Copyright 2015 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var lastX = Window.getCursorPositionX();
var lastY = Window.g... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
const index = require('./index-1f3b9bdc.js');
const core = require('@aws-amplify/core');
const authTypes = require('./auth-ty... |
'use strict';
const wrapAnsi16 = (fn, offset) => (...args) => {
const code = fn(...args);
return `\u001B[${code + offset}m`;
};
const wrapAnsi256 = (fn, offset) => (...args) => {
const code = fn(...args);
return `\u001B[${38 + offset};5;${code}m`;
};
const wrapAnsi16m = (fn, offset) => (...args) => {
const rgb ... |
import { config } from '../lib/main.js';
var textEntry;
var textEntry2;
var selected;
class MenuCargar extends Phaser.Scene
{
/**
* Constuctor.
*/
constructor() {
super({key: 'MenuCargar'});
}
/**
* Pre-carga de recursos.
*/
preload() {
}
/**
* Creación de la escena.
*/
... |
/**
* Copyright 2019 Google LLC
*
* 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... |
import some from 'lodash/some';
import { checkRendering } from '../../lib/utils.js';
const usage = `Usage:
var customHitsPerPage = connectHitsPerPage(function render(params, isFirstRendering) {
// params = {
// items,
// refine,
// hasNoResults,
// instantSearchInstance,
// widgetParams,
// }
... |
import React, { useEffect, useState } from 'react';
import TextField from '@material-ui/core/TextField';
import { makeStyles } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import Paper from '@material-ui/core/Paper';
import Typography... |
let imath = require('../base/math.js');
let TouchEvent = require('../event/touchEvent.js');
let VC = require('VCanvas.js');
/**
* 图片拍照上传编辑
* @param {String} id cavnas-id
* @param {Page} pageContext 当前的page对象
* @param {Object} options {width,height}
*/
var Camera = functio... |
class Entity {
entityId;
registry;
constructor(entityId, registry) {
this.entityId = entityId;
this.registry = registry;
}
get id() {
return this.entityId;
}
components() {
return this.registry.getComponents(this.entityId);
}
hasComponent(... |
import {
createElement,
useState,
useContext,
Fragment,
} from '@wordpress/element'
import cls from 'classnames'
import {
Panel,
PanelMetaWrapper,
PlacementsDragDropContext,
getValueFromInput,
} from 'blocksy-options'
import { applyFilters } from '@wordpress/hooks'
import { Slot } from '@wordpress/components'
... |
'use strict';
var _regenerator = require('babel-runtime/regenerator');
var _regenerator2 = _interopRequireDefault(_regenerator);
var _keys = require('babel-runtime/core-js/object/keys');
var _keys2 = _interopRequireDefault(_keys);
var _getIterator2 = require('babel-runtime/core-js/get-iterator');
var _getIterator... |
import React, { Fragment, useState } from "react";
import { BasePicker, MuiPickersUtilsProvider, TimePickerView, Calendar, DatePicker } from "material-ui-pickers";
import moment from "moment";
import MomentUtils from "@date-io/moment";
import { Paper, IconButton } from "@material-ui/core/";
import { makeStyles } from '... |
/* eslint camelcase: 0 */
import pool from '../model/db';
import moment from '../utils/moment';
import queryHelper from '../helper/query';
import guid from '../utils/guid';
import jsonResponse from '../helper/responseHandler';
/**
* @exports
* @class BookingController
*/
class BookingController {
/**
* Add a ... |
import React, { useState, useEffect } from 'react';
import { Column, Row } from 'simple-flexbox';
import { createUseStyles } from 'react-jss';
import MiniCardComponent from 'components/cards/MiniCardComponent';
import TodayTrendsComponent from './TodayTrendsComponent';
import axios from 'axios';
const useStyles = crea... |
import './indices-table.style.scss';
import _ from 'lodash';
import numeral from 'numeral';
let currentPageName = "indicesTableCurrentPage";
let currentPerPageName = "indicesTablePerPage"
let currentSortName = "indicesTableSortedBy";
let currentSortOrder = "indicesTableSortOrder";
class indicesTableController {
... |
/**
* Utility functions for processing positions, dimensions, grid and canvas related stuff
*/
/**
* Returns the position of the stage w.r.t the canvas after scaling and centering
* @param canvasWidth Full canvas width
* @param canvasHeight Full canvas height
* @param stageWidth User-defined stage width
* @para... |
import React, {Component} from "react";
import TextField from '@material-ui/core/TextField';
import Button from '@material-ui/core/Button';
import AddIcon from '@material-ui/icons/Add';
import Icon from '@material-ui/core/Icon';
import IconButton from '@material-ui/core/IconButton';
import DeleteIcon from '@material-ui... |
/*
* Editable HTML Tables, part of the Simple Web Framework
*
* version: 1.4
* license: Apache 2.0
* author: <NAME>
* date: october 2021
*
*/
"use strict";
export { _edtb, version };
function version() {
return "swf edtb v1.4";
}
// Editable Table class management _edtb
// editable cells (td elements) are ide... |
const requestAnimationFrame = window.requestAnimationFrame || window.setTimeout
const animation = function (iterable, done = () => {}, frames = 60) {
let running = true
let frame = 0
function closure(timestamp) {
if (!running) { return }
iterable(timestamp, ++frame, frames)
if (frame < frames) {
... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { isundef, nvl, makeOneLine, tickCount } from '../grid/common.js';
import * as monaco from 'monaco-editor';
import { apiProxy } from '../util/apiProxy.js';
import { LayoutDivider, DividerDirection } from '../component/LayoutDivider... |
import React, { useState, Fragment } from 'react';
// Components
import {
Modal,
ModalHeader,
ModalBody,
ModalFooter,
Table,
} from 'reactstrap';
import { showAlert } from '../../util/alerts';
// Icons
import trash from '../../img/trash.svg';
import edit from '../../img/edit-black.svg';
const EditStores = (p... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Popper = exports.getOpacityTransition = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const ReactDOM = tslib_1.__importStar(require("react-dom"));
const FindRefWrapper_1 = require("./Fi... |
// global constants
const cluePauseTime = 333; //how long to pause in between clues
const nextClueWaitTime = 1000; //how long to wait before starting playback of the clue sequence
const patternLength = 5;
//Global Variables
var clueHoldTime = 900; //how long to hold each clue's light/sound
var pattern = [];
var progr... |
const React = require('react');
const ReactUMG = require('react-umg');
const _ = require('lodash');
const UMG = require('UMG');
const instantiator = require('instantiator');
const events = require('events');
// builder helper (for better js-ish code)
function make(what) {
if (what instanceof JavascriptUICommandIn... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const child_process_1 = require("child_process");
const coc_nvim_1 = require("coc.nvim");
const events_1... |
//questions script
let timer;
let current;
let tmp;
let score;
let questions;
let total;
const timeToAnswer=16;
//questions functions
function nbquestions(){
return questions.length;
};
function points(question){
return questions[0];
};
//timer
function timerStart() {
tmp=timeToAnswer;
current=0;
score=0;
time... |
const modEnum = {
NoFail : 1,
Easy : 2,
TouchDevice : 4,
Hidden : 8,
HardRock : 16,
SuddenDeath : 32,
DoubleTime : 64,
Relax : 128,
HalfTime : 256,
Nightcore : 512, // Only set along with DoubleTime. i.e: NC only gives 576
Flashlight : 1024,
... |
/**
* @file Mol2 Parser
* @author <NAME> <<EMAIL>>
* @private
*/
import { Debug, Log, ParserRegistry } from "../globals.js";
import {
assignResidueTypeBonds,
calculateChainnames, calculateSecondaryStructure,
calculateBondsBetween, calculateBondsWithin
} from "../structure/structure-utils.js";
import S... |
'use strict';
// Global variables
const searchInput = document.querySelector('.js_input');
const searchBtn = document.querySelector('.js_searchBtn');
const resetBtn = document.querySelector('.js_resetBtn');
const movieList = document.querySelector('.js_movieList');
const favMovies = document.querySelector('.js_favMovi... |
'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 _createClass = function () { function defi... |
const { ux, sdk } = require('@cto.ai/sdk');
const builder = require('./helpers/project_builder');
async function main() {
sdk.track(['scaffold-laravel'], {
event: 'began workflow',
})
await ux.print("Ok - Let's start with a few questions")
let project_name_prompt = await ux.prompt({
type: 'input',
... |
const fs = require('fs');
const os = require('os');
const utils = require('../utils');
const path = require('path');
module.exports = {
getBraveBrowserInfo: () => {
utils.log('trace', 'getBraveBrowser');
let braveVersion;
if (utils.isLinux) {
braveVersion = utils.run('brave --version').then(v => v.... |
#!/usr/bin/env node
/* Command Line Parser */
const program = require('commander')
const fs = require('fs')
const readline = require('readline')
const reactComponentEs5 = require('./templates/reactComponentES5')
const reactComponentEs6 = require('./templates/reactComponentES6')
const cssTemplate = require('./templates... |
/**
* Created by PolarisChen on 16/8/10.
*/
import React, { Component, PropTypes } from 'react';
import $ from 'jquery';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './RepoFlowItem.scss';
import {Card, CardActions, CardHeader, CardMedia, CardTitle, CardText} from 'material-ui/Card... |
"use strict";
//
// MDL-style Button component.
//
// - @see [MDL Button](http://www.getmdl.io/components/index.html#buttons-section)
// - [Props](#props)
// - [Defaults](#defaults)
// - [Built-in builders](#builders)
//
// Created by ywu on 15/7/2.
//
var __rest = (this && this.__rest) || function (s, e) {
var t =... |
// console.log("hello world");
// console.group("Cuadrado");
// //Con el cuadrado
// //const LadoDelCuadrado = 9;
// //console.log("los lados del cuadrado son: " + LadoDelCuadrado);
// function perimetroC(lado){
// return lado *4;
// }
// //console.log("El perimeto del cuadrado es: " + perimetro);
// function ar... |
// 定义三种状态
const PROMISE_STATUS = {
PENDING: 'pending',
FULFILLED: 'fulfilled',
REJECTED: 'rejected'
}
class MPromise {
// 标记promise终值
value = null
// 表示promise被拒绝的reason
reason = ''
// 收集通过链式调用then方法传入的对应不同状态的回调函数
fulFilledCallbackList = []
rejectedCallbackList = []
// promi... |
/*
Autocomplete component.
suggestView.setItems(items: Array()) to display menu.
Properties: see at the end of the file
*/
import React from "react";
import PropTypes from "prop-types";
import throttle from "lodash/throttle";
import scrollIntoView from "dom-scroll-into-view/dist-src";
class Autocomplete exte... |
/*
* Copyright (C) 2017-2019 Dremio Corporation
*
* 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 l... |
var Feature = require('./Feature.es6');
var underscore = require('underscore');
class Face extends Feature {
features = [
'mouth',
'nose',
'eyeLeft',
'eyeRight'
];
colors = {
face : [0, 255, 0],
mouth : [255, 255, 0],
nose : [255, 255, 255],
eyeLeft : [255, 0, 0],
eye... |
const STATE = { looking : "looking", shooting : "shooting"};
export default class Enemy {
constructor(body, Matter) {
this.World = Matter.World;
this.worldGame = null;
this.world = null;
this.Bodies = Matter.Bodies;
this.body = body;
this.body.label = 'Enemy';
this.posit... |
/* GENERATED FILE */
import { html, svg, define } from "hybrids";
const PhArrowSquareLeft = {
color: "currentColor",
size: "1em",
weight: "regular",
mirrored: false,
render: ({ color, size, weight, mirrored }) => html`
<svg
xmlns="http://www.w3.org/2000/svg"
width="${size}"
height="${si... |
const fs = require('fs');
const { promisify } = require('util');
const assert = require('assert');
const { harFromMessages } = require('chrome-har');
const logger = require('winston');
// event types to observe
const page_observe = [
'Page.loadEventFired',
'Page.domContentEventFired',
'Page.frameStartedLoa... |
var Drawer = require('./drawer').Drawer
, TEAM_COLORS = ['#ff2900', '#42ff00', '#0060ff', '#8f009a']
, SKIN_COLORS = ['#ffe0da', '#715000', '#fcffb0']
, BOOTS_COLOR = '#cecece'
, HANDS = [
[[0, 0, 1], [-1, 1, 0], [0, 2, 0]]
, [[0, 0, 1], [-1, 1, 1], [-2, 1, 0], [-3, 0, 0]]
, [[0, 1, 1], [-1, 2, 1]... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.setFlags = exports.run = exports.mutate = undefined;
var _asyncToGenerator2;
function _load_asyncToGenerator() {
return _asyncToGenerator2 = _interopRequireDefault(require('babel-runtime/helpers/asyncToGenerator'));
}
let mutat... |
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import * as Icon from 'react-feather';
import { useTheme } from 'Containers/ThemeProvider';
import PageHeader from 'Components/PageHeader';
import SearchFilterInput from 'Components/SearchFilterInput';
import DashboardCompliance fro... |
'use strict';
var path = require('path');
var glob = require('glob');
var Q = require('q');
var _ = require('lodash');
var DEFAULT_SPECS_GLOB = './*.spec.js';
var DEFAULT_SPEC_REGEX = '([\\w\\-]+)\\.(?:[\\w\\.]+)';
var FILTER_ALL = '*';
var EXCLUDE_NONE = '';
var LIST_SEPARATOR = ',';
/**
* @typedef LocalSpecResolv... |
'use strict';
/**
* Modules
* Node
* @constant
*/
const child_process = require('child_process');
const fs = require('fs-extra');
const path = require('path');
/**
* Modules
* External
* @constant
*/
const _ = require('lodash');
const appRootPath = require('app-root-path')['path'];
const hashFiles = require(... |
function renderObjectToHtml(dataResult){
let val = "";
if(dataResult.length > 0){
for (let i = 0; i < dataResult.length; i++) {
let data = "";
let icon = "";
let star = "";
if (dataResult[i]["mark_as_read"] === 1) {
data = "<strike><h5 clas... |
// ActorDto GetActor(string actorType, string actorCode)
//
// Input parameters:
// string actorType: the type of the actor;
// string actorCode: the id identifying a single actor inside the EASTIN partner’s local system.
//
// Returns:
// ActorDto: an object containing detailed information about a single acto... |
function setup() {
const canvas = createCanvas(windowWidth, windowHeight);
canvas.parent("container");
background(123, 104, 238);
}
let arrOne = [
[80, 30],
[70, 30],
[60, 20],
[50, 0],
[50, 10],
[40, 0],
[40, 10],
[30, 20],
[20, 30],
[10, 30],
];
let arrTwo = [
[80, 0],
[70, 0],
[60, ... |
const mongoose = require('mongoose');
const { wrap: async } = require('co');
const { promisify } = require('util');
const crypto = require('crypto');
const nodemailer = require('nodemailer');
const passport = require('passport');
const _ = require('lodash');
const validator = require('validator');
const mailChecker = r... |
// Define name-space
if (typeof COLORWAY == "undefined" || !COLORWAY) { var COLORWAY = {}; }
YAHOO.namespace("colorway");
var Dom = YAHOO.util.Dom;
var Event = YAHOO.util.Event;
var Selector = YAHOO.util.Selector;
var History = YAHOO.util.History;
COLORWAY.test = {
shift: false,
dialog: null,
initialize:... |
var c = document.getElementById("gameCanvas");
var ctx = c.getContext('2d');
c.width = window.innerWidth;
c.height = window.innerHeight;
var gridW = window.innerWidth;
var gridH = window.innerHeight;
let wait = true;
let score = 0;
let hScore = 0;
ctx.fillStyle = "#8492a6";
ctx.beginPath();
ctx.moveTo(gridW / 2, gr... |
const { EventEmitter } = require('events')
const os = require('os')
const bitswarm = require('@web4/network')
const BitswarmProxyStream = require('./')
module.exports = class BitswarmProxyServer extends EventEmitter {
constructor (opts = {}) {
super()
const {
bootstrap,
ephemeral,
network =... |
/**
* Created by adam on 6/26/17.
*/
export class TexturePacker {
constructor(atlasRes) {
this.res = atlasRes;
this.imageSet = [];
this.imageKeys = {};
this.maxRes = 1;
}
addTexture(image, corrected) {
if (this.imageKeys[image.currentSrc]) {
return this.imageKeys[image.currentSrc]
... |
const drd = require('fabrico/node_modules/definitely-random-data/dist/drd.js');
// definitely-random-data
const fabrico = require('fabrico');
const _ = require('../underscore.js')._;
const astar = require('./astar.js');
function defaultNodeProvider(x,y) {
return {
id: x + '_' + y,
... |
import React, { Component, Fragment } from 'react';
import axios from 'axios';
import Banner from '../common/Banner';
import green from '@material-ui/core/colors/green';
import CircularProgress from '@material-ui/core/CircularProgress';
import {
FormControl,
FormControlLabel,
Typography,
FormGroup,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.