text stringlengths 3.22k 29.5k |
|---|
// MIT License
//
// Copyright 2018 Electric Imp
//
// SPDX-License-Identifier: MIT
//
// 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... |
import React, { Component } from 'react'
import { Text, View, TextInput, Button, StyleSheet, Alert } from 'react-native'
import {Actions, ActionConst} from 'react-native-router-flux'
const _onHome = ()=>{
setTimeout(() => {
Actions.HomeScreen();
}, 2300);
}
const _onAlert = () =>{
setTimeout(() => {
Ac... |
var insurance = require('../controllers/insurance');
var aboutCompany = require('../controllers/aboutCompany');
var helpCenter = require('../controllers/helpCenter');
var register = require('../controllers/register');
var reg = require('../controllers/reg');
var indexCon = require('../controllers/indexCon');
var userCe... |
#! /usr/bin/env node
const readline = require('readline')
const {log, err, isNumeric, columnarize, editorPrompt} = require('./util')
const makeTaskDB = require('./taskdb')
const PROMPTSTR = '> '
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
})
const defaultListOpts = {
... |
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
... |
// <NAME>, 10762388
// Renders a histogram of the yearly gas extraction by NAM
var requestBarExtr = [d3.json("../../data/data_refined/data_tot.json")];
// for storage of global variables in update functions
var monthExtrDims = {};
var gasYearInitial = 1971;
var gasYearFinal = 2019;
var month = ["Jan", "Feb", "Mar",... |
// Parse input arguments and execute convertor
'use strict';
const argparse = require('argparse');
const fs = require('fs');
const mkdirp = require('mkdirp');
const path = require('path');
const convert = require('./convert');
class ActionFontAdd extends argparse.Action {
call(parser,... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import Modal from 'react-modal'
import { Field, reduxForm, initialize } from 'redux-form'
import { fetchPost,
removePost,
saveModifications,
voteOnPost,
} from '../actions/PostActions'
import {
addComment,
fetchComments,
deleteComme... |
let poll = null;
let theme = window.matchMedia('(prefers-color-scheme: dark)') ? 'dark' : 'light';
if(typeof app !== 'undefined' && ['dark', 'light'].includes(app.theme)) theme = app.theme;
toastr.options = {
showMethod: 'slideDown',
hideMethod: 'slideUp'
}
const fakeOptions = [
'Apple',
'Microsoft',
... |
/* eslint-disable promise/always-return */
/* istanbul ignore if */
if (!Error.prepareStackTrace) {
require('source-map-support/register');
}
import appcdLogger from 'appcd-logger';
import Config from 'appcd-config';
import Dispatcher from 'appcd-dispatcher';
import fs from 'fs-extra';
import getMachineId from 'appc... |
var get_products_img, frontendLocalizationString;
$(document).ready(function() {
if($('#frontend_all_msg_with_localization').length>0){
frontendLocalizationString = JSON.parse( $('#frontend_all_msg_with_localization').val() );
}
/**
* Variations data handling
*/
//change event
$('.variations-c... |
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import moment from 'moment';
import {
Card,
Form,
Button,
Input,
Select,
InputNumber,
DatePicker,
message,
TreeSelect,
} from 'antd';
import router from 'umi/router';
import PageHeaderWrapper from '@/components/PageHeaderWrap... |
/*
* 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/.
*/
/*
* ChromeWorker Object subprocess.jsm on Windows to process stdin/stdout/stderr
* on separate threads.
*... |
import React, { Component } from "react";
import { StyleSheet, Text, View, Dimensions, Image, Animated, PanResponder } from "react-native";
import { bindComponentToImageSource } from "../redux/itemReducer";
const SCREEN_HEIGHT = Dimensions.get('window').height;
const SCREEN_WIDTH = Dimensions.get('window').width;
cla... |
const discord = require('discord.js');
const Database = require("plasma-db");
const db = new Database("./anti-raid.json");
exports.run = async(client, message, args) => {
if(message.author.id !== message.guild.owner.id && message.author.id !== db.fetch(`admin_${message.guild.id}.${message.author.id}`)) return m... |
import { combineReducers, applyMiddleware, createStore, compose } from 'redux';
export { combineReducers, compose } from 'redux';
import createNextState from 'immer';
export { default as createNextState } from 'immer';
export { default as createSelector } from 'selectorator';
import { composeWithDevTools } from 'redux-... |
import ReactDOM from "react-dom";
import { make } from "../dom";
import styles from "./TipTapTable.module.scss";
import TableEditor from "./TableEditor.jsx";
import { Editor } from "@tiptap/core";
import StarterKit from "@tiptap/starter-kit";
import Table from '@tiptap/extension-table'
import TableRow from '@tiptap/ext... |
import React, { useState, useEffect } from "react";
import { connect } from "react-redux";
import { Link, useHistory } from "react-router-dom";
import { createPlant } from "../../actions";
import ActionBar from "../ActionBar/ActionBar";
import * as yup from "yup";
import { plantSchema as schema } from "../../validatio... |
//
// Licensed to Jasig under one or more contributor license
// agreements. See the NOTICE file distributed with this work
// for additional information regarding copyright ownership.
// Jasig licenses this file to you under the Apache License,
// Version 2.0 (the "License"); you may not use this file
// except ... |
import React from "react"
import SEO from "../components/seo"
import Header from "../components/header"
import Footer from "../components/footer"
import ContactForm from "../components/contactForm"
import { Link } from "gatsby"
import Arrow from "../images/arrow.inline.svg";
import { AnchorLink } from "gatsby-plugin-an... |
/*
* (C) Copyright 2017 o2r project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... |
var sql = require('mssql');
var _ = require('lodash');
var joins = require('lodash-joins');
import * as GRACTION from "../../actions/GRConst.js"
import * as GRSTATE from "../../actions/GRState.js"
import * as CONNECT from "../SQLConst.js"
import * as MISC from "../Misc.js"
var sql1Cnt=0;
const ATTEMPTS=1;
export a... |
import React from 'react';
// import Load from '../utilities/load.jsx';
import Fetcher from "./Fetcher";
import {reduxForm, SubmissionError, stopSubmit} from 'redux-form'
import {connect} from "react-redux"
import Alert from 'react-s-alert';
// import 'react-s-alert/dist/s-alert-default.css';
// import 'react-s-alert/d... |
/*
* Isomorphic SmartClient
* Version 8.0
* Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved.
* "SmartClient" is a trademark of Isomorphic Software, Inc.
*
* <EMAIL>
*
* http://smartclient.com/license
*/
function findScLocator(element, autWindow) {
//the element selenium passes i... |
/*
* Copyright 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorate = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
for (var i = decorators.length - 1, decorator; i >= 0; i--)
if (decorator = decorat... |
var m = {};
window.onload = RockNRoll();
var container;
function RockNRoll() {
initGraphics();
initPhysicsWorld();
createScene();
render();
}
// Create the renderer, scene and camera
function initGraphics() {
// Get the size of the inner window (content area)
// Reduce the canvas size a little bit to prevent ... |
// @ts-check
import { E, Far } from '@endo/far';
import { AssetKind, makeIssuerKit } from '@agoric/ertp';
import { Nat } from '@agoric/nat';
import { makeScalarMapStore } from '@agoric/store';
import { provide } from '@agoric/store/src/stores/store-utils.js';
import { makeNameHubKit } from '../nameHub.js';
import { f... |
/**
* Copyright 2018 The WPT Dashboard Project. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
import '../node_modules/@polymer/polymer/lib/elements/dom-if.js';
import '../node_modules/@polymer/polymer/lib/elements/dom-repeat.js';
impor... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.playerDisconnected = exports.gameClick = exports.calcAndUpdateELO = exports.startGame = exports.... |
var baseSize = point(1, 1);
var viewport = point(1, 1);
var drag = { elem: null, prev: null };
var resize = { elem: null, prev: null };
function point(x, y) {
return { X: x, Y: y };
}
// Sets the viewport size
function setViewport(size) {
viewport = size;
transformAll();
}
// Sets the base size
function... |
/* TRABALHANDO COM DATAS */
var dataAtual = new Date();
var dia = dataAtual.getDay();
var diaHoje = String(dataAtual.getDate()).padStart(2 ,'0');
var primeiroDia = dataAtual.getDate() - dataAtual.getDay();
var ultimoDia = primeiroDia + 6;
var ano = dataAtual.getFullYear();
var hoje = [
"Domingo",
"Segunda-feira... |
require('cypress-xpath')
class Order
{
clrcookies(){
cy.clearCookies()
}
visit()
{
cy.fixture('config').then((url)=>{
cy.visit(url.shopURL)
})
}
addproduct()
{
cy.contains('Fusion Backpack').wait(3000).click()
cy.get('[id^=qty]').cle... |
/**
* @author <NAME> (<EMAIL>)
* @repo https://github.com/hui-w/visual-lib
* @licence MIT
*/
function PropertyWnd() {
this.domObj = null;
this.header = null;
this.labelObjId = null;
this.body = null;
this.objects = [];
this.sortType = 1;
this.selectedId = null;
this.renderInto = function (wrapperId) {
va... |
import cornerstoneTools from 'cornerstone-tools';
import cornerstone from 'cornerstone-core';
import Brush3DTool from './Brush3DTool.js';
import floodFill from './n-dimensional-flood-fill.js';
import TOOL_NAMES from '../../toolNames';
const { EVENTS, importInternal } = cornerstoneTools;
const segmentationModule = cor... |
//create object
const px = new pixelit({ from: document.getElementById("pixelitimg") });
//stuff for webpage functionality
const paletteList = [
[
[7, 5, 5],
[33, 25, 25],
[82, 58, 42],
[138, 107, 62],
[193, 156, 77],
[234, 219, 116],
[160, 179, 53],
[83, 124, 68],
[66, 60, 86],
... |
const Discord = require('discord.js');
const Music = require('../../Music/utils/Music');
const PodcastUtil = require('../utils/PodcastUtil');
const Utils = require("./../../../utils/utils")
const MusicPlayer = require("./../../Music/utils/MusicPlayer")
const url = require("url")
require('dotenv/config');
var userMsg;
... |
import Ember from "ember";
import config from "./config/environment";
const RISK_ASSESSMENT_COMPONENTS = ["threat_events", "predisposing_conditions",
"security_controls", "threat_sources",
"vulnerabilities"];
let inflector = new Ember.Inflector(E... |
'use strict';
var STATE_GEN_ID = 0,
FSMS = {},
EXPORTS = createOrGet,
ACTIVITY = require('../define/activity.js');
function createOrGet(definition) {
var list = FSMS,
id = definition.config.id;
var fsm;
if (id in list) {
return list[id];
}
list[id] = fsm = new... |
/**
* Created by brandon on 2016-12-20.
*/
// trigger this helper to test by using this element in hyml doc:
// <input type="button" onclick="rageHelper()" value="Helper">
function rageHelper() {
alert(" rageHelper has been fetched sucessfullt");
}
// more function and global variable definitions
//rage... |
'use strict';
function _typeof(obj) { 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.prototype ? "sym... |
import { Meteor } from 'meteor/meteor';
import SimpleSchema from 'simpl-schema';
import { OptIns } from '../../../api/opt-ins/opt-ins.js';
import { Recipients } from '../../../api/recipients/recipients.js';
import { Senders } from '../../../api/senders/senders.js';
import getOptInProvider from '../dns/get_opt-in-provid... |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { withStyles, makeStyles } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';... |
"use strict";
var AMPERSAND = '&';
var AMPERSAND_EQUAL = '&=';
var AND = '&&';
var ARROW = '=>';
var AT = '@';
var BACK_QUOTE = '`';
var BANG = '!';
var BAR = '|';
var BAR_EQUAL = '|=';
var BREAK = 'break';
var CARET = '^';
var CARET_EQUAL = '^=';
var CASE = 'case';
var CATCH = 'catch';
var CLASS = 'class';
var CLOSE_A... |
/*-------------------------
BVAmbient - VanillaJS Particle Background
https://bmsvieira.github.io/BVAmbient/
Made by: <NAME>
--------------------------- */
var isPaused = false;
class BVAmbient {
constructor({
selector = 'defaultId',
particle_number = "50",
particle_maxwidth = "30",
... |
const sdptransform = require( "sdp-transform" )
/*
An SDP Generator.
*/
var sessionidcounter = Math.floor( Math.random() * 100000 )
const codecconv = {
"0": "pcmu",
"8": "pcma",
"9": "g722",
"97": "ilbc",
"101": "2833"
}
const codecrconv = {
"pcmu": 0,
"pcma": 8,
"g722": 9,
"ilbc": 97,
"2833":... |
import React, { Component } from 'react';
import {
Icon,
TopNavigation,
TopNavigationAction,
Button,
Spinner,
withStyles,
OverflowMenu,
MenuItem,
} from '@ui-kitten/components';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { ActionSheetCustom as ActionSheet } from 'r... |
/*
The MIT License (MIT)
Copyright (c) 2015 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publis... |
var validator = require("validator"),
util = require('util');
//
// Globals
//
// Supported builtin checks
var BUILTINS = [Object, Array, String, Number, Boolean];
var BOOL_VALUES = {true: ["true", "1", "yes"], false: ["false", "0", "no"]};
var ERRMSG = {"MAX_LEN": 15, "TRIM_LEN_2": 4, "TRIM_STR": "..."};
var ... |
import getAdUnits from './utils/getAdUnits';
const defineGptSizeMappings = Symbol('define GTP size mappings (private method)');
const getGptSizeMapping = Symbol('get GPT size mapping (private method)');
const defineSlots = Symbol('define slots (private method)');
const defineOutOfPageSlots = Symbol('define out of page... |
import React from 'react';
import { Form, Input, Button, Row, Col, Select, notification} from 'antd';
import SearchLocation from '../../../../Shared/Form-Items/SearchLocation/SearchLocation';
import SearchCategory from '../../../../Shared/Form-Items/SearchCategory/SearchCategory';
import axios from '../../../../Utils/a... |
var lastSearchedCitiesArr = [];
var todaysDate = moment().format('MMMM D, YYYY');
var savedLastSearched = localStorage.getItem("lastSearchCities");
if(savedLastSearched) {
lastSearchedCitiesArr = JSON.parse(savedLastSearched);
updateCityBtns(lastSearchedCitiesArr);
}
//Event listener for Search City button
$... |
var statusEdit = false;
var activities = [];
var filteredActivities = [];
var activity = new Activity();
var order = "desc";
var logged = false;
window.onload = function () {
ping(SERVER + '/api/dashboard', function (result) {
if (!result) {
SERVER = SERVER_DOWN;
}
getActivities... |
import React from 'react';
import Immutable from 'immutable';
import { connect } from 'react-redux';
import { pushState } from 'redux-router';
import categoryLinkSort from '../../../utils/categoryLinkSort';
import { Card, CardText, FontIcon, Divider, CardActions, Styles,Avatar } from 'material-ui';
import { ShareLinkMo... |
import React, { useState } from "react";
import PropTypes from "prop-types";
import {
Modal,
Row,
Col,
Button,
Form,
InputGroup,
Spinner,
} from "react-bootstrap";
import { Formik } from "formik";
import * as Yup from "yup";
import { meterStatus } from "./ManageMeter";
import { FaPlus, FaExclamation, FaCh... |
/* A bone with ik
*
*
*/
var Rig = Rig || {
bones: null,
cbone: null,
x: 0,
y: 0,
stick: true,
joints: true,
firstbone: true,
selected: [],
create: function(x, y, options){
var o = Object.create(this);
o.init(x, y, options);
return o;
},
init: function(x, y, options){
this.x = x;
this.y = y;
... |
'use strict';
/** @namespace DevKit */
var DevKit;
(function (DevKit) {
'use strict';
DevKit.msfp_questionApi = function (e) {
var EMPTY_STRING = '';
var f = '@OData.Community.Display.V1.FormattedValue';
function webApiField(entity, logicalName, schemaName, entityLogicalCollectionName, entityLogicalName,... |
// References to all the element we will need.
const video = document.querySelector('#camera-stream');
const image = document.querySelector('#snap');
const controls = document.querySelector('.controls');
const take_photo_btn = document.querySelector('#take-photo');
const delete_photo_btn = document.querySelector('#del... |
import * as THREE from 'three';
const powerOffsets = {
"^TELEPORTER":[0, 0, 0],
"^U_MINIPORTAL":[0, 0.6, -1.55],
"^BIOROOM":[4.55, 0.45, 4.55]
};
const pipeOffsets = {
"^U_EXTRACTOR_S":[0, 0.3, 1]
};
const teleOffsets = {};
const doorOffsets = {
"^BIOROOM":[0, 0.25, 3],
"^CUBEGLASS":[0, 0.25... |
import {get} from '@ember/object';
import {SNAPSHOT_APPROVED_STATE, SNAPSHOT_REVIEW_STATE_REASONS} from 'percy-web/models/snapshot';
// This method creates the sort metadata object that comes back when a snapshot request includes
// include-sort-data: true query param.
// The API has LOADS of sort logic that goes into... |
'use strict';
/**!
* kju
* @copyright (c) 2013 Observe.it (http://observe.it) <<EMAIL>>
* MIT Licensed
*/
/**
* Module dependencies
*/
var EventEmitter2 = require('eventemitter2').EventEmitter2
, fs = require('fs')
, path = require('path');
/**
* Check the location of `path.exists` as it has been moved to... |
"use strict";
const login = require("./login");
const load = require("./load");
const request = require("./request");
const logger = require("./logger");
const $ = window.$;
const reActivity = /\/SystemActivityManage\/(\d+)\/.*$/i;
function getVacationWork (title) {
let urlPrefix;
let expiredMonth;
// window.open("... |
const test = require('assert');
const sut = require('../build/cal-code-util');
describe('CAL', () => {
describe('Util', () => {
it('Is CAL Consonant', () => {
test.ok(sut.isConsonant('b'), 'b isConsonant');
test.ok(sut.isConsonant('$'), '$ isConsonant');
test.ok(sut.isConsonant(')'), ') isCons... |
var map, heatmap;
/*
NOTE:
Mongoose cannot apply cursor methods to the result of findOne() because a single document is returned. You have access to the document directly
mapLocations therefore is a single record, while likes is an array, of length 1.
*/
function getExif() {
var img2 = document.g... |
/** @jsx jsx */
import { useEffect, useState } from "react";
import {
Card,
jsx,
Text,
Input,
Label,
Grid,
Button,
Box,
Alert,
} from "theme-ui";
import firebase from "gatsby-plugin-firebase";
import { useList, useObject } from "react-firebase-hooks/database";
import Spacer from "../core/spacer";
impo... |
import {EmittingVariable} from './EmittingVariable.js';
import {setCookie, getCookie} from './cookieOperations.js';
import {globalSettings} from './globalSettings.js';
import {GetYouTubeID} from './GetYouTubeID.js';
const videoListFileURL =
"../public/video_presets.json";
export var videoModule = new (function () {... |
import { Meteor } from 'meteor/meteor';
import Web3 from 'web3';
import abi from 'human-standard-token-abi';
import { BigNumber } from 'bignumber.js';
import { Session } from 'meteor/session';
import { token } from '/lib/token';
const Fortmatic = require('fortmatic');
const numeral = require('numeral');
/**
* @summa... |
// Copyright 2014 <NAME>
"use strict";
var events = require("events");
var Layout = require("./layout");
var ViKeys = require("./vi_keys");
var term = require("./term");
var trace = require("./trace");
var strings = require("./strings");
var Pane = function (window, x, y, width, height, mainPane) {
this.events =... |
var gulp = require('gulp'),
typescript = require('gulp-typescript'),
Builder = require('systemjs-builder'),
inlineNg2Template = require('gulp-inline-ng2-template'),
del = require('del'),
tscConfig_dist = require('./tsconfig-dist.json'),
tscConfig_dev = require('./tsconfig.json'),
rename = require('gulp-r... |
import {HDate, HebrewCalendar, Sedra, ParshaEvent, Locale, months, OmerEvent} from '@hebcal/core';
import dayjs from 'dayjs';
import {empty, makeGregDate, setDefautLangTz, httpRedirect, lgToLocale,
localeMap, getBeforeAfterSunsetForLocation, getStartAndEnd, makeHebDate} from './common';
import createError from 'http-... |
function getCurrGramId() {
return $('#input-grammar')[0].value;
}
function getCurrGrammar() {
return RESOURCES[getCurrGramId()];
}
// Using underscore.js/lodash.js Templates
var Templates = {};
Templates.result = [
'<div data-result="<%= resultNum - 1%>" class="result">',
'<div class="result-in... |
"use strict";
const GOOGLE_API = (() => {
// Google API Configurations
const CONFIG = {
// Client ID and API key from the Developer Console
CLIENT_ID: '197424454819-lbdl0oae7t19604mql2aibgdc01u46eb.apps.googleusercontent.com',
API_KEY: '<KEY>',
// Array of API discovery doc UR... |
import Phaser from 'phaser';
import Background from '../prefabs/Background';
import CharacterSelectFrame from '../prefabs/CharacterSelectFrame';
import Characters from '../Characters';
import Fonts from '../Fonts';
import Properties from '../Properties';
class CharacterSelectState extends Phaser.State {
init(playS... |
/**
* Manapaho (https://github.com/manapaho/)
*
* Copyright © 2016 Manapaho. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
/**
* Webpack config
*/
// Modules
var fs = require('fs');
var path = require(... |
/**
Shows/Hides the content of a playlist.
@param index: the index of the playlist.
*/
function showPlaylistContent(index) {
var menu = $('li.dropdown[value='+index+'] div.dropdown_content');
console.log('displaying content of playlist with value:',index);
if ($(menu).css('display') === 'none') {
... |
const tf = require('@tensorflow/tfjs-node');
const db = require('./js/database');
const stockapi = require('./js/stockapi')
const currencySymbol = require('currency-symbol-map')
const Chart = require('chart.js')
const electron = require('electron');
const remote = electron.remote;
function minMaxScaler(val, min, max) ... |
//fills in a jsav table with all the values for a particular item set
var fillTableComplete = function(table, itemTable)
{
for(var i = 1; i < table.length; i++)
{
for(var w = 1; w < table[i].size(); w++)
{
var itemWeight, itemValue;
itemWeight = itemTable[1].value(i-1);
... |
/*
MIT License
Copyright (c) 2019 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distrib... |
import { mapSprites, spriteSquares } from './units';
const mapPixels = 256;
const spritePixels = Math.round(mapPixels / mapSprites);
const squarePixels = Math.round(spritePixels / spriteSquares);
const properties = [
'colors', 'codes',
'objectSprites', 'tileSprites',
'objects', 'tiles'
];
export default functi... |
// valid.test.js
//
// Tests non-JSON validations that return string errors.
var Valid = require('../lib/valid');
// throws an error if the result doesn't exactly match the expectation
Valid.assert = function assert(value, expected) {
// need to duck type because typeof and instanceof don't work reliably
var... |
// MODULES //
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import logger from 'debug';
import isObject from '@stdlib/assert/is-plain-object';
import Draggable from 'components/draggable';
import SessionContext from 'session/context.js';
import { DELETE_STICKY_NOTE, STICKY_NOTE_TITLE, S... |
import React, { Component } from 'react';
import { Container, Card, CardBody, Row, Col, Table, UncontrolledTooltip, Alert, Input, Label, Modal, ModalHeader, ModalBody, ModalFooter, Button, FormGroup } from "reactstrap";
import { Link } from "react-router-dom";
import { AvForm, AvField } from "availity-reactstrap-valid... |
var getCards = function() {
var cards = [];
for (var i = 1; i <= no_of_cards; i++) {
cards.push(i);
cards.push(i);
}
//shuffle
cards.sort(function() {
return 0.5 - Math.random();
});
return cards;
};
var resetGame = function(interval) {
$$('#game-board .card').ea... |
import React from 'react';
import { faStar, faCertificate } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import Link from 'next/link';
export function getHeader() {
return {'Authorization': 'Basic ' + process.env.REACT_APP_APIKEY};
}
export function get... |
import React, { Component } from 'react';
import { DownOutlined, UpOutlined } from '@ant-design/icons';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Input, Select, DatePicker, message, Row, Col, Spin } from 'antd';
import { connect } from 'dva';
import moment... |
require('dotenv').config(); // Loads .env file with Token
//Finish moving variables from .env -> .json
const Discord = require('discord.js');
const {
prefix,
} = require('./config.json');
const config = require('./config.json');
const storage = require('./storage.json');
const fs = require('fs');
const client = ne... |
import React, { Component } from 'react';
import NodeRSA from 'node-rsa';
import { sha512 } from 'js-sha512';
import UserForm from '../../components/UserForm';
import MailBox from '../../components/MailBox';
import "./Client.scss";
import { User, Msg, Pr_keyring } from 'ethpki-utils/api/models';
class Client extends... |
// TODO (abiro) standard style
// TODO (abiro) magic numbers
'use strict'
// Browserify can't handle comma-separated requires.
var boundingBox = require('vertices-bounding-box')
var bunny = require('bunny')
var initCopy = require('./lib/copy/copy.js')
var createCanvasOrbitCamera = require('./lib/controls.js')
var cre... |
// vim:ts=4:sw=4:et
// Documentation references:
// https://developers.google.com/identity/sign-in/web/reference
// https://developers.google.com/picker/docs/reference
function httpErrorToToast(jqXHR, prefix) {
var summary = 'HTTP ' + jqXHR.status + ': ' + jqXHR.responseText;
Materialize.toast(prefix + ': ' + ... |
import BaseShape from './base-shape';
import Oversampler from '../utils/oversample';
const xhtmlNS = 'http://www.w3.org/1999/xhtml';
/**
* A shape to display a waveform. (for entity data)
*
* [example usage](./examples/layer-waveform.html)
*
* @todo - fix problems with canvas strategy.
*/
export default class W... |
import React from 'react';
import DashboardLayout from '../../components/common/DashboardLayout';
import {
Row,
Col,
Button,
// Comment,
// Avatar
} from "antd";
// import { Link, useHistory } from 'react-router-dom';
import { AiOutlineLoading } from "react-icons/ai";
import { LeagueContext } from '../../stor... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
#!/usr/bin/env node
/*
* Copyright 2017, <NAME> <<EMAIL>>
*
* 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 condit... |
let size;
let topLeftCorner;
let squareSize;
let ph;
let peh;
let penh;
let c;
let ratio;
function setup() {
size = floor(sort([windowHeight, windowWidth])[0] * 0.99);
createCanvas(windowWidth*0.99, windowHeight*0.99);
topLeftCorner = createVector(round(windowWidth/2 - size * 0.2), round(windowHeight/2... |
const _ = require('lodash');
const Promise = require('bluebird');
const { ObjectID } = require('mongodb');
const { getDocValueForExpression } = require('../../util/util');
const { getFunction } = require('../../util/memoize');
const { ValidationError } = require('../../errors');
const { PERMISSIONS } = require('../../a... |
"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.p... |
//score esta definida fuera para poder enviarla por AJAX
var score = 0;
var music;
var secret = 'a1';
window.onload = function() {
var game = new Phaser.Game(800, 400, Phaser.AUTO, 'game', { preload: preload, create: create, update: update, render: render });
var intro = true;
var startGame = false;
v... |
import React, { useState, useEffect } from "react";
import Chat from "../MakeCall/Chat";
import MakeCall from "../MakeCall/MakeCall";
function LiveEvent({ ...props }) {
const [modal, setModal] = useState("");
const [userName, setUserName] = useState("");
const handleChange = (e) => {
setUserName(e.target.va... |
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import cs from 'classnames';
import {
Input,
Select,
Checkbox,
EntityPropertyLabel,
IconSVG,
IconButton,
SmoothCollapse,
Toolbox,
CodeEditor,
Table,
} from '../../';
import getPlainText from '../../ut... |
import './ProductBuy.scss'
class ProductBuy extends React.Component {
render() {
return(
<div className="wrapper-decoration">
{/*<header className="header">
<div className="middle-container">
<img className="logo" src="https://s3.amazo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.