text stringlengths 3.07k 16k |
|---|
const FS = require('fs');
const Images = require('./Images');
const Pull = require('./Pull');
const Skeletons = require('./Skeletons');
const TRACER_OUTPUT = '/tmp/tracer.out';
const DEFAULT_TIME = { hour: 3, minute: 0 }; // 3am
let MinkeApp;
const Updater = {
_updateTimeOfDay: Object.assign({}, DEFAULT_TIME),
_... |
import React, { useEffect } from "react";
import { useHistory } from "react-router";
import {
Avatar,
Card,
Button,
IconButton,
Input,
InputAdornment,
Paper,
} from "@material-ui/core";
import ArrowBackIcon from "@material-ui/icons/ArrowBack";
import SubjectIcon from "@material-ui/icons/Subject";
import Schedule... |
import React, {Component} from 'react';
//import { GoogleLogin, GoogleLogout } from 'react-google-login';
/*
const responseGoogle = (response) => {
console.log(response);
};
*/
class App extends Component {
constructor(props) {
super(props);
this.state = {
isLoading: false,
error: null,
u... |
const logger = require('logger');
const MicroserviceModel = require('models/microservice.model');
const EndpointModel = require('models/endpoint.model');
const crypto = require('crypto');
const pathToRegexp = require('path-to-regexp');
class Microservice {
/**
* Creates an Endpoint model instance based on th... |
import mixin from 'reactjs-mixin';
/* eslint-disable no-unused-vars */
import React from 'react';
/* eslint-enable no-unused-vars */
import {StoreMixin} from 'mesosphere-shared-reactjs';
import CosmosErrorMessage from '../../components/CosmosErrorMessage';
import CosmosPackagesStore from '../../stores/CosmosPackagesSt... |
import config from './config';
import Bitcoin from './providers/Bitcoin';
import debug from 'debug';
import Ethereum from './providers/Ethereum';
import AgentRestClient from './rest/client';
import { parseSigResponse, getProviderShortCode } from './util';
import NodeCrypto from 'gridplus-node-crypto';
export const prov... |
var FileDiff = require('./file-diff')
, _ = require('underscore')
var changesToHtml = function(changes) {
var str = []
str.push("<table class='commit-summary'>")
_(changes).each(function(change) {
str.push("<tr>")
if (change.type == "new") {
str.push("<td class='modification new'>new</td><td>" + ... |
const express = require('express');
const http = require('http');
const bodyParser = require('body-parser');
const fs = require('fs');
const app = express();
const request = require('request');
const jsonfile = require('jsonfile');
const chokidar = require('chokidar');
const toobusy = require('toobusy-js');
co... |
// ajax全局配置
$.ajaxSetup({
beforeSend() {
this.layerId = layer.load(0, {
shade: [0.1, "#fff"]
})
},
complete() {
layer.close(this.layerId);
},
err() {
layer.msg("网络异常");
}
})
// tips 提示方法 参数一提示内容 参数二吸附元素选择器
function layerTip(str, sel) {
layer.tip... |
import React from 'react';
import { Button, Modal, Tabs, Tab, FormGroup, FormControl, ControlLabel, Checkbox, HelpBlock } from 'react-bootstrap';
import Axios from 'axios';
import dateFormat from 'dateFormat';
const Constants = require('../Constants.js')
const Cookie = require('../Cookie.js');
export default class Cl... |
var $ = require("jquery");
var config = require("./config");
var p5 = require("p5");
var TWEEN = require("TWEEN");
var dat = require("dat-gui");
var Tone = require("Tone");
var Player = Tone.MultiPlayer;
var player;
var tsnes = [];
var tsne_id = 0;
var files = [];
var fileCount = 6000;
var loadedCount = 0;
var loa... |
// Canvas Setting
const WIDTH = 1200;
const HEIGHT = 600;
// Initial values for population
const POPULATION_INIT = 30;
const HAWK_INIT = 0;
const DOVE_INIT = POPULATION_INIT - HAWK_INIT;
// Global variables
let totalPopulation = {
prev: 0,
current: POPULATION_INIT
};
let hawkPopulation = {
prev: 0,
cu... |
import React, { useState, useEffect, useRef } from "react";
import "./splitter.css";
// 3px padding on each side (left/right or top/bottom) and 1px line in the
// middle => 7px area to capture mouse
const DIVIDER_SIZE = 7;
/**
*
* @param {boolean} vertical Splitter orientaion
* @param {?React.Node} children Splitt... |
/**
* Entry point for running self-test on different selenium hubs
*
* This code runs chrome with 2 extensions:
* 1. autotester-dev
* (dist/autotester-dev.crx, packed with all tests from `test/specs` dir)
*
* 2. SELF TEST autotester
* (dist/autotester.crx, packed with tests from `examples` dir and one pre-insta... |
const anchor = require("@project-serum/anchor");
const assert = require("assert");
describe("multisig", () => {
// Configure the client to use the local cluster.
anchor.setProvider(anchor.Provider.env());
const program = anchor.workspace.SerumMultisig;
it("Tests the multisig program", async () => {
// G... |
const Main = artifacts.require("Main");
const Latinum = artifacts.require("Latinum");
const Auction = artifacts.require("Auction");
const Dilithium = artifacts.require("Dilithium");
const ELL = artifacts.require("../contracts/libraries/ell/EIP20.sol");
const { expect } = require("chai");
const truffleAssert = require("... |
export class SimpleJsRpc {
static classContainer = {};
static remoteCallStrategy = DefaultRemoteCallStrategy;
static setRemoteCallStrategy(remoteCallStrategy = DefaultRemoteCallStrategy) {
this.remoteCallStrategy = remoteCallStrategy;
this.remoteCallStrategy.init(this);
}
static fo... |
Notification.requestPermission().then(function(result) {
console.log("notification permission granted");
});
var HTMLperiod = document.getElementsByClassName("period")[0],
HTMLhours = document.getElementsByClassName("hours")[0],
HTMLminutes = document.getElementsByClassName("minutes")[0],
HTMLseconds... |
import React, { Component } from 'react'
/* eslint-disable react/prop-types */
export class usageRate extends Component {
constructor(props) {
super(props)
this.state = {}
this.state.filterText = ''
this.state.nbText = 0
this.state.plants = []
}
handleUserInput(filterText) {
this.setState({ filterText: f... |
const tween = {
ease(x) {
return Math.sqrt(1 - Math.pow(x - 1, 2))
}
}
export default class ScenePager {
constructor({
touchEl,
moveEl,
items,
speed = 400,
bounce = false,
loop = false,
autorun = false,
duration = 5000,
easing = 'ease',
direction = 'horizontal',
t... |
function getAllNeededModules(tasks) {
gloupslog("\n SYNTAXICALY {1} FROM {0} ...".format([logFilePath("gulpfile.js"), chalk.bgMagenta(' IMPORTING MODULES ')]));
console.log('\n');
getModule(M.fs);
seekInFoundElements('intask', JSON.stringify(tasks));
importModulesFromFoundModules();
}
function importModulesFrom... |
var gCount = 1;
var ytToken = "AIzaSyBI9Fv5kTKSAymabcCHL0K9dJsTHAzC2hA";
window.onload = function(){
theSong = JSON.parse(localStorage.getItem('viewSong'));
$('#search-bar').animate({opacity:1},400);
$('#spotlight').animate({opacity:1},400);
$('#question-play').animate({opacity:1},400);
var query = theSong.title... |
#! /usr/local/bin/node
let nodegit = require('nodegit');
let fs = require('fs');
let directory = './';
let signature;
let repositoryObj;
let changedFiles;
let logSetting = false;
let branchName;
let lintResultsGlobal;
let formattedResults = [];
nodegit.Repository.open(directory).then((repo) => {
reposi... |
#!/usr/bin/env node
var noble = require('noble');
var buf = require('buffer');
var fs = require('fs');
var strftime = require('strftime');
var Long = require('long');
var TRITAG_SERVICE_UUID = 'd68c3152a23fee900c455231395e5d2e';
var TRITAG_CHAR_UUID_RAW = 'd68c3153a23fee900c455231395e5d2e';
var TRITA... |
import { projectList } from './project-list';
import {
CREATE_PROJECT_ERROR,
CREATE_PROJECT_SUCCESS,
REMOVE_PROJECT_ERROR,
REMOVE_PROJECT_SUCCESS,
LOAD_PROJECTS_SUCCESS,
UNLOAD_PROJECTS_SUCCESS,
UPDATE_PROJECT_ERROR,
UPDATE_PROJECT_SUCCESS,
NEW_PROJECT_CREATED,
SET_USER_PERMISSIONS,
SET_USER_PERM... |
/**
* Copyright 2017 IBM Corp. 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 by applica... |
const preps = '(in|by|before|during|on|until|after|of|within|all)' //6
const people = '(january|april|may|june|summer|autumn|jan|sep)' //ambiguous month-names
const verbs = '(may|march)' //ambiguous month-verbs
const fixDates = function(doc) {
//ambiguous month - person forms
let person = doc.if(people)
if (pers... |
const express = require('express');
const mongoose = require('mongoose');
const app = express();
const cors = require('cors');
require('dotenv').config();
const MONGO_URI = process.env["DB_URI"];
mongoose.connect(MONGO_URI, {
useNewUrlParser: true,
useUnifiedTopology: true,
});
app.use(express.json());
app.us... |
var editor = document.getElementById("editor");
var bold;
var italics;
var underline;
var ulList;
var olList;
var justifyLeft;
var justifyCenter;
var justifyRight;
var justifyFull;
var font;
var size;
var mode;
var boldButton = document.getElementById("bold");
var italicButton = document.getElementById("italic");
var... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Text = exports.El = exports.ElVoid = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.en... |
'use strict';
exports.__esModule = true;
var _fn = require('../utils/fn.js');
var Fn = _interopRequireWildcard(_fn);
var _component = require('../component.js');
var _component2 = _interopRequireDefault(_component);
var _popup = require('../popup/popup.js');
var _popup2 = _interopRequireDefault(_popup);
var _po... |
const Job = require('sepal/worker/job')
const logConfig = require('./log.json')
const getSepalUser = request => {
const sepalUser = request.headers['sepal-user']
return sepalUser
? JSON.parse(sepalUser)
: {}
}
const getInitArgs = () => {
const {homeDir, pollIntervalMilliseconds} = require(... |
import React, { useState, useRef } from "react";
import { useForm } from "react-hook-form";
import Icon from '@mdi/react';
import { mdiEye, mdiEyeOff, mdiDownload, mdiAlert, mdiChevronDoubleDown, mdiContentCopy } from '@mdi/js';
import encryptSecret from '../utils/encrypt-secret';
import { autoSizeTextarea } from '../u... |
var _ = require('lodash');
var express = require('express');
var router = express.Router();
const User = require('../models/User');
const Thread = require('../models/Thread');
const Subscription = require('../models/Subscription');
let SharedData = require('../components/SharedData');
var activeUsers = SharedData.acti... |
import {
SPOT_ROOM_DISPLAY_NAME,
TENANT,
analytics,
eventStatusSuffixes,
inCallEvents,
joinCodeEvents,
meetingJoinEvents
} from 'common/analytics';
import {
AUDIO_MUTE,
BOOTSTRAP_COMPLETE,
DIAL_OUT,
HANG_UP,
JOIN_AD_HOC_MEETING,
JOIN_SCHEDULED_MEETING,
JOIN_WITH_S... |
'use strict'
const { loadJSON } = require('./yaml')
const chroma = require('chroma-js')
const fs = require('fs')
/**
* On dev mode, sometimes when we read the file the return value of readFile
* is an empty string. In those cases we need to read the file again
*/
async function readFileRetrying(filePathYAM... |
let test = document.getElementById('cocktail');
const searchName = document.getElementById('search-name');
const searchIngredient = document.getElementById('search-ingredient');
let drinkInfo = document.getElementById("drink-info");
let drinkCards = document.querySelectorAll('.drink-card');
var span = document.getEleme... |
const Paper = require('paper')
const p = Paper
Paper.install(window);
window.onload = function() {
let sunsetSpeed = 0.004
const canvas = document.querySelector('#stars')
let windowWidth = window.innerWidth
let windowHeight = window.innerHeight
const totalStars = (windowWidth * windowHeight) / 1000
canv... |
/*!
* Connect - session
* Copyright(c) 2010 Sencha Inc.
* Copyright(c) 2011 <NAME>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var uid = require('uid2')
, onHeaders = require('on-headers')
, crc32 = require('buffer-crc32')
, parse = require('url').parse
, signature = require('cookie-... |
'use strict';
var PORT_LISTENER = process.env.PORT || 8080;
var _ = require("underscore");
var S = require("string");
var path = require('path');
var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var async = require("async");
var multe... |
/*
A particular river crossing is shared by both Linux hackers and Microsoft employees. A boat is used to cross the river,
but it only seats four people, and must always carry a full load. In order to guarantee the safety of the hackers, you
cannot put three employees and one hacker in the same boat; similarly, you... |
/*jshint expr: true*/
var path = require( 'path' );
var newtonSync = require( path.resolve( path.join( __dirname, '..' ) ) );
var NsOF = newtonSync.NsOF;
var EventCommand = newtonSync.EventCommand;
var expect = require( 'chai' ).expect;
var net = require('net');
var _ = require('lodash');
describe('NSOF', function( ... |
var user = 'aromeu';
var apiKey = 'default_public';
var mapId = 'https://aromeu.carto.com/builder/9a5fe164-0590-4d62-af7d-533655cc99af/embed';
var width = 30;
var height = 20;
var dpi = 300;
var baseLayer = L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png', {
maxZoom: 18
... |
import { compile } from 'mdsvex';
import { dev } from '$app/env';
import grayMatter from 'gray-matter';
import fetch from 'node-fetch';
import { GH_USER_REPO } from './siteConfig';
import parse from 'parse-link-header';
import slugify from 'slugify';
// import { parse as nodehtmlparse } from 'node-html-parser';
import... |
/* global AFRAME, THREE */
import {scale} from "../util";
var CLAMP_VELOCITY = 0.001;
var MAX_DELTA = 0.2;
var KEYS = [
'w', 'a', 's', 'd',
'ArrowUp', 'ArrowLeft', 'ArrowRight', 'ArrowDown'
];
AFRAME.registerComponent('keyboard-controls', {
schema: {
acceleration: {default: 65},
turnSpeed: {default: Ma... |
const _ = require("lodash");
function transformAst(ast, symbolTable, libraryName) {
updateConstructorMSettingsParam(ast.topLevelNamespace);
filterNonePublicApis(ast);
addDefineArrayInterface(ast, symbolTable);
modifyExtendMethods(symbolTable);
if (libraryName === "sap.ui.core") {
updateDefineArrayDepsTy... |
import _throttle from 'lodash-es/throttle';
import { select as d3_select } from 'd3-selection';
import { dispatch as d3_dispatch } from 'd3-dispatch';
import { modeBrowse } from '../modes/browse';
import { svgPointTransform } from './helpers';
import { services } from '../services';
var _notesEnabled = false;
var _... |
window.addEventListener("load", init);
let turtle;
function init() {
let canvas = document.getElementsByTagName("canvas")[0];
let crc = canvas.getContext("2d");
turtle = new Turtle.Turtle(crc, canvas.width / 2, canvas.height - 30);
// turtle.moveForward(50);
// turtle.rotateClockwise(-90);
// tu... |
function Hashtable() {
this._hash = new Object();
this.put = function(key, value) {
if(typeof(key) != "undefined") {
if(this.containsKey(key) == false) {
this._hash[key] = typeof(value) == "undefined" ? null : value;
return true;
} else {
return false;
}
} else {
return false;
}
}
this... |
'use strict';
const common = require('./common');
const BulkOperationBase = common.BulkOperationBase;
const utils = require('../utils');
const toError = utils.toError;
const handleCallback = utils.handleCallback;
const BulkWriteResult = common.BulkWriteResult;
const Batch = common.Batch;
const mergeBatchResults = comm... |
/*
* @package jsDAV
* @subpackage DAV
* @copyright Copyright (C) 2010 <NAME>. All rights reserved.
* @author <NAME> <<EMAIL> ajax DOT org>
* @license http://github.com/mikedeboer/jsDAV/blob/master/LICENSE MIT License
*/
var Http = require("http"),
Url = require("url"),
Sys = require("sys"),
F... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createVersion = exports.createUppercasePi = exports.createUppercaseE = exports.createTrue = exports.createTau = exports.createSQRT2 = exports.createSQRT1_2 = exports.createPi = exports.createPhi = exports.createNull = exports.create... |
import styled from "styled-components";
export const Container = styled.div`
transition: all 0.3s ease-in-out;
width: ${(props) => (props.isMenuActive ? "20em" : "6em")};
@media screen and (max-width: 1024px) {
width: 0em;
}
`;
export const MenuContainer = styled.div`
width: 100%;
height: 100%;
tra... |
import { __rest } from "tslib";
import * as React from 'react';
import { useState } from 'react';
import styles from '@patternfly/react-styles/css/components/Label/label';
import labelGrpStyles from '@patternfly/react-styles/css/components/LabelGroup/label-group';
import { Button } from '../Button';
import { Tooltip } ... |
import React, { Component } from 'react';
import { Image, View, Text, Switch, SectionList, TouchableOpacity, NativeModules } from 'react-native';
import DialogInput from 'react-native-dialog-input';
import ImagePicker from 'react-native-image-picker';
import Crashes from 'appcenter-crashes';
import AttachmentsProvide... |
/*
<NAME>: @xnought
Summary:
AnimatedScatterPlot.js is a component that handles logic for animating change in the backward pass
*/
import React, { Component } from "react";
import "../d3.css";
import * as d3 from "d3";
class AnimatedScatterPlot extends Component {
/*
plot points and handle for the selected p... |
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 <NAME> <<EMAIL>>
<NAME> <<EMAIL>>
<NAME> <<EMAIL>>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License versio... |
#!/usr/bin/env node
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
// Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the futur... |
import React, { Component } from 'react'
import { Dimensions ,DeviceEventEmitter, Image, TouchableOpacity } from 'react-native'
import { Container, Content, Text, View ,Icon} from 'native-base'
import { Actions, ActionConst } from 'react-native-router-flux'
import I18n from 'react-native-i18n'
import { observer } from ... |
var WIDTH = 1024, HEIGHT = 436;
var Signal = signals.Signal;
var audio, sequencer,
camera, camera2, scene, renderer, renderTarget,
container, shared;
var tune, time, stats, gui;
var painterEffect;
init();
function init() {
audio = document.getElementById( 'audio' );
scene = new THREE.Scene();
renderer = new... |
/* eslint-disable object-shorthand */
/* eslint-disable object-shorthand */
/* eslint-disable object-shorthand */
/* eslint-disable object-shorthand */
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import PositionContainer from 'ming-ui/components/PositionContainer';
function pre... |
require("dotenv").config();
var keys = require('./keys.js');
var Spotify = require('node-spotify-api');
var spotify = new Spotify(keys.spotify);
var axios = require("axios");
var fs = require('fs');
var liriOption = process.argv[2];
var UserInput = process.argv.slice(3).join(" ");
... |
const assert = require('assert');
const util = require('../../lib/util');
describe('util', () => {
describe('#containsLetter()', () => {
it('should return true if input constains a letter', () => {
assert.equal(util.containsLetter('123a€#&€#&'), true);
});
it('should return false if input does not... |
//base64转换为图片blob
function dataURLtoBlob(dataurl) {
var arr = dataurl.split(',');
//注意base64的最后面中括号和引号是不转译的
var _arr = arr[1].substring(0,arr[1].length-2);
var mime = arr[0].match(/:(.*?);/)[1],
bstr =atob(_arr),
n = bstr.length,
u8arr = new Uint8Array(n);
while (n--) {
u8arr[... |
var crypto = require('crypto')
var stream = require('stream')
var fileType = require('file-type')
var parallel = require('run-parallel')
function staticValue (value) {
return function (req, file, cb) {
cb(null, value)
}
}
var defaultAcl = staticValue('private')
var defaultContentType = staticValue('applicatio... |
let boxHeight = 25;
let boxHeightBuffer = 4;
let xScale = 0.15;
let yScale = 1;
function GetTime(frames) {
let minutes = "" + parseInt(frames / (24 * 60)) + "m";
let seconds = "" + parseInt((frames / 24) % 60) + "s";
return minutes + " " + seconds;
}
function GetCostString(type) {
let m = AllTypes[typ... |
import PropTypes from 'prop-types'
import {useState, useEffect, useCallback, useReducer} from 'react'
import {scrollIntoView} from '../utils'
const defaultStateValues = {
highlightedIndex: -1,
isOpen: false,
selectedItem: null,
}
function getElementIds(
generateDefaultId,
{id, labelId, menuId, getItemId, to... |
// @flow
// Icons use a special export method
import * as Icons from "./icons";
export { Icons };
export { default as Alert } from "./Alert";
export { default as AlertButton } from "./Alert/AlertButton";
export { default as AirportIllustration } from "./AirportIllustration";
export { default as Badge } from "./Badge"... |
#!/usr/bin/env node
'use strict';
const throttle = require('lodash.throttle');
const debounce = require('lodash.debounce');
const chokidar = require('chokidar');
const yargs = require('yargs');
const { version: chokidarVersion } = require('chokidar/package.json');
const { version } = require('./package.json');
const ... |
// This file was procedurally generated from the following sources:
// - src/async-generators/yield-star-async-return.case
// - src/async-generators/default/async-class-decl-method.template
/*---
description: execution order for yield* with async iterator and return() (Async Generator method as a ClassDeclaration eleme... |
/**
* Plugin Database Access Layer
* @category saltcorn-data
* @module models/plugin
* @subcategory models
*/
const db = require("../db");
const { contract, is } = require("contractis");
const View = require("./view");
const { is_stale } = require("./pack");
const fetch = require("node-fetch");
const { stringToJSO... |
import { HighContrastSelector, getGlobalClassNames } from '../../../Styling';
import { personaPresenceSize, presenceBoolean, sizeBoolean } from '../PersonaConsts';
var GlobalClassNames = {
presence: 'ms-Persona-presence',
presenceIcon: 'ms-Persona-presenceIcon'
};
export var getStyles = function (props) {
v... |
/*
* This script creates a new Bot object for each bot in `config.js`
* and servs a basic dashboard at ./status
*
* Currently used for:
* @LatourAndOrder, @GCatPix, @CWDogPix, @ct_races and @xyisx_bot
*/
var CONFIG = require('./config.js'),
fs = require('fs')
express = require('express')... |
/**
* http://blog.barthe.ph/2013/05/21/js-oo-programming/
*/
var jj=$("pepe").html();
alert(jj);
// Namespace
var gs = gs || {};
//avem.Init = avem.init || {};
// Use strict header
(function() {
"use strict";
// use strict
gs.core={
servicesURL:"./",
ROOT:"./",
white:"./",
json:".... |
// Design By
// - https://dribbble.com/shots/13992184-File-Uploader-Drag-Drop
// Select Upload-Area
const uploadArea = document.querySelector('#uploadArea')
// Select Drop-Zoon Area
const dropZoon = document.querySelector('#dropZoon');
// Loading Text
const loadingText = document.querySelector('#loadingText');
// S... |
import React from "react";
import {
Button,
Card,
CardBody,
CardFooter,
CardHeader,
Col,
Form,
FormGroup,
Input,
Row,
} from "reactstrap";
import { Link } from "react-router-dom";
import Swal from "sweetalert2";
import { TimeFormat } from "../../../utils";
import { Loading, Select, DatePicker } from... |
/*
* Copyright 2020 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 ... |
// Copyright (c) 2019 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
const si = require("systeminformation");
const iplocation = require("iplocation").default;
const geohash = require("ngeohash");
const _ = require("lodash");
const multilog = require("../multilogger");
let logObject = {};
let dbMetricsObject = {};
let perfMetricsObject = {};
// Creates a log object
const log = (exten... |
var crypto = require('crypto');
var crc32 = require('crc-32');
var UINT32 = require('cuint').UINT32;
var version = "006";
var randomInt = Math.floor(Math.random() * 0xFFFFFFFF);
const VERSION_LENGTH = 3;
const APP_ID_LENGTH = 32;
var AccessToken = function (appID, appCertificate, channelName, uid) {
let token = th... |
import React, { useState, useEffect, useContext } from "react";
import { Link } from "react-router-dom";
import {
Container,
DropdownItem,
Table,
Card,
Badge,
UncontrolledDropdown,
DropdownMenu,
DropdownToggle,
CardFooter
} from "reactstrap";
import "moment/locale/es";
import moment from "moment";
im... |
/**
* this plugin adds the keycompression-capabilities to rxdb
* if you dont use this, ensure that you set disableKeyComression to false in your schema
*/
import {
numberToLetter,
trimDots,
clone
} from '../util';
class KeyCompressor {
/**
* @param {RxSchema} schema
*/
constructor(sch... |
/**
* Copyright (C) 2020, ControlThings Oy Ab
*
* 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
*
* @license Apache-2.0
*/
var WishApp =... |
'use strict';
import classNames from 'classnames';
import React from 'react';
import scrollIntoView from 'scroll-into-view';
import omitEmpty from 'omit-empty';
import Actions from './Actions';
import Author from './Author';
import Footer from './Footer';
import Fields from './Fields';
import Title from './Title';
impo... |
function titleCase(str) {
var splitStr = str.toLowerCase().split(' ');
for (var i = 0; i < splitStr.length; i++) {
// You do not need to check if i is larger than splitStr length, as your for does that for you
// Assign it back to the array
splitStr[i] = splitStr[i].charAt(0).toUpperCase... |
const dato = document.getElementById('dato')
const agregar = document.getElementById('agregar')
const ordenar = document.getElementById('ordenar')
const guardar = document.getElementById('guardar')
const cargar = document.getElementById('cargar')
const velocidad = document.getElementById("velocidad")
let tiempo = 70... |
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* global HtmlHelper, FxaModule, FxaModuleManager, FxaModuleNavigation,
LazyLoader, KeyEvent */
/* exported FxaModuleUI */
'use strict';
const OFFLINE_TIMEOUT = 30 * ... |
'use strict';
const fs = require('fs');
const util = require('util');
const readFile = util.promisify(fs.readFile);
const Agr = require('@aggregion/agrjs');
const BN = require('bn.js');
let agrio_token;
async function getTable(agr, account, scope, table) {
return await agr.getTableRows({
code... |
/*
Tests to validate test classes declared in typescript
tsc typescriptTestClass.ts --module commonjs
mocha ...
*/
var assert = require('chai').assert;
var Mocha = require('mocha');
var silentReporter = '../../../test/helpers/silentReporter';
var baseFolder = 'bin/';
function readTestFile... |
import { isServer } from '@lskjs/env';
import Err from '@lskjs/err';
import Module from '@lskjs/module';
import getWildcardKeys from '@lskjs/utils/getWildcardKeys';
import Bluebird from 'bluebird';
import fromPairs from 'lodash/fromPairs';
import get from 'lodash/get';
import some from 'lodash/some';
import { CacheSto... |
const webpack = require('webpack');
const path = require('path');
const glob = require('glob');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const OptimizeCssAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const InlineManifestW... |
'use strict';
const assert = require('assert');
const Ecommerce = require('../../lib/ecommerce');
const ID = () => Math.ceil( Math.random() * 100000 );
it( 'should create Product handle', async() =>
{
let shop = new Ecommerce({ webroot: 'http://localhost:8081', locale: 'sk' });
for( let i = 0; i <= 20; ++i ... |
'use strict';
const supergoose = require('@code-fellows/supergoose');
const { app } = require('../src/server');
const mockRequest = supergoose(app);
const foodModel = require('../src/models/food.js');
const clothesModel = require('../src/models/clothes.js');
const Collection = require('../src/models/data-collection-c... |
var http = require("http");
var path = require("path");
var express = require("express");
var bodyParser = require("body-parser");
var formidable = require("formidable");
var fs = require("fs");
var app = express();
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }));
// pa... |
import React from "react";
import {toast} from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import "./Update-plant.css";
import {ApiUrl} from "../Constant";
async function UploadImageFile(formData) {
return fetch(`${ApiUrl}/plants/upload`, {
method: `POST`,
body: formData
... |
import styled from 'styled-components';
import React from 'react';
import PropTypes from 'prop-types';
import { Close as _Close } from '@styled-icons/material/Close';
import { Box, Flex } from '@rebass/grid';
import { FormattedMessage } from 'react-intl';
import StyledLink from '../StyledLink';
import DismissibleMessa... |
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];
}
r... |
/*
MIT License
Copyright (c) 2017 <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, distrib... |
const { Component } = require('react')
const { connect } = require('react-redux')
const PropTypes = require('prop-types')
const { Redirect, withRouter } = require('react-router-dom')
const { compose } = require('recompose')
const h = require('react-hyperscript')
const actions = require('../../actions')
const log = requ... |
const m = require('mithril')
const ApiPage = require('../api/page.p')
const Article = require('../api/article.p')
const pagination = require('../api/pagination')
const Authentication = require('../authentication')
const Newsentry = require('../widgets/newsentry')
const Pages = require('../widgets/pages')
const Page = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.