text
stringlengths
3.07k
16k
/** * Tumblr NPF object. * @typedef {{content: NpfContent[]}} NpfObj */ /** * Tumblr NPF content object. * @typedef {{ * type: string, * subtype?: string, * text?: string, * url?: string, * indent_level?: number, * formatting?: NpfFormatting[] * }} NpfContent */ /** * Tumblr NPF ...
// Create a list that holds all of the cards let deck = document.querySelector('.deck'); let cards = ["fa-diamond", "fa-paper-plane-o", "fa-anchor", "fa-bolt", "fa-cube", "fa-leaf", "fa-bicycle", "fa-bomb"]; cards = cards.concat(cards); const playAgainButton = document.querySelector('.playAgainButton'); let openCards ...
import React from 'react'; import {bindActionCreators} from "redux"; import * as actions from "../actions/stockInputActions"; import {connect} from "react-redux"; import PropTypes from "prop-types"; import {LineBarAreaComposedChart} from "./LineBarChart"; import {StockPieChart} from "./StockPieChart"; import Table from...
/** * Copyright (c) 2017, salesforce.com, inc. * All rights reserved. * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or * https://opensource.org/licenses/BSD-3-Clause */ /** * cache/models/utils.js */ const apiConstants = require('../../api/v1/constant...
const axios = require('axios'); const fetch = require('node-fetch'); const cheerio = require('cheerio'); const tls = require('tls'); const fs = require('fs'); const readline = require('readline').createInterface({ input: process.stdin, output: process.stdout }); ...
/* This is empty on purpose! Your code to build the resume will go here. */ $("#main").append(["<NAME> "]); $("#main").append(["Speed of Light (cm/ns): " +299792458 * 100 / 1000000000]); // How fast is light in centimeters/nanosecond? Click "Continue to quiz" when you've got the answer. var awesomeThoughts = "I am...
/**************************************************************************** ** @license ** This demo file is part of yFiles for HTML 2.2. ** Copyright (c) 2000-2019 by yWorks GmbH, Vor dem Kreuzberg 28, ** 72070 Tuebingen, Germany. All rights reserved. ** ** yFiles demo files exhibit yFiles for HTML functionali...
'use strict'; // Histogram // Multiple Labels // Multiple Values per Label const { register, Histogram } = require('..'); const h = new Histogram({ name: 'test_histogram', help: 'Example of a histogram', labelNames: ['code', 'color'], }); h.labels('200', 'blue').observe(0.4); h.labels('300', 'red').observe(0.6);...
import './App.css'; import React, { useState, useRef, useEffect } from 'react'; import Form from "./components/UtilisateurForm"; import Chat from "./components/Chat"; import io from "socket.io-client"; import immer from "immer"; const initialMessagesState = { general: [], random: [], jokes: [], javascript: [] ...
/* * moleculer-console-tracer * Copyright (c) 2018 MoleculerJS (https://github.com/moleculerjs/moleculer-addons) * MIT Licensed */ "use strict"; const _ = require("lodash"); const r = _.repeat; const chalk = require("chalk"); const humanize = require("tiny-human-time").short; const slice = require("sl...
import randomKey from './randomKey.js'; let messages = {}; let workerPromise; class LoamWorker { // Warning: Here be dragons. // // In order to run Loam from a CDN, we need to be able to load the worker code from an arbitrary // prefix, and the GDAL assets from another, potentially different, prefix,...
'use strict'; exports.__esModule = true; var print = console.log.bind(console); var reNamed = /(?:\(\?[:=!])|(?:\(\?<(\S+?)>)|\(/g; // Matches named groups in a regex. var reReplaceEscapes = '(?:\\${2})+|'; // Matches any `$` with a preceding `$`. var str = '((?<foo>aa))|(bc)(?<foo>.)'; function reParse(pattern) { ...
'use strict'; const _ = require('underscore'); const config = require('../../../data/toolkit.json'); const slugify = require('slugify'); /** * ----------------------------------------------------------------------------- * Constructor * --------------------------------------------------------------...
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); exports.__esModule = true; exports.default = void 0; var _extends3 = _interopRequireDefault(require("@babel/runtime/helpers/exte...
var assert = require('assert'); console.log('test do not pollute node globals when requiring'); var globalKeys = []; for (var key in global) { globalKeys.push(key); } var smokesignals = require('./index'); for (var key in global) { assert.ok(globalKeys.indexOf(key) > -1); } ...
import React, { Component } from 'react' import AddSkill from './AddSkill' import API from './utils/api' import { setTimeout } from 'timers'; class ProfileInfo extends Component { componentWillMount(){ const store = API.getDataFromLocalStore('toptal-profile-info') || API.profileModel; this.se...
Moralis.initialize("O1aDEgB1n20zIRTX7RrOKvoFv4acX79EV2TxQOV9"); // APP ID Moralis.serverURL = "https://pftz8ii8g8bn.moralis.io:2053/server"; const appHeaderContainer = document.getElementById("app-header-btns"); const searchInput = document.getElementById("input-search"); const msgContainer = document.getElementById("...
// Generated by BUCKLESCRIPT VERSION 5.0.3, PLEASE EDIT WITH CARE 'use strict'; var Jest = require("@glennsl/bs-jest/src/jest.js"); var List = require("bs-platform/lib/js/list.js"); var Apple$Snake = require("../src/Apple.bs.js"); var Snake$Snake = require("../src/Snake.bs.js"); var GameWorld$Snake = require("../src/G...
import React, { Component } from 'react' import { connect } from 'react-redux' import _ from 'lodash' import { calculateLiberties, checkVicinity, getLibertyCoordinates, belongsToGroup } from '../../utils/helpers' import { getPlayers, getWhosTurn } from '../../selectors/game_selector' import { getBoardLayout, getGroups...
import React, { Component } from 'react'; import { Multiselect } from 'multiselect-react-dropdown'; import { FaPlus } from 'react-icons/fa'; import Select from 'react-select'; import Dropdown from './dropdown'; const options = [ { value: 'Java', label: 'java' }, { value: 'python', label: 'python' }, { value: 'C'...
const { expect } = require('chai'); const { ethers } = require('hardhat'); describe('Compromised challenge', function () { const sources = [ '0xA73209FB1a42495120166736362A1DfA9F95A105', '0xe92401A4d3af5E446d93D11EEc806b1462b39D15', '0x81A5D6E50C214044bE44cA0CB057fe119097850c' ]; ...
function repmat(array, count) { var result = []; while (count--) { //result = result.concat(array); result.push(array) } return result; } function genArray(value, count) { var result = [] while(count--) { result.push(value) } return result } function rand(min, ...
// Copyright (c) 2015 Uber Technologies, Inc. // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, ...
import { check, isArray, deletePepeatArr } from "../../utils"; import { nullData } from "../../../utils/utils"; import { platformOptions } from "../../../utils/options"; /** * 角色管理列表数据 * */ export const getRoleData = data => { //console.log("角色列表:", data); const _data = check(data); let _list = []; if (_dat...
/** * number2bcd -> takes a bcd number and returns the corresponding decimal value * @param {Number} number BCD number to convert * @param {*} digits no of digits (default 4) */ const bcd2number = function (number, digits = 4) { let loByte = (number & 0x00ff); let hiByte = (number >> 8) & 0x00ff; let n = 0...
var fs = require('fs'); var _ = require('lodash'); var defaults = require('../settings.js'); var xml2js = require('xml2js'); var parser = new xml2js.Parser({ mergeAttrs:true, explicitArray:false }); var nextId = function(){ return Math.random().toString(36).substr(2, 16); }...
const SHA256 = require('crypto-js/sha256'); const bitcoinMessage = require('bitcoinjs-message'); const Blockchain = require('./Blockchain.js'); const Block = require('./Block.js'); const hex2ascii = require('hex2ascii'); /** * Controller Definition to encapsulate routes to work with blocks */ class RequestValidation...
/* expected input format for non-batch var batch = [];//batch objects look like {id:"ID",symbolID:"SFGPU----------",modifiers:{ModifiersUnits.T_UNIQUE_DESIGNATION_1:"T",MilStdAttributes.PixelSize:50}}; var e.data = {base64:true, batch:batch}; e.data.batch[].id = "ID"; e.data.batch[].symbolID = "SFGPU----------";//A...
const { decode } = require("sourcemap-codec"); class GeneratedFragmentMapper { constructor(generated_code, diff) { this.generated_code = generated_code; this.diff = diff; } get_position_relative_to_fragment(position_relative_to_file) { const fragment_offset = this.offset_in_fragment( offset_at...
"use strict"; /// <reference path="../../built/pxtlib.d.ts" /> /// <reference path="../../localtypings/mscc.d.ts" /> var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || ...
/** * This module provides list of masternode addresses. * No need to use this module manually - it's part of MNDiscovery. * It is written as class for testability purposes - there is need to be a way to * reset internal state of object. * @module MasternodeListProvider */ const { SimplifiedMNList, Simplifie...
'use strict'; 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.definePrope...
import React,{Component} from 'react'; import ReactDOM from 'react-dom'; import mirror, { connect,actions } from 'mirrorx'; import {getCookie} from "utils"; import {Icon} from 'tinper-bee'; import Menu from 'bee-menus'; import 'bee-menus/build/Menu.css'; import './menus.css'; const SubMenu = Menu.SubMenu; const { Item ...
const { getCrossElements } = require('../../utils/browser/gridFinder'); const { eraseHighlights } = require('../../utils/browser/eraser'); const { findElements } = require('../../utils/browser/elementFinder'); const { buildRegexFromParamString, buildRegexEscapedString } = require('../../utils/buildRegex'); const timeou...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Dialog from './Dialog'; import { PLynxApi } from '../../API'; import LoadingScreen from '../LoadingScreen'; import {PluginsConsumer} from '../../contexts'; import Icon from '../Common/Icon'; import { RESPONCE_STATUS } from '../../const...
import {JetView} from "webix-jet"; var url = window.location.protocol +"//"+ window.location.hostname+":"+window.location.port+window.location.pathname; export default class FP4FormView extends JetView{ config(){ return { type:"space", rows:[ { rows:[ { type:"header", template:"Form Request FP...
const request = require('request'); const cheerio = require('cheerio'); const fs = require('fs'); const path = require('path'); const imageFolderPath = "downloads/"; const adminAjaxUrl = 'http://2017.agileafricaconf.com/wp-admin/admin-ajax.php'; const util = require('util'); var he = require('he'); function loadschedu...
import React from "react"; import wxTiles from "./wxtiles"; import select from "react-select"; import sortBy from "lodash.sortby"; import defaults from "lodash.defaults"; import without from "lodash.without"; import layerLabel from "./layerLabel"; import rcSlider from "rc-slider"; import legend from "./legend"; import ...
var jsdom = require("jsdom"), fs = require("fs"), moment = require("moment"); var baseUrl = "http://www.legifrance.gouv.fr/"; // UTILS var replaceSpecialCharacters = function (string) { return string.replace(/[àáäâ]/g, "a").replace(/[èéëê]/g, "e").replace(/[ìíïî]/g, "i").replace(/[òóöô]/g, "o").replace(/[ùúüû]/g...
// ---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ---------------------------------------------------------------------------- /// <reference path="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\Microsoft.W...
//data for API calls var apiKey = '<KEY>'; var rootUrl = 'https://api.openweathermap.org'; var searchForm = document.querySelector('#search-form'); var searchInput = document.querySelector('#search-input'); var currentWeather = document.querySelector('#today'); var forecastWeather = document.querySelector('#forecast'...
const ANISITE_URL = 'https://anilist.co/anime/', MAL_URL = 'https://myanimelist.net/anime/' let contentDiv,audioDiv; window.onload = () => { contentDiv = document.getElementById('content'); audioDiv = document.getElementById('audioDiv'); ipcRenderer.send('getJsonFileData',true) } ipcRenderer.on('rotate_...
let { join } = require('path') let { parse } = require('url') let invoker = require('../invoke-http') let httpProxy = require('http-proxy') /** * Handle request fallthrough to @proxy + Arc Static Asset Proxy (ASAP) * In order: * - Matches * - @proxy handling (if present) * - ASAP handling (if present) * - Error ...
import React from 'react'; import { connect } from 'react-redux'; import HeaderPage from './PageHeader'; // import MenuPage from './Menu'; // import ContentPage from './Content'; import './Appraisal.css'; import { Menu, Table } from 'antd'; class Result extends React.Component { constructor() { super(); ...
'use strict' let _ = require('lodash') let BPromise = require('bluebird') let moment = require('moment') let wrapPersistenceLayer = require('../persistence-layer/wrapper.js') let PersistenceLayerBase = require('../persistence-layer/PersistenceLayerBase.js') let TaskDefinition = require('./TaskDefinition.js') let task...
const Decimal = require('decimal.js'); const Strategy = require('./Strategy'); // eslint-disable-line const Tick = require('./Tick'); // eslint-disable-line const Indicator = require('./Indicator'); // eslint-disable-line const Order = require('./Order'); const graph = require('./graphs/graph'); const { ORDER_TYPE, ORD...
import moment from 'moment-timezone'; function protrackDateToTimestamp(date) { return moment.tz(date, process.env.PROTRACK_TZ).unix(); } let durationRegex = /^P(\d+)H(\d+)M(\d+)S$/; function durationToNumber(duration) { let matches = duration.match(durationRegex); if (matches && matches.length > 3) { retu...
/** CONSTANTS **/ var body = document.querySelector("body"); var container = document.querySelector(".main-container"); var pattern = document.querySelector(".background-pattern"); var sections = document.querySelectorAll("section"); var odd_sections = document.querySelectorAll("section:nth-child(odd) .content"); var ...
var _ = require('lodash'); var request = require('request'); var rp = require('request-promise'); var async = require('async'); module.exports = function(){ var module = {}; module.createDataSource = function(inlineData, callback) { var dataSource = ""; var currentCode = 1; var sourceUrl = 'https://bi...
'use strict'; const stableDocker2 = "v2.0-r10"; const stableVersion2 = "2.0.274"; const stableDocker3 = "v3.0-r7"; const stableVersion3 = "3.0.164"; const stableDocker4 = "v4.0-b1"; const stableVersion4 = "4.0.206"; const dockerImage = "ossrs/srs"; const dockerMirror = "registry.cn-hangzhou.aliyuncs.com/ossrs/srs"; ...
import React, { useState } from 'react' import Link from 'next/link' import { toast } from 'react-toastify' import 'react-toastify/dist/ReactToastify.css' import PageTitle from '../components/PageTitle' import InputMask from 'react-input-mask' import validEmail from '../utils/validEmail' const Pesquisa = () => { con...
const inquirer = require('inquirer'); const mysql = require('mysql2'); const cTable = require('console.table'); const db = mysql.createConnection( { host: 'localhost', user: 'root', password: 'password', database: 'business_db' }, console.log(`Connected to the business_db database.`) ); db.conne...
/* <copyright> Copyright (c) 2012, Motorola Mobility LLC. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditio...
import { Form, Input, Tooltip, Icon, Cascader, Select, Row, Col, Checkbox, Button } from 'antd'; const FormItem = Form.Item; const Option = Select.Option; import React from 'react'; import { connect } from 'react-redux'; import * as userActions from '../../actions/userActions'; import { bindActionCreators } from 'redu...
/* eslint-disable ember/no-computed-properties-in-native-classes, ember/no-get */ import { find, map } from 'lodash'; import debug from 'debug'; import { get, set } from '@ember/object'; import Evented from '@ember/object/evented'; import Service, { inject as service } from '@ember/service'; import { scheduleOnce } fr...
"use strict"; var AppActions = require('./actions/AppActions'); var THREE = require('three'); if (global) { // 8th wall needs it... global.THREE = THREE; } // total diameter is 2*(TORUS_RADIOUS+TORUS_TUBE_DIAMETER) const TORUS_RADIUS = 0.025; // in meters const TORUS_TUBE_DIAMETER= 0.015; const ABSOLUTE_PART...
var App = {}; App.currentQuestionIndex = -1; App.currentQuestionKey = -1; App.totalPlayers = 0; App.clients = []; App.Init = function(){ console.log('App Running'); App.io = require('socket.io').listen(7777); App.io.sockets.on('connection', function (socket) { App.ConnectionMade(socket); }); App.Generat...
var txApp = angular.module('txApp', []); txApp.controller('TxShowCtrl', function ($scope, $http) { var stored_id = getQueryParam('stored', false); if (stored_id) { $scope.show_id = 'stored=' + stored_id; $scope.show_id_title = '(stored) ' + stored_id; $scope.inspect_mode = false; } else { var ins...
/* eslint-disable jsx-a11y/accessible-emoji */ import React, {useEffect, useRef, useState} from 'react' import Styles from './Styles' import {Field, Form,} from 'react-final-form' import {OnChange} from 'react-final-form-listeners' import axios from "axios"; import _get from 'lodash/get' import Select from 'react-selec...
import { tilemap } from "./tilemap.js"; import { COUNTRY, LANDMARK, util } from "./util.js"; import { random } from "./random.js"; export const mapGenerator = { generate: generate } /** * * @param {number} width * @param {number} height * @param {number} countryCount */ function generate(width, height, cou...
import { Commands } from '../utils/path-commands.js'; import { TWO_PI } from '../utils/math.js'; import { Path } from '../path.js'; import { Anchor } from '../anchor.js'; const cos = Math.cos, sin = Math.sin; /** * @name Two.Star * @class * @extends Two.Path * @param {Number} [x=0] - The x position of the star. ...
var prefix = "/mail/biEmailJobRunDiary" $(function() { initDateBox(); loadData(); copyText(); }); function loadData() { $('#exampleTable') .bootstrapTable( { method : 'get', // 服务器数据的请求方式 get or post url : prefix + "/list", // 服务器数据的加载地址 // showRefresh : true, // showToggle : true...
// app.js // Express application require('dotenv').config(); const express = require('express'); const passport = require('passport'); const cookieParser = require('cookie-parser'); const csrf = require('csurf'); const UMDCASStrategy = require('passport-umd-cas').Strategy; const mongoose = require('mongoose'); const ...
/** * L distance between a pair of vectors * * @description * Identical but much faster than `lDist(l)([fromX, fromY], [toX, toY])` * * @param {number} l - Defines the Lp space */ export const lPointDist = (l) => /** * L distance function * @param {number} fromX - X coordinate of the first point * @pa...
// Include gulp and plugins const gulp = require('gulp'); const del = require('del'); // pkg = require('./package.json'), const $ = require('gulp-load-plugins')({ lazy: true }); // const htmlInjector = require('bs-html-injector'); const browserSync = require('browser-sync').create(); const reload = browserSyn...
function showMyJourneys() { console.log("my journeys clicked"); //if (sessionStorage.getItem("isLogin")) { //let userId=seessionStorage.getItem("uid"); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && th...
// In this simulation, the X ray beam has a cross-sectional area of 1 m^2 and // the exposure time is 1 s. Hence, beam intensity and beam energy are // equivalent (I = E / (St)). All subsequent calculations are done by // considering that beam energy is used. // var electronChargeMantissa = 1.602e-6; function normalP...
window.onload = init; // makes sure init is called once window is fully loaded const doctors = [ { name: "<NAME>", id: 1, gender: "M", specialty: "Allergy & Immunology", location: [-123.157091, 49.264044], address: "2291 West Broadway, Vancouver, BC, Canada", ...
/*! ** Generate a color palette by interpolating a start and end color. ** https://github.com/ranbureand/colors ** Licensed MIT © 2017 <NAME> [www.andreaburan.com]. */ var colorHSL, colorRGB, colorHEX; // create codes var codes = document.createElement('div'); codes.setAttribute('class', 'codes'); do...
var fs = require('fs'); var readline = require('readline'); const calendarId = require('./config.js').calendarId; var google = require('googleapis'); var googleAuth = require('google-auth-library'); const nowDate = new Date(); const startDate = new Date(nowDate.getFullYear(), nowDate.getMonth(), 1 ); // current month...
'use strict'; import debug from 'debug'; import { EventEmitter } from 'events'; import 'regenerator-runtime/runtime'; import * as openpgp from 'openpgp'; const DEBUG = debug('sylkrtc:PGP'); const worker = new Worker('./worker.js'); class PGP extends EventEmitter { constructor(options={}, connection) { s...
/** * Created by Administrator on 2017/12/16 0016. */ import React from 'react'; import {Form, Input, Select, Button} from 'antd'; const FormItem = Form.Item; const Option = Select.Option; var UserDetail = (props) => { const {getFieldDecorator} = props.form const {parent, modalType, form, handleOk, handleCancel...
/** * Module dependencies */ var fs = require('fs') , gm = require('gm').subClass({ imageMagick: true }) , mongoose = require('mongoose') , Q = require('q') , sanitize = require('validator').sanitize , Schema = mongoose.Schema , _ = require('underscore'); /** * Image schema */ var I...
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { t...
const express = require("express"); const mongoose = require("mongoose"); const flash = require("connect-flash"); const session = require("express-session"); const MongoDbStore = require("connect-mongodb-session")(session); const exhbs = require("express-handlebars"); const app = express(); const path = require("path")...
import React, { useState, useEffect } from "react"; import styled from "styled-components"; import { useSelector, useDispatch } from "react-redux"; import { createOrder, cleanCart } from "../actions"; const PaymentWrapper = styled.div` width: 100%; height: 100%; padding: 2rem; .payment-header { font-size: 1...
let React = require('react'); let PropTypes = React.PropTypes; import { Link } from 'react-router'; import Section from './Section.js'; import CursiveHeader from './CursiveHeader.js'; import CenteredContainer from './CenteredContainer.js'; import SweetAlert from 'sweetalert-react'; let AdminForm = React.createClass(...
/** * https://github.com/vuejs/vue-cli * The MIT License (MIT) * Copyright (c) 2018 <NAME> * * Modified by moocss */ const fs = require('fs'); const path = require('path'); const debug = require('debug'); const chalk = require('chalk'); const readPkg = require('read-pkg'); const isPlainObject = require('is-plain...
import React, { useEffect, useState } from 'react'; import useMediaQuery from '@material-ui/core/useMediaQuery'; import useStyles from './Settings.style'; import { Backdrop, Button, Checkbox, CircularProgress, } from '@material-ui/core'; import errorImage from '../../../src/assets/images/error.svg'; import Time...
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { shouldComponentUpdate } from 'react-immutable-render-mixin'; import car from 'lodash/first'; import cdr from 'lodash/tail'; import { Set, List as ImmutableList } from 'immutable'; import memoize from 'fast-mem...
import { getActionableParent, getFlowPath, getProp, getScopedCondition, getScopedImageCondition, getScopes, getDataForLoc, hasCustomBlockParent, isValidImgSrc, pushImageToState, replacePropWithDataValue, } from '../utils.js' import safe from '../react/safe.js' import wrap from '../react/wrap.js' i...
import Pikaday from 'pikaday'; import moment from 'moment'; import * as Sentry from '@sentry/browser'; import 'bootstrap/dist/css/bootstrap.min.css'; import 'bootstrap-slider/dist/css/bootstrap-slider.min.css'; import 'select2/dist/css/select2.min.css'; import 'pikaday/css/pikaday.css'; import 'tippy.js/dist/tippy.css...
'use strict'; // Winner Status Enum let winnerStatus = Object.freeze({ Dealer: 0, Player: 1, Draw: 2 }); // Card variables let suits = ['Hearts', 'Clubs', 'Diamonds', 'Spades'], values = ['Ace', 'King', 'Queen', 'Jack', 'Nine', 'Eight', 'Seven', 'Six', 'Five', 'Four', 'Three', 'Two']; // DOM variables le...
'use strict'; var ApiGrid = require("./apiGrid.js"); var CollectionGrid = require("./collectionGrid.js"); var OutputFormatter = require('./outputFormatter.js'); var lodash = require('lodash'); var Joi = require('joi'); var Promise = require('bluebird'); var microtime = require('microtime'); var jwt = require('jsonwebt...
const mssql = require('mssql'); const db = require('../db'); const spawn = require('cross-spawn'); const moment = require('moment'); const axios = require('axios'); const config = { user: 'yangyiwu', password: '<PASSWORD>', server: '127.0.0.1', //You can use 'localhost\\instance' to connect to named instance data...
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; ...
/* jslint node: true */ "use strict"; global.modulesCache = global.modulesCache || {}; if(global.modulesCache['templated']){ module.exports = global.modulesCache['templated']; return; } var fs = require('fs'); var crier = require('crier').addGroup('templated'); var i18n = require('textualization'); var engines =...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const chai_1 = require("chai"); const sinonChai = require("sinon-chai"); chai_1.use(sinonChai); const sinon_1 = require("sinon"); const errors_1 = require("../errors"); const component_resolver_1 = require("./component-resolver"); describe("de...
/* * The MIT License * * Copyright (c) 2019 <NAME> (https://github.com/vgorloff) * * 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...
'use strict'; const BigNumber = require('bignumber.js'); const rootPrefix = '../..', responseHelper = require(rootPrefix + '/lib/formatter/response'), commonValidator = require(rootPrefix + '/lib/validators/common'), elasticSearchLibManifest = require(rootPrefix + '/lib/elasticsearch/manifest'), esSearchServi...
let stringSet = new Set(); let pipeSet = new Set(); let contentList = []; const charset = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', ...
import React, { Component } from 'react' import { Table, Icon, Button, Radio, Form, Input, Modal, Popconfirm, notification, Row, Col } from 'antd'; const FormItem = Form.Item; const ModalForm = Form.create()( class extends Component { render() { const { visible, data, running, onCancel...
import React, { Component } from "react"; import ReadingCollectorContract from "./contracts/ReadingCollector.json"; import getWeb3 from "./getWeb3"; import 'bootstrap/dist/css/bootstrap.min.css'; import Carousel from 'react-bootstrap/Carousel' import Container from 'react-bootstrap/Container' import Row from 'react-boo...
import L from 'leaflet'; import {MapContainer, TileLayer, Marker, Popup, GeoJSON} from 'react-leaflet' import 'leaflet/dist/leaflet.css'; import {sparql} from "d3-sparql"; import {useEffect, useState} from "react"; import icon from 'leaflet/dist/images/marker-icon.png'; import iconShadow from 'leaflet/dist/images/marke...
'use strict'; const periodic = require('periodicjs'); const logger = periodic.logger; const helpers = require('../helpers'); const SKIP_STATUSES = ['INPROGRESS', 'PENDING',]; /** * Makes an API call to AWS Machine Learning to generate a machine learning model * @param {Object} options.machinelearning AWS Mach...
import * as React from 'react'; import { styled, Box } from '@mui/system'; import ModalUnstyled from '@mui/core/ModalUnstyled'; import { Grid } from '@material-ui/core'; import Typography from '@mui/material/Typography'; import DialogContent from '@mui/material/DialogContent'; import Dialog from '@mui/material/Dialog...
const sdk = require('cloudinary-core') /** istanbul ignore file */ const basicOptimizations = { quality: 'auto', fetch_format: 'auto' } const getTransformationOptions = (options = {}) => { return { ...basicOptimizations, ...options } } /** * Delivery types - https://cloudinary.com/documentation/imag...
#!/usr/local/bin/node var async = require('async'); var fileName=''; var resetFlag=false; var text=''; var tx=new Array(); var lineNo=0; var nxpstep=9; var nxp=0; var dir=1.0; var ulinkSW=false; var ftxt=''; require('date-utils'); //console.log('process.argv.length='+process.argv.length); // oneDayLog.js YYYY-MM-DD [-...
const INPUT_TENSOR_SIZE = 224*224*3; const OUTPUT_TENSOR_SIZE = 1001; const MODEL_FILE = './model/mobilenet_v1_1.0_224.tflite'; const LABELS_FILE = './model/labels.txt'; class Utils { constructor() { this.tfModel; this.labels; this.model; this.inputTensor; this.outputTensor; this.inputTensor...
var Random = require('..'); var _ = require('lodash'); function range(input, min, max) { return input >= min && input <= max; } describe('Random', function() { function t(name, result, validator) { if (validator) { it(name, function() { validator(result).should.be.ok; ...