text stringlengths 3.07k 16k |
|---|
/**
* Perform a deep merge between a two objects
* Source: http://stackoverflow.com/questions/27936772/how-to-deep-merge-instead-of-shallow-merge
* @param {object} base Object which keys will be inherited
* @param {object} override Object which present keys will be used overriding base object
*/
module.exports.obj... |
'use strict';
var $ = require('jquery');
var _ = require('underscore');
var Backbone = require('backbone');
Backbone.$ = $;
var ChildView = require('./child-view');
var MainEvents = require('../../events/main-events');
var PreambleHeadView = require('../header/preamble-head-view');
var CommentView = require('../comme... |
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
var c = arguments.length,
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.deco... |
/* Copyright (c) 2019 AT&T Intellectual Property. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. ... |
#!/usr/bin/env node
const amqp = require("amqplib");
const NR = require("node-resque");
const IORedis = require("ioredis");
const { v4 } = require("uuid");
const redis = new IORedis();
// rabbitmq queue names
const smallTasksQueue = "small-tasks";
const mediumTaskQueue = "medium-tasks";
const largeTaskQueue = "large... |
var React = require("react");
var ReactDOM = require('react-dom');
var _ = require('underscore');
var componentsNode = document.getElementById('components');
var dom = document.createElement('div');
componentsNode.appendChild(dom);
var UI = require('../common/webim-demo');
var Button = UI.Button;
var Input = UI.Input... |
import React from 'react';
import * as firebase from 'firebase';
import { StyleSheet, View, TouchableHighlight, TouchableOpacity, Text } from 'react-native';
import EvilIcons from '@expo/vector-icons/EvilIcons';
import Ionicons from '@expo/vector-icons/Ionicons';
import Provider, { Context } from '../context/Context';
... |
'use strict'
/**
* Module dependencies.
* @private
*/
const fs = require('fs');
const path = require('path');
const sharp = require('sharp');
const is = require('./is');
/**
* Module exports.
* @public
*/
module.exports = imgHandler;
/**
* Enum for image formats
* @readonly
* @typedef {'jpeg'|'png'|'webp'... |
const fs = require("fs");
const path = require("path");
const readline = require("readline");
const { exec } = require("child_process");
const camelcase = require("lodash.camelcase");
const kebabcase = require("lodash.kebabcase");
const snakecase = require("lodash.snakecase");
const xor = require("lodash.xor");
const s... |
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
import TimeManager from '../manager/TimeManager';
import DebrisManager from '../manager/DebrisManager';
import OrbitsBands from '../gameplay/OrbitsBands';
import ResourcesManager from '../manager/ResourcesManager';
var MY_POSITION;
navigator.geolocation.getCurrentPosition(handler);
function handler(position){
... |
'use strict';
const debug = require('debug')('common-bin');
const cp = require('child_process');
const is = require('is-type-of');
const unparse = require('dargs');
// only hook once and only when ever start any child.
const childs = new Set();
let hadHook = false;
function gracefull(proc) {
// save child ref
chi... |
//้กถ็บงๆ ่็น็pid
var pid = 0;
$(function(){
//่ทๅๅญๅ
ธๆฐๆฎ
var columns = [[
{field:'id',title:'id',width:0,hidden:true},
{field:'code',title:'่ง่ฒ็ผ็ ',width:200,align:'center',sortable:true},
{field:'name',title:'่ง่ฒๅ็งฐ',width:200,align:'center',sortable:true},
{field:'description',title:'ๆ่ฟฐ',... |
import React from 'react';
import { log, useForceUpdate, getChangedModels } from './helpers';
// Smook -> State Management hOOK ๐ฑ
// Take ideas from:
// - https://github.com/reduxjs/react-redux/issues/1179
// - https://github.com/reduxjs/react-redux/issues/1179#issuecomment-476133300
// Maybe use Proxies to improve... |
const mysql = require('mysql');
const inquirer = require('inquirer');
// const util = require('util');
const connection = mysql.createConnection({
host: 'localhost',
// Your port; if not 3306
port: 3306,
// Your username
user: "root",
// Be sure to update with your own MySQL password!
password: "<PASS... |
import React, { useRef } from 'react';
import PropTypes from 'prop-types';
import { reduxActions } from '@codetanzania/ewea-api-states';
import { Typography, Row, Col, Button } from 'antd';
import ReactToPrint from 'react-to-print';
import { ReloadOutlined, PrinterOutlined } from '@ant-design/icons';
import get from 'l... |
/* eslint-disable no-use-before-define */
exports = module.exports = {
/**
* Clear polling check, so that 'isPollingMockServer()' returns false
* if the bot stopped polling the mock server.
* @param {Number} port
*/
clearPollingCheck,
/**
* Redefine a bot method to allow us to ignore 429 ... |
import React, { Fragment, useState, useEffect } from "react";
import { connect } from "react-redux";
import {
Typography,
Box,
Button,
Grid,
Table,
TableBody,
TableCell,
TableRow,
TableContainer,
TableHead,
FormControl,
FormLabel,
FormControlLabel,
RadioGroup,
Radio,
} from "@material-ui/c... |
import React,{Component} from 'react';
import {bindActionCreators } from 'redux';
import {connect} from 'react-redux';
import * as CM from '../common/component';
import {getDataFromAPI,swiperImgShow,Tips} from '../common/base';
import * as MGAction from '../actions/index';
import {Link} from 'react-router';
// ่ทๅขๆธธ่ฏฆ... |
// Store our API endpoint inside queryUrl
var queryUrl = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson";
// Perform a GET request to the query URL
d3.json(queryUrl, function(data) {
// Send the data.features object to the createFeatures function
createFeatures(data.features);
});
//... |
'use strict'
const SystemRoutes = require('template-api/src/system/routes')
const AuthRoutes = require('template-api/src/auth/routes')
const InstallationRoutes = require('template-api/src/installation/routes')
const CollaborationRoutes = require('template-api/src/installation/collaboration_routes')
const DiggerRoutes ... |
// src/components/Toast.js
import "./Toast.css";
import {useEffect, useState} from "react";
import {useDispatch, useSelector} from "react-redux";
import {
choose_toast_message,
choose_toast_status,
choose_toast_time_out, delete_toast_message,
delete_toast_status, delete_toast_time_out
} from "../root/commonSlic... |
var express = require('express');
var _ = require('lodash');
var router = express.Router();
var request = require('request');
var moment = require('moment');
var configuration = require('../config.json');
router.get('/flights/:from/:to/:start/:end/:direction/:limit', function(req, res, next) {
var leaveFrom = req.par... |
var ver = '0.0.1';
var time = 0;
var _timer = function() {
var t = new Date();
var diff = (t.valueOf() - time)/1000 + ' sec';
time = t.valueOf();
return diff;
}
var xDoc = new require('./XLSXExporter.js')();
var xChart = new require('./OpenXMLChart.js')();
var exports = module.exports = {};
e... |
// Define our selectors
var $clock = $("#clock");
var $timer = $("#timer");
var $start = $("#start");
var $pause = $("#pause");
var $continue = $("#continue");
// Enable start / pause / continue buttons
$(function(){
$start.on("click",function(e){
e.preventDefault();
var clocktimer = $('.clock_time').ht... |
"use strict";
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
const childProcess = require("child_process"),
path = require("path"),
fs = require("fs"),
processWrapper = require("./process-wrapper");
const supportedPlatforms = [
"win32",
"linux",
"darwin"
];
const nodeModulesDir... |
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var EPouchDB = _interopDefault(require('express-pouchdb'));
var utils = _interopDefault(require('express-pouchdb/lib/utils'));
var jwt = _interopDefault(require('jsonwebtoken'));
const cust... |
const seedrandom = require('seedrandom');
const MAX_SESSIONS = process.env.max;
const INTERVAL = process.env.interval;
const INTERACTION_INTERVAL = process.env.interactionInterval;
const INTERACTION_RATIO = process.env.interactionRatio;
const SESSION_LENGTH = process.env.sessionLength;
const SEED = process.env.seed;
... |
import React, { useRef, useEffect, useState } from "react"
import { BsArrowLeft, BsArrowRight } from "react-icons/bs"
import useObserver from "../../hooks/use-observer"
import Content from "../Content"
import showcaseStyles from "./Showcase.module.scss"
const Showcase = () => {
const sliderRef = useRef(null)
const... |
// this picks the bus route you want to mess with
//const selectedRoute = "1";
// const url = "http://api.511.org/transit/VehicleMonitoring?api_key=f0e7e4f5-928b-4378-abdd-2f04c0c4d0ae&agency=SF"
function createMap() {
// TODO: add your own access token
mapboxgl.accessToken = '<KEY>';
//makes map
... |
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... |
import React, { useState, useEffect } from "react";
import { Link, useHistory } from "react-router-dom";
import SignedHeader from '../../../components/SignedHeader';
import CustomerService from '../../../services/CustomerService';
function OrderRequest () {
const [data, setData] = useState([]);
const x = JSON.p... |
/**
* ่ฏปๅjsonๅ
ๅฎน๏ผๅ ไธไธช็ปไธ็้่ฏฏๅค็
* @param {String} content
* @param {String} path
* @returns {*}
*/
function readJSON(content, path){
try {
return JSON.parse(content);
} catch (e){
fis.log.error('invalid json file [' + path + '] : ' + e.message);
}
}
/**
* ไธบcomponent_modules็ฎๅฝไธ็ๆจกๅๅปบ็ซๅซๅ
* @pa... |
const { getCreateKeys } = require('../../../extensions/helpers/key-utils');
const { loadModels } = require('../../../extensions/tools/models');
const { deserialize, eosDSPGateway, generateABI, genNode, eosPrivate, paccount, forwardEvent, resolveProviderData, resolveProvider, getProviders, resolveProviderPackage, paccou... |
#!/usr/bin/env node
'use strict';
var _ = require('underscore'),
Q = require('q'),
AWS = require('aws-sdk'),
minimist = require('minimist'),
Synchronizer = require('./Synchronizer'),
startupPromise = Q.when(),
argvOpts, argv, argsFailed, options;
argvOpts = {
string: [
'master',
... |
import React from 'react'
import {withRouter} from 'react-router-dom'
import Card from '../components/Card'
import FormGroup from '../components/form-group'
import SelectMenu from '../components/selectMenu'
import LanรงamentoTable from '../views/lancamentos/lacamentoTables.js'
import LancamentoService from '../app/serv... |
import React, { Component } from 'react';
import { Text, View, StyleSheet, TouchableOpacity, FlatList, Alert } from 'react-native';
import { Input, Button, Tooltip } from 'react-native-elements';
import MaterialIcon from 'react-native-vector-icons/MaterialIcons';
import EvilIcon from 'react-native-vector-icons/EvilIcon... |
// Copyright 2019 Google 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
const exec = require("child_process").execSync;
const semver = require("semver");
const commitParser = require("conventional-commits-parser");
const base = require("conventional-changelog-angular");
const helpers = require("./helpers");
// from https://github.com/conventional-changelog/conventional-changelog/blob/mast... |
/*
* This file is part of CycloneDX Webpack plugin.
*
* 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 applicab... |
"use strict";
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _react3 = require("@storybook/react");
var _addonKnobs = require("@storybook/addon-knobs");
var _index = require("./index");
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj }... |
import React, { Component } from "react";
import styles from "./Timeline.module.css";
import InfoCard from "./InfoCard";
import ChampionHeader from "./ChampionHeader";
import HorizontalTimelineContent from "react-horizontal-timeline";
import ChampionData from "../assets/static-data/championFull.json";
import Loader fro... |
let myLeads = [];
let links = [];
try {
links = [...links, ...JSON.parse(localStorage.getItem('links'))];
console.log(JSON.parse(localStorage.getItem('links')));
} catch (e) {
console.log(e); // Or whatever action you want here
}
for (let i = 0; i < links.length; i++) {
let key1 = Math.random() * 100000;
li... |
//Establish the WebSocket connection and set up event handlers
let rawReadings = [];
let soilTempReadings = [];
let airTempReadings = [];
let humidityReadings = [];
let lightReadings = [];
let moistureReadings = [];
let soilTempChart, airTempChart, humidityChart, lightChart, moistureChart;
let chartsInit = false;
let m... |
/* global describe, it, before, afterEach */
'use strict';
var _ = require('lodash');
var should = require('chai').should();
var mockery = require('mockery');
var config = require('./mocks/config.json');
var CONFIG = _.cloneDeep(config);
function requireFreshConfig() {
return _.cloneDeep(CONFIG);
}
var wa... |
#!/usr/bin/env node
//
// Copyright (c) Microsoft Corporation
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
//
// @ts-check
const os = require("os");
/**
* @typedef {{
* version?: string;
* dependencies: Record<string, string>;
... |
var git = require('git-rev')
var gulp = require('gulp');
var gulpif = require('gulp-if');
var map = require('map-stream');
var sass = require('gulp-sass');
var ts = require('gulp-typescript');
var sourcemaps = require('gulp-sourcemaps');
var watch = require('gulp-watch');
var rename = require("gulp-rename");
var debug... |
/*
TouchMIDI
<NAME>, April 2016 (Oct 2019)
midi.js v1.1
* Midi class - MIDI message handler for sending messages
* MidiAction class - Used to hold action paramters and trigger messages
*/
class Midi {
constructor(device_name, open_callback) {
this.midi_access = null;
this.midi_out = nu... |
class IPCC {
constructor(element) {
this.element_ = element;
this.timeIndex_ = -1;
this.structure_ = {};
this.textureMap = null;
this.textureWidth = 400;
this.textureHeight = 200;
const slider = this.element_.querySelector('.mdc-slider.ipcc-time-slider');
if (slider) {
this.slid... |
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const sheetKey = urlParams.get('sheetkey');
Promise.all([
readSheetData(sheetKey, 3),
readSheetData(sheetKey, 2)]).then(start);
var projects, participants;
var tableTrack1, tableTrack2, tableTrack3;
var tracks;
fu... |
import { createDocumentFragment } from '../../utils/dom';
import { SECTION_EACH, SECTION_IF, SECTION_IF_WITH, SECTION_UNLESS, SECTION_WITH } from '../../config/types';
import { isObject } from '../../utils/is';
import Fragment from '../Fragment';
import RepeatedFragment from '../RepeatedFragment';
import { MustacheCont... |
import { useState, useEffect } from 'react';
import {
Container,
Button,
ButtonDropdown,
DropdownToggle,
DropdownMenu,
DropdownItem,
Card,
CardBody,
CardTitle,
Badge,
Row,
Col
} from 'reactstrap';
import RequireAuthentication from 'components/RequireAuthentication/Require... |
/**
* @Author: jimmydaddy
* @Date: 2017-06-01 08:17:23
* @Email: <EMAIL>
* @Filename: index.js
* @Last modified by: jimmydaddy
* @Last modified time: 2017-06-18 12:29:05
* @License: GNU General Public License๏ผGPL)
* @Copyright: ยฉ2015-2017 www.songxiaocai.com ๅฎๅฐ่ All Rights Reserved.
*/
'use strict'
impo... |
'use strict';
// Polyfill matches as per https://github.com/jonathantneal/closest
Element.prototype.matches = Element.prototype.matches ||
Element.prototype.mozMatchesSelector ||
Element.prototype.msMatchesSelector ||
Element.prototype.oMatchesSelector ||
Element.prototype.webkitMatchesSele... |
/*
Javascript Frame To Make Coding In Javascript Easier
*/
// Class To Handle All Network Connections
class Http {
// Define Class Constructor
__constructor(){
this.xhr = null;
this.form = null;
this.url = null;
this.method = null;
} // End OF Constructor
// Metho... |
/************************************************************
*
* Server
*
***********************************************************/
require('mootools');
var Express = require('express');
var Program = require('commander');
var Http = require('http');
var Path = require('path');
var Fs = require('fs');
var Sock... |
import 'webrtc-adapter'
const WS_URL = 'ws://127.0.0.1:8084';
class Page {
constructor() {
this.UI = {
group: document.querySelector('.group'),
btn_call: document.getElementById('btn-call'),
video_local: document.getElementById('video-local')
};
this.bindE... |
import React, {useContext, useEffect, useState} from "react";
import {
Alert,
Image,
KeyboardAvoidingView, Pressable,
ScrollView,
StyleSheet,
Text, TouchableHighlight, useWindowDimensions,
View
} from "react-native";
import {ActivityIndicator, Button, Modal, Portal} from "react-native-paper";
import {Text... |
const Color = require('color');
"use strict";
// External modules
// const elasticlunr = require("elasticlunr");
// โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโ
// โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// โโโโโโ โโโโโโ โโโ โโโโโโ โโโโโโโโโโโโโโโโ
// โโโโโโ โโโโโโ โโโ โโโโโ... |
import React from 'react';
import Map from './Map';
import Sidebar from './Sidebar';
import DynamicChart from './DynamicChart';
import TableOrGraphPanel from './TableOrGraphPanel';
let colorMap = {};
let alreadyCreatedColors = false;
class AppMain extends React.Component {
constructor(props) {
super(props);
... |
/*
* eGov SmartCity eGovernance suite aims to improve the internal efficiency,transparency,
* accountability and the service delivery of the government organizations.
*
* Copyright (C) 2017 eGovernments Foundation
*
* The updated version of eGov suite of products as by eGovernments Foundation
*... |
import React, { Component } from "react";
import Tooltip from './Tooltip';
import * as d3 from "d3";
import './SequenceMatrix.css';
/**
* This is the class where sequence matrix table will the rendered.
* App.js renders this component
*/
class SequenceMatrix extends Component {
constructor(props) {
sup... |
// Copyright IBM Corp. 2014,2016. All Rights Reserved.
// Node module: strong-supervisor
// This file is licensed under the Artistic License 2.0.
// License text available at https://opensource.org/licenses/Artistic-2.0
'use strict';
var Graphite = require('strong-statsd/test/servers/graphite');
var Splunk = require(... |
import React from "react";
import back from "./left.png";
import "./brand.css";
import axios from "axios";
import Feedback from "../Feedback";
import { FadeLoader } from "react-spinners";
import { Link } from "react-router-dom";
import defaultimage from "./x.jpg";
import AddFeedback from "../Feedback/add.js";
class Br... |
/*
Copyright 2020 <NAME>, Graphical Structure
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 ag... |
import axios from "axios"
import React from "react"
import { useDispatch } from "react-redux"
import { fetchCompleteTodosById } from "../../redux/actions/complete.actions"
import { fetchTodosById } from "../../redux/actions/todos.actions"
import CloseIcon from '@mui/icons-material/Close';
import CreateIcon from '@mui/i... |
import React from 'react';
import renderer from 'react-test-renderer';
import { StyleSheet, Dimensions, ScrollView, ImageBackground } from 'react-native';
import { Block, Text, theme, Button } from 'galio-framework';
import { nowTheme } from '../Vista/constants';
const { width, height } = Dimensions.get('screen');
co... |
import React, { useEffect, useState } from 'react';
import { WorkflowAction } from './../../_action';
import { connect } from 'react-redux';
import { Link, useParams } from 'react-router-dom';
import { status } from '../../_constants';
import { useNavigate } from 'react-router';
const Dashboard = (props) => {
const ... |
/**
*
* Copyright (c) 2015 Cisco Systems, Inc. See LICENSE file.
*/
"use strict";
var chai = require("chai"),
cloneDeep = require("lodash.clonedeep");
var KMS = {
KeyObject: require("../lib/keyobject"),
Context: require("../lib/context")
};
var assert = chai.assert;
describe("KMS/Context", function() {
... |
const logger = require('winston');
const leaseModel = require('../models/lease');
const templateModel = require('../models/template');
const occupantModel = require('../models/occupant');
/**
* @returns a Set of leaseId (_id)
*/
async function _leaseUsedByTenant(realm) {
return await new Promise((resolve, reject) ... |
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] =... |
var road , roadImage;
var boy , boyImage,boyani;
var virus , virusImage;
var diamonds , diaIMage;
var jwell,jwellImage;
var cash,cashImage;
var sword,swordImage;
var score;
var PLAY=0;
var END=1;
var gameState=PLAY;
var gameOver, game;
var restart , rest;
var but1,but1Image;
var but2,but2Image;
var inv1;
var inv2;
fun... |
import React from "react";
import {
Button,
Card,
CardBody,
CardFooter,
CardHeader,
Col,
Form,
FormGroup,
Input,
Row,
} from "reactstrap";
import moment from "moment";
import { Link } from "react-router-dom";
import Swal from "sweetalert2";
import { DatePicker } from "antd";
import { Select, Loadin... |
import path from 'path';
import {promisify} from 'util';
import {createFilter} from '@rollup/pluginutils';
import nodeSass from 'node-sass';
import postcss from 'postcss';
import cssModules from 'postcss-modules';
export function styles({
output = '',
plugins = [],
modules = {},
mode,
include = ['**/*.css',... |
function quotedStrings(quotes, next = "pop", token = "string") {
return quotes.map(q => ({
token: `${token}.start`,
regex: `${q}`,
push: [
{include: "spel"},
{
token: `${token}.escaped`,
regex: `\\\\${q}`,
},
{
token: `${token}.end`,
regex: `${q}`,
... |
import { Fragment } from 'react'
import _ from 'lodash'
import PropTypes from 'prop-types'
import { observable, runInAction } from 'mobx'
import { observer, PropTypes as MobxPropTypes } from 'mobx-react'
import styled from 'styled-components'
import EntityAvatarAndName from '~/ui/global/EntityAvatarAndName'
import Exp... |
import React, { Component } from 'react';
import { Container, Row, Col, Collapse, Table } from 'reactstrap';
import { TabContent, TabPane, Nav, NavItem, NavLink, Card, Button, CardTitle, CardText, Dropdown, DropdownItem, DropdownToggle, DropdownMenu } from 'reactstrap';
import { CircleLoader, RingLoader } from 'react-... |
#!/usr/bin/node
var time = require('./time.js');
var utils = require('./utils.js');
var os = require('os');
var fs = require('fs');
var https = require('https');
var express = require('express');
var app = express();
global.atob = require("atob");
var domain = "goralskieveto.org"
var servername = "miel<EMAIL>zuk.... |
import * as d3 from "./d3_api";
import partition from "lodash.partition";
import { Interval } from "./remover";
window.d3 = d3;
function midAngle(d) {
return d.startAngle + (d.endAngle - d.startAngle) / 2;
}
export function pieChart(labelRemover) {
let data = [];
let width = 100;
let height = 100;
const ... |
data = {
"hosts":[],
"paths":{}
}
hosts = new Set(data.hosts);
tabs = {};
//Update hosts set and paths set
function updateData(fallback) {
var url = 'https://raw.githubusercontent.com/kapsteur/plock/master/data.json';
if (fallback) {
url = chrome.extension.getURL('data.json');
}
var xhr = new XMLHttpRe... |
var model = {nrOfGenes : 9,
size : 100,
genome : [],
lines : []};
var line = {x1 : 0, y1 : 0, x2 : 0, y2 : 0};
function initModel() {
model.size = Math.min(width, height) / 4;
model.genome[1] = model.genome[2] = model.genome[3] = model.genome[4] = model.genome[5] = 1;
model.genome[6] = model.genome[7] ... |
import React from 'react';
import url from 'url';
import { Switch, Route, Link } from 'react-router-dom';
import Button from '@material-ui/core/Button';
import Paper from '@material-ui/core/Paper';
import Chip from '@material-ui/core/Chip';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/... |
/* eslint no-restricted-globals:0 */
import axios from 'axios';
import React, { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import Divider from '../../components/divider/divider';
import Expand from '../../components/expand/expand';
import ReportModal from '../../components/report_modal... |
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] =... |
sessionId();
var valorProdutos = document.getElementById('valorProdutos').getAttribute('value').replace(',','.');
var amount = valorProdutos;
$('#pac').click(function(){
var valorFrete = document.getElementById('valorPac').getAttribute('value');
total = parseFloat(valorProdutos.replace(',','.')) + parseFloat(v... |
'use strict';
import React from 'react';
import ReactDom from 'react-dom';
import {
Affix,
Icon,
Card,
Col,
Row,
Layout,
Radio,
Empty,
BackTop,
Modal,
} from 'antd';
import io from 'socket.io-client';
const Header = Layout.Header;
const Footer = Layout.Footer;
const Content = Layout.Content;
con... |
var pcCardHeader = {
saveNewName(form_id, computer_id) {
var new_name = $(`#${form_id}`)[0].value;
pcCardHeader.saveHeaderWithName(computer_id, new_name);
pcCards.sendCommand(computer_id, `name;${new_name}`)
},
saveHeaderWithName(computer_id, name) {
header_html = pcCardHe... |
/* eslint-env jest */
// mock config for testing
jest.mock('../src/config', () => require('./__mocks__/config'));
// npm packages
const getPort = require('get-port');
// our packages
const authToken = require('./fixtures/authToken');
const {startServer} = require('../src');
const docker = require('../src/docker/docke... |
/**
* This script is responsible for grabbing the latest Node.js version
* metadata and using that to update the following files.
*
* Makefile: contains the versions used for the default build (TODO)
* README.md: lists the versions this project currently supports
* releases.json: known metadata for the current re... |
/*
* Copyright (c) 2014-2017, Inversoft 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
*
* Unless required... |
/*
* Dateline 2.0.3
* (c) 2019-2020 <NAME>, Amsterdam
* MIT License
* https://github.com/sjaakp/dateline
* https://sjaakpriester.nl
*/
import './dateline.scss';
import SortedArray from './SortedArray';
import Bubble from './Bubble';
import Band from './Band';
import {createDate, createDiv} from './utils';
import... |
import noop from 'lodash/noop';
import get from 'lodash/get';
import head from 'lodash/head';
import PropTypes from 'prop-types';
import React from 'react';
import { withTranslation } from 'react-i18next';
import I18N_DOMAIN_COMPONENTS from '../../constants';
import getDefaultT from '../../translate';
import formatJSON... |
import React from 'react';
import { Link as RouterLink } from 'react-router-dom';
import Link from "@material-ui/core/Link";
import Grid from "@material-ui/core/Grid";
import Box from "@material-ui/core/Box";
import Divider from "@material-ui/core/Divider";
import List from "@material-ui/core/List";
import ListItem fr... |
$("#start-button").on("click", function () {
send("reset");
});
$("#yellow-team-controller").change(function () {
let value = $(this).val();
send("set_controller", {team: "Y", controller: value});
});
$("#blue-team-controller").change(function () {
let value = $(this).val();
send("set_controller", {team: "B", co... |
import React from "react";
import { BackTop, Col, Drawer, List, Row, Spin, Statistic, Table, Tabs, Tag, Timeline, Typography } from "antd";
import { LoadingOutlined } from '@ant-design/icons';
import dayjs from "dayjs";
import axios from "axios";
import PropTypes from 'prop-types';
const { TabPane } = Tabs;
const { Te... |
var spaceship;
var asteroids;
var atmosphereLoc;
var atmosphereSize;
var earthLoc;
var earthSize;
var starLocs = [];
var playing;
var sizeL;
var sizeS;
var myCount;
var maxLives;
//////////////////////////////////////////////////
function setup() {
createCanvas(1200, 800);
maxLives = 4;
spaceship = new Spaceship... |
import { rationalMatrices } from './types';
const ops = rationalMatrices;
const p = 9999991;
const modularInverse = (a, m) => {
let [t, t1] = [0, 1];
let [r, r1] = [m, a];
while (r1 != 0) {
const q = Math.floor(r / r1);
[t, t1] = [t1, t - q * t1];
[r, r1] = [r1, r - q * r1];
}
if (r == 1)
... |
const Engine = require('@comunica/query-sparql').QueryEngine;
const constants = require('../modules/constants');
class SparqlqueryService {
constructor(config) {
this.config = config;
}
async initialize(logger) {
this.logger = logger;
this.logger.info('Sparql Query module initializ... |
const pg = require('pg');
const connectionString = process.env.DATABASE_URL || 'postgres://localhost:5432/smartfolio';
var config = {
user: 'postgres',
database: 'smartfolio',
password: '<PASSWORD>',
host: 'localhost',
port: 5432,
max: 10,
idleTimeoutMillis: 30000,
};
const client = new pg... |
/**
* bin/_util.js
*
* <NAME>
* Consensas
* 2021-01-19
*
* Copyright (2013-2021) Consensas
*
* 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/l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.