text stringlengths 5.97k 41.2k |
|---|
import { IE11OrLess } from './BrowserInfo.js';
import Sortable from './Sortable.js';
const captureMode = {
capture: false,
passive: false
};
function on(el, event, fn) {
el.addEventListener(event, fn, !IE11OrLess && captureMode);
}
function off(el, event, fn) {
el.removeEventListener(event, fn, !IE11OrLess && c... |
$(document).ready(function(){
// Initialize
var date = new Date();
date = date.getDay();
getTask(date);
svgDecode();
$(".day-tag[day*='"+date+"']").addClass("active");
$("#task").fadeIn(350);
var date = new Date()
var today = date.getDay();
var hour = date.getHours();
var m... |
/*
~Index canvas.js~
----------------------
1. Monkey Patches
2. Global Utility Functions
3. Canvas Properties
4. Init Values
5. Game Variables
5.1 Win Combinations
6. Event Listeners
7. Animation Utility
8. X Animation Function
9. O Animation Function
10. Drawi... |
/**
* @license
* Copyright The Closure Library Authors.
* SPDX-License-Identifier: Apache-2.0
*/
goog.module('goog.jsonTest');
goog.setTestOnly();
const functions = goog.require('goog.functions');
const googJson = goog.require('goog.json');
const testSuite = goog.require('goog.testing.testSuite');
const userAgent... |
var displayRecords = 0;
jQuery.sap.require("sap.ui.commons.MessageBox");
sap.ui.controller("sap.hana.democontent.epm.admin.view.default", {
/**
* Called when a controller is instantiated and its View controls (if available) are already created.
* Can be used to modify the View before it is displayed, to bind event... |
import { Grid, Paper } from "@material-ui/core";
import Box from "@material-ui/core/Box";
import IconButton from "@material-ui/core/IconButton";
import Typography from "@material-ui/core/Typography";
import PlaylistAddIcon from "@material-ui/icons/PlaylistAdd";
import latinize from "latinize";
import { PrimaryButton, S... |
/** @jsx React.DOM */
var tePointsX = numeric.linspace(-5, 5, numeric.dim(distmatTe)[0]);
var randn = d3.random.normal();
function randnArray(size){
var zs = new Array(size);
for (var i = 0; i < size; i++) {
zs[i] = randn();
}
return zs;
}
// ids must be in order of the array
var cfs = [
{'i... |
/**
* dc.js 2.0
* */
var _DC_Constant = {
isFlashLoaded:false,
rurl:'http://dc.100bt.com/dc?',
startTime : new Date().getTime(),
btdomain:'100bt.com',
flashName:'_dcFlash',
uidKey:'DC_UUID',
imgckey:'DCIMGKEY_',
isOpenSpeedStatic:true,
timeInterval:25*60*1000,
isTestMode:false,
testInterval:2*1... |
/**
* Created by zoonman on 12/12/16.
*/
const fs = require('fs');
const async = require('async');
const xtend = require('xtend');
const models = require('../schema');
const lrEnvelopes = require('./envelope');
const staticHandlers = require('./static');
const TopicListStruct = lrEnvelopes.topicList;
const TopicStru... |
import Link from "next/link";
import CartIcon from "./cart/CartIcon";
import { useState } from "react";
import { useRouter } from "next/router";
import ContentParser from "./ContentParser";
import { domToReact } from "html-react-parser";
import Image from "next/image";
import { AnimatePresence, motion } from "framer-mo... |
/*
*Website:www.51oscar.com
*creat by mouchun.xiao at 2014-11
*/
$(document).ready(function(){
//清除搜索框提示文字
if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion .split(";")[1].replace(/[MSIE]/g,"")<10){
$.focusblur("[name='txt_kw']","#333","#dedede");
$.focusblur(".txt_kw","#333","#d... |
var utils = require('../utils');
var path = require('path');
var url = require('url');
var format = require('../utils/format');
var file = require('../utils/file');
var HTMLParser = require('../utils/htmlparser').HTMLParser;
var EventEmitter = require('events').EventEmitter;
exports.summary = 'Build project with html'... |
import React, { Component } from 'react'
import { Text, View, Dimensions, Platform, FlatList, ActivityIndicator, TouchableOpacity, Alert, AsyncStorage, Modal } from 'react-native'
import gql from 'graphql-tag'
import { Colors } from '../Components/Asset';
import { Query, Mutation } from 'react-apollo'
import { BaseButt... |
/*
* ======== I2C ========
*/
"use strict";
/*global exports, system*/
/* get Common /ti/drivers utility functions */
let Common = system.getScript("/ti/drivers/Common.js");
let logError = Common.logError;
let logWarning = Common.logWarning;
/* get /ti/drivers family name from device object */
let fami... |
import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { NotificationManager } from 'react-notifications';
import * as constants from '../../constants';
import Loader from './../../components/Loader';
import Pagination from './../../components/Pagination';
import StatusElemen... |
let dynamicCont = document.getElementById('dynamicCont');
dynamicCont.innerHTML = '';
pageOne();
let menuBtn = document.querySelector('.menuBtn');
let menuDropdown = document.querySelector('.menuDropdown');
let dropdownUl = document.getElementById('dropdownUl');
window.addEventListener('click', (e)=>{
if (e.targ... |
"use strict";
const acol = (arr,col) => arr.map(v=>v[col]);
const round = (n,p) => { var f = Math.pow(10, p); return Math.round(n * f) / f }
const cumsum = arr => { let sum = 0; const out = []; for (const v of arr) { sum += v; out.push(sum) } return out; }
const sum = arr => arr.reduce((a,v)=>a+v,0);
const mean = arr ... |
"use strict";
// loader settings
var opts = {
lines: 9, // The number of lines to draw
length: 9, // The length of each line
width: 5, // The line thickness
radius: 14, // The radius of the inner circle
color: '#c10e19', // #rgb or #rrggbb or array of colors
speed: 1.9, // Rounds per second
... |
const borderWidth = 1.4
const nodeRadius = 40
class C{
constructor(ct){
this.el = ct.append("div").classed("diagram",true)
this.el.style("position","absolute")
.style("z-index",1)
.style("width","100%")
.style("height","100%")
this.svg = this.el.append('svg')
.style('-webkit-user-select','none')
... |
const WIDTH = 1366;
const HEIGHT = 768;
const SLIDE_DURATION = 1050; // length of slide audio in ms
const FILL_DURATION = 1700; // length of pour audio in ms
const GLASS_POSITION = {
x0: 500,
y0: -500,
x: 700,
y: 200
};
function getRandomItem(array) {
return array[Math.floor(Math.random() * array.length)]... |
// Copyright (c) 2011 <NAME> <<EMAIL>>
// 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 3 of the
// License, or (at your option) any later version.
// This program is distribut... |
art.dialog.fn.shake = function (){
var style = this.DOM.wrap[0].style,
p = [4, 8, 4, 0, -4, -8, -4, 0],
fx = function (a) {
style.marginLeft = a.shift() + 'px';
if (a.length > 0) {
setTimeout(function () {
fx(a);
}, ... |
import React from 'react';
import PropTypes from 'prop-types';
import { Field } from 'react-final-form';
import {
FormattedMessage,
FormattedTime,
injectIntl,
} from 'react-intl';
import moment from 'moment-timezone';
import stripesFinalForm from '@folio/stripes/final-form';
import createInactivityTimer from 'ina... |
/**===========================================================================
* Mastodon account class
=============================================================================*/
class Account {
constructor() {
this.id = "";
this.idname = "";
this.display_name = "";
this.token... |
const ical = require("node-ical")
const discord = require("../node_modules/discord.js")
const config = require("../privateData/config.json")
const schedule = require("node-schedule")
const validUrl = require("valid-url")
var subjects = config.ids.channelIDs.subject
var serverID = config.ids.serverID
var botUserID = con... |
/**************************************************************************
WARRANTY DISCLAIMER.
General. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MISTY ROBOTICS
PROVIDES THIS SAMPLE SOFTWARE “AS-IS” AND DISCLAIMS ALL WARRANTIES AND
CONDITIONS, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING THE WARRANTIES... |
'use strict';
require('mocha');
const version = process.version;
const assert = require('assert').strict;
const utils = require('../lib/utils');
const { isMatch } = require('..');
describe('regex features', () => {
describe('word boundaries', () => {
it('should support word boundaries', () => {
assert(isM... |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
/************************************************************
* edit.js
*
* Interface function for aqueti web services
*************************************************************/
"use strict";
/************************************************************
* Listener function for page events
*******************... |
// inspired by https://arkenfox.github.io/TZP/tests/canvasnoise.html
let pixelImageRandom = ''
const getPixelMods = () => {
const pattern1 = []
const pattern2 = []
const len = 8 // canvas dimensions
const alpha = 255
const visualMultiplier = 5
try {
// create 2 canvas contexts
const canvasDisplay1 = docume... |
/*
@license https://github.com/t2ym/gulp-i18n-leverage/blob/master/LICENSE.md
Copyright (c) 2016, <NAME> <<EMAIL>>. All rights reserved.
*/
'use strict';
var path = require('path');
var fs = require('fs');
var JSONstringify = require('json-stringify-safe');
var stripBom = require('strip-bom');
var rfc6902 = require('r... |
// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable @typescript-eslint/no-var-requires */
const chai = require(`chai`)
const chaiAsPromised = require(`chai-as-promised`)
const { describe } = require(`mocha`)
const WebSocket = require(`ws`)
const { Event } = require(`../dist/enums.js`)
con... |
'use strict';
import React from 'react'
import ReactDOM from 'react-dom'
import 'whatwg-fetch'
import { Link } from 'react-router'
import scrollIntoView from 'scroll-into-view'
// W3
const { Alerter, Button, Card, Content, Footer, Header, IconButton
, Menubar, Nav, Navbar, NavGroup, Sidebar, Window } = require('./... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import GoogleMapReact from 'google-map-react';
import {
DEFAULT_COORD,
LIGHT_BLUE,
DARK_BLUE,
TO_START,
PAUSE,
PLAY,
PLAYBACK,
COMPASSCSV,
} from '../constants';
import { GMAP_API_KEY } from '../gmapKey';
import Row from 'reac... |
// Copyright 2016 Fuzzy.ai
// Copyright 2019 Authkeys.io
//
// 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 appli... |
function notice() {
var message = "'Meteorite Landings' © 2017 <NAME> is distributed under 'The MIT License'.";
message += "\n'Meteorite Landings Dataset' © The Meteoritical Society and NASA is under public domain/access.";
message += "\n'Meteorite Impact Icon' © <NAME> from the Noun Project is distribute... |
const moduleFn = require('./libindigo-ketcher.js')
const assert = require('assert').strict;
function testCalculate(indigo) {
let options = new indigo.MapStringString();
selected = new indigo.VectorInt();
let molfile = `$RXN
1 1 0
$MOL
Ketcher 3262115472D 1 1.00000 0.00000 0
5 4 0 ... |
/*承接建站 270168164*/
var xinm = new Array();
var phone = new Array();
xinm[0]="白金香"
xinm[1]="白应梅"
xinm[2]="柏仁燕"
xinm[3]="包颜琳"
xinm[4]="鲍学梅"
xinm[5]="鲍颖"
xinm[6]="蔡玲芳"
xinm[7]="蔡 艳"
xinm[8]="蔡 玉"
xinm[9]="曹发敏"
xinm[10]="<NAME>"
xinm[11]="陈代业"
xinm[12]="陈济辉"
xinm[13]="陈丽莎"
xinm[14]="<NAME>"
xinm[15]="陈秋燕"
xinm[16]="陈世花"
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const msgpack = require('notepack.io');
const http = require("http");
const Util_1 = require("./Util");
const parseURL = require("url-parse");
const WebSocket = require("ws");
const dist_1 = require("gotti-reqres/dist");
const dist_2 = require... |
var $ = require("jquery");
var ExprEvalParser = require('expr-eval').Parser;
var exprEvalParser = new ExprEvalParser();
/* jshint esnext: true */
Date.epoch = (() => Date.now() / 1000);
// from https://gist.github.com/wteuber/6241786
Math.fmod = ((a,b) => Number((a - (Math.floor(a / b) * b)).toPrecision(8)));
Math.... |
import $ from 'jquery';
import * as _ from 'underscore';
import dialog from 'phraseanet-common/src/components/dialog';
import Alerts from '../utils/alert';
require('phraseanet-common/src/components/tooltip');
const uploader = (services) => {
const { configService, localeService, appEvents } = services;
let Upl... |
const botconfig = require("./botconfig.json");
const Discord = require("discord.js");
const fs = require("fs");
const bot = new Discord.Client({disableEveryone: true});
const Jimp = require("jimp");
const SQLite = require("better-sqlite3");
const sql = new SQLite('./profile.sqlite');
const child_process = require('chil... |
const
_ = require('lodash'),
fs = require('fs'),
path = require('path'),
glob = require('glob'),
{ JSONPath: jsonPath } = require('jsonpath-plus'),
{ createError } = require('errno').custom,
{ getValidatorFactory, compileValidate } = require('./validator'),
Determiner = require('./impl')... |
import * as THREE from '../assets/three/build/three.module.js';
import { OrbitControls } from '../assets/three/examples/jsm/controls/OrbitControls.js';
import { ThreeMFLoader } from '../assets/three/examples/jsm/loaders/3MFLoader.js';
import Stats from '../assets/three/examples/jsm/libs/stats.module.js';
import { GUI... |
/**
* @file TreeSelect component
*/
import React, {Component, createRef} from 'react';
import PropTypes from 'prop-types';
import isArray from 'lodash/isArray';
import classNames from 'classnames';
import Dropdown from '../Dropdown';
import Tree from '../Tree';
import TextField from '../TextField';
import Checkbox ... |
var WebSocket = require("ws");
var http = require("http");
var PlayerTracker = require("./PlayerTracker");
var PacketHandler = require("./PacketHandler");
var Entity = require("./entity");
var Packet = require("./packet");
function GameServer() {
this.config = {
serverMaxConnections: 64,
serverPort: 443,
serverB... |
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _createClass = function () { f... |
const child_process = require('child_process')
const colors = require('./colors')
const config = require('./config')
const fs = require('fs')
const readline = require('readline')
const string = require('./string')
const util = require('util')
// determine core prototypes and plugins
let corePrototypes = []
let plugins... |
let _server = {};
let players = {};
let bg;
let bulletsMap = {};
let powerUpMap = {};
let hitEffects = [];
let dieEffects = [];
let worldSizeX = 2000;
let worldSizeY = 2000;
let sWorldSizeX = mtToPx(40);
let sWorldSizeY = mtToPx(40);
let scores = [];
$(() => {
document.getElementById("playerId").focus();
docume... |
/* eslint-disable react/no-unescaped-entities */
import React from 'react';
import PropTypes from 'prop-types';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './TermsAndConditions.css';
class TermsAndConditions extends React.Component {
render() {
return (
<div className={s... |
import React, { useState } from 'react'
import 'feather-icons'
import { Box, Flex, Text } from 'rebass'
import styled from 'styled-components'
import { useMedia } from 'react-use'
import FourByFour from './FourByFour'
import Panel from './Panel'
import Dashboard from './Dashboard'
import Select from './Select'
import F... |
const debug = require('debug')('service:entry')
// require('debug').enable('service:entry')
//
const getEnv = require('../utils/env')
const logger = require('../utils/logger')
const fileUtil = require('../utils/file')
const commonUtil = require('../utils/common')
const emitter = require('../utils/emitter')
const Config... |
import { Mongo } from "meteor/mongo";
import { Meteor } from "meteor/meteor";
import { check } from "meteor/check";
import axios from "axios";
// import moment from "moment";
import { Collections } from "./collections.js";
export const Board = new Mongo.Collection("board");
export const MatchPlayers = new Mongo.Colle... |
//const fetch = require(`${process.cwd()}/node_modules/node-fetch/lib/index.js`)
//const jsdom = require("jsdom");
const { URL } = require('url')
//const { JSDOM } = jsdom;
const https = require('https');
//const { fbRest } = require('../firebase/firebase-rest')
const { nodeFetch } = require('../nodejs/node-fetch')
... |
var suitability = ee.Image("users/defendersofwildlifeGIS/Tortoise/suitability"),
connectivity = ee.Image("users/defendersofwildlifeGIS/Tortoise/connectivity"),
counties = ee.FeatureCollection("TIGER/2018/Counties"),
clarkGain = ee.FeatureCollection("users/defendersofwildlifeGIS/Tortoise/clarkGain"),
cla... |
// ------------------------ Midi App Javascript ----------
// The name of this App is bad, I should find something better
//
// I use UPPERCASE prefix for function based on their API or context function
// Even though all of them are mixed and strongly bound.
// WA is for Web Audio API
// MIDI is for Web Midi API... |
angular.module('app').directive('uxdSearchBuilderWrapper', () => {
return {
restrict: 'E',
template: require('./search-builder-wrapper.directive.html'),
controller: ['$scope', '$templateCache', '$modal', function ($scope, $templateCache, $modal) {
$templateCache.put('search-build... |
const fs = require('fs')
const EventEmitter = require('events')
const getDirName = require('path').dirname
const path = require('path')
const Database = require('./lib/database')
const Hyperbee = require('hyperbee')
const Hypercore = require('./lib/core')
const pump = require('pump')
const Crypto = require('./lib/crypt... |
const settings = require("../../settings.js");
const EventsList = require("../EventsList.js");
const ItemConfig = require("../inventory/ItemConfig.js");
const BankChest = require("../entities/classes/statics/interactables/breakables/BankChest");
const starterBankItemConfigsList = require("./StarterBankItemConfigs").lis... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... |
import {addTitle,changeTitle, countListSelected, isAnyHighlighted, heatmapPointCount} from "./Utilities.js";
import {makeTextSprite, makeTextSprite2} from "../Utilities/other.js"
import {getAxis, dispose2DPlots} from "./Utilities.js";
import {changeLegend/*, insertLegend, removeLegend, insertLegendMolecule, removeLegen... |
var MAX_PLACES = 20; // history length
var MAX_ERRORS = 5;
var TTL = 500; // time to live for app messages in milliseconds
var initialized = false;
var lat1 = 0;
var lon1 = 0;
var lat2 = parseFloat(localStorage.getItem("lat2")) || null;
var lon2 = parseFloat(localStorage.getItem("lon2")) || null;
var interval = parseIn... |
var log2 = Math.log( 2 );
function nearestPow2( aSize ){
var p = Math.pow( 2, Math.round( Math.log( aSize ) / log2 ) );
// console.log( "np2: " + aSize + " --> " + p );
return p;
}
var Mediathek3D = function( config, done ) {
// Run the Object3D constructor with the given arguments
THREE.Object3D... |
import store, { registerGlobalSettingsHandler } from './CreateAppStore';
import { informListeners, subscribeListener } from "./Subscriptions";
import boxedImmutable from "boxed-immutable";
import DelayedTask from "./DelayedTask";
import { appSettings_$ } from './AppSettings';
const _$ = boxedImmutable.box;
const boxSt... |
// 忽略保存按钮(开发时使用)
function onDocKeydown(e) {
e = e || window.event;
if (e.ctrlKey && e.keyCode == 83) {
console.log(e.keyCode);
$(document.body).css("background", "pink");
setTimeout(function () {
$(document.body).css("background", "#ddd");
}, 200);
return false;
}
}
document.onkeydown = ... |
const commontags = require('common-tags');
const Discord = require('discord.js');
const request = require('request-promise');
const Teamcraft = require('@ffxiv-teamcraft/simulator');
const XIVAPI = require('xivapi-js');
const xivvi_db = require("config").get("common").get("database");
module.exports = {
nam... |
const { Command } = require('klasa');
const { MessageEmbed, MessageAttachment } = require('discord.js');
const { registerFont, createCanvas, loadImage } = require('canvas');
// const { Canvas } = require("canvas-constructor");
const { resolve, join } = require("path");
// Canvas.registerFont(resolve(join(__dirname, ".... |
/*
Licensed under the MIT License:
http://www.opensource.org/licenses/mit-license.php
*/
$(function(){ initDatabase();
// drop the tables whilst debugging
$('#clear').click(function(){ dropTables(); });
});
function initDatabase() {
try {
if (!window.openDatabase) {
alert('Local Databases ar... |
timeTableStorage = [{
"id": 0,
"name": "Table Default",
"data": [],
}];
activeTable = timeTableStorage[0];
var highlighted = {
0: [],
"highlight": function (id) {
if (highlighted[id]) {
highlighted[id].forEach(function (slot) {
$("#timetable ." + slot).addClass("highlight");
if ($(".qu... |
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import {
first,
flatten,
forEach,
fromPairs,
get,
head,
indexOf,
isEmpty,
keys,
last,
max,
min,
noop,
omit,
range,
reverse,
size,
sortBy,
values,
zipObject,
} from 'lodash';
imp... |
// GLOBALS
let MODE = "normal";
let GAME = "rps";
let initialize = false;
let rpsPattern = [],
rpslsPattern = [];
let rpsGameCount = 0,
rpslsGameCount = 0;
let rpsPatternLength = 13,
rpslsPatternLength = 13;
// @desc- Initialize to create start events and to update score
const init = () => {
createStartEvents(GAME... |
// IMPORTS
const Alexa = require('ask-sdk-core');
const persistenceAdapter = require('ask-sdk-s3-persistence-adapter');
const axios = require('axios');
const cheerio = require('cheerio');
const chrono = require('chrono-node');
const dateToWords = require('date-to-words');
const _ = require('lodash');
// CONSTANTS
co... |
/**
1.根据原版脚本修改,增加上月账单信息,需重新获取Cookie,打开app即可
2.适合流量畅享套餐使用,其他套餐,自行测试,此项仅供测试
3.可能因地区不同,脚本不一定适用
By Macsuny 修改
感谢原版作者提供脚本
* 下载安装 天翼账号中心 登陆 获取authToken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# quantumultx
[rewrite_local]
^https?:\/\/e\.189\.cn\/store\/user\/package_detail\.do url script-request-header telecomInfinity.js
... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
/* Copyright (C) Datar Cancer Genetics Limited - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by <NAME>, December 2018
*/
$(document).ready(function(){
$("#quality_status_switch").tooltip({'placement':'top'});
$(".qc... |
import React from 'react';
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faChessKing} from "@fortawesome/free-solid-svg-icons";
import {faChessQueen} from "@fortawesome/free-solid-svg-icons";
import {faChessBishop} from "@fortawesome/free-solid-svg-icons";
import {faChessKnight} from "@fortawe... |
// handleRowClick = function(event) {
// console.log(this);
// this.remove();
// }
console.log("Initialized!");
let isEdit = false;
let idEdit = null;
getObjectFromArray = function(restarauntId) {
let restarauntArray = Restaraunt.restaraunts;
for (let i = 0; i < restarauntArray.length; i++) {
if (restara... |
import React, {Component} from 'react';
import {StyleSheet,View,RefreshControl,Alert,Text,FlatList,ScrollView} from 'react-native';
import { Grid, Accordion, WhiteSpace, WingBlank ,List} from '@ant-design/react-native';
import { CheckBox,Button } from 'react-native-elements'
import TabNavigator from 'react-native-tab-... |
/**
*
*/
var fullview_timer;
var changebgcolor_timer;
$(function() {
// 面包屑
var sA1 = "模板管理";
var sA2 = "VNF";
var sA3 = "<a>" + sA1 + "</a>" + ">" + "<a>" + sA2 + "</a>";
var sA4;
// 伸缩meanu
$(".meanul > li > a").click(
function() {
$(this).addClass("active").siblings("ul").slideDown().parent()
... |
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
// **Github:** https://github.com/fidm/x509
//
// **License:** MIT
const net_1 = require("net");
/**
* Converts IP string into buffer, 4 bytes for IPv4, and 16 bytes for IPv6.
* It will return null when IP string invalid.
*
* ```js
* cons... |
// Copyright 2016-2019 the Bayou Authors (<NAME> et alia).
// Licensed AS IS and WITHOUT WARRANTY under the Apache License,
// Version 2.0. Details: <http://www.apache.org/licenses/LICENSE-2.0>
import chokidar from 'chokidar';
import fs from 'fs';
import fs_extra from 'fs-extra';
import path from 'path';
import { Dir... |
/* eslint-disable import/extensions */
/* eslint-disable camelcase */
import {
API_KEY,
API_URL,
IMG_URL,
POSTER_SIZE,
} from './config.js';
// Take the user to detailed tv show info page.
const showSelected = async (event) => {
event.preventDefault();
sessionStorage.setItem('showId', event.currentTarget.s... |
var cTime;
var startTime = Date.now();
var maxEnemy = 0;
var playerG = 1;
var dG = 1;
var gravity = 1;
var score = 0;
function getAngle(e1, e2) {
//(entity1, entity2)
xdiff = e2.x - e1.x;
ydiff = e2.y - e1.y;
return Math.atan2(ydiff, xdiff);
}
function round(num, decimal_places) {
this.mult = Math.pow(10, d... |
import React, { useEffect, useState } from 'react';
import { useHistory } from 'react-router-dom';
import axios from 'axios';
// Formik
import { Formik, Form, Field } from 'formik';
// MUI
import { makeStyles } from '@material-ui/core/styles';
import {
Paper,
Grid,
Button,
MenuItem,
} from '@material-ui/core';
... |
let tempChart;
let flameChart;
init();
function init() {
let varsInitDone = true;
if (ipAddr === "`IP_ADDR`" || ipAddr === "") {
alert("Gateway ip address is unknown");
varsInitDone = false;
}
if (varsInitDone && (readToken === "`READ_TOKEN`" || readToken === "")) {
alert("Please specify READ API... |
import React, { Component } from "react"
import SpeakerClosed from "./speakerClosed"
class Speakers extends Component {
constructor(props) {
super(props);
this.spks = {}
this.spks[1] = {
"name": "<NAME>",
"text": "Licenciada en Ciencias y Técnicas de la Comunicación, con formación dentro de l... |
const APP_PORT = 8081;
//var JQUERY_JS = "jquery-2.1.4.min.js";
var JQUERY_JS = "jquery-3.2.1.min.js";
var PAGE_JS = "page.js";
var apiUrl = "http://localhost:" + APP_PORT + "/";
var pageErrors = [];
let networkRequests = new Map(); // map[requestId, {requestData}]
var activeFrameId = 0;
var activeWindowId = -1;
var c... |
// Weight, Width, Height, Length, grouped by vehicle type
var vehicleProps = {
'Light': [3, 2.5, 2, 4],
'Medium': [5, 2.5, 2.5, 6],
'Heavy': [20, 3, 2.5, 12],
};
// Default vehicle is a Goods Vehicle
var currentVehicle = vehicleProps['Light'].join();
// To be used when planning and following itineraries
var cur... |
///////////////////////////////////
// ajax im 3.41 //
// AJAX Instant Messenger //
// Copyright (c) 2006-2008 //
// http://www.ajaxim.com/ //
// Do not remove this notice //
///////////////////////////////////
/**
* Object to hold all Admin Windows as variables
*
... |
var conn = new WebSocket('ws://queuevideo.nl:8080');
conn.onopen = function(e) {
console.log("Connection established!");
var sessid = getCookie("PHPSESSID");
var messageObject = {
'sessionid': sessid,
'method': "authenticate"
};
sendJSONObject(messageObject);
};
conn.onme... |
var canvas;
var gl;
var NumVertices = 36;
var pointsArray = [];
var colorsArray = [];
var vertices = [
vec4( -0.2, -0.2, 0.2, 1.0 ),
vec4( -0.2, 0.2, 0.2, 1.0 ),
vec4( 0.2, 0.2, 0.2, 1.0 ),
vec4( 0.2, -0.2, 0.2, 1.0 ),
vec4( -0.2, -0.2, -0.2, 1.0 ),
vec4( -0.2, 0.2, -0.2, 1.0 ),
vec4( 0.2, 0.2, ... |
function escapeHtml(text) {
var map = {
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": '''
};
return text.replace(/[&<>"']/g, function(m) { return map[m]; });
}
var ajaxReportPageModule = (function() {
return {
init: funct... |
import React from 'react';
import PropTypes from 'prop-types';
import { createStructuredSelector } from 'reselect';
import { compose } from 'redux';
import { connect } from 'react-redux';
import { push } from 'connected-react-router';
import Dropzone from 'react-dropzone';
import moment from 'moment';
import { Helmet }... |
/**
* Methods to write messages given the data
*/
const constants = require('./utils/constants');
const modes = require('./utils/modes');
const formatSeconds = require('./utils/formatSeconds').formatSeconds;
// Methods to write error messages
const errors = require('./utils/errors');
const getModeNotFoundError = e... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may n... |
export const overlayBgColor = {
r: 10,
g: 10,
b: 10,
a: 0.88,
};
export const popupBgColor = {
r: 241,
g: 241,
b: 241,
a: 0,
};
export const headlineTextColor = {
r: 255,
g: 255,
b: 255,
a: 1,
};
export const subHeadlineTextColor = {
r: 255,
g: 255,
b: 255,
a: 1,
};
export const subm... |
import React, { useCallback, useMemo, useRef, useEffect, useState } from 'react'
import imageExtensions from 'image-extensions'
import isUrl from 'is-url'
import isHotkey from 'is-hotkey'
import {
Editable,
withReact,
useEditor,
useSelected,
useFocused,
useReadOnly,
useSlate,
Slate,
ReactEditor,
} fro... |
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModu... |
/**
* Copyright 2016, Sourcepole AG.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
Search provider interface:
--------------------------
onSearch: function(text, requestId, searchOptions, dispat... |
#!/usr/bin/env node
'use strict';
// Throw an error on unhandled rejections (exit non-zero)
process.on('unhandledRejection', err => {
throw err;
});
['SIGINT', 'SIGTERM'].forEach(function(sig) {
process.on(sig, function() {
process.exit();
});
});
require('../util/verifyNodeVersion');
const fs = require(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.