text stringlengths 3.07k 16k |
|---|
// 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 { User, Street } = require('../../db/models')
const { ERRORS } = require('../../../lib/util')
const logger = require('../../../lib/logger.js')()
function handleErrors (error, res) {
switch (error) {
case ERRORS.USER_NOT_FOUND:
res.status(404).json({ status: 404, msg: 'Creator not found.' })
bre... |
const { ipcRenderer,shell } = require( 'electron' )
const { getGlobal } = require('electron').remote
const Track = getGlobal('TrackEvent')
const User = getGlobal('User')
const UiBuilder = require('./lib/ui-builder.js')
const Toast = require('./lib/toast.js')
const uuid = require('uuid')
const appVersion = require('elec... |
// <NAME> <<EMAIL>>
"use strict";
// modules
const assert = require('../assert.js');
// constants
let cmID = 0;
function ContextMenu(menu, options){
this.id = cmID++;
this.menu = menu || [];
this.container = null;
this.options = options || {};
this.contextTarget = null;
this.closeCallback = () => {
t... |
/*
RIFE model downloaded from here: https://github.com/nihui/rife-ncnn-vulkan
make sure executable (and all other files) are extracted into the same folder as this .js file
*/
'use strict';
const path = require('path');
const fs = require('fs');
const rimraf = require('rimraf');
const progress = require('cli-p... |
const deepEql = require("deep-eql");
module.exports = expand;
expand.contract = contract;
function prefixName(prefix) {
if (!prefix || prefix.length === 0) return "root";
return prefix.join('.');
}
const Expanders = {
object(value, schema, prefix) {
// if this is an element block expand each key
if (schema.e... |
import {APPEND, PREPEND} from "./consts";
function isVisible(group, {threshold, scrollPos, endScrollPos}) {
const start = group.outlines.start;
const end = group.outlines.end;
if (start.legnth === 0 || end.length === 0 || !group.items.length || !group.items[0].el) {
return 2;
}
const min = Math.min(...start);
... |
import React from "react"
import Layout from "../component/layout"
import SEO from "../component/seo"
import useContentfulImage from "../utils/useContentfulImage"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import { faClock,faFolderOpen } from "@fortawesome/free-regular-svg-icons"
import { faChevro... |
import React from 'react';
import { Icon, Modal, Button, Header, Popup } from 'semantic-ui-react';
import { AutoSizer, Column, Table } from 'react-virtualized';
import { APM_REQ, APM_DEFAULT } from '../lib/metrics';
import { rowRenderer } from './row-renderer';
import { nrdbQuery } from '../lib/utils';
import { navig... |
const DISCOVERY_DOCS = ["https://sheets.googleapis.com/$discovery/rest?version=v4"];
class Flash {
async getOptions() {
return new Promise((resolve, reject) => {
chrome.storage.sync.get({
spreadsheetId: '',
interval: 60 * 15
}, function (items) {
resolve(items)
});
... |
var words = ["Create.", "View.", "Update.", "Remove.", "All it takes is a click!"];
var counter = 0;
setTimeout(display_word, 3000);
$(document).ready(function () {
// logContainer holds all of our items
var logContainer = $("#log-container");
var itemLocationSelect = $("#location");
var itemFilterSelect = $... |
/**
* @fileOverview This file defines the Matrix class.
* @author <NAME></a>
*/
var Vector = require('./geometry/vector');
var Vector3 = require('./geometry/vector3');
module.exports = (function(){
'use strict';
/**
* Creates a new Matrix object
* @class
* @param {number} a element [0][0]
* @param {number} b ... |
import { Button } from 'components/ui/Button';
import React, { useEffect, useState } from 'react';
import SocketConnection from 'helpers/socketConnection';
import FloForm from 'components/ui/FloForm';
import socket from 'helpers/socketConnection'
const SOCKET_URL = 'http://localhost:8080/gs-guide-websocket';
const We... |
import delay from './delay';
// This file mocks a web API by working with the hard-coded data below.
// It uses setTimeout to simulate the delay of an AJAX call.
// All calls return promises.
const cars = [
{
title: 'A8Audi',
cid: 3426412,
desc: 'One thrilling vehicle combining the purist charm ... |
import React, {useEffect, useState} from 'react';
import PropTypes from 'prop-types';
import { uniq } from 'lodash';
import { Link, graphql, StaticQuery } from 'gatsby';
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
import PreviewCompatibleImage from '../PreviewCompatibleImage';
import Icon from '../Icon';... |
import { BehaviorSubject, pipe } from "rxjs";
import { scan, shareReplay, map, distinctUntilChanged, filter } from "rxjs/operators";
/**
* Add a state holder manager to a class
* Can be a simple state holder using the function `createBasicState` to create an instance of the stateHolder. You can also extend a class to... |
/*
* Copyright 2008-2016 <NAME>. All Rights Reserved.
*/
/* global ChromeWorker, log, parse_exception, createIPAddress */
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("chrome://sixornot/content/logger.jsm");
Components.utils.import("chrome://sixornot/content/ipaddress.jsm")... |
import React, {useEffect, useRef, useState} from 'react';
import {
Grid,
Card,
CardContent,
Typography,
makeStyles,
MenuItem,
TablePagination,
Table,
TableBody, TableRow, TableCell, TableHead, Hidden
} from "@material-ui/core";
import Title from "../../components/Title";
import Admin... |
import XRegExp from 'xregexp';
const hashtagMatcher = XRegExp(`(#((?:[\\pL\\pN][\\pM\\u200C\\u200D]*)+(?:[\\p{Pc}\\p{Pd}](?:[\\pL\\pN][\\pM\\u200C\\u200D]*)+)*))`);
export function buildTagMarker(text) {
let marks = [];
XRegExp.forEach(text, hashtagMatcher, match => {
let node = document.createElement... |
let request, response
request = require('async-request')
const Discord = require('discord.js')
module.exports = {
name: 'link',
description: 'link a minecraft account with Discord',
async execute (message, args) {
const client = message.client
let member, ign, adminlink
// Admin linking
if (messa... |
import { useEffect, useRef, useState } from "react";
import VideocamIcon from "@material-ui/icons/Videocam";
import VideocamOffIcon from "@material-ui/icons/VideocamOff";
import MicIcon from "@material-ui/icons/Mic";
import MicOffIcon from "@material-ui/icons/MicOff";
import { makeStyles, useTheme } from "@material-ui/... |
function openWindow(url, width, height) {
var callback = function() {
window.location.reload(true);
};
if (window.microsoftTeams) {
microsoftTeams.initialize();
microsoftTeams.authentication.authenticate({
url: url,
width: width,
height: height,
successCallback: callback,
failureCallback: callba... |
import React from "react";
import classNames from "classnames";
import omit from "lodash.omit";
import { getTarget } from "../utils";
import { TIMEOUT, EVENTS } from "../constants";
import PopperManager from "../../utils/PopperManager";
/**
* Tooltips are powerful components powered behind the scenes by Popper.js t... |
class Form extends React.Component {
constructor(props) {
super(props);
this.state = {};
this.props.tags.forEach((tag) => {
if (tag.tag === 'input') {
if (tag.type === 'radio') {
} else {
Object.assign(this.state, { [tag.id || tag.name]: tag.valu... |
var game = new Phaser.Game(685,700, Phaser.AUTO, '', {preload: preload, create:create, update:update, render:render});
var upBody, downBody, leftBody, rightBody;
var hitboxArr = [], humanArr = [], gameTextArr = [];
var ghostX, ghostY;
var scoreText, levelText, loseText, winText, countdownText;
var score = 0, currentLev... |
var inherit = require('./inherit');
var feature = require('./feature');
/**
* Object specification for a graph feature.
*
* @typedef {geo.feature.spec} geo.graphFeature.spec
* @extends geo.feature.spec
* @property {geo.graphFeature.styleSpec} [style] Style object with default
* style options.
*/
/**
* Style... |
"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... |
var Point = (x, y) => {
return {
x: x,
y: y,
s: undefined
};
};
var Segment = (p1, p2) => {
return {
p1: p1,
p2: p2
};
};
class Map {
constructor() {
this._points = [];
this._segments = [];
this._state = {
isDrawing: undefined
};
}
_less(a, b) {
return (a ... |
// Set constraints for the video stream
var constraints = { video: { facingMode: "user" }, audio: false };
var track = null;
// Define constants
const cameraView = document.querySelector("#camera--view"),
cameraOutput = document.querySelector("#camera--output"),
cameraSensor = document.querySelector("#camera--... |
import {JStick} from '../jstick.js';
// initiate variables : canvas ref, offsets, scale...
let TARGET_ZOOM = false ; /* {
x : 0,
y : 0,
level : 0
}
*/
let TARGET_SCROLL = false; /*{
x : 0,
y : 0
}
*/
JStick.Viewport = {
width : document.getElementById('map').width,
... |
// src/components/Survey.js
// Import react
import React, { Component } from 'react';
import PropTypes from 'prop-types'
import {integratedBackend} from './backend'
import SurveyQuestions from './SurveyQuestion'
class Survey extends Component {
constructor() {
super();
this.state = {
i... |
// If at any point you want to force pages that use this ServiceWorker to start using a fresh
// cache, then increment the9CACHE_VERSION value. It will kick off the ServiceWorker update
// flow and the old cache will be purged as part of the activate event handler when the
// updated ServiceWorker is activated
var CA... |
const BASE_UPLOAD_URL = process.env.NODE_ENV === 'production' ? '/' : '/api'
// ------------运单-----------------------
// 订单列表
export const URL_ORDERS = '/order/orders'
export const URL_ORDERS_IMPORT = `/todays/waybill/import`
// 面单
export const URL_ORDERS_WAYBILL = `/todays/waybill`
// export const URL_ORDERS = '/o... |
/*
HTML5 Track
wrapper for html5 media element
*/
var u = require('./utils')
var events = require('./events')
var detect = require('./detect')
var debug = require('./debug');
var HTML5Track = function(name, opts, mix) {
var track = this;
var defaults = {
source: false, // path to audio sou... |
//
// Copyright 2018 - 2021 The RIFFLib Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE.md file.
//
//
// Imports.
//
// Imported modules.
const RiMdChunk =
require("./chunk");
const RiMdFourCC =
require("./fourcc");
const ... |
#!/usr/bin/env node
var fs = require('fs')
var http = require('http')
var https = require('https')
module.exports = linkifyVerses
linkifyVerses._normalize = normalize // for testing
if (require.main === module) {
// called from cmd line
// https://nodejs.org/docs/latest/api/all.html#modules_accessing_the_main_mo... |
// color and alpha
var seedColor = '#111111';
var seedColorTwo = '#111111';
var seedColorThree = '#111111';
var seedColorFour = '#111111';
var bgColor = ['#111111'];
// inital number of seeds
var seeds = 300;
// angle (phi)
var angle = 90
// radius of the seed
var b1 = 100;
var b2 = 10;
var b3 = 10;
var b4 = 100;
v... |
// For info about this file refer to webpack and webpack-hot-middleware documentation
// For info on how we're generating bundles with hashed filenames for cache busting: https://medium.com/@okonetchnikov/long-term-caching-of-static-assets-with-webpack-1ecb139adb95#.w99i89nsz
import webpack from 'webpack';
import Extra... |
import {setStoreState} from "components/core/App";
import {_debug, diffObject, locationHash} from "../../functions/common";
import IApp from 'shared/BD/IApp';
import {postRemote} from "../../functions/network";
import qs from "querystring";
import BDApp from "../BDApp";
import config from "config";
import StorageHelper... |
/**
* @Overview
*
* @Author: <NAME>
* @Date: 2016-08-20 16:13:07
* @Last Modified time: 2016-08-22 18:07:39
*/
'use strict';
require('modulesLoader');
const Datastore = require('nedb'),
fs = require('fs'),
path = require('path'),
utils = include('service!utils'),
Result = include('service!Result'),
... |
const {BX_SetLogLevel, BLOG_LEVEL_WARN, BLOG_LEVEL_ERROR} = require('../../base/base');
const SuperNode = require('../../client/Peer/super_node');
const MinerNode = require('../../client/Peer/miner_node');
const BrowserNode = require('../../client/Peer/browser_node');
const P2P = require('../../p2p/p2p');
const SuperNo... |
'use strict';
var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
var _request = require('request');
var _request2 = _interopRequireDefault(_request);
var _mkdirp = require('mkdirp');
var _mkdirp2 = _interopRequireDefault(_mkdirp);
var _index = require('./index.js');
var _index2 = _interopRequireDe... |
const axios = require("axios");
const NetlifyAPI = require("netlify");
require("dotenv").config();
const sourceCalendlyNodes = async (createNode, createContentDigest, createNodeId) => {
const EVENT_NODE_TYPE = `ScheduledEvent`;
const EVENT_TYPE_NODE_TYPE = `EventType`;
const headers = {
"Content-Type": "app... |
import React, { useEffect, useState } from "react";
import { useSelector, useDispatch } from "react-redux";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faSquare } from "@fortawesome/free-solid-svg-icons";
import { Spring } from "react-spring/renderprops";
import "../ConsentForm.css";
impo... |
import EventBus from './event-bus'
import i18n from './i18n'
import isNaN from 'lodash-es/isNaN'
import isUndefined from 'lodash-es/isUndefined'
import toString from 'lodash-es/toString'
import fetch from 'isomorphic-fetch'
import rootStore from '../'
import config from './config'
import { adjustMultistoreApiUrl } from... |
'use strict';
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
let ids = 1;
let userId = 0;
function myFunction() {
document.getElementById('myDropdown').classList.toggle('show');
}
window.addEventListener('click', function (e) {
let s = e.target.id;
if (s !== 'blo... |
const importer = require('./lib/importer.js')
const debug = require('@ff0000-ad-tech/debug')
var log = debug('wp-plugin-payload')
const pluginName = 'FAT Payload Plugin'
function WpPluginPayload(scope, DM, options) {
this.scope = scope
this.DM = DM
this.options = options
/* TODO: Document options
{
settin... |
import { red } from "@material-ui/core/colors"
import { createMuiTheme, responsiveFontSizes } from "@material-ui/core/styles"
import { width } from "@material-ui/system"
// ----------- Theme Variables --------------
const siteContainerMaxWidth = "xl"
const siteBackground = ""
const siteBackgroundImage = ""
// ------... |
/*global kakao*/
import React, { useEffect, useState } from 'react';
import axios from 'axios';
import XMLParser from 'react-xml-parser';
import { useLocation, Link } from 'react-router-dom';
import { saveAs } from 'file-saver';
function Gpx() {
const location = useLocation();
const courseName = location.state.cou... |
const userModel = require('../models/users');
const axios = require('axios');
const qs = require('querystring');
const appConfig = require('../../../config/appConfig');
const clientId = appConfig.clientID;
const clientSecret = appConfig.clientSecret;
const encString = Buffer.from(`${clientId}:${clientSecret}`).toString... |
const ffmpeg = require('fluent-ffmpeg');
const ytdl = require('ytdl-core');
const moment = require('moment');
const fs = require('fs');
const request = require('request');
const soundcloud = require('../../struct/soundcloud');
const Music = require('../../struct/Music');
const { timeString } = require('../../struct/Ut... |
//================================================================
// RS_ArabicNameEdit.js
// ---------------------------------------------------------------
// The MIT License
// Copyright (c) 2020 biud436
// ---------------------------------------------------------------
// Free for commercial and non commercial use.... |
//theme changer, dawg
function supports_html5_storage() {
try {
return 'localStorage' in window && window['localStorage'] !== null;
} catch (e) {
return false;
}
}
function set_theme(theme) {
$('link[title="theme"]').attr('href', theme);
if (supports_html5_storage()) {
localStorage.theme = theme;
}
}
funct... |
import React, {useState, useEffect, Fragment} from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import moment from 'moment';
import { makeStyles } from '@material-ui/styles';
import {axiosInstance,axiosInstanceImage} from '../../../../common/ApiService'
//import uploader from 'base64-image-up... |
window.addEventListener("load", main, false);
var config = null;
var canvasTag, ctx;
var canvasX, canvasY, canvasStyleWidth, canvasStyleHeight, marginLeft = 0, marginTop = 0;
var particleW, particleH;
var isFirefox = true, mobile = false;
var prefaceTxt;
var prefaceIndex = 0;
var showList = new Array();
var posi... |
import React from 'react';
import { SketchPicker } from 'react-color';
import { withStyles } from '@material-ui/core/styles';
import {
Grid,
ClickAwayListener,
Switch,
FormControlLabel
} from '@material-ui/core';
import { ToggleButton, ToggleButtonGroup } from '@material-ui/lab';
import CoreNumber from '../Core... |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import {
Button,
Container,
Divider,
Grid,
Header,
Icon,
Image,
List,
Menu,
Responsive,
Segment,
Sidebar,
Visibility,
} from 'semantic-ui-react';
/* eslint-disable react/no-multi-comp */
/* Heads up! HomepageHeading... |
import React from 'react';
import { Col, Badge, ButtonGroup, Button, Collapse } from 'reactstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTachometerAlt, faUserTie, faCalendarAlt, faEnvelope, faTasks, faCog, faEdit, faComments, faStickyNote } from '@fortawesome/free-solid-svg-icons'... |
'use strict';
/** @namespace DevKit */
var DevKit;
(function (DevKit) {
'use strict';
DevKit.SocialInsightsConfigurationApi = function (e) {
var EMPTY_STRING = '';
var f = '@OData.Community.Display.V1.FormattedValue';
function webApiField(entity, logicalName, schemaName, entityLogicalCollectionName, enti... |
export { launchRadarsManagementConfigurator , starterTemplate}
import { getViewpoint, getData, getState, publishRefreshRadar } from './data.js';
import { unselectAllTabs,uuidv4, capitalize, getPropertyFromPropertyPath, populateFontsList, createAndPopulateDataListFromBlipProperties, undefinedToDefined, getAllKeysMappedT... |
/*
* Copyright 2010 Comcast Cable Communications Management, 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... |
import React, { useEffect, useState } from 'react';
import { CartReceiptView } from '../../CartReceiptView';
import Counter from './../components/Counter';
import { SvgDelete } from '@pratapdd/microfe-ui-components';
import { useHistory } from 'react-router-dom';
import { usePlaceOrderMutation } from '../../../schema.... |
/* eslint-disable */
const colors = require("colors/safe.js");
const Multiprogress = require("multi-progress");
const groupByFile = xs => {
return xs.reduce(function (rv, x) {
const arr = (rv[x.fileName] = rv[x.fileName] || []);
delete x.fileName;
arr.push(x);
return rv;
}, {});
};
const TICK = "✔... |
import React, { Component } from 'react'
import { LatLng } from 'leaflet'
import styled from 'styled-components'
import { LunchMap } from 'Components/LunchMap'
import { SearchBar } from 'Components/SearchBar/SearchBar'
import { SearchService } from 'Services/SearchService/searchService'
import { DistrictService } from... |
/**
* Copyright (c) 2020 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish,... |
var _ = require('lodash');
var util = require('util');
var interpolate = require('interpolate');
var EventEmitter = require('events').EventEmitter;
var Promise = require('bluebird');
var path = require('path');
var fs = require('fs');
var fse = require('fs-extra');
var ProcessWrapper = require('./process-wrapper');
va... |
import React, { useContext } from 'react';
import styled from 'styled-components';
import theme from '../../../theme';
import range from '../../../helpers/range';
import Slot from './Slot';
import TournamentContext from './Context';
import Scrollbars from 'react-custom-scrollbars';
import Rainbow from '../../../image/R... |
/**
* Created by vincent on 2015/1/1.
*/
requirejs(['jquery', 'async'],
function () {
requirejs(['async!http://api.map.baidu.com/api?v=2.0&ak=1L5aqpafGW6Yu76pMGEaRCuq&callback=init'],
function () {
map = new BMap.Map("allmap", {mapType: BMAP_HYBRID_MAP}); // 创建Map实例
... |
const express = require("express");
const router = express.Router();
const db = require("../db/MongoUtils");
const jwt = require("jsonwebtoken");
/* GET all posts. */
router.get("/", function (req, res) {
db.getDocumentsPromise("application", "posts")
.then(docs => res.json(docs));
});
router.get("/:id", ... |
import React, { Component } from 'react';
import { CanvasPainter, MouseHandler } from "../common/CanvasPainter";
class PieceOfDust {
constructor(x, y) {
this._x = x;
this._y = y;
}
x() {
return this._x;
}
y() {
return this._y;
}
paint(painter) {
paint... |
const express = require('express');
const socket = require('socket.io');
const {drawGame} = require('./drawGame');
//require('dotenv').config(); // todo: remove in production
const app = express(); // init server
const server = app.listen(process.env.PORT || 3000 ); // run server
const io = socket(server); // in... |
'use strict';
class Notify {
/**
* Generic constructor
* @param options
* @param type
*/
constructor(options = {}, type = 'primary') {
if (typeof options.title !== 'undefined' && typeof options.message !== 'undefined') {
// Types of alerts
let types = ['prima... |
import * as glmatrix from 'gl-matrix'
import Light from './Light'
import LIGHT_TYPES from './LightTypes'
const tmpMat4 = glmatrix.mat4.create()
const tmpVec3 = glmatrix.vec3.create()
const tmpVec3_2 = glmatrix.vec3.create()
class PointLight extends Light {
constructor() {
super()
this._type = LIGHT_TYPES.PO... |
import * as React from "react";
import * as Logging from "~/common/logging";
export const useMounted = () => {
const isMounted = React.useRef(true);
React.useLayoutEffect(() => {
return () => {
isMounted.current = false;
};
}, []);
return isMounted.current;
};
/** NOTE(amine):
* useForm handles... |
import React, {useMemo, useState} from 'react'
import {
ActivityIndicator,
ImageBackground,
StyleSheet,
Text,
TouchableOpacity,
View
} from 'react-native'
import Icon from '../icons/Icon'
import {Styles} from '../mixins'
import {UtilColor} from '../utils'
const Component = ({
title,
source,
size = 32,
titleS... |
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { injectIntl } from 'react-intl';
import { HtmlTableView } from './HtmlTableView';
import { getRunInfo } from '../reducers/Reducers';
import { getLatestMetrics, getMinMetrics, getMaxMetrics } from ... |
/* global __dirname, require */
/**
* This file is where you define your application routes and controllers.
*
* Start by including the middleware you want to run for every request;
* you can attach middleware to the pre('routes') and pre('render') events.
*
* For simplicity, the default setup for route controlle... |
import React,{Component} from 'react';
import ReactDOM from 'react-dom'
import ImageFigure from './ImageFigure'
import ControllerUnit from './ControllerUnit'
import images from '../data/imageDatas';
import '../css/grllery.scss';
let imageDatas = (function genImageURL(imageDataArr){
for (let i = 0, count = imageDat... |
/*
* File: barbellweights.js
* Project: barbell weight calculator
* Date: April 2017
*
* Author: <NAME>
*
* Description: For the given lift and working weight, it calculates the number of sets, warmup weights
* and the plates needed for each set.
*
* T... |
$(document).ready(function() {
// highlight query in the results
// Highlighting here ensures we don't introduce unsafe characters.
// This is not ideal and should be replaced with a template
// function in Go as this will break if javascript is disabled.
var highlight = function(value){
var q = String($... |
import React from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import PropTypes from 'prop-types';
import * as moneyTransferActions from "./moneyTransferActions";
import Loading from "../../components/common/Loading";
import {CHANNEL, NO_AVATAR} from "../../constants/env";
imp... |
'use strict';
const EventEmitter = require('events').EventEmitter;
const Channel = require('../channel');
const log = require('../logger');
/**
* Represents channels collection
* {@see Channel}
*/
class Channels extends EventEmitter {
constructor(services) {
super();
Object.defineProperties(this, {
... |
/**
* Stopped search because there are no new options anymore
* @type {number}
*/
const NOT_POSSIBLE = 0;
/**
* Stopped search because the time limit was reached
* @type {number}
*/
const TIME_LIMIT = 1;
/**
* Stopped search because the depth limit was reached
* @type {number}
*/
const DEPTH_LIMIT = 2;
/**
*... |
import vm from 'vm';
import path from 'path';
import _ from 'lodash';
import inlineSource from 'inline-source';
import config from './lib/config';
import ChildCompiler from './lib/childCompiler';
let globalReference = {}, globalNameMap = {}, count = 0;
class InlineResourcePlugin {
constructor(options) {
th... |
$("#registro-button").on("click", () => {
let nombres = $("#nombres").val().trim();
let correo = $("#correo").val().trim();
let apellidos = $("#apellidos").val().trim();
let fechaNacimiento = $("#fechaNacimiento").val();
let contrasena = $("#contrasena").val().trim();
let telefono = parseInt($... |
'use strict';
const store = new Vuex.Store({
state: {
tweenedNumber: 0,
color: {
red: 0,
green: 0,
blue: 0,
alpha: 1
}
},
mutations: {
newTweened: (state, payload) => {
TweenLite.to(state, 0.5, { tweenedNumber: payload.tweened });
},
newColor: (state, payload... |
const controller = require('./reviews');
const async = require('async');
const google = require('googleapis');
var playScraper = require('google-play-scraper');
exports.run = function (config, callback) {
var appInformation = {};
var scrape = playScraper.app({appId: config.appId})
var timeout = new Promis... |
import { $confirm } from './dialog.js'
function fetch(params) {
const token = wx.getStorageSync('token') || ''
if (params.loadingText) {
wx.showLoading({
title: params.loadingText,
})
}
return new Promise((resolve, reject) => {
// 域名处理
let sendUrl = params.url
... |
const EntityService = require('./EntityService');
const ModelClass = require('../models/Models').Donator;
const DB = require("../orms/bookshelf");
const logger = require('./LogService').sync;
const restLogger = require('./LogService').sync;
class DonatorService extends EntityService {
constructor(modelClass) {
... |
import React, {useEffect, useState} from 'react';
import axios from 'axios'
import Navbar from "../components/navbar/Navbar";
import {Redirect, useParams, useHistory} from 'react-router-dom'
import QuizInfoDialog from "../components/Quiz/QuizInfoDialog";
import QuizTime from "../components/Quiz/QuizTime";
import Quiz... |
const re = require( './re' );
const ribbon = require( './ribbon' );
re.pattern.html_id = '[a-zA-Z][a-zA-Z\\d:]*';
re.pattern.html_attr = '(?:"[^"]+"|\'[^\']+\'|[^>\\s]+)';
const reAttr = re.compile( /^\s*([^=\s]+)(?:\s*=\s*("[^"]+"|'[^']+'|[^>\s]+))?/ );
const reComment = re.compile( /^<!--(.+?)-->/, 's' );
const reE... |
'use strict';
const express = require('express');
const patientRoute = express.Router();
const db = require('../models/user');
const moment = require('moment');
// Routes
patientRoute.post('/visit', selfVisitHandler);
patientRoute.post('/appointment/search', appointmentSearchHandler);
patientRoute.post('/appointment/s... |
var randomBytes = require('randombytes');
var crypto = require('crypto');
var Buffer = require('safe-buffer').Buffer;
var scryptsy = require('scrypt.js');
var ethUtil = require('ethereumjs-util');
var uuidv4 = require('uuid/v4');
var TenderKeys =require('tendermintelectronkey')
const createKeccakHash = require('keccak... |
'use strict';
var _ = require('underscore');
var PLUGIN_NAME = 'SORT_ME';
var PLUGIN_API = require('../../pluginAPI');
//var idSession = '';
function App(idSession, plugins) {
this.idSession = idSession;
var wordList1 = {};
var wordList2 = {};
var wordStatus = {};
var isComplete = false;
this.pluginStud... |
// inspect.js
// Make anything printable
// © 2011 <NAME> <<EMAIL>> MIT License
var inspectproperties = require('./inspectproperties')
var escapechar = require('./escapechar')
var errorutil = require('./errorutil')
;[inspect, inspectAll, inspectDeep]
.forEach(function (f) {exports[f.name] = f})
/*
in 15.5.4.14 is e... |
const {
asNumber,
asString,
create,
has,
isArray,
isObject,
parseAsEsm,
parseAsJson,
parseAsMarkdown,
parseAsYaml
} = require('./util');
const { pathToRegexp } = require('path-to-regexp');
const { Endpoints } = require('./endpoint');
/* constants
/* ===========================================================... |
import randomInt from 'random-int';
import assetsManager from '../managers/assetsManager';
import screensManager from '../managers/screensManager';
import serverManager from '../managers/serverManager';
import dataManager from '../managers/dataManager';
import Gui from '../display/Gui';
import Btn from '../display/Btn'... |
import React from 'react';
import { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import makeStyles from '@mui/styles/makeStyles';
import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
import TableContainer ... |
/*
* Copyright (c) 2019-2020 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the abov... |
import axios from 'axios';
import history from '../history';
// CONSTANTS:
const I_T = process.env.IEX_TOK;
const INV_SYM = 'Invalid ticker symbol';
const INV_QTY = 'Invalid quantity. Must be a postive integer.';
const GET_FUNDS_ERR = 'Internal error. Try again.';
const DEL_ERR = 'Cannot afford that much stock of tha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.