text stringlengths 3.22k 29.5k |
|---|
import React, { useContext, useState } from "react"
// import { Link } from "gatsby"
import Layout from "../components/layout"
import Image from "../components/image"
import SEO from "../components/seo"
import Button from "react-bootstrap/Button"
import "bootstrap/dist/css/bootstrap.min.css"
import {
ButtonGroup,
... |
import { DEFAULT_ECDH_CURVE } from 'tls';
var HTTP = require('http');
var PATH = require('path');
var FS = require('fs');
var OS = require('os');
var UTIL = require("util");
var hostname = '127.0.0.1';
var port = 3000;
console.log("rootDir = " + rootDir);
function HttpContext(request, response) {
var origin... |
angular.module("webapp").controller("AccountController", ["$scope", "AccountService", AccountController]);
angular.module("webapp").controller("SearchAccountController", ["$scope", "$timeout", "$location", "AccountService", "NamespaceService", "TXService", SearchAccountController]);
const txListLimit = 50;
const mosai... |
import View from './View'
import Model from './Model'
import Transition from './Transition'
import config from './Config'
const SUPPORTED = 'pushState' in history
const attr = key => config.attribute(key)
/**
* @class Controller
* @classdesc Handles updating the views on the page with new models
*/
class Controlle... |
var config = {
apiKey: "AIzaSyAS3GgqoiMErYeagXRbWLeFOp5LCelK19A",
authDomain: "cognitrack-c16c7.firebaseapp.com",
databaseURL: "https://cognitrack-c16c7.firebaseio.com",
projectId: "cognitrack-c16c7",
storageBucket: "cognitrack-c16c7.appspot.com",
messagingSenderId: "637925214368"
};
... |
import {
flexProperties,
flexDirectionValues,
flexWrapValues,
justifyContentValues,
alignItemsValues,
alignSelfValues,
alignContentValues,
parseCombineValue,
parsePercentValue,
parseMarginAuto,
} from './util';
class Config {
constructor(config = {}, node) {
this.config = {};
this.node =... |
const fs = require('fs')
const net = require('net')
const http = require('http')
const SOCKETS = new Map()
const [ START, MOVES ] = Array(0xFF).keys()
const [ NORTH, EAST, SOUTH, WEST ] = Array(0xFF).keys()
const PI2 = Math.PI * 2
let aiList = '[]'
const updateAiList = () =>
aiList = Buffer.from(JSON.stringify([...... |
function doGet(e) {
var HTMLoutput = HtmlService.createHtmlOutput();
var page = HtmlService.createTemplateFromFile("index")
.evaluate()
.getContent();
HTMLoutput.addMetaTag("viewport", "width=device-width, initial-scale=1");
HTMLoutput.append(page);
return HTMLoutput;
}
function include(filename) {
... |
let video;
let poseNet;
let isCallibrated = false;
var physicalChart = null;
var mentalChart = null;
const poseNet_options = {
imageScaleFactor: 0.2,
outputStride: 16,
flipHorizontal: false,
minConfidence: 0.5,
maxPoseDetections: 1,
scoreThreshold: 0.5,
nmsRadius: 20,
detectionType: 'single',
multip... |
/**
* @param {Object} config
* @param {Object} info
* @return null
*/
function alterChartConfig(config, info) {
opensdg.chartConfigAlterations.forEach(function (callback) {
callback(config, info);
});
}
/**
* @param {String} chartTitle
* @return null
*/
function updateChartTitle(chartTitle) {
... |
var win = $.index;
var myRecording = null;
var TOKEN = '<KEY>';
var currentSessionMode = Titanium.Media.audioSessionMode;
Titanium.Media.audioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAY_AND_RECORD;
var recording = Ti.Media.createAudioRecorder();
// default compression is Ti.Media.AUDIO_FORMAT_LINEAR_PCM
... |
/**
* @module vk-plus-plus
* @author <NAME> (tuxick)
* @version 1.0.0
*/
const request = require('request');
const API = require('./api/index.js');
const {
EventEmitter
} = require('events');
class VK extends API {
/**
* @param {Object} options
* @param {string} options.token
* @param {string} [versi... |
/* eslint-disable react/no-danger */
import React from 'react';
// Material UI
import {
Paper,
Typography,
Divider,
IconButton,
Badge
} from '@material-ui/core';
import { withStyles } from '@material-ui/core/styles';
// Icons
import {
Code,
Stop,
// Launch,
Replay,
DeleteSweep,
... |
// Metaball
// This script may help to create Metaball-like shapes
// USAGE : Draw some circles and select them, then run this script.
// When a prompt appears, type in a "rate" for the the connecting curves, then click OK.
// (it doesn't check in the script whether each path is really a circle)
// # Combini... |
var toggle_audio = true
var toggle_audio_volume = 1
function toggleAudio(){
if(toggle_audio){
toggle_audio = false
toggle_audio_volume = 0
getE('sonido-btn').className = 'sonido-off'
}else{
toggle_audio = true
toggle_audio_volume = 1
getE('sonido-btn').className =... |
var fps = 60;
setBackground = function(){
io.setBGColor('#0d0d0f');
var starImgs = [];
var starCount = 2;
var starDensity = io.canvas.width/30;
var baseVel = 5;
for(var i=0; i<starCount; i++)
starImgs[i] = new Image();
moveToTop = function(obj){
obj.setPos(iio.getRandomInt(10, io.canvas.width-10)
... |
// 설정 변수 선언
window.config = {};
window.config.allowTag = true; // 이미지, 스타일, 디시콘등 허용여부. 금지하려면(JSAssist build 17.1 이상 기본설정) false로 변경
window.config.autoReset = false; // [사용안함] 자동리셋 설정 더이상 사용안함
window.config.allowExternalSource = false; //외부이미지([img 주소] 문법) 허용하려면 true로 변경
window.config.allowDCCon = true; //디시콘 사용가능유무 사용금... |
"use strict"
module.exports = createGLStateStack
var uniq = require("uniq")
function createGLStateStack(gl, variables) {
//By default SAVE EVERYTHING
if(!variables) {
variables = [
gl.ACTIVE_TEXTURE,
gl.ARRAY_BUFFER_BINDING,
gl.BLEND,
gl.BLEND_COLOR,
gl.BLEND_SRC_ALPHA,
gl... |
import * as THREE from 'three';
import { SVGLoader } from 'three/examples/jsm/loaders/SVGLoader';
import fontDefinitionHelvetikerBold from 'three/examples/fonts/helvetiker_bold.typeface.json';
class QRCode3D {
constructor(canvas, options) {
const defaultOptions = {
baseColor: 0xeeeeee,
qrcodeColor: 0... |
import React, { Component} from 'react';
import { connect } from 'react-redux';
import {ButtonToolbar, Button,} from 'reactstrap';
import {WizardConfirm} from '_components';
import * as actions from '_reducers/actions.js';
import { businessRulesService } from '_services/business.rule.services.js';
import { commons } fr... |
const Discord = require("discord.js");
const fs = require("fs");
const RequestsTools = require("./requests_node/tools");
const CollectionsTools = require("./collections_node/tools");
const WikiTools = require("./wiki_node/tools");
//#region [Function] Check if message is a command
/**
* Check if the message is a com... |
/*
* Minio Cloud Storage (C) 2016, 2018 Minio, 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 applicab... |
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _regeneratorRuntime from "@babel/runtime/regenerator";
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
/**
* Copyright IBM Corp. 2016, 2020
*
* This... |
var canvas = document.getElementById('renderCanvas');
var engine;
var currentScene;
game.unload = function() {
game.state = "menu";
currentScene.dispose();
engine = "";
currentScene = "";
}
var sunlightShadows;
game.load = function(filename) {
console.log("loading map: " + filename);
engine = new BABYLON.Engine(... |
// ____________________getting data for loading
db.collection("card8")
.get()
.then((snapshot) => {
snapshot.docs.forEach((doc) => {
renderCard(doc);
});
});
function renderCard(doc) {
name = doc.data().name;
rolAtyp = doc.data().rolAtyp;
dieAtyp = doc.data().dieAtyp;
dieAnum = ... |
function handleAJAXReturn() //retour d'ajax
{
if (http.readyState == 4)
{
if (http.status == 200)
{
var getFromPhp = http.responseText; //je stocke la valeur de retour http danq une variable
var infoReturn = 0;
... |
// El MD5Hash es necesario para hacer las llamadas...
import md5 from 'md5'
import uniqid from 'uniqid'
import fs from 'fs'
import Path from 'path'
import Registry from 'npm-registry'
//import decompress from 'decompress-zip'
import Child from './Child'
class Adquire{
constructor(App){
this.app= App... |
import { store } from "react-notifications-component";
import "react-notifications-component/dist/theme.css";
class notify {
date(date) {
const options = {
weekday: "short",
year: "numeric",
month: "long",
day: "numeric",
hour: "numeric",
minute: "numeric",
hour12: true,... |
/*
* Copyright 2012, Mozilla Foundation and contributors
*
* 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 applica... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... |
/**
* Created by kelvinsun on 2016/4/11.
*/
'use strict';
let async = require('async');
let category = require('./structCategory');
let outline = require('./structOutline');
let database = require('../common/database');
let toString = require('../common/tool').toString;
let hasOwnProperty = requir... |
// -----------------------------------------------------------------------------
// Include declarations and functions.
// See article:
// https://stackoverflow.com/questions/5797852/in-node-js-how-do-i-include-functions-from-my-other-files
var tools = require("./0-cal.js");
var value = tools.addSum(10,20);
console.l... |
//Removes special charachers: spaces, brackets, commas, etc.
function removeSpecialCharactersFromNodeNameString(nodeName){
return nodeName.replace(/ /g, "").replace(/[&\/\\#,+()$~%.'":*?<>{}]/g,"");
}
//From: http://bateru.com/news/2011/03/javascript-standard-deviation-variance-average-functions/
function calculat... |
import { AtomicPattern, CaretAnchor, CharacterClass, ComplexClass, DollarAnchor, DotPattern, Regex, RegexAlternative } from "../grammar/ast";
import { ASTERISK, LAZY_ASTERISK, OPTIONAL, PLUS, LAZY_PLUS, LAZY_OPTIONAL } from "../grammar/astBuilder";
import { EngineNFA, EPSILON } from "./nfa";
import {CharacterMatcher, D... |
// Trying to understand this code? Skip down to "here's the interesting stuff".
'use strict';
const fs = require('fs');
const express = require('express');
const app = express();
if (!process.env.DISABLE_XORIGIN) {
app.use(function(req, res, next) {
var allowedOrigins = ['codepen.io','https://www.freecodecamp.... |
function initmsg(){
window.addEventListener('message', function(event) {
deleteAll();
var data = event.data;
if(data.type=="point"){
document.getElementById("polylineDiv2").style.display="none";
document.getElementById("polygonDiv2").style.display="none";
... |
// Copyright (c) Microsoft Corporation and others. Licensed under the MIT license.
// SPDX-License-Identifier: MIT
const Store = require('../../../providers/stores/mongo')
const sinon = require('sinon')
const { expect } = require('chai')
const EntityCoordinates = require('../../../lib/entityCoordinates')
const { range... |
/*!
* Modified version of the default reporter to print code coverage from jscoverage
* based on https://github.com/arunoda/nodeunit/commit/2bf99117a6df9ace410c57d7225fe82ea2e48fac
* which is not included in any of the default reporters
*
* Nodeunit
* Copyright (c) 2010 <NAME>
* MIT Licensed
*/
/**
* Module d... |
jQuery(document).ready(function($) {
var dragtablerowhelper = function(e, ui) {
ui.children().each(function() {
$(this).width($(this).width());
});
return ui;
};
if (updraftmanagerlion.managerurl.length > 0 && 'http' == updraftmanagerlion.managerurl.substring(0,4)) {
$.get(updraftmanagerlion.managerurl... |
/** Connect Four
*
* Player 1 and 2 alternate turns. On each turn, a piece is dropped down a
* column until a player gets four-in-a-row (horiz, vert, or diag) or until
* board fills (tie)
*/
const WIDTH = 7;
const HEIGHT = 6;
let currPlayer = 1; // active player: 1 or 2
let board = []; // array of rows, each row ... |
#!/usr/bin/env node
const jsTokens = require("js-tokens");
const prompt = require('prompt-sync')();
const execSync = require('child_process').execSync;
const fs = require('fs');
if (process.argv[2] === "init") {
const pathArray = process.cwd().split("/");
const init = JSON.stringify({
"name": pathArray... |
function drawScene(deltatime) {
gl.useProgram(MainProgram);
gl.clearColor(0.0, 0.0, 0.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
gl.bindBuffer(gl.ARRAY_BUFFER, MainProgram.buffer);
gl.enableVertexAttribArray(MainProgram.a1);
gl.enableVertexAttribArray(MainProgram.a2);
... |
require('env2')('config.env');
var debug = require('debug')('replay');
var fs = require('fs');
var util = require('util');
var utils = require('./lib/utils')
var path=require('path');
var events = require('events');
var getopt = require('node-getopt');
var async = require('async');
var readline = require('readline');
... |
/* eslint-disable no-undef */
import 'leaflet/dist/leaflet'
import 'leaflet-extra-markers'
import 'leaflet/dist/leaflet.css'
import 'leaflet.markercluster/dist/MarkerCluster.css'
import 'leaflet.markercluster/dist/MarkerCluster.Default.css'
import marker from './images/marker-icon.png'
import markerRed from './images/m... |
import { createElement } from 'react';
import marksy from 'marksy/components';
import { A, H1, H2, H3, H4, H5, P, Li, Ol, Ul, Hr, Code, Blockquote, ArticleHeader, Video } from '~/templates/global/styled';
import { Img } from '~/templates/content/styled';
import ContentTemplate from '~/templates/content/Template';
impo... |
// @flow
import { connect } from 'react-redux'
import React, { Component } from 'react'
import { Segment, Icon, Divider, List, Dimmer, Loader, Button } from 'semantic-ui-react'
import routes from '../../constants/routes'
import styles from '../home/Home.css'
import BalanceGrid from '../wallet/BalanceGrid'
import Transa... |
import dayjs from "dayjs";
// Modules
import Tracker from "../tracker/tracker";
import NomieLog from "../../modules/nomie-log/nomie-log";
import Log from "../nomie-log/nomie-log";
import logFilter from "../log-filter/log-filter";
// Utils
import Logger from "../../utils/log/log";
import _math from "../../utils/math/mat... |
/**
* Module defines generic requests.
*/
"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... |
// Command line version of Pointrel system for Node.js
// Just quick-and-dirty playful experiment for now
// 2015-01-10 <NAME>
// MIT License
"use strict";
var resourcesDirectory = __dirname + "/resources";
var command = process.argv[2];
if (!command) {
console.log("Pointrel usage: command args...");
process.ex... |
"use strict"
const inspector = {
observe(obj = null) { // omiting more than 1
if (!obj)
return hideElem(inspector.Content.elem)
inspector.Content.refresh(obj)
},
refresh(t = null) {
const c = inspector.Content
c.refresh(t || c.prev)
},
}
function newPropertyMap() {
const pl = new Map()
pl.newProp = (... |
'use strict';
/**
* Module dependencies
*/
let path = require('path'),
mongoose = require('mongoose'),
Service_consumption = mongoose.model('Service_consumption'),
Department = require(path.resolve('./modules/departments/server/controllers/department-custom.server.controller')),
Keys = require(path.resolve('... |
import { diagram } from "../Appearance/graphAppearance.js"
import jLayeredLabelPropagation from "../ClusteringAlgorithms/layeredLabelPropagation.js"
import jLouvain from "../clusteringAlgorithms/jlouvain.js"
import recover from "./groupsRecover.js"
import configApplicator from "../configApplicator.js"
import clustering... |
"use strict";
/********************************************************************************
* Copyright (C) 2019 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl... |
import classes from "./MenuCreation.module.css";
import React, { Component } from "react";
import Day from "../../components/Day/day";
import Button from "../../components/UI/Button/button";
import Modal from "../../components/UI/Modal/modal";
import axios from "../../axios-miam";
import Results from "../../components/... |
const isUnitlessNumber = {
animationIterationCount: true,
borderImageOutset: true,
borderImageSlice: true,
borderImageWidth: true,
boxFlex: true,
boxFlexGroup: true,
boxOrdinalGroup: true,
columnCount: true,
columns: true,
flex: true,
flexGrow: true,
flexPositive: true,
flexShrink: true,
fle... |
function saveModel(event, url) {
// console.log(event.target);
url = url.replace('melhorenvio_model', event.target.value);
Element.show('loading-mask');
window.location.href=url
}
function tokenButton() {
let token = document.getElementById("melhorenvio_general_token_melhorenvio").value
... |
"use strict";
require('../utils/date');
const os = require('os');
const fs = require('fs');
const ini = require('ini');
const assert = require('assert');
const Sender = require('./zabbixSender');
const xmlParser = require('fast-xml-parser');
const he = require('he');
const escapeStringRegexp = require('escape-str... |
import React, { Component, createRef } from 'react';
import cx from 'classnames';
import styles from './MixerComponent.scss';
import i18n from 'src/locales';
import { withGlobalSettings } from 'src/app-manager/Context';
import {
REGION_BOUNDINGBOX_NAME,
CLASSIFICATION_TASK,
REGION_BASED_TASK,
REGION_POLYGON_NAM... |
$(function(){
$.ajax({
type: "post",
url: "./department.queryUserDepartment.action",
success: function(msg){
var dataObject = JSON.parse(msg);
if(dataObject.flag == true){
$("#search_area").find("td[style='display: none;']").show();
var treeData = new TreeHelper(dataObject.d... |
let webSocket
let ID
let me
let players = {}
let chat = []
let balls = []
let engine, paddle
let ballId = null
const ballOpts = {
label: 'ball',
// density: 0.1,
restitution: 1.0,
friction: 0.00,
frictionAir: 0.00000,
render: {fillStyle: '#808080', strokeStyle: 'transparent'},
collisionFilter: {
grou... |
const C4 = new Audio("sounds/C4.mp3");
const Db4 = new Audio("sounds/Db4.mp3");
const D4 = new Audio("sounds/D4.mp3");
const Eb4 = new Audio("sounds/Eb4.mp3");
const E4 = new Audio("sounds/E4.mp3");
const F4 = new Audio("sounds/F4.mp3");
const Gb4 = new Audio("sounds/Gb4.mp3");
const G4 = new Audio("sounds/G4.mp... |
/******************************************************************************
* Copyright 2012 Intel Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... |
// Global functions and listeners
window.onresize = () => {
// when window resize , we show remove some class that me be added
// often for debug
if(window.document.documentElement.clientWidth > 680){
let aboutContent = document.getElementById('nav-content')
aboutContent.classList.remove('hi... |
import React, { useState, useEffect } from "react";
import { useForm } from "react-hook-form";
import { useRouter } from "next/router";
import moment from "moment";
import Modal from "../Modal/Index";
import { makeStyles } from "@material-ui/core/styles";
import QuotesItems from "./QuoteItems";
import QuoteTable from "... |
"use strict";
// Task 1
// Create an object represents you
// have your first name, last name, age, dob(date of birth), favorite food (3),favorite movie (5)
let person= {
firstname : "Aya",
lastname : "alsawa",
age : 23,
dob : "27-9-1998",
favoritefood :["mansaf", "shawarma", "pizza"],
favorit... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _config = require('../config');
var _config2 = _interopRequireDefault(_config);
var _sportConfig = require('../utils/sportConfig');
var _sportConfig2 = _interopRequireDefault(_sportConfig);
var _express = require('express');
var _e... |
let active,
angle,
edge,
entryArea,
explosionSize,
flameTimeout,
gravity,
ground,
playing,
position,
rocketSize,
safe,
speed,
start,
turn,
velocity;
let moveRate = 1;
let turnRate = 0.5;
const rocket = document.querySelector(".rocket");
const airspace = document.querySelector(".airspace"... |
import { Fragment } from "react";
import { css, StyleSheet } from "aphrodite";
import Router from "next/router";
import { connect } from "react-redux";
import DiscussionCard from "~/components/DiscussionCard";
import { ReplyEditor } from "~/components/DiscussionCommentEditor";
import DiscussionPostMetadata from "~/co... |
import React, {useState, useEffect} from 'react';
import styled from 'styled-components';
import DataContainer from './DataContainer';
import {GoSearch} from 'react-icons/go';
import api from './api';
import Weather from './WeatherType';
import Swal from 'sweetalert2';
import {AiOutlineLoading} from 'react-icons... |
/*
* @Author: jack.lu
* @Date: 2020-4-21 10:10:20
* @Last Modified by: jack.lu
* @Last Modified time: 2020-4-21 15:01:41
*/
function Friend(uuid, name, avatar) {
this.uuid = uuid;
this.name = name;
this.avatar = avatar;
this.online = false;
this.unReadMessage = 0;
}
function Group(uuid, name,... |
// Provides the core functionality of the game
// Restarts the game
function restart() {
//console.log("Restarting");
location.reload();
socket.emit("restart");
}
// Find index for the country within player data ?????
function findIndexInData(data, property, value) {
let result = -1;
data.some(func... |
export const taiwan = {
Taipei: {
Taipei: [
"Beitou",
`Da'an`,
"Datong",
"Nangang",
"Neihu",
"Shilin",
"Songshan",
"Wanhua",
"Wenshen",
"Xinyi",
"Zhongshan",
"Zhongzheng",
],
"New Taipei": [
"Banqiao",
`Xinzhuang`,
"... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = start;
require("core-js/modules/es6.array.for-each");
require("core-js/modules/es6.array.filter");
require("core-js/modules/web.dom.iterable");
require("core-js/modules/es6.array.iterator");
require("core-js/modules/e... |
/*
* Copyright (c) 2005-2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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.ap... |
/*
* Copyright (c) 2016 ROMSOFT.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the The MIT License (MIT).
* which accompanies this distribution, and is available at
* http://opensource.org/licenses/MIT
*
* Contributors:
* <NAME> (ROMSOFT)
* Initia... |
import React from "react"
import { Link } from "gatsby"
import SEO from "../components/seo"
import Img from "gatsby-image"
import { motion } from 'framer-motion'
import { fadeBumpDelayLong, fadeBumpDelay, fadeBump, fade } from "../helpers/transitionHelper"
const PhotographyPostPage = ({ data: { current, related }, loc... |
'use strict';
/**
* Starts the hapi server, registering all routes found in the /lib/routes folder.
*/
let startServer = (() => {
var _ref = _asyncToGenerator(function* () {
try {
// Create a server with a host and port
const server = new _hapi2.default.Server({
connections: {
rou... |
/* Native JavaScript for Bootstrap 5 | Dropdown
----------------------------------------------- */
import queryElement from 'shorter-js/src/misc/queryElement.js'
import passiveHandler from 'shorter-js/src/misc/passiveHandler.js'
import addClass from 'shorter-js/src/class/addClass.js'
import hasClass from 'shorter-js/s... |
/**
* Module dependencies
*/
import isUndefined from 'lodash/lang/isUndefined';
import isNull from 'lodash/lang/isNull';
import template from 'lodash/string/template';
import { xenia } from 'app/AppActions';
import { makeQueryFromState } from 'search/SearchActions';
import { parseFilterRanges, distributionForInput ... |
'use strict';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import amigo_gen from 'amigo2-instance-data';
import FaCaretUp from 'react-icons/lib/fa/caret-up';
import FaCaretRight from 'react-icons/lib/fa/caret-right';
class AssociationEvidence extends Component {
constructor() {
... |
import Easing from "../../easing";
import TangibleThinker from "./TangibleThinker";
import * as CONSTS from "../consts";
import Vector from "../../geometry/Vector";
const ANGLE_INT_MAX_TIME = 666;
const ANGLE_INT_MIN_VALUE = 0.0;
const ANGLE_INT_MAX_VALUE = 0.1;
const SPEED = 6;
const STRAFE_SPEED = 0.8;
class FPSCon... |
const Vec3 = require('vec3').Vec3
const { spawn } = require('child_process')
const { once } = require('events')
const process = require('process')
const assert = require('assert')
const util = require('util')
const { callbackify, sleep, onceWithCleanup, withTimeout } = require('../../../lib/promise_utils')
module.exp... |
function colours() {
presetColors = {
'D': ['#E60A0A', '#FDFF7B'], 'E': ['#E60A0A', '#FDFF7B'],
'K': ['#145AFF', '#FDFF7B'], 'R': ['#145AFF', '#FDFF7B'],
'S': ['#A70CC6', '#FDFF7B'], 'T': ['#A70CC6', '#FDFF7B'],
'N': ['#A70CC6', '#FDFF7B'], 'Q': ['#A70CC6', '#FDFF7B'],
'V'... |
$(document).ready(function () {
var menu = $('.navbar-inverse.navbar-fixed-top');
if (window.location.hash) {
var hash = window.location.hash.substring(1);
if (hash == 'success') {
$('#regformok').modal('show');
history.pushState(null, null, '/');
} else {
... |
// 在input 前方加 icon
var inputIcon = {
"memberNo": "fa-list-ol",
"name": "fa-user-circle",
"username": "fa-address-card",
"password": "<PASSWORD>",
"confirmPassword": "<PASSWORD>",
"email": "fa-envelope",
"phone": "fa-phone",
"mobile": "fa-mobile",
"fax": "fa-fax",
"department": "fa-building",
"sub... |
import React from 'react';
import './App.css';
import Catalogue from './Component/Catalogue/Catalogue';
import SearchInput from "./Component/Catalogue/SearchInput/SearchInput";
import * as Constants from "./Component/Catalogue/constants";
import {getVisualCode} from "./Functions/SubjectCode/SubjectCode";
import Switc... |
//initialize both players
let player1;
let player2;
// Creates Players
const playerFactory = (name, sign) => {
let score = 0;
// increases score on Win
const increaseScore = () => {
score += 1;
};
// gets player score
const getScore = () => {
return score;
};
return { name, sign, getScore, increaseScore ... |
"use strict";
// cherrio, our web scraping library
var cheerio = require("cheerio");
// cookie library for reading geocookie for wait times
var cookie = require("cookie");
var Moment = require("moment-timezone");
var Park = require("../park");
var GeoLocation = require("../geoLocation");
var s_parkID = Symbol();
va... |
var cvs = document.getElementById('game')
var ctx = cvs.getContext('2d')
var width = 1500, height = 1500
cvs.width = width
cvs.height = height
// персонажи на старте
var chickenAmount = 6
var wheatAmount = 3
var cowAmount = 5
// игровая скорость
var speed = 1
// сторона игрового поля
var fieldSize = 8
var resource... |
const snapThreshold = 6;
const alignments = [
["h", "inner"],
["h", "mid"],
["h", "outer"],
["v", "inner"],
["v", "mid"],
["v", "outer"]
];
export const snapIfInRange = (draggedBox, boxes, resizeDirections) => {
const otherBoxes = boxes.filter(b => b.id !== draggedBox.id);
const snapQueries = otherBoxe... |
import {
createCircleGraph,
createCircularGraph,
createCompleteGraph,
createSquareGrid,
createPathGraph,
createStarGraph,
createWheelGraph,
createBinaryTree,
createCompleteTree,
createChvatalGraph,
createCubicalGraph,
createBullGraph,
createERGraph,
createSMGraph,
createBAGr... |
//// Constants ////
var minPriceAdjustment = 1;
var maxPriceAdjustment = 50;
var timeInterval = 15000;
var minFruitPrice = 0.50;
var maxFruitPrice = 9.99;
var startingPrice = 5.00;
var startingCash = 100.00;
var gameLength = 300000;
var avgPriceText = " Avg Price Paid: "
var fruits = ['Apples', 'Oranges', 'Banana... |
const { DateCountdownTimer } = require('./date-timer.js');
// returns a % b, but guarantees >0
function posMod(a, b) {
return ((a % b) + b) % b;
}
class Stage {
type;
content;
owner;
likers = [];
constructor(owner, type, content) {
this.owner = owner;
this.type = type;
... |
const pkgJson = require("./package.json");
const ShelfPack = require('@mapbox/shelf-pack');
const sharp = require('sharp');
const genEtag = require('etag');
const fresh = require('fresh');
const pLimit = require('p-limit');
const fetch = require('node-fetch');
const fs = require("fs");
const debug = require("debug")(pk... |
/*
Copyright (c) 2011 <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, distribute, sublicen... |
var chalk = require('chalk');
var childProcess = require('child_process');
var fs = require('fs');
var mkdirp = require('mkdirp');
var parseArgs = require('minimist');
var path = require('path');
var semver = require('semver');
var series = require('run-series');
//var tilde = require('tilde-expansion');
var Wizzard = ... |
#!/usr/bin/env node
var path = require('path'),
fs = require('fs');
var packageJson = require('./package.json');
var chalk = require('chalk'),
async = require('async'),
request = require('request'),
UglifyJS = require('uglify-js');
var readListFromFile = null;
if (!module.parent) {
readListFrom... |
/**
* @file Add Custom Analysis Dialog Component
* @author <NAME> <<EMAIL>>
* @created 30.06.18
*/
import * as React from "react";
import PropTypes from "prop-types";
// RegExp rules
import { AddName, NoStartWhiteSpace } from "../regexp-rules/RegExpRules";
// images for user guide in the dialog
import JupyterNot... |
'use strict';
var ApatiteConfigError = require('../error/apatite-config-error');
var ApatiteMappingError = require('../error/apatite-mapping-error');
var ApatiteSimpleMapping = require('../mapping/apatite-simple-mapping');
var ApatiteOneToOneMapping = require('../mapping/apatite-one-to-one-mapping');
var ApatiteOneTo... |
/* ----- ---- --- -- -
* Copyright 2020 The Axiom Foundation. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.apache.org/l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.