text stringlengths 3.22k 29.5k |
|---|
/* Functions for the advimage plugin popup */
var preloadImg = null;
var orgImageWidth, orgImageHeight;
function preinit() {
// Initialize
tinyMCE.setWindowArg('mce_windowresize', false);
// Import external list url javascript
var url = tinyMCE.getParam("external_image_list_url");
if (url != null) {
... |
import _ from 'lodash';
import utils from '../../utils';
import { AirParsingError } from './AirErrors';
const firstFlightDetails = obj => (
_.isObject(utils.firstInObj(obj)) ? utils.firstInObj(obj) : {}
);
function getBaggage(trip, obj) {
let add = null;
if (obj['air:NumberOfPieces'] !== undefined) {
add = ... |
/**
* stores the current settings, such time and image of the data
* all visualizations should use these settings to sync between them
* @property {string} image - the image currently selected
* @property {float[]} rgba - the color currently selected int the format [red[0,255],green[0,255],blue[0,255],alpha[0,1]]
... |
var _ = require('underscore'),
async = require('async'),
config = require('../config'),
crypto = require('crypto'),
exec = require('child_process').exec,
fs = require('fs'),
hooks = require('../hooks'),
imager = require('../imager/config'),
path = require('path'),
report = require('../report/config'),
vm = re... |
import LabelButton from './labelbutton';
import PlayinScene from './playingscene';
import HowToPlayScene from './howtoplayscene';
import CreditScene from './creditscene';
import ControlSize from './controlsize';
import ScreenSize from './screensize';
import Cursor from './cursor';
import GamepadManager from './g... |
// ------------------------------------------------------------------------------- //
// ------------------------------------------------------------------------------- //
// SCRIPT OVERVIEW
// script is intended to
// 1) get a list of all users
// 2) for each user in the list, scrape their email
// 3) do the stuff t... |
var _ = require('lodash');
var utils = require('../utils');
var BaseError = utils.BaseError;
var Extendable = utils.Extendable;
var events = require('../events');
var Eventable = events.Eventable;
var HttpApiError = BaseError.extend(function(self) {
/**class:HttpApiError()
Thrown when an error occurs while... |
var htmlbody = $('html, body');
var loadedData = [];
var indexApp = angular.module('indexApp', ['ngResource']);
angular.module('indexApp').value('$anchorScroll', angular.noop);
indexApp.config(function($routeProvider, $locationProvider){
$routeProvider
.when('/', { //TOON
templateUrl: window.BASE + "js/j... |
var Imba = require('imba'), self = {};
try {
var pty = require('node-pty');
} catch (e) {
console.log("could not load pty",e);
};
var path = require("path");
var fs = require("fs");
// var msgpack = require "msgpack"
var Terminal = require("./terminal").Terminal;
var TerminalModel = require("./model").TerminalMode... |
import L from 'leaflet';
import './style.css';
import Contextmenu from '~/lib/contextmenu';
import copyToClipboard from '~/lib/clipboardCopy';
function zeroPad(num, size) {
var s = String(num);
while (s.length < size) {
s = "0" + s;
}
return s;
}
const bigLetterReplacers = [
/* eslint-disa... |
load_project(10, 0,"");
function load_project(limit=10, page=0, search=""){
console.log("start");
var json = {
"limit" : "10",
"page" : page,
"search" : search
};
$.post("C_follow_up/api_get_project", json, function(data){
var NowDate = data.nowDate;
index = 0;
var day = 0;
va... |
var searchFormE1 = document.querySelector('#search-form');
var searchButton = document.querySelector('#search-button');
var cityInput = document.querySelector('#search-input');
var pastCitiesbtn = $('#previous-search')
console.log('IS THIS THE ID', cityInput)
var searchHistory = []
function handleCitySearchSubmit(ev... |
/*
* Copyright 2019 Trend Micro.
*
* 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... |
'use strict';
import Webusbtmc from '../webusbtmc/webusbtmc.js';
const navbarTogglerButton = document.getElementById('navbarNavDropdown');
const newButton = document.getElementById('new_button');
const openButton = document.getElementById('open_button');
const saveButton = document.getElementById('save_button');
c... |
/**
* Created by Jozef on 13.04.2017.
*/
function initAdmin(){
console.log("/admin - Initializing");
$("#createReport").on(
"click",
function () {
var rptDate = $("#reportDate");
var rptPIN = $("#reportPin");
if (rptDate.val().trim() != '' && rptPIN.val().t... |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _createClass = function () { function defineP... |
import Path from 'path';
import { fetchOriginalBook } from '../../../core/helpers.js'
import * as gitApi from '../../../core/gitApi';
import * as cav from '../../../core/chaptersAndVerses';
import {bpstore} from '../../../core/setupBpDatabase';
import * as wc from 'uw-word-count';
async function process_tags(key,val,... |
/**
* __ __ __ _
* / /__ ____ / /_ ____ / /_ ____ _ (_)_____
* / //_// __ \ / __// __ \ / __ \ / __ `/ / // ___/
* / ,< / /_/ // /_ / /_/ // /_/ // /_/ /_ / /(__ )
* /_/|_| \____/ \__/ \____//_.___/ \__,_/(_)__/ //____/
* ... |
import React, { useState, useEffect, useRef } from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import throttle from 'lodash/throttle'
import styled from 'styled-components'
import { domElementHelper } from '../../../helpers/dom/element-helper'
import { pxToRem } from '../../../helpers... |
/**
* 自动生成 ShGoods
*
* Public/js/backend/sh_goods.js
* admin @ 2017-03-08
*/
var app = new Vue({
el:'#app',
data :{
sub_url : "{:url('Goods/add')}",
name: '小明',
goods : goods,
ac_color : {
1 :'red',
2 : 'green',
3:'yello... |
$(function () {
//resizing add button
let el = document.getElementById('addFavButton').parentElement;
var width = getCookie('tabWidth');
var height = width * (3 / 4);
el.style.width = `${width}px`;
el.style.height = `${height}px`;
//displaying bookmarks
let favs = [];
$.ajax({
type: 'GET',
ur... |
import * as React from "react"
function PollID(poll) {
let id = poll.company.toLowerCase().replace(" ","-").replace(".","") + "-" + poll.field;
return(id);
}
function Scatterplot({polls, jurisdiction, election, nextElection, validParties, onClickPoll, brandColours, parties}) {
const endDate = nextElectio... |
import React, {
useRef, useEffect, useState, useImperativeHandle,
} from 'react';
import { message as C7nMessage, Modal } from 'choerodon-ui/pro';
import {
Form, Input, Select, Button, Row, Col,
} from 'choerodon-ui';
import { FormattedMessage } from 'react-intl';
import { observer } from 'mobx-react-lite';
import ... |
const ms = require('ms');
const _ = require('lodash');
const { ObjectId } = require('mongodb');
const Url = require('url-parse');
const rfdc = require('rfdc');
const isArrayBuffer = require('is-array-buffer');
const isBuffer = require('is-buffer');
const isStream = require('is-stream');
const stringifySafe = require('... |
// Load up the discord.js library
const Discord = require("discord.js");
// This is your client. Some people call it `bot`, some people call it `self`,
// some might call it `cootchie`. Either way, when you see `client.something`, or `bot.something`,
// this is what we're refering to. Your client.
const client = new ... |
/**
* --- Day 8: Seven Segment Search ---
You barely reach the safety of the cave when the whale smashes into the cave mouth, collapsing it. Sensors indicate another exit to this cave at a much greater depth, so you have no choice but to press on.
As your submarine slowly makes its way through the cave system, you no... |
/* Copyright (c) 2021 Read Write Tools. Legal use subject to the Favorites DOM Component Software License Agreement. */
import FavoriteData from './favorite-data.class.js';
import FavoriteItem from './favorite-item.class.js';
const Static = {
componentName: 'rwt-favorites',
elementInstance: 1,
htmlURL: '/... |
/**
* Copyright (C) 2017-2018 neap pty ltd <EMAIL>
*
* This file is part of the neapup project.
*
* The neapup project can not be copied and/or distributed without the express
* permission of neap pty ltd <EMAIL>.
*/
const { createServer } = require('http')
const { parse: parseUrl } = require('url')
const { ... |
import Ajv from 'ajv';
import * as $ from 'jquery';
import * as monaco from 'monaco-editor';
import {initAutocomplete} from './editor';
import {Client} from 'fusio-sdk';
import ClientBackend from "fusio-sdk/dist/src/generated/backend/Client";
import Authenticator from "fusio-sdk/dist/src/Authenticator";
/** @var IStan... |
// Prototip 1.1.0_pre1
// by <NAME> - http://www.nickstakenburg.com
// 29-10-2007
//
// More information on this project:
// http://www.nickstakenburg.com/projects/prototip/
//
// Licensed under the Creative Commons Attribution 3.0 License
// http://creativecommons.org/licenses/by/3.0/
//
var Prototi... |
#!/usr/bin/env node
var path = require('path')
var http = require('http')
var program = require('commander')
var commandLineArgs = require('command-line-args')
var keypress = require('keypress')
var colors = require('colors')
var exec = require('child_process').exec
var execSync = require('child_process').execSync
var ... |
/**
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... |
const Resource = require('./Resource.js');
const env = require('../modules/env');
const resource_functions = require('../modules/resource_functions').default;
const utilites = require('../modules/utilites').default;
class WalmartCa extends Resource {
constructor() {
super()
this._id = 4
this._name = 'w... |
const assert = require("assert");
const { types } = require("hardhat/config");
const BN = require('bignumber.js');
const config = require("../lib/config.js");
const logger = require('../lib/logger.js');
const common = require("../lib/common.js");
const state = require("../lib/state.js");
const diamond = require("../lib... |
var static_beginDate;//开始时间
var static_endDate;//结束时间
var static_title;//标题
var areaTable;
var chk_value =[];//选中的
$(function () {
init();//初始化表单
init1();
});
/**选择开始时间和结束时间*/
$("#submitFind").click(function () {
var reDateTime = /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][... |
const releaseVersion = '1.1.1';
// i kinda just copypasted stuff from my check to here
// you are allowed to use and modify stuff i've created
// for feedback, contact me on Discord@Kival Evan#5480
const toolValue = {
ebpm: {
th: 450,
thSwing: 350,
},
minSliderSpeed: 0.025,
maxShrAngle... |
import React, { Component } from 'react';
// import _ from 'lodash';
import '../css/Engine.css';
import Card from './Card.js';
import Dialog from './Dialog.js';
import logo from '../assets/d20.png';
function ua_track(category, action){
var ua = require('universal-analytics');
var visitor = ua('UA-81505538-3');
... |
"use strict";
var SourceNode = require("source-map").SourceNode;
var INVALID_ACTIONS = [
'addAction',
'hasAction'
];
var varCount = 0;
// _getVarName()
var _getVarName = function _getVarName() {
return '$' + varCount++;
}; //- _getVarName()
// -----
// BaseNode
// -----
// BaseNode()
var BaseNode = function... |
var logAdsLoad = false;
var error_reporting = true;
function GetParam(name) {
var match = new RegExp(name + "=([^&]+)*", "i").exec(location.search);
if (match == null)
match = new RegExp(name + "=(.+)", "i").exec(location.search);
if (match == null)
return null;
match = match + "";
console.log('M... |
import { EVENT_OPTIONS } from '../utils/constants';
import { hasClass, removeElement } from '../utils/general';
class Settings {
constructor(player, position, layer) {
this.submenu = {};
this.events = {
global: {},
media: {},
};
this.originalOutput = '';
... |
import React, { useContext } from 'react';
import { connect, useDispatch } from 'react-redux';
import { emphasize, makeStyles, useTheme } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Button from '@material-ui/core/Button';
import CloseIcon from '@material-ui/icons/Close';
impo... |
const starts = ['ㄱ', 'ㄲ', 'ㄴ', 'ㄷ', 'ㄸ', 'ㄹ', 'ㅁ', 'ㅂ', 'ㅃ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅉ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ']
const mids = ['ㅏ', 'ㅐ', 'ㅑ', 'ㅒ', 'ㅓ', 'ㅔ', 'ㅕ', 'ㅖ', 'ㅗ', 'ㅘ', 'ㅙ', 'ㅚ', 'ㅛ', 'ㅜ', 'ㅝ', 'ㅞ', 'ㅟ', 'ㅠ', 'ㅡ', 'ㅢ', 'ㅣ']
const finals = ['', 'ㄱ', 'ㄲ', 'ㄳ', 'ㄴ', 'ㄵ', 'ㄶ', 'ㄷ', 'ㄹ', 'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', ... |
/**
* @author AngusC
* @description 学生编辑单据区域
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import DocBG from './background';
import { ELEMENT, EXAMINE, EXAMINE_COLOR, MODE, DOC_TYPE } from '../constants';
import { AutoComplete, message, Tooltip... |
/*eslint sort-vars:0, curly:0*/
'use strict';
/**
* Converts a hex CSS color value to RGB.
* Adapted from http://stackoverflow.com/a/5624139.
*
* @param String hex The hexadecimal color value
* @return Object The RGB representation
*/
function hex2rgb(hex) {
// Expand shorthand form (e.g. "03F") to full for... |
var astq = require("ast-query");
if (typeof module !== 'undefined')
module.exports = FacetedLanguage;
var FacetedValue = require('./FacetedValue.js');
//var FacetedValuesJS = require('./FacetedValuesJS.js');
var FacetedValuesJS = require('../src/FacetedValuesJS');
var Declassify = require('../src/Declassify.js')
va... |
import log from 'loglevel';
import {fromJS, Map} from 'immutable';
import * as constants from '../data/constants';
import * as getters from '../data/getters';
import * as helpers from '../utils/helpers';
function getStateWithCurrentRepetition (state) {
const currentRepetition = state.get('currentRepetition');
co... |
function draw() {
//background
/*
d3
.select("#svg")
.append("rect")
.style("width", width)
.style("height", height)
.style("fill", "#222");
*/
//edges
if (window.links) {
window.dir ? gradedge() : edgebundle();
}
if (window.nodes) {
//nodes
d3
.select("#svg")
.append("g")... |
const fs = require('fs');
const glob = require('glob');
const merge = require('merge');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const RESET_COLOR = '\x1b[0m';
const RED = '\x1b[31m';
const GREEN = '\x1b[32m';
const YELLOW = '\x1b[33m';
const WARNING = YELLOW + 'WARNING:' + RESET_COLOR;
const ERROR = R... |
let config = lenguaje;
config.paging = false;
const dataTrasladoOrigen = new FormData();
const $seleccionArchivos = document.querySelector("#seleccionArchivos");
const $seleccionArchivos2 = document.querySelector("#seleccionArchivos");
let imagenesTrasladoOrigen = [];
let imagenesTrasladoOrigenSEND = [];
let SucursalsN... |
const path = require('path');
const mkdirp = require('mkdirp');
const urlJoin = require('url-join');
const Generator = require('yeoman-generator');
const capitalize = require('underscore.string/capitalize');
const underscored = require('underscore.string/underscored');
const recast = require('recast');
const _ = requir... |
import React, { Component, Fragment } from 'react';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import Link from 'umi/link';
import { connect } from 'dva';
import { setLocalStorage, getLocalStorage } from '@/utils/authority';
import {
Switch,
InputNumber,
Form,
Button,
Card,
message,
R... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _tabs = require('antd/lib/tabs');
var _tabs2 = _interopRequireDefault(_tabs);
var _breadcrumb = require('antd/lib/breadcrumb');
var _breadcrumb2 = _interopRequireDefault(_breadcrumb);
var _extends = Obj... |
//COMPONENETES
//Load imagens
//imagem da tela
const imgTela = new Image();
imgTela.src = "./imagens/tela2.jpg";
//imagem do nível
const imagNivel = new Image();
imagNivel.src = "./imagens/nivel.png";
//imagem das vidas
const imagVidas = new Image();
imagVidas.src = "./imagens/vidas2.png";
//imagem dos pontos
const im... |
// https://www.youtube.com/watch?v=BHx-OWdHqf8
const knmach=661.49; // Mach 1 in knots
const radindeg=Math.PI/180;
const altlow=200; // Altitide at which warning will be given (and below)
function altitudeformat(altitude, full)
{
var ta=Math.floor(altitude);
var altstr="";
if (!full)
ta=Math.floor(ta/100);... |
var test = require('tape');
var postcss = require('postcss');
var plugin = require('./');
var name = require('./package.json').name;
var tests = [{
message: 'should remove non-special comments',
fixture: 'h1{font-weight:700!important/*test comment*/}',
expected: 'h1{font-weight:700!important}'
}, {
mes... |
const R = require('ramda')
const { readFileSync } = require('fs')
const console = require('console')
const fs = require('fs')
const path = require('path')
const { EOL } = require('os')
const env = (e, def) => R.pathOr(def, ['env', e], process)
const log = (ref, off = env('LOG_OFF', false)) => {
!off && console.log... |
var request = require("request")
var async = require('async');
var _ = require("lodash");
var jsdom = require("jsdom");
var tm = require('text-miner');
var fs = require('fs');
// BASE SETUP
// =============================================================================
// call the packages we need
var express = requi... |
/**
* Worker related tasks
*/
// Dependencies
const path = require('path')
const fs = require('fs')
const _data = require('./data')
const https = require('https')
const http = require('http')
const helpers = require('./helpers')
const url = require('url')
const _logs = require('./logs')
const util = require('util')
c... |
import { createSelector } from 'reselect';
import Immutable, { Record }from 'immutable';
import keymirror from 'keymirror';
import { api, logger } from './commons';
require('es6-promise').polyfill();
api.init({
latency: 100
});
export const SearchOptions = Record({
limit: 50,
page: 1,
pages: 0,
total: 0
})... |
// http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
"use strict";
// Optional. You will see this name in eg. 'ps' or 'top' command
process.title = 'messageBoard';
// Port where we'll run the websocket server
var webSocketsServerPort = 1337;
var iconv = require("iconv-lite");
// websocket and http server... |
import url from '/modules/url-state/index.js'
import raw from '../raw/index.js'
import can from '../can/index.js'
const circle = Math.PI * 2
const acksMax = 3
const state = window.state = new EventTarget()
state.url = url
url.addEventListener('change', () => {
state.dispatchEvent(new Event('change'))
})
Object.d... |
var tim1 = setInterval(function() {
if($('.wxname').html()) {
window.wxname = ($('.wxname').html());
window.weixin = ($('.weixin').html())
clearInterval(tim1);
}
}, 100)
function jumpj(e) {
if(e == 'top') {
$(window).unbind();
$("html,body").animate({
scrollTop: 0
}, 500);
} else if(e == 'bot') {
... |
import Applet from 'applet';
var defaults = {
// RequestInit
// ========================================
// 请求方法,`Netop`做了内部校验,有效值:
// 'GET'、'DELETE'、'POST'、'PUT'、'PATCH'、'HEAD' 或 'OPTIONS'
// method: '',
// 任何你想加到请求中的头。
// headers: {},
// 任何你想加到请求中的body,可以是Blob, BufferSource, FormData, URLSearchPar... |
function load_map(path, callback) {
$.ajax({
url: path,
error: function (jqXHR, textStatus, errorThrown) {
alert("Cannot load map from '" + path + "', error: " + textStatus);
},
success: function (data) {
add_map_to_scene(data);
if (callback != nul... |
//Global variables
let area = document.querySelector("#location");
let food = document.querySelector("#food");
let button = document.querySelector("#submit");
let recipeDiv = document.querySelector("#recipes");
let restDiv = document.querySelector("#restaurants");
let historyDiv = document.querySelector("#searchhistory... |
'use strict';
const redis = require('redis');
const crypto = require('crypto');
const uuid = require('node-uuid');
const zlib = require('zlib');
const GZIP_MAGIC = new Buffer('$gzip__');
const GZIP_MAGIC_LENGTH = GZIP_MAGIC.length;
module.exports = function createMemoizeFunction(client, options) {
options = options... |
function compareTabs(a, b) {
var af = a.favIconUrl || '';
var bf = b.favIconUrl || '';
var au = a.url;
var bu = b.url;
var at = a.title;
var bt = b.title;
if (af < bf) { return -1; };
if (af > bf) { return 1; };
if (at < bt) { return -1; };
if (at > bt) { return 1; };
if (au < bu) { return -1; };
... |
const EventEmitter = require('events').EventEmitter
const protoo = require('protoo-server')
// The Room class handles the WebRTC setup process using a WebSocket server.
// The WebRTC is set up using a mediasoup worker. This means we need to setup
// broadcasters, transports (WebRTC only), consumers, and producers.
//... |
// default values
let n = 6;
let m = 6;
let maxNumber = 100;
let operations = ['+', '-', '/', '/', '*', '*'];
let allowDivideBySelf = 0;
let allowDuplicates = 0; // same calc twice
let allowComplimentaryDuplicates = 0; // same calcs and also the complimentary (3 * 4 == 4 * 3)
let restrictMultiplicationTable... |
import { just, map, filter, fromEvent, merge, empty, continueWith } from 'most'
import { curry2, compose } from '@most/prelude'
import assign from 'fast.js/object/assign' // faster object.assign
import { isMoving, normalizeWheel } from './utils'
// //////FOr most.js
const repeat = (n, stream) => n === 0 ? empty()
: ... |
import React,{ PureComponent } from 'react';
import { TreeSelect, Card, Tree, Row, Col, Table, Layout, Button, Form, Input } from 'antd';
import { connect } from 'dva';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import { queryTree } from '@/services/dictionary';
import { getCostMoveSubjectList, getDynam... |
/**
* MeteoAlarm' gets a list of updated meteo warnings issued by MeteoAlarm,
* and send it to Twitter
* Note that will be sent to Twitter one thread per country with new warnings
*/
const { DateTime } = require('luxon');
const { MeteoAlarmApi } = require('../api');
const { uploadThreadTwitter } = require('./Twitt... |
/**
* Created by liaohb on 15-10-15 上午9:32.
* File name By template.js
*/
var fs = require("fs");
var path = require("path");
var util = require("util");
var Fibers = require('fibers');
var Comm = require("./commonMethod");
var NJB = require("./commonNodeJsBlock");
/**
* 去除所有空格. tpl.replace(/\s/g, "")
* 替换: <% %>... |
// *** Globals
var currentResults = {
gender: {
Male: 0,
Female: 0
},
race: { },
glasses: {
Yes: 0,
No: 0
},
smiling: {
Yes: 0,
No: 0
},
age: {
"Below 20": 0,
"20s": 0,
"30s": 0,
"40s": 0,
"50s": 0,
"60 and up": 0
}
};
var counters = {
success: 0,
... |
const express = require("express")
const app = express();
const http = require('http');
const url = require('url');
const fs = require('fs');
const path = require('path');
const level = require('level');
const multer = require('multer');
const request = require('request');
const server = http.Server(app);
//const os =... |
import React from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import _ from 'lodash'
import { compose, bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { connectRequest } from 'redux-query'
import api from '../../../services'
import { Loading } ... |
import React, { useState } from 'react';
import {
Avatar,
Box,
Button,
Card,
Divider,
Grid,
List,
ListItemButton,
MenuItem,
styled,
TextField,
Typography
} from '@mui/material';
import PropTypes from 'prop-types';
import { Icon } from '@iconify/react';
import { Scrollbar } from 'smooth-scrollbar... |
/**
* Pivot builder class
*/
function PivotBuilder () {
}
/**
* Builds Array of Rows or Columns with values of corresponding names
* @param data {Object[]} - input data [ {year:2016, fruit: "Apples"} ... { } ]
* @param rowNames {String[]} - names array, like ['year','fruit']
* @returns {String[][]} - it's line [... |
'use strict';
var _ = require('lodash'),
moment = require('moment'),
EventEmitter = require('events'),
Promise = require('bluebird');
var recipeRunDB = require('../schemas/recipeRun_schema'),
recipeRunLogDB = require('../schemas/recipeRunLog_schema'),
networkStats = require('../services... |
'use strict';
var Jimp = require("jimp");
var child_process = require('child_process');
var util = require('util');
var fs = require('fs');
var clamp = require("clamp");
var path = require('path');
var exec = child_process.exec;
//Assumes wkhtmltoimage and xvfb-run is installed
//xvfb-run is needed since wkhtmltoimag... |
/*
* basic.js 页面的基本函数集合,放置于页面顶部,JQ下方
* */
//1:获取当前页面的URL属性值,接收参数name:属性名,如果有对应属性值则返回属性值否则返回 null
(function ($) {
$.getUrlParam = function (name, site) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"), r;
if (site === 1) {
r = window.parent.location.search.substr(1).match(re... |
import React, { useRef, useEffect, useState } from "react";
import styled from "styled-components";
import * as d3 from "d3";
import mouse from "../../../utils/mouse";
import formatDate from "../../../utils/formatDate";
const Svg = styled.svg`
background: #f9f9f9;
`;
const Button = styled.g`
cursor: pointer;
`;... |
/*!
*
* Copyright (c) 2013 <NAME>
*
* 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, publish,... |
var qsocks = require('qsocks');
var fs = require('fs');
var request = require('request');
var js2xmlparser = require('js2xmlparser');
var Promise = require("promise");
var log = require("./logger");
module.exports={
getAppTbls: function(conn_data, global, cookies, single_app, logging){
//Creating the promise for... |
import { ref, reactive } from 'vue'
import useRepresentations from '@/modules/representations/useRepresentations'
const multipleResidues = reactive({
status: false,
firstRes: null,
lastRes: null,
error: false
})
const selection = ref([])
export default function useSelections() {
const { setSelectionRepres... |
var toFindEl = document.getElementById("toFind");
var valuesEl = document.getElementById("values");
var selectEl = document.getElementById("algoSelect");
var submitBtn = document.getElementById("submit");
var startBtn = document.getElementById("start");
var stopBtn = document.getElementById("stop");
var pauseBtn = docu... |
import React from "react"
import SEO from "../components/seo"
import Footer from "../components/footer/footer"
import { graphql } from "gatsby"
import { motion } from 'framer-motion'
import Scroll from "../components/locomotiveScroll"
import { fade } from "../helpers/transitionHelper"
import NumberShape from "../compon... |
import { Polygon } from '../../../peppermint-tools';
import dicomParser from 'dicom-parser';
import cornerstoneTools from 'cornerstone-tools';
const modules = cornerstoneTools.store.modules;
/**
* @class RTStructReader - Reads an RTSTRUCT using dicomParser and extracts any ROIContours.
*/
export default class RTStr... |
/**
* The Helper JS - a lot of JS helper functions that are ready to help in your project
* Version: 1.0 (2020-07-04)
*
* Copyright (c) <NAME> and other contributors
* Released under the MIT license.
* For more information, see https://kiniditech.com/ or https://github.com/vickzkater
*
* https://github.com/vick... |
let i = 1
let s = 0
//judgment on whether to play or pause audio
let brightness = [200, 200, 200, 200, 200, 200]
//first six values are brightness of circles; last value is brightness of playPauseButton
let tt = []
let audio = []
let music
let button;
// let sound1Gain, sound2Gain, sound3Gain, sound4Gain, sound5Gain, s... |
//*---------------------------------------------Imports---------------------------------------------*/
import { RenderTarget } from './renderTarget.js';
import { roundSprite } from './sprite.js';
import { RectSprite } from './sprite.js';
import { gradientGenerator } from './gradientGenerator.js';
import ParticlesPool f... |
import React, { useState } from "react"
import { Row, Col } from "antd"
// import Particles from "react-particles-js"
import { useQuery } from "@apollo/react-hooks"
import parse from "html-react-parser"
import NProgress from "nprogress"
import { Link } from "react-router-dom"
import { Result, Carousel } from "antd"
imp... |
import request from "../../utils/request";
import {
getHamiCustomersApi,
getHamiDealCategoriesApi,
getHamiDealItemApi,
getHamiOrdersApi,
getHamiToppingsApi,
submitHamiOrderApi,
} from "./api";
import moment from "moment-jalaali";
import {
UPDATE_DEVICE_API,
UPSERT_CATEGORIES_API,
UPSERT_CRM_MEMBERSHIP... |
var https = require('https');
var querystring = require('querystring');
var _ = require('underscore');
var ddg = {
getAnswerMessages: function(question, maxLength, onAnswer) {
// Query parameters for the DuckDuckGo API
var ddgRequestData = querystring.stringify({
q: question,
... |
var realWidth = 1000;
var realHeight = 1000;
var paper = new Raphael('drawboard');
var svg = paper.canvas;
svg.setAttribute('viewBox', '0 0 ' + realWidth + ' ' + realHeight);
svg.removeAttribute('width');
svg.removeAttribute('height');
function transform(width, height) {
return {'x': realWidth/2 + width, 'y': rea... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
/* eslint no-unused-expressions: 0 */
var reUnit = /width|height|top|left|right|bottom|margin|padding/i;
var _amId = 1;
var _amDisplay = {};
var requestAnimationFrame = undefined;
if (typeof window !== 'undefined') {
requestAnimationFram... |
function getQuadWinBars(chartData){
var specs = [];
// pattern generation must know about bar values because patternHeight
// needs to change to maintain constant value of product patternHeight*barHeight
specs.push(["destroy", "top", "enemy", chartData[0]["value"]]);
specs.push(["destroy", "b... |
const EVENT_HANDLED = false;
const EVENT_NOT_HANDLED = true;
DAYS_OF_MONTHS = [
1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18,19,
20,21,22,23,24,25,26,27,28,29,
30,31
];
MONTH = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'Novem... |
import { useState, useEffect, useContext } from "react";
import { useRouter } from "next/router";
import toast from "react-hot-toast";
import PanelStickyHeader from "./PanelStickyHeader";
import User from "@components/User";
import Modal from "@components/Modal";
import { UserContext } from "@lib/context";
import {... |
const ts=(new Date().toString()).split(' ');
console.log([parseInt(ts[2],10),ts[1],ts[4]].join(' ')+" - [info] loadbalance Copyright 2019 <NAME>");
function routeAdmin(msg) {
this.log("routeAdmin "+JSON.stringify(msg.payload));
switch (msg.payload.action) {
case "add":
addRoute.apply(this,[msg.payload]);
brea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.