text stringlengths 3.07k 16k |
|---|
// Polyfill ( Old browser version compatibility )
navigator.getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia;
navigator.getMediaDevices = navigator.getMediaDevices ||
... |
/*
* Copyright (c) 2012 Capgemini Technology Services (hereinafter “Capgemini”)
*
* License/Terms of Use
*
* Permission is hereby granted, free of charge and for the term of intellectual property rights on the Software, to any
* person obtaining a copy of this software and associated documentation files (the "So... |
/**
* Copyright 2015 Portal.js
*
* 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 i... |
var fs = require("fs");
var parseMidi = require("midi-file").parseMidi;
var filename = process.argv[2];
var outputFileBaseName = filename.split(".").slice(0,-1).join(".");
var inputFile = fs.readFileSync(filename);
var parsedInput = parseMidi(inputFile);
var doPrints = false;
class GTNote {
constructor(frames, ... |
/**
* 每个服务(如node_pro, ssr)都会有独立的一个god进程,用来做监控
* 由传递进来的参数:pmExecPath,和pm2 api返回的数据做匹配,来判断究竟是哪个服务
*/
const socketIo = require('socket.io');
const pm2 = require('pm2');
const os = require('os');
const ps = require('ps-node');
const http = require('http');
const osUtil = require('os-utils');
const hostname = os.hostnam... |
import React from "react";
import { useLocation } from "react-router-dom";
import { Row ,Container, Col } from 'react-bootstrap';
// import PropTypes from "prop-types";
// import { connect } from "react-redux";
// import { withRouter } from "react-router-dom";
// import { deleteMovie, updateMovie } from "./MoviesActio... |
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
var ETH_CLIENT = window.web3;
var ValueOwnersContractAddress = '0xb00238e63f9db77d8c38baa9beb6d68a8a6befb7';
var ValueOwnersContract;
var ValueOwnersContractAbi = [{"constant":true,"inputs":[],"name":"cost","outputs":[{"name"... |
/**
* Based on https://github.com/lambci/node-custom-lambda/blob/0e3f2133bb2b667fa29aa4adfc30fab22166f6e4/v10.x/bootstrap.js
*/
"use strict";
require("source-map-support").install();
process.on("unhandledRejection", (err) => {
throw err;
});
const path = require("path");
const fetch = require("node-fetch");
cons... |
let WebSocketClient = require('websocket').client,
find = require('local-devices'),
async = require('async'),
onDeath = require('death'),
settings = require('./settings'),
events = require('./lib/events');
/*
State.
*/
let debug = false,
scanning = false,
current = {},
client,
lastConnection,
ensureConnect... |
// based on code from
// https://stackoverflow.com/questions/45106841/chrome-devtools-coverage-how-to-save-or-capture-code-used-code
// thx stereobooster!
const puppeteer = require('puppeteer');
const urlParse = require('url-parse');
const CleanCSS = require('clean-css');
const sqlite3 = require('sqlite3').verbose();
c... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
import gulp from 'gulp';
import fs from 'fs';
import gulpif from 'gulp-if';
import browserSync from 'browser-sync';
import sourcemaps from 'gulp-sourcemaps';
import imagemin from 'gulp-imagemin';
import imageminMozjpeg from 'imagemin-mozjpeg';
import imageminPngquant from 'imagemin-pngquant';
import yaml from 'js-yaml'... |
// Copyright (c) <NAME> & <NAME>. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
import {
jws,
KEYUTIL as KeyUtil,
X509,
crypto,
hextob64u,
RSAKey,
} from 'jsrsasign';
import Log from './Log';
const AllowedSignin... |
'use strict'
import React, {Component} from 'react';
import {
View,
StyleSheet,
DeviceEventEmitter
} from 'react-native';
import styleUtil from "../../common/styleUtil";
import ChatList from './ChatList'
import FriendList from './FriendList'
import NeedLogin from "../../components/NeedLogin";
import ScrollableTabVi... |
/*
* (C) Copyright 2016 Mycelius SA (http://mycelius.com/).
*
* 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 r... |
'use strict'
import { get } from 'svelte/store'
import { ReplaySubject, Subject, merge, BehaviorSubject } from 'rxjs'
import { scan, pluck, shareReplay, map } from 'rxjs/operators'
import { knuthShuffle } from 'knuth-shuffle'
import parse from 'fast-json-parse'
import { fromServerEvent, createClickObservable } from '.... |
'use strict';
var PahoMQTT = require('../vendor/paho-mqtt');
var merge = require('./utils/merge');
var promised = require('./utils/promised');
var events = require('./utils/events');
var messageResponse = require('./responses/message');
var SUBSCRIPTION_SYNC_CHANNEL = '$RMQ/sync/my/subscriptions';
function RtmClient... |
// tslint:disable-next-line:max-line-length
import { Point, rotateMatrix, identityMatrix, transformPointByMatrix } from '@syncfusion/ej2-drawings';
import { getValue } from '@syncfusion/ej2-base';
/**
*/
export function isLineShapes(obj) {
if (obj.shapeAnnotationType === 'Line' || obj.shapeAnnotationType === 'Lin... |
function i18nProcessor(i18nData){
var getI18nValue;
if(typeof(i18nData)=="object")
getI18nValue = function(n){
return typeof(i18nData[n])=="string"?i18nData[n]:"!!I18N_UNDEFINED["+n+"]!!";
}
else if(typeof(i18nData)=="function")
getI18nValue = i18nData;
else
t... |
const { Command } = require('klasa');
const snek = require('snekfetch');
const fs = require('fs-nextra');
const { dirname, resolve } = require('path');
const vm = require('vm');
const piecesURL = 'https://raw.githubusercontent.com/dirigeants/komada-pieces/master/';
const types = ['commands', 'monitors', 'inhibitors', ... |
import React, { Fragment, useContext, useEffect } from 'react';
import PropTypes from 'prop-types';
import { withRouter } from 'react-router-dom';
import { motion } from 'framer-motion';
import clsx from 'clsx';
// Material UI
import {
Modal,
Box,
Typography,
Button,
makeStyles,
useTheme,
useMediaQuery,
... |
/**
* This task was way harder than expected
* Getting the program to be multithreaded was difficult
* Creating a save state file was also hard
* I should probably think of a solution for
* having to copy and paste the worker_pool.js file
* or functions already in different files
* I got the idea from: https://w... |
import React, { PureComponent } from 'react';
import {
View,
Text,
StyleSheet,
Image
} from 'react-native';
import { TEXT_TYPE, verticalScale } from '../../../theme/pdaStyleSheet';
import ButtonWithIcon from '../ButtonWithIcon';
import { myLog, showSuccessMessage, showErrorMessage, downloadFileFromUrl,navigateT... |
/**
* 比赛 -- 竞猜详情
*/
import React from 'react';
import moment from 'moment';
import { Form, Input, Select, Button, DatePicker, Divider } from 'antd';
import {timestampToDatetime, gameStatus, handleResult, datetimeToTimestamp} from '../../utils/utils';
import styles from './Quiz.less';
const FormItem = Form.Item;
const... |
import * as filters from '@core/utils/filters'
import s3 from '@core/vendor/aws/s3'
import mime from 'mime-types'
import sharp from 'sharp'
import path from 'path'
import _ from 'lodash'
import url from 'url'
import qs from 'qs'
import fs from 'fs'
const root = path.resolve(__dirname,'..','..','..','..','public')
con... |
const chalk = require('chalk');
const { nlpClient } = require('../../helpers/HTTP');
const sureThing = require('../../helpers/sureThing');
const { Format } = require('ers-utils');
const f = new Format();
/*eslint no-console: off*/
class Classifier {
constructor(options) {
this.options = options || {};
this.n... |
const breakpoints = [
`640px`, // 40rem
`896px`, // 56rem
`1280px`, // 80rem
]
const baseColors = {
primary: '#8592e0',
primaryDark: '#16745f',
primaryDarker: '#0d5e4c',
secondary: '#f4f0ec',
grey0: '#000000',
grey20: '#333333',
grey90: '#e6e6e6',
grey53: '#878787',
white: '#fff',
}
const head... |
/****************************************************************************
Copyright (c) 2021 <NAME>., Ltd.
https://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-fr... |
import React, { useEffect, useState } from "react";
import {
Grid,
IconButton,
Button,
Typography,
AppBar,
Toolbar,
} from "@material-ui/core";
import MicNoneSharpIcon from "@material-ui/icons/MicNoneSharp";
import MicOffOutlinedIcon from "@material-ui/icons/MicOffOutlined";
import VideocamIcon from "@mater... |
const _ = require('lodash');
const $ = require('jquery');
const grammar = require('raw!../chain.peg');
const PEG = require('pegjs');
const Parser = PEG.buildParser(grammar);
const template = require('./partials/suggestion.html');
const app = require('ui/modules').get('apps/timelion', []);
/*
Autocomplete proposal, t... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = Plugin;
var _includes2 = _interopRequireDefault(require("lodash/includes"));
var _isMatch2 = _interopRequireDefault(require("lodash/isMatch"));
var _memoize2 = _interopRequireDefault(require("lodash/memoize"));
var _fo... |
export const extract_action_data = ( _obj ) => {
// eslint-disable-next-line no-unused-vars
let { id, type, ...actionData } = _obj;
return actionData;
};
export const obtain_input_type = ( item ) => {
let type = "";
switch ( typeof item ) {
case "number":
type = "number";
break;
default:
type = "te... |
import React from 'react';
import ReactDOM from 'react-dom';
import { connect } from 'dva';
import {
Row,
Col,
Icon,
Tabs,
Table,
Radio,
Button,
Form,
Input,
Select,
Tooltip,
message,
Modal,
} from 'antd';
import PageHeaderLayout from '@/components/PageHeaderWrapper';
import TabPaneCon from '@... |
var waitTill = new Date(new Date().getTime() + 1 * 1000);
while(waitTill > new Date()){}
const fs = require('fs');
const Web3 = require('web3');
var account = process.argv[2];
var destAccount = process.argv[3];
var contractAddress = process.argv[4];
var abiFile = process.argv[5];
if(!account | !contractAddress || !a... |
/**
* Created by hanwencheng on 2/4/16.
*/
var formidable = require('formidable');
const async = require('async')
import DB from '../../lib/db-interface.js';
var mongoModel = require('../../lib/model.js')
var createId = mongoModel.createId
var fs = require('fs');
var aws = require('../../lib/aws');
var tmpPath = requ... |
import React from 'react';
import flow from 'lodash/flow';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import moment from 'moment';
// Ui
import { withStyles } from '@material-ui/styles';
import Grid from '@material-ui/core/Grid';
import ExpansionPanel from '@material-ui/core/Expa... |
/*!
* SQL backed session store
* Copyright(c) 2014 <NAME> <<EMAIL>>
* MIT Licensed
*/
var debug = require('debug')('session:sql');
var knex = require('knex');
var noop = function() {};
/**
* One day in seconds.
*/
var oneDay = 86400;
/**
* Return the `SqlStore` extending `express`'s session Store.
*
* @param {object... |
// Initialize Firebase
var config = {
apiKey: "<KEY>",
authDomain: "trainscheduler-5e079.firebaseapp.com",
databaseURL: "https://trainscheduler-5e079.firebaseio.com",
projectId: "trainscheduler-5e079",
storageBucket: "trainscheduler-5e079.appspot.com",
messagingSenderId: "126720189149"
... |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import serialize from 'form-serialize'
import { openModal } from 'actions/uiActions'
import update from 'immutability-helper'
import Button from 'components/Button'
import camelcase from 'utils/camelcase'
i... |
import React, { Component } from 'react';
import { StyleSheet, Modal, View } from 'react-native';
import PropTypes from 'prop-types';
import { Colors } from '@theme';
import DataList from '@components/dataList';
import { Wrapper, ConfirmModal, RoundedButton } from '@components/common';
import { compose } from 'react-ap... |
/* <notice>
Code from node-uuid: https://github.com/broofa/node-uuid/raw/master/uuid.js
MIT license https://github.com/broofa/node-uuid/blob/master/LICENSE.md
</notice> */
/**
* @module montage/core/uuid
*/
/**
* @class Uuid
* @extends Montage
*/
var Montage = require("core/core").Montage,
CHARS = '0123456... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var axis_1 = require("./axis");
var categorical_ticker_1 = require("../tickers/categorical_ticker");
var categorical_tick_formatter_1 = require("../formatters/categorical_tick_formatter");
var p = require("../..... |
"use strict";
var utils_1 = require('./utils');
var sort_array_operator_1 = require('./sorting/sort-array.operator');
var group_operators_1 = require('./grouping/group.operators');
var filter_operators_1 = require('./filtering/filter.operators');
var filter_expression_factory_1 = require('./filtering/filter-expression.... |
const fs = require('fs');
const csv = require('fast-csv');
const { uuid } = require('uuidv4');
const mongoose = require('mongoose');
const config = require('./../utils/config');
const User = mongoose.model('User');
const LocationPoint = mongoose.model('LocationPoint');
const EpidemicContact = mongoose.model('EpidemicCo... |
// #7 global var currentCHannel and currentLocation
var currentChannel;
var currentLocation = {
longitude: 14.588763,
latitude: 121.094825,
what3Words: 'waffle.files.pancakes'
}
/* #6 start the #external #action and say hello */
console.log("App is alive");
// #7 fix for the uncaught error\
currentC... |
import { match } from '../../utils';
import { GET_CAT_ROOM } from '../cat/cat';
import ROOM from '../../../data/enum/Rooms';
import eventBus from '../../../util/eventBus';
import SOUND_FX from '../../../data/enum/SoundFX';
const namespace = 'rooms';
const ROOMS = 'rooms';
const INTERVAL = 'interval';
export const CAT... |
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 ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
const wire = require('../index');//old naming
console.log("======= STRING =======");
//strings
console.log('string update chars', wire.string.create("1234567890", "1234321890", 'buffer').toString('hex') === '0101040303353637');
console.log('string apply update', wire.string.apply("0101040303353637", "1234321890") ==... |
import React, { Fragment, useEffect } from 'react'
import { ActivityIndicator, Image, ScrollView, StyleSheet, Text, View } from 'react-native'
import { DrawerContentScrollView, DrawerItem } from '@react-navigation/drawer'
import { useLazyQuery } from '@apollo/client'
import { useAuth } from '../hooks/useAuth'
import {... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FunnelChartJsPanelCtrl = void 0;
var _sdk = require("app/plugins/sdk");
var _lodash = _interopRequireDefault(require("lodash"));
var _rendering = _interopRequireDefault(require("./rendering"));
function _interopRequireDefault(ob... |
/**
* Created by Dorian on 29/03/14.
*/
/** Priority queue **/
function PriorityQueue(){
var that = this
var size = 0;
var heap = new Array();
var root = new Key('ROOT');
heap[0]= root;
// Private methods
var swim = function(i){
//console.debug("Swimming index " + i);
var k=i
... |
var midi = new poormidi();
midi.onMidiEvent = function(e){
/*
MIDI Note On (ch#16) で 8x8のサーモセンサの画素が送られてくる
Note Number = 画素 (0-63)
Velocity = 温度 x 2の値 (1/2にして使う)
*/
if((e.data[0] & 0xf0) == 0x90){ // note-on
if((e.data[0] & 0x0f) == 0x0f){ // ch #16
thermoData[e.data[1]] = e.data[2] / 2;
... |
import Project from "./Project";
import axios from "axios";
import { getFileContents } from "./fileUtils";
import { branchState, TEST_URL } from "../constants";
/* global Excel, OfficeExtension */
async function handleAhead(project, remoteURL, headCommitID, parentCommitID) {
const fileContents = await getFileConten... |
//import readline sync
const input = require("readline-sync");
// Code your transform function here:
function transform(oldPointStructure) {
// declare new point structure
newPointStructure = {};
// get all keys
var keys = Object.keys(oldPointStructure);
for (var i = 0; i < keys.length; i++) {
... |
'use strict'
const db = require('../server/db')
const {
User,
Review,
Category,
Product,
Order,
Address
} = require('../server/db/models')
const {
addressData,
//productData,
categoryData,
// productCategoryData,
reviewData,
orderData,
userData,
orderProductData,
cartData,
cartItemDat... |
const arrOfPeople = [
{
id: 2,
name: "Sarge",
age: 55,
skillSet: "Shotgun, Magnum",
placeBorn: "Omaha, Nebraska",
yearsExperience: 20
},
{
id: 3,
name: "<NAME>",
age: 35,
skillSet: "Rocket Launcher",
placeBorn: "Louisville, Kentucky",
yearsExperience: 7
},
{
id: 4,
name: "<NAME>",
... |
import React, { useState, useEffect } from 'react';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/styles';
import {
Card,
CardHeader,
CardContent,
CardActions,
Button,
Divider,
List,
ListItem,
ListItemAvatar,
ListItemText,
IconButton
} from '... |
import React, { useEffect, useState } from 'react';
import { Link, withRouter } from 'react-router-dom';
import { isEmpty, get } from 'lodash';
import { Helmet } from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { connect ... |
// @flow
/* eslint-env node */
// Adapted from https://github.com/privatenumber/esbuild-loader/blob/6bae9a77af3529216b7377658ff942e5895dca62/src/minify-plugin.ts
const {version, transform, buildSync} = require('esbuild');
const {CachedSource, SourceMapSource, RawSource} = require('webpack').sources;
const JavascriptMod... |
import React from "react";
import { withStyles } from "@material-ui/core/styles";
import { t } from "../utils/t";
import ListItem from "@material-ui/core/ListItem";
import ListItemText from "@material-ui/core/ListItemText";
import ListItemAvatar from "@material-ui/core/ListItemAvatar";
import Avatar from "@material-u... |
const util = require('./Util.js');
function InpInst(aVarMap, aOp, aInput) {
aVarMap[aOp] = aInput.stream[aInput.pos];
aInput.pos++;
}
function AddInst(aVarMap, aOp1, aOp2) {
let op1 = GetOpValue(aOp1, aVarMap);
let op2 = GetOpValue(aOp2, aVarMap);
aVarMap[aOp1] = op1 + op2;
}
function MulInst(aVarMa... |
import * as tslib_1 from "tslib";
import { Component, Input, HostBinding, EventEmitter, Output, NgZone, Renderer2, Optional, TemplateRef, forwardRef } from '@angular/core';
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
import { ItemsService } from './services/items.service';
import { ... |
/**
* LOCAL DATABASE
*
* - Users are stored in an object structure, with keys being users' addresses, and values being users' data.
* - Events are stored in an array structure. Each item in the array is the event's data.
*/
require("dotenv").config();
const fs = require("fs");
const { v4: uuidv4 } = require("uui... |
/*
artifact generator: C:\My\wizzi\wizzi\node_modules\wizzi-js\lib\artifacts\js\module\gen\main.js
primary source IttfDocument: C:\My\wizzi\wizzi\packages\wizzi-core\.wizzi\ittf\examples\yaml.js.ittf
*/
'use strict';
var path = require('path');
var fs = require('fs');
var stringify = require('json-stringify-saf... |
const template =
`<div class="user-base-page">
<img class="background" src="https://adachi-bot.oss-cn-beijing.aliyuncs.com/Version2/module/user-base.png" alt="ERROR"/>
<div class="left">
<div class="top">
<p class="uid">UID {{ data.uid }}</p>
<img class="name-card" :src="nameCard" alt="ERROR"/>
<div class=... |
var uuid = require('node-uuid');
var moment = require('moment');
/**
* Helper is an object with an extensive list of
* helper methods that generates random, but meaningful, data.
*/
function Helper() {
this.sequences = {};
this.names = {};
this.names.male = [
'William', 'Ernest', 'Emery', 'Ja... |
const path = require('path')
const logtopus = require('logtopus')
const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')
const firetpl = require('firetpl')
const Bucketchain = require('superchain/src/Bucketchain')
const pathToRegexp = require('path-to-regexp')
const ... |
import React from 'react'
import { connect } from 'react-redux'
import createReactClass from 'create-react-class'
import { findDOMNode } from 'react-dom'
import axios from 'axios'
import _ from 'lodash'
import { SimpleSelect } from 'react-selectize'... |
$(function() {
$('body').tooltip({
selector: 'a[data-toggle=tooltip]'
});
var listType = $('#article_list').data('type');
if (!listType || listType != 'ajax') {
postLoadTimeline();
}
$(document).on('click','.link_show_comment', function(){
var id = $(this).data('id') ? $(this).data('id') : 0;
var blockS... |
'use strict';
let score = 0;
let username = prompt('Hi! What is your name?');
alert('Welcome ' + username + '! Please answer the following questions with yes/no or y/n');
//Question One
function question1(){
let videoGame = prompt('Is my favorite video game series Kingdom Hearts?').toLowerCase();
if(videoGame ... |
/* globals appOptions */
import $ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import _ from 'lodash';
import clientState from './clientState';
import StageProgress from './components/progress/stage_progress.jsx... |
import React from 'react';
import moment from 'moment';
import BreadcrumbCustom from '../../BreadcrumbCustom';
import { Card, Input, DatePicker, Button, Modal, Table, message, Popover } from 'antd';
import URL from '../../../api/config';
const { confirm } = Modal;
const { RangePicker } = DatePicker;
class DynamicCmnt... |
// @ts-check
import '@agoric/zoe/src/types.js';
import { makeIssuerKit, AssetKind, AmountMath } from '@agoric/ertp';
import { assert } from '@agoric/assert';
import buildManualTimer from '@agoric/zoe/tools/manualTimer.js';
import { makeFakePriceAuthority } from '@agoric/zoe/tools/fakePriceAuthority.js';
import {
f... |
/**
* Cria uma classe de objeto Pessoa no JS -------------------------------------------------------------------
* @returns {Pessoa}
*/
function Pessoa() {
/*
* Atributos públicos da classe
*/
this.nome = '';
this.idade = 0;
this.sexo = '';
/*
* Métodos privados da class... |
import React from 'react';
import Loader from '../layouts/Loader';
import Reserve from '../business/Reserve';
import "./styles/SavedDetail.scss";
const google = window.google;
class SavedDetails extends React.Component {
constructor(props) {
super(props);
this.state = {
data: props.loca... |
"use strict"
var hh = 0, mm = 0, ss = 0, hh2 = 0, mm2 = 0, ss2 = 0, hh3 = 0, mm3 = 0, ss3 = 0, tempo = 1000, cron, tempo2 = 1000, cron2, tempo3 = 1000, cron3, start3Ligado = false,
temporizador, num = 0, valorTotal, acabando, tempoReal, totalReal, totalizou;
//Inicia o temporizador
function start() {
... |
/*
<NAME>: @xnought
Summary:
This is a component for the nested function chain rule example
*/
import React, { Component } from "react";
import {
Typography,
Slider,
Box,
Card,
CardContent,
CardActions,
Button,
} from "@material-ui/core";
class NestedFunction extends Component {
constructor(props) {
su... |
var UNIT_APPEARS = 'UNIT_APPEARS',
UNIT_MOVE_TO = 'UNIT_MOVE_TO',
UNIT_DOES_NOTHING = 'UNIT_DOES_NOTHING';
UNIT_DISAPPEARS = 'UNIT_DISAPPEARS';
var UNIT_SIZE = 24;
var units = [];
var frames;
var nativeColor = 0x0002FE;
function initFont(callback) {
var loader = new THREE.FontLoader();
var that = this;
... |
import React from "react";
import PropTypes from "prop-types";
import withSideEffect from "react-side-effect";
import isEqual from "react-fast-compare";
import {
convertReactPropstoHtmlAttributes,
handleClientStateChange,
mapStateOnServer,
reducePropsToState,
warn,
nestedComponentWarning,
on... |
// Global flag for phantomjs (or other browser) to eval to see if we're done.
DONE = false;
// Failure count for phantomjs exit code
FAILURES = null;
TEST_STATUS = {
DONE: false,
FAILURES: null
};
// xUnit format uses XML output
var XML_CHAR_MAP = {
'<': '<',
'>': '>',
'&': '&',
'"': '"',
... |
const dotenv = require('dotenv');
dotenv.config();
//console.log(process.env.TOKEN);
const Player = require('./player');
const Discord = require('discord.js');
const client = new Discord.Client();
const PREFIX = '!';
let playerList = [];
let playerOne = null;
let playerTwo = null;
let gameOver = false;
function pickR... |
'use strict';
const { app, BrowserWindow, dialog, Menu } = require('electron');
const createApplicationMenu = require('./application-menu');
const fs = require('fs');
const path = require('path');
// collection of active BrowserWindows
const windows = new Set();
// map of active BrowserWindows and the file watchers
c... |
import React, {Component} from "react";
import Layouts from "../layouts";
import Keyboard from "components/views/Keyboard";
import InterfaceCard from "components/views/Interfaces";
import ActionsMixin from "../generic/Actions";
import Alerts from "../generic/Alerts";
import SoundPlayer from "./soundPlayer";
import Rese... |
'use strict';
const net = require( 'net' );
const tls = require( 'tls' );
const TIMEOUT = 2000;
const TlsSocketWrapper = require( './TlsSocketWrapper.js' );
const EventEmitter = require( 'eventemitter3' );
const util = require( './util' );
class Client extends EventEmitter {
constructor ( port, host, protocol, opt... |
// Designed by: <NAME>
// Original image: https://dribbble.com/shots/6957353-Music-Player-Widget
"use strict";
// add elemnts
const bgBody = ["#e5e7e9", "#ff4545", "#f8ded3", "#ffc382", "#f5eda6", "#ffcbdc", "#dcf3f3"];
const body = document.body;
const player = document.querySelector(".player");
c... |
import { _ as __extends, c as Subscriber, d as Subscription, a as Observable, e as SubjectSubscriber } from '../common/mergeMap-30237d57.js';
export { f as map, m as mergeMap } from '../common/mergeMap-30237d57.js';
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
function refCount() {
return function ... |
/**
* @namespace
*/
var H5PEditor = (H5PEditor || {});
var ns = H5PEditor;
/**
* Construct the editor.
*
* @class H5PEditor.Editor
* @param {string} library
* @param {Object} defaultParams
*/
ns.Editor = function (library, defaultParams, replace) {
var self = this;
// Library may return "0", make sure this... |
/* eslint-disable consistent-return,no-plusplus,react/destructuring-assignment */
import React, { useState, useEffect } from 'react';
import { connect, useDispatch } from "react-redux";
import Dialog from "@material-ui/core/Dialog";
import DialogTitle from "@material-ui/core/DialogTitle";
import DialogContent from "@ma... |
"use strict";
import * as CONSTANTS from './constants.js';
import { getCookie } from './cookie.js';
/* Returns the value of a given GET parameter name */
export function findGetParameter(parameterName) {
let result = null,
tmp = [];
location.search
.substr(1)
.split("&")
.forEach... |
// implements color themes to be switched
export default {
cta__div__background: 'linear-gradient(to left,#ffffff,#fafafa)',
cta__div__border: '#dadada',
cta__title__color: '#ff6a00',
cta__em__background: '#eaeaea',
cta__em__color: '#ff6a00',
cta__button__background: '#ff6a00',
cta__button__color: '#fff'... |
const NEXT_TYPE = {
IMAGE: 0,
PAGE: 1,
NONE: 2
}
function getElements(elements) {
let result = {}
for (let element of elements) {
result[element] = document.getElementById(element)
}
return result
}
class ImageFeed {
constructor () {
this.currentPage = 1
this.lastPage = null
this.image... |
'use strict';
var doctrine = require('doctrine');
var parseMarkdown = require('./parse_markdown');
var _ = require('lodash');
/**
* Flatteners: these methods simplify the structure of JSDoc comments
* into a flat object structure, parsing markdown and extracting
* information where appropriate.
* @private
*/
var... |
const path = require('path');
const test = require('ava');
const sinon = require('sinon');
const proxyquire = require('proxyquire');
const GitHubApi = require('@octokit/rest');
const GitHub = require('../lib/github');
const Log = require('../lib/log');
const githubRequest = require('./stub/github.request');
const { Git... |
const chalk = require('chalk');
const semver = require('semver');
const BaseGenerator = require('generator-jhipster/generators/generator-base');
const packagejs = require('../../package.json');
// const jhipsterConstants = require('generator-jhipster/generators/generator-constants');
module.exports = class extends Bas... |
function Player(mark) {
this.mark = mark;
}
function Space(xCoordinate, yCoordinate, letter){
this.xCoordinate = xCoordinate;
this.yCoordinate = yCoordinate;
if(typeof(letter) === 'undefined'){
this.letter = null;
} else {
this.letter = letter;
}
}
Space.prototype.markBy = fun... |
// Load modules.
var OAuth2Strategy = require('passport-oauth2')
, util = require('util')
, uri = require('url')
, crypto = require('crypto')
, Profile = require('./profile')
, InternalOAuthError = require('passport-oauth2').InternalOAuthError
, CIOSAuthorizationError = require('./errors/ciosauthorizationer... |
import Network from "src/dataTypes/structures/networks/Network";
import Table from "src/dataTypes/lists/Table";
import NumberTable from "src/dataTypes/numeric/NumberTable";
import Node from "src/dataTypes/structures/elements/Node";
import Relation from "src/dataTypes/structures/elements/Relation";
import NodeList from ... |
var Accessory, Service, Characteristic, UUIDGen;
var debug = require('debug')('SynologyCamera');
module.exports = function(homebridge){
Accessory = homebridge.platformAccessory;
Service = homebridge.hap.Service;
Characteristic = homebridge.hap.Characteristic;
UUIDGen = homebridge.hap.uuid;
homebrid... |
var jermaine = require('../../lib/jermaine/src/jermaine.js');
var ArrayData = require('./array_data.js'),
DataMeasure = require('./data_measure.js'),
DataValue = require('./data_value.js');
var PeriodicArrayData = new jermaine.Model(function () {
var PeriodicArrayData = this,
emptyIterator = {
... |
import React, {Component} from 'react';
import throttle from 'lodash.throttle';
import {loadAsset} from '../../../utils/asset-loader'
import {BoundingBox} from '../../../utils/layout';
import {Modal} from '../../components/modal';
import {Header} from './header';
import {Feed} from './feed';
import {Following} from '.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.