text
stringlengths
3.07k
16k
const Calls = require('../database/monk') const delay = ms => new Promise(res => setTimeout(res, ms)); const { MessageButton, MessageActionRow, MessageMenuOption, MessageMenu } = require('discord-buttons'); const { MessageEmbed, MessageAttachment } = require('discord.js'); module.exports = async (client, button) => { ...
import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import Link from 'gatsby-link'; import '../style/index.scss'; const Layout = ({ children, site, about }) => { const [aboutOpen, setAboutOpen] = useState(false); const [titleVisible, se...
// Supported homepage reading languages const readingLanguages = ["en-us", "fr", "pt-br"]; // Our introduction text const introductionHtml = { "en-us": ` <p> WebAssembly (Wasm) is an universal low level bytecode that runs on the web. It is a compilation target for languages like <b class="highl...
$(document).ready(function () { // Data to pre-fill start and end dates var now = new Date(); var fiveYrAgo = new Date(); fiveYrAgo.setYear(now.getFullYear() - 5); document.getElementById('start_date').valueAsDate = fiveYrAgo; document.getElementById('end_date').valueAsDate = new Date(); $(...
'use strict'; /** * Canvas Parallax * Copyright © 2017, <NAME> <<EMAIL>> * Published under MIT license. * * @param {int} data-speed - aspect of the motion. Valid only for start: top * @param {string} data-start - from where start to render motion. Values: [document|passTop|passBottom]. Default: bottom * @param ...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ var isDragging = false; var startingPos = []; var s; function start() { // Add a method to the graph model that returns an ...
import React, { useMemo, useState, useEffect } from 'react' import { NavLink, useLocation } from 'react-router-dom' import { useTranslation } from 'react-i18next' import useCollapse from 'react-collapsed' import { gql, useQuery } from '@apollo/client' import styled from 'styled-components' import { useAllBondDetails }...
import React from 'react' import Layout from '../components/layout' import { Typography, ThemeProvider, createMuiTheme, Box, Button } from '@material-ui/core' import Spacer from '../components/basic/Spacer' import SiteContainer from '../components/SiteContainer' import { makeStyles } from "@material-ui/styles" import S...
import deepEql from "deep-eql"; import anime from "animejs"; import Loader from "./loader/loader.js"; import { scrollTo } from "./scroll-utils.js"; class Navigator { constructor(shell) { this._loadedPageName = null; this._currentScript = () => {}; this._meta = {}; this._state = {};...
var mongoose = require('mongoose'); var express = require('express'); var session = require('express-session'); var config = require('./config/development'); var ejs = require('ejs'); var bodyParser = require('body-parser'); var CRUDRouter = require('./back-end/Routers/Router'); function createCrudRouter(app, ...
import React, { useCallback } from 'react'; import PropTypes from 'prop-types'; import { Route, useHistory, useLocation, } from 'react-router-dom'; import { FormattedMessage } from 'react-intl'; import { useStripes } from '@folio/stripes/core'; import { MultiColumnList, checkScope, HasCommand, } from '@fol...
function delay_run() { $(document).ready(function () { $('#refresh_bt').click(refresh_bt_on_click); $('#server_status_bt').click(server_status_bt_on_click); $('#websocket_status_bt').click(websocket_status_bt_on_click); $('#clear_local_log_bt').click(clear_client_log); $('#we...
/* * This file is part of EC-CUBE * * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. * * http://www.ec-cube.co.jp/ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $(function() { $('.pagetop').hide(); $(window).on('s...
import invariant from 'invariant'; import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import StaticContainer from 'react-static-container'; import { isReactChildren } from 'react-router/lib/RouteUtils'; import { compilePattern } from 'react-router/lib/PatternUtils'; import getRouteParams ...
import gql from 'graphql-tag'; import { useEffect } from 'react'; import { t, ngettext, msgid } from 'ttag'; import { useRouter } from 'next/router'; import { useQuery, useLazyQuery, useMutation } from '@apollo/react-hooks'; import Head from 'next/head'; import Link from 'next/link'; import withData from 'lib/apollo';...
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) { try { step(gene...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("...
'use strict'; var path = require('path'); var fm = require('front-matter'); var marked = require('marked'); var md = require('reveal.js/plugin/markdown/markdown'); var Mustache = require('mustache'); var mkdirp = require('mkdirp'); var fs = require('fs'); var opts = { printMode: false, separator: '^(\r\n?|\n)...
import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; import { gsap } from 'gsap'; import Modal from 'react-modal'; import BirthdaySvg from '../assets/svg/Occasion.svg'; import PostcardSvg from '../assets/svg/Postcard.svg'; import...
/* eslint-disable new-cap */ /* eslint-disable max-len */ 'use strict'; var assert = require('assert-diff'); var fixtures = require('./fixtures').txConverter; var addresses = require('./../fixtures').addresses; var txToRestConverter = require('./../../api/lib/tx-to-rest-converter.js'); suite('unit - converter - Tx to...
import React, { useState, useEffect } from "react"; import { Redirect, Link } from "react-router-dom"; import axios from "axios"; import { LoggedInNavbar } from "../components/Navbar"; function Account() { const [loggedIn, setLoggedIn] = useState(true); const [firstName, setFirstName] = useState(""); const [last...
let video; let poseNet; let poses = []; let options = { imageScaleFactor: 0.3, outputStride: 8, minConfidence: 0.3, maxPoseDetections: 1, detectionType: 'single', multiplier: 0.75, } let videoFile = 'Top Fifteen Female Ballet Dancers.mp4'; let videoFrom = 195 let videoTo = 200; let videoDuratio...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }...
import oj_names from './oj_names' import crawlers_map_init from './crawlers_map' import user_tags from '@/views/ranklist/user_tags' export default async function(users_info, vm) { // loading_button 结束 const other_oj_names = ['poj', 'uva', 'leetcode_cn'] const crawlers_map = crawlers_map_init() const total_cnt =...
import React from 'react' import HangerGraphics from './HangerGraphics' import BounceLoader from "react-spinners/BarLoader" import { Animated } from "react-animated-css" import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faRedo } from '@fortawesome/free-solid-svg-icons' class Hanger extends Reac...
import React from 'react' import PropTypes from 'prop-types' import { Form, Input, InputNumber, Radio, Modal, Cascader, Row, Col, Card, Icon, Tooltip} from 'antd' import city from '../../utils/city' const Search = Input.Search const FormItem = Form.Item const formItemLayout = { labelCol: { span: 6, }, wrapp...
import { render, cleanup } from 'react-testing-library' import Timeline from 'lib/Timeline' import SidebarHeader from 'lib/headers/SidebarHeader' import DateHeader from 'lib/headers/DateHeader' import TimelineHeaders from 'lib/headers/TimelineHeaders' import 'jest-dom/extend-expect' import React from 'react' import mo...
// Tracks the Requests var requestCount = 0; var MARGIN = -900; var SPACE = 38; // Calculates the GB per Day for every product in the Dataset function getGBperDay() { Datasets.forEach(function(data) { var vol = calcVolume(data); data.GBperDay = vol; }); } function calcVolume(product)...
var express = require('express'); var router = new express.Router(); router.get('/', function(req, res) { res.sendFile(appRoot + sep + 'index.html'); }); router.get('/api/users/getUser/:id', function(req, res) { var users = require(appRoot + sep + 'models' + sep + 'user.js'); users.get(req.params.id, function(user...
/* * Entry point for the companion app */ import { settingsStorage } from "settings"; import { localStorage } from 'local-storage'; import { outbox } from "file-transfer"; import { device } from "peer"; import * as messaging from "messaging"; function extractSetting(settingName, defaultValue, typeMap = val => Num...
var mouseDown = false; var vals = { rpx: 50, rpy: 300, c1x: 150, c1y: 200, c2x: 300, c2y: 400, rps: "none", tep: 0 }; var startVals = Object.assign({}, vals); $("#point, [id^=car]").mousedown(function() { mouseDown = this.id; return false; }); $(document).mouseup(function() { mouseDown = fal...
import ConexionBD from '../../db/oracledbconnector.js'; import ex from '../../info/exceptions/exceptions.js'; import Producto from '../../entities/Producto.js'; import OracleDB from 'oracledb'; /** * ProductoRepository * * Contiene las operaciones para obtener, modificar y * crear productos en la base de datos....
import { Button, Input, InputNumber, Modal, Space, Table } from "antd"; import { default as React, useEffect, useState } from "react"; import Confirm from "../../../../component/Confirm"; import Error from "../../../../component/Error"; import axios from "axios"; import sorter from "../../../../../util/sorter"; import...
/** * Calc of available departments * @param {Object[]} people Array of people * @param {Object[]} depts Array of deparments * @return {Object[]} Array of deparments available */ function deptsAvailable_(people, depts) { // check how many people do not have an assigned deparment var noDeptPeople = 0; ...
import React from 'react' import { M, BM } from 'ui/components/equations' import { Par, SubHead } from 'ui/components/containers' import FloatUnitInput from 'ui/form/inputs/FloatUnitInput' import { InputSpace } from 'ui/form/Status' import StepExercise from '../types/StepExercise' import { useSolution } from '../Exer...
require('dotenv').config(); const bip39 = require("bip39"); const bip32 = require("ripple-bip32"); const RippleAPI = require('ripple-lib').RippleAPI; // const RIPPLE_PROVIDER = 'wss://s1.ripple.com'; // Production ripple provider const RIPPLE_PROVIDER = 'wss://s.altnet.rippletest.net:51233'; // // Developmnet ripple pr...
$(document).foundation(); Foundation.Keyboard.register('DropdownMenu',{ // 'ENTER': 'open', 'SPACE': 'open', 'ARROW_RIGHT': 'next', 'ARROW_UP': 'up', 'ARROW_DOWN': 'down', 'ARROW_LEFT': 'previous', 'ESCAPE': 'close' }); // $(document).ready(function(){ // $("a[rel^='prettyPhoto']").prettyPhoto...
var gcloud = require('gcloud'); // Override logging to easily omit logs during tests var logger = require('./logger'); var self = { /** * Counts the number of words in the line. */ 'worker': function(context, data) { // We expect the data argument to contain a 'line' property. var batch = data['ba...
var startTime, currentTime, seconds = 0, t, h, m, s, informedConsentAgreed; var ws = new WebSocket(location.href.replace(/^http/, "ws")); var startTimer = function() { if (startTime == undefined) { $("#time").html('00<span style="color:#3399FF;">:</span>00<span style="color:#3399FF;">:</span>00'); ...
#!/usr/bin/env node const fs = require('fs') const path = require('path') const updateNotifier = require('update-notifier') const meow = require('meow') const YAML = require('js-yaml') const GitHub = require('@octokit/rest') const cli = meow(` Usage $ github-push-global Options --plugin, -p Load plugin --fi...
const assert = require("assert"); const {getRectAbs} = require("../../src/helpers.js"); suite("helpers.js"); const backups = {}; let position = "absolute"; let x = 10; let y = 20; let width = 30; let height = 40; const computedStyles = ()=>({ borderLeftWidth: "10px", borderRightWidth: "12px", borderTopWidth: ...
//JSLint Initialisers var describe = describe || {}; var beforeEach = beforeEach || {}; var module = module || {}; var inject = inject || {}; var it = it || {}; var expect = expect || {}; var runs = runs || {}; var angular = angular || {}; var afterEach = afterEach || {}; /*var spyOn = spyOn || {}; var waitsFor = wait...
// GIVEN a weather dashboard with form inputs // WHEN I search for a city // --- // THEN I am presented with current and future conditions for that city and that city is added to the search history // WHEN I view current weather conditions for that city // THEN I am presented with the city name, the date, an icon repr...
import React, { Component } from 'react'; import { View, Text, SafeAreaView, TouchableOpacity, ImageBackground } from 'react-native'; import Loader from './common/loader' import jwtDecode from 'jwt-decode' import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome'; import { Sae } from 'react-native-textinpu...
var map = new SMap.Map('container', { resizeEnable: true, zoom: 14, center: [116.397428, 39.90923] }); map._inner.enableScrollWheelZoom(); //var map = new BMap.Map("container"); // 创建地图实例 //var point = new BMap.Point(116.404, 39.915); // 创建点坐标 //map.centerAndZoom(point, 15); var marker = ...
var _ = { defaultsDeep: require('lodash.defaultsdeep'), cloneDeepWith: require('lodash.clonedeepwith') }; /* eslint no-useless-escape: 0 */ var HIDE_DATA = [ 'password', '^otp$', '^pass$', '^token$', '\.routeConfig$', 'track2', '^encryptionPass$', '^ut5-cookie$', '^xsrf$', ...
import { LitElement, html, css } from 'lit'; export const Orientation = { Horizontal: 'horizontal', Vertical: 'vertical' }; export const ShipType = { Submarine: 'submarine', Carrier: 'carrier', Rescue: 'rescue', Battleship: 'battleship', Destroyer: 'destroyer' }; export function getShipSize(type) { ...
const express = require("express"); const Product = require("./models/ProductModel"); const User = require("./models/UserModel"); const Cart = require("./models/CartModel"); const dotenv = require("dotenv"); const connectDB = require("./dbConnection"); var path = require("path"); const bodyParser = require("body-parser...
/** * @module fw/Model * @license MIT License * @author <NAME> */ 'use strict'; var Application = require('./Application'); var FwAjax = require('./net/Ajax'); var FwPromise = require('./Promise'); var Loader = require('./net/Loader'); var ModuleError = require('./error/ModuleError'); var NetSource = require('./s...
var EventEmitter = require('events').EventEmitter, irc = require('irc'), fs = require('fs'), Mongolian = require('mongolian'); var Bot = module.exports = function Bot(config){ var bot = this; bot.details = { name: 'jsBot by 5o1', nick: config.bot.nick, commandPrefix: config.bot.commandPrefix, banned: co...
// react import React from "react"; // material ui import { makeStyles } from "@material-ui/core/styles"; import Grid from "@material-ui/core/Grid"; import Typography from "@material-ui/core/Typography"; import Button from "@material-ui/core/Button"; import Box from "@material-ui/core/Box"; import CardMedia f...
/** * This file is part of the OpenPasswd package. * * (c) <NAME> <<EMAIL>> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ function Account() { this.top_container = $('#manage-accounts'); this.container = $('#manage-accounts > d...
const Discord = require('discord.js'); const Canvas = require('canvas'); const {getMapping} = require("./../assets/heroic/mapping/index"); const maxMinions = 12; module.exports = { name: "challenge", aliases: ["vs", "fight", "c"], description: "Generates a random deck for two players", usage: "random ...
const { escapeHtml } = require('./validators'); /** * Copyright (c) 2019-2020 <NAME> (<EMAIL>) * All rights reserved. * * This source code is licensed under the MIT license found in the * README.md file in the root directory of this source tree. */ class WhereParser { /** * list of conditions and relati...
/*global require*/ /*global describe*/ /*global it*/ var assert = require("assert"); var solver = require("../src/main.js"); describe("Testing if optional objectives are taken into account", function () { it("should be able to construct and solve UI model", function () { // Elements composing the UI var nUIEle...
import refs from '../../refs/refs'; const { mainEL } = refs; export function blockHelpRenderOpen() { //variables //help buttons const helpButtonChat = document.querySelector('.button-chat'); const helpButtonScroll = document.querySelector('.button-scroll'); const helpButtonPhone = document.querySelector('.b...
import React, {Component} from "react"; import { Button, Row,Col,Label,FormGroup, Card, CardBody, CardHeader, Nav,NavLink,NavItem, TabContent,TabPane } from 'reactstrap'; import {connect} from "react-redux"; import * as qs from "query-string"; import classnames from "classnames"; import UserSelect from...
const fs = require('fs'); const path = require('path'); const rimraf = require('rimraf'); const nodeFetch = require('node-fetch'); let globalRetryCount = 0; const fetch = require('fetch-retry')(nodeFetch, { retries: 5, retryDelay: function(attempt, error, response) { globalRetryCount++; console...
/** * Created by <NAME> (<EMAIL>) on 18-06-18. */ var EquipmentManager = require('../shared/Equipment.js').EquipmentManager; import GameObject from './GameObject' import GameServer from './GameServer' import MovingEntity from './MovingEntity' import NPC from './NPC' import Utils from '../shared/Utils' import World ...
import React, { Component } from "react"; import Database from "variables/Database.js"; import moment from 'moment'; import { Route, Switch, Link } from 'react-router-dom'; // core components import MaterialTable, { MTableCell, MTableBodyRow } from "material-table"; import Typography from '@material-ui/core/Typography...
"use strict"; import joint from 'jointjs'; import _ from 'lodash'; import $ from 'jquery'; import Backbone from 'backbone'; import * as help from './help.js'; import * as cells from './cells.js'; import { Vector3vl } from '3vl'; let uniq_cntr = 0; export class IOPanelView extends Backbone.View { initialize(args)...
/**************************************************************************** Copyright (c) 2013-2016 Chukong Technologies Inc. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated engine source code (the "Software"), a limited, worldw...
'use strict'; const hours = ['6am', '7am', '8am', '9am', '10am', '11am', '12pm', '1pm', '2pm', '3pm', '4pm', '5pm', '6pm', '7pm']; const storeList = []; const addStoreForm = document.getElementById('addStoreForm'); function Store(name, minHourlyCust, maxHourlyCust, avgCookieSales, address, phoneNumber) { this.name = ...
import {scaleBand, scaleLinear} from '../utils/scale.js'; import {tooltip} from './tooltip.js'; const {m} = Malevic; const {render} = Malevic.DOM; const {withAnimation, animate} = Malevic.Animation; const isChrome = navigator.userAgent.includes('Chrome') || navigator.userAgent.includes('Chromium'); export function ni...
import Ease from './Ease.js'; export class Color { constructor(startColor, endColor) { // assume same format for start and end colors this.colorType = this.getColorType(startColor); this.startColor = this.decomposeColor(startColor); this.endColor = this.decomposeColor(endColor); } lerp(t) { let lerpColo...
function walk(rootNode) { // Find all the text nodes in rootNode var walker = document.createTreeWalker( rootNode, NodeFilter.SHOW_TEXT, null, false), node; // Modify each text node's value while (node = walker.nextNode()) { handleText(node); } } function handleText(textNode) { tex...
import Axios from 'axios'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import Main from './Main'; class VendorIndex extends Component { constructor(props) { super(props); this.state = { profileDropDown:false, ...
/** * Remove duplicate in an array * > in [23, 0, -23, 1, 5, 0] * > out [23, 0, -23, 1, 5] * * @param {[]} array */ function removeDuplicates(array) { // return [...new Set(array)]; // return array.filter( (item, index) => array.indexOf(item) === index ); const unique = []; for (const item of...
/** @jsxImportSource theme-ui */ import React from "react"; import useSWR from "swr"; import Image from "next/image"; import { Text, Spinner, Flex, Badge, Grid } from "theme-ui"; import FullBox from "./FullBox"; function DiscordServer() { const { data: discordData, error } = useSWR("https://canary.discordapp.com/ap...
// Copyright 2019 British Broadcasting Corporation // // 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 applicabl...
'use strict' /* AWS Lambda function handler.js * <NAME> * University of Washington, 2018-2020 * * Defines two Lambda functions that make up two halves of the UW-SlackR25Bot slash command, '/r25'. * The parse handler parses an incoming Slack slash command through the AWS Gateway, and processes/validates * it. Th...
var serverAddress = "insamling.postnummeruppror.nu"; //var serverAddress = "localhost:8080"; $(document).ready(function () { $("#account form").submit(function (event) { event.preventDefault(); if (!$("#acceptingCcZero").prop('checked')) { alert('Du måste kryssa i rutan om att släppa dina rapporter f...
import operationTypes from "./operation_types"; import appState from "./appState"; let { PrivateKey, key, TransactionBuilder, TransactionHelper } = dfd_js; export default { OperationTypes: operationTypes.types, haveEnoughBalance(spendAmountNu, spendAssetId, feeNu, accountBalances) { if (spendAmountNu.l...
var fs = require("fs"); var data = "# made using JavaSkript, the JavaScript compiler for Skript!\n"; var currentTabValue = ""; let debugMode = false; // OTHER function addToData(thing) { data = data + "\n" + currentTabValue + thing; }; // Adds @arg thing to the data variable function addToTab() { currentTabValue = cur...
import React from 'react' import PropTypes from 'prop-types' import { Table, Button, Cascader, Input, Form, InputNumber } from 'antd' import { connect } from 'dva' import city from 'utils/city' const FormItem = Form.Item const NumberCell = ({ editable, value, onChange, max }) => { return ( <div> { ...
var scoreCounter = 0; //create a score counter variable set it to 0 var currentQuestion = 0; //current question starts from 0 var userAnswer = ""; // current answer the user picks set it to empty as it is still an unknown var timeLeft = 60; var highscores = []; //create object's properties and set up a quiz questions a...
import { vec3, vec4 } from 'gl-matrix'; import { DOF } from '../Joint.js'; const tempPos = new Float64Array( 3 ); const tempQuat = new Float64Array( 4 ); const tempEuler = new Float64Array( 3 ); export function accumulateClosureError( solver, joint, startIndex, errorVector = null, result = { isConverged: false, r...
'use strict'; let data1 = []; let data2 = []; // let where save the kaywords for the items let keywords = {}; ///////////////////// ask for data ////////////////// $.get('data/page-1.json').then(data => { /// loop in the data and build an constructor object and push it to the data1 array to save for the pages then c...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }...
/* jhuAxe.js Converts an axeS report to JSON and HTML jhuAxe reports listing per-URL scores. This proc requires 2 arguments: 0. the suffix of the base of the name of the axeS report. 1. the suffix of the base of the name of the jhuAxe report. */ // ########## IMPORTS // Module to access files. const fs = ...
//----------------------------------------------------------------- // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this file, // You can obtain one at http://mozilla.org/MPL/2.0/. // // Copyright (c) 2015, <NAME> // Author: <NA...
// global definitions var platform = require('./platform'); Fire.Platform = platform; /** * @property {Boolean} isNode - !#en indicates whether executes in node.js application !#zh 是否在 nodejs 运行环境下 */ Fire.isNode = !!(typeof process !== 'undefined' && process.versions && process.versions.node); Fire.isNodeWebkit =...
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] =...
/** Copyright (c) 2019 Uber Technologies, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ const path = require('path'); const execa = require('execa'); const fse = require('fs-extra'); const globby = require('globby'); const {equ...
/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not...
// functions: // sha256 // XOR_hex // authenticateMe function XOR_hex(a, b) { var res = '', i = a.length, j = b.length while (i-- > 0 && j-- > 0) res = (parseInt(a.charAt(i), 16) ^ parseInt(b.charAt(j), 16)).toString(16) + res return res } function sha256(ascii) { function rightRotate(value,...
"use strict"; // connection const socket = io.connect('http://localhost:1024'); // characters const chatters = Rx.Observable.of([ { id: "", name: "norryowl", nameDisplay: "Norryowl", avatar: "fallout-geralt.jpg" }, { id: "valorad", name: "valorad", nameDisplay: "Valorad", avatar:...
var PromiseUtils = require('../util/PromiseUtils'); var ObjectUtils = require('../util/ObjectUtils'); // TODO: make promise based instead of sending callbacks /** * Provides useful canvas-related methods */ function CanvasUtils() {} // REVIEW: add documentation about what happens if the image is corrupt /** * Loa...
var emulateState = false; var currentHeading = 0; /* Keyboard events */ document.addEventListener('keydown', handleKeyEvent); document.addEventListener('keyup', handleKeyEvent); var lastKey = null; var activeKeys = { 'ArrowUp': false, 'ArrowDown': false, 'ArrowLeft': false, 'ArrowRight': ...
import React, {Component} from 'react'; import PropTypes from 'prop-types'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import classNames from 'classnames'; import {compose} from 'recompose'; import {Button, Icon} from '@momentum-ui/react'; import TitleBar from '@webex/react-componen...
import katex from 'katex' import mermaid from 'mermaid' import prism, { loadedCache, transfromAliasToOrigin } from '../../../prism/' import { CLASS_OR_ID, DEVICE_MEMORY, PREVIEW_DOMPURIFY_CONFIG, HAS_TEXT_BLOCK_REG } from '../../../config' import { tokenizer } from '../../' import { snakeToCamel, sanitize, escapeHtml, ...
var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { ext...
import React, { Component } from 'react'; import { Calendar, momentLocalizer } from 'react-big-calendar'; import { connect } from 'react-redux'; // import events from '../events'; import moment from 'moment'; import 'react-big-calendar-like-google/lib/css/react-big-calendar.css' import Cookie from "js-cookie"; import E...
/* * GET home page. */ var LOGINS = require('../dummy_data/logins.json'); var USERS = require('../dummy_data/users.json'); var TEAMS = require('../dummy_data/teams.json'); var data = {}; exports.view = function(req, res){ if (!req.session.userID) res.redirect('/'); var userID = req.session.userID; data.currUser...
import { TextInput, Box, MultiSelect, Select, InputBox } from '@rocket.chat/fuselage'; import { useMutableCallback, useLocalStorage } from '@rocket.chat/fuselage-hooks'; import moment from 'moment'; import React, { useEffect, useMemo } from 'react'; import { useSubscription } from 'use-subscription'; import AutoComple...
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' // 'starter.services' is found in services.js // ...
// Make map and tiles const mymap = L.map("issMap", { minZoom: 1 }).setView([0, 0], 1); const attribution = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'; const tileUrl = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"; const tiles = L.tileLayer(tileUrl, { attribution })...
import { FEATURE_TERRAIN } from '../core/constants'; import { Vector3, Triangle, Box3, BufferGeometry, Float32BufferAttribute, Uint16BufferAttribute, Mesh } from '../Three'; // preallocated for projected area calculations const __a = new Vector3(); const __b = new Vector3(); const __c = new Vector3(); const __d = ...
// Make sure this extension works universally. self.browser = self.browser || self.chrome; importScripts(['patterns.js']); // The response bodies of all resources requested by the page. let responseBodies = []; // The detected Fugu APIs. let detectedAPIs = new Map(); // For translation strings. let messages; // Ne...
var eventType = require('../../interpreter/constants').eventType; var _ = require('lodash'); module.exports = function (ngModule) { ngModule.directive('track', [function () { return { restrict: 'E', replace: true, template: require('./track.html'), scope: { sequencer: '=', ...