text stringlengths 3.07k 16k |
|---|
/**
* 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, software
* distribute... |
#!/usr/bin/env nodejs
/**
* This code is licensed under the MIT License
*
* Copyright (c) 2019 Aion Foundation https://aion.network/
*
* 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 w... |
var io = require('socket.io')(2333);
var i_map1 = 0;
var i_map2 = 0;
var i_map3 = 0;
var member_1 = 0;
var member_2 = 0;
var member_3 = 0;
var list_enemy1 = new Array();
var list_enemy2 = new Array();
var list_enemy3 = new Array();
console.log('running');
io.on('connection', function (socket) {
var i... |
const mongoose = require('mongoose');
class Core {
// -------------------------
// We take a list of models in param and if necessary
// apply populate on it to render correctly
// -------------------------
static render(list, options = {}) {
const isAlone = !Array.isArray(list);
// ... |
var mysql = require("mysql");
var inquirer = require("inquirer");
var connection = mysql.createConnection({
host: "localhost",
port: 3306,
user: "root",
password: "<PASSWORD>",
database: "staff_DB"
});
connection.connect(function (err) {
if (err) throw err;
runSearch();
});
//Runs the pro... |
$(document).ready(function() {
var websocket,
pendingConnection = false,
openedWebsocket,
dateTimeInterval,
websocketTimeoutId,
websocketReconnectMsecs = 30000,
eventListeners = [];
var initWebsocket = function() {
try {
websocket = new WebSoc... |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { ipcRenderer, clipboard } from 'electron'
import autobind from 'autobind-decorator'
import Codemirror from 'react-codemirror'
import toMarkdown from 'to-markdown'
import marked from 'marked'
import MarkdownHelper from './MarkdownHelper'... |
import { crimeTypes } from "config";
const estatisticasFiltersConfig = {
month: {
groupingFunction: crime => {
const date = new Date(crime.date);
return date.getMonth();
},
arraySize: 12
},
week: {
groupingFunction: crime => {
const day = crime.date.split('-')[2];
return p... |
var fs = require('fs');
var childProcess = require('child_process');
var yargs = require('yargs');
var webpack = require('webpack');
var dotenv = require('dotenv');
var Est = require('less-plugin-est');
var pkg = require('./package.json');
var argv = yargs.argv;
var __page__ = argv.__page__;
var mode = argv.mode;
... |
'use strict';
/**
* Module dependencies.
*/
var Address = require('../models/Address');
var Status = require('../models/Status');
var async = require('async');
var common = require('./common');
var util = require('util');
var Rpc = require('../../lib/Rpc');
var tDb = require('../../lib/TransactionDb').default();
v... |
"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 React, {Component} from 'react'
import {View, ScrollView, Text, StyleSheet, Image, TouchableOpacity, FlatList, ActivityIndicator, Share} from 'react-native'
import {Header, Left, Button, Body, Title, Icon} from 'native-base'
import System from '../../config/system'
import axios from 'axios'
import {backendUrl} f... |
import React, { Component } from "react";
import "./App.css";
import { Sats } from "./util/Sats";
import * as d3 from "d3";
import data from "./datos/datos.csv";
import ClaseOrbita from "./ClaseOrbita";
import Usos from "./Usos";
import PaisOperador from "./PaisOperador";
import Contador from "./Contador";
import Rese... |
var breweryNameEl = document.querySelector("#brew-name");
var brewImageEl = document.querySelector(".brew-img");
var breweryInfoEl = document.querySelector(".info");
var breweryFavBtn = document.querySelector("#favorite");
var mapEl = document.querySelector("#map");
var imagesArray = ["../Images/beer-barrels.jpg","../I... |
import { find, findAll, click, currentURL, settled, waitFor } from '@ember/test-helpers';
import { warn } from '@ember/debug';
import { camelize } from '@ember/string';
import yadda from '../../helpers/yadda';
import { expect } from 'chai';
import visitPage from '../../helpers/visit-page';
import getPageObject from '..... |
global_height = 600;
// Counts occurences of each element in an array
function count_occurences(data_array) {
occurences = [];
$.each(data_array, function(i, item) {
var count = $.grep(data_array, function(elem) {
return elem == item;
}).length;
if (item == "") {
... |
function orderKeys(obj) {
var keys = Object.keys(obj).sort(function keyOrder(k1, k2) {
if (k1 < k2) return -1;
else if (k1 > k2) return +1;
else return 0;
});
var i, after = {};
for (i = 0; i < keys.length; i++) {
after[keys[i]] = obj[keys[i]];
delete obj[keys[i]];
}
for (i = 0;... |
import {
types,
getParent,
resolveIdentifier,
detach,
getSnapshot,
} from 'mobx-state-tree';
import Column from './column';
import Item from './item';
const Context = types
.model('Context')
.props({
index: types.identifierNumber,
options: types.frozen(),
rawColumns: types.optional(types.arra... |
/* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. */
"use strict";
//Подключаем необходимые модули
const Os = require("os");
const _this = {
/*-------------------------------*/
OUTPUT_START: '[Starting]',
OUTPUT_END: '[Done]',
OUTPUT_INFO: '[Info]',
OUTPUT_ERROR: '[Error... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Container } from 'semantic-ui-react';
import { actions, selectors } from '../../redux/modules/search';
import { selectors as settingsSelectors } from... |
import React, {Component} from 'react'
import {translate} from 'react-i18next'
import {Avatar, Button, Col, Collapse, Form, Input, Row, Select, Tooltip, Tabs} from 'antd'
import 'ag-grid/dist/styles/ag-grid.css'
import 'ag-grid/dist/styles/ag-theme-balham.css'
import _ from 'lodash'
import update from 'immutability-hel... |
var _ = require('underscore');
var util = require('util');
var fs = require('fs');
var path = require('path');
/* ***************** CLOSURE ************* */
function Line2point(p1, p2) {
this._p1 = p1;
this._p2 = p2;
}
function Rect(from_pt, to_pt) {
this._p1 = from_pt;
this._p2 = to_pt;
}
Rect.prot... |
"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... |
function snackbar() {
//alert("kk");
const x = document.getElementById("snackbar");
x.className = "show";
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
}
$(document).ready(function(){
$('#test1').hide();
});
$(document).on('change','#gstin',function(){
//alert("kk");
$('... |
const { Client, Intents } = require('discord.js'); // Load Discord JS modules
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.DIRECT_MESSAGES], partials: ["CHANNEL"] }); // Connect to Discord
const { SlashCommandBuilder } = require('@discordjs/builders');
const c... |
var Lights;
import {
AmbientLight,
DirectionalLight,
DirectionalLightHelper,
SpotLight,
SpotLightHelper,
Object3D,
HemisphereLight
} from 'three';
Lights = class Lights {
constructor(main) {
this.main = main;
this.klass = this.constructor.name;
this.opts = this.main.opts.lights;
this.c... |
import React from 'react'
import ScaleLoader from 'react-spinners/ScaleLoader'
import CandidatesContext from 'components/Ask/CandidatesContext'
import client from 'utils/client'
import style from './Candidates.styl'
const IconFacebook = <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24... |
// use jquery to get from id to the type number w/ a value of the last place of the id by stripping away "hour-"
// traverse dom to the element testarea associated w/ its id
// use moment to get the current hour
// if hour of the day is less than
// combine selecting dom traversal
// or grab div w/ id and grab second ... |
import { h, Component } from 'preact';
let hasEventListener = false;
// Constants
const EMPTY = {};
const ROUTERS = [];
// Regex's
const isDynamicRoute = new RegExp(/:|\*|(\([A-z:*]+\))/);
const optionalSectionRegex = new RegExp(/^\([A-z:*]+\)$/);
const removeOptionalRegex = new RegExp(/(^\()|(\)$)/g);
const paramRe... |
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Font styles
*/
var FontStyles;
(function (FontStyles) {
FontStyles.Normal = "Normal";
FontStyles.Bold = "Bold";
FontStyles.Italic = "Italic";
FontStyles.BoldItalic = "BoldItalic";
})(FontStyles = exports.FontStyles || (exports.FontSt... |
/* eslint-env browser, commonjs */
/* global React, ReactDOM */
/* --eslint-disable no-debugger, no-console */
// Slomux - реализация Flux, в которой, как следует из нвазвания, что-то сломано.
// Нужно выяснить что здесь сломано
/** __extends ** {{{
*/
var __extends = (this && this.__extends) || (function () {
var... |
var path = require('path');
var unwrap = require('unwrap');
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt, {
pattern: ['grunt-*', '!grunt-template-jasmine-istanbul']
});
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
ver... |
import path from "path";
import {createWriteStream, mkdir} from "fs";
import fetch from "electron-fetch";
import {URL} from "url";
import xlsx from "node-xlsx";
const validators = require("./../../validation.json");
// var data1 = require('./../../data.json');
let initialItemsLength;
let processedItemsCount;
let inc... |
import React, { Component } from 'react';
import fwb from './fwb'
import DlgInfo from './dlg-info'
import Round from "./round"
import Timer from "./timer"
import Card from './card'
import './App.css';
import PlayerCard from './player-card';
import ChooseSkill from './chooseskill';
import CardDialog from './dlg-card';
i... |
import React from 'react';
import {
Container,
Row,
Col,
Popover,
OverlayTrigger,
Accordion,
Card,
Button,
ButtonGroup,
} from 'react-bootstrap'
import { Blurhash } from 'react-blurhash';
import { HuePicker } from 'react-color';
import '../resources/css/bootstrap.min.css'
impo... |
/**
* @fileoverview Tests for missing-err rule.
* @author <NAME>
* @copyright 2014 <NAME>. All rights reserved.
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
var ru... |
"use strict";
/**
* @license
* Copyright 2017 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless... |
/* global algoliasearch */
import instantsearch from "instantsearch.js";
import {
searchBox,
pagination,
currentRefinements,
refinementList,
hits,
infiniteHits,
stats,
sortBy,
hierarchicalMenu,
menu,
numericMenu,
rangeInput,
rangeSlider,
ratingMenu,
toggleRefinement,
hitsPerPage,
clear... |
var querystring = require('querystring');
function tinyget(options, callback) {
options = options || {};
if( typeof options === 'string' ) options = { url:options };
var events = (function() {
var listeners = {};
function fire(type, detail) {
(listeners[type] || []).forEach(function(listen... |
$(function() {
"use strict";
// ==============================================================
// Product Sales
// ==============================================================
new Chartist.Bar('.ct-chart-product', {
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
... |
const DomainResource = require('./DomainResource');
const DateTimeScalar = require('./scalars/DateTime.scalar');
class AllergyIntolerance extends DomainResource {
constructor(opt) {
super(opt);
this.__resourceType = 'AllergyIntolerance';
Object.assign(this, opt);
}
// This is a AllergyIntolerance resource
s... |
import React from "react";
import {
CCard,
CCardBody,
CCardHeader,
CCol,
CRow,
} from '@coreui/react'
import '../../../src/style.css';
import TAABEDAR_SERVICE from "src/services/service";
import { useHistory } from 'react-router-dom';
const Pendings = () => {
let history = useHistory();
const re... |
//
//Copyright (c) 2015, <NAME>, 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:
//
// * Redistributions of source code must retain the above copyright notice,
// this list o... |
import React from 'react'
import PropTypes from 'prop-types'
import Share from '../share'
import {
convertSplitRowsToRecords,
definitePluraliseList,
formatRoundPercentage,
toSentence
} from '../../utilities'
import NHS_STAFF_SPLIT from '../../data/map/output/nhs_staff.json'
const NHS_STAFF = convertSplitRows... |
"use strict";
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(a... |
//Requires
const modulename = 'DiscordBot';
const Discord = require('discord.js');
//FIXME: remove when updating to djs12, as well as this from the package.json
const Collection = require('@discordjs/collection');
const { dir, log, logOk, logWarn, logError } = require('../../extras/console')(modulename);
//NOTE: fi... |
const EventEmitter = require('events')
const {Readable, Writable} = require('stream')
module.exports =
function createWrapper (DatArchive) {
class Hyperdrive extends EventEmitter {
constructor (storage, key, opts) {
super()
if (!(this instanceof Hyperdrive)) return new Hyperdrive(storage, key, opts)... |
'use strict';
var expect = require('chai').expect;
var _ = require('underscore');
var colCache = require('../../../lib/utils/col-cache');
describe('colCache', function() {
it('caches values', function() {
expect(colCache.l2n('A')).to.equal(1);
expect(colCache._l2n.A).to.equal(1);
expect(colCache._n2l[... |
/**
*
* Roles
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import actions from './actions';
import injectSaga from 'utils/injectSaga';
import injectReducer from 'utils/injectReducer';
import reducer from './reducer';
import saga from './saga';
import {
selectAllRoles,
selectSelectedRole,... |
"use strict";
const path = require("path");
const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
const CaseSensitivePathsPlugin = require("case-sensitive-paths-webpack-plugin");
const InterpolateHtmlPlugin = r... |
/**
* Copyright 2017 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
import { on } from '@ember/object/evented';
import { next, debounce } from '@ember/runloop';
import Component from '@ember/component';
import { get, set, observer } from '@ember/object'
import Upload from 'shared/mixins/upload';
import layout from './template';
import $ from 'jquery';
function applyLinesIntoArray(line... |
/**
* @copyright BBC 2018
* @author BBC Children's D+E
* @license Apache-2.0
*/
import { createCell } from "./cell.js";
import * as a11y from "../../accessibility/accessibility-layer.js";
import { getMetrics } from "../../scaler.js";
const defaults = {
rows: 1,
columns: 1,
ease: "Cubic.easeInOut",
duration: 50... |
#!/usr/bin/env node
const program = require('commander')
const Web3 = require('web3')
const dragoEventfulAbi = require('./dragoEventful-v2.json')
let request = require('request')
const pino = require('pino')
const Web3WsProvider = require('./reconnectingWsProvider')
const moment = require('moment')
const logger = pin... |
const Store = require('electron-store');
const electron = require('electron');
const os = require('os');
const log = require('@jitsi/logger');
const { SIZE, ASPECT_RATIO, STORAGE } = require('../constants');
/**
* Stores the current size of the AOT during the conference
* @type {{width: number, height: number}}
*/
... |
const _ = require('lodash')
const fs = require('fs')
const resolve = require('resolve-dir')
// generic experimentId matcher. index 2: experimentId, 3 or 4: experimentName
const expIdRegex = /(\-e\s+)?(([a-zA-Z0-9_]+)\-\d{4}_\d{2}_\d{2}_\d{6}|([a-zA-Z0-9_]+))/
const historyPath = './config/history.json'
const finishMs... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Famous Industries Inc.
*
* 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... |
import { STORE_BLOB, STORE_CONTENT, snapshotify } from '../prelude/common.js';
import { log, wasReported } from './log.js';
import assert from 'assert';
import { fabricateTwice } from './fabricator.js';
import fs from 'fs';
import intoStream from 'into-stream';
import multistream from 'multistream';
import streamMeter ... |
/**
* Copyright 2021 <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 writing, soft... |
/*
* creates json object with current year of days
* if file already exists, it extends it (alternative to create file for each year)
*
*/
const fs = require('fs');
const c = require('calendar')
// leap year check function
function leapYear(year)
{
return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400... |
/**
* Copyright 2014, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
'use strict';
var Action = require('./Action');
var DEFAULT = 'default';
var debug = require('debug')('Dispatchr:DispatcherContext');
/**
* @class Dispatcher
* @param {Object} contex... |
'use strict';
// Polyfill matches as per https://github.com/jonathantneal/closest
Element.prototype.matches = Element.prototype.matches ||
Element.prototype.mozMatchesSelector ||
Element.prototype.msMatchesSelector ||
Element.prototype.oMatchesSelector ||
Element.prototype.webkitMatchesSele... |
import PropTypes from 'prop-types';
import React from 'react';
import { reduxForm, formValueSelector } from 'redux-form';
import { connect } from 'react-redux';
import { FormattedMessage, FormattedHTMLMessage, injectIntl } from 'react-intl';
import { Grid, Row, Col } from 'react-flexbox-grid/lib';
import AppButton from... |
'use strict'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Modal } from 'react-bootstrap'
import { bindActionCreators } from 'redux'
import {
descriptionParser,
addLangPrefix as Prefixed } from '../../utilities/parser'
import {
selectGistTag,
selectGist,
fetchSingleG... |
import { Attribute, ChangeDetectorRef, ComponentFactoryResolver, Directive, ElementRef, EventEmitter, Input, Optional, Output, ViewContainerRef } from '@angular/core';
import { ActivatedRoute, ChildrenOutletContexts, PRIMARY_OUTLET, Router } from '@angular/router';
import { StackController } from './router-controller';... |
import r from 'restructure';
import brotli from 'brotli/decompress';
import TTFFont from './TTFFont';
import TTFGlyph, { Point } from './glyph/TTFGlyph';
import WOFF2Glyph from './glyph/WOFF2Glyph';
import WOFF2Directory from './tables/WOFF2Directory';
/**
* Subclass of TTFFont that represents a TTF/OTF font compress... |
// functions to facilitate legend creation for a d3 plot
import { set } from 'd3-collection';
import memoize from 'fast-memoize';
import {createSelector, createStructuredSelector} from 'reselect';
import {CIRCLE_RADIUS, layoutSelector} from './layout';
import { defineLineMarker, defineTextOnlyMarker, defineRectangleMa... |
/********************************************************
Copyright 2016 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-... |
/* eslint-disable react-hooks/rules-of-hooks */
import React, { Fragment, useMemo, useState } from 'react';
import styled from 'styled-components';
import Fuse from 'fuse.js';
import { Link, useLocation } from 'react-router-dom';
import { useMarkdownPage, useMarkdownTree } from 'react-static-plugin-md-pages';
import... |
/* Copyright Contributors to the Open Cluster Management project */
import { VALIDATE_CIDR, VALIDATE_NUMERIC, VALIDATE_BASE_DNS_NAME_REQUIRED } from 'temptifly'
import { listClusterImageSets } from '../../../../../resources/cluster-image-set'
import { unpackProviderConnection } from '../../../../../resources/provider-... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import swal from 'sweetalert2';
import pick from 'lodash.pick';
import mousetrap from 'mousetrap';
import warning from 'warning';
import outsideTargetHandlerFactory from './utils/outsideTargetHandlerFactory';
const ALLOWS_KEYS = [
'title',... |
import { Cubism2ModelSettings } from '@/cubism2/Cubism2ModelSettings';
import { Cubism4ModelSettings } from '@/cubism4/Cubism4ModelSettings';
import { TEST_MODEL, TEST_MODEL4 } from '../env';
import xor from 'lodash/xor';
import cloneDeep from 'lodash/cloneDeep';
const basicCubism2SettingsJSON = {
url: 'foo/bar',
... |
#!/usr/bin/env node
// var gladstone = require('./gladstone.js');
// var argv = require('yargs').argv;
//
// gladstone.createBagDirectory(argv)
var crypto = require('crypto');
var path = require('path');
var recursive = require('recursive-readdir');
var ncp = require('ncp').ncp;
var fs = require('fs');
var strings =... |
import * as React from "react"
import { useState } from "react"
import PropTypes from "prop-types"
import { Link } from "gatsby"
import styled from "styled-components"
import { StaticImage } from "gatsby-plugin-image"
// React icons
import { FaInstagram } from "react-icons/fa"
import { FaRegEnvelope } from "react-icon... |
import { Vue } from '../../../vue'
import { EVENT_NAME_HEAD_CLICKED } from '../../../constants/events'
import { CODE_ENTER, CODE_SPACE } from '../../../constants/key-codes'
import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../../constants/props'
import { SLOT_NAME_THEAD_TOP } from '../../../constants/... |
/* */
"format cjs";
import warning from 'warning'
import { REPLACE } from 'history/lib/Actions'
import useQueries from 'history/lib/useQueries'
import computeChangedRoutes from './computeChangedRoutes'
import { runEnterHooks, runLeaveHooks } from './TransitionUtils'
import { default as _isActive } from './isActive'
im... |
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { enableSmoothScroll } from '../../../../content/scripts/custom/utilities';
import { drawSemiCircleChart } from '../../../../content/scripts/custom/echarts/generators';
import { renderChartToTarget } from '..... |
"use strict";
/* Copyright Contributors to the Open Cluster Management project */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o... |
import { frameworks, url, initSurvey, getSurveyResult, getQuestionValue, getQuestionJson } from "../settings";
import { Selector } from "testcafe";
const assert = require("assert");
const title = `paneldynamic`;
const json = {
pages: [
{
name: "page1",
elements: [
{
type: "paneldyna... |
let canvas = document.getElementById("c");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
let app = PicoGL.createApp(canvas)
.clearColor(1.0, 1.0, 1.0, 1.0)
.depthTest();
let vsSource = document.getElementById("vs").textContent;
let fsSource = document.getElementById("fs").text... |
const style = getComputedStyle(document.documentElement);
const badColor = style.getPropertyValue('--danger');
const naturalColor = style.getPropertyValue('--secondary');
function escapeUnicode(str) {
// Thanks to https://stackoverflow.com/a/45315988
const json = JSON.stringify(str);
return json.replace(/[\u007F... |
var user = JSON.parse($("meta[name='user']").attr('content'));
var clan = JSON.parse($("meta[name='clan']").attr('content'));
function get_server(id) {
if(id > 3000000000){return "kr";}
if(id > 2000000000){return "asia";}
if(id > 1000000000){return "com";}
if(id > 500000000){return "eu";}
return "ru";
}
var serv... |
function Game() {
this.canvas = document.getElementById("canvas");
this.painter = this.canvas.getContext("2d");
this.isStarted = false;
this.playerScore = 0;
this.isPaused = false;
this.isComplete = false;
this.debugMode = true;
this.enemy = new Enemy();
this.pressedkey;
this.player = new ... |
'use strict';
const core = require('@actions/core');
const { GitHub, context } = require('@actions/github');
const superagent = require('superagent');
core.debug(`PR Duplicator - Context ${JSON.stringify(context, null, 2)}`);
const envOwner = context.repo.owner;
const envRepo = context.repo.repo;
const eventPayload... |
var page = 1;
$(function () {
//分页
if(document.getElementById("laypage")){
laypage({
cont: 'laypage',
pages: Math.ceil($("#count").val()/10),
curr: $("#thisPage").val(),
skin: '#ff8d00',
jump: function (obj,first) {
if(!first){
submitSearch... |
import React, { useState, useEffect, useRef } from "react";
import styled from "styled-components";
import DailyFrame from "@daily-co/daily-js";
import { useFirebaseApp } from "reactfire";
import Firebase from "firebase";
import store from "store";
import axios from "axios";
import "typeface-fredoka-one";
import "fonts... |
/**
* 百度地图JS封装
*/
var marker;
var map = new BMap.Map("baiduMap");
map.enableScrollWheelZoom(); //启用滚轮放大缩小,默认禁用
map.enableContinuousZoom(true); //启用地图惯性拖拽,默认禁用
map.addControl(new BMap.NavigationControl()); //添加默认缩放平移控件
map.addControl(new BMap.OverviewMapControl()); //添加默认缩略地图控件
map.addControl(new BMap.Overview... |
import React, { useState , useEffect} from 'react';
import { RefreshControl, Alert} from 'react-native';
import { Text} from 'components';
import { PricingCard, colors } from 'react-native-elements';
import { Container, View, Header, Item, Button,} from 'native-base';
import { connect, useDispatch, useSelector } from ... |
import React, { Component, Fragment } from 'react';
import ReactDOM from 'react-dom';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import PageTitle from '../../components/includes/PageTitle';
import { fetchUserData, fetchUpdateUserStatus, editUser } from '../../services/User';
impo... |
const inquirer = require("inquirer");
const { exec, execSync } = require("child_process");
const { cwd } = require("process");
const PKG_JSON_PATH = `${cwd()}/package.json`;
// 拿到版本信息, 以 antd-mini 为基准
function getVersion(depName = "antd-mini") {
return new Promise((resolve, reject) => {
exec(`npm info ${depName... |
import {removeElement} from '#core/dom';
import {Layout_Enum, applyFillContent} from '#core/dom/layout';
import {isEnumValue} from '#core/types';
import {dict} from '#core/types/object';
import {Services} from '#service';
import {getData, listen} from '#utils/event-helper';
import {userAssert} from '#utils/log';
imp... |
import { get } from 'lodash/object'
import getIndexExchangeTag from 'src/providers/indexExchange/getIndexExchangeTag'
import Bidder from 'src/utils/Bidder'
import BidResponse from 'src/utils/BidResponse'
import getGoogleTag from 'src/google/getGoogleTag'
import logger from 'src/utils/logger'
const indexExchangeBidderN... |
// Variables
var cityLat = 0;
var cityLon = 0;
var cityName = '';
var countryCode = '';
var tempInK = 0;
var humidity = 0;
var windSpeed = 0;
var uvIndex = 0;
var iconName = '';
var iconURL= 'https://openweathermap.org/img/wn/';
var weatherIcon = '';
var weatherInfoRequestPrefix = 'https://api.openweathe... |
function resolveCondition(condition, data) {
const conditionParts = condition.split(' ');
var invert = conditionParts[0] === 'not';
var property = conditionParts.length > 1 ? conditionParts[1] : conditionParts[0];
return invert ^ data[property];
}
function renderTemplateString(string, data) {
// Clean contents
l... |
import React, { Fragment, useState, useCallback } from "react";
import PropTypes from "prop-types";
import {useDropzone} from 'react-dropzone'
import {
Typography,
IconButton,
List,
ListItem,
ListItemText,
ListItemSecondaryAction,
Switch,
Box,
withStyles,
TextField,
Grid,
} from "@material-ui/core... |
"use strict";
var __createBinding = (this && this.__createBinding) ||
(Object.create
? (function (o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, {
enumerable: true,
get: function () {
return m[k];
},
});
})
: (function (o, m, k... |
var cdb = require('cartodb.js-v3');
cdb.admin = require('cdb.admin');
var _ = require('underscore-cdb-v3');
var ImportTwitter = require('../../../../../../../../../javascripts/cartodb/common/dialogs/create/listing/imports/twitter_import/import_twitter_view');
describe('common/dialogs/create/imports/twitter_import/imp... |
import { Component, EventEmitter, HostBinding, Input, ChangeDetectorRef, ViewChild, ViewContainerRef, ElementRef } from '@angular/core';
import { AnimationBuilder } from '@angular/animations';
import { take } from 'rxjs/operators/take';
import { fadeAnimation, fadeCloseAnimation, slideAnimation, slideCloseAnimation } f... |
import uniqid from 'uniqid';
// Based on websocket interface: https://github.com/CESARBR/knot-cloud-websocket#methods
class Client {
constructor(token, amqp, api) {
this.amqp = amqp;
this.api = api;
this.headers = { Authorization: token };
this.userKey = uniqid();
this.consumers = [];
}
asyn... |
import React from "react";
import SellingPointsIcons from "./SellingPointsIcons.js";
import cubes2png from "../assets/img/icons/cubes-2.png";
import judges from "../assets/img/icons/judgesIcon.svg";
import cubes2webp from "../assets/img/icons/cubes-2.webp";
import mentors from "../assets/img/icons/mentorsIcon.svg";
im... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.