text stringlengths 3.22k 29.5k |
|---|
/**
* Created by cs22 on 04/12/14.
*/
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
var svgs = getAllSVGElements ();
var fnames = svgs.map (function (svg) { return helpfulFilename (svg); })
var promises = svgs.map (function(svg) { return makeSVGDoc (svg)... |
import React from "react";
import ReactDOM from "react-dom";
import styled from "styled-components";
import { GoogleApiWrapper } from "google-maps-react";
import _ from "lodash";
import { CrossIcon } from "./Icons";
import Loading from "./Loading";
import config from "../config";
import { geoCode, getUberEstimate } fr... |
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subC... |
//------------------------------
//Picker
//------------------------------
jQuery(function() {
jQuery( "#datepicker,#datepicker2,#datepicker3,#datepicker4,#datepicker5,#datepicker6,#datepicker7,#datepicker8" ).datepicker();
});
//------------------------------
//Custom Select
//------------------------------
jQuery... |
import React from 'react'
import { Col, Row, Tabs, Button, Input } from 'react-materialize'
import Results from '../../components/Results/results_index.js'
import Questionnaire from '../../components/Questionnaire/Questionnaire.js'
import AboutSlider from '../../components/AboutSlider'
class Home extends React.Compone... |
/////////////// ENEMY_ABILITIES ///////////////
// Add damage over time effect
function damageOverTime(victim,attacker) {
var amount = attacker.currentAbility.abilityDamge;
// Display status ailment
flashMessage(victim,attacker.currentAbility.dotStatus,attacker.currentAbility.damageDuration);
//... |
import PropTypes from 'prop-types';
import { Quill } from 'react-quill';
import { Icon } from '@iconify/react';
import ReactDOMServer from 'react-dom/server';
import codeFill from '@iconify/icons-eva/code-fill';
import roundUndo from '@iconify/icons-ic/round-undo';
import roundRedo from '@iconify/icons-ic/round-redo';
... |
import { CanvasElement } from "./CanvasElement.js";
import { extendUI } from "https://js.sabae.cc/extendUI.js";
import { CSV } from "https://js.sabae.cc/CSV.js";
const COLOR_F = [0, 0, 0];
const COLOR_B = [255, 255, 255];
const COLOR_B_SELECED = [200, 228, 255];
const FH = 40;
const drawTextBox = (g, colf, colb, s, ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RawSqlResultsToEntityTransformer = void 0;
const OrmUtils_1 = require("../../util/OrmUtils");
const DriverUtils_1 = require("../../driver/DriverUtils");
const ObjectUtils_1 = require("../../util/ObjectUtils");
/**
* Transforms raw sql... |
/// An abstract gesture recognizer.
export class Gesture {
static Type = {
POINTER: 'pointer',
SCROLL: 'scroll',
};
static PointerType = {
MOUSE: 'mouse',
PEN: 'pen',
TOUCH: 'touch',
};
/// Event priority negotiation:
/// Only gesture recognizers with the... |
'use strict';
const util = require('util');
const hasOwn = require('object.hasown').getPolyfill();
const {
STRIP_ALL_COMMENTS,
NATIVE_CONSTRUCTOR,
ALL_SPACES,
NATIVE_EXTENDS,
STATICSET,
STATICGET,
GET,
SET,
HAS,
DELETE,
CONSTRUCT,
NATIVE_THIS_PRIVATE,
STRIP_LINE_CO... |
export const EMPLOYEE_TYPE = {
STAFF: "STAFF",
DRIVER: "DRIVER",
CONTRACTOR: "CONTRACTOR",
UNKNOWN: "UNKNOWN",
};
export const OFFICE_TYPE = {
BOARD: "BOARD",
DIRECTORATE: "DIRECTORATE",
SUBSIDIARY: "SUBSIDIARY",
DEPARTMENT: "DEPARTMENT",
UNIT: "UNIT",
SUBUNIT: "SUBUNIT",
UN... |
const T = require("./Twit.js");
const my_user_name = require("../config").userName;
const timeout = 1000 * 60 * 5; // timeout to send the message 5 min
var fs = require("fs");
var path = require("path");
var timer = 10000;
const led_start = require("./led_start.js");
//var CronJob = require('cron').CronJob;
ima... |
"use strict"; //Strict mode makes it easier to write "secure" JavaScript.
/**
* Creates a new Filter according to a protocol (ex: http, https, mailto)
* Stores all URL having the chosen protocol
* Stores duplicates in separate array
* @class Filter
*/
class Filter {
/**
* @constructs Filter
* @param {string} pro... |
import {
AppShell,
AreaChart,
BarChart,
BasicTable,
KPI,
Link,
PageHeader,
PairIcon,
TokenIcon,
Transactions,
} from "app/components";
import { Box, Grid, Paper, Typography } from "@material-ui/core";
import {
formatCurrency,
formatDecimal,
getApollo,
getEthPrice,
getPair,
getPairDayData... |
/*!
* ioBroker gulpfile
* Date: 2019-01-28
*/
'use strict';
const gulp = require('gulp');
const fs = require('fs');
const pkg = require('./package.json');
const iopackage = require('./io-package.json');
const version = (pkg && pkg.version) ? pkg.version : iopackage.common.version;
const del ... |
import { PrivateRoute,BreadCrumb } from "@egovernments/digit-ui-react-components";
import React from "react";
import { useTranslation } from "react-i18next";
import { Link, Switch, useLocation } from "react-router-dom";
import { PTLinks } from "../../Module";
import Inbox from "./Inbox";
import PaymentDetails from "./P... |
var EverliveError = require('./EverliveError').EverliveError;
var common = require('./common');
var _ = common._;
var rsvp = common.rsvp;
var Everlive = require('./Everlive');
var platform = require('./everlive.platform');
var path = require('path');
var constants = require('./constants');
var utils = {};
utils.guard... |
import React, { useContext } from "react";
import "./App.css";
import { BrowserRouter as Router, Route, Routes, Link, Navigate, } from "react-router-dom";
import { PermIdentity, PostAdd, NotificationsNone, PowerSettingsNewOutlined } from "@material-ui/icons";
import Home from "./pages/Home";
import CreatePost from "./... |
'use strict'
const levels = require('log4js').levels
const DEFAULT_FORMAT = ':remote-addr - -' +
' ":method :url HTTP/:http-version"' +
' :status :content-length ":referrer"' +
' ":user-agent"'
/**
* Log requests with the given `options` or a `format` string.
* Use for Koa v1
*
* Options:
*
* - `format` ... |
/**
* @author Drew
*/
var outputFormat = "CBDQ";
//Fixme I don't work with single item lists because the english grammar is hard
function listOf(listName,items){
return ["#"+items+"#, #"+listName+"#","#"+items+"# and #"+items+"#"];
}
//"[ingredients:#ingredients# artichoke]artichoke" for example. This appends ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Context = 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; descript... |
/**
* A simple Backbone-like model implementation
*/
'use strict';
var EventEmitter = require('events');
var copy = require('xtend');
module.exports = class Model extends EventEmitter {
constructor() {
super();
this.attributes = {};
}
get(key) {
return this.attributes[key];
}
set(key, val, options) {
... |
import React, { Component } from "react";
import AsyncSelect from "react-select/async";
import AsyncCreatable from "react-select/async-creatable";
import "whatwg-fetch";
const ACTION_TYPE = {
REMOVE: "remove-value",
ADD: "select-option",
CREATE: "create-option",
CLEAR: "clear",
};
class ReactSelectWidget ext... |
import React, { useMemo, useState } from "react";
import { scaleLinear } from "d3-scale";
import { format } from "d3-format";
import { range } from "d3-array";
import { line } from "d3-shape";
import { normal } from "jstat";
import { useGesture } from "react-use-gesture";
import { useSpring, animated } from "rea... |
require("actions.js")
var barrels = [];
var pins = [];
var actions = {};
var correspondingMove = {};
var actionsArray = [];
var plan;
var planIdx = 0;
function performNext() {
if(planIdx < plan.length) {
//print("plan[" + planIdx + "] = " + plan[planIdx].name)
plan[planIdx++].perform(redAgent, performNext)
}
}
... |
// mox - S3 mock-up for node.js
//
// Copyright(c) 2011-2012 Nephics AB
// MIT Licensed
//
var crypto = require('crypto');
var fs = require('fs');
var events = require('events');
var path = require('path');
var util = require('util');
function fakeReadableStream() {
var self = new events.EventEmitter();
self.r... |
$(document).ready(function()
{
$('#destino1').on('change',function(e){
var cant_id = e.target.value;
//ajax
$.get('/distancia?cant_id=' + cant_id, function (data)
{
$('#kilo1').empty();
$.each(data,function(index, subcatObj){
... |
/*
* Copyright 2018 Apple Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following di... |
import React, { Component } from 'react';
import Link from 'gatsby-link';
import { css } from 'emotion';
import PropTypes from 'prop-types';
import feather from '../../utils/feather';
import colors from '../../utils/colors';
import MobileNav from './mobile';
import media from '../../utils/media';
import { Box } from '.... |
const loader = document.querySelector("#loading");
const loadingEnded = false;
/* ------------------------------ Fetching data ------------------------------ */
async function getDataFromBackend() {
// Call my express api (or localhost during testing)
const jsonResponseObj = await fetch("https://localhost:8000/chi... |
import { Fragment, useState, useEffect, createContext } from 'react'
import {
Link,
routes,
useLocation,
SkipNavLink,
SkipNavContent,
navigate,
} from '@redwoodjs/router'
import { useAuth } from '@redwoodjs/auth'
import { Form, Label, TextField, Submit } from '@redwoodjs/forms'
import { Toaster } from '@red... |
import React from 'react'
import { graphql } from 'gatsby'
import { generatePath } from 'gatsby-plugin-advanced-pages'
import { skillTagGroups } from '../constants'
import { cx } from '../util'
import { useSiteMetadata } from '../hooks'
import { Page, Heading, Section, Link, Icon } from '../components'
import { Contact... |
// Based on js-yaml demo:
// https://github.com/nodeca/js-yaml/tree/master/support/demo_template
const jsyaml = window['jsyaml']
const CodeMirror = window['CodeMirror']
const base64 = (function () {
// Base64 encoder/decoder with UTF-8 support
//
// Copyright (c) 2011 <NAME>
// Copyright (c) 2011 <NAME>
//
... |
/**
* Moonstone styled tooltip components.
*
* @module moonstone/TooltipDecorator
*/
import hoc from '@enact/core/hoc';
import {I18nContextDecorator} from '@enact/i18n/I18nDecorator';
import {FloatingLayerBase} from '@enact/ui/FloatingLayer';
import {forward, handle, forProp} from '@enact/core/handle';
import {Job... |
/*! claygifford-Task | MIT License | https://github.com/claygifford/claygifford-task/ */
import React from 'react';
import styles from './SortableList.less';
import withStyles from '../../decorators/withStyles';
import Draggable from '../Draggable';
// var DragElement = React.createClass({
// propTypes: {
// ch... |
function autocomplete(searchEle, arr) {
var currentFocus;
searchEle.addEventListener("input", function(e) {
var divCreate,
b,
i,
fieldVal = this.value;
closeAllLists();
if (!fieldVal) {
return false;
}
currentFocus = -1;
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
require("core-js/modules/es.array.map.js");
require("core-js/modules/es.array.filter.js");
require("core-js/modules/es.object.to-string.js");
require("core-js/modules/es.array.concat.js");
require("core-js/mod... |
/****************************************************************************\
* Copyright (C) 2017 Scandy
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
*... |
"use strict";
var substitutions = require("./substitutions");
var SlackEventHandler = require('./SlackEventHandler');
var BaseSlackHandler = require('./BaseSlackHandler');
var rp = require('request-promise');
var qs = require("querystring");
var Promise = require('bluebird');
var promiseWhile = require("./promiseWhile... |
import { Tabs, Tab } from 'react-bootstrap'
import idleDAI from '../abis/idleDAI.json'
import React, { Component } from 'react';
import DAI from '../abis/DAI.json'
import idledai from '../idledai.png';
import Web3 from 'web3';
import './App.css';
import { Puff } from '@agney/react-loading';
let web3 = ''
const daiAdd... |
function close_window() {
SoloAlert.confirm ({
title: "Do you want to exit?",
body: "Are you sure?",
theme: "dark",
useTransparency: true,
onOk: function () {
close ();
},
onCancel: function () { },
})
}
function reset_rec() {
SoloAlert.confirm ({
title: "Do you want to reset records?",
... |
console.clear();
const url = "https://raw.githubusercontent.com/FreeCodeCamp/ProjectReferenceData/master/cyclist-data.json"; //Data source.
const svgWidth = 900; //Width of SVG.
const svgHeight = 500; //Height of SVG.
const svgPadding = 70; //Padding from edge of SVG.
const timeFormat = d3.timeFormat("%M:%S"); //Y-a... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _classnames = _interopRequireDefault(require("classnames"));
var _ui = require("@sanity/ui");
var _react = _interopRequireWildcard(require("react"));
var _reactPopper = require("react-popper");
var _portal... |
import React from "react";
import Helmet from "react-helmet";
import {
Code,
Headline,
ListItem,
Paragraph,
Title,
SubTitle,
SyntaxHighlighter
} from "../../components/Body";
import { AnchorLink, Line, Link } from "../../components/Navigation";
import * as examples from "./Examples";
const styles = {
l... |
/* Format string */
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] != 'undefined'
? args[number]
: match
;
});
};
/* Counter for how many analysis has been done */
function geneCount() {
if ($... |
$('#customerAdd').submit((event) => {
console.log("Tıklandı.")
event.preventDefault();
const c_name = $("#c_name").val()
const c_surname = $("#c_surname").val()
const c_phone = $("#c_phone").val()
const c_mobile_phone = $("#c_mobile_phone").val()
const c_email = $("#c_email").val()
cons... |
const path = require('path');
const fs = require('fs');
const nodeFilelist = require('node-filelist');
let { hashElement } = require('folder-hash');
let { version } = require("../package.json");
let marked = require('marked');
let contrast = require('./contrast');
let rimraf = require("rimraf");
let Chokidar = require... |
class PortfolioProject {
constructor(_title, _urlref, _imgref, _imghoverref, _description, _type) {
this.title = _title;
this.urlref = _urlref;
this.imgref = _imgref;
this.imghoverref = _imghoverref;
this.description = _description;
this.type = _type;
}
Seria... |
import React, { Component } from "react";
import { render } from "react-dom";
import Codemirror from "react-codemirror";
import "codemirror/mode/javascript/javascript";
import { shouldRender } from "../src/utils";
import { samples } from "./samples";
import Form from "../src";
// Import a few CodeMirror themes; these... |
/* global process */
/**
* Helper module to read, parse and interpret procfs
*
* Authoritative info on content:
* https://github.com/torvalds/linux/blob/master/Documentation/filesystems/proc.rst
*/
import { performance } from 'perf_hooks';
import { childProcessOutput } from './child-process.js';
const statusLi... |
const express = require('express');
const path = require('path');
const session = require('express-session');
const mongoose = require('mongoose');
const exphbs = require('express-handlebars');
require('./db');
const app = express();
// would we need an auth file? todo
// const auth = require('./auth.js');
// enable ... |
const HTLCEth = artifacts.require("HTLCEth");
const truffleAssert = require('truffle-assertions');
/**
* Tests for HTLCEth:
* 1. depositFunds/require(refundTime > now)
* 2. depositFunds/require(msg.value > 0)
* 3. depositFunds/require(receiver != address(0x0))
* 4. depositFunds/require(receiver != address(th... |
import React, { Component } from 'react';
import {
NativeModules,
PanResponder,
Dimensions,
Image,
View,
Animated,
ActivityIndicator,
} from 'react-native';
import Svg, { Polygon } from 'react-native-svg';
const AnimatedPolygon = Animated.createAnimatedComponent(Polygon);
const TOP = 0;
const RIGHT = 1;... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import cx from 'classnames';
import './index.less';
import * as utils from '../../utils';
import MessageToolbar from '../../components/Message/MessageToolbar';
import MessageRefer from '../../components/Message/MessageRefer';
import Messag... |
// Reference: code adpated from <NAME>'s CS 290 HW6 assignment
// Date: Feb 25, 2021
const baseUrl = `http://flip3.engr.oregonstate.edu:6799`;
const makeCell = (content, type) => {
// Create a table data cell
let tdata = document.createElement('td')
let input = document.createElement('input');
input.... |
'use strict';
const _ = require('lodash');
const { Client } = require('./clients');
/**
* Lodash utilities
* @see {@link https://lodash.com/docs/4.17.15}
*/
/**
* @function isString
* @description The isString function tests the passed value to see if it is a string.
* @param {Any} s The value to test.
* @r... |
"use strict";
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; };
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
var _createClass = (function () { function defineProperties(target, props) { for (var key in props) {... |
/* global fetch */
import React, {useState, useMemo, useCallback} from 'react';
import {render} from 'react-dom';
import {StaticMap} from 'react-map-gl';
import DeckGL from '@deck.gl/react';
import {OPERATION} from '@deck.gl/core';
import {GeoJsonLayer, SolidPolygonLayer} from '@deck.gl/layers';
import {ScatterplotLaye... |
import React, { PureComponent } from "react";
import Hammer from "@squadette/hammerjs";
import Carousel, { Modal, ModalGateway } from "react-images";
import CloseIcon from "material-ui/svg-icons/content/clear";
import DeleteIcon from "material-ui/svg-icons/action/delete";
import EditIcon from "material-ui/svg-icons/i... |
import React from "react";
import { post } from "axios";
import {
Button,
AnchorButton,
Intent,
Toaster,
ControlGroup,
NumericInput,
Position,
Tooltip,
Checkbox,
FocusStyleManager,
} from "@blueprintjs/core";
import { iiif_url } from "./utils";
import { fitTo } from "./crops";
FocusStyleManager.... |
var fs = require('fs');
var path = require('path');
var walk = require('walk').walk;
var async = require('./async');
function Instance(handlebars) {
if (!(this instanceof Instance)) {
return new Instance(handlebars);
}
// expose handlebars, allows users to use their versions
// by overriding this early i... |
var table = null;
var colSource = 0;
var colName = 1;
var colPrios = 2;
var colWishlist = 3;
var colReceived = 4;
var colNotes = 5;
var colPriority = 6;
// For keeping track of the loot's source
var lastSource = null;
var offspecVisible = true;
// For making sure we don't spam request han... |
/*
NOTES
- currently multiple blobs can occupy the same tile. change in populate() func.
*/
//world properties
const worldSize = 30;
const dayLength = 100;
const startingPopulation = 10; //must be < (4*worldSize - 4)
const foodAmount = 10; //must be < (worldSize-2)^2
const childVariation = 0.1; //10%
const defaults = ... |
// TODO:
// more file types (text)
const {
clipboard
} = require('electron');
const nativeImage = require('electron').nativeImage;
let canvas;
let maximizedHeight;
let fullscreen = false;
let offsetX = 0;
let offsetY = 0;
let offsetLimit = 10000;
let dragFactor = 0.55;
let sclFactor = 1;
let scaleDelta = 1.01;
le... |
const debug = require("debug")("pthrift");
const GenericPool = require("generic-pool");
const Thrift = require("thr1ft");
const _ = require("lodash");
const {
AcquisitionTimeoutError,
ConnectionTimeoutError,
ConnectionClosedError,
} = require("./errors");
/* Callback handlers */
/**
* Wraps a connection in ev... |
function handleWindow() {
var body = document.querySelector('body');
console.log(window.innerWidth);
console.log(body.clientWidth);
if (window.innerWidth > body.clientWidth + 5) {
console.log(1);
body.classList.add('has-scrollbar');
body.setAttribute('style', '--scroll... |
const { State, SocketIOBroker, Store } = require('./src/server/state');
const {SocketTransport}= require('l0g/transports/SocketTransport');
const { Format } = require('l0g/symbols');
const { Component } = require('./src/server/component');
const equal = require('fast-deep-equal');
const {ConnectionHandler} = require(... |
window.URL = window.URL || window.webkitURL;
// deflate
function decode(string) {
return decodeURIComponent(RawDeflate.inflate(window.atob(string)));
}
function encode(string) {
return window.btoa(RawDeflate.deflate(encodeURIComponent(string)));
}
var documents = [{
filename: 'spawn.js',
filetype: 't... |
let turn = "player-1";
let vencedor = "none";
let stopClick = false;
document.querySelector("#player-1").style.marginLeft = "-9.8vmin";
document.querySelector("#player-1").style.marginTop = "0vmin";
document.querySelector("#player-2").style.marginLeft = "-9.8vmin";
document.querySelector("#player-2").style.marginTop =... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
/**
EDITED FOR THE PURPOSE OF USING WITH CHROME ON LINUX
ONLY SHIFT+SCROLL FUNCTIONALITY IMPLEMENTED
Multi-touch zoom extension for Firefox
Enables smooth pinch to zoom on desktop
Requires Firefox 55 or greater
@Author: <NAME> / haxiomic
@Website: http://github.com/haxiomic
@Email: <EMAIL>
Please report issues to t... |
const examples = [
'$ where volume = -1',
'$ where volume < 0',
'$ where volume > -3 and volume < 0',
'$ where volume < -10 or volume < 0',
'$ where pitch = 1200',
'$ where lowpass > 0',
'$ where highpass > 0',
'$ where name = "Hello"',
'$ where name : "Hello"',
'$ where name : "... |
const KEYS = {
LEFT: 'ArrowLeft',
RIGHT: 'ArrowRight',
SPACE: 'Space',
};
let game = {
ctx: null,
platform: null,
ball: null,
blocks: [],
score: 0,
running: true,
rows: 4,
cols: 8,
width: 640,
height: 360,
sounds: { bump: null },
sprites: {
background: null,
ball: null,
platfo... |
'use strict'
var request = require('urllib-sync').request;
var PropertiesReader = require('properties-reader');
var ICalParser = require('cozy-ical').ICalParser;
var ical2json = require("ical2json");
var moment = require('moment');
var ZONE_A_B_C = 'Zones A B C';
var ZONE_A = 'Zone A';
var ZONE_B = 'Zone B';
var ZONE_... |
function setElementValue(elementId, newValue) {
var s = document.getElementById(elementId);
s.setAttribute("value", newValue);
}
function updatePickupFormParams() {
// Get order data from storage.
var cart = JSON.parse(sessionStorage['pam-cart']);
var cart_items = cart['items'];
var details_js... |
//const nodeserver = 'http://localhost:3000' // video and user database server
const mid = getUrlVars()["mid"]; // Movie ID. Used to identity what movie in the database we're working with.
//grab the movie id from the querry string
function getUrlVars()
{
var vars = [], hash;
var hashes = window.location.href.... |
import React, { useRef, useState, useEffect } from 'react'
import styled from 'styled-components'
import { CanvasLogo } from './svg/CanvasLogo'
const LOCAL_MESSAGE_BG_COLOR = 'rgba(0,0,0,0.85)'
const LOCAL_MESSAGE_FONT_COLOR = '#fff'
const MESSAGE_VANISH_MS = 5000
// The example nodes on the fake canvas
const LOGO_H... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addCallback = exports.addSetCallback = exports.addGetCallback = exports.wire = exports.clone = exports.isType = exports.onGet = exports.toFahrenheit = exports.toCelsius = exports.onSet = exports.cleanConfig = exports.isMatch = exports.... |
"use strict";
var request = require('request');
var jsdom = require('jsdom').jsdom;
var util = require("util");
var EventEmitter = require("events").EventEmitter;
var _ = require('lodash');
var TimetableEntry = require('./TimetableEntry');
var Timetable = function(studentId) {
this.studentId = studentId;
this.compl... |
const { executeContractCallWithSigners } = require('@gnosis.pm/safe-contracts');
const { expect } = require('chai');
const { ethers, web3} = require('hardhat');
/**
* Plan of action:
* 1. Decode captured data -> from hex -> from bytes64 -> private keys
* 2. Create accounts from those private keys
* 3. Lower the pr... |
const format = d3.format( ',' );
const formatBigNum = d3.format( ',' );
let urlTest = "../static/data/states.csv";
const columnsDisplayed = [ "Province_State", "Deaths", "Confirmed", "Recovered", "Active" ];
// tableInteractive( urlTest, columnsDisplayed );
tableInteractive( urlCompiled, columnsDisplayed );
fu... |
import * as FileSystem from 'expo-file-system';
import { decode, encode } from 'base-64';
import MusicInfoResponse from './MusicInfo';
import Buffer from './Buffer';
const BUFFER_SIZE = 256 * 1024;
const EMPTY = '';
const ID3_TOKEN = 'ID3';
const TITLE_TOKEN = '<PASSWORD>';
const ARTIST_TOKEN = '<PASSWORD>';
const A... |
import * as THREE from '../../node_modules/three/src/Three.js';
import { OBJLoader } from '../../node_modules/three/examples/jsm/loaders/OBJLoader.js';
import { GLTFLoader } from '../../node_modules/three/examples/jsm/loaders/GLTFLoader.js';
import colours from "../lib/colours.js";
import { UnrealBloomPass } from '../.... |
//Based on
//http://petewerner.blogspot.co.uk/2015/02/intro-to-curl-noise.html
var ctx = canvas_1.getContext("2d");
var TWO_PI = 2 * Math.PI;
const mobile = ( navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPod/i)
... |
const _ = require('lodash');
const fp = require('lodash/fp');
import React from 'react';
import { Animated, ScrollView, StatusBar, StyleSheet, View, TouchableWithoutFeedback } from 'react-native';
import { connect } from 'react-redux';
import { Container, Header, Content, Item, Icon, Input, Text, Button } from 'native-... |
/**
* Created by Tim on 9/3/16.
*
*/
// Once metadata has loaded, this checks the track is ready to play
// Monitors the buffer until the selected snippet is in one of the ranges
function monitorLoad(sequence, c){
// console.log("monitor " + sequence + " " + c);
var calls = c;
calls++;
v... |
/**
* @Author tina
* @DateTime 2018-10-23
* @copyright 填空题答案配置控件
*/
import React, { Component } from 'react';
import { Input, Tabs, Radio, Form, message } from 'antd';
import './index.less';
import IconButton from '../../../../IconButton';
const { TextArea } = Input;
const { TabPane } = Tabs;
const FormItem = F... |
'use babel'
/* globals atom */
import path from 'path'
import config from './config'
import { CompositeDisposable } from 'atom'
import { name as packageName } from '../package.json'
import { buttons } from './constant'
import Menu from './components/Menu'
import NameEditor from './components/NameEditor'
import Ignor... |
const _ = require("lodash");
/**
* Defines different types of fields and their operations (internal use)
*/
const fieldTypes = {
array: {
create: fieldDefinition => {
// FROM: https://stackoverflow.com/a/12588826/6099426
return (function getRecursively(dimensions) {
... |
import LeftArrow from '@fortawesome/fontawesome-free/svgs/solid/arrow-circle-left.svg'
import RightArrow from '@fortawesome/fontawesome-free/svgs/solid/arrow-circle-right.svg'
import React, { useRef, useState } from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { Track } from... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Plot = exports.PLOT_CONTAINER_OPTIONS = void 0;
var tslib_1 = require("tslib");
var g2_1 = require("@antv/g2");
var util_1 = require("@antv/util");
var event_emitter_1 = tslib_1.__importDefault(require("@antv/event-emitter"));
var size... |
import $ from 'jquery';
import DEFAULTS from './defaults';
import Pointer from './pointer';
import scale from './scale';
import selected from './selected';
import tip from './tip';
import keyboard from './keyboard';
import * as util from './util';
const components = {};
/**
* Plugin constructor
**/
class asRange {
... |
/*
* Copyright IBM Corp. 2021, 2022
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { Button, Column, Grid, Link as CarbonLink } from '@carbon/react'
import { ArrowRight, Launch } from '@carbon/react/icons'
import { Svg... |
#!/usr/bin/env node
// This file contains the main entry point for the command line `fresh` app, and the command line option parsing code.
// See fresh.js for the core functionality.
const path = require("path");
const { Command } = require("commander");
const inquirer = require("inquirer");
const chalk = require("ch... |
// See: 1.1 Using RDF in JavaScript and Node.js
// This program explores different, possibly layered approaches
// for using RDF in JavaScript and more specifically Node.js
// apps.
//
// The resouce we'll use is the RTC ServiceProvider resource
// to be sure there are no issues parsing and manipulating
// an OSLC2 r... |
import React, { useState, useEffect, useCallback } from "react";
import styled from "styled-components";
import { useStaticQuery, graphql } from "gatsby";
import Img from "gatsby-image";
import theme from "../styles/theme";
import media from "../styles/media";
const StyledSpeakerCarousel = styled.ul`
list-style: no... |
// Define global variables
var gl;
var canvas;
var shaderProgram;
var vertexBuffer;
var triangleVertexBuffer;
var triangleVertexColorBuffer;
var hexagonVertexBuffer;
var stripVertexBuffer;
var stripElementBuffer;
// Import shaders
import vertexShaderGLSL from '/js/shaders/vertex-shader-unknown-v4.glsl.js';
import fra... |
var accel = 300, goku, platform, smallPlatform, platformGroup, stars, diamond, score = 0, scoreText, emitter, volcano, redBall, orangeBall, emitter;
demo.state5 = function(){};
demo.state5.prototype = {
preload: function(){
game.load.image('goku', '/assets/sprites/bestgoku.png');
game.load.image('platform', 'asse... |
import { __values } from '../node_modules/tslib/tslib.es6.js';
import { EventType, IncrementalSource } from './types.js';
function on(type, fn, target) {
if (target === void 0) { target = document; }
var options = { capture: true, passive: true };
target.addEventListener(type, fn, options);
return func... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.