text stringlengths 3.07k 16k |
|---|
/*
* Copyright (C) 2012 <NAME>. This code is from the book
* Core HTML5 Canvas, published by Prentice-Hall in 2012.
*
* License:
*
* 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 wit... |
"use strict";
/* eslint max-statements:[2, 30]*/
/**
* Argv command flags.
*/
const path = require("path");
const _ = require("lodash");
const nopt = require("nopt");
const chalk = require("chalk");
const pkg = require("../package.json");
// Generic flags:
const FLAG_TRIES = {
desc: "Number of times to attempt a... |
'use strict';
var ItemMap = {
bounds: null,
map: null
};
var Grid = {
table: null
};
var map;
ItemMap.init = function (selector, center, zoom, usr, pwd) {
var map_options = {
zoom: zoom,
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
this.map = new google.maps.Map($(selector)[0]... |
//@ts-check
"use strict"
const { distance, add } = require('@node-sc2/core/utils/geometry/point');
const { frontOfGrid } = require('@node-sc2/core/utils/map/region');
const { Alliance, Race } = require('@node-sc2/core/constants/enums');
const { UnitType } = require('@node-sc2/core/constants');
const { flyingTypesMappi... |
/**
* # Logic type implementation of the game stages
* Copyright(c) 2015 <NAME> <<EMAIL>>
* MIT Licensed
*
* http://www.nodegame.org
* ---
*/
"use strict";
var J = require('JSUS').JSUS;
var ngc = require('nodegame-client');
var stepRules = ngc.stepRules;
var constants = ngc.constants;
var counter = 0;
var bot... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LinearSystem = void 0;
const coefficients_1 = require("../coefficients");
const equation_1 = require("./equation");
const polynom_1 = require("./polynom");
const random_1 = require("../random");
class LinearSystem {
_solutions;
... |
import React, { Component } from 'react'
import { connect } from "react-redux";
import throttle from "lodash.throttle";
import HeaderOptions from './HeaderOptions';
import Pushable from './Pushable';
import DotsPicker from './DotsPicker';
import CatPicker from './CatPicker';
import ReactGA from 'react-ga';
import '.... |
const tough = require('tough-cookie');
const contentType = require('content-type');
const querystring = require('querystring');
const encodingUtil = require('./encoding-util');
const { parseHttpVersion } = require('./parser');
const BASE64_PATTERN = /^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/
funct... |
import React, { useEffect, useReducer, memo } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { get, size } from 'lodash';
import pluginId from '../../pluginId';
import { useEditView } from '../../contexts/EditView';
import { Button, EmptyGroup, P, ResetGroup } f... |
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
const serialport = require('serialport')
var THREE = require('three');
var Stats = require('./node_modules/three/examples/js/libs/stats.min.js');
v... |
// Minicar BLE communicating protocol:
// steerer(1byte) + angle(2byte) + driver(1byte) + speed(2byte) + others(2byte)
// steerer:
// front: f >>> 0x66
// left : l >>> 0x6c
// right: r >>> 0x72
// driver:
// coast(park): c >>> 0x63
// brake(park): b >>> 0x62
// forward : f >>> 0x66
// ... |
$(document).ready(function () {
});
function check_cnt(type, obj){
var strLen = obj.value.length;
if(type == "code"){
$("#tmeplete_code_cnt").html(strLen + "/30자");
if(strLen > 30) {
$("#tmeplete_code_cnt").css("color", "red");
} else{
$("#tmeplete_cod... |
// SPDX-License-Identifier: Apache-2.0
// Licensed to the Ed-Fi Alliance under one or more agreements.
// The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
// See the LICENSE and NOTICES files in the project root for more information.
/* eslint no-param-reassign: ["error", { "props": ... |
"use strict"
//
// Bar-chart
//
const d3 = require('d3');
var chart = {
data: {},
axis: {
x: {},
y: {},
},
};
chart.tooltip = function() {
var mx = chart.xScale.invert(d3.mouse(this)[0]);
var my = chart.yScale.invert(d3.mouse(this)[1]);
$('#point').html(() => {
var p... |
import React, { useEffect, useState } from "react";
import {
Button,
Modal,
ModalHeader,
ModalBody,
ModalFooter,
Input,
FormGroup,
Badge,
} from "reactstrap";
import "./style.css";
import { handleFireBaseUpload, CreateNewDoc, fetchData } from "../Api/Api";
import _ from "lodash";
import { GrClose, GrChe... |
"use strict"
const path = require("path")
const electron = require("electron")
const remote = require("@electron/remote")
const common = require("./lib/common")
const contentBlocking = require("./lib/contentBlocking/contentBlockingRenderer")
const documentRendering = require("./lib/documentRendering")
const file = r... |
import { clamp_host, data_view, UTF8_DECODER, utf8_encode, UTF8_ENCODED_LEN, Slab, PROMISES, with_current_promise } from './intrinsics.js';
export class Exports {
constructor() {
this._resource0_slab = new Slab();
}
addToImports(imports) {
if (!("canonical_abi" in imports)) imports["canonical_abi"] = {};
... |
const { expect } = require('chai');
const sinon = require('sinon');
const fs = require('fs');
const path = require('path');
const nodeFetch = require('node-fetch');
const pc = require('../../../src/server/external-services/pathway-commons');
const { biopaxText2ElementMap, extractBiopaxMetadata } = require('../../../sr... |
/**
* Created by yue on 2/13/17.
*/
import React from 'react';
import {List, ListItem, NestedList} from 'material-ui/List';
import FontIcon from 'material-ui/FontIcon';
const styles = {
codeSnippet: {
fontFamily: "Fira Mono",
fontSize: 14
},
}
class Lines extends React.Component{
constr... |
/* eslint-disable import/no-cycle */
/**
* @author 4Decoder
* @property {ObjectId} id Subject ObjectId primaryKey
* @property {String} name Subject name (required)
* @property {String} code Subject code (required)
* @property {ObjectId} hod Subject hod
* @property {String} description Subject description (optiona... |
/**
* The Meadow Security Authorizor Collection
*
* Provide a set of security authorizers, and give the API consumer the ability to add to or modify them.
*
* @class MeadowAuthorizers
* @constructor
*/
var libUnderscore = require('underscore');
var libAsync = require('async');
var MeadowAuthorizers = function()
{
fun... |
//setCookie('sid', getParam('sid'));
var questionIndex = 0;//当前测评题
var questions,//测评题
choiceList;//测评题答案
var createTime = getCurrentTime();//获取当前时间
var testIId;
var isOnce;
if (!needUserInfo) {
var needUserInfo = null;
}
doubleClick();
var vueData;
//区分扫码还是app打开的本页面。1:扫码;0:app,缺省是0
$.ajax({
url: '/public/t... |
'use strict';
const MongoClient = require('mongodb').MongoClient;
const ObjectID = require('mongodb').ObjectID;
const crypto = require('crypto');
module.exports = class DatabaseObject {
constructor({hostname, port, database, accounts = 'accounts', students = 'students', courses = 'courses', rooms = 'rooms', sessi... |
//Module Init
const { MessageEmbed, MessageAttachment, Client, Collection } = require('discord.js');
const fs = require('fs');
const ms = require('ms');
const moment = require('moment');
//Ayar Init
const settings = require('./ayarlar.json');
const mongoose = require('mongoose')
mongoose.connect(settings.mongoose.mon... |
// tasks:
// no number overflow/underflow
// no duplicate keys in maps
// number literals to numbers
// unicode escape sequences to chars
// characters to chars
// escapes to chars
// join up string literal
// object/array at top level
// implementation:
// similar to the logging monad
"use s... |
/**
* @providesModule WeFit.Components.Reusables.ConfirmableRequest
*/
import React from 'react';
import PropTypes from 'prop-types';
import {
Animated, BackHandler, Image, ScrollView, StatusBar, StyleSheet, View,
} from 'react-native';
import { DeviceUtils } from '@onaclover/react-native-utils';
import _ from 'lo... |
'use strict';
const { Hashmap, leftJoin, uniqueChar } = require('./index');
const { Node, Tree } = require('../Trees/tree');
describe('Hash Map', () => {
test('should create a hash map with pre defined size', () => {
const hashMap = new Hashmap(5000);
expect(hashMap).toBeDefined();
expect(hashMap.size).t... |
var print = console.log;
var c;
// Node Class
function Node(id, x, y, data, cdata, size, color){
this.id = id;
this.x = x;
this.y = y;
this.data = data;
this.cdata = cdata;
this.size = size;
this.color = color;
}
// Edge Class
function Edge(id, start, end, dir, data, thick, fsize, color){
this.id = id;
this.... |
import { createHash } from "crypto";
const jwt = require("jsonwebtoken");
const { promisify } = require("util");
import userModel from "../model/userModel";
const sendEmail = require("../utils/email");
const signToken = (id) => {
return jwt.sign({ id }, process.env.JWT_SECRET, {
expiresIn: process.env.JWT_EXPIRE... |
/*
Template: COINEX - Crypto Currency HTML Template
Author: iqonicthemes.in
Version: 1.5
Design and Developed by: iqonicthemes.in
*/
/*================================================
[ Table of contents ]
================================================
:: Page loader
:: Back to top
:: search
:: Charts
:: Heade... |
var planes = [];
// Define the models
const airbusPlanes = ["A220", "A318", "A319", "A320", "A321", "A330", "A340", "A350", "A380"];
const boeingPlanes = ["737", "747", "757", "767", "777", "787"];
const embraerPlanes = ["ERJ-175", "ERJ-190", "ERJ-195"];
const bombardierPlanes = ["CRJ-700", "CRJ-900", "LearJet"];
let ... |
'use strict';
var morgan = require('morgan');
var _ = require("underscore");
var fs = require("fs");
var express = require('express'),
bodyParser = require("body-parser"),
app = express(),
http = require('http').Server(app),
io = require('socket.io')(http),
crypto = require("crypto")
;
a... |
import { toDecamelizedJSON } from "highline/utils/immutable_helper"
import { fromJS, OrderedSet } from "immutable"
import { buildUrl, buildHistoryUrl } from "highline/utils/url"
import { camelize } from "humps"
import ActionTypes from "highline/redux/action_types"
import {
camelizeOptionNames,
deduplicateProductP... |
/* External Modules */
const Discord = require("discord.js");
const fs = require("fs");
const path = require("path");
const AntiSpam = require("discord-anti-spam");
const winston = require("winston");
const logger = winston.createLogger({
level: "info",
format: winston.format.json(),
defaultMeta:... |
const Web3 = require('web3');
const { omit } = require('lodash');
const { fundRecipient, getRelayHub } = require('@openzeppelin/gsn-helpers');
const { GSNProvider } = require('../src');
const { abi: GreeterAbi, bytecode: GreeterBytecode } = require('./build/contracts/Greeter.json');
const {
abi: RejectfulGreeterAbi,
... |
// Copyright (c) Microsoft Corporation and others. Licensed under the MIT license.
// SPDX-License-Identifier: MIT
const he = require('he')
const { get, remove, set, first, pullAllWith, isEqual } = require('lodash')
const minimatch = require('minimatch')
const { extractDate } = require('../../lib/utils')
class ScanCo... |
import React, { Component } from 'react';
import styled from 'styled-components'
import Loader from './components/Loader';
import HamburgerIcon from './components/HamburgerIcon';
import NavLink from './components/NavLink';
import NavLogo from './components/NavLogo';
const StyledAppWrapper = styled.div`
background: ... |
import React, {useState} from 'react';
import {View, SectionList, TouchableOpacity, StyleSheet} from 'react-native';
import {List, Portal, Text, withTheme} from 'react-native-paper';
import {observer, Observer} from 'mobx-react-lite';
import Icons from 'react-native-vector-icons/MaterialCommunityIcons';
import GBIcons... |
import React, { Component } from "react";
import { StyleSheet, View, SectionList, TouchableHighlight, Text, Image } from "react-native";
import Screen from "../Screen";
import i18n from "../../module/i18n/i18n";
import theme from "../../util/Theme";
import { observer, Observer } from "mobx-react";
import { observable, ... |
#!/usr/bin/env node
/**
*
* The Bipio API Server
*
* Copyright (c) 2017 InterDigital, 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.apach... |
let $sMessageWarning = '';
let $sMessageWarningHeader = '';
let startDate;
let endDate;
let period;
let MAX = 100;
let recur_t = 0;
$(document).ready(function() {;
initPage();
});
function initPage() {
$sMessageWarning = $("#message_warning");
$sMessageWarningHeader = $("#... |
import React, { Component } from 'react';
import styled from 'styled-components';
import { NavLink } from 'react-router-dom';
import styles from './header.css';
import image from '../utils/logout.png';
import buttonImage from '../utils/hamburger.png';
import closeImage from '../utils/close.png';
const CustomHeader = s... |
import express from 'express';
import { ApiPromise, WsProvider, Keyring } from '@polkadot/api';
import { CodePromise, ContractPromise } from '@polkadot/api-contract';
import { readFileSync, writeFileSync } from 'fs';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { time } from 'console';
import { v4 as... |
// 0x07013AA0 - 0x07013B80
import {
gsDPSetTextureImage, gsDPLoadSync, gsDPLoadBlock, gsSPVertex, gsSP2Triangles,
gsSPEndDisplayList, gsDPPipeSync, gsDPSetCombineMode, gsSPClearGeometryMode, gsDPSetTile,
gsSPTexture, gsDPTileSync, gsDPSetTileSize, gsSPDisplayList, gsSPSetGeometryMode,
G_IM_FMT_IA, G_IM... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va... |
/*!
* lottery v1.0.3
* by blacksnail2015 2015-03-30
*/
/*
* 这里对速度做一下说明:
* 这里的速度其实就是切换样式的间隔时间,也就是setTimeout(functionName, time)中的time值;
* 因此,速度值越小,间隔越短,转的越快。
*/
var defaults = {
selector: '#lottery',
width: 4, // 转盘宽度
height: 4, // 转盘高度
initSpeed: 300, // 初始转动速度
speed: ... |
import React, { Component } from 'react';
import Tour from 'reactour';
import PropTypes from 'prop-types';
import DirectoryColumn from './DirectoryColumn';
import queryString from 'query-string';
import AlertContainer from '../3rd_party/react-alert';
import { PLynxApi } from '../../API';
import cookie from 'react-cooki... |
var fs = require('fs'),
path = require('path'),
mod = require('../../mod.js'),
util = mod.util,
notice = mod.notice,
_conf = mod.conf;
/* 读取配置文件 */
module.exports = function(dirname, callback){
var root = _conf.DocumentRoot+dirname+'/',
mainFile = root + _conf.MainConfigFile,
myFile = root + _conf.ProjConf... |
const mongoose = require('mongoose');
const keys = require('../config/keys');
const routeMethods = require('./util/routeMethods');
const requireLogin = require('../middlewares/requireLogin')
const Person = mongoose.model('person');
const MovieQuote = mongoose.model('movieQuote');
const SNL = mongoose.model('snl');
cons... |
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
/* Layout */
import Layout from '@/views/layout/Layout'
/** note: submenu only apppear when children.length>=1
* detail see https://panjiachen.github.io/vue-element-admin-site/#/router-and-nav?id=sidebar
**/
/**
* hidden: true ... |
const EventEmitter = require('events');
const Utils = require('../../utils');
const ChildProcess = require('./child-process.js');
const {Logger} = Utils;
class Concurrency extends EventEmitter {
constructor(settings = {}, argv = {}) {
super();
this.argv = argv;
this.settings = settings;
this.childPr... |
#! /usr/bin/env node
const fs = require("fs");
const path = require("path");
const { program } = require("commander");
const showdown = require("showdown");
program.version(require("./package.json").version); // Getting the verison of the file
program
.option("-i ,--index", "Single txt file ") // option for adding ... |
/* eslint-disable no-undef */
'use strict'
const puppeteer = require('puppeteer')
/**
*
* @param {options.username} string username
* @param {options.password} string password
* @param {options.loginUrl} string password
* @param {options.args} array[string] string array which allows providing further arguments t... |
/**
.-----------------------------------------------------------------------------.
||Es| |F1 |F2 |F3 |F4 |F5 | |F6 |F7 |F8 |F9 |F10| KINGMAN |
||__| |___|___|___|___|___| |___|___|___|___|___| +962792914245 |
| _____________________________________________ ________ ___________ ... |
const borsh = require('borsh')
const Web3 = require('web3')
const BN = require('bn.js')
const solanaWeb3 = require('@solana/web3.js')
const {
Keypair,
PublicKey,
SystemProgram,
SYSVAR_RENT_PUBKEY,
TransactionInstruction,
Transaction,
sendAndConfirmTransaction
} = solanaWeb3
/// Sender program account seed... |
import Form from 'vform';
const state = {
expenses: new Form({
app_amount: 0,
trans_company_id: '',
application_id: 0,
origin_address: '',
origin_postal_code: '',
origin_locality: '',
origin_ctry_code: '',
origin_port_id: '',
origin_latitude: 0,
origin_longitude: 0,
dest_a... |
class Grade{ //grade class store data per activity
constructor(given, total, weight){
this.Given = given;
this.Total = total;
this.Weight = weight;
}
get getGiven(){
return this.Given;
}
get getTotal(){
return this.Total;
}
get getWeight(){
... |
/*
* Copyright Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" ... |
import React, {Component} from 'react';
import '../shared.css';
import Image2 from '../../images/header.jpg';
import axios from "axios";
import Image from '../../images/default2.jpg';
class Profile extends Component {
state = {
file: null,
alertMessage: "",
redirect: false,
username:'... |
//Global variabes
var canvas;
var ctx;
var particles = new Array();
var particlesCount = 40;
//Classes
function Particle(x, y, xVelocity, yVelocity, radius, fieldRadius) {
this.x = x;
this.y = y;
this.xVelocity = xVelocity;
this.yVelocity = yVelocity;
this.radius = radius;
this.fieldRadius = fieldRadius;
... |
import text from './InfographicPanel.yaml';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Fragment } from 'react';
import {
Panel,
create_text_maker_component,
ShareButton,
WriteToClipboard,
PDFGenerator,
LogInteractionEvents,
} from '../../components/index.js';
impor... |
import React from 'react';
import Modal from 'react-bootstrap/Modal';
import Button from 'react-bootstrap/Button';
import Form from 'react-bootstrap/Form';
import Col from 'react-bootstrap/Col';
import Row from 'react-bootstrap/Row';
import axios, { post } from 'axios';
import PropTypes from "prop-types";
import { conn... |
// Enter url of your cities Open-Data-Portal here
const city_open_data_prefix = 'https://opendata.stadt-muenster.de/dataset/';
// You don't need to change below here
const open_nrw_prefix = 'https://open.nrw/api/3/action/package_show?id=';
const json_url = 'city_data.json';
var city_data = {};
function showMusterdat... |
var _htmlPdf = require('phantom-html-to-pdf')({
phantomPath: require("phantomjs-prebuilt").path
}),
_fs = require('fs'),
_handlebars = require('handlebars'),
_http = require('http'),
_moment = require('moment');
// Modify to configure planner
var args = {
year: 2018,
secondaryColor... |
'use strict';
/**
* Apartado 1
* Realiza los siguientes pasos (muestra por consola el resultado después de aplicar cada uno):
* - Crea un array con 4 elementos
* - Concatena 2 elementos más al final y 2 al principio
* - Elimina las posiciones de la 3 a la 5 (incluida)
* - Inserta 2 elementos más entre el penúlti... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = pages;
var _escapeStringRegexp = _interopRequireDefault(require("escape-string-regexp"));
var _allPages = _interopRequireDefault(require("../utils/allPages"));
function _interopRequireDefault(obj) { return obj && obj... |
const merge = require('./misc').merge
const mkdirp = require('./misc').mkdirp
const TextStream = require('./misc').TextStream
const getPath = require('./misc').getPath
const urlParse = require('url')
const fs = require('fs')
const path = require('path')
const Stream = require('stream').Stream
const https = require('htt... |
const AWS = require('aws-sdk')
const fs = require('fs')
const path = require('path')
const prompt = require('prompt')
const prompts = require('./prompts')
const templatesBucketSuffix = 'data-export-transform-templates'
module.exports.install = async function () {
//add keys
const result = await initialiseConfig()... |
'use strict';
var Alexa = require("alexa-sdk");
var Client = require('node-rest-client').Client;
var constants = require("./constants.js");
var utilities = require("./utilities.js");
var stateHandlers = {
startGoalDogChoice: function(dogsOwnedByUser){
var speech = "Choose which dog to set a goal for.... |
const axios = require("axios");
const { EventType } = require("../../../constants");
const { CONFIG_CATEGORIES, MAPPING_CONFIG, ENDPOINTS } = require("./config");
const {
removeUndefinedAndNullValues,
getFieldValueFromMessage,
defaultPostRequestConfig,
defaultPutRequestConfig,
defaultRequestConfig,
construc... |
var canvas,ctx;
var mouseX,mouseY,mouseDown=0;
var touchX,touchY;
// fucnction for interacting with canvas
function init()
{
canvas = document.getElementById('sketchpad');
//'2d' means two dimensional rendering context on canvas
ctx = canvas.getContext('2d');
//we have context of canvas on ctx
//w... |
"use strict";
// Common Util for frontend and backend
//
// DOT NOT MODIFY util.js!
// Need to run "tsc" to compile if there are any changes.
//
// Backend uses the compiled file util.js
// Frontend uses util.ts
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMonitorRelativeURL = exports.genSe... |
import extend from 'extend';
import nodeBuilder from './axis-node-builder';
import { DEFAULT_CONTINUOUS_SETTINGS, DEFAULT_DISCRETE_SETTINGS } from './axis-default-settings';
import calcRequiredSize from './axis-size-calculator';
import crispify from '../../transposer/crispifier';
import { scaleWithSize } from '../../s... |
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import {
Modal,
LayoutAnimation,
Dimensions,
NativeModules,
} from 'react-native';
import _ from 'lodash';
import { TimingDriver, FadeIn, ZoomOut } from '@shoutem/animation';
import { connectStyle, changeColorAlpha } from '@shout... |
'use strict';
const fs = require('fs-extra');
const handleTilde = require('./handle-tilde');
const path = require('path');
const template = require('lodash.template');
const startCase = require('lodash.startcase');
const execSync = require('child_process').execSync;
const CONFIG = require('../config');
function inst... |
const HttpGet = require('./httpUtils');
// const APKGet = require('./httpApkUrl');
const cheerio = require('cheerio');
var sleep = require('system-sleep');
const {
sum,
getClassId,
getIntorContent
} = require('./utils');
const {
saveIgnore,
checkIgnore
} = require('./saveInore');
const saveApks = require('./s... |
// Setup basic express server
var express = require('express');
var app = express();
var fs = require('fs');
var server = require('http').createServer(app);
var io = require('socket.io')(server);
var port = process.env.PORT || 3000;
var loopLimit = 0;
let writeStream = fs.createWriteStream('metadata.log');
server.li... |
"use strict";
const memoize = require("./memoize");
const DOMParser = require("xmldom").DOMParser;
const XMLSerializer = require("xmldom").XMLSerializer;
const Errors = require("./errors");
const DocUtils = {};
function parser(tag) {
return {
["get"](scope) {
if (tag === ".") {
return scope;
}
return... |
import fetch from 'isomorphic-fetch'
import pMap from 'p-map'
import parser from 'cron-parser'
import { getSubscriptionConfig } from './config.js'
import { updateOrderWithRetry } from './utils/utils.js'
import {
ACTIVE_STATE,
ERROR_STATE,
REMINDER_SENT_STATE,
SEND_REMINDER_STATE,
} from './states-constants.js'
... |
// this is mostly the editor implemented by @SergioBenitez for graydon/rust-www
// plus small modifications to accommodate a "Reset" button
// ECMAScript 6 Backwards compatability
if (typeof String.prototype.startsWith != 'function') {
String.prototype.startsWith = function(str) {
return this.slice(0, str.length... |
import { Link, useParams } from "react-router-dom";
import React, { Fragment, useContext, useEffect, useState } from "react";
import { ClientContext, WindowBaseURLContext } from "./context";
import {
Election,
GetRequest,
ModifyFlags,
ReportRequest,
SetClose,
UpdateRequest,
} from "./pb/rvapi/rvapi_pb";
imp... |
const fs = require('fs');
const zlib = require('zlib');
const path = require('path');
const http = require('http');
const http2 = require('http2');
const log = require('@vladmandic/pilogger');
const nedb = require('nedb-promises');
const middleware = require('./middleware.js');
const logger = require('./logger.js');
co... |
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the... |
import React from 'react'
import { Slide } from '@saitonakamura/presa'
import styled from 'styled-components'
import slideBackImg from '../assets/images/slide-back.png'
import { ItCode, Paper, Caption, Button, ItH4, Divider } from '../blocks'
import { Transition } from 'react-spring'
const Code = ItCode.extend``
cons... |
/*
* Copyright 2017 <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 required by applicable law or agreed ... |
import React, { useReducer, useState } from "react"
import CandidateStatsRow from "../../components/CandidateStatsRow"
import DesktopScoreBar from "../../components/DesktopScoreBar"
import ElectionMap from "../../components/ElectionMap"
import MainLayout from "../../components/MainLayout"
import NationwideSummaryHeader... |
'use strict';
import React, { Component } from 'react'
import {
StyleSheet,
Text,
TextInput,
View,
TouchableHighlight,
ActivityIndicator,
ListView,
Linking,
RefreshControl,
Image
} from 'react-native';
//import moment from 'moment';
import {
getTheme
} from 'react-native-material-kit';
import Ion... |
const semver = require('semver');
const chalk = require('chalk');
const Generator = require('yeoman-generator');
const { join } = require('path');
const { logger } = require('@a8k/common');
const { toArray, createExampleComponent, createMultiExamplePage, createSingleExamplePage } = require('./heper');
// debug.enable... |
const fs = require("fs-extra");
const path = require("path");
const { promisify } = require("util");
const { exec } = require("child_process");
const clearAndUpper = (text) => text.replace(/-/, "").toUpperCase();
const spaceAndUpper = (text) => text.replace(/-/, " ").toUpperCase();
const dashToPascalCase = (text) => t... |
import { h, ref, computed, watch, nextTick, getCurrentInstance, Transition, KeepAlive } from 'vue'
import TouchSwipe from '../../directives/TouchSwipe.js'
import useCache from '../../composables/private/use-cache.js'
import { hSlot } from '../../utils/private/render.js'
import { getNormalizedVNodes } from '../../uti... |
'use strict';
var path = require('path');
var SkitModule = require('./SkitModule');
var loader = require('./loader');
function validateBundleConfiguration(bundles) {
if (!Array.isArray(bundles)) {
throw new Error('Bundles should be an array of bundle configuration objects.');
}
bundles.forEach(function(b... |
var api = require("../../api.js"), app = getApp();
function secondToTimeStr(t) {
if (t < 60) return "00:00:" + ((i = t) < 10 ? "0" + i : i);
if (t < 3600) return "00:" + ((a = parseInt(t / 60)) < 10 ? "0" + a : a) + ":" + ((i = t % 60) < 10 ? "0" + i : i);
if (3600 <= t) {
var a, i, e = parseInt(t ... |
import { join } from 'path'
import { EventEmitter } from 'events'
import { app, shell, screen, BrowserWindow } from 'electron'
import is from 'electron-is'
import pageConfig from '../configs/page'
import logger from '../core/Logger'
import { debounce } from 'lodash'
const defaultBrowserOptions = {
titleBarStyle: 'hi... |
import PropTypes from 'prop-types'
import React from 'react'
import * as dates from '../../utils/dates'
import { getSlotAtX, pointInBox } from '../../utils/selection'
import { findDOMNode } from 'react-dom'
import { eventSegments } from '../../utils/eventLevels'
import Selection, { getBoundsForNode } from '../../Selec... |
/*
MIT License
Copyright (c) 2017
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, publish, distribute, s... |
const q = require('q')
const mongoose = require('mongoose')
const MatchSchema = require('../schema/match.schema')
// const TeamSchema = require('../schema/team.schema')(mongoose)
const Match = mongoose.model('Match', MatchSchema);
// const TeamModel = mongoose.model('Team', TeamSchema);
let api = {
createMatch... |
let url = 'https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/global-temperature.json';
let color = ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"];
let colors = color.reverse();
let months = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
... |
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err;... |
import React, { Component } from 'react';
import { Card } from 'antd';
import axios from '../../axios';
import BaseForm from '../../components/BaseForm';
import './index.less';
const WIDTH = 36;
const HEIGHT = 42;
class BikeMap extends Component{
constructor (props) {
super(props);
this.state = {
tota... |
import * as React from "react";
import * as Strings from "~/common/strings";
import * as Constants from "~/common/constants";
import * as SVG from "~/common/svg";
import { error } from "~/common/messages";
import { css } from "@emotion/react";
import { LoaderSpinner } from "~/components/system/components/Loaders";
co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.