text stringlengths 3.22k 29.5k |
|---|
/**
* @Author: <NAME> <Matteo>
* @Date: 2018-02-15 09:55:24
* @Last modified by: Matteo
* @Last modified time: 2018-02-18 04:43:44
*/
'use strict'
/**
* Node HTTP module
* @type {object}
*/
const http = require('http')
/**
* Node HTTPS module
* @type {object}
*/
const https = require('https')
/**
* ... |
description("This tests the SVG path parser by parsing and then re-serializing various paths.");
var pathElement = document.createElementNS("http://www.w3.org/2000/svg", "path");
var pathProperties = {
"M": [ "x", "y" ],
"m": [ "x", "y" ],
"L": [ "x", "y" ],
"l": [ "x", "y" ],
"H": [ "x" ],
"h... |
var url = require('url');
var express = require('express');
var bodyParser = require('body-parser');
var querystring = require('querystring');
var async = require('async');
var MongoClient = require('mongodb').MongoClient;
var ObjectID = require('mongodb').ObjectID;
var authenticator = require('./authenticator');
var c... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author <NAME> @sokra
*/
"use strict";
let nextIdent = 0;
class CommonsChunkPlugin {
constructor(options) {
if(arguments.length > 1) {
throw new Error(`Deprecation notice: CommonsChunkPlugin now only takes a single argument. Either an opt... |
import React from 'react'
import ReactDOM from 'react-dom'
import ReactMarkdown from 'react-markdown'
import manual from 'raw!../MANUAL.md'
import metrics from './Metrics'
import {createElement} from './utils'
import {nTileDomain} from './constants'
import TileGenerationUiControls from './components/TileGenerationUiC... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var CsvConfigConsts = /** @class */ (function () {
function CsvConfigConsts() {
}
CsvConfigConsts.EOL = "\r\n";
CsvConfigConsts.BOM = "\ufeff";
CsvConfigConsts.DEFAULT_FIELD_SEPARATOR = ',';
CsvConfigConsts.DEFA... |
// Filter data given a filter
function filterData(data, filter) {
return data.filter((item) => {
for (let key in filter) {
if (item[key] != filter[key]) {
return false;
}
}
return true;
});
}
// Main visualization function
export function visualiz... |
export class DefaultNode {
/**
* @param props information about the node
* @param props.innerText Nodes innerText
* @param props.outerText Nodes outerText
* @param props.parentNode Nodes parent element
* @param props.isCompleted
* @param props.isActive
* @param props.isFailed
... |
$(function() {
consoleInit(main)
})
const NAOS_ADDR = '0x4a615bb7166210cce20e6642a6f8fb5d4d044496'
const CHEF_ADDR = '0xc2edad668740f1aa35e4d8f227fb8e17dca888cd'
const NAOS_POOL_ID = 255
const NAOS_SLP_ADDR = '0x82EbCD936C9E938704b65027850E42393F8BC4d4'
const UNI_LP_ADDR = '0x9b577e849b128ee1a69144b218e809b8bb98c35d... |
"use strict";
import * as THREE from "three";
import { CityTourMath } from "./../math";
const HALF_PI = Math.PI * 0.5;
const TWO_PI = Math.PI * 2;
var MapCamera = function(sceneView, initialTerrain, messageBroker) {
var PAN_VELOCITY_DECAY = 0.875;
var ZOOM_VELOCITY_DECAY = 0.85;
var TILT_ROTATION_VELOCITY_DEC... |
// /////////////////////////////////////////////////////////////////////////////
// const Manager = require("../lib/Manager");
const Engineer = require("../lib/Engineer");
const Intern = require("../lib/Intern.js");
// const Employee = require("../lib/Employee.js");
function buildChart(Employee) {
// const em... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.handlerBot = exports.command_prefix = exports.batch_list = exports.baseURL = undefined;
var _fsExtra = require("fs-extra");
var _fsExtra2 = _interopRequireDefault(_fsExtra);
var _path = require("path");
var _path2 = _interopRequ... |
'use strict';
goog.provide('branch_view');
goog.require('utils');
goog.require('banner_css');
goog.require('safejson');
goog.require('journeys_utils');
branch_view.callback_index = 1;
function checkPreviousBanner() {
// if banner already exists, don't add another
if (document.getElementById('branch-banner') ||
do... |
import { TimeCapsule } from "@donkeyclip/motorcortex";
import SVG from "./assets/svg.js";
import {
mousedown,
mousemove,
mouseup,
touchend,
touchmove,
touchstart,
} from "./listeners/events";
import { addPlayIcon, addPauseIcon } from "./listeners/pointeEvents";
export const timeCapsule = new TimeCapsule();... |
"use strict";
var _lib_observe = require("../lib/observe");
var util = require("./util");
var arrayUtil=require("./arrayUtil");
var config = require("./config");
var constant = require("./constant")
var Snippet = require("./snippet");
var BindContext = require("./bind-context");
var $ = config.$;
var ComposedBindCo... |
/**
* Created by xinxi on 2016/7/28.
*/
var trans = require('./Translate')
var filter = require('./filter')
var fn = require('./fn')
var uti = require('./uti')
var special = require('./special');
// the relation between zoom and scaleDenominator
var ranges = {
0: 2000000000,
1: 1000000000,
2: 500000000,
... |
import cheerio from 'cheerio'
import config from './config.js'
import zhLocale from './plugins/lang/zh.js'
import enLocale from './plugins/lang/en.js'
import fs from 'fs'
const path = require( 'path' )
function resolve( dir ) {
return path.join( __dirname, dir )
}
const port = 9528 || 9527
const { DEV_API_URL, SS... |
#! /usr/bin/env node
const inquirer = require("inquirer");
const chalk = require("chalk");
const shell = require("shelljs");
const slimConfig = require("./slim/config");
const slimSnippet = require("./slim/snippets");
const basicConfig = require(`./basic/config`);
const basicSnippet = require(`./basic/snippets`);
con... |
import {
faArrowLeft, faCopy, faEllipsisH, faMinusCircle, faShare, faPen, faPlusCircle, faArrowRight,
} from '@fortawesome/free-solid-svg-icons';
import Textarea from 'react-expanding-textarea';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
Row, Col, Button, Dropdown, Menu, Modal,
}... |
import moment from 'moment';
import { v4 as uuidv4 } from 'uuid';
import * as categories from './data/categories';
import { defaultAccount } from './data/accounts';
/**
* Guess the date format for a string that could potentially be a date. Makes a
* simple match on a date-like format with support for both hyphen, pe... |
Three.prototype.animate = function( options, el ){
//this.mesh.rotation.z = Date.now() / 1000;
// fallbacks
options = options || {};
el = el || this.last || false; // last processed object
// FIX: we are checking the type of the element to attach to Object3D?
if( el instanceof THREE.Mesh && el.parent instanceof... |
import axios from 'axios';
import beforeRequestPlugins from './plugins';
// 定义一些基础处理器
// ~ Predefine handlers
// ============================================================================
function concatUrls(...urls) {
let resultUrl = (urls[0] || ''), {length} = urls;
for (let i = 1; i < length; i++) {
cons... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generatePackageListAsync = exports.resolveModulesAsync = exports.verifySearchResults = exports.m... |
import curves from './config/curves'
const defaultTransitionBC = 'linear'
/**
* @description Get the N-frame animation state by the start and end state
* of the animation and the easing curve
* @param {String|Array} tBC Easing curve name or data
* @param {Number|Array|Object} startState... |
// A scenegraph object node
import {GL, Buffer, Program, withParameters, checkUniformValues, isWebGL} from '../webgl';
// import {withParameters} from '../webgl/context-state';
import {getUniformsTable} from '../webgl/uniforms';
import {getDrawMode} from '../geometry/geometry';
import Object3D from '../core/object-3d'... |
import { Utils, Video } from "./index.js";
class FPSCounter {
_tickCount;
_frameTime;
_frameStart;
_lastLoop;
_showFps;
duration;
fps;
_boxDiv;
_labelDiv;
_numberDiv;
constructor(...args) {
this.initialize(...args);
}
initialize(...args) {
this._tickCo... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _inte... |
// Parser for online matrix language
// Copyright (c) 2012 <NAME>. All rights reserved.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
... |
/* eslint-disable prefer-const */
/* eslint-disable promise/always-return */
/* eslint-disable class-methods-use-this */
/* eslint-disable promise/catch-or-return */
/* eslint-disable react/no-array-index-key */
/* eslint-disable react/prop-types */
/* eslint-disable react/destructuring-assignment */
import React, { Co... |
/**
* Created by noruya on 16. 4. 26.
*/
'use strict';
require('./modules/users/server/models/crawled-article.server.model');
require('./modules/users/server/models/user.server.model');
require('./modules/article-senders/server/models/article-sender.server.model');
require('./modules/article-senders/server/models/re... |
const pokedex = document.querySelector('#pokedex');
let pokemonGeneration = [1, 151];
const cache = {};
const fetchPokemon = async (generation) => {
pokedex.innerHTML = `<div class="loader"></div>`;
const urls = [];
for(let i = generation[0]; i <= generation[1]; i++) {
const url = `https://pokeap... |
var pluginSettings;
function update_plugin_settings() {
AJS.$.get(contextPath + "/plugins/servlet/foresight-settings", function(data) {
pluginSettings = JSON.parse(data);
});
}
function update_description_types() {
var descriptionType = AJS.$('#dependencyDescriptionTypes').val();
d3.selectAll(".foresight-text")... |
/*
* Copyright 2015 Google Inc. 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 ap... |
import * as R from 'ramda';
import { db } from '../../store';
import { ValidationError } from '../exceptions.js';
async function getItem({ item_code, barcode, serial_no }) {
if (item_code) {
return db.items.get(item_code);
}
if (barcode) {
return db.item_barcodes.get(barcode).then(x => x && db.items.get... |
/* Kish.cm Node.js powered URL Shortener */
var app = false;
let log = {info: console.log, error: console.error};
var Shorten = function(parentapp){
this.app = parentapp;
app = parentapp;
log = app.get('bunyan');
};
/*
* Look up information about a given shortened URL hash
* Accepts: linkHas... |
import React, { Component } from "react";
import { UncontrolledAlert, Alert } from "reactstrap";
import SweetAlert from "react-bootstrap-sweetalert";
import CircularProgress from "@material-ui/core/CircularProgress";
import Paper from "@material-ui/core/Paper";
import Switch from "@material-ui/core/Switch";
import Menu... |
var videoChat = videoChat || {};
var game = game || {};
var fire = fire || {};
videoChat.MakeCall = (function() {
var conversationsClient;
var activeConversation;
var previewMedia;
var identity;
var self = this;
var videoElems = document.getElementsByTagName('video');
var localVideo = document.getElemen... |
import { Elm } from '../../elm/Main.elm'
import { LiaEvents, lia_execute_event, lia_eval_event } from './events'
import { persistent } from './persistent'
import { lia } from './logger'
import { swipedetect } from './swipe'
function isInViewport (elem) {
var bounding = elem.getBoundingClientRect();
return (
... |
/* eslint-disable no-param-reassign, no-console */
// import Sequelize from 'sequelize';
import crypto from 'crypto';
import axios from 'axios';
import path from 'path';
import {
// RestfulResponse,
RestfulError,
} from 'az-restful-helpers';
// import fs from 'fs';
import multer from 'koa-multer';
import { linkPrev... |
/* Module: Random -- Adds randomizer, shuffle and dice roll commands. */
const Module = require('../Module.js');
const random = require('meteor-random');
class ModRandom extends Module {
get requiredModules() { return [
'Commands'
]; }
constructor(name) {
super('Random', name);
}
... |
const breathe = require('./utils/breathe');
//Parse GPSU date format
function toDate(d) {
let regex = /(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})\.(\d{3})/;
let YEAR = 1,
MONTH = 2,
DAY = 3,
HOUR = 4,
MIN = 5,
SEC = 6,
MIL = 7;
let parts = d.match(regex);
if (parts)
return new Date(... |
import React, { Component } from 'react';
import { render } from 'react-dom';
import { json } from 'd3-fetch';
import { scaleOrdinal } from 'd3-scale';
import { select, selectAll, event } from 'd3-selection';
import { treemap, hierarchy, treemapResquarify } from 'd3-hierarchy';
import { interpolateRgb } from 'd3-interp... |
#!/usr/bin/env node
'use strict';
const async = require("async");
const botUtilities = require('bot-utilities');
const fs = require('fs');
const glob = require("glob");
const mkdirp = require('mkdirp');
const program = require('commander');
const rhyme = require('rhyme');
const Tokenizer = require('sentence-tokenizer'... |
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: camera-retro;
/* -----------------------------------------------
Script : ig-latest-post.js
Author : <EMAIL>
Version : 2.0.1
Description :
Displays the latest instagram post of a ... |
;(function() {
var t = function() {
this.rotation += 0.01
},
n
;(showStartGameUI = function() {
const btnStartGamePos = 0.52 // 0.618
// const gametitle_height = 10
// console.log('particleSystem', particleSystem)
// assetsManager.gametitle.width = window.screen.availWidth
// asset... |
/* =====================================================
crux - requests guided by the constellations
Crux is sensible, composable, data-driven routing.
It is entirely based on the excellent Clojure
router called "Polaris", which is part of the
"Caribou" ecosystem.
caribou: http://let-caribou.in
... |
const burger = document.getElementById('menuBar');
const menu = document.querySelector('.burguer_list');
let menuClick = 0;
burger.addEventListener('click', () => {
menu.classList.toggle('moveIn');
menuClick += 1;
if (menuClick % 2 !== 0) {
burger.src = 'img/Close.png';
} else {
burger.src = 'img/Menu.... |
// Copyright 2008 The Closure Library Authors. 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 requ... |
/**
* Copyright (c) 2016-present JET BRIDGE LLC.
* All rights reserved.
*
* This source code is licensed under the MIT-style license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict'
var fs = require('fs');
var spawn = require('child_process').spawn;
var jsonfile = require(... |
import {ajaxLoading, modal, tips, listStateChange} from "./components";
import {key, ajaxConfig, precedenceLogin,pageConfig} from "./config";
import {localStorage} from "./cookie";
import tools from "./tools";
/**
* ajax请求二次封装
* @overview 在jquery上二次封装的请求方法
* @author [luoluo]
* @version 2.0.0
*/
/**
* 通用请求方法
* ... |
const {helper, assert, debugError} = require('./helper');
const util = require('util');
const EventEmitter = require('events');
const {Events} = require('./Events');
class NetworkManager extends EventEmitter {
constructor(session) {
super();
this._session = session;
this._requests = new Map();
this.... |
// Variable/Formula-Based Date/Time String Support-Related Functions
'use strict';
var moment = require('moment');
/**
* Converts any/all "variable/formula-based" date/time strings into strings, epochs, etc.
* within a body of text (a string). Returns a new string with the replacements performed.
*
* Useful, say... |
function debug_do_ra_duty_generation()
{
var start = '2019-01-18';
var end = '2019-05-11';
var break_start = '2019-03-09';
var break_end = '2019-03-17';
var ra_list = [
'RA 01',
'RA 02',
'RA 03',
'RA 04',
'RA 05',
'RA 06',
'RA 07',
'RA 08',
'RA 09',
'RA 10',
'RA 11',
'RA 12',
'RA 13',
... |
var fs = require('fs');
var config = require('../config.js');
var getHash = require('../utils/getHash.js');
var getIP = require('../utils/getIP.js');
var getFormattedTime = require('../utils/getFormattedTime.js');
var isUserTrustworthy = require('../utils/isUserTrustworthy.js')
var databases = require('../databases/d... |
import React from 'react';
import { connect } from 'react-redux';
import * as util from '../../../common/utility';
import Image from '../../../common/Image';
import * as types from '../../../common/types';
import Loader from '../../../common/Loader';
import {
cloneFundraiser,
createFundraiser,
loadGBX3,
updateI... |
// ISC License
// Copyright (c) 2019, Mapbox
// Permission to use, copy, modify, and/or distribute this software for any purpose
// with or without fee is hereby granted, provided that the above copyright notice
// and this permission notice appear in all copies.
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DI... |
const Plugin = require('../plugin');
const fs = require('fs');
const readFile = require('util').promisify(fs.readFile);
const writeFile = require('util').promisify(fs.writeFile);
const path = require('path');
const crypto = require('crypto');
const goosemod = require('./goosemod');
const file_blacklist = ["README.md", ... |
import utils from "./utils";
import Intersection from "./intersection";
import Region from "./region";
import EyePoint from "./eye-point";
const boardStateWithoutDeadPoints = function(game) {
return game.currentState()._withoutIntersectionsMatching(i => {
return game._isDeadAt(i.y, i.x);
});
};
const boardSta... |
// Dependencies
const fs = require('fs');
const path = require('path');
const rimraf = require('rimraf');
const createCSVFile = require('csv-file-creator');
const jimp = require('jimp');
/*eslint indent: ["off", 0]*/
/*
// Arg Vars
const copyLocal = process.argv[2];
console.log("copyLocal:", copyLocal);
l... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }... |
import {
MODULE_NAME, STATE_SELECTOR, emptyFrozenObject, noop,
} from './context';
import createSubscriber from './subscriber';
function collisionError(key, value, descriptor, module) {
return `[${MODULE_NAME}] | ERROR | Module ${descriptor.config.mid} | Component ${
module.config.cid
} | State Collision: Yo... |
import React from 'react';
import {
StyleSheet,
Text,
View,
Button,
AsyncStorage,
createDrawerNavigator,
TouchableOpacity,
Image,
TouchableHighlight,
KeyboardAvoidingView,
} from 'react-native';
import {
Content,
Container,
Header,
Left,
Icon,
Footer,
Body,
Card,
CardItem,
} from '... |
const HANDSHAKE = 'handshake';
const HANDSHAKE_REPLY = 'handshake-reply';
const CALL = 'call';
const REPLY = 'reply';
const FULFILLED = 'fulfilled';
const REJECTED = 'rejected';
const MESSAGE = 'message';
const DATA_CLONE_ERROR = 'DataCloneError';
export const ERR_CONNECTION_DESTROYED = 'ConnectionDestroyed';
export c... |
function cloneDestroyWygwam(cell) {
var $textarea = $('textarea', cell),
$iframe = $('iframe:first', cell);
// has CKEditor been initialized?
if (!$iframe.hasClass('wygwam')) {
// Make a clone of the editor DOM
$(cell).data('ckeClone', $(cell).children('.cke').clone());
// ... |
(function ($) {
"use strict";
$("input[type=text]").on("keydown", function (e) {
if (e.which === 13) {
e.preventDefault();
}
});
/**
* Event click add more social
*/
$("#social_addmore").click(function (event) {
event.preventDefault();
let soci... |
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
f... |
import {doNonNullCheck, doTypeCheck, isOfType} from "./types";
import {convertRichTextToHTML} from "./richText";
const Excel = require("exceljs");
export class ExcelType {
exceljsType; // Excel.ValueType
name; // String
constructor(exceljsType, name) {
doNonNullCheck(exceljsType, "Excel Type's co... |
const crypto = require('crypto')
const os = require('os')
const fs = require('fs')
const path = require('path')
const msgpack = require('msgpack-lite')
const { N3hRealMode } = require('../../lib/index')
const { ConnectionBackendWss } = require('../../lib/n3h-mod-connection-wss')
class Carrot {
constructor (emit) {
... |
'use strict';
const { dummyFile } = require('../settings');
const { filepathType } = require('../utils/filepath');
const { indir, readdir: { sync: readdir } } = require('recur-fs');
const { strong, warn } = require('../utils/cnsl');
const buildFactory = require('../build');
const buildPlugins = require('./buildPlugins... |
"use strict";
const TreeView = require("./utils/tree-view.js");
const Options = require("../lib/options.js");
describe("Tree-view", () => {
const {assertIconClasses, resetOptions, setTheme, wait} = require("./utils");
before(() => {
resetOptions();
const [treeView] = atom.workspace.getLeftDock().getPaneItems... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
/**
* This module registers a plugin for pre-save events of all
* element with url field.
*
* First the url field is registered if avoidUrl is not configured on the element object.
*/
var molecuel;
var slug = require('speakingurl');
var handlebars = require('handlebars');
var async = require('async');
var debug = ... |
import React from 'react';
import PropTypes from 'prop-types';
import { graphql } from 'gatsby';
import { Section, Container, Columns, Column } from 'bloomer';
import { SeoMetaTags } from '../../components/2021/SeoMetaTags';
import DetailLayout from '../../components/customer-success-stories/DetailLayout';
import Deta... |
var DEFAULT_,
OPTION_,
TYPE_='Pie2D',
TITLE_ = 'Online 动态图表配置',
DATA_,
ANIMATION_ = true,
SHADOW_ = false,
f = true,
BACKGROUND_COLOR = '#FEFEFE',
COO_BACKGROUND_COLOR = '#FEFEFE',
IMAGE_DATA = "";
var color = ['#a5c2d5', '#cbab4f', '#76a871', '#c12c44', '#9f7961', '#6f83a5'];
function doPie(){
... |
import React, { Component } from 'react'
import { View, TouchableOpacity, Dimensions, Text, StyleSheet, FlatList, DeviceEventEmitter } from 'react-native'
import { CardContainer, CardHeader } from '../../common/CardContainer'
import { CloseSvg, DetermineSvg, EmptySvg, CreatePigeonholeSvg, TakeSelectedSvg, RightSvg, Dow... |
var execSync = require('child_process').execSync;
var fs = require('fs');
var path = require('path');
var gulpsmith = require('gulpsmith');
var gulpFrontMatter = require('gulp-front-matter');
var basename = require('basename');
var r2 = require('gulp-liferay-r2-css');
var sassdoc = require('sassdoc');
var define = req... |
import { Template } from 'meteor/templating';
import { ReactiveDict } from 'meteor/reactive-dict';
import { Patients } from '../api/patients.js';
import {Datasample_second} from '../api/patients.js';
import {Assesment} from '../api/patients.js';
import { patientHasAllergies } from '../api/demographic.js'
// import { ... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author <NAME> @sokra
*/
"use strict";
const glob2regexp = require("glob-to-regexp");
const { STAGE_DEFAULT } = require("../OptimizationStages");
const HarmonyExportImportedSpecifierDependency = require("../dependencies/HarmonyExportImportedSpecifierD... |
'use strict';
class SnakeDrawer {
constructor(canvas) {
this.canvas = canvas;
this.ctx = canvas.getContext("2d");
this.requestAnimFrame = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequ... |
/*
Doormen
Copyright (c) 2015 - 2021 <NAME>
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy... |
var CordovaFileCache = require('cordova-file-cache');
var CordovaPromiseFS = require('cordova-promise-fs');
var Promise = null;
var BUNDLE_ROOT = location.href.replace(location.hash,'');
BUNDLE_ROOT = BUNDLE_ROOT.substr(0,BUNDLE_ROOT.lastIndexOf('/')+1);
if(/ip(hone|ad|od)/i.test(navigator.userAgent)){
BUNDLE_ROOT =... |
var app = getApp();
function setOnShowScene(e) {
app.onShowData || (app.onShowData = {}), app.onShowData.scene = e;
}
var pay = {
init: function(l, e) {
var _ = this, A = getApp().api;
_.page = l, app = e;
var y = getApp().core.getStorageSync(getApp().const.PARENT_ID);
y || (y ... |
const DEFAULT_ADDRESS = 0x48
, POITNER_CONVERSION = 0x00
, POINTER_CONFIG = 0x01
, POINTER_LOW_THRESHOLD = 0x02
, POINTER_HIGH_THRESHOLD = 0x03
, CONFIG_OS_SINGLE = 0x8000
, MUX_OFFSET = 12
, GAIN = {
'2/3': 0x0000,
1: 0x0200,
2: 0x0400,
4: 0x0600,
8: 0x0800,
16: 0x0A00,
}
... |
window.addEventListener("online", (event) => {
let button = document.getElementById("button");
button.classList.add('btn-success');
button.classList.remove("btn-danger");
button.innerHTML = 'Online ';
});
window.addEventListener("offline", (event) => {
let button = document.getElementById("b... |
var ua = navigator.userAgent.toLowerCase();
if (/iphone|ipad|ipod/.test(ua)) {
$('.zc_right').css('height','1.8rem');
$('.zc_right').css('line-height','1.8rem');
} else if (/android/.test(ua)) {
$('.zc_right').css('height','2rem');
$('.zc_right').css('line-height','2rem');
$('.zc_right').css('margin-right','0.2r... |
// Licensed to Cloudera, Inc. under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. Cloudera, Inc. licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this f... |
/******************************************************************************
* File: scanner.js
* Author: <NAME> (<EMAIL>)
*
* A scanner to convert expressions from text into a propositional logic token
* stream and associated variable <-> index map.
*
* The tokens can be any of these operators:
*
* /\ ... |
/*
音频播放控制器
G711 G726走AudioContext播放
AAC走audio播放,通过mse控制
音视频同步通过bufferAudio函数控制,目前还没搞清楚,所以音视频存在几百毫秒的不同步问题
*/
"use strict";
function AudioPlayerAAC() {
var MAXTIMEGAP_LIMIT = 200;
var MAX_VOLUME = 1;
var mimeCodec = null;
var mediaSource = null;
var audio = null;
var sourceBuffer = n... |
'use strict';
const hookNameToHasMethodName = {
onAdd: 'hasOnAdd',
onBefore1: 'hasOnBefore1',
onBefore2: 'hasOnBefore2',
onBefore3: 'hasOnBefore3',
onBuild: 'hasOnBuild',
onBuildKnex: 'hasOnBuildKnex',
onRawResult: 'hasOnRawResult',
queryExecutor: 'hasQueryExecutor',
onAfter1: 'hasOnAfter1',
onAfte... |
import { wCanvas, Color } from "./wCanvas/wcanvas.js";
import { capitalize } from "./utils.js";
import * as WorldMap from "./WorldMap.js";
import { availableAlgorithms } from "./algorithms/allAlgorithms.js";
import * as utils from "./utils.js";
// SETTINGS
const KEY_BINDINGS = {
"restart" : "R",
... |
const cryptoNative = require('crypto');
const fs = require('fs');
const path = require('path');
const ECKey = require('ec-key');
const x509 = require('@fidm/x509');
const asn1js = require('asn1js');
const pkijs = require('pkijs');
const Crypto = require('node-webcrypto-ossl');
const dirname = __dirname;
const crypto =... |
/*
* Copyright (c) 2019, Groupon
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and... |
import ChartJsV3, {ArcElement, BarElement, defaults, PointElement} from 'chart.js-v3';
const {
isNullOrUndef,
merge,
resolve,
toFont,
toPadding,
valueOrDefault
} = ChartJsV3.helpers;
const callbackHelper = ChartJsV3.helpers.callback;
import utils from './utils';
import positioners from './positioners';
va... |
/*jshint globalstrict:false, strict:false */
/* global getOptions, assertTrue, assertEqual, arango */
////////////////////////////////////////////////////////////////////////////////
/// @brief test for Foxx app self-heal
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2010-2012 triagens GmbH, Cologne, Germany
///
... |
import React from "react";
import "antd/dist/antd.css";
import { Breadcrumb, Typography, message, Modal, Input, Table, Tag, Button, Icon, Tooltip} from "antd";
import moment from "moment";
class App extends React.Component {
bucket = {
key: '',
type: 'bucket',
url: `${window.location.protocol}//${window... |
/*
Made by <NAME>#6916
*/
const Discord = require('discord.js');
const client = new Discord.Client();
const util = require('util');
const fs = require('fs')
var mysql = require('mysql');
const { token } = require('./token.js');
WaterbotVars = {
//Used for check_rights
owner_access: true,
admin_acce... |
// Orrery.js from Cqoicebordel
// http://www.cqoicebordel.net
// Name, color, angle, x, y
var planets = [["Mercure", "#B87848"],
["Venus", "#EAD0A5"],
["Terre", "#619ABA"],
["Mars", "#B42406"],
["Jupiter", "#EE9D5F"],
["Saturne", "#DEC0AD"],
["Uranus", "#C8EDD7"],
["Ne... |
const htmlTags = require('html-tags');
const svgTags = require('svg-tags');
const { addNamed, addDefault } = require('@babel/helper-module-imports');
const xlinkRE = /^xlink([A-Z])/;
const eventRE = /^on[A-Z][a-z]+$/;
const rootAttributes = ['class', 'style'];
/**
* Checks if string is describing a directive
* @pa... |
/* global it, describe, before, beforeEach, afterEach */
'use strict'
const ao = require('../..')
const aob = ao.addon
const helper = require('../helper')
const expect = require('chai').expect
const os = require('os')
const semver = require('semver')
const bunyan = require('bunyan')
const { version } = require('bun... |
/*FUNCIONES PARA EL PUNTO DE VENTA*/
/************************************************************************************/
function busca_articulo(){
$(document).ready(function(){
var cod=$("#codigo").val().trim();
if(cod.trim()!=""){
$(document).ready(function(){
$.ajax(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.