text stringlengths 3.22k 29.5k |
|---|
/* global shmup, game, Phaser */
var Enemy = require('../entity/enemy');
var MovementTypes = require('../util/movement');
var ShotTypes = require('../util/shot');
var Boss = require('../entity/boss');
var MUSIC_TRACKS = [
'burning_engines',
'challenge',
'downtown',
'ftl',
'grand_prix'
];
var MUSIC_... |
// require libraries
var Eos = require('eosjs');
var path3 = require('./include/path3.js');
// set the values
var accountName = process.argv[2];
var contractName = process.argv[3];
var tempPrivate = process.argv[4];
var currentPerson = process.argv[5];
var keyType = process.argv[6];
var keyProvider = ""; ... |
/**
* Jdigi
*
* Copyright 2015, <NAME>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Th... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
function setBabylonMeshPosition(mesh, x, y) {
mesh.position.x = x;
mesh.position.y = y;
}
function setBabylonMeshRotation(mesh, theta) {
mesh.rotation.z = theta;
}
function setBabylonMeshVertexColor(mesh, vertexId, color) {
var meshColors = mesh.getVerticesData(BABYLON.VertexBuffer.ColorKind);
m... |
let dynamicStyles = {
// backgroundColor.js - https://tailwindcss.com/docs/background-color
// backgroundPosition.js - https://tailwindcss.com/docs/background-position
// backgroundSize.js - https://tailwindcss.com/docs/background-size
bg: [
{ prop: 'backgroundColor', config: 'backgroundColor' },
{ prop... |
import { BrowserRouter as Router, Redirect } from "react-router-dom";
import React, { useState, useEffect } from "react";
import axios from "axios";
import clsx from "clsx";
import MaterialTable from "material-table";
import { makeStyles } from "@material-ui/core/styles";
import {
Grid,
Paper,
Container,
... |
import React, { Component } from 'react'
import Loader from '../../../components/loader/Loader'
//ui
import { Text, PrimaryButton, Stack, DefaultButton } from 'office-ui-fabric-react';
import { TextField} from 'office-ui-fabric-react/lib/TextField';
import { Card } from '@uifabric/react-cards';
import { ChoiceGroup } f... |
/*
hashtag-pull - v - 2018-01-15
Pulls twitter, vine, and instagram posts with a certain hashtag.
Lovingly coded by <NAME> - http://frazelledazzell.com/
*/
/*
hashtag-pull - v - 2018-01-10
Pulls twitter, vine, and instagram posts with a certain hashtag.
Lovingly coded by <NAME> - http://frazelledazzell.com/
*/var da... |
var serie1 = []
var serie2 = []
var serie3 = []
var serie4 = []
var categories = []
var zona = []
var total_ventas = []
var totk_ant=0,totp_ant=0
var totk_cen=0,totp_cen=0
var totk_val=0,totp_val=0
var totk_eje=0,totp_eje=0
var dateDesde, dateHasta
var zo_27_val=0,zo_27_ant=0
var zo_27_cen=0,zo_27_eje=0
var totk_rm_ant... |
/*
* MIT License
*
* Copyright (c) 2022 <NAME> <https://massimocandela.com>
*
* 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 righ... |
import GALLERY_CONSTS from '../../../common/constants/index';
import {isVerticalPlacement} from '../../../common/constants/placements';
import { fixedStyles } from '../presets/gridGallery';
//example: http://pro-gallery.surge.sh/?titlePlacement=DONT_SHOW&itemClick=nothing&allowTitle=true&allowHover=false&galleryLayout=... |
$(document).ready(function () {
$('.modal').modal();
});
stepers = [$('#stepper-1'), $('#stepper-2'),$('#stepper-3'),$('#stepper-4')];
$('#step2').hide();
$('#step3').hide();
$('#step4').hide();
$('#circle').hide();
$('#progress').hide();
$('#wav-status').hide();
$('#play-button').hide();
$('#waveform').hide();
$('... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
var game = this.game || (this.game={});
var createjs = createjs || {};
;(function(game, cjs, b2d){
var b2Vec2 = Box2D.Common.Math.b2Vec2
, b2AABB = Box2D.Collision.b2AABB
, b2BodyDef = Box2D.Dynamics.b2BodyDef
, b2Body = Box2D.Dynamics.b2Body
, b2FixtureDef = Box2D.Dynamics.b2FixtureDef
, b2Fixt... |
import React, { useEffect, useMemo, useRef, useState } from 'react'
import PropTypes from 'prop-types'
import { connectField, useForm } from 'uniforms'
import {
Switch,
FormControlLabel,
Select,
Input,
MenuItem,
Button,
Radio,
RadioGroup,
FormControl,
FormLabel,
} from '@material-ui/core'
import sty... |
const path = require('path');
const cosmiconfig = require('cosmiconfig');
const sinon = require('sinon');
const _ = require('lodash');
const logger = require('../../../src/logger');
const configResolver = require('../../../src/config/resolver');
const defaultConfig = require('../../../src/config/server-config.d... |
/**
* @author Wayne(<EMAIL>)
* @date 2014.04.02
* @description 泰国宋干节首页活动
*/
var $ = require("common:widget/ui/jquery/jquery.js");
var UT = require( "common:widget/ui/ut/ut.js" );
/**
* 宋干节首页动画
* @param {JSON} conf cms配置
* conf = {
* 'flashHz' : 40, //刷新频率
* 'dropHz' : 70, //添加... |
var allCriterionArrays = []; // Will be used later on for statistics
var allPrefArray = []; // Will be used later on for statistics
//Creates a criterionArray and then shoves it into allCriterionArrays.
function criterionsToArray(name, experience, platform, application, size, optimization, startDate){
var criterionA... |
const events = require('events');
const Machine = require('xstate').Machine;
const assign = require('xstate').assign;
const interpret = require('xstate').interpret;
const Character = require('./Character');
const ActionTypes = require('./ActionTypes');
const EventTypes = require("./EventTypes");
const SentimentTypes = ... |
//========//
// Frames //
//========//
const urlParams = new URLSearchParams(window.location.search)
const ANIMATION_ID = urlParams.get("a") | 0
print(ANIMATION_ID)
const ANIMATIONS = [
{
SRC: `BounceSequence`,
IMAGE_WIDTH: 1920,
IMAGE_HEIGHT: 1080,
SEQUENCE_LENGTH: 33,
BEATS_PER_SEQUENCE: 4,
},
{
SRC:... |
var rotationsTime = 8;
var wheelSpinTime = 6;
var ballSpinTime = 5;
let winningNum;
let mixNum = (max, start=1)=>{
let nums = [];
// init
for(let i=start;i<=max;i++){
nums.push(i);
}
// shuffle
for(let i=0;i<nums.length;i++){
let num = nums.shift();
let rnd = Math.floor(Math.random()*nums.le... |
/**
* Created by <NAME> <<EMAIL>> on 2/12/20.
*/
import Emitter from "./tools/emitter";
import extend from "./tools/extend";
import exists from "./tools/exists";
import Vector2 from "./vector2";
class ActionObserver extends Emitter {
constructor (_options) {
super();
this.options = extend({
... |
/*
* Main variables
* Author: <NAME> - <EMAIL>
* Date: January 2018
*/
var root = "nuovo/";
var admin_page = "nuovo/admin";
var version = "v 0.3"; // set correct version
/*************************************
* Generic functions ©
* Requires: nothing
* Author: <NAME> - <EMAIL>
********************************... |
if(siteUserId == "null"){
window.location.href = path + "/common/index.html" ;
}
$(function(){
getUserAccount();//获取个人账户
getUserBank();//查询绑定的银行卡
$("#withdrawInput").keyup(function(){checkWithAmt()});//提出金额输入判断-手续费-实际到账金额计算
$("#getVertify").click(getWithVertify);//获取短信验证码
$("#withdrawBtn").unbind("click... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.addStorageEventListener = addStorageEventListener;
exports.averageResponseTime = averageResponseTime;
exports.canBeUsed = canBeUsed;
exports.clos... |
import VanillaTilt from "vanilla-tilt";
import { loadMaps } from "./mapping.js";
import { triggerMapSLN } from "./mapping.js";
import { loadGraphEOC } from "./graph.js";
import { layoutGrid } from "./force.js";
import { layoutSetup } from "./force.js";
import { layoutSplit } from "./force.js";
const start = new Dat... |
// @flow
import * as React from 'react';
import { Link} from 'react-router-dom';
import { FaEdit } from 'react-icons/fa';
import { IoMdEye,IoMdAddCircle } from 'react-icons/io';
import { MdDeleteForever } from 'react-icons/md';
import SweetTable from '../../../../classes/sweet-table'
import moment from 'moment-jalaali'... |
function hasMoreOptions() {
if ($('#Cost').val() != 'Any') {
return true;
}
if ($('#ThreatCost').val() != 'Any') {
return true;
}
if ($('#EngagementCost').val() != 'Any') {
return true;
}
if ($('#Attack').val() != 'Any') {
return true;
}... |
import log from '../log';
import fse from 'fs-extra';
import fs from 'fs';
import Promise from 'promise';
import merge from 'merge';
import isbinaryfile from 'isbinaryfile';
import crypto from 'crypto';
import { cacheFile } from './cacheFile';
import { isBinary, getReqType, isImage } from '../dataHelper';
import { addM... |
'use strict';
// CONSTANTS FOR DESIGN COLLAPSIBLE
const designLegend = document.querySelector('.js__design-legend');
const designColors = document.querySelector('.js__design-colors');
const arrowDown1 = document.querySelector('.js__arrowDown1');
// CONSTANTS FOR FILL COLLAPSIBLE
const fillLegend = document.querySelect... |
const { EthHdWallet } = require('eth-hd-wallet')
const EthContract = require('ethjs-contract');
const SignerProvider = require("ethjs-provider-signer");
const sign = require('ethjs-signer').sign;
const Eth = require('ethjs-query');
const { Client } = require ("pg");
const networks = require('../lib/networks');
//TODO... |
// Range of time including units
class TimeRange {
constructor(json) {
this.units = json.units
this.first = json.first
this.last = json.last
}
}
// Represents the client's view of a single data set on the server (e.g. hdf5 file, simdb, etc.)
class DataSet {
constructor(json, ui_col... |
"use strict";
import Discord from "discord.js";
import data from "resources/sm64.js";
export default {
name: "sm64",
errorVerb: "BLJ to the nearest QPU",
missingArgsVerb: "Super Mario Brothers' Super",
aliases: ["sign", "textbox", "bup", "mario"],
args: false,
cooldown: 20,
guildOnly: fals... |
import sls from 'single-line-string';
import { cartoTables } from './app_config';
const { nyc_borough,
nyc_city_council,
nyc_community_board,
nyc_neighborhood,
nyc_nypd_precinct,
nyc_senate,
nyc_assembly,
nyc_intersections,
nyc_crashes } = cartoTables;
// Links each boundary filter name to a SQL quer... |
/*!!!!!!!!!!!Do not change anything between here (the DRIVERNAME placeholder will be automatically replaced at buildtime)!!!!!!!!!!!*/
// https://github.com/rancher/ui/blob/master/lib/shared/addon/mixins/cluster-driver.js
import ClusterDriver from 'shared/mixins/cluster-driver';
// do not remove LAYOUT, it is replaced... |
/*! @azure/msal-browser v2.25.0 2022-06-06 */
'use strict';
import { __awaiter, __generator } from '../../_virtual/_tslib.js';
import { NativeConstants, NativeExtensionMethod } from '../../utils/BrowserConstants.js';
import { AuthError, AuthenticationScheme } from '@azure/msal-common';
import { NativeAuthError } from '... |
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
ext... |
import { Deck } from './deck.js';
class Keyboard {
constructor(deck) {
if (!(deck instanceof Deck)) {
throw new Error("expecting instance of Deck");
}
this.deck = deck;
// A key:value map of keyboard keys and descriptions of
// the actions they trigger
th... |
import { inject, reactive, computed, watch } from 'vue'
import { LocalStorage } from 'quasar'
import { flattenedIconSets } from 'src/icon-sets'
import { storeKey } from './symbols.js'
/**
* @typedef {{ label: string, value: string, packageName: string, status: string }} IconSet
*/
/**
* @typedef {Object} Store
*
... |
import { parse as parseUrl } from 'url';
import { remote } from 'electron';
import React, { useEffect, useState, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux';
import { takeEvery } from 'redux-saga/effects';
import {
SIDE_BAR_SERVER_SELECTED,
SIDE_... |
// Copyright 2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writin... |
let WORD_DB
let colors = ['#730240', '#304173', '#F2CB05', '#594B04', '#0D0D0D']
let color_index = 0
const removable_chars = [' ', '·', '・', '-', '.', '「', '」', '.']
let unused_substrings = []
let minimum_length_value = 9999999
let minimum_length_substrings = []
let user_string
let substrings
let db_index
let dfs_memo
... |
const { LitElement, html, css } = require('lit')
const { isMobile } = require('./components/common')
class Hud extends LitElement {
static get styles () {
return css`
:host {
position: absolute;
top: 0;
left: 0;
z-index: -2;
width: 100%;
height: 100%;
}... |
/* globals Sortable */
const swapElements = require('./fragments/swap-elements');
const replaceAll = require('./fragments/replace-all');
module.exports = function(modV) {
modV.prototype.Layer = class Layer {
constructor(name, canvas, context, clearing, modV) {
this.canvas = canvas || document.createElement('c... |
const browserReport = browserReportSync();
function createHiddenFormInput(name, value) {
const input = document.createElement("input");
input.type = 'hidden';
input.name = name;
input.value = value;
return input;
}
const verificationDialog = document.querySelector("#verifyEmailModal");
if (verifi... |
/*
* Copyright (c) 2019 simplenodeorm.org
*/
import React from 'react';
import ReactDOM from 'react-dom';
import config from '../config/appconfig.json';
import defaults from "../config/defaults";
document.designData = {
currentReport: {}
};
const popupMenuClick = function(e) {
let cm = document.getElementB... |
/* FOR DEVELOPMENT - RB CREATE COMPONENT HELPER
***********************************************/
const fs = require('fs');
const fse = require('fs-extra');
const path = require('path');
const del = require('del');
const util = require('util');
const request = require('request');
const mustache... |
function parsePoints(metadata, node, data){
let buffer = data.slice(node.byteOffset, node.byteOffset + node.byteSize);
let numPoints = node.numPoints;
let vboData = new ArrayBuffer(16 * numPoints);
let source = new DataView(buffer);
let target = new DataView(vboData);
let {scale, offset} = metadata;
... |
const Discord = require('discord.js');
const Database = require('../database/Database');
const Server = require('../items/Server');
const isStaff = require('../utils/isStaff');
const parseInt = require('../utils/parseInt');
module.exports = {
name: 'joinembed',
usage: '< send >',
description: 'Creates an e... |
/* jslint node: true, esnext: true */
'use strict';
const chokidar = require('chokidar');
const fs = require('fs');
const path = require('path');
const BaseStep = require('kronos-step').Step;
const AdapterInboundFile = {
name: 'kronos-adapter-inbound-file',
description: 'Watches directories and opens a stream fo... |
/* Phono mobile conference demo */
var phono, call, conferenceId;
var defaultRoomName = "Room name without spaces";
var defaultDisplayName = "Display name";
var dm = {}
$(function() {
if (!window.localStorage.displayName) {
window.localStorage.displayName = "";
}
connectPhono();
/* Home Page */
$... |
const { pick } = require('lodash');
const shallowDiff = require('shallow-diff');
const { handleRequest, getValues } = require('shared/lib/forms');
const { load, update } = require('../lib/loader');
const {
extractData,
transformNulls,
prepareData,
getPurpose,
getLicence,
getPoint,
getCondition,
getVers... |
import {Corner, CornerBit, numbers, util} from '@material/menu-surface';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import {forwardRef, useCallback, useEffect, useState} from 'react';
import ReactDOM from 'react-dom';
const {getTransformPropertyName} = util;
const isHoistedElement = true;... |
//import app from "./firebase"
var express = require('express');
var url = require('url');
//var session = require('express-session');
var path = require('path');
//var logger = require('morgan');
var bodyParser = require('body-parser');
//const uuidV4 = require('uuid/v4');
const ldap = require("ldapjs");
const request... |
// ==========================================================================
// Plyr Trim control
// ==========================================================================
import { createElement, toggleClass, toggleHidden } from '../utils/elements';
import { on, triggerEvent } from '../utils/events';
import i18n ... |
//Import jQuery
//Import PluginDetect
var options= {
url : '/',
updateDatabase: true,
debug: true,
grab: ['Plugins','AccessIP','Browser','OS','UserAgent','Screen','LocalIp'],
//If false use serverside code
RemoteIPGrab:true,
printVisitor:true
};
var visitor={
"ID":"",
"Browser": "",
"OS... |
import React, { Component, Fragment } from 'react';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import { connect } from 'dva';
import moment from 'moment';
import { setLocalStorage, getLocalStorage } from '@/utils/authority';
import {
Button,
Card,
Table,
message,
Row,
Col,
DatePicker,... |
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) descriptor.writable = true; Object.defineProperty(target, de... |
#!/usr/bin/env node
/* eslint-disable no-case-declarations */
/**
* @license MIT
* Copyright 2020 <NAME> (linuxgemini)
* SPDX-License-Identifier: MIT
*/
"use strict";
const chalk = require("chalk");
const cliProgress = require("cli-progress");
const csvStringify = require("csv-stringify/lib/sync");
const dns = ... |
const NH4 = 0;
const NO3 = 1;
const P = 2;
const K = 3;
const Ca = 4;
const Mg = 5;
const S = 6;
const CL = 7
const ELEMENTS_NO = 8;
const elements = ['NH4', 'NO3', 'P', 'K', 'Ca', 'Mg', 'S', 'Cl'];
const molarMass = [14.0067, 14.0067, 30.973762, 39.0983, 40.078, 24.305, 32.065, 135.4... |
//-----------------------------------------------------------
/**
* 调试配置,请只在这个地方进行设置,不要动其他代码
*/
var debug = true; // 是否是调试模式,注意:在上传代码的时候,要改为false
//-----------------------------------------------------------
//以下公用代码区域,使用范围非常广,请勿更改--------------------------------
//403 ajax 请求错误时artdialog提示
document.write("<style>.g... |
const conf = require('./../../../config/conf')
const utils = require('./../../../utils/util')
const moment = require('./../../../utils/moment.min')
const bankUtil = require('./../../../config/bank')
const service = require('./../server/index')
const app = getApp()
Page({
data: {
isHaveFamily: false,
... |
/*!
* 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 appli... |
/*
Copyright 2018 0kims association.
This file is part of snarkjs.
snarkjs is a free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option)
any later... |
let colorHelper = {
getClosestColor: function (targetColor, colorPalette) {
let minDistance = Number.MAX_VALUE;
let closestColor = null;
for (let color of colorPalette) {
let distance = new dE00(rgb2lab(targetColor), rgb2lab(color)).getDeltaE();
if (distance >= minDi... |
const glob = require('glob');
const fs = require('fs');
const path = require('path');
const { normalizeString, checkDescription, checkSpelling, checkJsonSchema, getAjv, prepareSchema } = require('./testHelpers');
const anyOfRequired = [
"quantiles",
"array_element"
];
var jsv = null;
beforeAll(async () => {
jsv ... |
import BFX from "bitfinex-api-node";
import placeOrder from "./trading";
const coinList = [
"ltc",
"eth",
"etc",
"rrt",
"zec",
"xmr",
"dsh",
"bcc",
"bcu",
"xrp",
"iot",
"eos",
"san",
"omg",
"bch",
"neo",
"etp",
"qtm",
"bt1",
"bt2",
"avt",
"edo",
"btg",
"dat",
"qsh",
"... |
var AdminListControl = {
init: function() {
AdminListControl.initToggleSearchFilters();
AdminListControl.initCheckList();
},
initToggleSearchFilters: function() {
$('.jsBtnSearchFilterBox').click(function() {
$('.jsSeachFilterBox').toggle();
});
},
initC... |
/* global Chartist */
// NOTE: decorators do not exist in browsers, so we can't
// use any sort of fancy auto-"bind" decoration :(
// poor man's Dependency Injection
const container = {
ui: undefined,
ai: undefined,
};
const VALUE_MAP = {
/* eslint-disable prettier/prettier */
2: 1, 4: 2, 8: ... |
////////////////////////////////////////////////////////////////////////////////
// neurons <-> node mapping
////////////////////////////////////////////////////////////////////////////////
const range = function(start, end) {
const A = [];
for (let i = start; i < end; i++) {
A.push(i);
}
return... |
var assert = require('assert');
// null
assert.equal(null + '', 'null');
assert.equal('null' in global, false, 'null is keyword');
assert.equal(undefined + '', 'undefined');
assert.equal('undefined' in global, true, 'undefined is a property of global');
// creating object with literal
var obj = {};
assert.equal(... |
document.addEventListener("DOMContentLoaded", function () {
/**
* Form Select
*/
class FormSelect {
constructor($el) {
this.$el = $el;
this.options = [...$el.children];
this.init();
}
init() {
this.createElements();
... |
////
// Tween.js
// Provides numerical obj property animation with easing.
// Copyright (c) 2005 - 2008 <NAME>
////
var TweenManager = {
_tweens: {},
_nextId: 1,
add: function(_args) {
// add new tween to table
var _tween = new Tween(_args);
this._tweens[ this._nextId ] = _tween;
_tween.id = this._nextId... |
import PropTypes from "prop-types";
import React, { Component } from "react";
import { StyleSheet, css } from "aphrodite";
import Form from "react-formal";
import yup from "yup";
import confetti from "canvas-confetti";
import { Tabs, Tab } from "material-ui";
import { grey100 } from "material-ui/styles/colors";
import... |
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import {
ScrollView, Text, TouchableOpacity, ActivityIndicator
} from 'react-native';
import map from 'lodash/map';
import { emojify } from 'react-emojione';
import equal from 'deep-equal';
import EmojiCategory from './EmojiCatego... |
#!/usr/bin/env node
const fs = require('fs')
const ukaz = require('ukaz')
const toml = require('toml')
const chalk = require('chalk')
const jshiki = require('jshiki')
const datefns = require('date-fns')
const debug = Boolean(process.env.DEBUG)
const app = new ukaz.Application('Simple bank transaction simulator')
.... |
let index = 0;
// ===================================================================================
// Lifecycle
// =========
function onBeforeMount(props, state) {
th... |
class GameSession {
constructor(deck, matrix) {
this.finished = false;
this.matrix = matrix; // retrieved from DB or IndexedDb
this.deck = deck;
this.progress = 0; // for displaying progress on problem set - i.e. 6/10
this.cardsInSet = [];
this.problemSet = [];
... |
// think of rewriting all this mess with just reusing rewriteModuleStatementsAndPrepareHeader from:
// https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-modules-commonjs/src/index.js#L147
const toPairs = obj => {
const pairs = [];
for (const key in obj) {
pairs.push([key, obj[k... |
'use strict';
const _ = require('lodash');
const ScrollableList = require('nodeca.core/lib/app/scrollable_list');
// Page state
//
// - user_hid: user hid
// - album_id: album id
// - selection_ids: array of currently selected images
// - selection_started: true if user is currently in sel... |
/**
* @license
* Copyright 2014 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 requir... |
'use strict';
/*
browser端的action打包配置,根据action里面引用widget进行打包
*/
const fs = require('fs');
const _ = require('lodash');
const path = require('path');
const webpack = require('webpack');
const HappyPack = require('happypack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const actionParser = requir... |
import React from "react";
import { withTranslation } from "../../i18n";
import { routerReplace } from "../../utils/router";
import Head from "next/head";
import withStyles from "@material-ui/core/styles/withStyles";
import dynamic from "next/dynamic";
import LoadingProgress from "../../components/LoadingProgress";
imp... |
/*! a11y-dialog 7.1.0 — © <NAME> */
var t = [
'a[href]:not([tabindex^="-"])',
'area[href]:not([tabindex^="-"])',
'input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])',
'input[type="radio"]:not([disabled]):not([tabindex^="-"]):checked',
'select:not([disabled]):not([tabindex^="-"... |
const fs = require('fs');
const _und = require('underscore');
const data = require('./data');
const TAXONOMY_TREE = './data/ontology/taxonomy_tree.tsv';
//use union type
const LEVEL_TYPE = { ORTHGROUP: 'orthgroup', SPECIES: 'species' };
const taxonomicMap = loadMap(); //eslint-disable-line no-use-before-define
// e... |
'use strict'
var mongoose = require('mongoose');
var moment = require('moment');
var Url = require('./models/url');
var Partido = require('./models/partido');
var Politico = require('./models/politico');
var Eleicao = require('./models/eleicao');
var Candidato = require('./models/candidato');
module.exports = {
cad... |
'use strict';
import events from './events';
import helpers from './helpers';
// Object map of fields on the stage
var _data = {},
dataMap = {
stage: {},
rows: {},
columns: {},
fields: {}
};
// Registered fields are the fields that are configured on init. This variable acts as a data buffer
// tha... |
// Require node packages and other tools
const express = require("express");
const app = express();
const path = require('path');
const axios = require('axios').default;
const ejsMate = require('ejs-mate');
const ExpressError = require('./utils/ExpressError');
const catchAsync = require('./utils/catchAsync');
// Set u... |
// Player/ mario object:
let player;
// Global boolean variable that turns true if player collides with any enemy.
let enemyColliding;
// Skeleton sprites class for basing all sprites off of:
class Sprites {
constructor(spriteX, spriteY) {
// Coordinates:
this.x = spriteX;
this.y = spriteY;
// Di... |
/**
* vIni
* Author: <NAME>
* Description: this library provides operations to initialize the single page web app
* Copyright: Copyright 2016 | Vyavsaay ERP
*/
var vIni = function()
{
/**
* initializes the application
*/
this.initialize= function()
{
vIni.gvIni();
show_loader();
var location=window... |
/*
*** SCENE JS ***
*/
// Setup three.js WebGL renderer. Note: Antialiasing is a big performance hit.
// Only enable it if you actually need to.
var renderer = new THREE.WebGLRenderer({antialias: true});
renderer.setPixelRatio(window.devicePixelRatio);
// Append the canvas element created by the renderer to... |
function optionExists ( haystack, needle ) {
var optionExists = false;
for (i = 0; i < haystack.length; ++i){
if (haystack.options[i].value == needle){
optionExists = true;
break;
}
}
return optionExists;
}
var lastLoadedNodeId = null;
var allText = "ALL";
var graph;
function loadJsonD... |
'use strict';
const tts_default_options = {
"host": "https://cp.speechpro.com/vktts/rest/",
"voice": "Alexander",
"language": "Russian",
"numChannels": 1,
"sampleRate": 22050
}
class SpeechProTTS {
constructor(options) {
this.options = {
"host": options.host || tts_default_options.host,
"... |
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn"... |
/**********************************************************************
takeDepth picture using the Occipital Sensor
Testing on Misty II obstacle detection - See objects off the ground
Date First Written: 12/17/2019
Date Last Update: 1/10/2019
Date Last Tested: 1/10/2019
This is experimental CODE, used for my lear... |
import axios from "axios";
import React, { Component } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { toast } from "react-toastify";
import { TwitterPicker } from "react-color";
import Button from "@material-ui/core/Button";
import MenuItem from "@material-ui/core/Menu... |
/* globals __DEV__ */
import Phaser from 'phaser'
import Badger from '../sprites/Badger'
import { ProceduralManager } from '../utils'
const RUN_VELOCITY_X = 500;
const JUMP_VELOCITY_X = 370;
const JUMP_VELOCITY_Y = -450;
const STAMINA_PER_SECOND_DECREASE = 15;
const COBRA_UP_STAMINA = 25;
const COBRA_UP_TOXICITY = 25;... |
import React, { Component } from 'react';
import Typography from '@material-ui/core/Typography';
import Avatar from '@material-ui/core/Avatar';
import Button from '@material-ui/core/Button';
import CssBaseline from '@material-ui/core/CssBaseline';
import Grid from '@material-ui/core/Grid';
import Box from '@material-ui... |
const Typechart = require('@la/game/typechart');
const Damage = require('@la/game/damage');
class KO {
/**
* Predicts the number of turns it will take to KO a Pokemon, if we
* continuously use the same move on said Pokemon.
*
* This uses current HP, not maximum HP as you usually see on the official
* ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.