text stringlengths 3.07k 16k |
|---|
const asyncAuto = require('async/auto');
const {returnResult} = require('asyncjs-util');
const {isLnd} = require('./../../lnd_requests');
const {rpcPaymentAsPayment} = require('./../../lnd_responses');
const {sortBy} = require('./../../arrays');
const defaultLimit = 250;
const {isArray} = Array;
const lastPageFirstIn... |
/*
* Copyright 2015 IBM Corp.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, so... |
import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import GLOBALS from 'codechum-app-globals';
import { ProblemInputList, ProblemInput } from 'components';
import { Text, Code, Card, Span, ButtonLink } from 'components/elements';
import { buttonTypes, textTypes } from 'componen... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("... |
import React from "react";
import Button from "@material-ui/core/Button";
import Dialog from "@material-ui/core/Dialog";
import DialogActions from "@material-ui/core/DialogActions";
import DialogContent from "@material-ui/core/DialogContent";
import DialogTitle from "@material-ui/core/DialogTitle";
import ChildFriendly... |
const t = require('tap')
const { format } = require('tcompare')
const Arborist = require('../../lib/arborist.js')
const { resolve, dirname, relative } = require('path')
const { realpathSync } = require('fs')
const {
fixtures,
roots,
symlinks,
} = require('../fixtures/index.js')
// little helper functions to mak... |
/*
Copyright (c) 2018-present <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, distribut... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.menuItemWrapperStyles = void 0;
var tslib_1 = require("tslib");
var utils_1 = require("../../../../utils");
var MenuItem_1 = require("../../../../components/Menu/MenuItem");
var MenuItemIndicator_1 = require("../../../../components/Men... |
/*
* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
* See LICENSE in the source repository root for complete license information.
*/
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {CompactPeoplePicker} from 'office-ui-fabric-react/lib/Pickers';
im... |
import { connect } from 'react-redux'
import omit from 'lodash/omit'
import clone from 'lodash/clone'
import merge from 'lodash/merge'
import filter from 'lodash/filter'
import { encode } from 'querystring'
import { browserHistory } from 'react-router'
import settings from '../../../lib/settings'
import { setUi } from ... |
let scaleFactor
, storeMemo // the previous state of each row
, mouseDown
const MAX_PIXELS = 30
const PADDING = 30
window.storeMemo = storeMemo
import { setupStore, pixelStore } from './store'
import * as dispatchers from './dispatchers'
import { createSelector } from 'reselect'
import { areSameColor, throttle }... |
import { useState } from 'react';
import PropTypes from 'prop-types';
import { useForm } from 'react-hook-form';
import { yupResolver } from '@hookform/resolvers/yup';
import { FiPlusCircle } from 'react-icons/fi';
import DatalistCities from 'components/datalist-cities';
import DatalistStates from 'components/datalist... |
import * as THREE from 'three';
import View from '../View';
import { GeometryLayer } from '../Layer/Layer';
import Extent from '../Geographic/Extent';
import { processTiledGeometryNode } from '../../Process/TiledNodeProcessing';
import { updateLayeredMaterialNodeImagery } from '../../Process/LayeredMaterialNodeProces... |
import { useState, createRef, useEffect } from "react";
import React from "react";
import "../styles/TGTInput.css";
import { blue } from "@material-ui/core/colors";
import { makeStyles } from "@material-ui/core/styles";
import { config } from "../config";
import {
Fab,
List,
ListItem,
ListItemAvatar,
Avatar,
... |
/* global analytics */
const config = {
/* Your intercom app id */
appId: null,
disableAnonymousTraffic: false,
/* Customize left or right position of messenger */
alignment: undefined,
/* Customize horizontal padding */
horizontalPadding: undefined,
/* Customize vertical padding */
verticalPadding: ... |
const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')
const http = require('http')
const SocketIO = require('socket.io')
const { MongoClient, ObjectId, Db } = require('mongodb')
/**
* @returns {Promise<Db>}
*/
const connectDb = () => new Promise((resolve, reject) =... |
const https = require('https');
const { Relayer } = require("defender-relay-client");
const { ethers } = require("ethers");
const { DefenderRelaySigner, DefenderRelayProvider } = require("defender-relay-client/lib/ethers");
const parseUnits = ethers.utils.parseUnits;
const ADDRESS_ZERO = '0x000000000000000000000000000... |
var keyWords = [
"Collection","Debug","Print","Input","Error","Lock","Unlock","Line Input","Call","Erase","Put","Get","Empty","Step","Wend","While","Until","Let","Null","Each","To","True","False","Like","Is","Mod","Imp","Eqv","On Error","Set","Nothing","Declare","Lib","ByVal","ByRef","Dim","ReDim","Preserve","Const"... |
import React, { useState, useEffect } from "react"
import { Link } from "gatsby"
import { useSpring } from "react-spring"
import styled from "styled-components"
import Layout from "../../components/layout"
import SideNav from "../../components/sideNav"
import devices from "../../utils/devices"
import Cygnus from "../..... |
const helper = require('../../lib/helper');
/**
* Define extended properties and methods on the existing socket (https://nodejs.org/api/net.html#net_class_net_socket) -> "socket.extension" object
* Extra functionalities like: listen for the socket events, manage socket authentication, reconfiguration ...etc.
*/
cl... |
(function($) {
jQuery.fn.extend({
uploadPreview: function(opts,object) {
opts = jQuery.extend({
fileSize: 2*1024*1024,
width: 0,
height: 0,
imgDiv: "#imagePageIcon",
imgType: ["gif", "jpeg", "jpg", "bmp", "png"],
... |
#!/usr/bin/env node
const UglifyJS = require('uglify-js');
const fs = require('fs-extra');
const path = require('path');
const pwd = (...args) => path.resolve(process.cwd(), ...args);
const argv = process.argv.splice(2);
var exec = require('child_process').exec;
let onlyUglifty = false;
let stop = false;
let dirs = [... |
"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
Object.defineProperty(exports, "__esModule", { value: true });
var chlk = req... |
"use strict";
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.hasOwnPrope... |
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
error: function (jqXHR, textStatus, errorThrown) {
switch (jqXHR.status) {
case (500):
Alert({msg: '系统内部错误'});
break;
case (401):
A... |
import React, {useEffect, useState} from "react";
import {useSelector} from "react-redux";
import {useHistory, useLocation} from "react-router-dom";
import qs from "qs";
import moment from "moment";
import http from "../../../http";
import {
Button,
Card,
Checkbox,
Col, Divider,
Form,
message,
... |
import _ from 'underscore';
import FSSync from 'fs';
import OS from 'os';
import Path from 'path';
import Program from './program';
import FSWatcher from './fs-watcher';
const DEFAULT_CONFIG_FILE_NAME_1 = `${__dirname}/../../config.json`;
const DEFAULT_CONFIG_FILE_NAME_2 = `${__dirname}/../../config.js`;
const DEFAUL... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _extends() {
_extends =
Object.assign ||
f... |
import React, {useCallback, useContext, useState} from 'react';
import Overlay from './Overlay';
import ThemeContext from '../../theme/ThemeContext';
import Button from '../Button/Button';
import Text from '../Text/Text';
import Box from '../Box/Box';
import {preventDefaultAndStopPropagation} from '../../util/helpers... |
const modal = require('./modal');
const { Loader } = require('./modules/common-helpers');
require('./user_index');
{
const ajax = new AjaxSet.Resources('users_admin');
ajax.add_collection('sync_zabbix', 'PUT');
function syncZabbix(btn) {
const f = () => {
const reload = () => {
btn.prop('disab... |
import React from "react";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import Fab from "@material-ui/core/Fab";
import GearIcon from "@material-ui/icons/Settings";
import DesktopWindowsIcon from '@material-ui/icons/DesktopWindows';
import KeyboardVoiceIcon from "@material-ui/icons/KeyboardVoice";... |
function del_remark(){
//var drop = $('#drop-remark');
var ind = document.getElementById('drop-remark').selectedIndex;
var selected_remark = document.getElementById('drop-remark').children[ind].text;;
document.getElementById('del-remark').disabled = true;
$.post( "database.php", {del_remark: selected_remark})
... |
import React from 'react'
import ReactDOM from 'react-dom'
import invariant from 'invariant'
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'
import { Provider, connect as _connect } from 'react-redux'
import { createEpicMiddleware, combineEpics } from 'redux-observable'
import { isFunctio... |
//expected topLeft values in the different cs, at the different
//positions the map goes in
let expectedPCRS = [
{ horizontal: -9373489.01871137, vertical: 11303798.154262971 },
{ horizontal: -5059449.140631609, vertical: 10388337.990009308 }];
let expectedGCRS = [
{ horizontal: -128.07848522325827, vertical: -3.... |
"use strict";
/**
* Copyright 2018, OpenCensus 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... |
const os = require("os");
const app_config = {
debug: false,
width: 1280,
height: 768,
minWidth: 1280,
minHeight: 768,
icon: `${__dirname}/../doc/logo.ico`,
main: `file://${__dirname}/index.html`,
log_configure: null,
};
if ("darwin" == os.platform().toLowerCase()) {
app_config.icon =... |
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import db from '../firebase/firebase';
import {
setExpenses,
startSetExpenses,
startAddExpense,
addExpense,
startEditExpense,
editExpense,
removeExpense,
startRemoveExpense
} from './expenseActions';
const uid ... |
let dateRangePicker = $('.date-range-picker');
let dateMask = $('.date-mask');
let timeMask = $('.time-mask');
let week_days = {
1: 'Lunes',
2: 'Martes',
3: 'Miércoles',
4: 'Jueves',
5: 'Viernes',
6: 'Sábado',
7: 'Domingo',
};
// let agentFields = {
// 'name': 'Nombre',
// 'surname':... |
function init() {
d3.json("data/samples.json").then(function (jsonData) {
let data = jsonData;
//getting id, which calls names for the drop-down menu
let dataNames = data.names;
var dropDownMenu = d3.select("#selDataset");
dataNames.forEach(function (name) {
dropDownMenu.append(... |
"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... |
const path = require('path');
const fs = require('fs-extra');
const EventEmitter = require('events');
const appDir = path.join(__dirname, '../app');
const defaultInlineLimit = 1024;
class SiteConfig extends EventEmitter {
constructor() {
super();
this.configPath = null;
this.config = null;
this.watc... |
// jshint maxstatements:false,maxcomplexity:false
const THREE = require('three');
const _ = require('../../../lodash');
const colorMapHelper = require('../../../core/lib/helpers/colorMap');
const { typedArrayToThree } = require('../helpers/Fn');
const { areAllChangesResolve } = require('../helpers/Fn');
const { common... |
'use strict';
var crypto = require('crypto');
var Message = Message || require('./Message');
var RootCerts = require('./common/RootCerts');
var PayPro = require('./common/PayPro');
var asn1 = require('asn1.js');
var rfc3280 = require('asn1.js/rfc/3280');
PayPro.prototype.x509Sign = function(key, returnTrust) {
... |
'use strict';
import execa from 'execa';
import fs from 'fs';
import path from 'path';
import showBanner from 'node-banner';
import {
checkIfConfigFileExists,
fetchProjectConfig,
readFileContent,
} from '../../utils/helpers';
import { validateInstallation } from '../../utils/validate';
/**
* Returns the respe... |
import Token from "./Token";
import TokenType from "./TokenType";
import appDefined from "./appDefined";
class Tokenizer {
constructor(str, args, names) {
this.tokens = [];
this.start = 0;
this.current = 0;
this.line = 1;
this.str = str;
this.args = args;
this.names = names;
}
tokeni... |
import React, { memo, useEffect } from 'react'; // eslint-disable-next-line no-unused-expressions
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { compose } from 'redux';
import {
AppBar, Toolbar,
Backdrop,
CircularProgress,
... |
import Ember from 'ember';
import config from './config/environment';
import googlePageview from './mixins/google-pageview';
var Router = Ember.Router.extend(googlePageview, {
location: config.locationType,
rootURL: config.rootURL
});
Router.map(function() {
this.route('index', { path: '/' });
this.route('se... |
import * as Cesium from 'cesium'
import { defineProperty } from '../Util/defineProperty'
var defaultValue = Cesium.defaultValue
Cesium.defineProperties = Object.defineProperties
Cesium.isArray = Array.isArray
/**
*
* @param {Object}options
* @param {Object}[options.uniforms]
* @param {Object}[options.uniformState... |
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import {
Container,
IconButton,
} from '@material-ui/core'
import CloseIcon from '@material-ui/icons/Close'
import { useSnackbar } from 'notistack'
import { makeStyles } from '@material-ui/core/styles'
import HomeView... |
import React, { Component } from 'react';
import { Text, View } from 'react-native';
import { connect } from 'react-redux';
import { BarCodeScanner, Permissions } from 'expo';
import { Container, Item, Input, Button, Spinner, Label } from 'native-base';
import moment from 'moment';
import DateTimePicker from 'react-nat... |
// select HTML elements
var home = jQuery('#home_section');
var search_jobs = jQuery('#search_jobs');
var find_jobs = jQuery('#find_jobs');
var jobs_button = $('#jobs');
var job_dropdown = $('#select_job');
var search = jQuery('#search_section');
var jobs = jQuery('#jobs_section');
var results = jQuery('#results');
var... |
/*******************************************************************************
* Event fired when changed the year or selecting average data
*/
document.getElementById("select-year").addEventListener("change", function () {
const searchInput = document.getElementById("search-company");
// CALL getCompanyDet... |
import React, { Component } from "react";
import { connect } from "react-redux";
import { getStocks, deleteStock } from "../actions/stockActions";
import { refreshUserData } from "../actions/userActions";
import { startLoading, endLoading } from "../actions/loadingActions";
import { Row, Button, Table, Alert, Containe... |
/* eslint no-underscore-dangle: 0 */
import isClientSide from 'src/isClientSide'
import { filterStandardClaims } from 'src/claims'
/**
* Take a representation of a Firebase user from a maximum of one of:
* the Firebase JS SDK, Firebase admin SDK, or serialized AuthUser instance.
* Return a standardized AuthUser obj... |
import React, { Component, useState } from 'react';
import PayModal from './modal/PayModal';
import cardLogo from '../../../../images/cb.jpg';
import axios from 'axios';
class ProfilePay extends Component {
constructor(props) {
super(props);
this.state = {
updatedatas: [],
... |
'use strict';
var Promise = require('bluebird');
var chrono = require('chrono-node');
var _ = require('lodash');
var github = require('octonode');
var Scheduler = require('redis-scheduler');
// Compatibility to Promises
Promise.promisifyAll(Scheduler.prototype);
_.each(github, function(sub) {
Promise.promisifyAll(su... |
import * as Noise from './lib/noise'
import * as Beats from './lib/beats'
import * as Ambience from './lib/ambience'
import * as Spotify from './lib/spotify'
let port = null
const state = {
view: 'idle',
mode: 'none',
timer: 0,
heartbeat: null,
alarm: null,
paused: true,
volume: 50,
noiseColor: 'brown... |
import React from "react";
import { withRouter } from "react-router-dom";
import { BaseContainer } from "../../helpers/layout";
import styled from "styled-components";
const InstructionsContainer = styled.div`
font-size: 25px;
position: absolute;
left: 85%;
transform: translate(-50%, -50%);
color: rgb(135,... |
// import Undraw from "react-undraw";
import {
Button,
DatePicker,
Form,
Input,
InputNumber,
Radio,
Select,
Col,
Row,
Spin,
} from "antd";
import React, { useState } from "react";
import Undraw from "react-undraw";
import bloodGroups from "../../../data/bloodGroups";
import axios from "axios";
impor... |
const BluePromise = require("bluebird");
const fs = require("fs");
const electron = require("electron");
const { dialog } = electron;
const fs2 = BluePromise.promisifyAll(fs);
const _ = require("lodash");
module.exports = class SaveFile {
constructor(app) {
this.app = app;
// Init empty path and d... |
/* global d3 */
import { SvgOps } from './models/svgOps.js'
import { Mooc } from '../data/mooc.js'
// Header for the HTML body that D3 uses
let wh = 900
let width = wh
let dy = width / 6
let dx = 30
let diagonal = d3.linkHorizontal().x(d => d.y).y(d => d.x)
let margin = ({ top: 10, right: 120, bottom: 10, left: 200 }... |
import React from 'react';
import { StyleSheet, Dimensions,View, ActivityIndicator, Platform,FlatList } from 'react-native';
import { Block, Text, theme } from 'galio-framework';
import { Product } from '../components/';
const { width } = Dimensions.get('screen');
import { TabView, TabBar } from 'react-native-tab-view'... |
// models
import SeqCollection from "./model/SeqCollection";
// globals
import Colorator from "./g/colorscheme";
import Columns from "./g/columns";
import Config from "./g/config";
import Package from "./g/package";
import SelCol from "./g/selection/SelectionCol";
import User from "./g/user";
import Visibility from ".... |
/*
* Copyright (c) 2020, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
var chai = require('chai');
var sinon = require('sinon');
var proxyquire = require('proxyqui... |
const admin = require('firebase-admin');
const unzipper = require('unzipper');
const fs = require('fs');
const os = require('os');
const path = require('path');
const USER_FOLDER_NAME = 'chrome-user';
const TEMP_USER_FOLDER_PATH = path.resolve(os.tmpdir(), USER_FOLDER_NAME);
admin.initializeApp();
const listStorageFi... |
var Shp = require('shp');
var projector = require(__dirname + "/../lib/projector");
var FILTER_BY_EXTENTS = true;
var ShpSource = function(options) {
this._projection = projector.util.cleanProjString(options.projection || "EPSG:4326");
this._path = options.path; // required
this.name = options.name || options.... |
"use strict";
const { versionBump } = require("../../dist/index.js");
const { files, mocks } = require("../utils");
const { expect } = require("chai");
const ORIGINAL_CWD = process.cwd();
describe("versionBup() API", () => {
afterEach("restore the CWD", () => {
// Many of the tests in this file change the CWD,... |
import React, { useState, useCallback, useContext, createContext } from 'react';
import { useAPI, useAPIHandlers, createAPIHook } from 'State/api';
import useErrorHandlers from 'State/error-handlers';
import { getSingleItem, getAllPages } from 'Shared/api';
import { captureException } from 'Utils/sentry';
export cons... |
require('dotenv').config({
path: "../.env"
})
const express = require('express');
const bodyParser = require('body-parser');
const Gremlin = require('gremlin');
const cors = require('cors');
const app = express();
const port = 3001;
//modifications from https://github.com/prabushitha/gremlin-visualizer/issues/10
co... |
const XMIAux = require("./XMIAux.js");
const XMITypes = require("./XMITypes.js");
const XMIAttributes = require("./XMIAttributes.js");
const IRIManager = require("../../managers/IRIManager");
/**
* Genera el XMI correspondiente a una clase UML
*/
class XMIClass {
constructor (shm, xmitype, irim, xmicon, xmienum)... |
/*
**WARRANTY DISCLAIMER.**
* General. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MISTY ROBOTICS PROVIDES THIS SAMPLE SOFTWARE "AS-IS" AND DISCLAIMS ALL WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, QUIET... |
const { VK } = require('vk-io')
const vk = new VK()
const config = require('./config')
const { updates } = vk
const { api } = vk
const request = require('request')
const gm = require('gm').subClass({ imageMagick: true })
const fs = require('fs')
vk.setOptions({
token: config.TOKEN,
pollingGroupId: config.poolingGr... |
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < ... |
var Enumerable = Rx.internals.Enumerable = function () { };
function IsDisposedDisposable(state) {
this._s = state;
this.isDisposed = false;
}
IsDisposedDisposable.prototype.dispose = function () {
if (!this.isDisposed) {
this.isDisposed = true;
this._s.isDisposed = true;
}
};
... |
const readline = require('readline');
var store = require('data-storage-system')('.');
var fs = require('fs');
const fse = require('fs-extra')
const { dirname } = require('path');
const RootFolder = dirname(require.main.filename);
// To copy a folder or file
function copyFile(srcDir, destDir) {
console.log(`Copyin... |
'use strict';
var yeoman = require('yeoman-generator'),
chalk = require('chalk'),
yosay = require('yosay'),
_ = require('lodash'),
mkdirp = require('mkdirp'),
fs = require('fs'),
path = require('path'),
log = require('fancy-log'),
colors = require('ansi-colors');
// 业务逻辑变量
var devDir = ... |
let express = require('express')
let stkPushRouter = express.Router()
let moment = require('moment')
// Lipa Na M-pesa model
let LipaNaMpesa = require('./lipaNaMPesaTnxModel')
let auth = require('../../auth/auth')
let mpesaFunctions = require('../../helpers/mpesaFunctions')
// Then load properties from a designated f... |
import React, {Component} from 'react';
import {
View,
TextInput,
Text,
Animated,
Platform,
TouchableWithoutFeedback
} from 'react-native';
import Style from './InputStyle';
import StyleSheet from 'react-native-stylesheet-xg';
/** RichInput
* @example
* <RichInput label="姓名" value="" placeholder="请输入姓名"... |
import { Vector3 } from 'math-ds';
import MeshSampler from './sample'
import { PointOctree } from "sparse-octree";
let debug = false;
let geodesics = require('mesh-geodesic');
let RBF = require("rbf");
function minimum(v1, v2, n){
let v =[];
for(let i = 0; i < n; i++){
v.push(Math.min(v1[i], v2[i]))
... |
$(document).ready(function() {
//背景粒子效果
$('.main-container').particleground({
dotColor : '#5cbdaa',
lineColor : '#5cbdaa'
});
$('.main-content').css({
'margin-top' : -($('.main-content').height())
});
//刷新验证码
$('#kaptchaImage').click(function() {//生成验证... |
var cv = require('./opencv.js');
var jpeg = require('jpeg-js');
var fs = require('fs');
setup_calibration = function(
board_width,
board_height,
num_imgs,
square_size,
imgs_directory,
imgs_filename,
extension ) {
var board_size = new cv.Size(board_width, board_height),
board_n = board_width... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import _ from 'lodash';
import * as fetchActions from '../../../../foundation/redux/globals/DataTransactions/actions';
import SmallSectionError from '../../../../content/components/Errors/smallSection';
import Loadin... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
var _objectWithoutProperties3 = _in... |
const uuid = require("uuid");
const CryptoJS = require('crypto-js')
const AccessKey = "Web";
const AccessToken = uuid.v1();
console.log("请求Key", AccessKey);
console.log("请求Secret", AccessToken);
function getJsonFromUrl(url) {
var question = url.indexOf("?");
var hash = url.indexOf("#");
if (hash == -1 &... |
// JavaScript by <NAME>
// http://www.aphayes.pwp.blueyonder.co.uk/
// Copyright 2001-2008
// This code is made freely available but please keep this notice.
// I accept no liability for any errors in my coding but please
// let me know of any errors you find. My address is on my home page.
// Utility functions
// da... |
const Album = require('../db/models/albums')
const router = require('express').Router()
const {Storage} = require('@google-cloud/storage');
const multer = require('multer')
module.exports = router
const gcs = new Storage({
projectId: process.env.GOOGLE_CLOUD_PROJECT,
keyFilename: './KEY.JSON'
});
const bucketName... |
import React from 'react';
import { Link } from 'react-router';
import APPCONFIG from 'constants/Config';
import QueueAnim from 'rc-queue-anim';
import {List, ListItem} from 'material-ui/List'
import TextField from 'material-ui/TextField'
import RaisedButton from 'material-ui/RaisedButton'
import ContentSend from 'm... |
const openSerialOfLidar = () => {
const serialOption = {
//baudRate: 115200,
//baudRate: 158700,
baudRate: 153600,
databits:8,
stopbits:1,
parity:'none',
buffersize:32
};
openSerialDevice(serialOption);
}
//const LidarPackSeperator = 'aa552828';
const LidarPackSeper... |
const util = require('../util');
const ptToFixedBitrateAudioCodecName = {
0: 'PCMU',
8: 'PCMA'
};
const defaultOpusId = 111;
const BITRATE_MAX = 510000;
const BITRATE_MIN = 6000;
function getPreferredCodecInfo(sdp) {
const [, codecId, codecName] = /a=rtpmap:(\d+) (\S+)/m.exec(sdp) || [null, '', ''];
const re... |
var _ = require('lodash');
var async = require('async');
var NodeRunner = require('../src/RunWrappers/Node');
var DockerRunner = require('../src/RunWrappers/Docker');
var mkdirp = require('mkdirp');
var runningServices = [];
var notRunningServices = [];
module.exports = {
name: 'run',
description: 'Runs all of... |
import React, { Component } from 'react';
import { List } from 'immutable';
import PropTypes from 'prop-types';
import styles from './_learner-statistics.scss';
import classNames from 'classnames/bind';
import Select from 'react-select';
import StatHorizontalBarGraph from 'base/components/stat-graphs/stat-bar-graph/Sta... |
var modal = document.getElementById('myModal');
var modalImg = document.getElementById("img01");
var xmlhttp = new XMLHttpRequest();
var xmlhttpRefresh = new XMLHttpRequest();
var cntPhotos = 0;
var latestImageName = '';
var currentState = '';
var newState = '';
var lastCountdownStart = 0;
var tCal = 0;
xmlhttp.onr... |
'use strict'
//----------------
// Includes: Self
//----------------
const color = require('./color.js')
const shared = require('./2 - shared.js')
const config = require('./3 - config.js')
const functions = require('./4 - functions.js')
//----------
// Includes
//----------
const path = require('path') // ~... |
const os = require('os')
const {execSync} = require('child_process')
const fs = require('fs')
const path = require('path')
const https = require('https')
const git = require('git-rev-sync')
const calver = require('calver')
function initGitFlow() {
try {
git.remoteUrl()
} catch (e) {
return;
}
execSync... |
const express = require('express')
const boom = require('boom')
const multer = require('multer')
const fs = require('fs')
const { UPLOAD_PATH,CODE_SUCCESS } = require('../../utils/constant')
const Result = require('../../models/Result')
const articleService = require('../../services/article')
const router = ... |
const searchTerm = new URL(location.href).searchParams.get("search");
let lunrIndex,
$results,
pagesIndex;
// Initialize lunrjs using our generated index file
function initLunr() {
var request = new XMLHttpRequest();
request.open('GET', '/ehs-data-portal-frontend-temp/js/lunr/PagesIndex.json', true);
requ... |
/**
* author:yangbobin
* date:2017-5-18
* desc:批量安装客户端页面
*/
Ext.define("websure.backup.view.InstallBackupClient", {
extend : 'Ext.window.Window',
title : '客户端安装',
draggable : false,
width:400,
height:600,
closable : true,
id : 'installBackupClient',
modal : true,
resizable : fals... |
import React from 'react'
import Spin from '../spin/index'
import {Select} from 'antd'
const Option = Select.Option
export default class LazySelect extends React.Component{
constructor(props) {
super(props)
this.state = {
scrollTop: 0,
rowHeight: props.rowHeight |... |
import { Row, Col, Card, Input, Button, message } from 'antd';
import { Link, NavLink } from 'react-router-dom';
import { useState } from 'react';
import ShareOnSocial from '../../assets/share.png';
import { ethers } from 'ethers';
import {Helmet} from "react-helmet";
import { ReactComponent as Facebook } from '../../... |
import React,{ Fragment, Component} from "react";
//import * as React from "react";
import { userActions } from '../../_actions';
import { connect } from 'react-redux';
import config from 'config';
import { Redirect } from 'react-router-dom';
//import { StackNavigator } from 'react-navigation';
//import { useNavig... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.