text stringlengths 3.22k 29.5k |
|---|
// 'use strict';
// // application dependencies
// const express = require('express');
// const pg = require('pg');
// const superagent = require('superagent');
// const methodoverride = require('method-override');
// // enviromental variables
// require('dotenv').config();
// const PORT = process.env.PORT;
// const ... |
const mongoose = require("mongoose");
const { Guild } = require("../models/index");
const { MessageEmbed } = require("discord.js");
module.exports = (client) => {
//////////////////////////
// Guild DB Function
//////////////////////////
client.createGuild = async (guild) => {
const merged = Object.assign... |
const UserModel = require('../models/user.model');
const PlantModel = require('../models/plants.model').PlantModel;
const BouquetModel = require('../models/bouquet.model').BouquetModel;
const ShopModel = require("../models/shop.model");
const Mongoose = require('mongoose');
const Cart = {
async getUserCart(user... |
/*
'normal': 'standard config, combine w/ancestor'
'_private': 'not to be inherited by descendants'
'!root': 'does not inherit from ancestor'
'@extends': { 'sub API': 'to build' }
requires: [testFn, 'name.of.api']
auto: true//'call async upon build'
follows
singleton
parent
For TypeScript-based config, specify metada... |
import _ from 'lodash';
import dotenv from 'dotenv';
import moment from 'moment';
import getRequests from './getRequests.data';
import models from '../../database/models';
import Pagination from '../../helpers/Pagination';
import Utils from '../../helpers/Utils';
import {
createSubquery,
includeStatusSubquery,
a... |
const bach = require('bach');
const colors = require('ansi-colors');
const globby = require('globby');
const path = require('path');
const vfs = require('vinyl-fs');
const PLUGIN_NAME = 'WebpackStreamingTaskPlugin';
const DEFAULT_TASK_NAME = 'Streaming Task';
/**
* Emits a Webpack compilation warning for the given c... |
const fs = require("fs");
const path = require("path");
var bodyParser = require("body-parser");
const express = require("express");
const mongoose = require("mongoose");
const { PythonShell } = require("python-shell");
const multer = require("multer");
const router = express.Router();
const UserSlots = require("../m... |
/**
* This file is part of vue-boilerplate.
* @link : https://zhaiyiming.com/
* @author : <NAME> (<EMAIL>)
* @modifier : <NAME> (<EMAIL>)
* @copyright: Copyright (c) 2018 TINYMINS.
*/
/* eslint no-console: ["warn", { allow: ["warn", "error"] }] */
/* eslint no-param-reassign: ["error", { "props": false }] *... |
/*---/ Formatters for JTF /-------------------------------------------------*/
//
// Use to format and correct JTF data.
//
// IMPORTANT: Add here modifications to the data.
//
// * Should NOT DO changes to the data structure itself other than adding
// attributes from data templates.
// * Should NOT DO any addit... |
import React, { Component } from 'react'
import Head from 'next/head'
import { compose } from 'redux'
import { connect } from 'react-redux'
import toastr from 'toastr'
import Error from 'next/error'
import Cookies from 'js-cookie'
import { Link, Router } from '../../common/routes'
import authRedux from '../redux/authR... |
import React, {useEffect, useState} from 'react';
import BaseTable, { AutoResizer, SortOrder, Column } from 'react-base-table'
import Grid from '@material-ui/core/Grid';
import CheckIcon from '@material-ui/icons/Check';
import CloseIcon from '@material-ui/icons/Close';
import 'react-base-table/styles.css'
const Colum... |
import { addBusService, updateBusService, deleteBusService, viewBusService, viewBusByTypeService, viewAllBusService} from "./services/BusService";
import { useDispatch, useSelector } from "react-redux";
import { useState, useEffect } from "react";
import {addBus, updateBus, deleteBus, viewBus, viewBusByType, viewAllBu... |
const Cart = () => {
const sidebarCart = document.querySelector('[data-cart="big-cart"]'),
headerCart = document.querySelector('[data-cart="mini-cart"]'),
cartTotal = document.querySelector('[data-count="total"]'),
addToCart = document.querySelector('[data-type="to-cart"]'),
updateCa... |
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Button } from '@trussworks/react-uswds';
import { Help } from '@material-ui/icons';
import DataPreview from '../DataPreview/DataPreview';
import FilterTags from '../../FilterTags/FilterTags';
import { isAddedToFilters }... |
/* global describe before after afterEach it */
import { Backend } from '../../src/js/backend/Backend'
import { assert } from 'chai'
import SMSmock from '../../src/js/mocks/SMS.mock'
import { hookBackend, generateMockJwt } from './testutils'
import { KeyManager } from '../../src/js/backend/KeyManager'
import { SmsMana... |
// Removes the loading screen after all the content is loaded.
window.addEventListener('load', function () {
killLoadingScreen();
})
document.addEventListener('DOMContentLoaded', () => {
// Checks if the URL's query string has a Strava authentication code. If it does, it hides the landing ... |
/*
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
Copyright (c) 2018 Juniper Networks, Inc.
All rights reserved.
Use is subject to license terms.
Author: cklewar
*/
function updateDeviceProvProgress(device){
//console.log(device.taskProgress, device.taskKey, device.taskKeyState);
$("#deviceProvP... |
'use strict';
var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _assign = require('babel-runtime/core-js/object/assign');
var _assign2 = _interopRequireDefault(_assign);
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
v... |
import Clipboard from '@react-native-community/clipboard';
import React, { Component } from 'react';
import { View, Text, StyleSheet, Image, ScrollView, TouchableOpacity, DeviceEventEmitter } from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import { OrderApi } from '../../../api';
import { To... |
var childProcess = require('child_process');
var path = require('path');
var fs = require('fs');
var events = require('events');
var util = require('util');
// Image source type constants
var ST_LIST = 1;
var ST_DIR = 2;
/*
* Instance number to distinguish between Beautystack objects
* when created simulaniosly ... |
const AWS = require('aws-sdk')
const archiver = require('archiver')
const crypto = require('crypto')
const protobuf = require('protobufjs')
const SQL = require('@nearform/sql')
const {
getAssetsBucket,
getDatabase,
getExposuresConfig,
runIfDev
} = require('./utils')
async function clearExpiredFiles(client, s3,... |
"use strict";
// All mutable global variables
var memoryCanvasInput;
var kernelCanvas;
var device;
var drawing = true;
var prevRenderFrameID;
// Application state, mutated with menu bar elements
// Choose default CUDA kernel from kernels.js
var activeKernel = "ppcStepV1";
// Amount of streaming multiprocessors in d... |
import React from 'react';
import ShortId from 'shortid';
import AttackAnalysis from '../lib/AttackAnalysis';
import Ship from './Ship';
import CharacterList from './CharacterList';
import './OnePiece.less';
export default class OnePiece extends React.Component {
constructor (props) {... |
var CanvasJS=require('./js/canvasjs.min')
var i18next = require('i18next')
var win = require('electron').remote.getCurrentWindow().id
var store = new(require('electron-store'))
function canvas () {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 ... |
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import db from '../../db';
const bus1 = ['ISU-037-JP', 'Geo', 'Tracker', 'available', 1997, 47, new Date(), new Date()];
const bus2 = ['CBP-555-QB', 'Mitsubishi', 'Montero', 'available', 1994, 48, new Date(), new Date()];
const bus3 = ['SQF-696-MG', 'Ford'... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... |
import { schemaCreator } from './actionTypes'
import axios from 'axios'
import { config } from '../config'
import { showLoading, hideLoading } from './loader'
import { fileChanged, fileOpen } from "./editor";
import { toastr } from 'react-redux-toastr'
import { addIntellisense, updateMappedSchema } from "./projectTree"... |
/**
* ---------------------------------------------------------------------
* GLPI - Gestionnaire Libre de Parc Informatique
* Copyright (C) 2015-2020 Teclib' and contributors.
*
* http://glpi-project.org
*
* based on GLPI - Gestionnaire Libre de Parc Informatique
* Copyright (C) 2003-2014 by the INDEPNET Devel... |
const memberList = [{
"id": 1665,
"name": "洪远航",
"age": 29,
"birthCity": 6,
"index": 0,
"uuid": "1e6qxi",
"phone": "17693251723",
"joinTime": "2019/9/6",
"expiredTime": "2019/4/23"
}, {
"id": 1348,
"name": "叶思远",
"age": 27,
"birthCity": 5,
"index": 1,
"uuid": "r3q0pu",
"phone": "13061245... |
import React, { Component, lazy, Suspense } from 'react';
import MqDivDropdown from "../../containers/Components/MqDivDropdown";
import MqDivDropdownHead from "../../containers/Components/MqDivDropdownHead";
import MqDivDropdownBody from "../../containers/Components/MqDivDropdownBody";
import AttributesHeader from "./A... |
import React, { Component } from 'react';
import Loading from './Loading';
import AreaSelector from './AreaSelector';
import FileCard from './FileCard';
import Breadcrumb from './Breadcrumb';
import { fileName, lastDirectory } from './Mapper';
import {
styledLog, startCounter, endCounter, clone,
} from './Utilities'... |
"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... |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { PropTypes } from 'react';
import styles from './Header.less';
import withStyles from '../../../decorators/withStyles';
import $ from 'jquery';
import UKTiaoJian from './UKTiaoJian/UKTiaoJian.js';
import USATiaoJian from '... |
import React, { useState, useEffect } from "react";
import { useRecoilState, useRecoilValue, useSetRecoilState } from "recoil";
// import IconButton from "@mui/material/IconButton";
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import IconButton from "@mui/material/IconButton";
import... |
$('#kcc').hide();
$("#checked").hide();
$('#kcc2').hide();
$("#checked2").show();
$('#fdate2').hide();
function Check(){
$('#due_date').val('00-00-0000');
$('#fdate').hide();
$('#ckc').hide();
$('#kcc').show();
$("#checked").show();
}
function Chckd(){
$('#due_date').val('');
... |
import {useState} from "react";
import './App.css';
import MyAlgoConnect from '@randlabs/myalgo-connect';
import algosdk from "algosdk";
const myAlgoWallet = new MyAlgoConnect(); // new instance of MyAlgoConnect
window.acc ='' // stores accounts of users
function App() {
const [userAddress,setUserAddress] = useSt... |
let scrollingViewCount = 1;
let scrollingViewsArray = [];
// Device values
let platformWidth = Ti.Platform.displayCaps.platformWidth;
let logicalDensityFactor = Ti.Platform.displayCaps.logicalDensityFactor;
let deviceWidth = (OS_IOS) ? platformWidth : Math.round(platformWidth / logicalDensityFactor);
function Scrolli... |
// Center line reference
function initLines() {
if (canvas.getItemById("center_h")) {
canvas.remove(canvas.getItemById("center_h"));
canvas.remove(canvas.getItemById("center_v"));
}
if (canvas.getItemById("line_h")) {
canvas.remove(canvas.getItemById("line_h"));
canvas.remove... |
const fs = require("fs");
const fe = require("file-encoding");
const os = require("os-utils");
var logger = require("npmlog");
const dbController = require("../controllers/mongoDbController");
const dirsModel = require("../models/dirsModel");
const movieModel = require("../models/movieModel");
const seriesModel = req... |
import React, { useEffect, useState } from "react";
import api from "../../utils/api";
import queryString from "query-string";
import Header from "./header";
import Page from "./page";
import ActionBox from "./action-box";
import { PaginationType, APIURL, QuestionType } from "./../../utils/contants";
import PageLoader ... |
import { createMuiTheme } from '@material-ui/core/styles'
import merge from 'lodash.merge'
const schemeProperties = [
'light',
'main',
'dark',
'contrastLight',
'contrastText',
'contrastDark',
]
const configuredColorScheme = (colorRank) => {
if (process.env[`THEME_PALETTE_${colorRank}_MAIN`]) {
const... |
"use strict";
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: MIT-0
*
* 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 res... |
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/* eslint max-len: ["error", 240] */
var _randomteams = require('../gen3/random-teams');
class RandomGen2Teams extends _randomteams.default {
constructor(format, prng) {
super(format, prng);
}
randomSet(species, teamDetails = {}) {
spe... |
goog.declareModuleId('os.ui.AbstractMainCtrl');
import '../../polyfill/chardetng.js';
import './alert/alertpopup.js';
import './globalmenu.js';
import './listui.js';
import './onboarding/contextonboarding.js';
import './onboarding/onboarding.js';
import ElectronPlugin from '../../plugin/electron/electronplugin.js';
im... |
"use strict";
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.ap... |
// World
var engine;
var ball;
var leftGoal, rightGoal;
// Game
var playerDict = {};
// Player reset info
var playerJson, tCA, tCB;
// In this file, red team = orange team
var orangeScore = 0, blueScore = 0;
// Disable player input until game starts
var acceptPlayerInput = false;
window.gamestart = (playerList, tea... |
import './style.css';
import todo from './todo';
import { project, projects, prepareForStorage } from './project';
let activeProjectId = '';
const setActiveProjectId = (value) => {
activeProjectId = value;
};
const getActiveProject = () => projects.find(p => p.id === activeProjectId);
const clearContainer = (cont... |
import Config from "./config.js";
import {
Utils,
RTMUtils,
RTCUtils
} from "./until.js";
// rtm 实时消息引入
const rtmModule = uni.requireNativePlugin("AR-RtmModule");
let Store = {
// 被叫、主叫区分
type: false,
// 当前登陆状态
logining: {
state: 0,
reson: 0,
},
// 当前 rtm/rtc
presentType: 'rtm',
// 断网... |
/* jshint node:true */
var path = require('path');
var esprima = require('esprima');
var compiler;
var NATIVE_FUNCTIONS = {
'decodeURI': 1,
'decodeURIComponent': 1,
'encodeURI': 1,
'encodeURIComponent': 1,
'isFinite': 1,
'isNaN': 1,
'parseInt': 1,
'parseFloat': 1
};
var NATIVE_OBJECTS =... |
var Doodle = {};
//// CONFIGURATION AND GLOBAL VARS /////////////////////////////////////////////////////////////////////////////////////
var minDistBetweenPoints = 7;
var movingSpeedFor1000 = 50;
var minMovingSpeed = 17;
var drawnPaths = [];
//// UTILS //////////////////////////////////////////////////////... |
const ZOOM_MODS = ['zoom_top', 'zoom_bottom', 'zoom_side', 'center_split', 'tilt'];
const ZOOM_MODS_SET = new Set(ZOOM_MODS);
const TILT_SPECIAL_VALUES = new Set(['normal', 'bigger', 'biggest', 'keep_normal', 'keep_bigger', 'keep_biggest', 'zero', 'big', 'keep']);
const fromBack = (arr, ind) => arr[arr.length-(1+ind)... |
import { isUndefinedOrNull, isFunction, isString, isObject, isArrayOf, pall, pmap, intersect, assert } from './utils';
import {
isSoulId,
isArrayOfSoulIds,
querygen,
} from './ids';
import Operations, {
QUERY,
SOULS,
FROM_ALIAS,
SET_ALIAS,
REMOVE_ALIAS,
NAVIGATE,
BIND,
UNBIND,
UNBIND_BY_KEY,
... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gen... |
import React, { useContext, useState, useEffect, useMemo, useRef } from "react";
import * as _ from "underscore";
import MapGL, { Layer, Source, MapContext, NavigationControl, AttributionControl } from "@urbica/react-map-gl";
import { Button, MenuItem } from "@blueprintjs/core";
import { Select } from "@blueprintjs/sel... |
'use strict';
const path = require('path');
const fs = require('fs');
const Random = require('random-js');
const Pool = require('worker-threads-pool');
const pathInfo = path.resolve(path.join('data', 'infoLocalHMDB.json'));
//cosas importadas en worker
const converter = require('jcampconverter');
const utils = req... |
/* MIT License
*
* Copyright (c) 2012-2020 <EMAIL>
*
* 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... |
var page = 1;
var page_count = 1;
$(document).ready(function () {
getToken();
});
function getToken(){
var username = $('#hidUsername', window.parent.document).val();
var session = $('#hidSession', window.parent.document).val();
var id = $('#hidUserId', window.parent.document).val();
$.getJSO... |
const cors = require('cors')
const express = require('express')
const fs = require('fs').promises
const http = require('http')
const https = require('https')
const jwt = require('jsonwebtoken')
const _ = require('lodash/fp')
const u = require('utils')
function errToObj(err) {
return _.merge({message: err.message, st... |
/* global AWS */
import ko from 'knockout';
import homeTemplate from 'text!./home.html';
var URL_BASE = "https://iipm8dip2k.execute-api.eu-west-1.amazonaws.com/latest/getAnnataProduct?product_sku="
class HomeViewModel {
constructor(route) {
this.message = ko.observable('Welcome to iot-hackathon!');
... |
import React from 'react'
import {
View,
Text,
StyleSheet,
ART
} from 'react-native'
const { Surface, Shape, Path, Group } = ART
const sumOfObjectKeyInArray = (items, prop) => {
return items.reduce(function (a, b) {
return a + b[prop]
}, 0)
}
const styles = StyleSheet.create({
container: {
fle... |
/**
* ministun: Zero dependency STUN server for Node.js
*
* by <NAME> <<EMAIL>>
*
* mattr.js
* STUN message attribute
*/
const { MStunHeader } = require("./mhdr.js");
const { MTypeData } = require("./mcontainer.js");
const { MUtil } = require("./mutil.js");
class MStunAttr {
static K_ALIGN = 4... |
"use strict";
const Validator = require("../../lib/validator");
const v = new Validator({
useNewCustomCheckerFunction: true,
messages: {
evenNumber: "The '' field must be an even number!"
}
});
describe("Test rule: array", () => {
it("should check type of value", () => {
const check = v.compile({ $$root: tru... |
import React from 'react'
import Link from 'gatsby-link'
import styles from './search.module.css'
const Search = _ => (
<svg viewBox="0 0 39 36" width="25" height="25">
<path
transform="rotate(90 16 18)"
stroke="white"
fill="white"
d="M31.008 27.231l-7.58-6.447c-0.784-0.705-1.622-1.029-2.... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import { isString, memoize } from 'lodash';
import {
TRUNCATE_WIDTH_DEFAULT_WIDTH,
TRUNCATE_WIDTH_DEFAULT_FONT_SIZE,
} from '~/lib/utils/constants';
/**
* Adds a , to a string composed by numbers, at every 3 chars.
*
* 2333 -> 2,333
* 232324 -> 232,324
*
* @param {String} text
* @returns {String}
*/
expor... |
'use strict';
const rollup = require('rollup').rollup;
const babel = require('rollup-plugin-babel');
const closure = require('rollup-plugin-closure-compiler-js');
const commonjs = require('rollup-plugin-commonjs');
const alias = require('rollup-plugin-alias');
const prettier = require('rollup-plugin-prettier');
const ... |
import React, {
useState,
useLayoutEffect,
useCallback,
createContext,
useMemo,
useRef,
useEffect,
useContext
} from 'react';
import mojs from 'mo-js';
import styles from './index.css';
const initialState = {
count: 0,
countTotal: 2,
isClicked: false
};
// Custom Hook for animation
const useClap... |
/*
Copyright (c) 2012 Intel Corporation.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of works must retain the original copyright notice, this list
of conditions and the following disclaimer.
* Redist... |
function getSize() {
var reg = new RegExp("(^|&)size=([^&]*)(&|$)", "i");
var r = location.search.substr(1).match(reg);
if (r != null) {
return parseInt(unescape(decodeURI(r[2])));
}
return 8;
}
function getMode() {
var reg = new RegExp("(^|&)mode=([^&]*)(&|$)", "i");
var r = location.search.subst... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.UserController = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; des... |
'use strict';
/**
* @ngdoc directive
* @name ngInclude
* @restrict ECA
*
* @description
* Fetches, compiles and includes an external HTML fragment.
*
* By default, the template URL is restricted to the same domain and protocol as the
* application document. This is done by calling {@link $sce#getTrustedResour... |
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import {
withKnobs,
text,
number,
boolean,
color,
select,
radios,
array,
date,
button,
object,
files,
optionsKnob as options,
} from '@storybook/addon-knobs';
const ItemLoader = ({ isLoading, items }) => {
if (isL... |
import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits... |
'use strict';
var slots = require('../helpers/slots.js');
var crypto = require('crypto');
var ripajs = require('ripajs');
var bignum = require('../helpers/bignum.js');
var ByteBuffer = require('bytebuffer');
var BlockReward = require('../logic/blockReward.js');
var constants = require('../helpers/constants.js');
// P... |
/**
* 一个使用小微商户+微信聊天机器人构建的私域运营助手
* https://github.com/rixingyike/wechat-operation-assistant
*
* @copyright 2021 LIYI <<EMAIL>>
*
* 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
... |
import { useEffect, useState } from 'react';
import LuigiClient from '@luigi-project/client';
import { useGet } from 'shared/hooks/BackendAPI/useGet';
const getPrometheusSelector = data => {
let selector = `cluster="", container!="", namespace="${data.namespace}"`;
if (data.pod) {
let pods = data.pod;
if (... |
import Link from 'next/link';
import Image from 'next/image';
import Container from '@/components/Container';
import YoutubeStats from '@/components/YoutubeStats';
import VidDisplayListItem from '@/components/VidDisplayListItem';
import { shimmer, toBase64 } from '@/lib/imageManip';
import { useState } from 'react';
i... |
String.prototype.toRGB = function () {
var hash = 0;
if (this.length === 0) return hash;
for (var i = 0; i < this.length; i++) {
hash = this.charCodeAt(i) + ((hash << 5) - hash);
hash = hash & hash;
}
var rgb = [0, 0, 0];
for (var i = 0; i < 3; i++) {
var value = (hash >> (i * 8)) & 255;
rgb... |
/**
* Gets the ct.js texture object by its id.
* @param {string} id The id of the texture
* @returns {ITexture} The ct.js texture object
*/
const getTextureFromId = id => {
const texture = global.currentProject.textures.find(tex => tex.uid === id);
if (!texture) {
throw new Error(`Attempt to get a n... |
'use strict';
var _ = require('lodash');
var async = require('async');
var $ = require('preconditions').singleton();
var log = require('npmlog');
log.debug = log.verbose;
var io = require('socket.io-client');
const request = require('request-promise-native');
var Common = require('../common');
var Client;
var Bitcore ... |
import Vector from 'engine/Vector';
import Polygon from '../core/math/Polygon';
import Rectangle from '../core/math/Rectangle';
import Node from '../core/Node';
import { BLEND_MODES } from '../const';
const tempPoint = new Vector();
const tempPolygon = new Polygon([new Vector()]);
/**
* Base mesh class
* @class
* ... |
const os = require('os')
const path = require('path')
const fs = require('fs-extra')
var moment = require('moment');
moment.locale('zh-cn');
const { getCookies, saveCookies, delCookiesFile } = require('./util')
const _request = require('./request')
var crypto = require('crypto');
const { default: PQueue } = require('p-... |
#!/usr/bin/env node
const { GitProcess } = require('dugite')
const childProcess = require('child_process')
const fs = require('fs')
const klaw = require('klaw')
const minimist = require('minimist')
const path = require('path')
const SOURCE_ROOT = path.normalize(path.dirname(__dirname))
const BLACKLIST = new Set([
... |
/* Magic Mirror
* The Core App (Server)
*
* By <NAME> https://michaelteeuw.nl
* MIT Licensed.
*/
// Alias modules mentioned in package.js under _moduleAliases.
require("module-alias/register");
const fs = require("fs");
const path = require("path");
const Log = require("logger");
const Server = require(`${__dirn... |
var isAndroid = Ti.Platform.osname == 'android';
/*if (isAndroid) {
// Landscape Mode
var screenWidth = Ti.Platform.displayCaps.platformHeight;
var screenHeight = Ti.Platform.displayCaps.platformWidth;
} else {*/
var LDF = Ti.Platform.displayCaps.logicalDensityFactor || 1;
var screenWidth = (Math.min(Ti.Platform.di... |
import { fOPNReco } from '../../util/fetcher';
import { throttler } from '../../util/throttler';
import { withStyles } from '@material-ui/core/styles';
import AddCircle from '@material-ui/icons/AddCircle';
import RemoveCircle from '@material-ui/icons/RemoveCircle';
import CircularProgress from '@material-ui/core/Circu... |
const fs = require('fs')
const markup = require('chalk')
const prompts = require('prompts')
let settings = require('./settings') || null
if (!settings) {
console.log(markup.bold.red('settings.js file does not exist\nStart Setting Proc...'))
setSettings()
}
proc(() => { process.exit(0) })
async functi... |
/**
* @typedef {import('mdast').Root} Root
* @typedef {import('hast').Properties} Properties
* @typedef {import('vfile').VFile} VFile
* @typedef {import('unified-engine').FileSet} FileSet
* @typedef {import('../types.js').Landmarks} Landmarks
* @typedef {import('../types.js').References} References
* @typedef {i... |
var base_url = '';
pathArray = location.href.split( '/' );
protocol = pathArray[0];
host = pathArray[2];
base_url = protocol + '//' + host;
var ftype = new Array();
$("#imgInput").change(function (event) {
files = event.target.files;
if(!(/\.(gif|jpg|jpeg|tiff|png)$/i).test(files[0]... |
/**
* Copyright 2012-2019, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var d3 = require('d3');
var isNumeric = require('fast-isnumeric');
var Lib = require('../../lib');
var Icons =... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { replace } from 'react-router-redux';
import _ from 'lodash';
import 'url-search-params-polyfill';
import { injectIntl } from 'react-intl';
import uuidv4 from 'uuid/v4... |
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
import * as React from 'react';
import clsx from 'clsx';
i... |
/* globals $$, jQuery, Elements, document, window, L */
/**
* Copyright 2013 <NAME>. See the LICENSE file at the top-level
* directory of this distribution and at
* https://github.com/marcj/css-element-queries/blob/master/LICENSE.
*/
this.L = this.L || {};
/**
* @param {HTMLElement} element
* @param {String} p... |
import Plugin from '../Plugin';
import * as PluginTypes from '../PluginTypes';
import {Blockchains} from '../../models/Blockchains'
import * as NetworkMessageTypes from '../../messages/NetworkMessageTypes'
import StringHelpers from '../../util/StringHelpers'
import Error from '../../models/errors/Error'
import Network ... |
/**
* fireworks.js by Computerpark
* Original Script by dtrooper
* see: https://jsfiddle.net/XWMpq/
* Modified and redistributed under Apache 2.0 LICENSE.
* https://github.com/computerpark/Adios2018
*/
var SCREEN_WIDTH = window.innerWidth,
SCREEN_HEIGHT = window.innerHeight,
mousePos = {
x:... |
import React, { useState, useEffect } from 'react';
//import '../../assets/vendor/dist/css/datatable1.css';
//import { ImportScript } from '../components';
import { Button } from '@material-ui/core';
import { makeStyles } from '@material-ui/styles';
import moment from 'moment';
import { ProvinsisToolbar, KelurahansTab... |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 <NAME>
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var popper = require('@chakra-ui/popper');
var portal = require('@chakra-ui/portal');
var system = require('@chakra-ui/system');
var utils = require('@chakra-ui/utils');
var visuallyHidden = require('@chakra-ui/visually-hidden');
var framerM... |
/**
* MIT License
*
* Copyright (c) 2018 yadong.zhang
*
* 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, mo... |
/* eslint-disable react/jsx-key */
import React, { useEffect, useState } from "react";
import { backendUrl } from "../../urlConfig.js";
import { makeStyles } from "@material-ui/core/styles";
// import { createMuiTheme } from '@material-ui/core/styles';
import { Table,TableHead, TableBody, TableCell, TableRow } from "@m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.