text stringlengths 3.07k 16k |
|---|
const sodium = require('sodium-native')
const MAX_PROMPT = 256
/**
* SecBuf Lock styles
*/
const LockLevel = {
// don't lock anything
LOCK_NONE: 'none',
// mlock the underlying buffer memory
LOCK_MEM: 'mem',
// mlock and mprotect the underlying buffer memory
LOCK_ALL: 'all'
}
const C = {
lockLevel:... |
// const Color = require('../../src/lib/color');
import Color from '../../src/lib/color';
const testColors = [
{ name: 'red', h: 'ff0000', v: [255,0,0] },
{ name: 'green', h: '00ff00', v: [0,255,0] },
{ name: 'blue', h: '0000ff', v: [0,0,255] },
{ name: 'gray', h: '808080', v: [128,128,1... |
import Wall from '../Wall';
import Furniture from '../Furniture';
import House from '../House';
import Player from '../Player';
import UIConfig from '../UIConfig';
import MusicPlayer from '../MusicPlayer';
const CELL_SIZE = 96;
const GRID_WIDTH = 1248;
const GRID_HEIGTH = 768;
const POSGRID_X = 1920 * 0.4;
const POSGR... |
//loads players from url. then renders those players, along with their cause of death. if the player is "dead", then mention that they haven't respawned yet, with new cause of death (getting drained by Thief of life, for example.)
var playersGlobalVar = [];
var spriteWidth = 400;
var spriteHeight = 300;
var canvasWidt... |
/*
Copyright 2020 The Matrix.org Foundation C.I.C.
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 ... |
// ROUTE
var routeToFirebaseSetting = server + "utility/getFirebaseSetting";
var deliveryOrderProses = server + "home/deliveryOrderProses";
// VUE OBJECT
var divCart = new Vue({
el : '#divCart',
data : {
tipePesanan : 'none',
tipePembayaran : 'none',
pd : [{nama : '', hp : '', alamat ... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var debounce = require('lodash/debounce');
var polarisTokens = require('@shopify/polaris-tokens');
var shared = require('../../components/shared.js');
var breakpoints = require('../breakpoints.js');
var geometry = require('../geometry.js');
... |
import Rx from '@reactivex/rxjs/dist/cjs/Rx';
import io from 'socket.io-client';
import config from '../config';
const socket = io.connect(config.busAddress);
//Rx.Observable.fromEvent(socket, 'trackables');
Rx.Observable
.fromEvent(document, 'keydown')
.filter(e => e.code === 'ArrowRight')
.subscribe(e... |
'use strict'
var imageArray = [];
var imageDescriptions = [];
var totalClicks = 0;
var MAX_CLICKS = 25;
var imgId1 = "img1";
var imgId2 = "img2";
var imgId3 = "img3";
var listResults = document.getElementById("list-results");
var canvasRef = document.getElementById("results-chart");
var votesButton ... |
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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 a... |
let raf = null;
function requestAnimationFrame (callback) {
if (!raf) {
raf = (
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function (callback) {
return setTimeout(callback, 16)
}
).bind(window);
}
return ra... |
/*global $, manos, loadManos */
function shuffleArray(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
}
function fillnull(i){
return parseInt(i)<10?'0'+i:i;
}
function getMonth() {
retur... |
const ethNetProps = require('../../../../xdc-net-props')
const POA = 'poa'
const DAI = 'dai'
const POA_SOKOL = 'sokol'
const MAINNET = 'mainnet'
const ROPSTEN = 'ropsten'
const RINKEBY = 'rinkeby'
const KOVAN = 'kovan'
const GOERLI_TESTNET = 'goerli_testnet'
const CLASSIC = 'classic'
const XDC = 'xdc'
const XDC_TESTNET... |
import React, { PureComponent } from "react";
import { connect } from "dva";
import {
Row,
Col,
Input,
Select,
Icon,
Table,
Drawer,
message,
Button,
Modal,
Card,
Tooltip,
Popconfirm
} from "antd";
import { routerRedux } from "dva/router";
import CnRareDiseasePopup from "./CnRareDiseasePopup";
... |
var express = require('express')
var serveIndex = require('serve-index');
var app = express()
var Dal = require("./dal");
var sqlite3=require('sqlite3-promise')
var moment=require('moment')
var db = new sqlite3.Database('/share/chase.db');
var engine = require('ejs-locals');
app.engine('ejs', engine);
app.set('view en... |
/*
* Interpol (HTML Composition Language)
* Licensed under the MIT License
* see doc/LICENSE.md
*
* @author <NAME> (kode4food.it)
*/
"use strict";
var nodeunit = require('nodeunit');
var interpol = require('../lib');
var evaluate = interpol.evaluate;
exports.partials = nodeunit.testCase({
setUp: function (ca... |
const fs = require('fs');
const readline = require('readline');
const {google} = require('googleapis');
const uuid = require('uuid');
const calendarKey = require('../config/calendar.json')
const SCOPES = ['https://www.googleapis.com/auth/calendar'];
// The file token.json stores the user's access and refresh tokens, a... |
// BAGELS
//
// Converted from BASIC to Javascript by <NAME>. (nanochess)
//
// Game settings
let numberDigitLength = 3;
let allowedGuesses = 20;
const lowercaseYesStrings = ['yes', 'y'];
const lowercaseNoStrings = ['no', 'n'];
const validInputStrings = [...lowercaseYesStrings, ...lowercaseNoStrings];
// Determine i... |
/*Dashboard Init*/
"use strict";
/*****Ready function start*****/
$(document).ready(function(){
$('#statement').DataTable({
"bFilter": false,
"bLengthChange": false,
"bPaginate": false,
"bInfo": false,
});
});
/*****Ready function end*****/
/*****Load function start*****/
$(window).on("load",function(){
... |
const fs = require('fs');
const readline = require('readline');
const { getMin, getMax } = require('../db/statistics');
/**
* Helper function that normalize a given number for neural network using
* @param {} val Number for normalizing
* @param {} min The minimum
* @param {} max The maximum
* @returns A normalize... |
// PTCmd - Generic asyncronous PTCmd call.
// cmd: formatted command (ex: "PP&TP")
// cb (optional): AJAX callback on command success.
// err (optional): AJAX callback on error
// com (optional): AJAX callback on complete
function PTCmd(cmd, cb, err, com){
if(cmd == undefined){
throw("PTCmd: cmd is undefine... |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Spinner from '../../.... |
(function() {
// Initialize anything in the global namespace
navigator.getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia;
})();
var SoundSequencer = function(bufferLength, callback) {
this.dataSeries = [];
th... |
/* eslint-disable no-underscore-dangle */
/* eslint-disable no-unused-expressions */
/* eslint-disable no-undef */
const sinon = require('sinon');
const { expect } = require('chai');
const chai = require('chai');
const sinonChai = require('sinon-chai');
const rewire = require('rewire');
require('../../global.test');
... |
import React from 'react';
import PropTypes from 'prop-types';
import PDF from 'react-pdf-js';
import 'jquery/dist/jquery.min.js';
import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/js/bootstrap.min.js';
import 'material-design-icons/iconfont/material-icons.css';
import Navigation from './Navigation... |
const path = require('path');
const gulp = require('gulp');
const gutil = require('gulp-util');
const mkdirp = require('mkdirp');
const change = require('gulp-change');
const fs = require('fs');
const eventStream = require('event-stream');
const gulpIf = require('gulp-if');
const del = require('del');
const vinylPaths ... |
let map;
// eslint-disable-next-line no-unused-vars
function initMap() {
//set san fran as initial center
const options = {
zoom: 8,
mapTypeControl: false,
center: { lat: 37.7749, lng: -122.4194 },
};
// set inital location on the new map and set autocomplete
// eslint-disable-next-lin... |
//
// Game singleton
//
import * as THREE from '../../libs/three.js/r125/three.module.js'
class Game{
static materials = {
shadow: new THREE.MeshBasicMaterial({
color: 0x000000,
transparent: true,
opacity: 0.5
}),
solid: new THREE.MeshNormalMaterial({})... |
// variables
var $body = $('body'),
$html = $('html'),
$window = $(window),
$document = $(document),
$header_main = $('#header_main'),
header_main_height = $header_main.height(),
easing_swiftOut = [ 0.35,0,0.25,1 ];
bez_easing_swiftOut = $.bez(easing_swiftOut);
/* Detect hi-res devices */
... |
import ReactQuill, { Quill } from 'react-quill'
import Button from '@admin/components/button'
import Dependencies from '../../dependencies'
import CodeField from '../codefield'
import PropTypes from 'prop-types'
import React from 'react'
const headerIcon = (n) => `
<svg width="17px" height="12px" viewBox="0 0 17 12"... |
'use strict';
require('../hot-debug.js');
var test = require('tape').test;
var rewire = require('rewire');
var b1 = require('debug')('b1');
var c1 = require('debug')('c1');
var c2 = require('debug')('c2');
var c4 = require('debug')('c3');
var createDebug = require('debug');
var hotdebug = rewire('../hot-debug.js')... |
var data = {};
var index = {};
var cache = [];
function html(str){
return cache[str].cloneNode(true);
}
function label_tree(id, label){
if(id == 0)
return;
var elem = $(id + '');
if(elem)
elem.addClassName(label);
var equiv = index[id];
if(!equiv)
return;
label_tree(equiv.l, label);
labe... |
/**
* # Optimize
*
* 1.) Improve efficiency through shorter selectors by removing redundancy
* 2.) Improve robustness through selector transformation
*/
import adapt from './adapt'
import { convertNodeList } from './utilities'
/**
* Apply different optimization techniques
*
* @param {string} ... |
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import * as Common from '../../core/common/common.js';
import * as i18n from '../../core/i18n/i18n.js';
import * as DataGrid from '../../ui/legacy/componen... |
// inspired by ep_comments_page plugin, used and modified copyPasteEvents.js
'use strict';
var _ = require('ep_etherpad-lite/static/js/underscore');
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
var padInner = null;
var getFirstColumnOfSelection = function getFirstColumnOfSelectio... |
const validator = require('../helpers/validator')
const tools = require('../helpers/tools')
function parse(data) {
console.log('svgtojson');
if (!data || data.length == 0) throw 'Invalid data';
// check if it is already json
if (!tools.isSvg(data)) return data;
return tagExtractor(validator.xmlValidation(dat... |
'use strict';
const hoek = require('hoek');
const joi = require('joi');
const Queue = require('bull');
// register options schema
const pluginOptionsSchema = joi.object({
redis: joi
.object({
host: joi.string().default('localhost'),
port: joi.number().default(6379)
})
.default(),
routes: j... |
const gaAnalytics = require('ga-analytics')
const dr = require('./dateRange.js')
const util = require('./util.js')
const lg = require('./log.js')
module.exports = ( inHexo ) => {
lg.setConfig(inHexo.config)
return getPVfromGA(inHexo)
.then(getTotalPVfromGA)
.then((inAr... |
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import moment from 'moment-timezone';
import 'moment/locale/sv';
import DayPicker, { DateUtils } from 'react-day-picker';
import MomentLocaleUtils from 'react-day-picker/moment';
import './d... |
import manager from "cache-manager"
import fs from "fs-extra"
import fsStore from "cache-manager-fs-hash"
import path from "path"
import rimraf from "rimraf"
import store from "~/store"
import { getGatsbyApi } from "~/utils/get-gatsby-api"
import fetchGraphql from "~/utils/fetch-graphql"
import {
getTypeSettingsBy... |
var nanoiterator = require('nanoiterator')
var inherits = require('inherits')
var hash = require('./hash')
var options = require('./options')
var SORT_GT = [3, 2, 1, 0]
var SORT_GTE = [3, 2, 1, 0, 4]
module.exports = Iterator
function Iterator (db, prefix, opts) {
if (!(this instanceof Iterator)) return new Iterat... |
/**
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"... |
$(function() {
// set the number of periods to fill the tables with
T = 30;
// get the list of shocks to display
var shockList;
$.ajax({
url: '/getShockList',
type: 'GET',
data: { model : whichModel },
async: false,
success: function(res) {
shockList = res;
}
});
// make an acc... |
var worker;
var title;
var palette;
var font;
var textArtCanvas;
var cursor;
var selectionCursor;
var positionInfo;
var toolPreview;
var pasteTool;
var chat;
var sampleTool;
function $(divName) {
"use strict";
return document.getElementById(divName);
}
function createCanvas(width, height) {
"use strict";
... |
// Create game object
const game = {
numClick: 0,
match: 0,
moves: 0
}
// Create a list that holds the cards
const cards = ["images/ezra.jpg", "images/hera.jpg", "images/thrawn.jpg", "images/kanan.jpg", "images/zeb.jpg", "images/chopper2.jpg", "images/sabine.jpg", "images/ahsoka.jpg"];
const doppelCards =... |
const checks = require('../checks');
const LikeTermCollector = require('../simplifyExpression/collectAndCombineSearch/LikeTermCollector');
const Node = require('../node');
// Removes any parenthesis around nodes that can't be resolved further.
// Input must be a top level expression.
// Returns a node.
function remove... |
/**
* @typedef {object} SDFGeneratorResult
* @property {Uint8Array} textureData
* @property {number} timing
*/
/**
* Initializes and returns a function to generate an SDF texture for a given glyph.
* @param {function} createGlyphSegmentsIndex - factory for a GlyphSegmentsIndex implementation.
* @return {functio... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import Grid from '@material-ui/core/Grid';
import { ButtonBase } from '@material-ui/core';
import Popper from '../common/Popper';
import Utils from '../..... |
var sql = require('mssql');
import * as PORTACTION from "../actions/PORTActionConst.js"
import * as PORTSTATE from "../actions/PORTState.js"
import * as PORTCHK from "../actions/PORTChkConst.js"
import * as CONNECT from "./PORTSQLConst.js"
import * as MISC from "./Misc.js"
var prod=false;
var portCheck1Done=false;
v... |
"use strict";
exports.__esModule = true;
exports.isDownloadAllowed = exports.formatSize = exports.generateStatusMessage = exports.getStatusMessage = exports.deleteDownloadedFile = void 0;
var fs = require("fs-extra");
var filenameUtils = require("./filename-utils");
var constants = require("../.constants");
var ariaToo... |
import React from 'react'
import { Link, NavLink } from "react-router-dom";
import { Scrollbars } from 'react-custom-scrollbars';
import { connect } from 'react-redux';
import { setFlashMessage } from "../../actions/flashMessageActions";
const anonymousMenuData = [
{
id: "anon-login",
icon: "sign... |
import React, { useState } from 'react';
import { Button, Container, Row, Col, Jumbotron, CardBody, Card, CardHeader, CardFooter, CardImg, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
import Header from '../components/Nav';
import { Skillset, Experiences... |
// =============================================================================
/**
* view for a popup menu
*/
import $ from "jquery";
import _ from "underscore";
import Backbone from "backbone";
const PopupMenu = Backbone.View.extend({
//TODO: maybe better as singleton off the Galaxy obj
/** Cache the desir... |
// Our Javascript will go here.
var selectable_obj = [];
var clock = new THREE.Clock();
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.z = 15;
//var camera = new THREE.OrthographicCamera( -5, 5, 5, -5, 0, 10 );
var canvas... |
class Utils {
/*
* Create object from URL query.
* ex.
* '?foo=bar&lorem=ipsum' ->
* { foo: 'bar', lorem: 'ipsum' }
*
* @param {string} url
*/
static urlQueryObj(url) {
let query = url.split('?')[1];
let obj = {};
if (!query) return obj;
let qu... |
import Alert from 'react-s-alert';
// MobX
import { runInAction } from "mobx";
// Utils
import history from "utils/history.utils";
// Store
import store from "store";
export default function (data = {}, errors = null, cache) {
const dataName = Object.keys(data)[0];
data = data[dataName];
const errorMsg = errors ?... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseTimeUnits = exports.TIME_UNITS_PATTERN = exports.parseYear = exports.YEAR_PATTERN = exports.parseOrdinalNumberPattern = exports.ORDINAL_NUMBER_PATTERN = exports.parseNumberPattern = exports.NUMBER_PATTERN = exports.TIME_UNIT_DICTI... |
/*
You are given a large dictionary of strings (maybe 100,000) that fit in memory.
Write a function to be called repeatedly that takes in a single letter and returns the list of
strings that contain that character.
dict = [
'‘aardvark’,'
''wait'.'
''hello','
''world','
''sup''
''blah''
''foo''
''bar''
... |
document.addEventListener('DOMContentLoaded', function () {
swipperInit();
AOS.init({
delay: 300,
mirror: true,
duration: 600,
});
document.querySelector(".poster-image").onclick = function() { fadeImage() };
function fadeImage() {
document.querySelector(".poster-... |
const {
homgot
} = require('../api/apiCall');
const {
BASE_URL, BASE_EPISODE_IMG_URL, BASE_JIKA_URL
} = require('../api/urls');
const getInfo = async (html, options) => {
let promises = []
html('div.Container ul.ListAnimes li article').each((index , element) =>{
let $element = html(element);
let id... |
{
"translatorID": "2e43f4a9-d2e2-4112-a6ef-b3528b39b4d2",
"label": "MIT Press Journals",
"creator": "<NAME>",
"target": "^https?://www\\.mitpressjournals\\.org/(action|toc|doi)/",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"l... |
import React from 'react';
import _ from 'lodash';
import PropTypes from 'prop-types';
import { Link, useHistory } from 'react-router-dom';
import { injectIntl } from 'react-intl';
import { useMutation } from '@apollo/client';
import { UsersMutation } from 'graphql/mutations';
import { UsersQuery } from 'graphql/queri... |
/*
* RemoteJS
* Control your music from your browser.
*
* Copyright (c) 2014 <NAME>
* Licensed under the MIT license.
*/
var fs = require('fs'),
crypto = require('crypto'),
queries = require('./queries.js');
var itunes = {
/* Plugin ID */
id: 'itunes',
/* DAAP library */
daap: req... |
'use strict';
var fs = require('fs');
var _ = require('lodash');
var argv = require('minimist')(process.argv.slice(2));
var currentUpdateObj = JSON.parse(fs.readFileSync(argv._[0]).toString());
var countriesToUpdate = Object.keys(currentUpdateObj);
// console.log(countriesToUpdate);
/* makeFrontMatterObj(yfmList)
*... |
"use strict";
const Generator = require("yeoman-generator");
const chalk = require("chalk");
class IntilityNodeGenerator extends Generator {
initializing() {
this.log(`\n**************************************************************\n`)
this.log(`✨ ${chalk.bold("Welcome to Intility Node.js project generator!... |
// __ __ _ ____ ____ ____ __
// / _\ ( ( \( \( _ \( __) / _\
// / \/ / ) D ( ) / ) _) / \
// \_/\_/\_)__)(____/(__\_)(____)\_/\_/
//
// -
// GenerativeHorizons-10PRINT by Andrea [horizons, evolution]
// 2021 © Andrea @AndrCastellucci, Daniele @Fupete and the course DS-2021 at DESIGN.unirsm
/... |
const express = require('express');
const multer = require('multer');
const bodyParser = require('body-parser');
const path = require('path');
const fs = require('fs');
const hasha = require('hasha');
const serveStatic = require('serve-static');
const moment = require('moment-timezone');
const session = require... |
import express from 'express';
import * as eta from "eta"
import fs from "fs";
import MarkdownIt from 'markdown-it';
import taskLists from 'markdown-it-task-lists';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename... |
"use strict";
let datatable,
tableTarget = "#kt_table_1",
ajaxUrl = baseUrl + "penerimaan-gp",
ajaxSource = ajaxUrl,
totalFiles = 0,
completeFiles = 0,
laddaButton;
$(document).ready(function () {
loadTable();
});
const loadTable = function () {
datatable = $(tableTarget);
// begi... |
const TEST_HOST = 'http://localhost:8089';
const SIZE = [
'xxl',
'xl',
'l',
'm',
's',
'xs',
'xxs'
];
const COLOR_SHORT_MAP = {
theme : 't',
'light-theme' : 'lt',
'dark-theme' : 'dt',
success : 's',
warning : 'w',
danger : 'd',
... |
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import { connect } from 'react-redux';
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { Link } from 'react-router-dom';
import { Form as FinalForm, Field } from 'react-final-form';
import {
Contain... |
/*
Javascript Space Game
By <NAME> 2021
*/
'use strict';
const clampCamera = !debug;
const lowGraphicsSettings = glOverlay = !window['chrome']; // only chromium uses high settings
const startCameraScale = 4*16;
const defaultCameraScale = 4*16;
const maxPlayers = 4;
const team_none = 0;
const team_player = 1... |
/*
Rikaichan
Copyright (C) 2005-2015 <NAME>
http://www.polarcloud.com/
---
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later ver... |
function getServices() {
let serviceProvided = [];
let serviceArray;
serviceArray = $("input:checked").map(function(i, obj){
// console.log(obj.value);
return obj.value;
});
for(let i = 0; i < serviceArray.length; i++){
serviceProvided.push(serviceArray[i]);
}
... |
import React from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';
import BaseModal from 'react-overlays/lib/Modal';
import isOverflowing from 'react-overlays/lib/utils/isOverflowing';
import componentOrElement from 'react-prop-types/lib/componentOrElement';
import Fade from './F... |
var webgl = require('<webgl>');
var julia_t = require('../julia/julia_t.js');
var logic = function (model, scope)
{
var context;
var element;
var program;
var quad;
var render;
var resize;
var texture;
var transform;
var update;
element = this.get();
context = webgl.helpers.context(element);
program = new... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
import React, { useState, useLayoutEffect, useCallback } from 'react';
import { useSelector } from 'react-redux';
import { Redirect } from '@reach/router';
import { useQueryParam, NumberParam } from 'use-query-params';
import { FormattedMessage, FormattedNumber } from 'react-intl';
import messages from './messages';
i... |
// var $ = require('jquery')
var request = {
timeout: 30,
uid: 0,
token: '',
st: true,
setUT: function(uid, token) {
this.uid = uid;
this.token = token;
},
// login: function (scb) {
// // console.log(Mserver + 'login/getToken');
// this.g(Mserver + 'login/get... |
/* SORTING THE VARIANTS IN THE SPIRALGRAM */
var sortPreferences = {
"SIFT Function Prediction" : 0,
"PolyPhen-2 Function Prediction" : 0,
"MutationTaster" : 0,
"CADD Score" : 0,
"phyloP" : 0,
"fathmm" : 0,
"1000 Genomes Frequency" : 0,
"ExAC Frequency" : 0,
"GNOMADMaxAlleleFreq" : 0
};
function computeSo... |
/*
Parser for .XKT Format V2
DEPRECATED
.XKT specifications: https://github.com/xeokit/xeokit-sdk/wiki/XKT-Format
*/
import {utils} from "../../../viewer/scene/utils.js";
import * as p from "./lib/pako.js";
import {math} from "../../../viewer/scene/math/math.js";
let pako = window.pako || p;
if (!pako.inflate) {... |
"use strict";
const route = require('koa-trie-router'),
util = require('util'),
queryString = require('query-string');
const waigo = global.waigo,
_ = waigo._,
logger = waigo.load('support/logger').create('RouteMapper'),
errors = waigo.load('support/errors');
const RouteError = exports.RouteError = error... |
const crypto = require("crypto")
const fs = require("fs-extra")
const getPort = require("get-port")
const path = require("path")
const replace = require("replace-in-file")
const request = require("supertest")
const { spawn } = require("child_process")
const test = require("ava")
const waitOn = require("wait-on")
/**
... |
require('dotenv').config();
var weather = require('openweather-apis');
var emojiDb = require('../model/emoji2');
var emoji = require('node-emoji');
var _ = require('lodash');
var tz = require('tz-lookup');
var weatherId = process.env.OPEN_WEATHER_API;
var NodeGeocoder = require('node-geocoder');
var log = require('../s... |
/**************************************\
| JavaScript for jsCalculator |
| <NAME>, November, 2017 |
\**************************************/
const MAXDIGITS = 14 // maximum number of digits to display
const DIGITS = '01234567890.'
const OPCODES = '+-*/% x2 sr pm'
const TIMES = '\u00D7' //... |
'use strict';
var aFrom = require('es5-ext/array/from')
, customError = require('es5-ext/error/custom')
, ensureIterable = require('es5-ext/iterable/validate-object')
, assign = require('es5-ext/object/assign')
, copy = require('es5-ext/object/copy')
, ensureCallable ... |
const router = require('express').Router();
const upload = require('../midlewares/upload');
const UserSchema = require('../models/user');
const GreenPostSchema = require('../models/greenpost');
const ResumeUser = require('../classes/resume-user');
const io = require('../midlewares/io');
const uuid = require('uuid/v1');... |
(function () {
location.search
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var result = JSON.parse(xhr.responseText)[0];
var detailLittle="";
for(var i=0;i<5;i++){
... |
/*
* Copyright (C) 2017-2019 Dremio Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
import React, { useEffect, useState } from 'react'
import PropTypes from 'prop-types'
import { Nav, NavItem, Button } from 'react-bootstrap'
import withPrivateRoute from '../../components/utils/withPrivateRoute'
import baseUrl from '../../shared/baseUrl'
import TabPills from '../../components/common/TabPills'
import Li... |
import React, { useState } from 'react'
import { Text, SafeAreaView, ScrollView, TextInput, View, Image } from 'react-native'
import { ScaledSheet } from 'react-native-size-matters'
import { colors, fontFamilies, fonts } from '../../utils/theme'
import PurpleBackground from '../../components/PurpleBackground'
import Dr... |
const Discord = require("discord.js");
const { Database } = require("nukleon");
const fetch = require("node-fetch");
const express = require("express");
const os = require('os');
const moment = require('moment');
require('moment-duration-format')
let db = new Database("./Database/LinkDB.json");
let sdb = new Database(... |
/*
* Copyright (c) <NAME>
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
const {
assertSame, assertEquals, assertTrue, assertFalse
} = Assert;
let testCases = [
{pattern: "(?:)", flags: "", string: "", limit: void 0, index: 0, las... |
"use strict";
import React from 'react';
import ReactDOM from 'react-dom';
import { Link, DirectLink, Element , Events, animateScroll as scroll, scrollSpy, scroller } from 'react-scroll'
const durationFn = function(deltaTop) {
return deltaTop;
};
class Section extends React.Component{
constructor (props... |
function populateGroup(){
var groupDropdown = $("#input_item_group");
var onResponse = function(response){
for(var i=0; i< response.data.groups.data.length; i++){
const group = response.data.groups.data[i];
groupDropdown.append($("<option>").text(group.name +" "+((group.desc != null)? group.desc : "")... |
/*var options = {
message: 'share this', // not supported on some apps (Facebook, Instagram)
subject: 'the subject', // fi. for email
file: ["https://www.google.nl/images/srpr/logo4w.png",''], // an array of filenames either locally or remotely
url: 'https://www.google.nl/images/srpr/logo4w.png',
//... |
/*
La licencia MIT (MIT)
Copyright (c) 2019 Concomsis S.A. de C.V.
Por la presente se otorga el permiso, sin cargo, a cualquier persona que obtenga una copia de
este software y los archivos de documentación asociados (el "Software"), para tratar en
el Software sin restricciones, incluidos, entre otros, los derechos d... |
import React from "react"
import { Link } from "gatsby"
import Layout from "../components/layout"
import SEO from "../components/seo"
import AuthButton from "../components/AuthButton"
import UploadButton from "../components/UploadButton"
import ReactPlayer from "react-player"
import Image from "react-simple-image"
impo... |
var prob5array = ["Novemberist", "is", "the", "coolest", "month", "of", "the", "Year"];
var prob6array = ["at", "", "", "", "ball", "", "", "car", "", "", "dad", "", ""];
function problem1(e) {
var fibo_serie;
for(var i=0;i<100;i++){
if(i==0){
fibo_serie = fibonacci(i);
}else{
fibo_serie = fibo_serie + "\n... |
// Copyright (c) 2014-2016 Titanium I.T. LLC. All rights reserved. For license, see "README" or "LICENSE" file.
"use strict";
var assert = require("../util/assert.js");
var Pixels = require("./pixels.js");
var Value = require("./value.js");
var ensure = require("../util/ensure.js");
describe("VALUE: Pixels", function... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.