text stringlengths 3.22k 29.5k |
|---|
'use strict';
var Lib = require('../../lib');
var Registry = require('../../registry');
var Color = require('../../components/color');
var handlePeriodDefaults = require('../scatter/period_defaults');
var handleGroupingDefaults = require('../bar/defaults').handleGroupingDefaults;
var autoType = require('../../plots/ca... |
/**
* Copyright 2020 Phenix Real Time Solutions, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unle... |
'use strict';
require('proto-lib').get('_');
/**
* @module DistIO/ServerEvents
*/
const minimist = require('minimist');
const path = require('path');
const master = require('../').Master;
const commands = require('./Commands');
const Response = require('./Response');
const Slave = require('./Slave');
let slaveIds... |
function show_history_file() {
var input = document.getElementById("hfile");
var file = input.files[0];
if (!file) {
alert("Can't open file");
return;
}
var reader = new FileReader();
reader.onload = function () {
var text = reader.result;
var json = JSON.parse(te... |
var fitApp = angular.module('fitApp', []),
ding = document.createElement('audio');
ding.setAttribute('src', 'ding.mp3');
ding.load();
//TODO clean up the loading and saving of data.
function pretty(t){
var ret = [];
t = t/1000;
var hours = Math.floor(((t % 31536000) % 86400) ... |
const wordTable = {
male: "男", female: "女", other: "其他",
Administrator: "管理员", Planner: "剂量师", Physicist: "物理师",
Solaris: 'Solaris', Windows: 'Windows', Linux: 'Linux', 'Mac OS': 'Mac OS',
NodeServer: '节点服务器', PlanningServer: '计划服务器', StandaloneServer: '独立服务器', BackupServer: '备份服务器'
};
const editTable = functi... |
import React, { Component } from 'react'
import { Input } from 'antd';
import { withStyles } from '@material-ui/core/styles';
import { green, red } from '@material-ui/core/colors';
import Button from '@material-ui/core/Button';
import Radio from '@material-ui/core/Radio';
import RadioGroup from '@material-ui/core/Radio... |
/** @module receivers
* Default receivers which make all the fancy stuff work.
*/
"use strict";
const channel = require("./channel").channel;
const constants = require("./constants");
const format = require("util");
const id = require("./util").id;
const logger = require("./logger");
const message ... |
const db = require('../db');
const {
INTRODUCTION_CHANNEL_ID,
MOD_ROLE_ID,
GERMINATING_ROLE_ID,
WELCOME_CHANNEL_ID,
CODE_OF_CONDUCT_MESSAGE_ID,
SEEDLING_ROLE_ID,
BOT_LOG_CHANNEL_ID,
MIN_INTRO_MESSAGE_LENGTH,
WELCOME_MESSAGE
} = require('../config');
const reactions = {};
const introductions = {};
a... |
import * as util from 'util'
import constants from './constants'
import EventEmitter from 'events'
import Event from './Event'
import Request from './Request'
import Response from './Response'
import Burtle from './Burtle'
var transports = {
get HIDTransport(){
return require('../transports/hid')
},
get LibUSBTra... |
/***************************************************************************************
Nested list collapsing script written by <NAME> - 21/11/2003
Version 2.3.0 - this script takes existing HTML nested UL or OL lists, and collapses them
Updated 13/02/2004 to allow links in root of expanding branc... |
import {
ensureException,
duration
} from './helpers/utils.js';
const MEMBERS = artifacts.require('../Members');
const TOKEN = artifacts.require('../AuditToken');
const COHORTFACTORY = artifacts.require('../CohortFactory');
const MEMBER_HELPERS = artifacts.require('../MemberHelpers');
const NODE_OPERATIONS = ... |
var organisms=new Array();
var roles = new Array();
function addSelectedOrganism() {
selected_option_index=$("possible_organisms").selectedIndex;
selected_option=$("possible_organisms").options[selected_option_index];
title=selected_option.text;
id=selected_option.value;
if(checkNotInList(id,orga... |
const express = require('express');
const router = express.Router();
const flash = require('express-flash');
const sql = require('mssql');
const path = require('path');
const fetch = require('node-fetch');
const fs = require('fs');
const moment = require('moment');
const axios = require('axios');
const discord = requir... |
"use strict";
// I M P O R T S
import asyncHtml from "choo-async/html";
import dedent from "dedent";
import got from "got";
import Octokit from "@octokit/rest";
// U T I L S
import headerBlockchain from "~component/api/header-blockchain";
import headerSdk from "~component/api/header-sdk";
import redirects from ... |
const fs = require('fs')
const eth = require('ethers')
const linker = require('solc/linker')
const channelManagerArtifacts = require('../build/contracts/ChannelManager.json')
const humanStandardTokenArtifacts = require('../build/contracts/HumanStandardToken.json')
const ecToolsArtifacts = require('../build/contracts/EC... |
const fp = require('lodash/fp');
const _ = require('lodash');
const sql = require('./sql');
const { DatabaseAnalyser } = require('dbgate-tools');
const { isTypeString, isTypeNumeric } = require('dbgate-tools');
function normalizeTypeName(dataType) {
if (dataType == 'character varying') return 'varchar';
if (dataT... |
function ConnectionUI(parent_conn) {
this.src_pos = [0, 0]
this.dst_pos = [0, 0]
this.src_slot_div = null
this.dst_slot_div = null
this.flow = false
this.selected = false
this.deleting = false
this.parent_conn = parent_conn
this.color = '#000'
}
ConnectionUI.prototype.resolve_slot_divs = function(and_redraw) ... |
import fuzzaldrinPlus from 'fuzzaldrin-plus';
import emojiAliases from 'emojis/aliases.json';
import axios from '../lib/utils/axios_utils';
import AccessorUtilities from '../lib/utils/accessor';
let emojiMap = null;
let validEmojiNames = null;
export const EMOJI_VERSION = '1';
const isLocalStorageAvailable = Accesso... |
// noinspection ES6ConvertVarToLetConst
// path D:\other\LifePlay_4_15_64bit\LifePlay\Content\Modules\vin_Base\Scenes\home\deliveryman.lpscene
const {LPScene} = require('lifeplayjs')
const scene = new LPScene({name: 'deliveryman'}, (scene) => {
const {Player, none, $WHERE, narrative, option, random, WHEN, a... |
#!/usr/bin/env node
var AWS = require('aws-sdk')
var s3Website = require('./')
var program = require('commander')
var url = require('url')
var s3site = s3Website.s3site
var deploy = s3Website.deploy
var getConfig = s3Website.config
var templateConfig = s3Website.templateConfig
require('console.table')
require('colors'... |
/*----- PLUS MINUS KOLICHESTVO -----*/
var token = $('#token').val();
var lang = $('#language_js').text();
var out_of_stock = [];
out_of_stock['az'] = 'Anbarda yetəri qədər məhsul yoxdur';
out_of_stock['ru'] = 'На складе недостаточно продуктов';
out_of_stock['en'] = 'There is not so many products in warehouse';
out_o... |
const camelizeRE = /-(\w)/g
const camelize = (str) => {
return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''))
}
const parseStyleText = (cssText = '', camel) => {
const res = {}
const listDelimiter = /;(?![^(]*\))/g
const propertyDelimiter = /:(.+)/
cssText.split(listDelimiter).forEach(functi... |
/* Modified for Unicode input by <NAME>, <EMAIL>, 2019-2-4
*
* Copyright (c) 2013 Profoundis Labs Pvt. Ltd., and individual contributors.
*
* All rights reserved.
*/
/*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that th... |
import React, { Component, Fragment } from "react";
import ReactCSSTransitionGroup from "react-addons-css-transition-group";
import { Row, Col, Button, Card, CardBody, CardTitle } from "reactstrap";
import VectorMapsAnimated from "../../Components/Maps/Examples/VectorMaps/Animated";
import PageTitle from "../../../Layo... |
/***********************************************************************
* solarAngles.js
* <NAME>
*
* This file contains functions supporting solarShadowing.html
***********************************************************************/
var image; // image of one row of PV solar collectors
v... |
import { TextField } from '@mui/material';
import React, { useState } from 'react';
import { url } from '../../Constants';
import { AlertMessage } from '../Support/AlertMessage';
const Getstudentattendance = () => {
const [firstField, setfirstField] = useState();
const [display1, setdisplay1] = useState("none"... |
/*Copyright 2021 <NAME>
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 in writing, software
distribut... |
import React, { useState, useRef, useEffect } from 'react';
import mapboxgl from 'mapbox-gl';
import './style.css';
import $ from "jquery";
import API from "../../utils/API";
// username: dave
// password: password
mapboxgl.accessToken = "<KEY>";
const Map = ({ setCountry, setPopup, setCountryState, setUploadState,... |
// this script is an utility one for the front-end DOM management not associated with peers connection (peer.js).
// DOM main components for the event management system
homepage = document.getElementById('homepage-content')
lobby = document.getElementById('lobby-content')
game = document.getElementById('game-content'... |
/*
* Copyright (c) 2019 simplenodeorm.org
*/
"use strict";
const orm = require('../orm.js');
const util = require("../main/util.js");
const testUtil = require("./testUtil.js");
const assert = require('chai').assert;
module.exports.test = async function( repository) {
let metaData = repository.getMetaData();
... |
const expect = require('expect');
const omit = require('lodash/omit');
const { ObjectID } = require('mongodb');
const { populateDB, auxiliary, auxiliaryFromOtherCompany, surcharge } = require('./seed/finalPaySeed');
const app = require('../../server');
const FinalPay = require('../../src/models/FinalPay');
const { getT... |
'use strict';
const ThompsonConstruction = require('./thompsonConstruction');
const Parser = function() {
this.tc = new ThompsonConstruction();
};
Parser.prototype = {
constructor: Parser,
OR_OP: '|',
STAR_OP: '*',
NOT_OP: '^',
OPTION_OP: '?',
VIRTUAL_CAT_OP: '1',
ESCAPE_SYMBOL: '\\',... |
var prefix = "/pay/payAudit"
$(function() {
//时间框
$(".form_datetime").datetimepicker({
language : 'zh-CN',
format: 'yyyy-mm-dd',
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
minView: 2,
forceParse: 0
});
// 默认填充查询开始时间
$("#beginDate").val... |
const WorldGenerator = require("./WorldGenerator.class.js");
const Chunk = require("prismarine-chunk")("1.8");
const Vec3 = require("vec3");
const Biome = require("../worlds/Biome.class.js");
const Exception = require("../utils/Exception.class.js");
const Block = require("../material/block/Block.class.js");
module.exp... |
// initial version from https://github.com/LeanKit-Labs/wascally
const Monologue = require('monologue.js')
const signal = require('postal').channel('rabbit.ack')
const { tick } = require('./util')
const calls = {
ack: 'ack',
nack: 'nack',
reject: 'reject'
}
const findLast = (arr, pred) => {
for (let i = arr.... |
const path = require('path')
const _ = require('@offirmo/cli-toolbox/lodash')
const jsen = require('jsen')
const visual_tasks = require('@offirmo/cli-toolbox/stdout/visual_tasks')
const fs = require('@offirmo/cli-toolbox/fs/extra')
const json = require('@offirmo/cli-toolbox/fs/json')
const tildify = require('@offirmo/c... |
var fs = require('fs');
var mkdirp = require('mkdirp');
var mongoid = require('mongoid-js').mongoid;
// var id1 = mongoid();
exports.Id = function(){
return mongoid();
}
exports.ready = false;
var sleep = require('sleep');
var sha512 = require('js-sha512');
exports.Hash = function() {
var args = Array... |
#!/usr/bin/env node
// This file controls the calibration setup as described in https://github.com/lab11/socitrack/software/tottag/calibration/README.md
// Results are stored locally over BLE
const noble = require('@abandonware/noble');
const buf = require('buffer');
const fs = require('fs');
co... |
import React from 'react';
import { convertToCoords, getMapKey, getDirections } from '../store/map';
import { findFood, findEvents } from '../store/yelp';
import { connect } from 'react-redux';
import mapboxgl from '!mapbox-gl';
import findMiddle from './findMiddle';
import MapboxDirections from '@mapbox/mapbox-gl-dire... |
import React, { useEffect, useState } from 'react';
import axios from 'axios';
import { useParams } from 'react-router-dom';
import ROUTES_SUPPLEMENTARY from '../app/routes/SupplementaryReport';
import SupplementaryDetailsPage from './components/SupplementaryDetailsPage';
import ROUTES_COMPLIANCE from '../app/routes/Co... |
"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 actions from '../models/extension-ui-actions';
import Interceptor from './interceptor';
import PocChecker from './poc-checker';
import {name} from '../../package';
import sourceMap from 'source-map';
sourceMap.SourceMapConsumer.initialize({
"lib/mappings.wasm": "https://unpkg.com/source-map@0.7.3/lib/mappings... |
import _ from 'lodash';
const {knex} = require('../util/database').connect();
import {GCS_CONFIG} from '../util/gcs';
import CONST from '../constants';
const logger = require('../util/logger')(__filename);
import * as score from './score-core';
import moment from 'moment-timezone';
const FEED_ITEM_TYPES = new Set(['IM... |
/**
*
* @name Labeled Pages exporter
* @desc Recognise page color labels and choose which export to pdf, jpeg or png
* @version 1.4
*
* @author Smart Mix smartmix.it
* @link https://smartmix.it
*
*
* @see https://smartmix.it/grafica-design/labeled-pages-exporter-indesign/
*/
var nome = "Labeled Pag... |
"use strict";
require("core-js/modules/es.symbol.js");
require("core-js/modules/es.symbol.description.js");
require("core-js/modules/es.symbol.iterator.js");
exports.__esModule = true;
exports.setupEngine = setupEngine;
exports.registerEngine = registerEngine;
exports.getRegisteredHotInstances = getRegisteredHotIns... |
/**
* Renders the Formulate forms, inserting them into the appropriate place
* in the DOM.
* @param forms The data for the forms to render.
* @param fieldRenderers The associative array of the field rendering functions.
* @param fieldValidators The associative array of the field validating functions.
*/
function ... |
const startContainer = document.querySelector("#start-container");
const gameContainer = document.querySelector("#game-container");
function start() {
// VALUES MODIFIELDS in FUNCTIONS
let velocity = 5;
let positionY = parseInt(Math.random() * 334);
let letsShot = true;
let gameOver = false;
let energyLent... |
/* global host, bridge, data, context */
'use strict';
const {
Object: localObject,
Array: localArray,
Error: LocalError,
Reflect: localReflect,
Proxy: LocalProxy,
WeakMap: LocalWeakMap,
Function: localFunction,
Promise: localPromise,
eval: localEval
} = global;
const {
freeze: localObjectFreeze
} = localO... |
var parser,
parser2;
if(typeof console === 'undefined'){
console = {};
console.log = function(str){document.getElementById("out").value = uneval(str)};
}
var printOut = function(str){document.getElementById("out").value = JSON.stringify(str)};
$(function () {
$("#process_btn").click(processGrammar);
... |
const config = require('../../config/config.json')
const Canvas = require('canvas');
const user = require("../../models/user.js");
const rankcard = require("../../models/user-card.js"),
guild = require("../../models/guild.js");
const { purple } = require("../../assets/color.json")
const { check, nocheck, thug9 } ... |
const fs = require('fs');
const chalk = require('chalk');
const path = require('path');
/*
type Options = {
echo?: string;
ask?: string;
value?: string;
autocomplete?: string[] | Function;
};*/
const term = 13; // carriage return
function prompt(
ask/*?: string | Options*/,
value/*?: string | Options*/,
... |
// used in getParameters and doClearIgnoreFields to ignore specific hidden fields
var pentaho_ignoreFields = new Array();
var pentaho_ignoreIndexOfFields = new Array();
var pentaho_optionalParams = new Array();
var pentaho_paramName = new Array();
function dynExec(funcName, formName, objectName) {
var func =... |
const Utils = require('../core/Utils')
const Translator = require('../core/Translator')
const ee = require('namespace-emitter')
const UppySocket = require('./UppySocket')
// const en_US = require('../locales/en_US')
// import deepFreeze from 'deep-freeze-strict'
/**
* Main Uppy core
*
* @param {object} opts general... |
/*-
*
* Hedera Mirror Node
*
* Copyright (C) 2019 - 2020 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-... |
import { certifiable_online_components } from '../../../../config/config';
import { Tooltip } from 'antd';
import { SyncOutlined, CheckOutlined } from '@ant-design/icons';
import Swal from 'sweetalert2';
import { oms_link } from '../../../../config/config';
import Status from '../../../common/CommonTableComponents/Stat... |
"use strict";
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: string-docs
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require("assert");
const debugModule ... |
import React from 'react';
import { Prism } from '@mantine/prism';
import { css, py } from './languages.js';
import { demoCode } from './usage.js';
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Objec... |
function generateDungeon (rng) {
const map = generateFromMaze(rng, 5, 5, 11)
// add walls
for (let y = 0; y < map.height; y++) {
for (let x = 0; x < map.width; x++) {
if (shouldBeWall(map, x, y)) {
map.data[y][x] = { x, y, type: rng.randomChance(70) ? '-' : '~' }
}
}
}
// TODO t... |
$(document).ready(function(){
$(function() {
$('#login-form-link').click(function(e) {
e.preventDefault();
$("#register-form").fadeOut(1);
$("#login-form").fadeIn(100);
$('#register-form-link').removeClass('active');
$(this).addClass('active');
});
$('#register-form-link').click(functi... |
const path = require('path');
const mqtt = require('mqtt');
const noble = process.platform === 'win32' ? require('noble-winrt') : require('@abandonware/noble');
const SerialPort = require('serialport');
const Readline = require('@serialport/parser-readline');
const uartUUID = '6e400001b5a3f393e0a9e50e24dcca9e';
const ... |
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) {
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
... |
var LiSA = LiSA || {}
LiSA.load = (path, type, title, callback) => {
var s, i;
if (!type) type = path.substr(path.lastIndexOf(".") + 1);
if (type == "js") {
var ss = document.getElementsByTagName("script");
for (i = 0; i < ss.length; i++) {
if (ss[i].src && ss[i].src.indexOf(path... |
var chessGrounds = {};
var ws = null;
var queue = [];
var shown_games = {};
var schedule_max = 10;
var schedule_page_size = 10;
function send(ws, message) {
if (ws.readyState === 1) {
ws.send(message);
} else {
queue.push(message);
}
}
function run() {
const baseURL = 'wss://socket.li... |
/**
* @module testing/mocks/data
*/
import moment from '../../lib/moment-tz';
import omit from 'platform/utilities/data/omit';
import { VIDEO_TYPES } from '../../utils/constants';
/**
* Creates a mock appointment record, based on the data and version number
* provided.
*
* Versions currently supported:
* - 0: M... |
import React from "react";
import distance from "@turf/distance";
import { Marker, MapPopup } from "../pages/SearchForTrainingsAndJobs/components";
import ReactDOM from "react-dom";
import mapboxgl from "mapbox-gl";
import { Provider } from "react-redux";
import { fetchAddresses } from "../services/baseAdresse";
import... |
import cax from 'cax'
import { getControlPoint } from './get-control-point'
import Axis from '../../axis/src'
const { TWEEN, Graphics, Circle, Group, Stage, To } = cax
export default class Line extends Group {
constructor (data, lines, axisConfig) {
super()
Object.keys(axisConfig).forEach(key => {
... |
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as actions from '@/store/actions';
import './index.css';
import { Link } from 'react-router-dom'
import Iconpath from '@/utils/iconpath'
import { http } from '@/api/http'
import { ColorExtractor } from... |
var N3Writer = require('../N3').Writer;
var chai = require('chai');
chai.should();
describe('N3Parser', function () {
describe('The N3Writer module', function () {
it('should be a function', function () {
N3Writer.should.be.a('function');
});
it('should make N3Writer objects', function () {
... |
// Copyright 2018 Locomote Limited
//
// 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 t... |
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj ... |
import React, {Component} from 'react';
import Select from 'antd/lib/select';
import 'antd/lib/select/style';
import message from 'antd/lib/message';
import 'antd/lib/message/style';
import {HttpTool} from "../../../../utils/index";
const Option = Select.Option;
let prefix = "mylib-area"
class Index extends Componen... |
// Truncate a string keeping full last word
// via https://stackoverflow.com/a/1199420/2501713
function truncate (str, n, useWordBoundary) {
if (str.length <= n) { return str; }
const subString = str.substr(0, n-1); // the original check
return (useWordBoundary
? subString.substr(0, subString.lastIndexOf(" ... |
/*******************************************************************************
* Copyright (c) 2018, 2019 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is... |
import React from "react";
import "./styles/CharDetailTables.scss";
import "../modules/CharDetail";
import { Reinforce, Enchant, Emblem } from "../modules/CharDetail";
const itemOrder = [
"WEAPON",
"SHOULDER",
"JACKET",
"PANTS",
"WAIST",
"SHOES",
"WRIST",
"AMULET",
"RING",
"SUPPORT",
"MAGIC_STON",
"EARRING... |
import { getExternalResources } from '../../../core/util/resource';
import VectorLayer from '../../../layer/VectorLayer';
import OverlayLayerCanvasRenderer from './OverlayLayerCanvasRenderer';
import PointExtent from '../../../geo/PointExtent';
import * as vec3 from '../../../core/util/vec3';
const TEMP_EXTENT = new P... |
class LineChart{
constructor(container, options){
this.container = container;
this.data;
this.labels = options.data.labels;
this.datasets = options.data.datasets;
this.onclickarr;
this.cWidth = container.clientWidth;
this.cHeight = container.clientHeight... |
"use strict";
function raf(fn) {
window.requestAnimationFrame(function () {
window.requestAnimationFrame(function () {
fn();
});
});
}
function fadeOut(item) {
let hendler = function () {
item.style.display = 'none';
item.classList.remove('fade-active');
... |
import { parseDate, formatDate } from '@progress/kendo-angular-intl';
import { toLocalDate } from '@progress/kendo-date-math';
import { BehaviorSubject } from 'rxjs';
import { setter } from '../common/setter';
import { getter } from '../common/getter';
import { defaultModelFields } from '../common/default-model-fields'... |
// Jun 12 2017
var ethPriceUSD = 380.39;
// -----------------------------------------------------------------------------
// Accounts
// -----------------------------------------------------------------------------
var accounts = [];
var accountNames = {};
addAccount(eth.accounts[0], "Account #0 - Miner");
addAccount... |
'use strict';
/* jshint expr: true */
const expect = require( 'chai' ).expect;
const ROOT_PATH = '../';
const MODULE_PATH = 'index';
const FULL_MODULE_PATH = ROOT_PATH + MODULE_PATH;
const subzero = require( FULL_MODULE_PATH );
describe( MODULE_PATH, function() {
describe( 'subzero', function() {
d... |
import React, { Component, Fragment } from 'react';
import { connect } from 'dva';
import router from 'umi/router';
import {
Row,
Col,
Form,
Input,
Select,
Icon,
Button,
Collapse,
DatePicker,
PageHeader,
Radio,
} from 'antd';
import prompt from '@/components/Prompt';
import moment from 'moment'
im... |
/**
* Copyright (c) 2014, Tidepool Project
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
* This program is distributed in th... |
/**
*
* App
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*/
import React, { memo, useEffect } from 'react';
import { Helmet } from 'react-helmet';
import { Switch, Route } from 'react-router-dom';
import PropTyp... |
/* global module, require */
/* jshint node: true, esversion: 6 */
/* Magic Mirror
* Node Helper: MMM-ModuleScheduler
*
* By <NAME> http://ianperrin.com
* MIT Licensed.
*/
var NodeHelper = require("node_helper");
var CronJob = require("cron").CronJob;
// MODULE CONSTANTS
const SCHEDULE_TYPE_GLOBAL = "global";
co... |
/* @author "<NAME>" */
function switchTab(evt, tab_id) {
if (evt.currentTarget.className.includes(" active")) {
// tab is currently active. avoid re-rendering it
return;
}
let i;
const tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i+... |
const File = require('../../js/file.js');
function ExUpload(explorer, url, params) {
"use strict";
var exUpload = {
explorerContainer: null,
useAutomaticId: false,
url: url,
params: params,
debugMode: false,
callback: undefined,
explorer: explorer,
... |
import React from 'react';
import { storiesOf } from '@storybook/react';
import Paper from '@material-ui/core/Paper';
import TopSection from 'library/saya/Kenny/TopSection';
import ImageNumberSection from 'library/saya/Kenny/ImageNumberSection';
import Introduction from 'library/saya/Kenny/Introduction';
import GreenNu... |
const User = require('../util/schema/user_schema');
const Comment = require('../util/schema/comment_schema');
const Article = require('../util/schema/article_schema');
const Bcrypt = require('bcryptjs');
const settoken = require('../util/token_vertify');
const fs = require('fs');
/*
生成 token
jwt.sign() 接受两个参数,一... |
// Copyright 2013 the V8 project authors. 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 ... |
$(document).on('click', '.plus, .minus', function () {
var $qty = $(this).closest('.cart__qty').find('.cart__qty-input'),
currentVal = parseFloat($qty.val()),
max = parseFloat($qty.attr('max')),
min = parseFloat($qty.attr('min')),
step = $qty.attr('step');
if (!currentVal || c... |
var nunjucks = require('nunjucks');
var moment = require('moment');
var qs = require('qs');
var he = require('he');
/**
* templates
* @augments Augments the apos object with facilities for rendering Nunjucks templates
* with access to appropriate data.
* @see aposLocals
*/
var _ = require('lodash');
var async =... |
import _ from 'lodash';
import keycodes from './lib/keycodes';
import ParallaxLayer from './lib/Parallaxlayer';
import File from './lib/File';
import Folder from './lib/Folder';
import VideoFile from './lib/VideoFile';
import ImageFile from './lib/ImageFile';
import Bullet from './lib/Bullet';
import Shooter fr... |
/**
* jquery.jpostal.js ver2.2
*
* Copyright 2014, <NAME>, <NAME>. http://www.ninton.co.jp
*
* Released under the MIT license - http://en.wikipedia.org/wiki/MIT_License
*
* Requirements
* jquery.js
*/
function JpostalDatabase ( i_options ) {
this.address = []; // database cache
this.map = {
};
this.... |
/*! @license Firebase v4.5.0
Build: rev-f49c8b5
Terms: https://firebase.google.com/terms/ */
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.IndexedDbPersistence = undefined;
var _assert = require('../util/assert');
var _error = require('../util/error');
var _log = require(... |
const util = require('util');
// const pdf = require('html-pdf')
function padZero(num, count) {
if (['string','number'].indexOf(typeof num) < 0)
throw new Error('Incorrect input number');
let res = num + ""
while (res.length < count){
res = "0" + res
}
return res
}
function customStatusError (status... |
// ------------------------------------
// Main HTTP load testing interface
// ------------------------------------
//
// This file defines run(), LoadTest, createClient() and extendClient().
//
// This file defines the main API for using nodeload to construct load tests. The main function for
// starting a load test i... |
const fs = require('fs');
const readline = require('readline');
const {google} = require('googleapis');
//Import the Google Cloud Natural language Processing library
const language = require('@google-cloud/language');
const languageClient = new language.LanguageServiceClient();
const Request = require('Request');
//TR... |
import * as React from "react";
import styled from 'styled-components'
import { Row, Col } from 'react-bootstrap'
import StyledButton from '../navbar/Button.js'
import checkpoint from '../../assets/mfa/checkpoint.svg'
import elementsgroup from '../../assets/about/header/elementsgroup.svg'
import rec from '../../assets/... |
//self calling function, all directives, controllers and routes housed in other files
(function () {
'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', ['ngRoute', 'angular.filter']);
})();
angular.module('myApp').factory("porsche", ['$http', function p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.