text stringlengths 3.07k 16k |
|---|
'use strict';
// const sinon = require('sinon');
const chai = require('chai');
chai.use(require("chai-as-promised"));
const expect = chai.expect;
const config = require('../test.config.js');
describe('CSV Module', function () {
const { Csv } = require(`../${config.sourceFolder}/csv`);
const tmpDir = '/tmp/... |
// Require path to allow for relative paths
const path = require('path')
// Require router
const router = require('express').Router()
// Destructure Post and User from the sequelize models
const { Post, User } = require('../models')
// Use authentication middleware to only grant access to logged in users
const isAuthen... |
'use strict';
var CoinbaseAPI = require( 'coinbase' );
var CoinbaseExchange = require( 'coinbase-exchange' );
var async = require( 'async' );
var _ = require( 'lodash' );
var Coinbase = function ( config ) {
this.coinbaseClient = new CoinbaseAPI.Client( {
apiKey: config[ 'coinbase.coinbaseAPIKey' ],
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const core_1 = require("@angular-devkit/... |
import React from "react";
import PropTypes from "prop-types";
import { assign, partialRight } from "lodash";
import {
PropTypes as CustomPropTypes, Helpers, VictoryLabel,
VictoryContainer, VictoryTheme, Line, addEvents, Arc
} from "victory-core";
import AxisHelpers from "./helper-methods";
import { BaseProps } fro... |
import path from 'path'
import fs from 'fs'
import gazConfig from './gazette.config'
const { client, server, auth: { social: { clientsIds } } } = gazConfig
const stylusPlugins = [
require('rupture')()
]
function resolve(dir) {
return path.join(__dirname, '.', dir)
}
const langs = {}
fs
.readdirSync(resolve('l... |
import React from "react";
import { Platform, View, Animated, Modal, TouchableOpacity, Picker, Dimensions, Text } from "react-native";
import PropTypes from "prop-types";
class ReactNativePickerModule extends React.Component {
state = {
isVisible: false,
animation: new Animated.Value(0),
selectedValue: t... |
import React, { useEffect, useMemo, useState, useContext } from 'react'
import PropTypes from 'prop-types'
import { css } from 'glamor'
import colors from '../../theme/colors'
import memoize from 'lodash/memoize'
const getVariableColorKeys = colors =>
Object.keys(colors.light).filter(
color => colors.light[color... |
/*
* Copyright (c) 2009-2020. Authors: see NOTICE file.
*
* 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 l... |
// store the cwd
const cwd = process.cwd()
const path = require('path')
const _ = require('lodash')
const os = require('os')
const gift = require('gift')
const chalk = require('chalk')
const Promise = require('bluebird')
const minimist = require('minimist')
const la = require('lazy-ass')
const check = require('check-m... |
import React from 'react';
import PropTypes from 'prop-types';
import styled, { css } from 'styled-components';
import { formatCurrencyToInt, formatMoney } from '../../../../utils/helper';
import { unitsOptions } from '../../../../utils/technology';
const Costs = ({ title, data, totalColor, containerHeight }) => {
co... |
import React, { Component } from 'react';
import axios from 'axios';
import '../styles/App.css';
// React Router
import {
BrowserRouter as Router,
Switch,
Route,
Link
} from "react-router-dom";
// Web3
import Web3 from 'web3'
// Contract Info
import {CONTRACT_ABI, CONTRACT_ADDRESS, AM} from '../smart-contr... |
import React, { PureComponent, Fragment } from 'react';
import { makeRequest } from 'utils';
import { url, messages } from 'config';
import { withAuth } from 'auth';
import {
GET_ACTIVE_BATTLE,
CREATE_BATTLE,
SEND_CHALLENGE_ANSWER,
CREATE_TEAM,
DELETE_TEAM,
START_BATTLE,
FINISH_BATTLE,
DELETE_BATTLE,
... |
import React, { useState,useEffect } from "react";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
// core components
import GridItem from "components/Grid/GridItem.js";
import GridContainer from "components/Grid/GridContainer.js";
import Table from "components/Table/Table.js";
im... |
const utils = require("./components/utils")
const users = require("./models/user")
console.log(require('crypto').randomBytes(64).toString('hex'))
const car = require("./models/car");
console.log(utils.formatPhoneNumber("0973279939"))
const generateUniqueId = require("generate-unique-id");
const id = generateUniqueId({... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
//describe("SimpleStorage", function() {
// this.timeout(0);
// before(function(done) {
// this.timeout(0);
// var contractsConfig = {
// "SimpleStorage": {
// args: [100]
// }
// };
// EmbarkSpec.deployAll(contractsConfig, () => { done() });
// });
//
// it("should set constructor valu... |
import {qs, qsa, querySelectorByType} from "./utils/core";
/**
* Navigation Parser
* @param {document} xml navigation html / xhtml / ncx
*/
class Navigation {
constructor(xml) {
this.toc = [];
this.tocByHref = {};
this.tocById = {};
if (xml) {
this.parse(xml);
}
}
/**
* Parse out the navigation ... |
import _ from 'underscore';
import React, {forwardRef, Component} from 'react';
import {View, SectionList, Text} from 'react-native';
import PropTypes from 'prop-types';
import styles from '../styles/styles';
import OptionRow from '../pages/home/sidebar/OptionRow';
import optionPropTypes from './optionPropTypes';
cons... |
/*
* Copyright (c) 2019. Partners HealthCare and other members of
* Forome Association
*
* Developed by <NAME> based on contributions by <NAME>,
* <NAME>, <NAME> and other members of Division of
* Genetics, Brigham and Women's Hospital
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you m... |
import React, { Component } from "react";
import * as moment from "moment";
import { DashboardService } from "../../../../services/dashboard.service";
import _ from "lodash";
import "file-saver";
import domtoimage from "dom-to-image";
/**
* Widget Navbar Component
* Holds all the widgets and drill throught filter la... |
import {Observable, constant as C, constantError as E, later} from 'kefir'
import * as R from 'ramda'
import * as L from 'partial.lenses'
import {
combines,
lift,
lift1,
lift1Shallow,
liftFOF,
liftRec
} from '../dist/kefir.combines.cjs'
function show(x) {
switch (typeof x) {
case 'string':
case ... |
/*jshint multistr: true */
$(document).ready(init);
// from https://gist.github.com/wteuber/6241786
Math.fmod = function (a,b) { return Number((a - (Math.floor(a / b) * b)).toPrecision(8)); };
var TWO_PI = 2 * Math.PI;
var BOARD_CANVAS;
var BOARD_CANVAS_CTX;
var ORIGINAL_PAGE_TITLE;
var LAST_RENDER_TIMESTAMP = Date.n... |
import chalk from 'chalk';
import { readJsonSync } from 'fs-extra';
var fs = require('fs')
var path = require('path')
// var pathConfig = require('../config')
const configKeys = [
'needAuth',
'formData',
'easySignature'
]
export async function getInitConfigList (config) {
const {
inputMode,
inputPath,
... |
import * as THREE from "three";
/**
* @description Adds a moving galaxy to your scene
* @param {*} textureLoader pass it your current texture loader
* @param {*} scene pass it whatever you call your threejs scene
*/
export const galaxy_function = (textureLoader,scene) => {
let galaxyGeometry = new THREE.Sph... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DevPackager = void 0;
function _utils() {
const data = require("@parcel/utils");
_utils = function () {
return data;
};
return data;
}
function _sourceMap() {
const data = _interopRequireDefault(require("@parcel/so... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import { observable, action } from "mobx";
import { observer } from "mobx-react";
import semver from "semver";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faTrash } from "@fortawesome/free-solid-svg-icons/faT... |
//
// Copyright 2020 <NAME>
//
const createError = require('http-errors')
const express = require('express')
//
// This very basic Express.js application is used for testing the login
// extension. It establishes a set of routes for testing various success and
// failure cases. By configuring the extension with differ... |
import Phaser from 'phaser';
import ImgRub from './assets/rub.png';
import ImgEnd from './assets/end.png';
import ImgBlock from './assets/block.png';
import FontArcade from './assets/fonts/bitmap/arcade.png';
import FontArcadeXml from './assets/fonts/bitmap/arcade.xml';
const axios = require('axios');
export class Hi... |
import { ColumnarDataSource } from "./columnar_data_source";
import { HasProps } from "../../core/has_props";
import * as p from "../../core/properties";
import { Set } from "../../core/util/data_structures";
import { encode_column_data, decode_column_data } from "../../core/util/serialization";
import { isTypedArray, ... |
import
React,
{ useEffect, } from 'react';
import {
Link,
} from 'react-router-dom';
import PropTypes from 'prop-types';
import DateTimePicker from 'react-datetime-picker';
import Cookies from 'js-cookie';
import {
escape as _escape,
} from 'lodash-es';
import Br from '../../atoms/Br';
import Button from '../..... |
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
exports.exportRankingData = functions.region('asia-northeast1').storage.object().onFinalize(async (object) => {
const fileBucket = object.bucket;
const filePath = object.name;
if (!filePath.endsWith('M... |
import React from 'react';
import Navbar from 'react-bootstrap/Navbar';
import Button from 'react-bootstrap/Button';
import Nav from 'react-bootstrap/Nav';
import Form from 'react-bootstrap/Form';
import Col from 'react-bootstrap/Col';
import InputGroup from 'react-bootstrap/InputGroup';
import NavDropdown from 'react-... |
// --------------------------------------------------------------------
// Text Particle
// --------------------------------------------------------------------
function TextObj(text,color,x,y,startsize,endsize,duration) {
JGObject.apply(this,["particle",true,x,y, 0]);
this.text = text;
this.color = color;
this.e... |
/* eslint-disable no-undef */
function getBibtexReferenceFromInternalLink(link) {
const chunks = link.split("#");
if (chunks.length < 2) {
return null;
}
if (!chunks[1].startsWith("cite.")) {
return null;
}
return chunks[1].substr(5);
}
function parseBibtexReference(bibtexRef) {
const regex = /^... |
"use strict";
const _ = require("lodash");
const dedent = require("dedent");
const execa = require("execa");
const log = require("npmlog");
const PackageGraph = require("@lerna/package-graph");
const Project = require("@lerna/project");
const writeLogFile = require("@lerna/write-log-file");
const collectPackages = re... |
var _ = require('underscore');
var util = require('util');
var fs = require('fs');
var http = require('http');
var path = require('path');
var express = require('express');
var session = require('express-session');
var mongoStore = require('connect-mongo')(session);
var bodyParser = require('body-parser');
var multer =... |
'use strict';
var ValidationError = require('../error/validation_error');
var getType = require('../util/get_type');
var validate = require('./validate');
var validateObject = require('./validate_object');
var validateArray = require('./validate_array');
var validateNumber = require('./validate_number');
var unbundle ... |
#!/usr/bin/env node
import sapim, { createConfigFile, loadConfigFile } from "./index";
import program from "commander";
import prompt from "prompt";
import { version, name, description } from "../package.json";
import dotenv from "dotenv";
import logger, { LOG_LEVEL } from "./logger";
function wrapAction(cb) {
r... |
// Copyright (c) 2016, the IFMLEdit.org project authors. Please see the
// AUTHORS file for details. All rights reserved. Use of this source code is
// governed by the MIT license that can be found in the LICENSE file.
/*jslint node: true */
"use strict";
var joint = require('joint'),
elements = require('../elemen... |
const axios = require("axios");
const querystring = require("querystring");
const {
TeamsActivityHandler,
ActionTypes,
CardFactory,
} = require("botbuilder");
class TeamsBot extends TeamsActivityHandler {
/**
* @param {ConversationState} conversationState
* @param {UserState} userState
* @param {Dial... |
/**
* Copyright (c) 2011-2017 inazumatv.com, inc.
* @author (at)taikiken / http://inazumatv.com
* @date 2017/01/01 - 0:21
*
* Distributed under the terms of the MIT license.
* http://www.opensource.org/licenses/mit-license.html
*
* This notice shall be included in all copies or substantial portions of the Softw... |
var numOfTimeLineEvents = 14; //every time an event is added to the timeline this var must be increased by one
var yearTracker = -1; //keeps track of the current year highlighted
var scrollDirection = 0;
var lastYearSelected = "";
var lastYearArrow = "";
var lastYearImg = "";
var browserType = browserVersion();... |
var A = 0;
var H = 70;
var R = 40;
var PI = Math.acos(-1);
var core = coreTransform(H,R);
main();
function main() {
var WArr = [80.7,78.1,83.1,77.9,85.3,86.1,76.8,89.4,76.7,76.6,98.2,76.6,100,76.7,103.3,76.9,77,108.8,77.1,111.3,77.4,116.7,77.5,77.7,77.8,78,124.6,78.3,133.9,78.8,134.4,136.7,79.2,79.4,79.7,79.8,80.1,8... |
import useCountdown from 'hooks/useCountdown'
import React from 'react'
import useHederaPrice from 'hooks/useHederaPrice'
import getUsdValue from 'utils/getUsdValue'
import getBidValue from 'utils/getBidValueToShow'
import BidButton from './BidButton'
import BidModal from 'components/modals/BidModal'
import HbarUnbit f... |
/**
* Copyright 2012-2016, 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 Plots = require('../plots/plots');
var svgTextUtils = require('../lib/svg_text_uti... |
const Discord = require('discord.js');
const bot = new Discord.Client();
var request = require('request');
var cheerio = require('cheerio');
var Command = require('./command.js');
const channelId = '166812372286046208';
let regularCoolDown = new Set();
let wtCoolDown = new Set();
let cdSeconds = 5;
b... |
// Chops stuff like 'navigation_3' to '3'
function chop_id(id) {
u_pos = id.indexOf("_");
return id.substring(u_pos+1);
}
// Make the sorting elements, the sortable('refresh') method can't handle too much live stuff, so
// we have to call this on every element update.
function doSort() {
$(".navigation_column").sor... |
//事务
import React, {Component} from 'react';
import {connect} from 'react-redux';
import actions from 'actions';
import 'pages/Application/sw.css';
import Header from 'pages/functionalCom/Header.js';
import SortHeader from 'pages/functionalCom/SortHeader.js';
import Sw_right from './sw_right.js';
import { Icon } from '... |
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" :... |
var MODE_TEXT = 0,
MODE_VIDEO = 1,
MODE_AUDIO = 2,
MODE_WITEBOARD = 3;
window.witeboardClient = null;
function initChat(){
var hasFinisedInit = false,
unProcessedMsg = [],
NO_SOURCE = new Image(),
witeboardId = window.location.pathname.split("/")[1],
witeboardClient = new WSClient({
host: "ws://" + wind... |
/**
* Created by mai on 2017/11/10.
*/
import React, {Component} from 'react';
import {
StyleSheet,
Image,
View,
Text,
StatusBar,
TouchableOpacity,
Keyboard,
TextInput,
DeviceEventEmitter
} from "react-native";
import styles, {screenHeight, statusHeight} from "../../style";
import... |
var Navigation = require('./slideshow/navigation')
, Events = require('./slideshow/events')
, utils = require('../utils')
, Slide = require('./slide')
, Parser = require('../parser')
, macros = require('../macros')
;
module.exports = Slideshow;
function Slideshow(events, dom, options, callback) {
var self... |
import { fillZero } from './num';
// 一天的毫秒数
const secondsOfMinute = 60;
const secondsOfHour = 60 * secondsOfMinute;
const secondsOfDay = 24 * secondsOfHour;
const secondsOfMonth = 30 * secondsOfDay;
const secondsOfYear = 12 * secondsOfMonth;
const millisecondsOfDay = 1000 * secondsOfDay;
/**
* 获取一个时间对象
*
* @return... |
//DATABASE;//
const low = require('lowdb');
const FileSync = require('lowdb/adapters/FileSync');
const adapter = new FileSync('db.json');
var db = low(adapter);
var channels = []
var admins = []
db.defaults({
"complist": "",
"mainChannel": "493722553664405515",
"admins": [
"17460919234094... |
/*!
* Copyright 2014 Apereo Foundation (AF) Licensed under the
* Educational Community 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://opensource.org/licenses/ECL-2.0
*
* Unless required by applicab... |
import { C_POSTBOX } from '@bbc/psammead-styles/colours';
import { latin } from '@bbc/gel-foundations/scripts';
import { indonesia as brandSVG } from '@bbc/psammead-assets/svgs';
import '@bbc/moment-timezone-include/tz/Asia/Jakarta';
const service = {
lang: `id`,
articleAuthor: `https://www.facebook.com/pages/BBC-... |
"use strict"
module.exports = getCubeEdges
var bits = require('bit-twiddle')
var multiply = require('gl-mat4/multiply')
var invert = require('gl-mat4/invert')
var splitPoly = require('split-polygon')
var orient = require('robust-orientation')
var mvp = new Array(16)
var imvp = new Array(16)
... |
const AWS = require("aws-sdk");
const util = require("util");
const execFile = util.promisify(require("child_process").execFile);
const framerateConverter = require("./utils/framerateConverter");
const s3 = new AWS.S3({ apiVersion: "2006-03-01", signatureVersion: "v4" });
/**
* Build the appropriate parameters objec... |
/**
* Copyright (c) 2010 <NAME> <<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, merg... |
// EPSG:4326 -> WGS84 http://spatialreference.org/ref/epsg/wgs-84/
// EPSG:3857 → WGS84 Web Mercator http://spatialreference.org/ref/sr-org/epsg3857-wgs84-web-mercator-auxiliary-sphere/
var initial_center = ol.proj.transform([139.76681118894027, 35.681279893274294], "EPSG:4326", "EPSG:3857");
var initial_zoom = 18;
va... |
import axios from 'axios'
import {normalize, schema} from 'normalizr'
// NORMALIZER DEFINITIONS
// define reservation schema
const reservation = new schema.Entity('reservations')
// define queue schema
const stylist = new schema.Entity('stylists', {
reservations: [reservation]
})
// define business schema
const busi... |
import http from 'axios';
import { message } from 'antd';
import intl from 'react-intl-universal';
import { encrypt, HmacSHA256 } from '@utils/str';
import { session } from '@utils/session';
import { history } from '@router';
import { COMMON_KEYS, SESSION_STORAGE_KEYS } from '@/config/constants';
const { APP_ID } = CO... |
/* eslint-disable react/prop-types */
/* eslint-disable no-unused-vars */
/* eslint-disable arrow-body-style */
/* eslint-disable array-callback-return */
/* eslint-disable react/jsx-no-bind */
import React from 'react';
import moment from 'moment'
import PropTypes from 'prop-types';
import { StaticQuery, graphql, Link... |
import * as React from "react";
import * as UploadUtilities from "~/common/upload-utilities";
import * as FileUtilities from "~/common/file-utilities";
import * as Logging from "~/common/logging";
import { useEventListener } from "~/common/hooks";
const UploadContext = React.createContext({});
export const useUploadC... |
import React, { Component } from 'react';
import DropdownMenu from '../DropdownMenu/DropdownMenu.js';
import CheckboxList from '../CheckboxList/CheckboxList.js';
import PropTypes from 'prop-types';
import { withTranslation } from 'react-i18next';
import './FilterEditor.css'
/*
* A component to filter different Variab... |
'use strict'
const path = require('path')
const defaultSettings = require('./src/config/index.js')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const resolve = dir => path.join(__dirname, dir)
// page title
const name = defaultSettings.title || 'vue mobile template'
// 生产环境,测试和正... |
'use strict';
/* global module */
var Actions = require('marionette-client').Actions;
function Collection(client, server) {
this.client = client;
this.server = server;
this.actions = new Actions(client);
}
/**
* @type String Origin of Collection app
*/
Collection.URL = 'app://collection.gaiamobile.org';
Col... |
/*
Notes:
'data' is lazily imported from the html
'seedrandom' is also imported from html. it gives deterministic random #s based on a seed set in fire()
*/
var wordsSelected = [];
var cells = [];
var NUMBER_OF_WORDS = 25;
var spyMasterMode = false;
var sessionData = [];
var customData = [];
// these are the names o... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const lodash_1 = require("lodash");
const context_1 = require("./context");
const config_1 = require("./config");
const action_1 = require("./action");
const extractor_1 = require("./extractor");
const association_1 = require("./association");... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
* See LICENSE in the project root for license information.
*/
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (res... |
/*
Copyright 2016 Autodesk,Inc.
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, software... |
/*
* Copyright (c) 2021, the hapjs-platform Project Contributors
*
* SPDX-License-Identifier: Apache-2.0
*/
import { $newMap } from './util'
const startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/
const endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/... |
import React from "react";
import { Table, Button } from "reactstrap";
import IconButton from "@material-ui/core/IconButton";
import { Delete, Edit, Visibility, SwapHoriz } from "@material-ui/icons";
import ModalShop from './ModalShop.js';
import ModalTransferencias from './ModalTransferencias.js';
import { GetDisabled... |
/**
* This script auto-generates bash/cmd scripts meant to test smoke test the entire plugin. These scripts will do so by
* running a series of operations that collectively capture a vertical slice of the plugin, hitting every major piece
* of functionality. If they all succeed, then we can conclude that the plugin ... |
import React from 'react';
import CompanyItem from './CompanyItem';
import NavBar from '../components/NavBar';
import { Row, Button, Container, Alert } from 'reactstrap';
import { Link, Redirect } from 'react-router-dom';
import ls from 'local-storage';
import { connect } from 'react-redux';
import {
getCompanyRedu... |
import React from "react";
import classnames from "classnames";
import Chart from "chart.js";
import { Line, Bar } from "react-chartjs-2";
import {
Button,
Card,
CardHeader,
CardBody,
NavItem,
NavLink,
Nav,
Table,
Container,
Row,
Col,
} from "reactstrap";
// core components
import CardsHeader fro... |
import GL from '@luma.gl/constants';
import {AnimationLoop, Framebuffer, setParameters, clear, CubeGeometry, Model} from '@luma.gl/core';
import {Matrix4, radians} from 'math.gl';
const INFO_HTML = `
<p>
Simple <b>shadow mapping</b>.
<p>
A luma.gl <code>Cube</code>, rendering into a shadowmap framebuffer
and then re... |
import { padZero, range } from 'wot-design/src/utils'
import pickerViewProps from '../../packages/picker-view/src/pickerViewProps'
const times = (num, formatter) => {
let index = -1
let array = []
while (++index < num) {
array.push(formatter(index))
}
return array
}
const currentYear = new Date().getF... |
$(document).ready(function(){
fetchContributor();
$(document).on('keyup',"#promo",function(){
var promo = $("#promo").val();
$.ajax({
url: 'inc/code.php',
type: 'POST',
data:{promo:promo},
dataType: 'json',
success:function(response){
console.log(response.flag)
$("#promo").c... |
// Functions Javascript for App
// Routes
var routes = {
ub_countries : '/dashboard/json/ub/countries',
ub_departaments : '/dashboard/json/departaments/',
ub_provinces : '/dashboard/json/provinces/',
ub_districts : '/dashboard/json/districts/',
esp_tipo : '/dashboard/json/esp_tipos',
especi... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import {
MuiPickersUtilsProvider,
KeyboardTimePicker,
KeyboardDatePicker,
} from '@material-ui/pickers';
import moment from 'moment';
import Typography from '@material-ui/core/Typog... |
const EventEmitter = require('events');
const PrivateRoom = require('./PrivateRoom');
const MatchRoom = require('./MatchRoom');
const Producer = require('./Producer');
// Twitch stuff
const TwitchAuth = require('twitch-auth');
const StaticAuthProvider = TwitchAuth.StaticAuthProvider;
const RefreshableAuthProvider = Tw... |
import React from "react";
import Link from "next/link";
import {
possibleFacets,
mapURLPrettifiedFacetsToUgly,
mapFacetsToURLPrettified
} from "constants/search";
import { removeQueryParams, joinIfArray } from "lib";
import utils from "stylesheets/utils.scss";
import css from "./FiltersList.scss";
const close... |
var lista_usuario = [];
//Busca as informações contidas dentro do banco de dados.
async function carregarUsuario(){
const response = await axios.get('http://localhost:8000/usuarios');
const usuarios = response.data
const lista = document.getElementById('usuarios_cadastrados');
lista.inn... |
import React, { Component } from 'react';
import { Dimensions, Image, ScrollView, StatusBar, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import IO from 'react-native-vector-icons/Ionicons';
import { Button, FailedModal, Header } from '../../../../components';
import { colors } from '../.... |
var POSTGRES_STARTUP_TIMEOUT = 10000;
// In Meteor 1.2, the paths to the required tool files has changed,
// if an error occurs loading the file, try the next set.
var TOOL_PATHS = [
{
// Meteor < 1.2
fiberHelpers: 'fiber-helpers.js',
cleanup: 'cleanup.js'
},
{
// Meteor >= 1.2
fiberHelpers: ... |
//Constant variables
var MAX_SPHERE_SEGMENTS = 32;
var ambientLightColor = 0xffffff;
var sunLightColor = 0xffffff;
var ambientLightIntensity = 0.25;
var earthRadius = 1.0;
var sunRadius = earthRadius * 109.0;
var moonRadius = earthRadius * 0.25;
var distanceBetweenEarthAndMoon = earthRadius * 60.3;
var distanceBetweenE... |
// This is the backend that is injected into the page that a Angular
// app lives in when the Angular Devtools panel is activated.
import { initEventsBackend } from './events'
import { stringify } from '../util'
import path from 'path'
// Use a custom basename functions instead of the shimed version
// because it doe... |
import React, { Component } from 'react'
import {
StyleSheet,
View,
TouchableOpacity,
Text,
Dimensions
} from 'react-native'
import { inject, observer } from 'mobx-react'
import ActionSheet from '../index'
import TaskShareSecondSheet from '../taskShareSecond/index'
import ShareLinkSheet from '../sha... |
var express = require('express');
var router = express.Router();
const {Pool, Client} = require('pg');
var nodemailer = require('nodemailer');
const pool = new Pool({
user: 'jenhnltobjifnz',
host: 'ec2-54-204-21-226.compute-1.amazonaws.com',
database: 'df07n687imb2qc',
password: '<PASSWORD>',
port... |
let once66 = true
let link = ""
let once67 = true
var player;
let playerWidth
let playerHeight
//document.getElementById('player').style.display = "none"
// function createNewPlayer(link)
// {
// if(myHostId != mySocketId)
// syncYoutube()
// let newPlayer = document.createElement('video')
// newPl... |
/* eslint-disable no-unused-expressions */
import APIFactory from '../APIFactory';
import Cache from '../../util/Cache';
import ChunkedUploadAPI from '../ChunkedUpload';
import PlainUploadAPI from '../PlainUpload';
import FolderAPI from '../Folder';
import FileAPI from '../File';
import WebLinkAPI from '../WebLink';
i... |
let user_data = {'theme': 'light', 'color': 'blue'};
let user_logined = false;
// Кэширование фонов
let background = {
'light' : new Image(),
'dark' : new Image()
};
background.light.src = 'static/images/backgrounds/light.jpg';
background.dark.src = 'static/images/backgrounds/dark.jpg';
// Кэширование GIF
let m... |
/*
@author : <NAME>
@date : 29/06/2021
*/
const keySpeakerDAO = require('../dal/key-speaker.dao');
const path = require('path');
const fileIOHelper = require('../util/file-io-helper.util');
const dirService = require('../service/dir.service');
const conferencePostKeySpeakerFullDirPath = path
.join(process.cwd(), ... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
}); // es6 export default
const path = require('path');
const debugLog = require('debug');
const Ora = require('ora-min');
const readPkgUp = require('read-pkg-up');
const parentDir = path.dirname(module.parent.filename);
const pkgName =
readP... |
'use strict'
const cli = require('heroku-cli-util')
const nock = require('nock')
const cmd = require('../../../commands/pipelines/info')
describe('pipelines:info', function () {
let pipelines, couplings, apps, api, pipeline, stage
const appNames = [
'development-app-1',
'development-app-2',
'review-a... |
const program = require("commander");
const through = require("through2");
const fs = require("fs");
const path = require("path");
const util = require("util");
const Importer = require("../modules/importer").default;
const myImporter = new Importer({});
const breakIfDoesntExist = filePath => {
if (!fs.existsSync(fi... |
const Discord = require("discord.js");
const Attachment = require("discord.js").Attachment
const RichEmbed = require("discord.js").RichEmbed;
const boxen = require("boxen")
const writeFile = require("write")
const fs = require('fs')
const talkedRecently = new Set();
const modes = ['write', 'recover']
module.exports.run... |
'use strict'
/**
* <p>This is a subclass implementation of ldapjs.Server. It's purpose is to
* allow Active Directory style credential authorizations, e.g.:</p>
*
* <ul>
* <li>username</li>
* <li>username@domain</li>
* <li>domain\username</li>
* </ul>
*
* <p>Where possible, we use the super class metho... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.