text stringlengths 3.22k 29.5k |
|---|
/*
Sensefarm CUBE02 device decoder example.
Licensed, as open source under the Apache license.
Copyright 2019 Sensefarm AB
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.or... |
// All The Variables
// GAMESTATES
var PLAY = "running";
var END = "stopped";
var gameState = PLAY;
// TREX
var trex, trex_running, trex_collided;
let fontDino;
// Ground
var ground, invisibleGround, groundImage;
var upcollider;
// Cloud
var cloud, cloudsGroup, cloudImg;
// Obstacles
var obstacle, obstacleGrou... |
import React, {Fragment, useEffect, useLayoutEffect, useRef, useState} from 'react';
import {Redirect} from 'react-router-dom';
//Material UI imports
import clsx from 'clsx';
import { useTheme,ThemeProvider } from '@material-ui/core/styles';
import Drawer from '@material-ui/core/Drawer';
import CssBaseline from '@mater... |
import React from "react";
import Wrapper from "../../components/wrapper";
import ImportPocketContent from "./import-pocket";
import Input from "../../components/public/input/input";
import altertR from "../../utils/images/alert-circle-red.png";
import exit from '../../utils/images/exit.png';
import Modal from "simple-... |
import { _ } from 'meteor/underscore';
import { Meteor } from 'meteor/meteor';
import { dbArena, getCurrentArena } from '/db/dbArena';
import { dbArenaFighters, MAX_MANNER_SIZE, getAttributeNumber } from '/db/dbArenaFighters';
import { dbArenaLog } from '/db/dbArenaLog';
import { dbCompanies } from '/db/dbCompanies';
i... |
var InlineOrdering = {
init: function () {
$("th:contains('Orden')").hide();
$('td[class$=-top_position]').hide();
$('td[class$=-position]').hide();
// Rompemos el tbody para hacer multiples tbody.
$('.inline-group table > tbody').contents().unwrap();
var MakePages... |
// all Form1 elements
const username = document.getElementById('username');
const email = document.getElementById('email');
const password = document.getElementById('password');
const password2 = document.getElementById('password2');
const form = document.getElementById("form1");
const container1 = document.getElemen... |
/*
Tencent is pleased to support the open source community by making vConsole available.
Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
... |
/* eslint-disable no-shadow */
import HaystackApiService from './services/haystackApi.service.js'
import { formatEntityService, dateUtils } from './services/index.js'
Vue.use(Vuex)
window.env = window.env || {}
const state = {
entities: [[]],
apiServers: [],
linkEntities: [],
entitiesWithHis: {},
activatedLi... |
import {
FloatType,
HalfFloatType,
UnsignedByteType,
RGBAFormat,
RGFormat,
RGIntegerFormat,
RedFormat,
RedIntegerFormat,
LinearEncoding,
sRGBEncoding,
DataTexture,
REVISION,
} from 'three';
import {
write,
KTX2Container,
KHR_DF_CHANNEL_RGBSDA_ALPHA,
KHR_DF_CHANNEL_RGBSDA_BLUE,
KHR_DF_CHANNEL_RGBSDA_GR... |
/**
* Created by <NAME> on 27.12.2016.
*/
import { AppContext } from '../app/AppContext';
import { Range, ParseRangeUtils } from '../range';
import { ValueTypeUtils } from '../data';
import { IDTypeManager } from '../idtype';
function filterObjects(objs, range, desc) {
if (range.isAll) {
return objs;
... |
const proxyquire = require( 'proxyquire' );
const createErrorHandler = require( '../../helpers/create-error-handler' );
const spy = require( '../../helpers/spy' );
const year = 2017;
let exportBackendService;
let errorHandler;
let sortWins;
let sortWinsResponse;
let res;
let controller;
let regionSummary;
let regi... |
// Tons of help from:
// https://binji.github.io/2017/02/27/binjgb-on-the-web-part-2.html
// https://github.com/binji/binjgb/blob/master/demo/demo.js
// Web Audio API is tricky!
import { WORKER_MESSAGE_TYPE } from '../worker/constants';
import { getEventData } from '../worker/util';
// Define our performance constant... |
import PropTypes from "prop-types"
import React, { Component } from "react"
import { Link } from "gatsby"
import { PageContext, PageContextConsumer } from "./contexts/page-context"
import ShellAnubis from "../images/shell-anubis.js"
import { toggleDark, switchTheme } from "../style"
import "../styles/comp... |
import React, { useState, useEffect } from 'react';
import { useQueryParams } from '../../Utilities/useQueryParams';
import styled from 'styled-components';
import LoadingState from '../../Components/LoadingState';
import EmptyState from '../../Components/EmptyState';
import NoData from '../../Components/NoData';
imp... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { getVendorRequest, saveVendor } from './vendorActions';
import TextField from 'material-ui/TextField';
import Checkbox from 'material-ui/Checkbox';
import Button from 'material-ui/Button';
import... |
/**
* Make AJAX request to REST API.
*
* @namespace Rugby
* @memberof utils
*
* @since 1.0.0
*/
import jQueryBridget from 'jquery-bridget';
import Isotope from 'isotope-layout';
import 'isotope-packery';
import InfiniteScroll from 'infinite-scroll';
import { _, $, rdb, wp } from './globals';
import { helpers } ... |
import log from '../logger';
import { logger, imageUtil } from 'appium-support';
import _ from 'lodash';
import { errors } from '../../..';
import { MATCH_TEMPLATE_MODE } from './images';
import { W3C_ELEMENT_KEY, MJSONWP_ELEMENT_KEY } from '../../protocol/protocol';
import { ImageElement } from '../image-element';
c... |
'use strict';
import './css/3d.css';
import './css/style3860.css';
import { GAME } from './game';
import { data } from './data';
import firebase from 'firebase/app';
import 'firebase/app';
import 'firebase/database';
// Initialize Firebase
const config = {
apiKey: '<KEY>',
authDomain: 'charry-studio.firebaseapp.co... |
const functions = require('firebase-functions');
const Client = require('ssh2-sftp-client');
const AdmZip = require('adm-zip');
const sort = require('fast-sort');
const Papa = require('papaparse');
const User = require('./models/user');
const Goal = require('./models/goal');
const {isValidEmail} = require('./models/dat... |
import React from 'react';
import styled from 'styled-components';
import { BaseContainer } from '../../helpers/layout';
import { api, handleError } from '../../helpers/api';
import { withRouter } from 'react-router-dom';
import Player from '../../views/Player';
import { Spinner } from '../../views/design/Spinner';
imp... |
import moment from "moment"
import { MANAGED_GRANT_FACTORY_CONTRACT_NAME } from "../constants/constants"
import { isSameEthAddress } from "../utils/general.utils"
import { add, sub, gt } from "../utils/arithmetics.utils"
import {
getGuaranteedMinimumStakingPolicyContractAddress,
getPermissiveStakingPolicyContractAd... |
const Chroma = require("chroma-js")
import ColorScale from "./ColorScale"
import BlendMode from "./BlendMode"
import ValueType from "./ValueType"
var getColorBlender = (() => {
const bs = {}
bs[BlendMode.None] = (a) => a
bs[BlendMode.Replace] = (a, b) => b
bs[BlendMode.Add] ... |
"use strict";
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.hasOwnPrope... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// 注册依赖
const nconf_1 = __importDefault(require("nconf"));
const winston_1 = __importDefault(require("wi... |
/*
* Copyright 2017 Google Inc. All Rights Reserved.
* 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... |
import React from 'react';
import StyledPaper from '../common/StyledPaper';
import withMobileDialog from '@material-ui/core/withMobileDialog';
import Dialog from '@material-ui/core/Dialog';
import DialogContent from '@material-ui/core/DialogContent';
import { withStyles } from '@material-ui/core/styles';
import DialogF... |
function checkMin(input, min){
if (input >= min)
return true;
else return false;
}
function checkMax(input, max){
if (input <= max)
return true;
else return false;
}
function checkifInvalidExist(total){
var exist = $("input").hasClass("invalid");
if (exist)
$('p').html("Input range should be 0 to " + tota... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Event = undefined;
var _getIterator2 = require('babel-runtime/core-js/get-iterator');
var _getIterator3 = _interopRequireDefault(_getIterator2);
var _regenerator = require('babel-runtime/regenerator');
var _regenerator2 = _inter... |
import {GOOGLE_COLORS} from './colors.js';
import {Rectangle} from '../../lib/math/rectangle.js';
import randomjs from 'random-js';
const random = new randomjs.Random();
const MIN_GEAR_RADIUS = 50;
const MAX_GEAR_RADIUS = 500;
export function load(debug, state, wallGeometry) {
const HOLE_VARIETIES = ['none', 'round... |
/**
* Theme: Metrica - Responsive Bootstrap 4 Admin Dashboard
* Author: Mannatthemes
* Ecommerce Dashboard Js
*/
(function($) {
'use strict';
$(function() {
if ($("#bar").length) {
var currentChartCanvas = $("#bar").get(0).getContext("2d");
var currentChart = new Chart(currentCh... |
// pages/home/home.js
var util = require('../../utils/util.js');
var ports = require('../../utils/ports.js');
var address = require('../../utils/address.js');
var polyfill = require('../../utils/polyfill.js');
//引入灯箱组件
var Slider = require('../../template/slider/slider.js');
//引入产品Item组件
var ProductItem = require('../.... |
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prot... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _regenerator = _interopRequireDefault(require("@babel/runtime/... |
import {exec} from 'child_process'
import fs from 'fs'
import path from 'path'
import chalk from 'chalk'
import copyTemplateDir from 'copy-template-dir'
import inquirer from 'inquirer'
import ora from 'ora'
import runSeries from 'run-series'
import {
CONFIG_FILE_NAME, INFERNO_APP, PREACT_APP, PROJECT_TYPES, REACT_A... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { Alert, Row, Col, Input, Table, Button } from 'reactstrap';
import _ from 'lodash';
import { fetchTeams, fetchCurrentTeam, fetchUsers, editUser, createJoinRequest, fetchJoinRequests } from ... |
import React, { useContext, useMemo, useState } from 'react';
import PropTypes from 'prop-types';
import { useMutation, useQuery, useQueryClient } from 'react-query';
import { FormattedMessage, useIntl } from 'react-intl';
import { get, flatten, uniqBy } from 'lodash';
import { CalloutContext, stripesConnect, useOka... |
var button_available = true;
$(function () {
initiate_game();
var timeoutID;
//window.onbeforeunload = confirmExit;
//function confirmExit()
//{
// return 'Are you sure you want to quit the game?';
//}
var skip_options = {
trigger: 'hover',
content: 'Move on to the n... |
import React from 'react';
import { useState } from 'react';
import { useEffect } from 'react';
// Layout
import { ListOutline, AddOutline, CheckmarkOutline } from 'react-ionicons'
import Select from 'react-select';
import Title from '../../components/common/Title';
import Card from '../../components/common/Card';
impo... |
var __create = Object.create;
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnProp... |
function stopEvent(ev) {
ev.stopPropagation();
}
class Editor{
constructor(sim){
this.sim = sim;
this.typeSelected = "reactor";
this.piecesSelected = []
this.snapInt = 50;
this.active = false;
this.data = null;
this.planAttrs = {
type: "string",
x: "num",
y: "num",
text: "string",
fireDe... |
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] =... |
const cacheManager = require('./cache-manager');
const { downloadFile, readText, readArrayBuffer, readJson, loadSubpackage, getUserDataPath, _subpackagesPath } = require('./fs-utils');
cc.assetManager.fsUtils = ral.fsUtils;
const REGEX = /^https?:\/\/.*/;
const downloader = cc.assetManager.downloader;
const parser = ... |
/**
* Class definition for an Article. Each click on the map returns up to
* five Article objects
* @param {string} title The title of the article
* @param {string} description A short description of the article contents
* @param {string} link A link to the article
* @param {string} site The site this article com... |
// scraper and cheerio for scrapping from site
const { scraper } = require("../../helper");
const cheerio = require("cheerio");
const baseUrl = "https://syosetu.com"; // base url for syosetu.com
// get given page of search (if pagenum is 0 or >100 (max possible on site) see first page)
const searchUrl = (pagenum, ord... |
/**
* States DB in memory - Server
*
* Copyright 2013-2018 bluefox <<EMAIL>>
*
* MIT License
*
*/
/** @module statesInMemory */
/* jshint -W097 */
/* jshint strict:false */
/* jslint node: true */
'use strict';
const socketio = require('socket.io');
const StatesInMemoryFileDB = re... |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classNames from 'classnames';
import omit from 'lodash/omit';
import ContentExplorerHeaderActions from './ContentExplorerHeaderActions';
import ContentExplorerEmptyState from './ContentExplorerEmptyState';
import ContentExplorerAction... |
// Get information from input box
console.log($('#crypto').val());
var keepGoing = 1;
// setup socket
var socket;
var namespace = '/feed';
if (socket == null) {
socket = io.connect('//' + document.domain + ':' + location.port + namespace, { pingInterval: 5000, 'sync disconnect on unload': true });
}
// set vari... |
/**
* Created by sebastian on 5/15/15.
*/
/**
*
* Created by sebastian on 5/3/15.
*/
"use strict";
var ownsheetApp = angular.module("ownsheetApp");
ownsheetApp.controller('generalController', ["$scope", "$window", "$q", "chromeStorageService", "localStorageService",
function ($scope, $window, $q, chromeStor... |
const settingsConfig = require('config');
const migrations = require('../../migrations');
const hosts = require('./hosts');
module.exports = {
asdf: 'asdf',
atRoot: [ 'set' ],
public: [ 'set', 'export', 'import', 'reset', 'load' ],
hosts,
template: require('./templates/settings.tpl'),
settingTemplate: require(... |
'use strict';
// Keys can be set in the payload level
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 ("value" in descriptor) descr... |
/* GENERATED FILE */
import { html, svg, define } from "hybrids";
const PhBarcode = {
color: "currentColor",
size: "1em",
weight: "regular",
mirrored: false,
render: ({ color, size, weight, mirrored }) => html`
<svg
xmlns="http://www.w3.org/2000/svg"
width="${size}"
height="${size}"
... |
'use strict';
var username = "u" + Date.now();
var email = "u" + Date.now() + "@test.com";
var password = "<PASSWORD>";
describe("User", function() {
describe("User.signUp", function() {
it("should sign up", function() {
var user = new AV.User();
user.set("username", username);
user.set("passw... |
import React, { Component } from 'react';
import * as PropTypes from 'prop-types';
import { compose, filter, append } from 'ramda';
import withStyles from '@mui/styles/withStyles';
import * as R from 'ramda';
import { withRouter } from 'react-router-dom';
import { QueryRenderer } from '../../../../relay/environment';
i... |
var UniquePriorityQueue = require("slcommon/src/UniquePriorityQueue");
var Utils = require("slcommon/src/Utils");
var Event = require("slcommon/src/Event");
var EventType = require("../src/EventType");
var Layer = require("./Layer");
/** Graphics layer.
* Generally, the use of Screen.createLayer("GfxLayer") is preferr... |
/* eslint no-param-reassign: 0 */
const uuidv1 = require('uuid/v1');
const problemUtils = require('./problemUtils.js');
const elo = require('./elo.js');
const katex = require('../../public/resources/vendor/katex/katex.min.js');
const chatUtils = require('./chat/chatUtils.js');
module.exports = class Game {
... |
"use strict";
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 (Object.protot... |
/*
termap - Terminal Map Viewer
by CLB-09 <<EMAIL>>
The Console Vector Tile renderer - bäm!
*/
'use strict';
const x256 = require('x256');
const simplify = require('simplify-js');
const Canvas = require('./Canvas');
const LabelBuffer = require('./LabelBuffer');
const Styler = require('./Styler');
const utils = ... |
/* global chrome */
import './base.js';
import './fields.js';
import h from './hyperscript.js';
import * as dom from './dom.js';
import * as util from './util.js';
// Expose this library.
chrome.options.opts = {
// If not given, title of the page will be set to the extension's name.
// Set to `false` if you want... |
import React, { Component } from "react";
import axios from "axios";
import styled from 'styled-components';
const ProInfo = styled.div`
margin: 0 auto 0 auto;
@media (min-width: 482px) {
max-width: 449px;
}
@media (min-width: 701px) {
max-width: 668px;
}
@media (min-width: 1026px) {
max-widt... |
class Repository {
constructor(queries) {
this.queries = queries || {};
}
parse(element, options, queryOptions) {
if (!this.queries[element]) throw Error(`Unknown query type ${element}`);
return this.queries[element](this, options, queryOptions);
}
register(element, parser) {
this.queries[el... |
function doubleBindGS(){
}
function component(comp, interface) {
return { component: comp
, interface: interface
, render: function(parent){
this.component.component.appendTo(parent);
return t.component.interface;
}
... |
import { quat, mat4, vec3 } from '../util/gl-matrix/src/index.js';
import PlaneFactory from './renderer/plane.js';
import * as THREE from '../three.js/build/three.module.js';
const VERTEX_SHADER = `
attribute vec4 aVertexPosition;
void main(void) {
gl_Position = aVertexPosition;
}
`;
const STENCIL_FRAGMENT_SHADER... |
// based on NES (https://lospec.com/palette-list/nintendo-entertainment-system)
const Color = {
'White' : '#FCFCFC',
'White2' : '#F8F8F8',
'LightGrey' : '#bcbcbc',
'Grey' : '#787878',
'DarkGrey' : '#7c7c7c',
'Black' : '#000000',
'LightRed' : '#e40058',
'Red' : '#a80020',
'DarkRed... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.... |
import { escape } from 'sqlstring'
import VipnetParser from 'vipnet-parser'
import demoData from './demoData.json'
export default ({ searchQuery, searchUsers = false, demo, currentNetworkNumber }) => {
// Handle "!top 10 6670"-type queries first.
const topQueryRegexp = /!top\s(\d+)(\s)?(\d+)?/
const match = sea... |
export const weightClassToTag = {
balloonweight: "Balloonweight",
featherweight: "Featherweight",
lightweight: "Lightweight",
middleweight: "Middleweight",
heavyweight: "Heavyweight",
superheavyweight: "Super Heavyweight"
};
export const generateEffectivePercentages = (percentages = {}) =>
Object.entries... |
const BLAST_STATES = {
HISTORY: 'HISTORY',
RESULT: 'RESULT',
SEARCH: 'SEARCH',
ALIGNMENT: 'ALIGNMENT'
};
const blastpSupportedTypes = ['GENE', 'MRNA', 'CDS'];
const wrongFeatureTypeMessage = 'Only GENE, MRNA or CDS FeatureType are supported!';
function scientificNameSorter(a, b) {
const aName = (a... |
"use strict";
const Plugin = require('../plugin');
const InitRegistry = require('../../util/initRegistry');
const FileTable = require('../fileApi/table/fileTable');
const Element = require('./element');
/**
* The FormApi handles the secure processing of forms. It is important to read
* and understand the flow of f... |
/*
* Copyright (c) 2020, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
var fs = require('fs');
var request = require('request');
var auth = require('./auth');
var... |
#!/usr/bin/env node
'use strict';
/**
* This module is started with src/bin/run.sh. It sets up a Express HTTP and a Socket.IO Server.
* Static file Requests are answered directly from this module, Socket.IO messages are passed
* to MessageHandler and minfied requests are passed to minified.
*/
/*
* 2011 Peter '... |
/*
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... |
/**
* View model for source information. Sources are kept in a separate index which is searched when
* needed.
* @param name - name of reference to query
*/
function SourceViewModel(name) {
"use strict";
var self = this;
// Ref process, take care of null values and unbox from arrays
// Boxing in ar... |
import { log } from './log'
import { messages, states, state } from './states'
import { random as randomAvatar } from 'gridy-avatars'
import { randomName } from './name'
// import Idle from 'idle-js'
const firebase = require('firebase/app')
require('firebase/auth')
require('firebase/database')
require('firebase/func... |
const npmRoot =
require('child_process')
.execSync('npm root -g')
.toString()
.trim();
let scRequire = package =>
require(npmRoot + '/sctester/node_modules/' + package);
scRequire('console.table');
let chalk = scRequire('chalk');
let http = require('http');
let fs = require('fs');
let puppeteer ... |
const Error = require('@cardstack/plugin-utils/error');
const Session = require('@cardstack/plugin-utils/session');
const { declareInjections } = require('@cardstack/di');
const { partition, uniqWith, isEqual, uniq } = require('lodash');
module.exports = declareInjections({
schemaLoader: 'hub:schema-loader'
},
clas... |
const Rectangle = require('../src/lib/geometry/rectangle');
const LineStyle = require('../src/lib/const/line_style');
const EndpointType = require('../src/lib/const/endpoint_type');
const Directions = require('../src/lib/const/directions');
const EndpointPosition = require('../src/lib/const/endpoint_position');
const ... |
//Import packages and files needed for this application
const inquirer = require('inquirer');
const fs = require('fs');
const path = require('path');
const Manager = require('./assets/lib/Manager');
const Engineer = require('./assets/lib/Engineer');
const Intern = require('./assets/lib/Intern');
// Empty team array ... |
export const TBrowser = {
deleteAllCookies: function () {
var cookies = document.cookie.split(";");
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i];
var eqPos = cookie.indexOf("=");
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
... |
Crafty.init(640, 640);
Crafty.background('white');
var startPos = {};
Crafty.e('Background, 2D, DOM, MouseDrag, DebugPolygon')
.setName('Background')
.attr({w: 640, h: 640})
.debugStroke('red')
.bind('StartDrag', function(e) {
this.debugPolygon(undefined);
startPos = {x: e.real... |
const Constants = require("../utils/Constants.js");
const Discord = require("discord.js");
class Util {
static constants = Constants;
static getUser(d, id) {
let user = d.client.users.cache.get(id);
if (!user) {
user = this.fetchUser(d, id);
}
return user;
}
static async fetchUser(d, id) {
return d.... |
'use strict';
const SUPPORTED_SKETCH_VERSIONS = ['3.7.2'];
const LATEST_SKETCH_VERSION = '3.7.2';
const assert = require('assert');
const childProc = require('child_process');
const File = require('vinyl');
const fixtureStream = require('from2-array').obj;
const fs = require('fs');
const Lab = require('lab');
const l... |
'use strict';
require('classlist-polyfill');
var Promise = require('bluebird');
var md = require('markdown').markdown.toHTML;
var makeSomeNoise = require('./lib/wavesurfer').makeSomeNoise;
var optimusAscii = [];
optimusAscii.push(require('./optimus-ascii.txt'));
optimusAscii.push(require('./optimus-ascii2.txt'));
va... |
import React from "react";
import Program from "./Program";
import Registers from "./Registers";
import BreakOn from "./BreakOn";
import Controls from "./Controls";
/**
* `cpy x y` _copies_ `x` (either an integer or the _value_ of a register) into register `y`.
* `inc x` _increases_ the value of register `x` by one.... |
import React, { useEffect, useState } from 'react';
import { Link, useNavigate } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
import { useForm } from 'react-hook-form';
import { yupResolver } from '@hookform/resolvers/yup';
import * as Yup from 'yup';
// Material
import { Button, Con... |
import React, { useState, useEffect } from 'react';
import Modal from 'react-bootstrap/Modal';
import Form from 'react-bootstrap/Form'
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import Button from 'react-bootstrap/Button';
// ACTION AND DISPATCH
import { connect } from 'react-redux';
... |
/**
* Created by Jerome on 09-10-17.
*/
import FightingEntity from './FightingEntity'
import GameServer from './GameServer'
import PFUtils from '../shared/PFUtils'
import {SpaceMap} from "../shared/SpaceMap";
import Utils from '../shared/Utils'
function MovingEntity(){
FightingEntity.call(this);
this.isMovin... |
import PropTypes from 'prop-types'
import React from 'react'
import UploadModal from './UploadModal'
const simpleInsertCodeIcon = 'data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAB9klEQVRYR+2Wy' +
'23CQBCGZxwUASdKgA7IIdIukhF0QCoI6YAS6CB0EDpIOgjCEbs3nApCB+EEKFI80ToYgR/7IEhIEb4hvPN/8/jHi3DmB8+sDxeA/... |
const EventEmitter = require('events');
const {EventBus} = require('@ucd-lib/cork-app-utils');
// const COLOR_BALANCE_SAMPLE_RATE = 16;
let COLOR_BALANCE_SAMPLE_RATE = 32;
if( screen.width < 700 || screen.height < 700 ) {
COLOR_BALANCE_SAMPLE_RATE = 64;
}
console.log('Color sample rate set to: '+ COLOR_BALANCE_SAMPL... |
/**
* # UI-Router for Angular (v2+)
*
* - [@uirouter/angular home page](https://ui-router.github.io/ng2)
* - [tutorials](https://ui-router.github.io/tutorial/ng2/helloworld)
* - [quick start repository](http://github.com/ui-router/quickstart-ng2)
*
* Getting started:
*
* - Use npm. Add a dependency on latest `... |
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD4 Message
* Digest Algorithm, as defined in RFC 1320.
* Copyright (C) <NAME> 2000. Distributed under the LGPL.
*/
/*
* Convert a 32-bit number to a hex string with ls-byte first
*/
var hex_chr = "0123456789abcdef";
function rhex(num)
{
... |
'use strict';
const _ = require('lodash');
const Promise = require('bluebird');
const logger = require('../common/logger');
const config = require('../common/config');
const BaseJob = require('./BaseJob');
const errors = require('../common/errors');
const utils = require('../common/utils');
const serviceBrokerClient =... |
#!/usr/bin/env node
// Copyright (c) 2015 Uber Technologies, Inc.
//
// 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... |
const router = require('express').Router()
const passport = require('passport')
const { v4: uuidv4 } = require('uuid')
const fs = require('fs')
const idpInitiated = require('./idp-initiated')
const providersModule = require('./providers')
const webutil = require('./utils/web-utils')
const misc = require('./utils/misc')... |
// import { Button } from 'react-bootstrap';
// import React, { useState } from 'react';
import { useHistory } from "react-router-dom";
import axios from 'axios';
import React, { useState,useEffect } from 'react';
function EditeSellerProduct() {
const history=useHistory();
const [productImg, setproductImg] = u... |
const React = require('react');
const D3Component = require('idyll-d3-component');
const d3 = require('d3');
const { createStore } = require('curve-store');
const { linear } = require('curve-store/lib/samplers');
var gaussian = require('gaussian');
var distribution = gaussian(0, 1);
const BLUE = '#090C9B';
const RE... |
/* _________________________________________________________________________
*
* Tachyon : A Self-Hosted JavaScript Virtual Machine
*
*
* This file is part of the Tachyon JavaScript project. Tachyon is
* distributed at:
* http://github.com/Tachyon-Team/Tachyon
*
*
* Copyright (c) 2011, Univers... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.countLength = countLength;
exports.getNeighbours = getNeighbours;
exports.animateCells = animateCells;
exports.getSpecialNodes = exports.minHeap = exports.Queue = void 0;
var _script = require("./script.js");
var _timer = require(... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const rx_1 = require("../lib/rx");
const server_types_1 = require("./server-types");
const fs = require("fs");
const path = require("path");
const zlib = require("zlib");
const datafolder_1 = require("./datafolder");
exports.handleTiddlyWikiRo... |
import { mount } from "enzyme";
import React from "react";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router";
import { useToasts } from "react-toast-notifications";
import { ToastProvider } from "react-toast-notifications";
import sinon from "sinon";
import FoodItem from "../index.js";... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.