text stringlengths 3.07k 16k |
|---|
import React, { useContext } from 'react';
import styled, { css } from 'styled-components';
import Link from 'next/link';
import { useRouter } from 'next/router';
import moment from 'moment';
import { Menu, Layout, Avatar, Popover, Badge, List } from 'antd';
import {
RightOutlined,
MenuFoldOutlined,
MenuUnfoldOut... |
import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
import TabContent from '../TabContent';
class Tabs extends React.Component {
static propTypes = {
/**
* Specify the text to be read by screen-readers when visiting the <Tabs>
* component
*/
aria... |
import Taro, { Component } from "@tarojs/taro";
import { inject, observer } from "@tarojs/mobx";
import { View, Image, Text } from "@tarojs/components";
import * as Server from "../../actions";
import { userStore } from "../../store";
import { NoticeItem, OverviewItem, RecmdItem } from "./cmps";
import { dateFormat } f... |
class MidiMix {
constructor(options) {
this.connected = false;
this._input = null;
this._output = null;
this._initDone = false;
this._listeners = [];
// wrap toggles so that when the value is set, we send the signal to the MIDI light
let _states = {};
... |
const vm = require("vm");
var util = require("util");
module.exports = (RED, node, code, obniz, obnizParts, msg, send, done) => {
msg = msg || {};
send = send || (()=>{});
done = done || ((err)=>{if(err){node.error(err)}});
var functionText = "var results = null;" +
"results = (async function(msg,__send... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var TypeHelper_1 = require("./TypeHelper");
var LinkList_1 = require("./LinkList");
var ERROR_FILTED = "Filted", ERROR_BREAK = "Break", ERROR_FULL = "Full", ERROR_CAN_NOT_NEXT = "CanNotNext";
var HandlerType;
(function (HandlerType) {
Hand... |
'use strict'
import React from 'react'
import classNames from 'classnames'
import PropTypes from 'prop-types'
import { Badge, Popover } from '@patternfly/react-core'
import HelpIcon from '@patternfly/react-icons/dist/js/icons/help-icon'
import get from 'lodash/get'
import {
CaretIcon,
} from '../icons/Icons'
class ... |
const { expect } = require('chai')
const fs = require('fs')
const { render } = require('mustache')
const axios = require('axios')
const sinon = require('sinon')
const xmlCrypto = require('xml-crypto')
const xmlEnc = require('xml-encryption')
const { encrypt } = xmlEnc
const { SignedXml } = xmlCrypto
const SPCPAuthClie... |
import env from 'dotenv';
import ethers from 'ethers';
import {RateLimit} from "async-sema";
import MetadataErc721 from "./src/metadataErc721.js";
import {hideBin} from "yargs/helpers";
import Yargs from "yargs";
import {createHash} from "crypto";
import * as fs from "fs";
import inquirer from "inquirer";
import { Open... |
"use strict";
let BaseGallery = function () {
this.DOMElements = {
resultBlock:document.querySelector('#result'),
sortBlock:document.querySelector("#type-selector"),
counter:document.querySelector('#counter'),
backCounter:document.querySelector('#back-counter'),
... |
let configContainer;
// eslint-disable-next-line no-unused-vars, no-redeclare
function openConfig() {
const triggerModal = () => {
Spicetify.PopupModal.display({
title: "Marketplace",
content: configContainer,
isLarge: true,
});
};
if (configContainer) {... |
var path = require('path')
var fs = require('fs');
const exec = require("child_process").exec;
const kue = require('kue');
var redis = require("redis");
var rimraf = require("rimraf");
var db = require('../models');
const {Storage} = require('@google-cloud/storage');
const log = require('simple-node-logger').createSi... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Coinswap = void 0;
var _regenerator = _interopRequireDefault(require("@babel/runtime/re... |
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 = Reflect.decorate(d... |
import React, { Component } from 'react';
import {
View,
StyleSheet,
Dimensions,
Text,
ScrollView,
Image,
FlatList,
TouchableOpacity,
} from 'react-native';
import Swiper from 'react-native-swiper';
import { ScrollableTabView, DefaultTabBar, ScrollableTabBar, TabBarType } from 'react-native-vtron-scroll... |
const { createFilePath } = require('gatsby-source-filesystem');
const path = require('path');
const { fmImagesToRelative } = require('gatsby-remark-relative-images');
const transformMarkdownFields = require('./utils/transformMarkdownFields');
const _ = require('lodash');
exports.onCreateNode = ({ node, actions, getNod... |
const dbConfig = require('./dbConfig')
const con = dbConfig.sqlCon
const errFuncion = (err, errMessage, reject) => {
if (errMessage === '') {
errMessage = { stat: 'fail' }
}
if (err) {
reject(errMessage)
}
}
const saveNewFileContent = (data) => new Promise((resolve, reject) => {
const sqlGetFileByNa... |
//
// index.web.js
//
// The MIT License
// Copyright (c) 2015 - 2022 <NAME>. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including w... |
import { Link, Redirect } from 'react-router-dom';
import React, { Component } from 'react';
import axios from 'axios';
import * as Constants from '../../constants/constants';
import Select from 'react-select'
import {
Button,
Card,
CardBody,
CardFooter,
CardHeader,
Col,
Form,
FormGroup,
Input,
Labe... |
/*****************************************************************
* Handles events associated with notes.
*
* @author : <NAME>
****************************************************************/
'use strict';
const {shell} = require('electron');
var _appConfig = require(__dirname + '/../../../config');
var _noteKe... |
// Copyright (c) 2019, <NAME> and contributors
// For license information, please see license.txt
// The section below contains custom scripts for Item
// ================================================================================================
/* This section contains code from the general functions section
w... |
/**
* Copyright © 2019 code initially contributed by Orange SA, authors: <NAME> - Licensed under the Apache license 2.0
**/
const wirerouter = require('../../../wire/router')
const _ = require('lodash')
const r = require('rethinkdb')
const util = require('util')
const uuid = require('uuid')
const logger = require('../... |
const { isArray, arrayClone } = require("../base/common");
const { unsupportedType, indexOutOfBounds, errorCast } = Error;
/* ==================== Array 的扩展 ==================== */
const array_slice = Array.prototype.slice;
if (!Array.removeEach) {
Array.removeEach = function (array, callback) {
if (!typeIs(array, ... |
/*
* Copyright (c) 2015, <NAME>, https://github.com/sgt-kabukiman
*
* This file is released under the terms of the MIT license. You can find the
* complete text in the attached LICENSE file or online at:
*
* http://www.opensource.org/licenses/mit-license.php
*/
var
BasePlugin = require('./Base.js'),
Channel ... |
/* snake_server.js
*
* Multisnake server implementation
* Does matchmaking and passes messages between player clients
*
* Dependencies:
* ../shared/config.js
* ../shared/comm_names.js
* ./events.js
* ./matchup.js
*/
'use strict';
var co = require('co');
var config = require('../shared/... |
const app = getApp()
const db = wx.cloud.database()
var util = require('../../utils/util.js')
var dayTime = util.formatTime(new Date())
var article_id = new Number()
var article_array = new Array()
var article_data
var comment;
Page({
/**
* Page initial data
*/
data: {
time:" ",
author:" ",
read... |
// 1. String Constructor
var strObj = new String('Lee');
console.log(strObj); // String {0: 'L', 1: 'e', 2: 'e', length: 3, [[PrimitiveValue]]: 'Lee'}
var strObj = new String(1);
console.log(strObj); // String {0: '1', length: 1, [[PrimitiveValue]]: '1'}
var strObj = new String(undefined);
console.log(strObj); // St... |
var trivia = [
{question: "This word, literally translated as 'grief bacon', refers to the excess weight put on by emotional overeating.", A: "Traurigfett", B: "Kummerspeck", C: "Verlustschinken", correctAnswer: "Kummerspeck"},
{question: "What is the definition of Torschlusspanik (closing-gate panic)?", A: "fe... |
/**
* Provides ui layout support using `Cell`, `Row`, and `Column` that uses flexbox to lay out elements.
*
* @example
* <Layout>
* <Cell shrink>
* <Button small>First</Button>
* </Cell>
* <Cell>
* <Item>An Item with some long text in it</Item>
* </Cell>
* <Cell shrink>
* <Button small>Last</Butt... |
dashboardApp.controller('asignaciones_ctrl', ['$scope', '$http', '$uibModal', '$timeout', asignaciones_ctrl]);
function asignaciones_ctrl($scope, $http, $uibModal, $timeout) {
var btn_admin = '<div class="btn-group" role="group"><button type="button" class="btn btn-danger btn-xs drop_asignacion"><li class="glyphi... |
const AWS = require('./aws');
const logger = require('./logging').Logger;
const moment = require('moment');
function run(up_to, restore_files, response) {
if (up_to === undefined) up_to = moment().format('YYYY-MM-DDTHH:mm:ss');
checkBackup( up_to, 'app', undefined, true, (err, appbasefile, appincrfiles) => {
... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import CardActionArea from '@material-ui/core/CardActionArea';
import CardActions from '@material-ui/core/CardActions';
import Tooltip from "@material-ui/core/Tooltip";
import CardContent... |
/* eslint-disable indent */
/* eslint-disable no-unused-expressions */
import React, { useState, useEffect } from 'react';
import Loader from 'react-loader-spinner';
import { Link } from 'react-router-dom';
import axios from 'axios';
import moment from 'moment';
import swal from 'sweetalert';
import { BASE_URL } from '... |
// const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const config = require('../config/config.js');
const m_token = require('../models/token.model.js');
const status = require('../config/status_response.js');
var logger = require( '../log/log.js' );
let tokenBlackList = [];
function create( inp... |
var Helper = function () {}
Helper.prototype.createText = function (scene, x, y, text, o, i, a) {
var s;
o = o || 64, i = i || "0xFFFFFF";
return (s = scene.add.bitmapText(x, y, "supermercado", text, o)).setTint(i),
a && .5 !== a || (s.x -= .5 * s.width, s.y -= .5 * s.height),
1 === a ? (s.x -= s.width, ... |
/**
Copyright 2014-2015 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license... |
import React, { useEffect, useState } from 'react';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import Immutable from 'immutable';
import { Field, change, formValueSelector, reduxForm, SubmissionError, getFormSyncErrors } from 'redux-form/immutable';
import Grid from '@material-ui/c... |
function isArray(value) {
var s = typeof value;
if (s === 'object') {
if (value) {
if (typeof value.length === 'number' && !(value.propertyIsEnumerable('length')) && typeof value.splice === 'function') {
return true;
}
}
}
return false;
}
function ajAd(divName) {
if (isArray(aj_div_tmp) && typeof(aj... |
import React from 'react';
import Carousel from "react-material-ui-carousel"
import autoBind from "auto-bind"
import '../css/carousel.scss';
import window from 'global/window'
import {
Card,
CardContent,
CardMedia,
Typography,
Grid,
Button,
} from '@material-ui/core';
//carousel images
import ... |
import React, { useState, useEffect } from 'react';
import {
SafeAreaView,
View,
StyleSheet,
TouchableOpacity,
Text,
Dimensions,
Alert,
} from 'react-native';
import MapView, { Marker, PROVIDER_GOOGLE } from 'react-native-maps';
import * as Location from 'expo-location';
import { useFocusEff... |
const {ipcMain, app, BrowserWindow, dialog, shell} = require('electron');
const fs = require('fs');
const pathManager = require('path');
const Jimp = require('jimp');
const ExifTool = require("exiftool-vendored").ExifTool;
module.exports = function(dev) {
let window;
let options = {};
if (process.platform !== 'w... |
import React, { Component } from "react";
import { Form, Button, Col } from "react-bootstrap";
import "bootstrap/dist/css/bootstrap.min.css";
import "./Station.css";
class C2DInterface extends Component {
constructor(props) {
super(props);
console.log(props);
this.state = {
web3: props.web3,
... |
'use strict';
var util = require('util'),
EventEmitter = require('events').EventEmitter,
Operation = require('./op'),
Ins = require('./ops/ins'),
Del = require('./ops/del'),
Move = require('./ops/move'),
Set = require('./ops/set'),
Nop = require('./ops/nop');
module.exports = Document;
/*
A document represen... |
import {
node,
num,
str,
tok,
produce,
produceNode,
replace,
detach,
assign as assignImpl,
append,
prepend,
insertAfter,
insertBefore,
id,
bool,
block,
arr,
appendBlock,
clone,
resetFieldInfo,
error,
dft,
next,
prev,
after
} from "@effectful/transducers/v2/core";
import... |
/*
* taken from http://jmesnil.net/weblog/2010/11/24/html5-web-application-for-iphone-and-ipad-with-node-js/
*/
var http = require('http');
var url = require('url');
var fs = require('fs');
// the HTTP server
var server;
// the port on which the server will be started
var port = 8394;
// the ip address
var ip = ge... |
'use strict'
// Config
const configApp = require('../config/app');
// Libs
const chalk = require('chalk');
const log = require('loglevel');
const mongoose = require('mongoose');
// Utils
const response = require('../utils/ResponseUtil');
const validate = require('../utils/ValidateUtil');
// Models
const models = requi... |
// bolean conditions of sandhi
var u = require('./utils');
// var inc = u.include;
var c = require('./const');
function boolean(opt) {
this.lala = (opt.fin == 'ल' && opt.beg == 'ल');
this.begSoftButNasal = (u.include(c.soft, opt.beg) && !u.include(c.Nam, opt.beg));
// hard cons followed by soft cons but n... |
/**
* ok 1. 获取题库列表
* ok 2. 获取题目的内容
* 3. 更新题目
* ok 4. 删除题目
* 5. 新建一个题目
* ok 6. 获取题目的讨论
* ok 7. 获取题目的提交记录
* 8. 获取题目的测试用例
* 9.
*
*/
let Problem = syzoj.model('problem');
let JudgeState = syzoj.model('judge_state');
let FormattedCode = syzoj.model('formatted_code');
let Contest = syzoj.model('contest');
let Pro... |
/*\
This top-level context manages settings inside the whitelist. It never has
a parent.
\*/
var utils = require('../utils');
var Context = require('./context').context;
var prefix = "$:/config/flibbles/relink/";
function WhitelistContext(wiki) {
build(this, wiki);
};
exports.whitelist = WhitelistContext;
White... |
'use strict';
/**
* DEPENDENCIES
*/
const pg = require('pg');
const express = require('express');
const cors = require('cors');
const fs = require('fs');
const superagent = require('superagent');
/**
* APPLICATION
*/
const app = express();
const PORT = process.env.PORT || 3000;
/**
* API KEY
*/
const API_KEY =... |
/**
* @file portfolio.js
* Created by <NAME> on 5/17/2016
* - Displays a code portfolio to showcase coding expertise.
* @author <NAME> <EMAIL>
*
/*/
function routeURL(page, destination) {
if (destination === 'visit') {
location.href = "http://jdvarney.com/pages/" + page + "/index.html"... |
const Discord = require("discord.js");
const client = new Discord.Client();
const prefix = '/'
//-------------------------------------------------
const activities_list = [
"For help, use the /help command.",
"Made by NarmolMiz#5543",
"With some code.",
"With JavaScript.",
"Only private.",
`Se... |
'use strict';
var React = require('react');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
/*! *****************************************************************************
Copyright ... |
/* eslint-disable semi */
import Phaser, { Scene } from 'phaser'
// import Background from './background'
// -------------------------------------------------
// Game
class Game extends Scene {
constructor() {
// Configure scene
super({
key: 'game',
physics: {
default: 'arcade',
... |
'use strict';
/**
* Initialises the project views
*/
async function initProjects() {
// Add project
$('.page--dashboard__projects__add').click(onClickAddProject);
// Fetch projects
let projectIds = await HashBrown.Helpers.RequestHelper.request('get', 'server/projects?ids=true');
$('.page--da... |
const flightPath = {
curviness : 1.25,
autoRotate : true,
values : [
{ x:200, y:-100},
{x:400, y: -50},
{ x:600, y:-100},
{x: 800, y: -50},
{x: 1000, y: -100},
{x :900 , y: -300},
{x: 800, y:-100},
{x: 1000 , y:-50},
{x: 1200, y:-100},
... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.protot... |
var fs = require('fs')
, path = require('path')
, files = fs.readdirSync(path.join(__dirname, 'lang'))
, langs = {}
, lang
files.forEach(function (filename) {
var language = filename.replace(/\.json$/, '');
langs[language] = require('./lang/' + filename);
});
var units = exports.units = {
years :... |
import loadData from './load-data';
const $div = d3.select('#large-black')
const $graphic = $div.select('.graphic');
const $widthRef = d3.select('#declined .graphic')
const $svg = $graphic.select('svg')
const $gVis = $svg.select('.chart')
const $gLegend = $svg.select('.legend')
let height = 0,
width = 0
const MARGI... |
var Test = require('../config/testConfig.js');
var BigNumber = require('bignumber.js');
contract('Flight Surety Tests', async (accounts) => {
var config;
before('setup contract', async () => {
config = await Test.Config(accounts);
await config.flightSuretyData.authorizeCaller(config.flightSuretyApp.addre... |
module.exports = create;
create.usage = "\trappidjs create lib <libName> [<dir>] - Creates a rappidjs lib directory structure"
+ "\n\trappidjs create app <AppName> [<dir>] - Creates empty rappidjs application";
var fs = require("fs"),
path = require("path"),
flow = require("flow.js").flow,
ejs = requi... |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classnames from 'classnames';
import {DatePicker, TimePicker} from '@material-ui/pickers';
import Dropdown from './../../Input/Dropdown';
import Text from '../../Text';
import { timeValues24HrFormat, timeValues12HrFormat } from './def... |
'use strict';
var fs = require('fs-extra');
var path = require('path');
var finder = require('fs-finder');
var nodeUtils = require('util');
var url = require('url');
var utils = require(path.join(global.pathToApp, 'core/lib/utils'));
var pathResolver = require(path.join(global.pathToApp, 'core/lib/pathResolver'));
var... |
let merch = [
{
id: 1,
name: "<NAME>",
size: "M",
color: "gary",
price: 1200,
image: "product1.jpg",
description: "one piece dress",
},
{
id: 2,
name: "<NAME>",
size: "M",
color: "gray",
price: 1500,
image: "produc... |
// utils.js
var util_funcs = {
methods: {
isSlotAvailable: function(dom) {
return dom.classList.contains('ds-avail');
},
// counting from top-left corner
getCoords: function(slot_dom) {
let x = slot_dom.cellIndex - 1;
let y = slot_dom.parentElement.rowIndex - 1;
return [x, y];
},
// generate... |
const { deployProxy } = require('@openzeppelin/truffle-upgrades');
var WrappedPinakion = artifacts.require("./WrappedPinakion.sol");
var KlerosLiquid = artifacts.require("./KlerosLiquid.sol");
var PolicyRegistry = artifacts.require("./PolicyRegistry.sol");
var KlerosLiquidExtraViews = artifacts.require("./KlerosLiquid... |
import vm from 'vm';
import Promise from 'pinkie';
import { pick as pickObjectProperties, transform as transformObjectProperties } from 'lodash';
import { IPC } from 'node-ipc';
import CONSTANTS from './constants';
import MESSAGES from './messages';
export class Server {
constructor (config) {
this.id ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
var _objectWithoutProperties3 = _inte... |
import pako from 'pako';
import {parseCSSColor} from 'csscolorparser';
export function loadJSON(url) {
return new Promise((resolve, reject) => {
const gz = url.endsWith('.gz'),
request = new XMLHttpRequest();
request.open('GET', url);
request.responseType = gz ? 'arraybuffer' :... |
const log = require('minilog')('radar:client')
const { EventEmitter } = require('events')
const { inherits } = require('util')
const ClientSessionStateMachine = require('./client_session_state_machine')
// TODO: move to a SessionManager class
const clientsById = {}
function ClientSession (name, id, accountName, versi... |
/*
* Copyright 2021 MeshDynamics.
* 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... |
/* eslint-env browser */
Math.TAU = Math.PI * 2;
const creatures = [];
const creatureSize = 10;
const creatureNoseSize = 15;
const numberOfCreatures = 100;
const maxSpeed = 4;
const defaultSightθ = Math.TAU / 16;
const sightIncrement = defaultSightθ / 2;
const creatureViewSize = 75;
const creatureRepulsionSize = 25;
c... |
import React from "react";
import {Input, Form, notification, Select, Button, DatePicker} from "antd";
import { withRouter, Redirect } from 'react-router-dom';
import * as callApi from '../../../utils/apiCaller';
import data from '../../../core/data';
import moment from "moment";
const { Option } = Select;
const openNo... |
import { axios } from '@xcedu/web-share'
// 测试环境需要在请求url前加前缀
const prefix = '/api-personalized'
// const prefix = ''
export function getUserInfo () {
return axios.get('/api-base/users/userInfo')
}
// 上传附件
export function uploadResource (data) {
return axios.post('/api-base/attachments/save', data)
}
export func... |
const { NanoresourcePromise: Nanoresource } = require('nanoresource-promise/emitter')
const Client = require('./client')
const BitspaceClient = require('bitspace/client')
const Bittree = require('@web4/bittree')
const bitdrive = require('@web4/bitdrive')
const RPC = require('./rpc')
const getNetworkOptions = require('... |
var data;
function buildPieData(da,db,dc){
console.log('da :' + da);
console.log('db :' + db);
console.log('dc :' + dc);
data = {
pieChart : [
{
color : 'red',
description : 'Negativo',
title : 'Negativo',
value : da
},
... |
import React, { Component } from 'react';
import firebase from '../FirebaseConfig.js';
import { Link } from "react-router-dom";
import {CircularProgress, List, ListItem, ListItemText, Button, Grid, Paper, Dialog, DialogTitle} from '@material-ui/core';
import Theme from './Theme.js';
import MuiThemeProvider from '@mater... |
// CORE LIBS
import React, { useState } from 'react';
import PropTypes from 'prop-types';
// UI LIBS
import { Upload, Button, Icon, Divider, Select } from 'antd';
// COMPONENTS
import ColumnsTable from '../ColumnsTable';
import InputTip from '../../InputTip';
// SELECT COMPONENTS
const { Option } = Select;
/**
* D... |
/**
* Created by T4rk on 6/19/2017.
*/
import { objExtend } from './obj-extensions'
import { globalScope } from '../global-scope'
/**
* A promise may be canceled:
* - before it's execution.
* - after it resolves, rejecting instead.
* - during a step of a promise chain, stopping propagation.
* @typedef {Object}... |
const socket = io();
socket.on('newword', addNewWord);
let lastSelectedID = "A1";
let lastSelectedColor = "#E63462";
let currentLetters = new Array();
let avaibleLetters = new Array();
let allLetters;
let fieldsValues;
//TO DO: zmienic na const i wtedy promises, unikac zmiennych globalnych
function generat... |
/* eslint-disable react/button-has-type */
/** @jsx jsx */
import React, { useState, useEffect } from 'react'; // eslint-disable-line no-unused-vars
import {
FaTimes,
FaShareAlt,
FaFacebookSquare,
FaTwitterSquare,
FaWhatsappSquare,
FaEnvelope,
} from 'react-icons/fa';
import { jsx } from 'theme-ui';
import ... |
// Canvas
var startGame = false;
var canvas = document.getElementById("gameCanvas");
var ctx = canvas.getContext("2d");
// For the Game
// Basketball
//var BALL_IMAGE = 'images/bball.jpg';
//var BALL_SPEED = 6;
//var BALL_SIZE = 26;
// paddle specific values
var paddleHeight = 5;
var paddleWidth = 100;
var paddleX... |
import { BottomNavigation, BottomNavigationAction } from "@material-ui/core";
import Head from "next/head";
import styles from "../styles/Navigation.module.scss";
import HomeIcon from "@material-ui/icons/Home";
import BookIcon from "@material-ui/icons/Book";
import TodayIcon from "@material-ui/icons/Today";
import Sett... |
import React, { useState, useEffect } from "react";
import { Form, Input, Select, Button } from 'antd';
import axios from 'axios';
import Swal from 'sweetalert2';
import store from '../../../store/index'
import ImageUpload from '../../../components/ImageUpload'
const { Option } = Select;
const DataOption = JSON.parse(... |
'use strict';
var fs = require('fs'),
path = require('path'),
childProcess = require('child_process'),
chai = require('chai'),
Q = require('q'),
del = require('del'),
chalk = require('chalk'),
tmp = require('os').tmpDir(),
testConfig = require('./test-config'),
assertions = require('./assertions'),
... |
const chai = require('chai')
const chaiSubset = require('chai-subset')
chai.use(require('chai-as-promised'))
const should = chai.should()
const expect = chai.expect
const sinon = require('sinon')
const loggerMock = require('./loggerMock')
const util = require('util')
chai.use(chaiSubset)
const TEST_DURATION = 5
/**
*... |
/*
* This file is subject to the terms and conditions defined in
* file 'LICENSE', which is part of this source code package.
*/
var thisData = null;
var thisLabels = null;
var thisSubject = null;
var canvasCreated = false;
var thisLabsLabel = null;
var CHART;
var lineChart;
var chartType = null;
var thisChartTyp... |
/**
* The MIT License
* Copyright (c) 2016 Population Register Centre (VRK)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the right... |
const express = require("express");
const usuarios = require("../schemas/usermodel");
const books = require("../schemas/bookmodel");
const cart = require ("../schemas/cartmodel");
const path = require("path");
const app = express.Router();
//variables de sesiones
const login = (req, res, next) => {
if(!req.... |
'use strict';
var debug = require('debug')('html-controller-random');
var _ = require('lodash');
var TagMatcher = require('tag-matcher');
var EventEmitter = require('events').EventEmitter;
var timer = require('timer-shim');
var util = require('util');
module.exports = MediaObjectQueue;
util.inherits(MediaObjectQueue,... |
// These samples are intended for Web so this import would normally be
// done in HTML however using modules here is more convenient for
// ensuring sample correctness offline.
import firebase from "firebase/app";
import "firebase/auth";
// Docs: https://source.corp.google.com/piper///depot/google3/third_party/devsite... |
import test from 'tappedout'
import ngn from 'ngn'
import { Fetch, URL as Address, HOSTNAME, POLYFILLED } from '@ngnjs/net'
const root = new Address('http://localhost')
function route (route) {
root.path = route;
return root
}
test('Sanity Check', t => {
t.expect('function', typeof Fetch, 'Fetch is recognized.'... |
import React, { Fragment } from "react";
var {
View,
StyleSheet,
Image,
ScrollView,
FlatList,
ActivityIndicator,
Alert,
Dimensions,
TouchableOpacity,
Text,
} = require("react-native");
import MapView, {
ProviderPropType,
Marker,
AnimatedRegion,
Callout,
} from "react-native-maps";
import Ma... |
/*
* Copyright 2021, GeoSolutions Sas.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
import {
setConfigProp,
getConfigProp,
setLocalConfigurationFile
} from '@mapstore/framework/utils/Confi... |
/**
* Notes: 云函数业务主逻辑
* Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat)
* Date: 2020-09-05 04:00:00
*/
const util = require('../utils/util.js');
const cloudBase = require('../cloud/cloud_base.js');
const timeUtil = require('../utils/time_util.js');
const appUtil = require('./app_util.... |
import React, { useState, useEffect } from 'react';
import {
Card,
Button,
Divider,
Header,
Portal,
Segment,
} from 'semantic-ui-react';
import OrganContract from '../../contracts/OrganChain.json';
import getWeb3 from '../../getWeb3';
import ipfs from '../../ipfs';
const initialState = {
fname: '',
lna... |
var Coords;
import {
BoxGeometry,
Mesh,
BufferGeometry,
Material,
AxesHelper, // MeshBasicMaterial,
Vector3,
Line,
LineBasicMaterial,
Points,
Color,
Float32BufferAttribute,
PointsMaterial,
Group,
MeshStandardMaterial,
DoubleSide
} from 'three';
import XAxis from './XAxis.js';
import YAx... |
"use strict";
// Copyright 2018 Knowledge Expert SA
//
// 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 la... |
let killOffer;
let emailTo;
let ID;
const matchHtmlRegExp = /["'&<>]/;
window.onload = () => {
const base = `${window.location.origin}/v1/`;
if (true) {
let offerList;
killOffer = (id) => {
postData(`${base}offer/remove`, {
id,
}).then((data) => {});
};
async function postData(... |
const Point = require('./Point.js');
/**
* Class Area
* Un "Point" est un objet représentant des coordonnées (x,y) dans un espace à 2 dimensions
* Une "Area" est un objet représentant une zone à 2 dimensions (coïncidence?)
* Une "Area" est obligatoirement définie par une largeur (nombre de colonnes) et une hauteur... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.