text stringlengths 5.97k 41.2k |
|---|
/*
Tutorial read for example :
https://github.com/d3/d3/wiki/Gallery
https://bl.ocks.org/mbostock/4063423
JSON for Europe Map from : https://github.com/nstehr/NHL-Lockout-Map (I suppressed Russia from the geo data)
*/
// Define var for selected filter with default value
var selected_gender = "Total"
va... |
'use babel'
import pathUtils from 'path'
import crypto from 'crypto'
import fs from 'fs'
import readline from 'readline'
import common from './common'
import fsPromise from './fsPromise'
const ADD_FAVORITE_COMMAND_KEY='favorites:add-to-favorites'
const ADD_FAVORITE_FOLDER_COMMAND_KEY='favorites:add-folder-to-favorites'... |
const isArray = require('../type/is-array');
const rectPath = require('./rect-path');
const pathTocurve = require('./path2curve');
const base3 = function(t, p1, p2, p3, p4) {
const t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4;
const t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;
return t * t2 - 3 * p1 + 3 * p2;
};
const b... |
import * as THREE from "./three.js/three.module.js"
const attribs = ["position","uv"
,"in_Color", "in_FaceColor", "in_Modulous"
,"normal", "in_Pow", "in_flat_color", "in_use_texture", "in_decal_texture"
];
const attrib_bytes = [4,4,1,1,1,4,4,1,1,1]
const attrib_sizes = [3,2,4,4,2,3,1,1,1,1]
const attrib_normal... |
var addTrainingButton = document.getElementById("show-loc");
addTrainingButton.addEventListener('click',function(){
if(document.getElementById('edit-loc').style.display == "none"){
document.getElementById('edit-loc').style.display = "block"
} else {
document.getElementById('edit-loc').style.dis... |
import jQuery from 'jquery';
import saveAs from 'file-saver';
import nacl from 'tweetnacl';
import Mustache from 'mustache';
import common from './common';
import send from './send';
import start from './start';
import state from './state';
import data from './data';
import api from './api';
const MAX_CARETAKERS = 1... |
// Sliding Puzzle - Major Project
// <NAME>
// October 27th, 2020
//
//
// SOURCES
// 1. CSS Fade-in Effect on hover
// - https://www.w3schools.com/css/tryit.asp?filename=trycss_buttons_fade
//
// 2. Explanations for Tile Game Solvability
// - https://www.geeksforgeeks.org/check-instance-15-puzzle-solvable/
// - http... |
/**
* Copyright 2019-2020 bluefox <<EMAIL>>
*
* MIT License
*
**/
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '... |
if (process.env.NEWRELIC)
require('newrelic');
var _ = require('lodash');
var http = require('http');
var express = require('express');
var cookieParser = require('cookie-parser');
var compress = require('compression');
var connectAssets = require('connect-assets');
var sessions = require('client-sessions');
var body... |
//Made by <NAME> in 2021!
//One of the first video games was tictactoe on a mainframe machine. I don't have one of those though, so this will be through discord instead
var {deleteMsg} = require('../slashCommandTools'),
messages = {
joined:' joined as ',
moved: ' placed piece in slot ',
notice:'*Note* -... |
/*
* This file is part of the "Agave react UI" package
*
* Copyright (c) 2016 <NAME> <<EMAIL>>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* */
import React from 'react';
import ReactDOM from 'react-dom'
import { deepClone } from... |
$(document).ready(function() {
$('[data-toggle="tooltip"]').tooltip({
placement: "bottom"
});
var inview = new Waypoint.Inview({
element: $(".event-of-week")[0],
enter: function (direction, e) {
console.log(this.element);
if (!$(this.element).hasClass('slideInLeft')) {
console.log("Hello")... |
import React from 'react';
import {connect} from 'react-redux';
import { Stage, Layer } from 'react-konva';
import {last, mean} from 'lodash';
import ControlsPanel, {
ShapeControlsWrapper,
FunctionalControlsWrapper,
SaveShapeForm,
SelectControlsContainer,
} from './controls-panel/control-components';
i... |
var b = {
url: "popup.htm",
homePageUrl: "https://github.com/wildone/chrome-refresh-monkey",
homePageText: 'Github',
app: {
manifest: null,
manifestFileName: 'manifest.json',
isNewVersion: false,
getJson: function (fileName) {
var json = undefined;... |
// save as UTF-8
var telify_country_data = [
["", "", "", ""],
["+1", "USA", "us,mil,gov,edu,ca", "1"],
["+1340", "U.S. Virgin Islands", "vi", "1"],
["+1670", "Northern Mariana Islands", "mp", "1"],
["+1671", "Guam", "gu", "1"],
["+1684", "American Samoa", "as", "1"],
["+1787", "Puerto Rico", "pr", "1"],
["+19... |
if (crT) {
var s = document.getElementById("theme-switch");
"light" == crT ? addClass(s, "fa-moon") : addClass(s, "fa-sun")
} else addClass(document.getElementById("theme-switch"), "fa-moon");
var db, wordlist = [],
cur_index = 0,
match_id = "",
endpoint = "https://dictionary.ml/.netlify/functions/function",
requ... |
import G6 from '@antv/g6';
import AntVUtil from '@antv/util';
let showNodes = [];
let showEdges = [];
let curShowNodes = [];
let curShowEdges = [];
let nodes = [];
let edges = [];
let nodeMap = new Map();
let edgesMap = new Map();
let curShowNodesMap = new Map();
let highlighting = false;
let currentFocus;
const width... |
'use strict'
var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault')
exports.__esModule = true
exports.getEventNodeFromPoint = getEventNodeFromPoint
exports.isEvent = isEvent
exports.objectsCollide = objectsCollide
exports.getBoundsForNode = getBoundsForNode
exports.default = void 0
var ... |
const gulp = require('gulp');
const $ = require('gulp-load-plugins')();
const browserSync = require('browser-sync');
const cachebust = require('gulp-cache-bust');
const cleanCSS = require('gulp-clean-css');
const concat = require('gulp-concat');
const cp = require('child_proce... |
var VM;
function updateSankey(nodes,links,vm)
{
var svg, tooltip, biHiSankey, path, defs, colorScale, highlightColorScale, isTransitioning;
var OPACITY = {
NODE_DEFAULT: 0.9,
NODE_FADED: 0.1,
NODE_HIGHLIGHT: 0.8,
LINK_DEFAULT: 0.6,
LINK_FADED: 0.05,
LINK_HIGHLIGHT: 0.9
},
TYPES = [],
TY... |
angular.module('queryfilter',[]).filter("getqueryresults",function() { // register new filter
return function(item,result) { // filter arguments
return item;
// implementation
};
});
var app=angular.module('homeUserApp',['ui.bootstrap','rzModule','queryfilter','ngRoute','ngAnimate']);
var I... |
import _toConsumableArray from 'babel-runtime/helpers/toConsumableArray';
/* eslint react/no-multi-comp:0, no-console:0, no-alert: 0 */
import BaseMixin from '../../_util/BaseMixin';
import '../assets/index.less';
import '../../vc-dialog/assets/index.less';
import Dialog from '../../vc-dialog';
import TreeSelect, { Tre... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const connectionStore = new WeakMap();
const ITERATION_KEY = Symbol('iteration key');
function storeObservable(obj) {
// this will be used to save (obj.key -> reaction) connections later
connectionStore.set(obj, new Map());
}
... |
'use strict';
/**
* Used for dealing with long poll notifications from discourse.
* @module messageBus
* @author Accalia
* @license MIT
*/
var async = require('async'),
conf = require('./configuration').configuration,
discourse = require('./discourse');
/**
* Completion callback for a message handler
*... |
"use strict";
const fs = require("fs");
const glob = require("glob");
const path = require("path");
const sass = require("node-sass");
const vueDocs = require("vue-docgen-api");
const pathTemplateFile = path.resolve(__dirname, "component-docs-template.md");
const pathTargetMdsRoot = path.resolve(__dirname, "..", "doc... |
import { simpleXyCoordinates } from './simplernaplot.js'
import { ProteinGraph, RNAGraph, moleculesToJson } from './rnagraph.js'
import { NAView } from './naview/naview.js'
import { rnaUtilities, ColorScheme } from 'rnautils'
import '../styles/rnaplot.css'
function isNormalInteger (str) {
// http://stackoverflow.co... |
import React from 'react';
import PropTypes from 'prop-types';
import { createSelector } from 'reselect';
import warning from 'warning';
import ZoomButtons from './ZoomButtons'
import DebugView from './StateDebugView';
import { snapToTarget, negate, constrain, getPinchLength, getPinchMidpoint, getRelativePosition, se... |
import { ProjectAutoComplete, TagAutoComplete } from './lib/autocomplete';
/* eslint-disable-next-line import/no-webpack-loader-syntax */
import togglButtonSVG from '!!raw-loader!./icons/toggl-button.svg';
const browser = require('webextension-polyfill');
let projectAutocomplete; let tagAutocomplete;
window.$ = (s, e... |
var mySVG;
export function findIntersect(probe,path,polygon1,polygon2,svg)
{
mySVG = svg;
//============elem1======================
circle2Polygon(probe,polygon1)
var shape1=probe.nodeName
path2Polygon(path,polygon2)
if(true)
... |
import React, { useEffect, useState } from 'react';
import mammoth from 'mammoth'
import _ from 'lodash'
import { nanoid } from 'nanoid'
import { Upload, Button, Form, Input, Card, Switch, Divider, Col, Row, Select, message, Alert } from 'antd';
import { InboxOutlined, FolderOutlined } from '@ant-design/icons';
const {... |
import React from 'react'
import PropTypes from 'prop-types'
//
import "./Footer.scss";
const Footer = props => {
return (
<div className="footer">
<div className="container-fluid">
<svg className="footer__image" viewBox="0 0 1200 160" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusa... |
//declaring variables I will use in my form
let fullCost = 0;
let trueSubmt = false;
let validPay = false;
let correctCard = false;
let correctCvv = false;
const checkbox1 = $(".activities input[name='all']")
const checkbox2 = $(".activities input[name='js-frameworks']")
const checkbox3 = $(".activities input[name='js-... |
import log from "loglevelnext";
import ndarray from "ndarray";
import { BitArray } from "../../bitArray.js";
import { datasetToBlob } from "../../datasetToBlob.js";
import { DicomMessage } from "../../DicomMessage.js";
import { DicomMetaDictionary } from "../../DicomMetaDictionary.js";
import { Normalizer } from "../..... |
let modeName = {
waiting : 0,
drawing : 1,
erasering: 2,
stamping : 3,
stediting: 4,
texting : 5,
txediting: 6
};
let penColor = {
deepred : 1,
red : 2,
salmonpink : 3,
hotpink : 4,
pink : 5,
purple : 6,
blue : 7,
deepblue : 8,
lightblue : 9,
vividb... |
/*
Copyright 2011-2013 SourceGear, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwar... |
let numero_de_caixas = -1
let dadosDisciplina = {
nome: '',
fta: true,
a1: false,
a2: false
}
let statusDados = {
aFazer: [],
fazendo: [],
quaseFeito: [],
feito: []
}
let notas = {
inputs: [],
valores: [],
notasFinal: []
}
const input_dificuldades = []
const inputs = docu... |
import Vue from 'vue';
const isServer = Vue.prototype.$isServer;
// 判断参数是否是其中之一
export function oneOf (value, validList) {
for (let i = 0; i < validList.length; i++) {
if (value === validList[i]) {
return true;
}
}
return false;
}
export function camelcaseToHyphen (str) {
return str.replace(/([a-... |
/**
* @fileOverview
* @author <NAME>
* @version
* Created on 16/7/4.
*/
import React, {Component} from 'react'
import {
AppRegistry,
StyleSheet,
Text,
View,
ListView,
Navigator,
StatusBar,
TouchableHighlight,
TouchableOpacity,
NativeAppEventEmitter,
} from 'react-native'
i... |
'use strict'
import React from 'react'
import {
StyleSheet,
Text,
View,
Image,
FlatList,
TouchableHighlight,
TouchableOpacity,
Clipboard,
AlertIOS,
Alert,
Platform
} from 'react-native'
import styleUtil from '../../common/styleUtil'
import LoadingMore from "../../components/load/LoadingMore";
import config ... |
var config = Alloy.createWidget('smartChat', 'config').module;
var helper = Alloy.createWidget('smartChat', 'helper').module;
var data = Alloy.createWidget('smartChat', 'data').module;
var moment = require('alloy/moment');
var dataInstance = data.getInstance();
/***
* @class: Chat UI Builder Class
* @extends: Helper... |
const defaultTypes = require('./configs/defaultTypes');
const types = require('./configs/types');
const templates = require('./configs/templates');
module.exports = (baseProvider, options, app) => {
const {
tab,
commentIfDeactivated,
checkAllKeysDeactivated,
divideIntoActivatedAndDeactivated,
hasType,
wra... |
// function Tree(data, { // data is either tabular (array of objects) or hierarchy (nested objects)
// path, // as an alternative to id and parentId, returns an array identifier, imputing internal nodes
// id = Array.isArray(data) ? d => d.id : null, // if tabular data, given a d in data, returns a unique identifie... |
const dao = require("../dao/dao");
var petService = require("../service/petService");
exports.dog = async function(request,reply){
var user = request.auth.credentials;
// await petService.addAllDogs(request);
// if (user.petUnlocked != 1) {
// reply({"message":"查询失败,宠物未解锁!","statusCode":108,"st... |
// A RestWrite encapsulates everything we need to run an operation
// that writes to the database.
// This could be either a "create" or an "update".
var deepcopy = require('deepcopy');
var rack = require('hat').rack();
var Auth = require('./Auth');
var cache = require('./cache');
var Config = require('./Config');
va... |
export const getPrediction = ({ hash, data }) => {
const getBaseDeviceName = devices => {
// ex: find Android 10 in [Android 10, Android 10 Blah Blah]
return devices.find(a => devices.filter(b => b.includes(a)).length == devices.length)
}
let systems = [], devices = [], gpus = []
const decrypted = Object.keys(d... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactDom = _interopRequireDefault(require("react-dom"));
var _moment = _interopRequireDefault(require("moment"));
var _propTypes = _interopRequireDe... |
var w = window,
d = document,
e = d.documentElement,
g = d.getElementsByTagName('body')[0],
outerWidth = (w.innerWidth || e.clientWidth || g.clientWidth) - 30,
outerHeight = (w.innerHeight|| e.clientHeight|| g.clientHeight) - 250;
var margin = { top: 20, right: 20, bottom: 50, left: 50 },
width... |
var markers = [];
var marker;
var map;
var markers_index;
var directionsDisplay;
var directionsService;
//fix date time picker
var datetimepickerOptions = {
lang: 'cs',
format: 'Y-m-d H:i:s',
step: 30,
minTime: '8:30',
maxTime: '17:30',
minDate: '+1970/01/02', //tomorrow
maxDate: '+1970/05... |
import * as _ from 'lodash';
import {I18n} from '../langs/I18n';
const categories = [
{
name: 'Books',
title: I18n.t('config.categories.Books'),
short: I18n.t('config.categories.Books'),
image: require('../assets/images/categories/Books.jpg'),
subs: [
'Arts & Photography',
'Biographi... |
const { exec } = require('child_process');
const fs = require('fs');
const async = require('async');
const uuid = require('uuid');
// silence threashold in seconds
// const SILENECE_THREASHOLD = 1;
// slide duration threashold in seconds
const SLIDE_THREASHOLD = 10;
const LANG_DELIMITERS = {
'en': '.',
'hi': '।... |
#!/usr/bin/env nodejs
'use strict';
const url = 'https://controlequadropessoal.educacao.mg.gov.br/divulgacao';
const baseDados = 'crawler.db3';
let tokenKey = '';
let tokenFields = '';
const browserHeaders = {
'Host': 'controlequadropessoal.educacao.mg.gov.br',
'Connection': 'keep-alive',
'Cache-Control':... |
import React, {Component, Fragment} from 'react';
import {Link} from 'react-router-dom';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {replace, isEmpty} from 'lodash';
import {
Row,
Col,
FormGroup,
Button,
ButtonDropdown,
DropdownToggle,
DropdownMenu,
D... |
import * as d3 from 'd3';
var d3Tip = require('d3-tip');
var _ = require('lodash');
export default function () {
var vm = this; // Hard binded to chart
var Helper = {
chart: {
config: vm._config,
width: vm._width,
height: vm._height,
style: vm._addStyle,
fullSvg: function () {
... |
let divParamDate = document.getElementById('paramDate');
let ColorUnused = document.getElementById('paramColorUnused').innerText;
let ColorNone = document.getElementById('paramColorNone').innerText;
let floatingCirclesGMain = document.getElementById('floatingCirclesGMain');
let btnBack = document.getElementById('arro... |
/* UI Parameters *******************************************************************/
const PARAMS = {
ENABLE_MSEC_SET_URL: false, // enables setting image display time in the url like so: '?msecImg=1000'
NUM_MSEC_CROSS: 750, // how long the fixation cross is shown for
NUM_MSEC_IMAGE: 2000, // num milliseconds ... |
import ConversionConstants from '../constants/ConversionConstants';
import CommonUtil from './CommonUtil';
const { Initial, Glide, Nucleus, Coda, Tone, ToneCategory, Format } = ConversionConstants;
const InitialMarks = [
'B', 'P', 'PH', 'M', 'MH', 'MB', 'F', 'V',
'D', 'T', 'TH', 'N', 'NH', 'ND', 'L', 'LH', 'S', '... |
require('./bootstrap');
if(!window.jQuery)
{
var script = document.createElement('script');
script.type = "text/javascript";
script.src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(script);
}
window.Vue = require('vue');
// i... |
'use strict';
Array.prototype.remove = function(val) {
var index = this.indexOf(val);
if (index > -1)
this.splice(index, 1);
};
Array.prototype.removeAt = function(index) {
if (index > -1)
this.splice(index, 1);
};
// init
var updateXY,invXY;
// 轴
var PointsHelper = {
canvas: null,
len: 0,
s... |
import React, { Component } from 'react';
import { Link, withRouter } from "react-router-dom";
import {Post} from '../../elements/post';
import PropTypes from "prop-types";
import { connect } from 'react-redux';
import FollowerScreen from './followerscreen';
import {Image} from 'cloudinary-react';
import { remove... |
var columnTypes = [
{ name: 'string', value: 'String' },
{ name: 'int', value: 'Integer' },
{ name: 'float', value: 'Float' },
{ name: 'date', value: 'Date' },
{ name: 'link', value: 'URL link' },
{ name: 'email', value: 'E-mail link' },
{ name: 'image', value: 'Image' }
];
var filterTypes = [
{ name: 'none', ... |
// path of keys across your keyboard so that hopefully all adjacent keys appear next to each other at least once in the string
var regChars = "1234567890)(*&^%$#@!1!2@3#4$5%6^7&8*9(0)-_[p-0o9i8u7y6t5r4e3w21qawsedrftgyhujikolp;['/?;.l,kmjnhbgvfcdxszax cv bn ,; ";
var strangeChars = "☺☻♥♦♣♠•◘○♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟... |
import {
IdsElement,
customElement,
scss,
mix,
attributes
} from '../../core';
// Import Mixins
import {
IdsDirtyTrackerMixin,
IdsEventsMixin,
IdsKeyboardMixin,
IdsPopupOpenEventsMixin,
IdsThemeMixin,
IdsValidationMixin,
IdsLocaleMixin,
IdsTooltipMixin
} from '../../mixins';
// Import Utils
... |
var gauges = [];
function initialize(){
//You can edit the number below to change the fuel level
createGauge("fuel", "", 0);
}
function createGauge(name, label, level, min, max){
var config = {
size: 50,
label: "",
min: undefined != min ? min : 0,
max: undefined != max ? max : 100,
level: level,
m... |
// Global variables;
var total_points = 2000;
var factor = 0.001, infowindow, geocoder, token, bounds, dx, dy, map, xMin = xMax = yMin = yMax = 0, markers = [], sidebar_html = '', minZoom, zoomLevel;
// Calculating position
function calculatePosition(){
// Calculate the current position of the map (bounds)
boun... |
const path = require('path');
const fs = require('fs');
const Module = require('module').Module;
const originalRequire = Module._extensions['.js'];
Module.globalPaths.push(path.resolve(require('electron').remote.app.getAppPath(), 'node_modules'));
const EDPlugin = require('./plugin');
const css = `#bd-settingspane-con... |
/* --- VARIAVEIS GLOBAIS --- */
// Arrays
var arrayUsers = [];
var arrayProjects = [];
var arrayComments = [];
// Variaveis
var ip;
var activeUser;
var userExiste = false;
var defaultProjects;
/* --- CONSTRUTORES --- */
// Objeto para os utilizadores
function User(nome, numero, email, password, escola, curso, ip) {
... |
const RADIO_IMG = {
radio_off: "https://i.imgur.com/y78IqPC.jpg",
radio_on: "https://i.imgur.com/92UbtR8.jpg",
radio_volume_0: "https://i.imgur.com/J5cWBuC.png",
radio_volume_1: "https://i.imgur.com/xYqxYY7.png",
radio_volume_2: "https://i.imgur.com/UsImwCC.png",
radio_volume_3: "https://i.imgur.com/F82lIOV... |
// Global variables go here.
var matrix; //main svg
var matrix_data; //holds data to render matrix read from csv
var topicno;
var x,xAxis;
var y,yAxis;
var dimensions = {
w_width: 1500,
w_height: 1500,
margin: {
top: 80,
right: 80,
bottom: 80,
left: 180
},
width: fun... |
// FMG helper functions
"use strict";
// add boundary points to pseudo-clip voronoi cells
function getBoundaryPoints(width, height, spacing) {
const offset = rn(-1 * spacing);
const bSpacing = spacing * 2;
const w = width - offset * 2;
const h = height - offset * 2;
const numberX = Math.ceil(w / bSpacing) - ... |
var infoURL = "http://o2r.info/badges/";
var apiURL = "https://o2r.uni-muenster.de/api/1.0/badge/";
var page = null;
var sp = null;
chrome.storage.sync.get(['badgerEndpoint'], function(items) {
if (typeof items.badgerEndpoint !== 'undefined') {
apiURL = items.badgerEndpoint;
//add trailing slash
... |
import PropTypes from 'prop-types';
import * as React from 'react';
import { useEffect } from 'react';
import fa12tokensale from '../../../json_files/fa12-latest.json';
import fa2tokensale from '../../../json_files/fa2-latest.json';
// material-ui
import {
Box,
Grid,
OutlinedInput,
Typography,
Inp... |
"use strict";
/*global require*/
var defineProperties = require('../../third_party/cesium/Source/Core/defineProperties');
var getElement = require('../../third_party/cesium/Source/Widgets/getElement');
var knockout = require('../../third_party/cesium/Source/ThirdParty/knockout');
var knockoutES5 = require('../../thi... |
// file: blclass.js by littleflute
var s = '<a target="_blank" href="https://github.com/littleflute/ted1/edit/master/docs/61/plx.js">plx.js_v0.1. 25 * </a> ';
s += ' - <a target="_blank" href="https://littleflute.github.io/ted1/docs/61/plx.js">plx.js(online)</a>';
s += ' - <a target="_blank" href="plx.js">plx.js</a... |
'use strict';
var Light = require('osg/Light');
var Notify = require('osg/notify');
var CompilerFragment = {
_createFragmentShader: function() {
// Call to specialised inhenrited shader Compiler
var roots = this.createFragmentShaderGraph();
var fname = this.getFragmentShaderName();
... |
function showQR() {
$("#QRcode").css("display", "block");
$('#QRcode').closest('.swiper-slide').addClass('swiper-no-swiping');
}
$("#hideQR").click(function(e) {
$("#QRcode").css("display", "none");
$('#QRcode').closest('.swiper-slide').removeClass('swiper-no-swiping');
});
/* ==========================... |
"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... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.VirtualizedTBody = VirtualizedTBody;
exports.TreeGrid = TreeGrid;
var _react = _interopRequireDefault(require("react"));
var Newtype = _interopRequireWildcard(require("newtype-ts"));
var _reactVirtualized = require("react-virtual... |
const PERSONS = "PERSONS";
const FAMILIES = "FAMILIES";
const MALE = "MALE";
const FEMALE = "FEMALE";
const TURNS = 12; // year 900 x 12 months
const ADULT = 168; // 14 years x 12 months
const START = 900; // year 900
class Session {
constructor() {
this.turn = 0;
this.family = null;... |
// For the Graphic Object for the background
var bg;
// For the Canvas ref
var canvas;
// Graphics object for the obstacles
var obs;
// The size of the canvas
var canvasSize;
// Size of the grid in term of cells
var gridSize;
// Size of the cells in term of pixels
var cellSize;
// The grid structure
var grid;
// Bool... |
var globalStartTime = Date.now();
var resource = {
earth : [],
mars : [],
moon : [],
settle : [],
otherPlanet : []
}
//earth와 관련된 모든 리소스를 담고, 순서대로 출력
for(var i =0; i < 17; i++){
resource.earth[i] = new Image();
resource.earth[i].src = "/images/planet/blue/"+(i+1)+".png";
}
for(var i = 0; i < 18; i++){... |
/* eslint-disable no-restricted-syntax */
/* eslint-disable max-len */
const { createClient } = require('stanza');
const crypto = require('crypto');
const Base = require('./Base');
const Endpoints = require('../../resources/Endpoints');
const FriendMessage = require('../structs/FriendMessage');
const FriendPresence = r... |
const canvas = document.getElementById("game");
const ctx = canvas.getContext("2d");
const bground = new Image();
bground.src = "res/background3.png";
const food2 = new Image();
food2.src = "res/food2.png";
const food1 = new Image();
food1.src = "res/food1.png";
const w0 = new Image();
w0.src = "res/w0.png";
const w... |
'use strict';
/*
公共函数:经常会使用到的函数,大家都可以调用
*/
/*
randomNum(min, max):
说明:返回min到max之间的一个随机数
参数一:最小值
参数二:最大值
*/
function randomNum(min, max) {
//返回min到max之间是随机数
//最新小:Math.random()+min 0-1之间 0-0.99999
//最大的:Math.random()*max+1
return parseInt(Math.random() * (max - min + 1)) + min;
}
//--------------... |
const conf = require('ocore/conf.js');
const lightWallet = require('ocore/light_wallet.js');
const myWitnesses = require('ocore/my_witnesses.js');
const async = require('async');
const mutex = require('ocore/mutex.js');
const network = require('ocore/network.js');
const db = require('ocore/db.js');
const social_network... |
var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame;
if (!requestAnimationFrame) requestAnimationFrame = cb => setTimeout(cb, 60);
const getNeighbors = (x, y, width, height, isCycled) => {
var levs1 = [], levs2 = []
if (x === 0) {
if (y === 0) {
levs1.push([0, 1]);
... |
/**
* @interface
*/
var IRenderTarget = function () {
};
IRenderTarget.prototype.bind = function () {
};
IRenderTarget.prototype.unbind = function () {
};
IRenderTarget.prototype.getWidth = function () {
};
IRenderTarget.prototype.getHeight = function () {
};
IRenderTarget.prototype.getScale = function () {
};
IRende... |
import React, { Component } from 'react';
import validator from 'validator';
import { connect } from 'react-redux';
import * as actions from '../../../../../Actions';
import Server from '../../../../../API/Server';
import Interest from './Interest';
/* helper */
import LazyImage from '../../../../ThirdParty-Library/La... |
var token = '<KEY>'; //Тестовый токен
var api_server = 'http://t6m.ru/api/v1.1/'; // сервер API
var msg_start = 'Введите данные о работе сотрудников (см. Примеры заполнения)'; // строка инфо начало
var msg_default = 'Введите данные о работе сотрудников '; // строка инфо по умолчанию
var txt_default = "И... |
import React, { PureComponent } from 'react';
import { Card, Button, Form, Icon, Col, Row, Radio, Input, Select, Popover, Switch, Cascader } from 'antd';
import { connect } from 'dva';
import PageHeaderLayout from '../../../layouts/PageHeaderLayout';
import FooterToolbar from '../../../components/FooterToolbar';
import... |
/**
* @class Loader
* @param {string|array|Loader} target
* load target
* @param {object} arg
* Object with any of the following optional parameters for customizing the load routine.
* @property {string} name
* @property {boolean} prioritize
* @property {boolean} cacheBuster
* @property {object} scope
* @pr... |
import React, { useEffect, useRef, useState } from 'react'
import { useHistory, useLocation } from 'react-router-dom'
import {ReactComponent as Pencil} from '../../../resources/assets/pencil-fill.svg'
import {ReactComponent as Play} from '../../../resources/assets/play-circle.svg'
import {ReactComponent as Tags} from '... |
import * as React from "react";
import {
View,
Animated,
TextInput as NativeTextInput,
StyleSheet,
Text,
I18nManager,
} from "react-native";
import { withTheme } from "../core/theming";
import {
COMPONENT_TYPES,
FORM_TYPES,
FIELD_NAME,
TEXT_INPUT_PROPS,
} from "../core/component-types";
import Icon... |
/**
* Websocket Client for NodeJS
* - websocket version: 13
* - subprotocol: jsonRWS
*/
const http = require('http');
const urlNode = require('url');
const crypto = require('crypto');
const { EventEmitter } = require('events');
const package_json = require('../package.json');
const { raw, jsonRWS, websocket13, help... |
// Author: Yum (Razz#3533)
const ChatCommandProcessor = new NativeClass('Terraria.Chat', 'ChatCommandProcessor');
const Main = new NativeClass('Terraria', 'Main');
const Player = new NativeClass('Terraria', 'Player');
const Vector2 = new NativeClass('Microsoft.Xna.Framework', 'Vector2');
const NPC = new NativeClass('T... |
import L from 'leaflet';
import './canvasMarkers.css';
import RBush from 'rbush';
import loadImage from 'image-promise';
import {wrapLatLngToTarget} from '~/lib/leaflet.fixes/fixWorldCopyJump';
/*
Marker definition:
{
latlng: L.Latlng,
icon: {url: string, center: [x, y]} or function(marker) returning icon,
label:... |
var npSize = [ "Small", "Small", "Medium", "Medium", "Medium", "Large" ];
var npFeatures = [ "horns on head", "fangs or tusks", "oversized, pointed ears", "solid-colored eyes", "animal eyes", "a furry or hairless body", "spinal ridges", "feathered skin", "a non-prehensile tail", "scaled skin", "clawed hands", "an amorp... |
let data = {
option: {
0: {
a: 'Chléb#1.mp4',
b: 'Cereálie#cereal/1.mp4'
}
},
bread: {
0: { //videa 2.1 až 2.3
a: 'Vezmu nejdřív prkénko.#2.1.mp4',
b: 'Položím chléb na linku.#2.2.mp4'
},
1: { //videa 2.1-1 až 2.1-4
... |
/**
* Create by capricorncd
* 2018/5/16 0016.
* https://github.com/capricorncd
*/
import '../style/image-preview.styl'
import util from './util'
import dom from './dom'
import ic from './img-controls'
import keyboard from './keyboard'
import broadcast from './broadcast'
import {
mouseWheel,
filterOptions,
fmt... |
/**
* 互动活动
*/
"use strict";
var moment = require('moment');
var mongoose = require('mongoose');
var async = require('async');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;
var ActivitiesSchema = mongoose.Schema({
wechat: { type: ObjectId, index: true, ref: "Wechat" }, //使用的微信号
type: { type: Strin... |
// const fs = require('fs');
const path = require('path');
const Util = require('../core/util.js');
const conf = require('./blame-conf.js');
const getCommitDays = function(commitDays) {
const dates = Object.keys(commitDays);
const min = dates.length;
if (min < 2) {
return 1;
}
dates.sort();... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.