text stringlengths 8.5k 48.7k |
|---|
var fight = {
owner : true,
chat : null,
connected : true,
started : false,
id : -1,
userId : -1,
opponentId : -1,
player1 : null,
player2 : null,
locked : false,
active : 1,
phase : 1,
_freeze : false,
_holder : null,
_interval : null,
_server : null,
init : function() {
this._holder = $('#game-hold... |
// 結晶構造描画クラス
class Crystal3D {
constructor(canvas) {
// グローバル変数
// 描画先オブジェクト
this.canvas = canvas;
// 格子関連変数
this.vec_a1 = new THREE.Vector3(); // 並進ベクトル
this.vec_a2 = new THREE.Vector3(); // 並進ベクトル
this.vec_a3 = new THREE.Vector3(); // 並進ベクトル
this.nc... |
var lastrow,lastcell;
$(function () {
$("#dataGrid").dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{ label: '加工流程代码', name: 'actions', width: 220,align:'center',formatter:function(cellval, obj, row){
var html='<a title="查看加工节点" onclick="vm.showNodeGrid(\''+row.process_flow_code+'\')" ... |
import React, { useEffect, useRef } from "react";
import { connect, shallowEqual } from "react-redux";
import { Button, ButtonGroup } from "@blueprintjs/core";
import _regl from "regl";
import * as d3 from "d3";
import { mat3 } from "gl-matrix";
import memoize from "memoize-one";
import Async from "react-async";
impor... |
const rlie = require('..');
const vectors = require('../lib/vectors');
const contexts = require('../lib/contexts');
function evaluate(test, text, expected) {
let result = rlie.evaluate(text);
if (isNaN(result) && isNaN(expected))
return;
if (result && typeof result.elements === 'function... |
// // function draw(data){
// // $('#chart').highcharts({
// // title: {
// // text: 'Коэффициенты БК'
// // },
// // yAxis: {
// // title: {
// // text: 'Коэффициенты'
// // },
// // plotLines: [{
// // valu... |
function BranchData() {
this.position = -1;
this.nodeLength = -1;
this.src = null;
this.evalFalse = 0;
this.evalTrue = 0;
this.init = function(position, nodeLength, src) {
this.position = position;
this.nodeLength = nodeLength;
this.src = src;
return this;
}
... |
/*
Speedtest.net client.
The MIT License (MIT)
Copyright (c) 2014 <NAME>
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, cop... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = require('react');
var React__default = _interopDefault(React);
var PropTypes = _interopDefault(require('prop-type... |
//////////////////////////////////////////
//////////////// LOGGING /////////////////
//////////////////////////////////////////
function getCurrentDateString() {
return new Date().toISOString() + " ::";
}
__originalLog = console.log;
console.log = function () {
var args = [].slice.call(arguments);
__originalLog.... |
// =====================================================================================================================
// SETTINGS
// =====================================================================================================================
const CAMERA_PARAMS = {
width: 512,
height: 640,
fov:... |
/**
* Copyright 2017,2019 IBM Corp. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... |
"use strict";
/**
* @license
* Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of c... |
"use strict";
import { Mat3 } from "./Mat3.js";
import { Quat } from "./Quat.js";
import { Vec3 } from "./Vec3.js";
import { Vec4 } from "./Vec4.js";
/**
* Class represents a 4x4 matrix.
* @class
*/
export class Mat4 {
constructor() {
/**
* A 4x4 matrix, indexable as a column-major order array... |
/**
* This module contains a variety of utility functions for working with JBoss AS in different versions.
*
* @author <NAME>
*/
var util = require('./util');
var bundles = require("./bundles");
//init the version-specific objects. We'll be adding the functions to them further down below.
exports.as7 = {}
/**
... |
const {ipcRenderer} = require('electron');
const fs = require('fs');
const version = require("../package.json").version;
require("./i18n");
const dataStore = require("./Store");
var officegen = require('officegen');
var async = require('async');
var exportSelected = false;
var store = new dataStore(function () {
$... |
// Write your Javascript code.
/*
Name: site.js
Created: 6-Oct-2016
Author: <NAME>
Description: JS file for Autocomple Textbox for Users and People Picker
*/
//[!] Code for AutoComplete Textbox
var GlobalUsersArray = [];
var DicKeyValArrayforUser = [];
var url = ServiceLayer.serviceURL + '/Dashboard/GetUsers'
var Ap... |
import React, { Component } from 'react';
import {Link} from 'react-router-dom';
import MaleDefaultImage from '../css/img/male_default.jpg';
import CarouselImage03 from '../css/img/Carousel/carousel_img_3.png';
import axios from 'axios';
import cookie from 'js-cookie';
function searchForSqvalue(term){
return ... |
// Copyright 2017 <NAME>.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
const Discord = require("discord.js");
const client = new Discord.Client();
var prefix = "+";
client.on('ready', () => {
console.log(`----------------`);
console.log(`Leaders- Script By : HemaCraft`);
console.log(`----------------`);
console.log(`ON ${client.guilds.size} Servers ' Scri... |
// common variables of the u, v curves
var w_arr, points, arr, drawed, parchanged, pointsize_arr, mouseymin, mousexmax, on_point;
// variables of v direction
var v_degree, v_degreep1, v_n, v_nplus1, v_U, v_container, v_degchanged, v_t_step;
// variables of u direction
var u_degree, u_degreep1, u_n, u_nplus1, u_U, ... |
// This file contains the original Javascript code
// The production has been retro-compiled for ES-2015 to fix compatibility issues and is located in frontend/main_ES5.js
const NODE_COLOR = "rgba(145, 145, 145, 1)";
const EDGE_COLOR = "rgba(145, 145, 145, 0.8)";
const SELECTED_EDGE_COLOR = "rgba(0, 0, 0, 0.8)";
... |
function count_keys(obj) {
var i = 0;
for (var key in obj) { i++; }
return i;
}
function getParserSource() {
//Get request object
var ua = navigator.userAgent.toLowerCase();
if (!window.ActiveXObject)
request = new XMLHttpRequest();
else if (ua.indexOf('msie 5') == -1)
request =... |
/*
Copyright (c) 2011-2012 VMware, Inc.
*/
var fs = require('fs');
var events = require("events");
var exec = require('child_process').exec;
var crypto = require('crypto');
var zlib = require('zlib');
var express = require('express');
var seq_id_cmp = require('./utils').seq_id_cmp;
var get_key_fingerprint = require('./... |
"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)... |
"use strict";
var gl;
var dContext;
var options = {
valueNames: [ 'PointName', 'xCoordinate', 'yCoordinate' ]
};
var pointList = new List('points', options);
var maxPoints = 13;
var timeAnimation = 0.1;// seconds
var isPlayAnimation = false;
var currentSegment = 0;
var currentParameter = 0;
var segments;
var delt... |
//
// Author: <NAME> <EMAIL>
// Sep 2013
//
var util = require('util');
var url = require('url');
var net = require('net');
var fs = require('fs');
var path = require('path');
var domain = require('domain');
var cluster = require('cluster');
var os = require('os');
var core = require(__dirname + '/core');
var lib = ... |
/**
* Created by tomasnovella on 5/15/14.
*/
var assert = require('assert');
var _ = require('../libs/lodash');
var exceptions = require('./exceptions');
var interpreter = require('./interpreter');
var commands = require('./commands');
describe('module for testing commands module', function() {
var context;
be... |
function backHomepage()
{
window.location.href="chrome-extension://"+chrome.runtime.id+"/dataManager/homepage.html"
// chrome.tabs.create({url: "chrome-extension://"+chrome.runtime.id+"/dataManager/homepage.html"})
}
function showBrowserData(){
window.location.href="chrome-extension://"+chrome.runtime.id+"... |
/* Copyright 2019, 2020, 2021 Romain "Artefact2" <NAME> <<EMAIL>>
*
* 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 require... |
const Discord = require('discord.js');
const client = new Discord.Client();
const steem = require("steem");
steem.api.setOptions({ url: 'https://api.steemit.com/', useAppbaseApi: true});
const javalon = require('javalon');
const asyncjs = require('async')
const fetch = require("node-fetch");
const ChartjsNode = require... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
* @format
*/
// flowlint ambiguous-object-type:error
'use strict';
var _interopRequireDefault = require("@babel/runtime/helpe... |
const MidiPlayer = require('midi-player-js');
const fs = require('fs');
const KeyRegister = require('./KeyRegister');
const VacuumController = require('./VacuumController');
const SustainController = require('./SustainController');
const MusicLibrary = require('./MusicLibrary');
//const NotePlayer = require('../synth/N... |
function getHost(url) {
var host = url.replace(/^https{0,1}:\/\//, '');
host = host.replace(/^www\./, '');
host = host.replace(/^www[a-z,0-9,A-Z]\./, '');
host = host.replace(/\/.*/,'');
return host;
}
function getXmlHttpObject() {
return new XMLHttpRequest();
}
function StrToNum(Str, Check, ... |
"use strict";
require("core-js/modules/es.symbol");
require("core-js/modules/es.symbol.description");
require("core-js/modules/es.symbol.iterator");
require("core-js/modules/es.array.concat");
require("core-js/modules/es.array.iterator");
require("core-js/modules/es.array.join");
require("core-js/modules/es.arra... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
import React, {Component} from 'react';
import {
View, StyleSheet, Text, TouchableOpacity, Dimensions, PixelRatio, FlatList,
Image,
Platform,
Keyboard,
BackHandler, TextInput, SafeAreaView, DeviceEventEmitter,
} from 'react-native';
import config from '../service/config';
import Global from '../uti... |
/**
* IKT Animation Platform ( IAP )
*
* @version : 0.1
* @Author : <NAME>
* @Email : <EMAIL>
*/
/**
* Load the necessary library which is initted on our iap_src ( iap-config.js )
*/
var iap_all_loaded = 0;
$(document).ready( function(){
if( typeof iap_src === "object" ){
iap_all_loaded = 1 ... |
document.addEventListener('DOMContentLoaded', () => {
// main script entry point
assembleEvents(
document.getElementById('upcoming-events'),
document.getElementById('past-events'),
document.getElementById('site-contributors'),
document.getElementById('useful-links'),
document.getElementById('sm... |
import React, { Component } from "react";
import {
StarterScreen,
SelectForm,
SelectFile,
SelectLanguage
} from "./starter";
import { updateData } from "../../store/actions/rootActions";
import { connect } from "react-redux";
import { DragDropContext } from "react-beautiful-dnd";
import SideBar from "./sidebar/... |
// ==UserScript==
// @name Bonus Point Optimization
// @version 2
// @description Chameleon's take on the BP optimization script
// @author Chameleon
// @include http*://*passthepopcorn.me/bonus.php*
// @include http*://*passthepopcorn.me/bprate.php*
// @grant none
// ==/UserScript=... |
// @create-index
export { default as Abt } from './Abt.js';
export { default as Act } from './Act.js';
export { default as Actn } from './Actn.js';
export { default as Ada } from './Ada.js';
export { default as Add } from './Add.js';
export { default as Adx } from './Adx.js';
export { default as Ae } from './Ae.js';
e... |
import m from 'mithril'
import render from 'mithril-node-render'
import { pd as pretty } from 'pretty-data'
import zeroFill from 'zero-fill'
import { NS } from './constants'
function nth (d) {
if (d > 3 && d < 21) return 'th'
switch (d % 10) {
case 1: return 'st'
case 2: return 'nd'
case 3: return 'r... |
/**
* @author <NAME> https://www.udemy.com/user/nicholas-lever-3
*/
class Easing {
// t: current time, b: begInnIng value, c: change In value, d: duration
constructor(start, end, duration, startTime = 0, type = 'linear') {
this.b = start;
this.c = end - start;
this.d = duration;
this.type = type;
this.sta... |
/*
*** MduiLogBackitup
Dieses Script dient der Visualisierung des Logs des BackitUp-Adapters in der vis im Material Design CSS Style als
table- bzw. list-Anzeige.
In jedem Log-Ordner
* befindet sich ein table- und list-HTML State, welcher direkt in der vis angezeigt werden kann (jeweils im basic-string (unescaped) W... |
let hidePost = {}
function toggleHide(hideshow, threadposts, responses) {
const hideButton = document.getElementById(hideshow);
const threadAll = document.getElementById(threadposts);
if (!hideButton) throw new Error("Hide Button not found")
if (!threadAll) throw new Error("Post not found")
if (typ... |
//import { point } from 'leaflet'
//import { scan } from 'node-wifi'
import { last } from 'lodash'
//const Debug = require('debug')('rfparty')
const Leaflet = require('leaflet')
const JSON5 = require('json5')
const Pkg = require('../package.json')
const JSONPath = require('jsonpath-plus').JSONPath
const reach = requi... |
const checkInputSpeed=10;
class Map{
marker; //ORDERD!! array of markers
selectedMarker;
boatMarker;
map;
map_menu;
routeLine;
tripp_type; //0=circle 1=order 2=fastest
add_marker_button;
delete_marker_button;
tripp_type_button;
minimalistic;
const... |
/**
* Created by yangm11 on 4/7/2017.
*/
'use strict';
const stats = (function () {
// convert string to an array of objects
function str2Array(str) {
let arr = str.split('\n');
let result = [];
let headers = arr[0].split(',').map(d => d.trim());
let len = headers.length;
let line;
for (... |
const question = document.querySelector('#question');
const choices = Array.from(document.querySelectorAll('.choice-text'));
const progressText = document.querySelector('#progressText');
const scoreText = document.querySelector('#score');
const progressBarFull = document.querySelector('#progressBarFull');
let currentQ... |
//
// $Id: webmagick.js,v 1.21 1998/12/19 22:03:13 bfriesen Exp $
//
// JavaScript routines to display a set of images
// Part of the WebMagick package
// Copyright 1997, 1998, <NAME>
//
// Start with first page (zero based)
var pageNumber = 0;
// Start with first image on page
var pageImageIndex = 0;
//
// Window s... |
import ControlRequest from "./ControlRequest";
import ControlRequestBatch from "./ControlRequestBatch";
import LoggerManager from "../../src-log/LoggerManager";
import Request from "../net/Request";
import Executor from "../../src-tool/Executor";
import ConnectionSelector from "../net/ConnectionSelector";
import Const... |
var fs = require('fs');
var path = require('path');
var consoleFlags = require('./ConsoleFlags.js');
var FileTool = require('./tools/File.js');
class Atomic {
constructor(Config, HotReload) {
this.Global = {
name: JSON.parse(fs.readFileSync(path.join(process.cwd(), "package.json"))).name,
version: JS... |
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-gray; icon-glyph: compass;
//
// Location, location, location!
// https://github.com/doersino/scriptable-widgets/tree/main/location-location-location
// - This is the code for a Scriptable widget, see https:/... |
/**
* Created by rolangom on 6/19/17.
*/
// imports
const { observable, autorun } = mobx;
const { observer, Provider, inject } = mobxReact;
const { BrowserRouter, Route, Link } = ReactRouterDOM;
const { Menu, Input, Checkbox, Table, Statistic, Header, Label, Icon, Grid, Button, Segment, Divider, Container } ... |
var averageWeight = [
1343.12,
1294.5294,
1248.2264,
1221.9393,
1231.9149,
1224.8493,
1229.7182,
1224.4133,
1233.7477,
1269.2763,
1275.0529,
1272.2541,
1269.0555,
1256.4545,
1255.4771,
1259.8588,
1257.7376,
1252.5008,
1259.0219,
1254.4183,
1271.1321,
1271.7907,
1269.5855,
1266.8506,
1265.3082,
1265.8593,
1263.6148,
1... |
var SerialPort = require("serialport");
var serialPort = new SerialPort('/dev/ttyACM0', { baudRate: 115200 });
var joystick = new (require('joystick'))(0, 2000, 350);
const rs2 = require('./index.js'); // The Intel Realsense SDK
let Controller = require('node-pid-controller');
/*
const mqtt = require('mqtt');
const cl... |
/*Create the tabs*/
/*Precompute getDates for each timeline element*/
var precomputed_timeline = {};
for( var i = 0;i<timeline.length;i++){
precomputed_timeline[timeline[i]] = +getDate(timeline[i],timeline_data[i]) + monthValue(timeline[i]);
}
/*Sort sentences by date*/
timeline = timeline.sort(function(a,b){
var ... |
var cerrar = false;
var valparameters = 6;
$(document).ready(function() {
var options = {
beforeSubmit: showRequest,
success: showResponse,
url: '_subirArchivo.action?CVE_CONTRATO='+$('#CVE_CONTRATO').attr('value'),
type: 'post',
dataType: 'json'
}... |
/**
* This is copied and modified from Apache v2 project of <EMAIL>:SeleniumBuilder/selenium-builder.git.
* I respect their work and am really proud of my creation based on it. Thanks.
*/
/**
Apache License
Version 2.0, January 2004
... |
import React from "react";
import {connect} from "react-redux";
import classNames from "classnames";
import _ from "lodash";
import ActionsUtils from "../../actions/ActionsUtils";
import Textarea from "react-textarea-autosize";
import NodeUtils from "./NodeUtils";
import ExpressionSuggest from "./ExpressionSuggest";
im... |
//INIT PART
var sentData = {};
var connects = {};
var markers = {};
var active = false;
var socket = io.connect("/");
var myLatlng;
var yelpRectangle;
var yelpArea;
var ne;
var sw;
var yelpResTmp = [];
var yelpFilterRes = [];
var yelpInfoWindow = null;
var yelpMarker = [];
var myLat;
var myLng;
var bounceTimer;
var ico... |
/*
*
* Font Awesome Icon Database mapped to font items.
*
*/
const Icons = {
'500px': "\uf26e",
addressBook: "\uf2b9",
addressBookO: "\uf2ba",
addressCard: "\uf2bb",
addressCardO: "\uf2bc",
adjust: "\uf042",
adn: "\uf170",
alignCenter: "\uf037",
alignJustify: "\uf039",
alignLeft: "\uf036",
alignRight: "\uf038",
ama... |
// Copyright 2011 <NAME>, University of San Francisco. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of... |
import extend from 'extend';
import * as mixins from './chart-mixins';
import createDockLayout from '../dock-layout/dock-layout';
import {
detectTouchSupport,
isValidTapEvent
} from '../utils/event-type';
import { getShapeType } from '../geometry/util';
import datasources from '../data/data';
import dataCollection... |
var downsize = require('downsize'),
hbs = require('express-hbs'),
moment = require('moment'),
_ = require('lodash'),
Promise = require('bluebird'),
api = require('../api'),
config = require('../config'),
errors =... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GalleriaThumbnails = void 0;
var _react = _interopRequireWildcard(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _classnames = _interopRequireDefault(require("classnames"));
var _DomHandle... |
const chalk = require('chalk')
const nodegtk = require('../lib/index');
nodegtk.startLoop();
const infos = []
const GI = nodegtk._GIRepository;
function def(obj, name, data) {
Object.defineProperty(obj, name, {
enumerable: false,
configurable: true,
value: data
});
}
const obj ... |
var searchTerms = [];
var uniqueSearchMarkers = [];
var categories = [
'ambush', 'boats', 'campfires', 'defend_campsite', 'dailies', 'dog_encounter',
'egg_encounter', 'escort', 'fame_seeker', 'fast_travel', 'grave_robber', 'hideouts',
'hogtied_lawman', 'hostile_conversation', 'moonshiner_camp', 'nazar', 'p... |
////////////////////////////////////////////////////////////
//////////////////////// Set-up ////////////////////////////
////////////////////////////////////////////////////////////
var screenWidth = $(window).width(),
mobileScreen = (screenWidth > 400 ? false : true);
var margin = {left: 50, top: 10, right: 50, ... |
import {
clearDfpAdsFromRefreshableList,
incrementAdsCounter,
} from 'helpers/ads/redux';
import analyticsWrapper from 'helpers/analytics/analyticsWrapper';
import { getCookie } from './cookies';
import {
TOI_LIVE_DOMAIN,
TOI_DEV_DOMAIN,
TOI_DEV_MOBILE_DOMAIN,
TOI_LIVE_MOBILE_DOMAIN,
GOOGLE_WEBCACHE_DOMAI... |
$(document).ready(function(){
var BASEURL = "<?=BASEURL;?>";
var FILEUPLOADSIZE = "<?=FILEUPLOADSIZE;?>";
// alert(BASEURL);
$('input.datepicker').datepicker({
format: "dd-mm-yyyy",
autoclose:true,
//startDate: startdate,
endDate: '+0d',
}).click(function(){
$('.datepicker-days').cs... |
"use strict";
window.addEventListener('keyup', function (event) {
Key.onKeyup(event);
}, false);
window.addEventListener('keydown', function (event) {
Key.onKeydown(event);
}, false);
var Key = {
_pressed: {},
A: 65,
W: 87,
D: 68,
S: 83,
N: 78,
M: 77,
K: 75,
L: 76,
H: ... |
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
/**
* postitall.txusko.com
* chrome extension - released under MIT License
* Author: <NAME> <<EMAIL>>
* http://github.com/txusko/PostItAll
* Copyright (c) 2015 <NAME>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software")... |
require("dotenv").config();
const express = require("express"),
url = require("url"),
app = express(),
fetch = require("node-fetch"),
port = process.env.PORT || 3000,
API_KEY = process.env.API_KEY;
app.listen(port, () => {
console.log(`lighthouse-stats app listening at PORT ${port}`);
});
app... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
function _interopNamespace(e) {
if (e && e.__esModule) { return e; } else {
var n = {};
if (e) {
... |
// <NAME> <<EMAIL>>
"use strict";
// modules
const assert = require('../assert.js');
const geom = require('../geom.js');
const SketchObject = require('./object.js');
// const { CTRL_START, CTRL_END } = require('./curve.js');
const Transform = require('./transform.js');
const {
Bezier, segmentFrom,
catmullRomStartC... |
/*
Neurons Kit
Copyright (c) 2015 - 2020 <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, ... |
// Define variables for ranking.
let LEVEL_PERCENTS = [0.7, 0.55, 0.4, 0.25, 0.2, 0.15, 0.1, 0.05, 0];
let LEVEL_NAMES = [
"Genius",
"Exceptional",
"Fabulous",
"Superb",
"Very Good",
"Good",
"Okay",
"Novice",
"Beginner",
];
if (hmm()) {
LEVEL_NAMES = [
"!!!",
"You Rock",
"Amazing",
... |
// var field = "X" + prototype.TypeName.toLowerCase() + "." +prototype.Fields[j].toLowerCase() + "%:" + prototype.TypeName.split(".")[1] + "_" + prototype.Fields[j].substring(2).toLowerCase()
/**
* That structure contain the information about a search.
*/
var SearchInfo = function () {
this.TYPENAME = "SearchInfo... |
/**
* @preserve ble-ftp.js - JavaScript Library for BLE-FTP Example
* @author <NAME>, 2021.
* @version 2.0
* @license Apache2
*/
// @ts-check
"use strict";
// Load dependencies
import util from './util.js';
const BLE_DEFAULT_BYTE_LEN = 20;
/**
* Extract bytes from an integer value and stuff into an array.
* ... |
(function($){
$.mlp = {x:0,y:0}; // Mouse Last Position
function documentHandler(){
var $current = this === document ? $(this) : $(this).contents();
$current.mousemove(function(e){jQuery.mlp = {x:e.pageX,y:e.pageY}});
$current.find("iframe").load(documentHandler);
}
$(d... |
import React, { PureComponent, Fragment } from "react";
import { connect } from "dva";
import { Link, routerRedux } from "dva/router";
import {
Card,
Form,
List,
Input,
Modal,
Button,
Tabs,
Radio,
Select,
Tag,
Spin,
Alert
} from "antd";
import PageHeaderLayout from "../../layouts/PageHeaderLayou... |
var editPOITimeout;
function createEditPOITimeout(){
if(editPOITimeout != null) clearTimeout(editPOITimeout);
editPOITimeout = setTimeout(function(){
updateValues();
savePOI(poi, game);
clearTimeout(editPOITimeout);
editPOITimeout = null;
}, 2000);
}
var editScreenTimeout;
f... |
$(function() {
fanoSpec.init(); //первым делом проставим классы для слепой версии
// Функция для определения максимального значения в массиве
Array.max = function( array ){
return Math.max.apply( Math, array );
};
/**
* Разделение выпадающего меню на колонки
*/
var navigationCo... |
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
Dimensions,
Platform,
LayoutAnimation,
UIManager,
RefreshControl,
FlatList,
ImageBackground
} from 'react-native';
import HeaderImageScrollView, { TriggeringView } from 're... |
import {
parseISO,
add,
sub,
differenceInMinutes,
differenceInSeconds,
} from 'date-fns'
import { format, toDate, zonedTimeToUtc, utcToZonedTime } from 'date-fns-tz'
/* CONSTANTS */
const DATE = 'yyyy-MM-dd'
const HUMAN_DATE = 'MMM d, yyyy'
const DATETIME = 'yyyy-MM-dd h:mma'
const TIME = 'h:mma'
export co... |
var syncFrom;
var wait;
var occasionally;
var reconnect;
var getLatestOp;
var waitForAllMembers;
var reconfig;
var safeReconfigShouldFail;
var awaitOpTime;
var waitUntilAllNodesCaughtUp;
var waitForState;
var reInitiateWithoutThrowingOnAbortedMember;
var awaitRSClientHosts;
var getLastOpTime;
var getFirstOplogEntry;
va... |
/*
* Document : login.js
* Author : pixelcave
* Description: Custom javascript code used in Login page
*/
var _noteMatrix = {};
// Array temporal
var _analityc = { data:[] };
var _auditedIds = [];
var CharacterData = function(id) {
return {
init: function() {
$(... |
import { React, useContext } from 'react';
// import PropTypes from 'prop-types';
// import ReactJson from 'react-json-view';
// import { Paper, Button } from '@material-ui/core';
import {
RepositoryContext,
FileContext,
} from 'gitea-react-toolkit';
import * as books from '../core';
import doBasicTextChecks fr... |
//点击关注
function ajaxCancelFollow(fuid,callcack){
$.message.show({
text: '确定要取消对用户名的关注吗?',
showShadow: true,
onConfirm: function () {
$.ajax({
type: 'POST',
dataType: 'json',
url: '/user-follow-fans/cancel-follow',
da... |
import * as utils from 'base/utils';
import Promise from 'base/promise';
import Class from 'base/class';
import Reader from 'base/reader';
var Data = Class.extend({
init: function() {
this._collection = {};
this._collectionPromises = {};// stores promises, making sure we don't do one calulation twice
},
... |
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict';
var MessageManager = {
init: function mm_init() {
// Init Pending DB. Once it will be loaded will render threads
PendingMsgManager.init(function()... |
import React, { Component, Fragment } from 'react';
import { connect } from 'dva';
import { Form, Button, Modal, Input, DatePicker, Spin, Tabs, Collapse, Select } from 'antd';
import router from 'umi/router';
import moment from 'moment';
import { formatMessage } from 'umi-plugin-react/locale';
import SelectForm from '@... |
/*
* Search
*/
import getConfig from './../utils/getConfig';
import ranker from './../utils/ranker';
import request from './../utils/request';
import prop from './../utils/toolbelt/prop';
import {Log, LogError} from './../services/log';
import Module from './../utils/module';
import {addEvent, addListener, redirectEve... |
var TIMEOUT_FAILOVER_API = 120000; // 2 minuts (in ms)
var TIMEOUT_MULTI_API = 120000; // 2 minuts (in ms)
var TIMEOUT_OTHER = 120000; // 2 minuts (in ms)
//Inlude a .url param in every jqXHR object -- http://stackoverflow.com/a/11980396
$.ajaxSetup({
beforeSend: function(jqXHR, settings) {
jqXHR.url = settings.... |
/*
* Copyright (c) 2019 <NAME>, <NAME>
*
* 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,
* modify, merge, p... |
/*
BUILD INFO:
Folder: src/js
Target: WebUI/script.js
Files: 11
*/
///LoadEvent.js
const LoadEvent = {
__handlers:[],
addHandler:function(handler, priority = 10){
if(typeof handler != "function")
return console.warn(new Error("LoadEvent.addHandler accepts only the function"));
LoadEvent.__handlers.pus... |
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";
var $protobuf = require("../../minimal");
// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
// Export... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.