text stringlengths 3.07k 16k |
|---|
'use strict';
require("dotenv").config();
const express = require('express');
const path = require('path');
const serverless = require('serverless-http');
const bodyParser = require('body-parser');
const bcrypt = require("bcryptjs");
const jwt = require("jsonwebtoken");
const cors = require("cors");
cons... |
const DomainResource = require('./DomainResource');
const DateTimeScalar = require('./scalars/DateTime.scalar');
class CarePlan extends DomainResource {
constructor ( opt ) {
super( opt );
this.__resourceType = 'CarePlan';
Object.assign(this, opt);
}
// This is a CarePlan resource
static get __r... |
/*
* deinja
* Copyright (C) 2018 wtetsu
* https://github.com/wtetsu/deinja
*
* 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
*
* U... |
var mongoose = require('mongoose');
var auth = require('./auth');
var _ = require('underscore');
var moment = require('moment');
var config = require('./config');
var Player = mongoose.model('Player');
var Group = mongoose.model('Group');
var appTitle = "Freeloader";
app.get('/play', auth.authorize(1, 0, null, tru... |
//globals Chart
'use strict';
var lastViewed = ['a'];
var voteCount= 0;
var productImages = document.querySelectorAll('.products td img');
var table = document.querySelector('table');
for(var j=0; j<productImages.length; j++){
if(voteCount !== 25){
productImages[j].addEventListener('click', function(event){
... |
/**
*
* User: Sam.wang
* Email <EMAIL>
* Date: 19-04-04
* Time: AM 09:45
* Explain: 申请退学组件
*
* */
import React, { Component } from 'react';
import { connect } from 'dva';
import { Modal, message, Form, Select } from 'antd';
import { formatMessage, defineMessages } from 'umi/locale';
// eslint-disable-next-line ... |
// SocialShare is a component that renders social media buttons to share your results
// and also renders a QuestionToCandidates instance, which shows two questions to be asked
// to a candidate, through twitter, by pressing any of a pair of embedded tweet buttons
import React from 'react';
import { Grid, Col, Row } f... |
function Game () {
this.board = new Board();
this.players = [new Player("X"), new Player("O")];
}
Game.prototype.gameOver = function () {
var players = this.players;
var board = this.board;
for (var i = 0; i < players.length; i++) {
var player = players[i];
var playerSpaces = board.spacesMarkedBy(pla... |
const db = firebase.firestore()
const homeRef = db.collection('home')
const overlay = document.querySelector('.overlay')
const loginBtn = document.querySelector('#loginBtn')
let temperatureChart
/**
* * Initialize data listeners for separate documents
* @param {String} name
*/
const watchControlData = (name) => {
... |
var geocoder; //Provide a variable for storing geocoder
var wilnewsSystem = { //Create Javascript object which has attributes and functions
interval: 5000, //Interval for refreshing page
//Specific element name that will use for refernece
chatBox: '#chatBox',
inputBox: '#inputBox',
newsBox: '#newsBo... |
// Work experience cards
const experiencecards = document.querySelector(".experience-cards");
const exp = [
{
title: "Lead React Devloper",
cardImage: "assets/images/experience-page/codingclub.png",
place: "O(1) Coding Club",
time: "(May, 2020 - present)",
desp: "<li>Worked to make a ... |
let tblUbi = $('#tbl-ubications').DataTable({
lengthChange: false,
searching: false,
language: {
'decimal': '',
'emptyTable': 'No hay información para mostrar',
'info': 'Mostrando _START_ a _END_ de _TOTAL_ entradas',
'infoEmpty': 'Mostrando 0 to 0 of 0 entradas',
'in... |
/*
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")... |
import React from "react"
import styled from "styled-components"
import img01 from "../../images/whoweareright.png"
import img02 from "../../images/whoweareleft.png"
import { Link } from "gatsby"
function WhoWeAre() {
return (
<Wrapper>
<div className="section">
<div className="section_right">
... |
import React from "react";
import { Bar } from "@nivo/bar";
const theme = {
background: "#303030",
axis: {
fontSize: "14px",
tickColor: "#eee",
ticks: {
line: {
stroke: "#555555"
},
text: {
fill: "#ffffff"
}
},
legend: {
text: {
fill: "#aaaa... |
/**
*
* Registration
*
*/
import React from 'react';
import Button from '@material-ui/core/Button';
import withSizes from 'react-sizes';
import PropTypes from 'prop-types';
// import uploadIcon from '../../images/uploadIcon.svg';
// import cameraIcon from '../../images/cameraIcon.svg';
import { RegistrationContain... |
"use strict";
const DarkSky = require('dark-sky'),
converter = require('../util/converter'),
moment = require('moment-timezone'),
attribution = 'Powered by Dark Sky',
reportCharacteristics =
[
'AirPressure',
'CloudCover',
'Condition',
'ConditionC... |
import React, { useState, useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import { addOrderThunk, fetchOrderIdAndProducts } from "../store/order";
import {
PaymentElement,
useStripe,
useElements,
} from "@stripe/react-stripe-js";
const Checkout = () => {
const { order, user, i... |
var sourceMap = require('source-map');
var path = require('path');
var sourceMapRegEx = /(?:\/{2}[#@]{1,2}|\/\*)\s+sourceMappingURL\s*=\s*(data:(?:[^;]+;)+base64,)?(\S+)/;
module.exports = function (grunt) {
function loadSourceMap(fileName) {
var sourceFileText = grunt.file.read(fileName);
var... |
/*
eslint-disable
compat/compat,
max-lines-per-function
*/
import {
css,
get,
isArr,
isObj,
isStr,
toPairs
} from "../../../src/style.js"
import {
Children,
cloneElement,
createElement as h,
useEffect,
useMemo,
useState
} from "../react.js"
import { Tablist } from "./tablist.js"
expo... |
/**
* --------------------------------------------------------------------------
* Licensed under MIT https://github.com/sitevision/envision/blob/master/LICENSE
* --------------------------------------------------------------------------
*/
import $ from 'jquery';
import CssUtil from './util/css-util';
import { ge... |
function formData(id){
var obj = {};
var item = $("#"+id+" input"+",#"+id+" select"+",#"+id+" textarea");
var type = '';
var group = [];
item.each(function(i){
type = $(this).attr("type");
if(type=='radio'){
obj[$(this).attr("name")] = $("input[name="+$(this).at... |
import { div, button } from '@cycle/dom';
import isolate from '@cycle/isolate';
import { Observable } from 'rx';
import R from 'ramda';
import LabeledSelect from '../LabeledSelect/LabeledSelect';
import LabeledCheckbox from '../LabeledCheckbox/LabeledCheckbox';
import SelectDatesButton from '../SelectDatesButton/Selec... |
import { v1 as uuid } from 'uuid';
import { get, isArray, isNil } from 'lodash';
import { cast } from '.';
const Operations = [
'ONE_OF', 'NOT_ONE_OF',
'GREATER', 'GREATER_OR_EQUAL',
'LOWER', 'LOWER_OR_EQUAL',
'EXISTS', 'DOESNT_EXIST',
'CONTAINS', 'DOESNT_CONTAIN',
'STARTS_WITH', 'DOESNT_START_WITH',
'EN... |
/* Changing room status and class. */
function changeRoom(gridInfo, targetId, newStatus) {
if(Object.values(gridInfo.roomsClass).includes(newStatus)) {
gridInfo.grid[targetId] = Object.values(gridInfo.roomsClass).indexOf(newStatus);
$(gridInfo.container).children('.' + gridInfo.roomsClass.base + '#' + targetI... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const webConf_1 = __importDefault(require("../../config/webConf"));
const path_1 = __importDefault(requi... |
var bouncy = require('bouncy');
var cicada = require('cicada');
var path = require('path');
var fs = require('fs');
var clone = require('clone');
var parseQuote = require('shell-quote').parse;
var spawn = require('child_process').spawn;
module.exports = function (opts) {
if (!opts) opts = {};
if (typeof opts... |
/*
* Copyright 2011 Research In Motion 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 ... |
//define model
var Contact = Backbone.Model.extend({
urlRoot: "https://URL_SAMPLE/index.php/RestApiController/celeb",
idAttribute: 'itemId',
defaults: {
name: "",
url: "",
price: "",
type: ""
}
});
//define collection
v... |
"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 { html } from "lit-element";
import BTBase from "../bt-base";
import { classMap } from "lit-html/directives/class-map";
import labelTemplate from "./templates/label";
import descriptionTemplate from "./templates/description";
import actionsTemplate from "./templates/actions";
import "./bt-icon";
const NodeNam... |
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import classnames from 'classnames';
import { createPage, ajax, base } from 'nc-lightapp-front';
const { NCDatePicker, NCButton } = base;
//import { createPage } from '../../../src';
//import { NCDatePicker, NCButton } from '../../../src/base'... |
load('./decompose.js');
load('./create-html.js');
var INPUT_FILE_PATH = '/tmp/subband_3.cs16';
var INPUT_SR = 450e3;
var CENTER_FREQ = 166.9828;
var RMS_SAMPLE_WIDTH = 150; // Root mean squared (average) sample width
var NUM_CHANNELS = 45;
var PULSE_THRESHOLD = 5; // Pulse detection threshbold (in Db)
IO.fdelete('/tm... |
'use strict'
import { app, protocol, BrowserWindow,ipcMain,Menu,Tray,nativeImage} from 'electron'
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'
const path = require('path')
const isDevelopment = process.env.NODE_ENV !== 'production'
// Keep a global reference of the window object, if you don't,... |
'use strict'
const Action = require(`../core/action`)
const errors = require('../core/errors')
const helpers = require('../core/helpers')
const wildcards = require('../wildcards')
function Learn (host) {
Action.call(this, host, 'learn')
this.docs = "The learn command allows you to read documentation for <action ... |
const MAX_BALL_SPEED = 12;
var ballX = 75, ballY = 75;
var ballSpeedX = 6, ballSpeedY = 6;
var canvas, canvasContext;
var framesPerSecond = 30;
var paddle1Y = 250, paddle2Y = 250;
const PADDLE_HEIGHT = 100;
const PADDLE_THICKNESS = 10;
var playerSP = 0;
var compSP = 0;
var winningScore = 3;
var isGameO... |
import runShell from './run'
import _ from 'lodash'
import {spawn, exec} from 'promisify-child-process'
import objectDiff from 'object-diff'
import path, {join} from 'path'
import getShellEnvVars from './util/get-shell-env-vars'
import dargs from 'dargs'
import Debug, {log} from '@live/log/es5'
import exit from '@src/m... |
// hmac sha256 from https://github.com/brix/crypto-js
var CryptoJS = require('crypto-js');
module.exports = {
generateSignature: generateSignature,
specialEncodeComponent: specialEncodeComponent,
exportSigningForDebug: exportSigningForDebug
};
// hmac sha256 from https://github.com/brix/crypto-js
function gener... |
function rimuoviPreferiti(event){
n_preferiti--;
event.currentTarget.removeEventListener('click',rimuoviPreferiti);
if(n_preferiti===0){
document.querySelector('#lista_preferiti').classList.add('hidden');
document.querySelector('.contents_preferiti').classList.add('hidden');
}
... |
import db from '../db/db.js';
import fetch from 'node-fetch';
import { v4 as uuid } from 'uuid';
import jwt from 'jsonwebtoken';
import { Octokit } from "@octokit/core";
import jwt_decode from 'jwt-decode';
import { Buffer } from 'buffer';
import bcrypt from 'bcrypt';
const salt = 11; // bcrypt salt work factor
const ... |
import React from 'react';
import { Avatar, Title, Caption, Drawer, Text, TouchableRipple, Switch } from 'react-native-paper';
import { createDrawerNavigator, DrawerContentScrollView, DrawerItem } from '@react-navigation/drawer';
import { createStackNavigator } from '@react-navigation/stack';
import { NavigationContain... |
var app = require('ampersand-app');
var Spot = require('spot-framework');
var BaseWidget = require('./base-widget');
var Chart = require('chart.js');
var colors = require('../../colors');
var misval = Spot.util.misval;
var util = require('./util');
// used for pie, bar, horizontalbar, and radar charts
// modify the h... |
const rows = 50;
const cols = 50;
let grid;
const openSet = [];
const closedSet = [];
let start, end;
let w, h;
let buffer;
const removeFromArray = (array, item) => {
const idx = array.indexOf(item);
array.splice(idx, 1)
}
function setup() {
createCanvas(1000, 1000);
w = width / cols;
h = height... |
const getBoundingClientRect = 'getBoundingClientRect';
const getComputedStyle = 'getComputedStyle';
const ownerDocument = 'ownerDocument';
function getDocument(el) {
if (el && el[ownerDocument] && el[ownerDocument].nodeType === 9) {
return el[ownerDocument];
}
let parent = el;
// prevent it from infinite l... |
var gridUrlbUttons = "";
var tableUrl;
function prepareUrlButtons(){
var bodyButtons = $("#gridUrlButtons").val();
var tagsUrl = $("<div/>");
tagsUrl.append(bodyButtons);
$("#btnNewUrl").click(function(){
showUrlDialog()
});
gridUrlbUttons = "<center>"+tagsUrl.html()+"<center>";
}
fu... |
//Variables y selectores
const fomrulario = document.querySelector('#agregar-gasto');
const gastosListado = document.querySelector('#gastos ul');
//Eventos
eventListeners();
function eventListeners() {
document.addEventListener('DOMContentLoaded', preguntarPresupuesto);
fomrulario.addEventListener('submit', agregar... |
/*jslint indent: 2, browser: true, newcap: true, es5: true */
// Represents a collection of vertex buffers and index buffers. Each vertex
// buffer maps to one attribute in GLSL and has a corresponding property set
// on the Mesh instance. There is one vertex buffer by default: `vertices`,
// which maps to `gl_Vertex... |
let pontos = 0;
let dificuldade = '';
let categoria = 0;
let respondidas = 0;
let erros = 0;
let perguntas = 0;
let pontosDificuldade = 0;
let correta = '';
const categoriaDOM = document.querySelector('.categoria');
const perguntaDOM = document.querySelector('.pergunta');
const pontosDOM = document.querySelector('.p... |
"use strict";
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
require("reflect-metadata");
var test_utils_1 = require("../../utils/test-utils");
var User_1 = require("./entity/User");
var chai_1 = require("chai");
describe("github issues > #1680 Delete & ... |
import { getRandom } from '../../util/util.js';
import replaceLang from '../../util/replace-lang.js'
/**
*
* @param {editor} editor
* 上传视频
*/
function UploadVideo(editor) {
this.editor = editor;
const videoId = getRandom('kolo-video');
this.videoId = videoId;
}
//
UploadVideo.prototype = {
cons... |
'use strict'
const TESTING = require('./testing')
const util = require('./util')
const details = require('./details')
/* global localStorage */
localStorage.debug = null // 'map:marker:r*'
const domready = require('domready')
const MyMap = require('./map/google-map')
const entitiesWithinBounds = require('./map/bound... |
import React, {useState, useContext} from "react"
import HeaderComponent from "../components/header"
import MainImagefrom from "../images/signin-image.webp"
import { css } from "@emotion/core"
import TabsContainer from '../components/tab';
import {
FaEnvelope,
FaLock,
FaFacebook,
FaTwitter,
FaGoogle,
} from... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var react_intl_1 = require("react-intl");
var prosemirror_state_1 = require("prosemirror-state");
var prosemirror_utils_1 = require("prosemirror-utils");
var remove_1 = tslib_1.__importDefault(require("@atlaskit... |
import { Fragment } from 'react';
import logo from '../../Shared/img/teaach.png';
import Header from '../../Shared/components/Header/Header';
import React, { Component } from 'react';
import Notification from '../../utils/Notifications/Notification';
class Login extends Component {
users = [
{username: "nischal"... |
'use strict'
const barometerTrend = require('barometer-trend');
const map = require('./map');
const lodash = require('lodash');
const secondsToMilliseconds = (seconds) => seconds * 1000;
const DEFAULT_SAMPLE_RATE = secondsToMilliseconds(60);
const DEFAULT_ALTITUDE_CORRECTION = 0;
let sampleRate = DEFAULT_SAMPLE_RATE;... |
const CALENDAR = {
jalali: {
months: {
1: "فروردین",
2: "اردیبهشت",
3: "خرداد",
4: "تیر",
5: "مرداد",
6: "شهریور",
7: "مهر",
8: "آبان",
9: "آذر",
10: "دی",
11: "بهمن",
12: "اسفند",
},
days: {
label: {
6: "شنبه",
0: "یکشنبه",
1: "دوشنبه",
2: "سهشنبه",
3:... |
const StrategyOpenApi3 = (endpoints) => {
const resolve_ref_recursive = (ref) => {
// Some like components.schema.SchemaOfModel; to Array
const array_of_keys = ref.substring(2).split("/");
let obj = Object.assign(endpoints, {}); // endpoints solamente
// Accessing to nested keys
for (let i = 0; i ... |
'use strict';
const fs = require('fs');
const http = require('http');
const tg = require('telegraf');
const qq = require('qq-bot-rebown');
const SocksProxyAgent = require('socks-proxy-agent');
const config = require('./config');
const telegrafOpt = { telegram: {}, msgId: null, qrMsgId: null };
if (config.tg.proxy)... |
/**
* Copyright 2017 OSBI Ltd
*
* 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 ... |
/*
* Copyright 2019 Google LLC
* 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
* https://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writin... |
import React, {Component} from 'react'
import {withFirebase} from '../Firebase'
import UserList from './UserList';
import MessageList from './MessageList';
import { AuthUserContext, withAuthorization } from '../Session';
import { compose } from 'recompose';
class ChatPage extends Component{
constructor(props){
... |
'use strict';
//std libs
var util = require('util');
var EventEmiter = require('events');
var os = require("os");
var crypto = require("crypto");
//slice/splice函数
var _slice = [].slice;
var _splice = [].splice;
//3rd party libs
var _ = require('underscore');
var uuid = require('uuid');
var log4js = re... |
// Ensure ThreeJS is in global scope for the 'examples/'
global.THREE = require("three");
const canvasSketch = require("canvas-sketch");
const settings = {
dimensions: [4048, 2048],
// Make the loop animated
animate: true,
// Get a WebGL canvas rather than 2D
context: "webgl",
};
const sketch = ({ context ... |
/**
* An implementation of KeyStore using Redis
* @module js-redis-key-store
* @requires module:redis
* @implements KeyStore
* @example
* // INITIALISATION
*
* const redis = require('redis')
* const keyStore = require('js-redis-key-store')(redis.createClient())
* @example
* // Saving Botmatic/External ids pa... |
import React, { memo, useEffect } from 'react';
import {
Card,
CardContent,
CardHeader,
Grid,
makeStyles,
} from '@material-ui/core';
import { createStructuredSelector } from 'reselect';
import { connect } from 'react-redux';
import { compose } from 'redux';
import MyAppBar from '../../components/MyAppBar';
i... |
const {
PIXEL_SHIFT_WRAP,
PIXEL_CONFIG,
PIXEL_SHOW,
PIXEL_SET_STRIP,
PIXEL_SHIFT,
MAX_STRIPS,
PIN_DEFAULT,
COLOR_ORDER,
GAMMA_DEFAULT,
FIRMATA_7BIT_MASK,
START_SYSEX,
END_SYSEX,
PIXEL_COMMAND
} = require('../constants');
const { create_gamma_table } = require('../utils');
const { Pixel } = req... |
/**
* 引用 https://github.com/ElemeFE/element/blob/dev/src/utils/dom.js
*/
const root = typeof window === "object" && window;
const DEFAULTS = {
placement: "bottom",
offset: 0,
forceAbsolute: false
};
function getScrollParent(element) {
var parent = element.parentNode;
if (!parent) {
return element;
}... |
var $layoutContainerEl = $('#grim-layout');
var $topbarEl = $('#grim-topbar');
var $topbarAppsEl = $('#grim-topbar-apps');
if ($layoutContainerEl.length === 0) throw "#grim-layout element not found";
if ($topbarEl.length === 0) throw "#grim-topbar element not found";
if ($topbarAppsEl.length === 0) throw "#grim-topbar-... |
import {fromJS, List as imList} from 'immutable'
import isEqual from 'lodash-es/isEqual'
import flow from 'lodash-es/flow'
import PropTypes from 'prop-types'
import ImmutablePropTypes from 'react-immutable-proptypes'
import React from 'react'
import { withStyles } from '@material-ui/core/styles'
import Typography from ... |
/* *
* 通用公共js库,主要定义api接口,auth apikey 常量值和通用函数
*/
// api接口地址
var apiurl = 'https://api.xf512.com/';
// http校验值,需和服务器端一致,在请求时作为headers auth参数传入
var httpauth = '<PASSWORD>';
// 服务器端校验来源的参数值
var appkey = '<KEY>';
// 设置标识 app wx
var shebei = '';
//#ifdef APP-PLUS
shebei = 'app';
//#endif
//#ifde... |
'use strict';
/* Copyright 2015 <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 writing, so... |
// Copyright 2019 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
import React, { Component } from "react";
import Winwheel from "winwheeljs/lib/Winwheel";
class Wheel extends Component {
constructor() {
super();
this.state = {
theWheel: null,
s1: '',
s2: '',
s3: '',
s4: '',
s5: '',
... |
// noinspection ParameterNamingConventionJS
'use strict';
// Initialize constants
const config = require('config');
// Include local libraries
const common = require('../../lib/cli-api/_common');
// Include B2C Commerce API functions
const b2cAuthenticate = require('../apis/ci/_authenticate');
const codeVersions = r... |
import React, { useCallback, useMemo } from 'react';
import { format } from 'date-fns/fp';
import TimeAxisLabel from './TimeAxisLabel';
import useMemoArray from './functions/useMemoArray';
import { useScheduleWidth } from './store/useSelector';
import {
useScheduleX,
useEntireScheduleWidth,
useScheduleElementXFu... |
const generateEmbedButton = document.getElementById("generate-embed");
/* =====================
* Utility functions
* =====================*/
// SORTING FUNCTION FROM http://stackoverflow.com/a/979325
function sort_by(field, primer){
var key = primer ?
function(x) {return primer(x[field])} :
function(x) {r... |
//subistituido por toggle
const Modal = {
OpenClose() {
let NewTransaction = document
.querySelector(".modal-overlay");
NewTransaction.classList.toggle("active");
}
}
//storang
const storang = {
get(){
return JSON.parse(localStorage.getItem("dev.financ... |
#! /usr/bin/env node
const path = require("path");
const salt = require("./salt");
var argv = require("minimist")(process.argv.slice(2));
const project = require("./package.json");
const readlineSync = require("readline-sync");
var execName;
if (path.parse(process.argv[0]).name == "node") {
execName = "node mai... |
const express = require('express');
const socket = require('socket.io'); //pass a http.Server instance
const mongojs = require('mongojs');
const request = require('request');
const bodyParser = require('body-parser');
const nodeSkanetraiken = require('node-skanetrafiken');
const config = require('./assets/config... |
/**
* @file
* Includes the Workpool class, an implementation of the workpool distributed computing pattern.
* @copyright © 2016 <NAME>
*/
'use strict';
/**
* @module DistIO/Workpool
*/
/**
* Used to privatize members of the Workpool class.
*/
const workpool = Symbol();
const ResponseArray = require('./Respo... |
import * as PIXI from 'pixi.js';
class Slider {
#x = 50;
#y = 300;
#width = 200;
#height = 20;
#rect;
rect_;
#rectColor = 0x38404e;
#rectAlpha = 0.87;
#handle;
handle_;
#handleColor = 0x650a5a;
#handleAlpha = 1;
#radius;
#value;
#app;
#slider_;
constructor(app, { x, y }, { width, heigh... |
'use strict'
// Provides auxiliary functions to help pull lyrics
export class LyricsHelper {
constructor(){
this._cur_song = null;
this._og_song = null;
this._lyric_panel = null;
}
set cur_song(song){
this._cur_song = song;
this._cur_song.title = this.cleanText(song.title);
this._cur_song.artist = this... |
var margin = {top: 20, right: 20, bottom: 30, left: 40}
function dashboard(id, indata) {
var dash = document.getElementById(id.substr(1));
function redraw() {
d3.selectAll('svg').remove();
var pltwidth = (dash.clientWidth - margin.left - margin.right) * 2 / 3,
pltheight = (dash.clientHeight - mar... |
var labelsToUse = [];
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
ret... |
const canvas_w = 512;
const canvas_h = 512;
const tiles = [];
const w = canvas_w / 8;
let t = 0;
const t_thresh = 120;
let even_odd = false;
let rotating = false;
function sign(x) {
return abs(x) / x;
}
function round_to(x, n) {
const quo = x / n;
if (x > 0) return Math.ceil(quo) * n;
if (x < 0) return M... |
import React from "react";
import { useState, useEffect } from "react";
import { useQuery } from "@apollo/client";
import { useDispatch, useSelector } from "react-redux";
import { useParams, Link } from "react-router-dom";
import { QUERY_USERS } from "../../utils/queries";
import { UPDATE_USERS } from "../../utils/acti... |
import React, { useState, useEffect } from 'react';
import { makeStyles } from '@material-ui/core/styles';
import {
Avatar,
// Button,
CssBaseline,
// TextField,
Grid,
Typography,
Container,
Paper,
} from '@material-ui/core';
import NavBar from './NavBar';
import userStore from '../stores/userStore';
im... |
import 'phaser';
import Player from '../sprites/Player.js';
import Badguy from '../sprites/Badguy.js';
class Level extends Phaser.Scene {
constructor (config)
{
super((config) ? config : { key: 'level' });
this.gamepaused = undefined;
this.player = undefined;
this.badguy = und... |
import { getLocalUser } from '../helpers/auth';
import Vuex from 'vuex'
const user = getLocalUser();
import axios from 'axios';
/*
for API calls on Guarded routes use Authorization Header
Example:
axios.get('/some/route',{
headers:{
"Authorization":"Bearer "+context.state.currentUser.token
}
})
.then((response)=>{... |
var Browser = Hammerhead.get('./utils/browser');
var IFrameSandbox = Hammerhead.get('./sandboxes/iframe');
var NativeMethods = Hammerhead.get('./sandboxes/native-methods');
var ShadowUI = Hammerhead.get('./sandboxes/shadow-ui');
var UrlUtil = Hammerhead.get('./utils/url');
QUnit.testStart(function () ... |
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import config from 'config'; // eslint-disable-line require-path-exists/exists
import IconClose from '@material-ui/icons/Close';
import IconButton from '@material-ui/core/IconButton';
import { SnackbarProvider, withSnackbar } from 'notist... |
const CLIENT_ID = '[CLIENT ID HERE]';
const album_url = (id) => `https://api.imgur.com/3/album/${id}`;
function get_headers() {
return {
'Authorization': 'Client-ID ' + CLIENT_ID,
}
}
const id = get_id();
if (id) {
process(id);
}
function process(id) {
// hide usage
document.getElementById('usage').s... |
const inquirer = require('inquirer');
const { execSync } = require('child_process');
const chalk = require('chalk');
const installSyntaxHighlighting = require('./src/software/plugins/syntax-highlight');
const installVSCode = require('./src/software/vscode');
const installAutoSuggest = require('./src/software/plugins/au... |
// Effect Games Engine v1.0
// Copyright (c) 2005 - 2011 <NAME>
// Source Code released under the MIT License:
// http://www.opensource.org/licenses/mit-license.php
////
// Titanium.js
// Provides native audio services through Titanium
// http://www.codestrong.com/titanium/
// DHTML Game Engine 1.0 (EffectGames.com)
... |
import debug from 'debug';
class Disk {
constructor(Name, pctFree, used, total) {
this.Name = Name;
this.pctFree = pctFree;
this.used = used;
this.total = total;
}
}
function transformOS(os) {
if (os) {
if (os.indexOf('Windows Server 2008 R2') > -1) {
return 'Win Server 2008 R2';
}... |
/* Set values + misc */
let promoCode;
let promoPrice;
let fadeTime = 300; // This is for the animation, as required by the task
let storeInventory = [{
name: "<NAME>",
category: "Beverages",
id: "blacklabelbeer",
description: "An affordable and easy-to-drink beer for the working class man. Often referred to ... |
import React, { Component } from 'react';
import {
HashRouter as Router,
Route,
Redirect,
Link
} from 'react-router-dom'
import { getUser, decodeToken, logout } from './utils/auth'
import { Container, Menu, Icon, Header, Segment, Button } from 'semantic-ui-react'
import Login from './Login/Login'
impo... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
require("antd/es/row/style");
var _row = _interopRequireDefault(require("antd/es/row"));
require("antd/es/button/style");
var _button = _interopRequireDefault(require("antd/es/button"));
require("antd/es/col/s... |
goog.require('goog.debug.Console');
goog.require('goog.testing.PropertyReplacer');
goog.require('goog.testing.jsunit');
goog.require('ydn.async');
goog.require('ydn.db.crud.Storage');
goog.require('ydn.debug');
var asyncTestCase = goog.testing.AsyncTestCase.createAndInstall();
var debug_console, db, objs;
var table_... |
import React from 'react';
import { Text, View, ScrollView, Dimensions, StatusBar } from 'react-native';
import styles from './HomeScreenStyle';
import { SliderBox } from 'react-native-image-slider-box';
import Icon from 'react-native-vector-icons/Ionicons';
import { SectionGrid } from 'react-native-super-grid';
import... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.