text stringlengths 3.22k 29.5k |
|---|
function GopherVoiceChat(){
//Defaults
this.volume = 1; // Voice chat output volume: 0-1
this.bSize = 300; // buffer size in milliseconds
this.vcPing = 300; // buffer size in milliseconds
//PING TIMER
this.pT = 0;
//INIT OBJECTS FOR MediaStream
this.acO = null; // AudioContext out
this.oG = null; // output g... |
let logoFont;
let logoPos;
let logoTextAlpha = 0;
let logoAlpha = 0;
let logoR = 100;
let logoIsLoaded = false;
let easing = 0.05;
let particles =[];
let lines = [];
let frame0 = 0;
let mousePos;
let temp_offset;
function preload(){
logoFont = loadFont('fonts/batmfa__.ttf');
}
function setup(){
frameRate(60)... |
//设置cookies
function setCookie(c_name, value, expiredays) {
var exp = new Date();
exp.setTime(exp.getTime() + expiredays*24*60*60*1000);
document.cookie = c_name + "="+ escape (value) + ";expires=" + exp.toGMTString()+";path=/";
}
//读取cookies
function getCookie(c_name) {
... |
const { withDb } = Msa.require('db')
const { Idea, IdeaSet } = require('./model')
const { MsaSheet } = Msa.require("sheet/module")
const { MsaVoteModule } = Msa.require("vote")
const userMdw = Msa.require("user/mdw")
const { IdeasPerm } = require("./perm")
const { addIdeasGlobalParams } = require("./params")
const { M... |
import eventsEngine from '../../events/core/events_engine';
import domAdapter from '../../core/dom_adapter';
import { isFunction } from '../../core/utils/type';
import BaseWidget from '../core/base_widget';
import { extend } from '../../core/utils/extend';
import { addNamespace } from '../../events/utils/index';
import... |
const ivm = require("isolated-vm");
const fetch = require("node-fetch");
const { getTransformationCode } = require("./customTransforrmationsStore");
const { userTransformHandlerV1 } = require("./customTransformer-v1");
const stats = require("./stats");
async function runUserTransform(events, code, eventsMetadata, vers... |
import React, { Component } from 'react';
import { validateFormField } from '../../helpers/validate';
export class AddEnquiryModal extends Component {
constructor(props) {
super(props);
this.state = {
enquiry: {
firstname: "",
phone: '',
email: '',
class_name: '',
... |
$(document).ready(function(){
$('#btnCapnhat_group').on('click',function(e){
var sg_id = $("#sg_id").val();
var social_name = $("#socialname").val();
var categ_group = $("[name=categ_group]").val();
var grade2 = $("#grade2").val();
var description = $("[name=description2]").... |
/**
* @description The Javascript that controls the functionality of the Map
* @author <NAME>, <NAME>
* @version 1.0
*/
var map;
var low;
var medium;
var high;
var OneSignal = window.OneSignal || [];
const requestURL = 'http://environment.data.gov.uk/flood-monitoring/id/stations';
const stationsURL = 'http://local... |
import React, { Component } from 'react';
import {
Text,
Image,
View,
TouchableOpacity,
Dimensions,
ScrollView,
TextInput,
Keyboard,
Switch,
StyleSheet,
Alert,
} from 'react-native';
import { CalendarList } from 'react-native-calendars';
import moment from 'moment';
import * as Calendar from 'expo... |
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
import React from 'react'
import ReactDOM from 'react-dom'
import Datastore from 'nedb'
import Movie from './components/movie.js'
import MoviesPan... |
/*
Copyright 2019 Adobe. All rights reserved.
This file is licensed 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.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... |
const {
Client,
MessageAttachment,
Collection,
MessageEmbed
} = require("discord.js");
const { PREFIX, TOKEN, DBL_API_KEY } = require("./config");
const bot = new Client({ disableMentions: "everyone" });
require('dotenv').config();
const { GiveawaysManager } = require("discord-giveaways");
const DBL = require("... |
/*
* Log file reader
* Credits: https://github.com/barzik/simple-log-viewer/blob/master/lib/logOpener.js
*/
const fs = require('fs');
const singleton = require('../commons/global.singleton').singleton;
const app = singleton('express');
const chokidar = require('chokidar');
var stream_log_file_path, static_... |
'use strict';
// ---------------------------------------------------------------------------
const Exchange = require ('./base/Exchange');
const { ExchangeError, AuthenticationError, DDoSProtection, InvalidOrder } = require ('./base/errors');
// ---------------------------------------------------------------------... |
'use strict';
var Alexa = require('alexa-sdk');
var http = require('http');
var querystring = require('querystring');
var APP_ID = undefined; // TODO replace with your app ID (OPTIONAL).
var HeaterMeterHost=process.env.heatermeterHost;
var HeaterMeterPort=process.env.heatermeterPort;
var apiKey = process.env.apiKey... |
const User = require('../models/user'),
express = require('express'),
router = express.Router(),
config = require('../config'),
me = require('../models/me'),
email_controller = require('./emailController'),
tweengle_email=config.mail.tweengle_email,
Invite = require('../models/... |
const Command = require('../../base/Command.js');
const DiscordJS = require('discord.js');
const db = require('quick.db');
const { stripIndents } = require('common-tags');
class LogToggle extends Command {
constructor (client) {
super(client, {
name: 'logtoggle',
description: 'Toggle individual logs'... |
import React, { Component } from 'react';
import { PropTypes as T } from 'prop-types';
import { connect } from 'react-redux';
import styled from 'styled-components';
import { Formik, FieldArray } from 'formik';
import get from 'lodash.get';
import App from '../../common/app';
import Constrainer from '../../../styles/c... |
// https://www.codewars.com/kata/530e69ae72d6dfced0000a9e/train/javascript
const isBigCompute = (a, b) => a.length + b.length >= 15
function add(a, b) {
if (!isBigCompute(a, b)) {
return (Number.parseInt(a) + Number.parseInt(b)).toString()
}
let result = ''
let curry = 0
while (a.length < b.length) { a = `0${... |
import Phaser from "phaser";
import Villager from "../entities/units/villager.js";
import Resource from "../entities/objects/resource.js";
import TownCenter from "../entities/buildings/town_center.js";
import Enemy from "../entities/units/enemy.js";
import Tower from "../entities/buildings/tower.js";
import Projectile ... |
import { ethers } from 'ethers'
import FACTORY_ABI from '../constants/abis/factory'
import EXCHANGE_ABI from '../constants/abis/exchange'
import ERC20_ABI from '../constants/abis/erc20'
import ERC20_BYTES32_ABI from '../constants/abis/erc20_bytes32'
import { FACTORY_ADDRESSES } from '../constants'
import UncheckedJso... |
import { isObject, isElement, extend, hasProp, logger } from './_utils.js'
import { attributes, drawData } from './_prefectures.js'
import { Defaults, Regions } from './_defaults.js'
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'
class svgJapan {
constructor( ...args ) {
if ( args[0] && isObje... |
import './SpacingTable.css.proxy.js';
/* src/components/SpacingTable.svelte generated by Svelte v3.24.0 */
import {
SvelteComponent,
append,
attr,
check_outros,
create_component,
create_slot,
destroy_component,
destroy_each,
detach,
element,
group_outros,
init,
insert,
mount_component,
safe_not_equal,
s... |
/*
constraint-based visualizations
kind of reactive, but uses thunks basically
draggable points have a special hook in the draw loop
mostly, other logic is confined to updates
there are draggable points, derived points,
line segments, and sliders.
draggable points can be dragged by the user and are unconstrained.
T... |
/*
* Copyright 2015 CERN
*
* 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 i... |
(function ($) {
"use strict";
$(document).ready(function () {
$(function () {
$("h1.section-heading").fitText({ minFontSize: '16px', maxFontSize: '62px'})
/*===Revolution Slider===*/
var revapi;
revapi = jQuery('.tp-banner').revolution(
{... |
'use strict';
var Pbf = require('pbf');
var VT = require('./vector-tile.js');
exports.read = readTile;
exports.write = writeTile;
exports.getLayerValues = getLayerValues;
exports.updateLayerProperties = updateLayerProperties;
exports.mergeLayer = mergeLayer;
exports.filterLayerByKeys = filterLayerByKeys;
exports.sele... |
const fs = require("fs");
const { JSDOM } = require("jsdom");
const { paramCase, snakeCase } = require("change-case");
const { titleCase } = require("title-case");
const childProcess = require("child_process");
let pageTemplateHtml = "";
function parseEpisodeInfo(saga, episodeNumber) {
const episodeFilename = `${__... |
// 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 stepNumber = process.argv[6];
var keyType = process.... |
// Main script to handle basic game configurations and functions
function init() {
canvas = document.getElementById('canvas');
ctx = canvas.getContext('2d');
preloadImages();
draw();
}
/**
* Start game by activating full game logic, arranging UI etc. when start-btn clicked
*/
function startG... |
class TimelineProgressBar {
constructor({
sections,
sectionSize,
barSize,
ballSize,
paddingTop,
paddingBottom,
marginRight,
barBorder,
barShadow,
barTransition,
ballBorder,
ballShadow,
ballTransition,
} = {}) {
// Globals
this.activeSectio... |
import React from 'react';
import SimpleTourItem from './SimpleTourItem';
import TourIndicator from './TourIndicator';
import TourIndicatorStyles from './TourIndicatorStyles';
import { withTour } from './lib';
let globalPendingTours = [];
let globalTouring = null;
const hasDocument = typeof document !== undefined;
cl... |
#!/usr/bin/env node
/* eslint-disable no-console */
import dotenv from 'dotenv';
dotenv.config();
import { parse } from '@cobalt-ui/core';
import { DIM, FG_BLUE, FG_RED, FG_GREEN, FG_YELLOW, UNDERLINE, RESET } from '@cobalt-ui/utils';
import chokidar from 'chokidar';
import fs from 'fs';
import { performance } from ... |
/* global jasmineImporter */
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const Mainloop = imports.mainloop;
const Command = jasmineImporter.command;
const JUnitReporter = jasmineImporter.junitReporter;
const TapReporter = jasmineImporter.tapReporter;
const VerboseReporter = jasmineImporter.verboseReport... |
// Op een canvas kan je tekenen
const canvas = document.getElementById('spel');
// De maten van het canvas
const bcr = canvas.getBoundingClientRect();
const rasterGrootte = 16;
const breedte = Math.floor(bcr.width / rasterGrootte) * rasterGrootte;
const hoogte = Math.floor(bcr.height / rasterGrootte) * rasterGrootte;
... |
//菜单列表
let listMenuByBranchId = context + 'menu/listMenuByBranchId';
let listMenuTest = context + 'js/lancode.json';
//所有项目信息
let listProjectAll = context + 'project/listProjectAll';
//添加项目
let addProjectUrl = context + 'project/addProject';
//保存项目
let saveProjectUrl = context + 'project/saveProject';
//查询项目配置信息
let ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.scheduleInterview = exports.updateInterview = exports.createInterview = exports.getInterview = undefined;
var getInterview = exports.getInterview = function () {
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.m... |
/* eslint-disable no-console, import/no-extraneous-dependencies, prefer-const, no-shadow */
const log = (message, section) =>
console.log(`\n\u001B[36m${message} \u001B[4m${section}\u001B[0m\u001B[0m\n`);
const path = require("path");
const createPaginatedPages = require("gatsby-paginate");
const templatesDirector... |
//==================================================================
//
//==================================================================
function load(cb) {
var f = '['+(fc++)+'] '+arguments.callee.toString().replace(/function\s+/,'').split('(')[0],
dbg=1, fEnd=function(){ dbg&&console.timeEnd(f); console.gro... |
"use strict";
var tg = require("node-telegram-bot-api");
var st = require("node-storage");
var rq = require("request");
var fs = require("fs");
var ch = require("fs-cheerio");
process.on("uncaughtException", function(err){ console.log((err && err.stack) ? err.stack : err); });
//user data storage
var store = new st(... |
'use strict';
/**
* this module contains all the code related to the test process
*/
require('./globals');
const { ArrayUtils } = require('turbocommons-ts');
const { FilesManager } = require('turbodepot-node');
const { ConsoleManager } = require('turbodepot-node');
const { TerminalManager } = require(... |
import React from 'react';
import styled from 'styled-components/macro';
import withReduxFormForResponses from 'utils/withReduxFormForResponses';
import BackButton from 'components/BackButton';
import Card from 'components/Card';
import Figure from 'components/Figure';
import Form from 'components/Form';
import Multi... |
var $ = require('jquery');
var ol = require('openlayers');
require('bootstrap-select');
// var setupDragAndDrop = require('./setupDragAndDrop.js');
var nanoModal= require('nanomodal');
//var wsServer = require('./signalk.js');
var util = require('./util.js');
var xml2js = require('xml2js');
var xmlParser = new xml2js.P... |
const keystone = require( 'keystone' ),
moment = require( 'moment' ),
utilityService = require( '../../utils/utility.controllers' );
exports.PHYSICAL_NEEDS_OPTIONS = [ 'none', 'mild', 'moderate', 'severe' ];
exports.INTELLECTUAL_NEEDS_OPTIONS = [ 'none', 'mild', 'moderate', 'severe' ];
exports.EMOTIONAL_NEE... |
// CREATE OBJECTS
var floorGeometry = new THREE.PlaneBufferGeometry( 300, 300, 50, 50 );
var floorMaterial = new THREE.MeshPhongMaterial({ color: 0xD3D3D3, specular:0xffffff, side: THREE.DoubleSide })
var ceilingGeometry = new THREE.PlaneBufferGeometry( 300, 250, 50, 50 );
var southWall = new THREE.PlaneBufferG... |
import React, { useEffect, useState } from "react";
import { Link } from "react-router-dom";
import { Button } from "antd";
import artworkv1 from "./TAIAOS4.png";
import artworkv2 from "./TAIAOS_2.png";
import moment from 'moment';
import { ethers } from "ethers";
import { getUSDValueOfArtwork } from '../hooks/Prices.j... |
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.prototype.hasOwnProp... |
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.deriveSecret = exports.verify = exports.sign = exports.g... |
#!/usr/bin/env node
var fs= require('fs');
var util= require('util');
var BESSEL= require('bessel');
var fftHeader= '../window.h';
var windowFunctions= [];
var fftPoints= 1024;
var dataType= 'uint16_t';
var dataSize= 16;
var dataFactor= 1<<(dataSize - 1);
var dataMax= dataFactor - 1;
var zeroPadding= '0000';
var ... |
import React, {Fragment, useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import Box from 'reusecore/src/elements/Box';
import Text from 'reusecore/src/elements/Text';
import Image from 'gatsby-image';
import Heading from 'reusecore/src/elements/Heading';
import Button from 'reusecore/src/element... |
// create an array with nodes
var nodes = new vis.DataSet([]);
// create an array with edges
var edges = new vis.DataSet([
]);
// create a network
var container = document.getElementById('mynetwork');
// provide the data in the vis format
var data = {
nodes: nodes,
edges: edges
};
var options = {};
// init... |
const assert = require('chai').assert
const { httpRequest } = require('../../util/http')
const Http = require('http')
const Config = require('../../config')
const token = require('../config.json').token || ''
const MAX_TIMEOUT = 2 * 60 * 1000
const agent = new Http.Agent({
keepAlive: true,
maxSockets: 1
})
const r... |
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
'use strict';
var Atom = require("atom");
var Rebase = require("@glennsl/rebase/lib/js/src/Rebase.bs.js");
var Caml_obj = require("bs-platform/lib/js/caml_obj.js");
var Pervasives = require("bs-platform/lib/js/pervasives.js");
var Json_decode = require("@glennsl/bs-j... |
var tilesource = exports;
var path = require('path');
var url = require('url');
var qs = require('querystring');
global.tilesourceProtocols = global.tilesourceProtocols || {};
// Add your protocol handlers here.
// 'mbtiles:': require('mbtiles')
tilesource.protocols = global.tilesourceProtocols;
tilesource.defaults ... |
'use strict';
var sqlite = require('sqlite3'),
async = require('async'),
url = require('url'),
querystring = require('querystring'),
stringify = require('csv-stringify');
var config = require('./config.json');
var db = new sqlite.Database('servercooties.sql'),
notify = [],
pages = {};
db.seriali... |
// Copyright 2019 Esri
// 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 writing, so... |
import React from 'react';
import nookies from 'nookies';
import jwt from 'jsonwebtoken';
import MainGrid from '../src/components/MainGrid';
import Box from '../src/components/Box';
import DepBox from '../src/components/DepBox';
import {AlurakutMenu, AlurakutProfileSidebarMenuDefault, OrkutNostalgicIconSet} from '../s... |
/**
*
* This software is released under MIT licence :
*
* Copyright (c) 2018 <NAME> ( <EMAIL> )
*
* 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 limit... |
/*********************************************************************************************************************
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. *
* ... |
/**
* Copyright 2020 <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 ... |
/**
* @fileoverview 유틸리티 메서드 모음
* @author NHN Ent. FE Development Team
*/
'use strict';
var $ = require('jquery');
var _ = require('underscore');
var snippet = require('tui-code-snippet');
var CELL_BORDER_WIDTH = require('./constMap').dimension.CELL_BORDER_WIDTH;
var util;
/**
* Decode URI
* @param {string} uri -... |
const puppeteer = require("puppeteer");
const JSSoup = require("jssoup").default;
const qrcode = require("qrcode-terminal");
const colors = require("colors");
class whatsappUnofficialApi {
async services(save, headdless) {
const args = [
'--disable-dev-shm-usage',
'--enable-sync', '--enabl... |
var division = "grid";
var maxX, maxY;
var colors = ['rgb(93, 53, 39);', 'rgb(130, 36, 51);', 'rgb(198, 12, 48);', 'rgb(255, 99, 25);', 'rgb(253, 200, 47);','rgb(254, 221, 0);', 'rgb(51, 115, 33);', 'rgb(20, 77, 41);', 'rgb(40, 78, 54);', 'rgb(99, 153, 171);', 'rgb(0, 101, 189);', 'rgb(0, 57, 166);', 'rgb(0, 38, 100)... |
'use strict';
const TaskDef = require('./task-defs');
const TaskFactory = require('./task-factory');
const Task = require('./tasks');
const isTaskLike = Task.isTaskLike;
const core = require('./core');
const ReturnMode = core.ReturnMode;
const states = require('./task-states');
const isInstanceOf = require('core-func... |
/**
* A database model for BlogPosts
*/
'use strict';
module.exports = Blog;
const Enum = require('enum');
const path = require('path');
const Model = require('objection').Model;
const pug = require('pug');
const express = require('express');
const MediaLibrary = require('./MediaLibrary');
const defin... |
'use strict';
var path = require('path');
var glob = require('glob');
var _ = require('underscore');
var collect = require('../lib/collect');
var include = require('../lib/include');
var helpers = require('./helpers.js');
exports.CoreError = require('./error');
exports.config = function($$) {
return {
//... |
// https://john-dugan.com/javascript-debounce/
var debounce=function(e,t,n){var a;return function(){var r=this,i=arguments,o=function(){a=null,n||e.apply(r,i)},s=n&&!a;clearTimeout(a),a=setTimeout(o,t||200),s&&e.apply(r,i)}};
// peek-a-boo.7.3.js - <NAME> - https://websemantics.uk/articles/peek-a-boo-v7/
// Show -... |
const { Document } = require("flexsearch");
// var index = new Index();
const util = {
index : new Document({
tokenize: "forward",
resolution: 3,
document: {
id: "id",
index: ["creator","title", "publisher",'place', "dates"]
}
}),
allData: [],
numLookup: {},
sparqlEndpoint: 'htt... |
const ts = require("typescript")
const path = require("path")
const fs = require("fs")
const {
TRANSPILER_AFTER,
TRANSPILER_BEFORE
} = require("./Modifer/TRANSPILER")
// const CSS_ = require("./Modifer/IMPORTER/CSS")
// const JSON_ = require("./Modifer/IMPORTER/JSON")
// const BASE64_ = require("./Modifer/IMPOR... |
var mic;
var Color = net.brehaut.Color;
var colors = [
"#d30100", // 11
"#f37100", // 10
"#f37100", // 9
"#f2b10f", // 8
"#f2b10f", // 7
"#f3f320", // 6
"#f3f320", // 5
"#f3f320", // 4
"#908d31", // 3
"#908d31", // 2
"#308a45", // 1
"#308a45", // 0
];
var svg, cType, point =... |
var herramientas;
$(document).ready(function () {
table = $('#tablaProyectos').DataTable({
"columnDefs": [ {
"targets": [6],
"searchable": false,
"visible": false
} ]
});
table.on('click', '.eliminar', function () {
$tr = $(this).parents('tr... |
'use strict';
const _ = require('lodash');
const Promise = require('bluebird');
const Queue = require('@terascope/queue');
const parseError = require('@terascope/error-parser');
/*
Execution Life Cycle for _status
pending -> scheduling -> running -> [ paused -> running ] -> [ stopped | completed ]
Exceptions
reje... |
/*-------------------------------------------------------------------------
/ GLOBAL VARIABLES
/-------------------------------------------------------------------------*/
let cityName;
let stateName;
let countryName;
let fullName;
let latLong = {};
let population;
let cityPhotoURL;
let cityScore;
let scores;
const wea... |
import axios from 'axios'
import dayjs from 'dayjs'
import { omit } from 'lodash'
import { INSTRUMENT_DETAILS, STRATEGIES_DETAILS } from '../constants'
import { doSquareOffPositions } from '../exit-strategies/autoSquareOff'
import individualLegExitOrders from '../exit-strategies/individualLegExitOrders'
import console... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.EthHdWallet = exports.generateMnemonic = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.... |
/** @license MIT License (c) copyright 2010-2014 original author or authors */
/** @author <NAME> */
/** @author <NAME> */
var lcs = require('./lib/lcs');
var array = require('./lib/array');
var patch = require('./lib/jsonPatch');
var inverse = require('./lib/inverse');
var jsonPointer = require('./lib/jsonPointer');
... |
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _extends from "@babel/runtime/helpers/esm/extends";
import { createVNode as _createVNode } from "vue";
import omit from 'omit.js';
import { defineComponent, inject, provide } from 'vue';
import VcTimePicker from '../vc-time-picker';
import ... |
var $ = function (query, root) {
if (query[0] == '<') {
var t = document.createElement('div');
t.innerHTML = query;
return [...t.childNodes];
}
root = root || document;
return [...root.querySelectorAll(query)];
};
var anchor = $('#main h2.heading')[0];
var root = $('<div style="text-align: center">... |
const _ = require("lodash")
const TreeNode = require("../TreeNode/TreeNode")
const processConfig = require("./processConfig")
const setupValue = require("./SetupValue/setupValue")
const injectToObject = require("./injectToObject")
const setFunction = require("./set")
const getFunction = require("./get")
const EventMan ... |
var margin = {
top : 20,
right : 120,
bottom : 20,
left : 120
}, width = 960 - margin.right - margin.left, height = 800 - margin.top
- margin.bottom;
var i = 0, duration = 750, root;
var tree = d3.layout.tree().size([ height, width ]);
var diagonal = d3.svg.diagonal().projection(function(d) {
return [ d.y, d.... |
import React from 'react'
import PropTypes from 'prop-types'
import { Flex } from 'rebass/styled-components'
import { FormattedMessage, injectIntl } from 'react-intl'
import { intlShape } from '@zap/i18n'
import { convert } from '@zap/utils/btc'
import { CoinBig } from '@zap/utils/coin'
import { Bar, Button, Header, Pa... |
import React, { lazy, useState, useEffect, useLayoutEffect } from "react";
import {
CBadge,
CButton,
CButtonGroup,
CCard,
CCardBody,
CCardGroup,
CCardFooter,
CCardHeader,
CCol,
CProgress,
CRow,
CCallout,
CWidgetProgress,
CWidgetIcon,
CWidgetProgressIcon,
CCardImg,
CDataTable,
} from "@... |
let ModbusBuffer = {
calloc: ffi('void *calloc(int, int)'),
dv_alloc: ffi('void *dv_alloc(int)'),
getInt8: ffi('int dv_get_int8(void*, int)'),
setInt8: ffi('int dv_set_int8(void*, int, int)'),
getInt16: ffi('int dv_get_int16(void*, int)'),
getInt32: ffi('int dv_get_int32(void*, int)'),
setIn... |
function rand(min, max) {
return Math.random() * (max - min) + min;
}
function randInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function shuffle(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = ar... |
// Fork to work with restdb.io NoSql backend
// Full spec-compliant TodoMVC with localStorage persistence
// and hash-based routing in ~246 effective lines of JavaScript.
// Instantiate keyclak (if loaded)
var keycloak = typeof Keycloak !== 'undefined' ? Keycloak({ url: 'http://devbox/auth', realm: 'todomvc', clientId... |
import L from 'leaflet';
import PropTypes from 'prop-types';
import './styles.css';
import {
withLeaflet,
MapControl
} from 'react-leaflet';
const reactToCSS = require('react-style-object-to-css')
const boxZoomControlDefaultStyle = {
width: '32px',
height: '32px',
marginRight: '11px',
border: '1px solid rgba(... |
var playerCanvas = document.getElementById('character');
var monsterCanvas = document.getElementById('monster');
var bonusCanvas = document.getElementById('bonus');
var gameZone = document.getElementById('jeux');
var startLevel1Screen = document.getElementById('start1');
var startLevel2Screen = document.getElementById(... |
import { SquareCanvas } from "../shared/canvas2d";
const main = document.querySelector("main");
const canvas = new SquareCanvas({ debounceResize: 0 });
const rotateX = (p, angle) => {
const radians = (angle * Math.PI) / 180;
const s = Math.sin(radians);
const c = Math.cos(radians);
return {
x: p.x,
y: c * p.... |
import React from 'react'
import PropTypes from 'prop-types'
class CardActivations extends React.Component {
constructor (props) {
super(props)
this.getNewPlayerStates = this.getNewPlayerStates.bind(this)
this.applyCardEffects = this.applyCardEffects.bind(this)
this.applyCardEffect = this.applyCardEf... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
require("core-js/modules/es.array.from");
require("core-js/modules/es.array.includes");
require("core-js/modules/es.array.iterator");
require("core-js/modules/es.object.to-string");
require("core-js/modules/es.set"... |
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj ... |
/* eslint no-underscore-dangle: 0 */
/* eslint no-shadow: 0 */
/* eslint camelcase: 0 */
const classPoint = require("./templates/types/class-point.html"),
classPolygon = require("./templates/types/class-polygon.html"),
graduatedPoint = require("./templates/types/graduated-point.html"),
heatmap = require("./templ... |
var dbu=require('../../db.js');
var someVar = [];
var list_of_results="";
var bcrypt=require('bcryptjs');
const saltRound=10;
function pushresults(req,res) {
console.log('Custom Edit View Controller');
let standardFields=[];
let customFields=[];
let customscript='';
let lookupObjects=[];
let l... |
/*
* grunt-devperf
* https://github.com/gaelmetais/grunt-devperf
*
* Copyright (c) 2014 <NAME>
* Licensed under the MIT license.
*/
/*jslint node: true */
'use strict';
var fs = require('fs');
var path = require('path');
module.exports = function(grunt) {
require('grunt-phantomas/tasks/phantomas')(grunt);
... |
/**
* Provides utility functions to access Reddit posts through the bot.
*
* Almost all of the work regarding reddit functionality is handled through this file. The
* functions for handling the reddit subcommands use other utility functions in this file, as well
* as other libraries where needed to handle Reddit c... |
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["id", "buttonProps", "buttonText", "canCancel", "cancelButtonText", "disabled", "errorText", "fileInputProps", "fileName", "loaderAnimation", "onCancel... |
/**
*
* AddCounterForm
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { Col, Row, Button, FormGroup, Label, FormFeedback, Alert } from 'reactstrap';
import { connect } from 'react-redux';
import { compose } from 'redux';
import { createStructuredSelector } from 'reselect';
import { Form... |
var AWS = require('aws-sdk');
var iotdata = new AWS.IotData({endpoint: 'a27ta3sxbmmw0b.iot.us-east-1.amazonaws.com'});
// Route the incoming request based on type (LaunchRequest, IntentRequest,
// etc.) The JSON body of the request is provided in the event parameter.
exports.handler = function (event, context) {
... |
/**
* JSON-WS Service Registry
*/
'use strict';
const EventEmitter = require('events');
const ejs = require('ejs');
const path = require('path');
const url = require('url');
const crypto = require('crypto');
const express = require('express');
const semver = require('semver');
const getLanguageProxy = require('./g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.