text stringlengths 3.07k 16k |
|---|
function plotLDR(data) {
// Variables
//console.log(myurl)
var body = d3.select('div#left')
var margin = { top: 50, right: 50, bottom: 50, left: 50 }
var h = 500 - margin.top - margin.bottom
var w = 500 - margin.left - margin.right
var formatFloat = d3.format('.2f')
// Scales
var colorScale = d3.scale... |
const net = require('net');
const EventEmitter = require('events');
/**
* Common socket class for ADBSocket and JDWPSocket
*/
class AndroidSocket extends EventEmitter {
constructor(which) {
super()
this.which = which;
this.socket = null;
this.socket_error = null;
this.sock... |
/**
* Tools
* Cassius - https://github.com/sirDonovan/Cassius
*
* This file contains functions that are useful globally.
*
* @license MIT license
*/
'use strict';
class Tools {
constructor() {
this.data = {};
}
loadData() {
this.data.pokedex = require('./data/pokedex.js').BattlePokedex;
this.data.mov... |
function reconstructBst(preOrderTraversalValues = []) {
function construct(array, bst) {
if (array.length === 0) return;
if (array.length === 1) {
bst.insert(array[0]);
return;
}
const root = array[0];
bst.insert(root);
let small = null;
let large = null;
for (let i = 1; i ... |
import config from './config';
import webpackConfig from './webpack.config';
import path from 'path';
import _ from 'lodash';
import gulp from 'gulp';
import webpack from 'webpack';
import rimraf from 'rimraf-promise';
import sequence from 'run-sequence';
import $plumber from 'gulp-plumber';
import $sass from 'gulp-sas... |
import React from 'react';
import Box from '@material-ui/core/Box';
import CmtAvatar from '../../../@coremat/CmtAvatar';
import Typography from '@material-ui/core/Typography';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import PropTypes from 'prop-types';
import makeStyles from '... |
var _days = 'Days';
var _hours = 'Hours';
var _minutes = 'Minutes';
var _seconds = 'Seconds';
var _messageAfterCount = 'The course has Started!';
var $ = jQuery.noConflict();
$(document).ready(function($) {
"use strict";
if (location.hash) {
window.scrollTo(0, 0);
setTimeout(function() {
... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.polyfill = polyfill;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _inte... |
import { kea } from 'kea'
// props:
// - shadowRef: shadowRoot ref
export const dockLogic = kea({
props: {
shadowRef: 'required',
padding: 'optional',
},
// transition steps:
// - dock: disabled, animating, fading, complete
// - float: disabled, animating, fading, complete
// c... |
// https://github.com/nodejs/node/blob/master/lib/_http_server.js
const codes = {
default: ['Default', true],
'1XX': ['Informational', true],
100: ['Continue', true],
101: ['Switching Protocols', true],
102: ['Processing', true],
103: ['Early Hints', true], // Also informally used as "Checkpoint".
'2XX... |
"use strict";
/**
* koa2的一个中间件,用于处理vue-router使用history模式返回index.html
* 原程序是bripkens作者的connect-history-api-fallback,这里只是修改兼容Koa2而已
* https://github.com/bripkens/connect-history-api-fallback
* 注:该中间件提取自koa2-connect-history-api-fallback,此处只是稍作修改,在此对该插件作者表示感谢
*/
var __awaiter =
(this && this.__awaiter) ||
function... |
const min = Math.min;
const max = Math.max;
const abs = Math.abs;
const DEFAULT_TRIGGER = 'shift';
const ALLOW_EVENTS = [ 'drag', 'shift', 'ctrl', 'alt', 'control' ];
module.exports = {
getDefaultCfg() {
return {
brushStyle: {
fill: '#EEF6FF',
fillOpacity: 0.4,
stroke: '#DDEEFE',
... |
import { peerSocket } from "messaging";
import { geolocation } from "geolocation";
import { WEATHER_MESSAGE_KEY, Conditions } from "./common.js";
export default class Weather {
constructor() {
this._apiKey = "";
this._provider = "owm";
this._feelsLike = true;
this._weather = undefined;
this._max... |
import React, { Component } from 'react';
import { Button } from 'reactstrap';
import { Field, formValueSelector, change } from 'redux-form';
import { connect } from 'react-redux';
import { injectIntl } from 'react-intl';
import CustomField from '../../../containers/Shared/form/CustomField';
import renderSelectField fr... |
require('dotenv').config();
const fetch = require('node-fetch');
const conseiljs = require('conseiljs');
const multicoinAddressValidator = require('multicoin-address-validator');
const myTestAddress = process.env.MY_TEST_ADDRESS
const myTestPublicKey = process.env.MY_TEST_PUBLIC_KEY
const myTestPrivateKey = process.env... |
import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import moment from 'moment-timezone';
import {
FormGroup,
ControlLabel,
FormControl,
Button
} from 'react-bootstrap';
import Select2 from 'react-select2-wrapper';
import DateTime from 'react-datetime';
import 'react-datetim... |
'use strict';
exports.__esModule = true;
var _regenerator = require('babel-runtime/regenerator');
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _classCal... |
/**
* @adobe/react-spectrum-workflow (c) by Adobe
*
* @adobe/react-spectrum-workflow is licensed under a
* Creative Commons Attribution-NoDerivatives 4.0 International License.
*
* You should have received a copy of the license along with this
* work. If not, see <http://creativecommons.org/licenses/by-nd/4.0/>.
**/
... |
import React from 'react';
const bodyPix = require('@tensorflow-models/body-pix');
class Canvas extends React.Component {
constructor(props) {
super(props);
this.state = {
camOn: false,
_isMounted: false,
};
this.startCam = this.startCam.bind(this);
this.stopCam = this.stopCam.bind(th... |
// jquery utils
function buildId(id) {
return typeof(id) == 'string' && id.length > 0 && id.charAt(0) != '#' ? '#' + id : id;
}
// console utils
function safeLog(value) {
if(typeof(console) != 'undefined' && typeof(console.log) == 'function')
console.log(value);
}
// form utils
var formUtils = {
submi... |
import React, { Component } from 'react';
import {Link, Redirect,BrowserRouter} from "react-router-dom";
import {connect} from 'react-redux';
import {auth} from "../../actions";
import {Button, Icon,Input,Row,ProgressBar} from 'react-materialize'
class Login extends Component {
state = {
username: "",
passwo... |
import React, { Component } from "react"
import CheckBox from "react-native-check-box"
import {
StyleSheet,
Text,
View,
Image,
TouchableOpacity,
Alert,
Modal,
AsyncStorage,
Platform,
Animated,
Dimensions
} from "react-native"
import PropTypes from "prop-types"
import AlertStorageManager from "./Al... |
import AppBar from '@material-ui/core/AppBar';
import CssBaseline from '@material-ui/core/CssBaseline';
import Divider from '@material-ui/core/Divider';
import Drawer from '@material-ui/core/Drawer';
import Hidden from '@material-ui/core/Hidden';
import IconButton from '@material-ui/core/IconButton';
import List from '... |
import { fraInputdatoTilJSDato } from '@navikt/digisyfo-npm';
import {
CHECKBOX,
CHECKBOX_GRUPPE,
DATO,
IKKE_RELEVANT,
INFO_BEHANDLINGSDAGER,
PERIODER,
RADIO,
RADIO_GRUPPE,
RADIO_GRUPPE_TIMER_PROSENT,
RADIO_GRUPPE_UKEKALENDER,
} from '../enums/svartyper';
import { CHECKED, IKKETI... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.RequestMethod = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; desc... |
var util = require("util");
var helpers = require("../helpers");
var Policy = require("../s3post").Policy;
var S3Form = require("../s3post").S3Form;
var AWS_CONFIG_FILE = "config.json";
var POLICY_FILE = "policy.json";
var INDEX_TEMPLATE = "index.ejs";
var AWS = require("aws-sdk");
AWS.config.loadFromPath('./config.jso... |
import React from 'react';
import {List, InputItem, NavBar, Icon, WhiteSpace, Button, Toast, Picker, WingBlank, Calendar} from 'antd-mobile';
import axios from 'axios';
import styles from './dashboard.less';
import {startOfYear, startOfToday} from "../constants";
import * as Icons from "../../assets/icons/Icons";
impor... |
/**
* @author <NAME>
* @version 1.0.0
* @date 30 June, 2016
*/
'use strict';
/*global google*/
/*global MarkerTracker*/
/*global MarkerLabelLib*/
/*global PathDrawer*/
/**
* @global
* @description The global map varaible representing the map instance of this demo.
*/
var map;
/**
* @global
* @descrip... |
'use strict'
const csv = require('csv-parser')
const fs = require('fs')
const {
api,
Initializer,
} = require('actionhero')
const abiDecoder = require('abi-decoder')
module.exports = class SmartAgentBmviDataRunInitializerEmily extends Initializer {
constructor() {
super()
this.name = 'bmvi-data-run-em... |
// Copyright 2021 ETH Zurich, Media Technology Center
//
// 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 re... |
var chart;
var chartData = [];
var chartLoadInProgress = false;
var minPeriod = 'hh';
var validPeriods = ['24h', '72h', '168h', '30d', '90d', '1y'];
var defaultPeriod = (validPeriods.indexOf(localStorage.getItem('chartPeriod')) > -1) ? localStorage.getItem('chartPeriod') : '24h';
var periodGridCounts = {'24h': 24, '72h... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { fetchCryptos } from './actions/cryptoActions'
import { fetchLoggedInUser } from './actions/userActions'
import { logOutUser } from './actions/userActions'
import CryptoList from './components/CryptoList'
import TradeCryptoList from ... |
'use strict';
var lodash = require('lodash');
var FieldConfig = require("./collectionFieldConfig.js");
/**
* Initialize Query object to default properties
* @constructor
*/
function Query(fieldConfig, inputObj) {
if (!(fieldConfig instanceof FieldConfig)) {
throw new Error("fieldConfig passed to query ... |
// Init framework7
var app = new Framework7({
// App root element
root: '#app',
// App Name
name: 'Walet Monitoring',
// App id
id: 'id.plnm.waletmonitoring',
// Enable swipe panel
panel: {
swipe: 'left',
},
//pushState
pushState: true,
// Add default routes
routes: [
{
name:'main',
... |
var tempFilePrefix = "AddSubject";
var subjectName;
var subjectNameNoSpace;
var dir;
function jjsExec(args) {
var params = pwa.process.getArgs4Jjs(args);
subjectName = params[0];
var restore = params[2];
subjectNameNoSpace = subjectName.replace(/\s+/g, '');
dir = pwa.system.getEnv('PWA');
addNew... |
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { AutoSizer } from 'react-virtualized';
import fetchCPUSamplingAction from 'actions/AggregatedProfileDataActions';
import safeTraverse from 'utils/safeTraverse';
import Loader from 'components/LoaderComponent';
import Met... |
"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... |
import * as d3 from "d3";
import * as WheelUtil from "./WheelUtil";
import opts from "./WheelOpts";
const color = d3.scaleOrdinal(d3.schemeCategory20);
const color2 = d3.scaleOrdinal(['#5f9f9f','#a67d3d','#b87333','#2f4f2f','#7093db','#215121','#426f42','#527f76']);
export default class Wheel {
constructor(svgId)... |
const date_picker_element = document.querySelector('.date-picker');
const selected_date_element = document.querySelector('.date-picker .selected-date');
const dates_element = document.querySelector('.date-picker .dates');
const mth_element = document.querySelector('.date-picker .dates .month .mth');
const next_mth_elem... |
import React, { useMemo, useCallback, useState, useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import ReactGA from 'react-ga'
import styled from 'styled-components'
import BigNumber from 'bignumber.js'
import { useBondDetails } from '../../contexts/Bonds'
import { useTokenBalance } from '../..... |
/* eslint-disable jsx-a11y/href-no-hash */
import React, { Component, Fragment } from 'react';
import { Link } from 'react-router';
import cx from 'classnames';
import {
signIn as googleSignIn,
signOut as googleSignOut
} from 'app/lib/googleDriveAuth';
import logo from 'app/logo.svg';
import xur from 'app/assets/... |
import React from 'react'
import { Link } from 'gatsby'
import Flag from './Flag'
import TagList from './TagList'
import useSiteMetadata from '../hooks/use-site-config'
import styled from 'styled-components'
import { Bull, ReadingTime } from './Commons'
import {AiOutlineClockCircle} from 'react-icons/ai'
import {FaRegC... |
import React from 'react';
import { Form, Input, Upload, Button, Icon, Select } from 'antd';
import { COUNTRY } from 'src/utils/country';
import { getIdentity } from 'src/services/api';
import { translate } from 'react-i18next';
import { VERIFIED, PENDING, UNVERIFIED } from 'src/utils/status';
import styles from './in... |
'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]
}
... |
/* node_helper.js
*
* Magic Mirror
* Module: MMM-FTV
*
* Magic Mirror By <NAME> http://michaelteeuw.nl
* MIT Licensed.
*
* Module MMM-FTV By bugsounet (<NAME>) <EMAIL>
* MIT Licensed.
*
* This module is created for FTV enterprise (http://www.ftv-sa.com)
* It's allow to displayed all news in MagicMirror ... |
'use strict';
if (!global.Promise) {
global.Promise = require('bluebird');
}
var path = require('path');
var fs = require('fs');
var bunyan = require('bunyan');
var moment = require('moment');
var google = require('googleapis');
var Calendar = google.calendar('v3');
var nbgc_aes, nbgc_key;
var bunyanoptions, googl... |
const { calculateLevel } = require('./Achievement');
const { getJob, isValidJob, generateMoney } = require('./Economy');
const { getProfile, setJob, addJobTime, updateBalance, checkCooldown } = require('./Member');
const undefinedError = 'Something strange happened. Contact the bot author for help!';
const timezoneErr... |
var cube;
function init_cube(size) {
cube = [];
for (var x = 0; x < size; x++) {
var arr = [];
for (var y = 0; y < size; y++) {
var a = [];
for (var z = 0; z < size; z++) {
a.push(0);
}//forz
arr.push(a);
}//fory
cube.push(arr);
}//forx
}//function
function proce... |
import React, { useState, useEffect } from "react";
import { useMutation } from "@apollo/react-hooks";
import UPDATE_ANSWER from "graphql/updateAnswer.graphql";
import PropTypes from "prop-types";
import CustomPropTypes from "custom-prop-types";
import { TransitionGroup } from "react-transition-group";
import styled fr... |
import React from 'react'
import ClassNames from 'classnames'
import Checkbox from '../components/Checkbox'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
//style
import '../assets/css/multiSelect.scss'
class MultiSelect extends React.Component {
constructor(props){
super(props)
... |
/* eslint-disable jsx-a11y/label-has-associated-control */
import React, { useRef, useState, useEffect } from 'react';
import { connect } from 'react-redux';
import { useHistory } from 'react-router-dom';
import PropTypes from 'prop-types';
import ErrorsList from '../../components/ErrorsList';
import { URL_TEACHERS_LI... |
const { CommandInteraction, Client, MessageButton, MessageEmbed, MessageSelectMenu } = require("discord.js");
const jsh = require("discordjsh");
const { v4 } = require("uuid");
const { guildSettings, verifyPermissions } = require("../Modules/tickets");
const Embed = require("../Util/Embed");
const { Modal, showModal, T... |
import {BLOCK} from "../blocks.js";
import {Button, Label, Window} from "../../tools/gui/wm.js";
import {Resources} from "../resources.js";
export class RecipeSlot extends Window {
constructor(x, y, w, h, id, title, text, recipe, block) {
super(x, y, w, h, id, title, text);
//
this.recipe ... |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { Button, Badge, Pagination, PaginationItem, PaginationLink, Card, CardBody, CardHeader, Col, Row, Table } from 'reactstrap';
import {toastr} from 'react-redux-toastr';
import 'react-bootstrap-table-next/dist/react-bootstrap-ta... |
import React from 'react'
import StickyBox from "react-sticky-box";
import './ShopTheLook.scss'
import '../Typography/typography.scss'
import '../Utilities/spacers.scss'
import Layout from '../Layout/Layout';
import ProductCard from '../ProductCard/ProductCard'
import Modal from '../Modal/Modal';
import ShopTheLookModa... |
const Matrix = require(`./utils/matrix`);
const zip = require(`./utils/zip`);
const X2PI = Math.PI * 2;
function generateGaussian(mean, std) {
let u1 = Math.random();
let u2 = Math.random();
let z0 = Math.sqrt(-2.0 * Math.log(u1)) * Math.cos(X2PI * u2);
return z0 * std + mean;
}
const sigmoid = z => M... |
/* eslint-disable react/jsx-curly-brace-presence */
/* eslint-disable max-len */
import React from 'react'
import Collapsible from 'react-collapsible'
import { MESSENGER_LINK_WELCOME } from '../../constants'
import Markdown from '../../components/Markdown'
export default {
title: 'Frequently asked questions',
de... |
const config = {
type: Phaser.AUTO,
parent: 'game',
width: 800,
heigth: 640,
scale: {
mode: Phaser.Scale.RESIZE,
autoCenter: Phaser.Scale.CENTER_BOTH
},
scene: {
preload,
create,
update,
},
physics: {
default: 'arcade',
arcade: {
gravity: { y: 500 },
},
}
};
co... |
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
View,
TouchableOpacity,
Image,
Dimensions,
TextInput,
Alert
} from 'react-native';
const { width, height } = Dimensions.get('window');
import ImagePicker from 'react-native-image-picker';
import commonStyle from '../../pub... |
import React from 'react';
import PropTypes from 'prop-types';
import { find, includes, isArray, isEmpty, keys, map, sortBy } from 'lodash';
import moment from 'moment';
import DatePicker from 'react-datepicker';
import Select from 'react-select';
import CreatableSelect from 'react-select/creatable';
import {
BULK_U... |
import * as dotenv from 'dotenv';
import db from './models';
import Bitcoin from './coins/Bitcoin';
import Stellar from './coins/Stellar';
import { SSL_OP_TLS_BLOCK_PADDING_BUG } from 'constants';
import axios from 'axios';
// const block_io = require('block_io');
const nodemailer = require('nodemailer');
const Cl... |
//this function is for checking the UI in videoplayer
var xlsx = require ( 'xlsx' );
var Excel = require ( 'exceljs' );
if ( typeof require !== 'undefined' ) XLSX = require ( 'xlsx' );
var workbook = XLSX.readFile ( 'videoplayer.xlsx' );
var worksheet = workbook.Sheets[ 'PlayerUI' ];
var url = [ ];
module.exports = {
... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Badge, Dropdown, DropdownItem, DropdownMenu, DropdownToggle, Progress } from 'reactstrap';
import LaddaButton, { EXPAND_RIGHT } from 'react-ladda';
import 'ladda/dist/ladda-themeless.min.css';
import {MobileView} from "react-device-d... |
import {
exists as fsExists,
mkdir as fsMkdir,
readdir as fsReaddir,
readFile as fsReadFile,
writeFile as fsWriteFile
} from "fs"
import {
join as pathJoin
} from "path"
import {
v4 as uuidV4
} from "uuid"
import {
patchApply
} from "./../patch"
import jsonStableStringify from "json-... |
import { isDOMElement, addClasses, removeClasses } from "./util/dom";
import throwIfMissing from "./util/throwIfMissing";
const LEFT_ARROW = 37;
const RIGHT_ARROW = 39;
// All officially-supported browsers have this, but it's easy to
// account for, just in case.
const HAS_ANIMATION =
typeof document === "undefined... |
const Promise = require('bluebird');
const mwsProd = require('mws-product');
const ProductList = require('./AmazonProductList');
const PairedProductList = require('./../PairedProductList');
/* Class for handling operations with Amazon's inventory */
class AmazonClient {
/*
Instance Attributes:
accessKey - ... |
'use strict';
const logger = require('winston');
const request = require("request");
const sqlite3 = require('sqlite3');
var s3 = require('s3');
const fs = require('fs');
const db = new sqlite3.Database('db.sqlite');
var sleep = require('sleep');
const lbry = require('lbry-nodejs');
let _channelID;
let _customTag;
let... |
var should = require('should');
var meucci = require('../build/meucci');
var client = require('../build/meucci-client');
describe('meucci', function () {
describe('end to end communitication', function() {
var socketURL = 'http://localhost:3000'
, options = {'force new connection': true}
, clients = []
... |
import {Component} from "react";
import React from "react";
import * as d3 from "d3-3";
import '../../style/style.css';
import '../../style/serendip.css';
import {withFauxDOM} from 'react-faux-dom'
var topics2=[];
var topics="";
var curr=this;
var topic_matrix=[];
class RankView extends Component {
constructor(p... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { StyleSheet, TouchableOpacity } from 'react-native';
import { Text, View, Image } from 'react-native-animatable';
import NavBar from '../components/Navbar';
import CustomButton from '../components/CustomButton';
import { Col, Row, Gri... |
const HLSServer = require('hls-server')
const http = require('http')
const fs = require('fs')
const url = require('url')
const path = require('path')
const Busboy = require('busboy')
const is = require('type-is')
const os = require('os')
const ffmpeg = require('fluent-ffmpeg')
const Readable = require('stream').Readabl... |
/**
* @author <NAME>
* @license MIT
* @module transforms/react-addons-imports.js
*/
/**
* Create partially bound function
*
* @param {function} fn Function to bind
* @param {...any} args Arguments
* @returns {function} Partially bound function
*/
function partial(fn, ...args) {
return fn.bind(... |
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
TouchableOpacity,
ActivityIndicator,
Text,
Platform,
ListView,
TextInput,
Image,
View,
TouchableHighlight,
Animated,
ScrollView,
} from 'react-native';
import Dimensions from 'Dimensions';
imp... |
// eslint-disable-next-line import/no-unresolved
import { format } from 'date-fns';
import Store from './localStorage';
const Todos = () => {
// eslint-disable-next-line no-unused-vars
let count = 0;
const priority = ['low', 'normal', 'high'];
const todoList = {};
const storeName = 'todo-storage';
const a... |
import React,{useState , useEffect} from 'react';
import Navigation from '../Home/Navigation/Navigation';
import Topnav from '../Topnav/Topnav';
import './Profile.css';
import CommentIcon from '@mui/icons-material/Comment';
import { db } from '../Chat/firebase'
import {useMoralis} from 'react-moralis';
import {usePara... |
let setTimeOutId;
// object constructor based on the Captain
class Captain {
constructor(x, y) {
this.x = x;
this.y = y;
// x axis movement
this.walk = 0;
// y axis movement
this.turn = 0;
// toggle to change sober image while walking
this.walkThisWay = true;
// toggle to chan... |
/**
* @file run php script through php-cgi
* @author leon<<EMAIL>>
*/
const URL = require('url');
const child = require('child_process');
const path = require('path');
const fs = require('fs');
function execute(req, res, next, url, file) {
let i = req.url.indexOf('.php');
let pathinfo = i > 0 ? url.pathna... |
import React, {Fragment, useState, useEffect} from 'react';
import {useSelector, useDispatch} from 'react-redux';
import {withRouter} from 'react-router';
import classNames from 'classnames';
import {
Selectors as RoomSelectors,
} from '../../services/rooms';
import {
Selectors as BuoySelectors,
} from '../../serv... |
import React from 'react';
import Line from './Line';
import SubwayForm from './SubwayForm';
import asyncStation from './Station';
import asyncLabel from './Label';
import InfoCard from './InfoCard';
import AlloyFinger from './AlloyFinger';
import linelist from '../data/linelist.json';
const Station = asyncStation(() ... |
import React, { Component } from 'react'
import * as opentype from 'opentype.js'
import { changeCurrentDetailSelected } from '../actions';
import { BODY_480 } from '../constants/defaults';
import { FontOutlineViewer, FontPreviewTyper, FontAnimViewer, FontDetailViewer } from './';
import { connect } from 'react-redux';
... |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" ... |
import * as resolver from "./resolve-view-builder";
import * as validation from "./validation";
import * as options from "./options";
import * as util from "../util";
var registrations;
export function setRegistrations(r) {
registrations = r;
}
function didNotUnderstandNodeViewBuilder(node) {
return document.crea... |
import React, { Component, PropTypes } from 'react';
import { withRouter } from 'react-router';
import { Icon, Menu } from 'antd';
const { Item, SubMenu } = Menu;
import './SideMenu.scss';
function getItemLinkPath(item) {
return item.props.isRouterLink ?
item.props.to != null ? item.props.to : (item.key || item... |
// supporto all'interfaccia
function loadFrameMap(lat, long, name){
var url = "https://maps.google.com/maps?q="+lat+","+long+"&z=12&output=embed";
openLayer(url, 'Map - '+name);
}
function openLayer(url, title) {
return openLayerParam(url, title, 900, 600);
}
function openLayerParam(url, title, ... |
import {
LitElement,
html,
css
} from "https://unpkg.com/lit-element/lit-element.js?module";
import styles from './styles';
// TODO: Try using SVG instead of Canvas(!)
// Have one horizontal line segment for the strobe and
// set the y values of each point during the strobe.
// Might be ... |
var tree_id = "leftTree";
var all_pids = "";
var one_pids = "";
var two_pids = "";
var pids = "";
var select_id = "";//当前选择的ID
var pre_id="";//上次选择的ID
var mytimes = 0;
var myInterval = null;
var same_times = 1;
//定位,获取所有父节点
function fixerTree(id,purl,ONTO_TYPE){
if( $("#treeDiv").length > 0 && $("#treeDiv"... |
// HELPER FUNCTIONZ
function lerp(a, b, u)
{
return a + (b-a)*u;
}
function map(v, in_min, in_max, out_min, out_max)
{
return out_min + (out_max-out_min) * ((v-in_min) / (in_max-in_min));
}
function randInt(max)
{
return Math.floor(Math.random() * max);
}
function randInt2(min, max)
{
return Math.flo... |
import React, { Component } from 'react'
import Snackbar from '@material-ui/core/Snackbar'
import IconButton from '@material-ui/core/IconButton'
import CloseIcon from '@material-ui/icons/Close'
import Button from '@material-ui/core/Button'
import Dialog from '@material-ui/core/Dialog'
import MuiDialogTitle from '@mate... |
import { __assign, __extends } from "tslib";
import { deepMix, get, isObject, size } from '@antv/util';
import { COMPONENT_TYPE, DIRECTION, LAYER } from '../../constant';
import { Slider as SliderComponent } from '../../dependents';
import { BBox } from '../../util/bbox';
import { directionToPosition } from '../../util... |
console.log("Hi there! Feel to explore the code!");
//let apiURL = 'http://127.0.0.1:80/api'
let apiURL = "/api";
let playersTableOriginal = $("#onlinePlayersTable").html();
let oldMsg = "";
let oldSettings = {};
let oldPlayers = {};
const statusMsg = (msg) => {
if (oldMsg != msg) {
oldMsg = msg;
... |
import React, { useRef, useEffect, useState } from 'react';
import styled from 'styled-components';
import LinkedIn from '../../images/linkedin.inline.svg';
import { animationNumbers } from '../../utils/Animations';
const StyledWrapper = styled.div`
${({ theme }) => theme.mixins.flex('flex', 'column', 'center', 'cen... |
var currentTime = moment().format(' HH:mm:ss');
var tstCurrentDate = moment(tstCurrentDate).format("YYYY-MM-DD");
var patientID = sessionStorage.patientID;
var patientID = sessionStorage.getItem("patientID");
var programID = sessionStorage.getItem("programID");
var tt_cancel_destination = "/views/patient_d... |
const Application = require('spectron').Application;
const cpFile = require('cp-file');
const fs = require('fs');
const mkdirp = require('mkdirp');
const path = require('path');
const PNG = require('pngjs').PNG;
const rimraf = require('rimraf');
const config = require('./config');
module.exports = {
createApp,
endT... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const errors_1 = require("@oclif/errors");
const netrc_parser_1 = require("netrc-parser");
const url = require("url");
const deps_1 = require("./deps");
const login_1 = require("./login");
const vars_1 = require("./vars");
class HerokuAPIError... |
const removeAccents = require('remover-acentos');
const resultado_if = require('../resultados/resultado_if.json');
const campi_info = require('../resultados/campi_informacoes');
const campi = require('../files_inscritos/campi');
const areasConhecimento = [
'CIÊNCIAS SOCIAIS APLICADAS',
'CIÊNCIAS AGRÁRIAS',
... |
import React, {useEffect, useState} from 'react';
import {useDrop} from 'react-dnd';
import {useDispatch, useSelector} from 'react-redux';
import {sortableContainer} from 'react-sortable-hoc';
import actionTypes, {ItemTypes} from '../constants/actionTypes';
import {arrayMoveImmutable} from 'array-move';
import {observe... |
import Vue from 'vue'
export const route = { // 当前路由对象所在的 path 等信息。默认为首页
fullPath: '/pages/index/index',
path: '/index',
type: 'push',
query: {}
}
let _$ROUTING = false // 标记路由状态 防止连点
let onchange = () => {
} // 路由变化监听函数
const _$UNI_ACTIVED_PAGE_ROUTES = [] // 页面数据缓存
let _$UNI_ROUTER_PUSH_POP_FUN = () => {
} ... |
/////////////////////////////////////// Flocking system
var id = 0;
function update() {
requestAnimationFrame(update);
ctx.clearRect(0, 0, w, h);
//forces
var separation = new Point();
var cohesion = new Point();
var alignment = new Point();
//ratios
separate = document.getElementById... |
import React, { Component, Fragment } from "react";
import PropTypes from "prop-types";
import isEmpty from "lodash/isEmpty";
import moment from "moment";
import { Card } from "antd";
import { connect } from "react-redux";
import { push } from "connected-react-router";
import { FaFileSignature } from "react-icons/fa";
... |
const canvas = document.getElementById("tlo_czasteczki");
const ctx = canvas.getContext("2d");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
let particlesArray;
let noConectParticlesArray;
//pozycja myszki
let mouse = {
x: null,
y: null,
radius: (canvas.height / 80) * (canvas.width ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.