text stringlengths 3.22k 29.5k |
|---|
const { Command } = require('discord.js-commando')
const commando = require('discord.js-commando');
const Discord = require('discord.js');;
const { stripIndents, oneLine } = require('common-tags');
const moment = require('moment-timezone');
const { disambiguation } = require('../../util/Util.js');
module.exports = clas... |
const { MessageEmbed, Permissions: { FLAGS } } = require('discord.js');
const { emojis: { perms: { granted, notSpecified } } } = require('../../../lib/util/constants')
const mongo = require('../../../lib/structures/database/mongo')
const warnSchema = require('../../../lib/structures/database/schemas/server/moderation/w... |
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
//
// Copyright 2016-2020 The Board of Trustees of the Leland Stanford Junior University
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Licen... |
'use strict'
const Database = use('Database')
const Env = use('Env')
const stripe = require('stripe')(Env.get('STRIPE_SK'))
const _ = require('lodash')
const moment = require('moment')
const Mail = use('Mail')
class OrderController {
async confirmationEmail({ request, response, params, view, auth }) {
... |
import * as alt from 'alt';
import {
Job,
Objective,
copyObjective,
objectives,
modifiers,
restrictions
} from '../systems/job.js';
import { Interaction } from '../systems/interaction.js';
const jobName = 'Agility Training';
const trackStart = { x: -682.4571533203125, y: 2923.806640625, z: 13.8... |
isGameStarted = false;
isGameBeginPlay = false;
// #################################
// #################################
// #################################
//track player color choice
var playerOneColor = '',
playerTwoColor = '';
//track player turn
var isPlayerOneActive = false;
function resetGame() {
isGam... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const eventemitter3_1 = __importDefault(require("eventemitter3"));
const nanoid_1 = __importDefault(requ... |
var id = document.querySelector('#id');
var pw1 = document.querySelector('#pswd1');
var pwMsg = document.querySelector('#alertTxt');
var pwImg1 = document.querySelector('#pswd1_img1');
var pw2 = document.querySelector('#pswd2');
var pwImg2 = document.querySelector('#pswd2_img1');
var pwMsgArea = document.querySelect... |
$(document).ready(function(){
$('#add_watch').click(function(e) {
//console.log("add_offer")
//let addpropara = globalProduct
let watch_name = document.getElementById("w_name").value
let watch_type = document.getElementById("w_type").value
let watch_subtype = document.getElementById("w_subtype").... |
// homebridge-nb/lib/NbAccessory.js
// Copyright © 2020-2021 <NAME>. All rights reserved.
//
// Homebridge plug-in for Nuki Bridge.
'use strict'
const homebridgeLib = require('homebridge-lib')
const NbService = require('./NbService')
const NbClient = require('./NbClient')
class NbAccessory extends homebridgeLib.Acce... |
const HYPERMASK_URL = "https://app.hypermask.io/";
class HookedProvider {
constructor(base, overrides = {}) {
this.baseProvider = base;
this.overrides = overrides;
for (let method in base) {
if (typeof base[method] === "function" && method[0] != "_") {
this[method] = function() {
... |
//export
window.stringContainsSplitComma = stringContainsSplitComma;
window.getNowTimeStamp = getNowTimeStamp;
window.objectEquals = objectEquals;
window.gotoUrl = gotoUrl;
window.hasValue = hasValue;
window.uuid = uuid;
window.gotoUrlNoVersion = gotoUrlNoVersion;
window.getToken = getToken;
window.gotoUrlForc... |
var app = angular.module('doserApp', ['ngMaterial']);
if (!String.prototype.endsWith)
String.prototype.endsWith = function(searchStr, Position) {
// This works much better than >= because
// it compensates for NaN:
if (!(Position < this.length))
Position = this.length;
else
Position |= 0; // round posit... |
// Grabs the canvas and returns the context
// Sets size to 400 px square.
// Attach handlers
function initCanvas(canvasID) {
let canvas = document.getElementById(canvasID);
canvas.height = 400;
canvas.width = 400;
canvas.addEventListener("mousedown", mouseDownOnCanvas);
canvas.addEventListener("mou... |
//*******************************************
// Format the main section of the page according to loaded data
//*******************************************
function refreshContent(){
// Menubar
document.querySelector("#menu_methods").style.display=content.methods ? "block" :"none";
document.querySelector("#... |
import {cable, allPlayer} from './index'
import { gameRoomInstance } from "./gameRoom"
import Player, {HEADERS, getNameBox} from './player'
export let gameRoomsGames = undefined
export let gameBeingPlayed = undefined
// getters
const gameTitleLi = () => document.querySelector('#col9 > div > ul > li.collection-header.... |
$(document).ready(function() {
});
var game = new Phaser.Game(800, 800, Phaser.AUTO, 'game', { preload: preload, create: create, update: update });
var player ;
var opp;
var address = "ws://localhost:8000/game/";//"ws://diamant-s.ru:8000/game/"
var socket = new WebSocket(address);
//= make_new_player('Te... |
const instance_skel = require('../../../instance_skel')
var net = require('net')
const { executeAction, getActions, sendCommand } = require('./actions')
const { tcpClient } = require('./tcpClient')
const { satelliteAPI, sendAPI, hwcToSat } = require('./satelliteAPI')
const { storeData } = require('./storeData')
const {... |
//caracteristicas del producto
let detalles = function (dat, det, nombre) {
dat.text("");
dat.append($('<div class="titulo"></div>')
.append($('<span></span>').text(nombre)))
.append($('<div class="conte"></div>')
.append($('<ul></ul>').append($('<li></li>').text(det))));
};
//co... |
import React,{useEffect } from "react";
import { makeStyles } from "@material-ui/core/styles";
import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent";
import Button from "@material-ui/core/Button";
import Typography from "@material-ui/core/Typography";
import TextField from "... |
const Lexer = require('./lexer')
const Token = require('./token')
const TokenType = require('./tokenType')
const {
AST,
BinOp,
UnaryOp,
Num,
Compound,
Assign,
Var,
NoOp,
Program,
Block,
VarDecl,
Type,
ProcedureDecl,
Param
} = require('./ast')
class Parser {
... |
import { hexToInt, rgbToInt } from '@palett/convert'
import { CSI } from '@pres/enum-control-chars'
import { SGR } from '@pres/enum-csi-codes'
import { SC } from '@texting/enum-chars'
import { FUN, NUM, STR } from '@typen/enum-data-types'
import { nullish } from '@type... |
'use strict'
const WebSocket = require('ws')
const debug = require('debug')('bfx:api-mock-srv:ws2')
const path = require('path')
const Server = require('../server')
const { OnReq, Oc, Pn, Te, Tu, On } = require('../responses/on_req')
const Trade = require('../trade')
/**
* Acts as a mock for v2 of the Bitfinex webs... |
var arr = [
{
id: "bitrate",
title: "",
x: 0,
y: 0,
width: 12,
height: 11,
type: "success",
userData: {
fn: "createQoSReport"
},
}
];
var availableReports = {
//"createNodeReport" : "Nodes",
}
function inDetailMode() ... |
'use babel';
import _ from 'lodash';
import CommandInputBox from './CommandInputBox';
import CommandOutputView from './CommandOutputView';
import os from 'os';
const exec = require('child_process').exec;
export default class Command {
constructor(value, command = null, subCommands = null, argFormat = nul... |
// append the names as options for the dropdown
d3.json("data/samples.json").then((dict) => {
var samples_m = dict.metadata;
var samples_s = dict.samples;
samples_m.forEach(x => {
d3.select("#selDataset").append('option').attr('id',`${x.id}`).text(x.id)
});
});
var CHART_TYPE = "bar"
var DATA_SE... |
/**
* DevExtreme (cjs/file_management/remote_provider.js)
* Version: 21.2.5
* Build date: Mon Jan 17 2022
*
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
"use strict";
exports.default = void 0;
var ... |
var Cache_worker = require('./cache-worker.js');
var logger = require('loglevel');
var RTC_Cache = function(rtc) {
var self = this;
this.log = logger.getLogger("Cache");
var cache_worker = new Cache_worker();
this.worker = null;
this.conversation_data = [];
//load token from cache
var NXMO_user_data = null;... |
const WORLD_MAPS = {
"Satellite": L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
attribution: 'Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
... |
const fs = require('fs')
const Config = require('../data/config.json')
var Usr = require('../data/user.json')
const expDelayTime = 30000
var expLocked = new Map()
module.exports = {
initiateSave: initiateSave,
logUser: logUser,
logUserLeave: logUserLeave,
welcomeMessage: welcomeMessage,
'level': (... |
class ToDo {
constructor(el){
this.root = $(el);
this.count = 0;
this.createToDos();
this.createDragabled()
}
}
ToDo.prototype.addEventListenner = function(){
var _this = this;
this.root.on("click",".add-new",function(){
_this.addTask(this)
})
.on("click"... |
const { Client } = require('pg')
const config = require('./config')
const client = new Client({
connectionString: config.databaseURL,
})
client.connect().catch(e => console.error('connection error', e.stack))
const load = ({ cvID }) => {
const query = `
SELECT a.section_id AS section_id, title, text, templat... |
/*
Simon Game .js file
Built: 07/03/2018 10:43
Author: https://github.com/Vic7orHugo
UPDATES:
* (08/03/2018 19:49) - Added all the needed functionality for the game. The only one
thing left to do is to implement the interation sounds;
* (09/03/2018 10:36) - Added Win condition and message;
... |
import React,{Component} from 'react';
import { connect } from 'dva';
import {
Table,
Form,
Input,
Row,
Col,
Icon,
Modal,
Button,
Switch,
InputNumber
} from 'antd';
import styles from './TableStyle.less';
const FormItem = Form.Item;
const { TextArea } = Input;
const accountData = {
face:"http://img2.i... |
import whatsPure from "whats-element/pure";
import {AnnotationStatus, LightStatus} from "../step/const";
import {getScroll} from "./document";
import console from "./console";
const whats = new whatsPure();
const isMobile = ('ontouchstart' in window) || window.innerWidth<600;
function getPagenoteRoot() {
let root... |
import { Howl, Howler } from 'howler';
document.addEventListener('DOMContentLoaded', () => {
let podcasts = document.querySelector('.podcasts');
if (podcasts) {
initToggler(podcasts);
init(podcasts);
}
});
let initToggler = (parent) => {
let toggler = parent.querySelector('[data-podca... |
function isUserLogin() {
let e = localStorage.getItem("username");
null != e && "" != e
? ((document.getElementById("historique").href = "/historique.html"), (document.querySelector("#commande").href = "/commande.html"))
: ((document.querySelector("#commande").href = "/connection.html"), (docume... |
// @ts-check
import Background from './Background'
import Explosion from './Explosion'
import Tileset from './Tileset'
import Camera from './Camera'
import StaticEnemy from './StaticEnemy'
import AssetLoader from './AssetLoader'
import InteractiveScene from './InteractiveScene'
import Hitbox from './Hitbox'
import Col... |
'use strict'
/**
* abstract-cache-file
* @module abstract-cache-file
*/
const fs = require('fs')
const fsPromises = fs.promises
const path = require('path')
const JSON5 = require('json5')
const log = require('../../lib/utils').logger('ACF')
const exists = (dir) => {
try {
fs.accessSync(dir)
}
... |
import $ from './jquery'
import Util from './util'
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.1.1): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -----------------------------------------------------------------------... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var findIndexLeft = require('@wareset-utilites/array/findIndexLeft');
var forEachLeft = require('@wareset-utilites/array/forEachLeft');
var isArray = require('@wareset-utilites/is/isArray');
var trim = require('@wareset-utilites/string/... |
// import * as mars3d from "mars3d"
var map // mars3d.Map三维地图对象
let roamLine
const roamLineData = {}
// 需要覆盖config.json中地图属性参数(当前示例框架中自动处理合并)
var mapOptions = {
scene: {
center: { lat: 31.344715, lng: 115.783073, alt: 10056, heading: 158, pitch: -55 },
globe: {
// depthTestAgainstTerrain: true,
}
... |
var tips = {
//通用对话框
alert: function(msg, act) {
if (frameElement == null || frameElement.api == undefined) {
this.alert1(msg, act);
} else {
var api = frameElement.api,
W = api.opener;
W.$.dialog.alert(msg, function() {
... |
// TODO includes
var bluebird = require('bluebird');
var chalk = require('chalk');
var cheerio = require('cheerio');
var nodemailer = require('nodemailer');
var qs = require('qs');
var request = bluebird.promisifyAll(require('request'));
var scraper = function() {};
// constants
scraper.BASE_URL = 'sfbay.craigslist.o... |
/*
* Copyright 2018 Skyscanner Limited.
*
* 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... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _regenerator = require('babel-runtime/regenerator');
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
var _asyncToGenerator3 = _interopRequireDefau... |
import React from "react";
import {
StyleSheet,
Dimensions,
ScrollView,
Image,
ImageBackground,
Platform,
Alert,
AsyncStorage,
SafeAreaView,
KeyboardAvoidingView,
FlatList,
ActivityIndicator
} from "react-native";
import { Block, Text, theme, Input } from "galio-framework";
import { Card, ListIt... |
const Global = {
css: {
colors: {
state: {
active: "#4F9FC7"
},
header: {
bg: "#333333",
items: "#FFFFFF"
},
theme: [
{
themec0: "rgba(17, 63, 63, 1)",
themec1: "rgba(239, 204, 4, 1)",
themec2: "rgba(216, 165, 2, 1)",
them... |
const axios = require('./resources/axios')
const parser = require('./resources/parser')
const mysql = require('./resources/mysql')
const proxy = require('./resources/proxies')
const blockscout = require('./resources/blockscout')
const colors = require('colors')
const cheerio = require('cheerio')
const blockURL = 'https... |
//"use strict";
const childProcess = require("child_process");
const fs = require("fs")
const path = require("path");
const util = require('util');
const uuidv4 = require('uuid/v4');
const execFile = util.promisify(childProcess.execFile);
const fsWriteFile = util.promisify(fs.writeFile);
const fsReadFile = util.promi... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.pasteHandler = pasteHandler;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _lodash = req... |
var lzma = new LZMA("/lib/lzma_worker.js");
var game_state = {
"question": "",
"answers": [],
"clues": [],
"contexts": [],
"players": [],
"attempts": [],
"started": false,
"game_over": false,
};
function initialise(data) {
Object.assign(game_state, data);
document.getElementBy... |
'use strict'
const MINE = '💣';
const EMPTY = ' ';
const FLAG = '🚩'
const WRONGMARK = '❌'
const SMILY = '😃';
const GAMEOVER = '😵';
const VICTORY = '😎';
const LIVE = '❤';
const OVER = '✖';
const HINT = '❔';
const USEDHINT = '❓';
var gTimer;
var gLivesCount;
var gHintsCount;
var gSafeCount;
var gBoard;
var gGame;
v... |
/*** SHARED DATA ***/
var UPCOMING_BUSINESS; // array of events
var SELECTED_SENTENCE; // selected event
var SELECTED_TOPIC; // topic selected from event title
var INBOX_DATA; // retrieve inbox data on the selected topic
/*** REMOTE DATA URLs ***/
var IS_ALL_LOCAL = false;
var CALENDAR_URL = 'http://1e0c030.ngrok.co... |
import React, { useState } from "react"
import styled from "styled-components"
import HeroPhoto from "../../content/assets/heroPhoto.png"
import Knjiga from "../../content/assets/knjiga.png"
import KnjigaPopust from "../../content/assets/Knjiga_popust.png"
import Brodi from "../../content/assets/brodi.png"
import Pas f... |
import {
clamp,
baryCentric,
calculateTangentsBitangents
} from "../../utils";
import WebGLObject from "./object";
import SimplexNoise from "../../simplex-noise";
let SCALE = 6;
let SIZE = 512 * SCALE;
let VERTEX_COUNT = 256;
/**
* A simple terrain
* @class Terrain
* @extends WebGLObject
*/
export default... |
import Firebase from './firebase';
import Vue from 'vue';
import Vuex from 'vuex';
import { DateTime, Duration } from 'luxon';
import { CalculatePeriod } from '../util/date';
import { Download } from '../util/file';
Vue.use(Vuex);
const store = new Vuex.Store({
/**
* Populate state with some default values t... |
var gameTimer = document.getElementById("game-timer");
var gameCard = document.getElementById("game-card");
var beginButton = document.querySelector("#begin-button");
var answerButton = document.querySelector("#answer-button");
var viewHighScores = document.querySelector("#viewHS");
var timeLimit;
var elapsedTime = 0;
... |
/**
* This is the file where commands get parsed
*
* Some parts of this code are taken from the Pokémon Shfowdown server code, so
* credits also go to <NAME> and other Pokémon Showdown contributors.
* https://github.com/Zarel/Pokemon-Showdown
*
* @license MIT license
*/
var pmUser = [toId(config.nick)];
var e... |
const width = 19
const height = 24
const grid = document.querySelector('.grid')
const scoreDisplay = document.querySelector('.score')
const up = document.querySelector('.up')
const down = document.querySelector('.down')
const left = document.querySelector('.left')
const right = document.querySelector('.right')
let squa... |
'use strict'
const RippleKeypairs = require('ripple-keypairs')
const RippleBinaryCodec = require('ripple-binary-codec')
const RippleHashes = require('ripple-hashes')
class RippledWsClientSignError extends Error {
constructor (Message, Details) {
super(Message)
Object.assign(this, {
details: Details,
... |
const hasPrettier = require('../hasPrettier')
function getPrettierRules() {
return {
// The following rules can be used in some cases in prettier.
curly: 0,
'lines-around-comment': 0,
'max-len': 0,
'no-tabs': 0,
'no-unexpected-multiline': 0,
quotes: 0,
// The rest are rules that you... |
// Sila iteratorov pre polia
const cislo = [0, 1, 2, 3, 4];
for (let i = 0; i < cislo.length; i++) {
console.log(cislo[i]);
}
//------------------------------------------
// forEach(callbackfn, index, [])
const ludia = [
{ meno: 'feri', vek: 30, pozicia: 'programator' },
{ meno: 'janko', vek: 22, pozicia: 'pro... |
function headerTransition() {
//изменение состояния хедера в зависимости от прокрутки страницы
let scrlTop = $(document).scrollTop();
if ((scrlTop >= ($('.howItWorksScreen').offset().top - 1) && (scrlTop <= ($('.whyUsScreen').offset().top + 1))) ||
(scrlTop >= ($('.faqScreen').offset().top - 1) && (... |
import React, { useState } from 'react'
import { Link } from 'gatsby'
import { motion } from 'framer-motion'
import styled from 'styled-components'
import Modal from './Modal'
import config from '../utils/config'
const Navbar = styled(motion.nav)`
display: flex;
justify-content: space-between;
align-... |
// Create License class to contain all relevant information:
class License {
constructor(license, name, year) {
switch (license) {
case 'Apache License 2.0':
this.name = 'Apache License 2.0';
this.badge = '[](ht... |
import { Enemy } from "../Entities/Enemy";
import { Player } from "../Entities/Player";
import { Point2d } from "../Entities/Point2d";
import { Projectile } from "../Entities/Projectile";
import { gameState } from "./GameManager";
import { Wave, WaveSet } from "./Wave";
import { winHowl, loseHowl, backgroundMusic, pick... |
// Mendo.org Search Triggers Layer
// Copyright (c) 2020 <NAME>
var fs = require('fs');
var assert = require("assert");
var async = require('async');
var Class = require('class-plus');
var Tools = require("pixl-tools");
var PixlRequest = require("pixl-request");
module.exports = Class({
},
class Triggers {
setu... |
function format_frequency(frequencyMhz) {
const mHz = parseInt(frequencyMhz);
const kHz = parseInt((frequencyMhz * 1000) % 1000);
const Hz = parseInt((frequencyMhz * 1000000) % 1000);
function pad3(n) {
const pad = '000' + n;
return pad.substring(pad.length - 3);
}
return `${mHz}.${pad3(kHz)}.${pad3(Hz)}`;... |
import React, {PureComponent} from 'react';
import {connect} from 'dva';
import moment from 'moment';
import {Tabs, Input, Button, Tag, Icon, Breadcrumb, Modal,Switch} from 'antd';
import classNames from 'classnames';
import Component from "../../../utils/rs/Component";
import Format from '../../../utils/rs/Format';
im... |
const btczUrl = `https://btcz.solopool.org/api/accounts/<KEY>`;
// const tentUrl = 'https://tent.solopool.org/api/accounts/<KEY>';
// const fluxUrl = 'https://flux.solopool.org/api/accounts/<KEY>';
const hashrate = document.querySelector('.hashrate'),
hashrateBlock = document.querySelector('.hashrate-block')... |
"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... |
import React from 'react';
import PropTypes from 'prop-types';
import beautify from 'js-beautify';
import cheerio from 'cheerio';
import Alert from 'react-s-alert';
/**
* Admin Panel store context
* @type {Context}
*/
const AdminPanelContext = React.createContext();
/**
* Host boilerplate
* @type {Object}
*/
co... |
import React, { useContext, useState, useEffect, useRef } from 'react';
import Button from '@material-ui/core/Button';
import TextField from '@material-ui/core/TextField';
import Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';
import Dialog from '@material-ui/core/Dialog';
import DialogTitle... |
// NOTES:
// command: node . zHV_aktuell_csv.2021-07-29.csv
/// DEPENDENCIES
const fs = require("fs");
/// GLOBALS
/** Alle Haltestellen @type {Object.<string, Haltestelle>} */
const Stations = {};
/** Alle Gemeinden @type {Object.<number, Municipality>} */
const Municipalities = {};
/** @type {Array.<String>} */
... |
const Cu = Components.utils;
const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm", {});
const {NetUtil} = Cu.import("resource://gre/modules/NetUtil.jsm", {});
var console= {
log : function(str) {
Components.classes['@mozilla.org/consoleservice;1']
.getService(Components.interfaces.nsIConso... |
const pureMethods = {
drawContent({
indicators,
contentContainer,
updateIndicator,
dataProbe,
censusFields,
}) {
const indicatorList = Array.from(indicators.values());
let indicatorRows;
const groupedIndicators = Object.entries(indicatorList.reduce((groups, indicator) => {
con... |
'use strict';
var localProductData = 'localProductData';
var allProducts = [];
var randomProducts = [];
var clickCounter = 0;
const MAXCLICKCOUNTER = 25;
var Product = function (name, picture) {
this.name = name;
this.picture = picture;
this.timesClicked = 0;
this.timesDisplayed = 0;
this.markAsClicked = f... |
var BTN_SAVE_ID = "btn-save",
BTN_GOBACK_ID = "btn-go-back-to-shop-id",
FABRIC_TYPE_ID = "fabrictype",
TSHIRT_TYPE_ID = "tshirttype",
TSHIRT_CONTAINER_ID = "shirtDiv",
TSHIRT_CONTAINER_CLASS = "shirtDiv",
SAVE_TSHIRT_FACING_ID = "tshirtFacing",
PREVIEW_UPLOADED_FILE = "preview-uploaded-files",
CSRF_MODULE = "meta[name... |
/* jshint esversion: 6 */
/* jshint -W097 */
/* jshint -W117 */
'use strict';
const MessageTypes = {
PING: 0,
PONG: 1,
NOTIFICATION_MESSAGE: 5
};
/* Subscriptions bitmask */
const SubscriptionTypes = {
NOTIFICATIONS: 8
};
const pingRate = 60000;
var websocket_heartbeat_interval = null,
websocket... |
////////MYSQL - ORIGINAL
const savePhotoRecord = (mainUrl, zoomUrl, productId, mainPhotoBool) => {
const query = `INSERT INTO photos (main_url, zoom_url, product_id, main_photo)
VALUES ('${mainUrl}', '${zoomUrl}', ${productId}, ${mainPhotoBool});`;
connection.query(query, (err) => {
if (err) {
throw ... |
import styled from 'styled-components'
export const DeatilsHeaderWrap = styled.header`
background:#fff;
width:100%;
position: relative;
.header-image{
width:100%;
background-color: #292138;
position: absolute;
overflow: hidden;
min-height: 1.8rem;
height:${props=> props.height || '1.8re... |
/**
*
* This code is generated from /format/hwp-node-record.js and
* /format/*.format via /generate.js with jison.
*
**/
var bufferToString = function(buffer){
for(var i=0,s='',t;i<buffer.length;i++){
t = buffer[i].toString(16).toUpperCase();
if(t.length<2) t='0'+t;
s += (i?' '+t:t);
}
return s;
};
var roo... |
/* CONFIGURATION */
var OpenVidu = require('openvidu-node-client').OpenVidu;
var OpenViduRole = require('openvidu-node-client').OpenViduRole;
// Check launch arguments: must receive openvidu-server URL and the secret
if (process.argv.length != 5) {
console.log("Usage: node " + __filename + " OPENVIDU_URL OPENVIDU... |
const path = require('path');
// const vConsolePlugin = require('vconsole-webpack-plugin'); // 引入 移动端模拟开发者工具 插件 (另:https://github.com/liriliri/eruda)
// var utils = require('./utils')
// var config = require('../config')
var webpack = require('webpack')
// const CompressionPlugin = require('compression-webpack-plugin'... |
const db = require('../sequelize.js');
const logger = require('../config/logger');
const associationMapping = require('../config/pKeyAssociations.json');
const _ = require('lodash');
const {
models,
sequelizeMain
} = db;
class Generic {
/**
* Get a description of the attributes and associations of a given mo... |
import {
sleep,
randomToken,
PROMISE_RESOLVED_VOID,
PROMISE_RESOLVED_TRUE
} from './util.js';
import {
add as unloadAdd
} from 'unload';
const LeaderElection = function (broadcastChannel, options) {
this.broadcastChannel = broadcastChannel;
this._options = options;
this.isLeader = fal... |
var assert = require('assert');
var commentParser = require('comment-parser');
var TypeParser = require('jsdoctypeparser').Parser;
var TypeBuilder = require('jsdoctypeparser').Builder;
// wtf but it needed to stop writing warnings to stdout
// and revert exceptions functionality
TypeBuilder.ENABLE_EXCEPTIONS = true;
... |
import React, { Component } from 'react';
import Loader from '../../components/loader';
import fetchData from '../../lib/fetchData';
import { setError, setMessage } from '../../actions/metaActions';
import { connect } from 'react-redux';
import style from './style.css';
import { setURL, setCode, setSubject, setRecipien... |
import React, { Component } from 'react';
import _ from 'lodash';
import './App.css';
const medium = {
boardSize: {
width: 60,
height: 40,
},
boardResize: "medium",
boardData: {},
cleanBoard: {},
iteratorCounter: 0,
running: false,
speed: 20,
}
const GameBoard = (props) => {
const width = props.size.wi... |
const UNSORTED_ARRAY = [7, 4, 5, 2, 10, 1, -3, 945, 0];
const SORTED_ARRAY_ASC = [-3, 0, 1, 2, 4, 5, 7, 10, 945];
const SORTED_ARRAY_DESC = [945, 10, 7, 5, 4, 2, 1, 0, -3];
const MAX_SUB_ARRAY_SIMPLE = [-2, 1, -3, 4, -1, 2, 1, -5, 4];
const MAX_SUB_ARRAY_MEDIUM = [
13,
-3,
-25,
20,
-3,
-16,
-23,
18,
... |
/*
* 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 ... |
'use strict';
const Generator = require('yeoman-generator');
const path = require('path');
const mkdirp = require('mkdirp');
const replace = require('replace-in-file');
const download = require('download-git-repo');
const chalk = require('chalk');
const yosay = require('yosay');
const inquirer = require('inquirer');
co... |
// Whole-script strict mode syntax
"use strict";
/**
MIT License
Copyright (c) 2020 Openlaw
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 ... |
//https://bl.ocks.org/mbostock/8d2112a115ad95f4a6848001389182fb
var scaleRadial = require('./d3-scale-radial.js');
RadialStackedChart.defaultSettings = {
"label" : "State",
"values":[
{"header":"Under 5 Years", "value":"Under5Years"},
{"header":"5 to 13 Years", "value":"5to13Years"},
... |
import { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { getMovie, updateMovie } from '../redux/actions/movieActions';
import { getGenres } from '../redux/actions/genreActions';
import GenreDropdown from '../components/GenreDropdown/GenreDropdown';
import DatePicker ... |
import React from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import Value from './Value';
import Icon from '../Icon';
import './select.scss';
import Select from './index';
class MultiSelect extends React.PureComponent {
static propTypes = {
creatable: PropTypes.bool,
disabled: PropTypes... |
/**
* Copyright 2015 IBM Corp. 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 applica... |
const WebSocket = require("ws");
let PacketCallbacks = {};
const Config = require("./conniption/config.js");
const Utility = require("./conniption/utility.js");
const Packet = require("./conniption/packet.js");
const Room = require("./conniption/room.js");
const RoomCommon = require("./conniption/roomcommon.js");
con... |
/* this doesn't really belong here, but the web interface for github is so ridiculous and I didn't want to fool with the CLI, here it is for now */
/*from https://sites.google.com/site/proyectosroboticos/bresenham-6d*/
const bresenham6d_min = function(a, f, o, i, r, s, t, b, h, n, M, c, e) {
var l, u, v, d, g, j, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.