text
stringlengths
3.22k
29.5k
const tape = require('tape') const b = require('./') const {walk, walk2, walkPost} = require('./util') function count (node) { let count = 0 walk(() => count++, node) return count } /** * Returns a string denoting the order in which nodes were visited */ function traversalOrder (fn, node) { let str = '' ...
/* * Copyright 2017, Yahoo Inc. * Copyrights licensed under the New BSD License. * See the accompanying LICENSE file for terms. */ import { buildCachedCheckTimeZoneSupport, getTimeZoneOffsetInfo, getZoneNameForLocale } from './lookup-utill.js'; // Used to get the value of a super function without clas...
/** * Created by singgum3b on 12/27/13. */ //----------------------------------------------------------------------------------// var helper = { getElement: function (selectors) { var p = Object.create(helper.getElement.prototype); p.nodelist = document.querySelectorAll(selectors); return p; }, //This shou...
import { AppConstants } from './constants'; import WebSocketWrapper from './web-socket-wrapper'; const Method = { GET: 'GET', PUT: 'PUT', POST: 'POST', DELETE: 'DELETE', }; const SuccessHTTPStatusRange = { MIN: 200, MAX: 299, }; export class Api extends WebSocketWrapper { constructor({ wsConnectedCall...
import EventEmitter from '../EventEmitter.js' /** * Base on: https://github.com/joewalnes/reconnecting-websocket/ by <NAME> * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_client_applications * This behaves like a WebSocket in every way, except if it fails to connect, ...
/* * Waltz - Enterprise Architecture * Copyright (C) 2016, 2017, 2018, 2019 Waltz open source project * See README.md for more information * * 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 ...
/* Author: <NAME> <<EMAIL>> * Description: Check whether this regex has quantified overlapping adjacent groups like '\d+\d+'. * * QOA is a heuristic for regex vulnerability. * QOA is a strong (perfect?) indicator for polynomial blow-up. * Should be at least O(n^2). */ const createRegExp = require('./create-regex...
$().ready(function() { initSimplemde(); initSummernote(); initSimditor(); }) // 加载文本编辑器 var imgArray = new Array(); var simplemde; var simeditor; // 所有模板上传图片放在这里,删除模板不再删除图片 var blogFileName = 'blogtemplate'; var articleEditor = $("#articleEditor2").val(); function initSimplemde() { // 初始化编辑器 simplemde = new Simpl...
/** * marked-it-cli * * Copyright (c) 2014, 2017 IBM Corporation * * 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, ...
window.onload = init; function init() { var root = new THREERoot({ createCameraControls:!true, antialias:(window.devicePixelRatio === 1), fov:60 }); root.renderer.setClearColor(0x000000); root.renderer.setPixelRatio(window.devicePixelRatio || 1); root.camera.position.set(0, 0, 600); var textA...
var app = angular.module('myApp',['ngRoute', 'lastfmService']); app.config(function($routeProvider, $locationProvider) { $routeProvider .when('/about', { templateUrl: '/view/pages/about.html', pageTitle: 'About', controller: 'aboutController' }) .when('/c...
let cardArray = ["fa-diamond", "fa-paper-plane-o", "fa-anchor", "fa-bolt", "fa-cube", "fa-leaf", "fa-bicycle", "fa-bomb", "fa-diamond", "fa-paper-plane-o", "fa-anchor", "fa-bolt", "fa-cube", "fa-leaf", "fa-bicycle", "fa-bomb" ]; const deckContainer = document.querySelector('.deck-container'); const restartIcon ...
/* eslint-disable no-bitwise */ import qs from 'querystring'; import moment from 'moment'; import base64 from 'js-base64'; import { assign, trim, isObject, isEmpty } from 'lodash'; import { PICK_TYPE, ROOT_PERMISSION_TYPE, NODE_SORT_TYPE, NODE_SORT_BY } from '../constant/enum'; const base64encode = base64.Base64.encod...
var hasError = false; function drawCaptcha() { var a = Math.ceil(Math.random() * 10)+ ''; var b = Math.ceil(Math.random() * 10)+ ''; var c = Math.ceil(Math.random() * 10)+ ''; var d = Math.ceil(Math.random() * 10)+ ''; var e = Math.ceil(Math.random() * 10)+ ''; ...
'use strict'; const { spawn, spawnAwait, } = require('./cp'); require('@faltest/utils/src/require-before-webdriverio'); const { remote } = require('webdriverio'); const psList = require('ps-list'); const fkill = require('fkill'); const debug = require('./debug'); const log = require('./log'); const EventEmitter = ...
import React, { useState } from 'react'; import { StyleSheet, Image, Dimensions, View, TouchableOpacity, } from 'react-native'; import { Text, Icon, Input, Overlay, Avatar } from 'react-native-elements'; import { ScrollView } from 'react-native-gesture-handler'; import Colors from '../constants/Colo...
//Close alert window: $().alert('close'); //Initialize global variables containers: var alerEnd = document.getElementsByClassName("end-line"); var alerOut = document.getElementsByClassName("container"); //Retrieve content of blocks with three different methods: function childNode(checkAttr){ var childAlert = newA...
/*_____ START "Development Use" section _____*/ function activate() { const activatedStyles = document.createElement('link'); const activationBanner = document.getElementById('activation-notice') activatedStyles.setAttribute('rel', 'stylesheet'); activatedStyles.setAttribute('href', '../activated-component.css...
/// <reference path='jquery.d.ts'/> 'use strict'; var updateURL; var appendURL; var removeURL; var RealtimeForm; (function (RealtimeForm) { function getRTFValue(control) { var list = getRTFList(control); var value = control.attr('data-value'); if (!value) { if (control.attr('type...
var page = 1; var lastPage = 0; var base_api = "https://floesia-api.herokuapp.com"; window.onload = function () { fetchTrending() .then(trending => { fetchPoems() .then(poems => { if (isLogged()) { fetchGivenHearts() ...
import { Map, List, Record, Set } from 'immutable' import { generateRandomString } from 'random-gen' import * as Compatibility from 'compatibility' import * as Cache from 'cache' import * as Content from 'content' import * as Arbitrary from 'test/arbitrary' import * as Loop from 'test/loop' import * as TT_ from 'tab...
var i=0; // var myvar; var notification_number; var click_number=0; var prev_id=''; var current_id=''; var unread_messages=[]; var show_length=5; $(document).ready(function() { var date=new Date(); var calendar=$('#calendar'); if(calendar.length) create_calendar(date.getFullYear(),date.getMonth(),...
const { Sequelize, DataTypes, Op } = require('sequelize'); const moment = require('moment'); /** * @class Coverage * @property {string} run_at - the iso date when the coverage was send to the server * @property {Object[]} source_files - a list of all the source files related to the coverage report * @property {str...
import React, { useMemo } from 'react' import { Interaction, Center, mediaQueries, Button, fontStyles, Label, ColorContextProvider, useColorContext, RawHtml } from '@project-r/styleguide' import TrialForm from '../Trial/Form' import { css } from 'glamor' import { getElementFromSeed } from '../../lib/u...
var should = require('chai').should(); var assert = require('chai').assert; var path = require('path'); describe('Year', function() { describe('#display()', function() { var yr = require(path.join(process.cwd(),'/lib/cal.year')); it('should output what the cal outputs', function() { var cal = [ ' ...
/* decla variable*/ let persoTeam = [] let imagePerso=[] let imageBad =[] let badTeam =[] let numPartie = '' let Pseudo = '' let msgSocket = '' let turn = 0 let finish = true let adversaire = {} let imageHeroeSelect = {} const map_element =document.getElementById('map_container') const fightScreenElt = document.getEle...
var chart; var options; var table; var seriesdata=[]; $(document).ready(function(){ init(); }); $(window).resize(function(){ init(); }); function init(){ $('.mymulti').chosen({max_selected_options:10}); var ch = $('.chart-selector'); type = ch.val(); name = ch.find('option:sele...
var express = require('express'); var router = express.Router(); var multiparty = require('multiparty'); var fs = require('fs'); var sprintf = require('sprintf-js').sprintf; var vsprintf = require('sprintf-js').vsprintf; var debug = require("../common/debug"); var d = new debug(); var util = require("../common/util...
/*Copyright 2019 Bang & <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublice...
/* Copyright 2019 Gravitational, Inc. 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...
import React, { PureComponent, Fragment } from 'react'; import { connect } from 'dva'; import moment from 'moment'; import { Row, Col, Card, Form, Input, Select, Button, DatePicker, Modal, Carousel, message, } from 'antd'; import StandardTable from '@/components/StandardTable'; import PageHeaderWrap...
$(document).ready(function(){ //loads only on the groups show page if(window.location.href.indexOf("groups") > -1){ loadExpenses(); } attachExpenseListeners() }) //end of document ready function attachExpenseListeners(){ //Submits new expenses $("form.new_expense").on("submit", function(event) { even...
const Discord = require("discord.js"); const Beautify = require("../../utils/helper/beautify"); const moment = require("moment"); const Emotes = require("../../emotes.json"); const Moderation = require("../../utils/moderation/moderation"); const Log = require("../../utils/moderation/log"); const Infraction = require("....
// Globals var dataNames = []; var choroplethColours = []; var jsondata; var persona = { criteria : { "price" : { "importance" : 9, "range" : [300000,600000], "inverse" : true }, "distance to station" : { "importance" : 6 }, "b...
import classNames from 'classnames'; import round from 'lodash/round'; import PropTypes from 'prop-types'; import queryString from 'query-string'; import React, { Component, Fragment } from 'react'; import { Link } from 'react-router-dom'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux...
"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, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })...
import _ from 'lodash' // Auto polyfill import 'es6-object-assign/auto' import 'es6-promise/auto' // Import Vue import Vue from 'vue' // Import F7, F7-Vue import Framework7 from 'framework7/dist/framework7.esm.bundle.js' import Framework7Vue from 'framework7-vue/dist/framework7-vue.esm.bundle.js' import VueYoutube fr...
import React, { Component } from 'react'; import { StyleSheet, TextInput, View, TouchableOpacity, Text , ScrollView} from 'react-native'; import { StackNavigator } from 'react-navigation'; import styles from '../../styles/commonStyles'; import DatePicker from 'react-native-datepicker' import { postAdminLabApi, editA...
// this class should be used to update post documents in the database 'use strict'; const ModelDeleter = require(process.env.CSSVC_BACKEND_ROOT + '/api_server/lib/util/restful/model_deleter'); const ModelSaver = require(process.env.CSSVC_BACKEND_ROOT + '/api_server/lib/util/restful/model_saver'); const Indexes = requ...
/* City of Concourse Website - Registration page Copyright 2019 <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 applicab...
const path = require("path") const axios = require("axios") const crypto = require("crypto") const groupBy = require("lodash/groupBy") const keys = require("lodash/keys") const flatten = require("lodash/flatten") const APP_DATA = [ { name: "ArBoard", description: `Discussion board for Arweave. Arweave ÐAp...
const electron = require("electron"); const dialog = electron.remote.dialog; const { ipcRenderer } = electron; const fs = require("fs"), path = require("path"); const Finder = require("fs-finder"); const uuidv1 = require("uuid").v1; const win = electron.remote.getCurrentWindow(); const helper = require("../helpers/...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var packingOptions = { PADDING: 10, GOLDEN_SECTION: (1 + Math.sqrt(5)) / 2, FLOAT_EPSILON: 0.0001, MAX_INERATIONS: 100 }; function applyPacking(graphs, w, h, node_size, desired_ratio, centerGraph) { if (desired_rat...
import React, { PureComponent, Fragment } from 'react'; import { connect } from 'dva'; import 'antd/dist/antd.css'; import router from 'umi/router'; import PageHeaderWrapper from '@/components/PageHeaderWrapper'; import { formatMessage, FormattedMessage, getLocale } from 'umi/locale'; import Filter from '@/components/F...
//initialize datatable recieve_voucher_table = $("#recieve-voucher-table").DataTable({ "searching": false, "paging": false, "ordering": false, "autoWidth": false, "bInfo": false, "footerCallback": function ( row, data, start, end, display ) { api = this.api(),...
var Buffer = require('buffer').Buffer; var EventEmitter = require('events').EventEmitter; var util = require('util'); var xutil = require('./xutil'); var argument_length = {}; argument_length.C = 1; argument_length.S = 2; argument_length.s = 2; argument_length.L = 4; argument_length.l = 4; argument_length.x = 1; func...
'use strict'; const sodium = require('libsodium-wrappers-sumo'); const Label = require('./modules/label.js'); const Circuit = require('./modules/circuit.js'); const Gate = require('./modules/gate.js'); const labelParser = require('./parse/label.js'); const crypto = require('./util/crypto.js'); const generateInputLab...
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.protot...
import { connect } from 'react-redux'; import React, { Component } from 'react'; import { setProductWSData, addProductData, } from '../../actions'; import LineChart from '../../components/LineChart'; import Loader from '../../components/Loader'; import ConnectedGlyph from '../../components/ConnectedGlyph'; class...
'use strict'; function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var excelController = function (analyzer) { var DOM = UIController.getDStrings(); var promiseObjs ...
// By Ankit var BVHReader = function () { this.load = function (url, callback) { $.get(url, function (str) { var dataReturn = parse(str); var jointStack = dataReturn[0]; var jointMap = dataReturn[1]; var jointArray = dataReturn[2]; var connectivit...
const net = require('net') const EventEmitter = require('events') const WebRTC = require('./webRTC') const {delay} = require('./tool') const wrtc = require('wrtc') const delayMs = ms => new Promise(res => setTimeout(res, ms)) class MappingServer extends EventEmitter { constructor({ logger, onConnectMsg, version, se...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.structures = exports.State = exports.LoadType = exports.Plugin = exports.Structure = exports.Utils = exports.buildTrack = void 0; /** @hidden */ const template = ["second", "minute", "hour", "day", "week", "month", "year"]; /** @hidden...
import mongoose from 'mongoose'; import { modelStatus } from '../helpers/modelStatus'; import { flatten, uniq } from 'lodash'; import getLogger from '../logger'; const logger = getLogger('schemas/model'); // Used to remove values that are empty strings from document const deleteEmptyStrings = v => { return v === nu...
/** * Wheel, copyright (c) 2017 - present by <NAME> * Distributed under an MIT license: https://arnovandervegt.github.io/wheel/license.txt **/ const $ = require('../../program/commands'); const errors = require('../errors'); const err = require('../errors').errors; const t = require('../t...
import React, { useState, useEffect } from 'react'; import { View, Text, Image, StyleSheet, TouchableOpacity, Dimensions, TextInput } from 'react-native' import AntDesign from 'react-native-vector-icons/AntDesign' import { Actions } from 'react-native-router-flux'; import LinearGradient from 'react-native-linear-gradi...
import box2DLoader from './Box2D/initBox2d'; import Time from './Time/Time'; import uuid from 'uuid'; import perf, {Measures} from './Stats/perf'; import statsHeap from './Stats/stats-heap'; import Player from './Player'; import Boulder from './Boulder'; import Spawn from './Spawn'; import Wall from './Wall'; import Gr...
const {renameSync, copyFileSync, existsSync} = require("fs"); const copy = require("copy"); const path = require("path"); const chalk = require("chalk"); const inquirer = require("inquirer"); const {install, installDep} = require("../utils/install") const getInnerConfig = require("../utils/getInnerConfig"); const {getC...
// /* global Sat SatImage SatLabel */ import {Sat, SatLabel} from './sat'; import {SatImage} from './image'; /** * Class for each video labeling session/task, uses SatImage items * @param {SatLabel} LabelType: label instantiation type */ export function SatVideo(LabelType) { let self = this; Sat.call(self, Sat...
"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol....
import React, { Component } from "react"; import { prepareFinalObject } from "egov-ui-framework/ui-redux/screen-configuration/actions"; import { connect } from "react-redux"; import get from "lodash/get"; import set from "lodash/set"; import { Line } from "react-chartjs-2"; import { Doughnut } from 'react-chartjs-2'; i...
const fs = require("fs"); const mqtt = require("mqtt"); const Tools = require("./Tools"); const Vacuum = require("./miio/Vacuum"); const COMMANDS = { turn_on: "turn_on", return_to_base: "return_to_base", stop: "stop", clean_spot: "clean_spot", locate: "locate", start_pause: "start_pause", s...
const Timeout = new Set(); const xpTimeout = new Set(); const { Message, Client } = require("discord.js"); const Discord = require("discord.js"); const ms = require("ms"); const custom = require("../../models/custom"); const GuildSettings = require("../../models/settings"); const userdb = require("../../models/userdb")...
import React from 'react' import { PanResponder, Slider, Text, View, Dimensions, Animated } from 'react-native' import styles, { circleSize } from './styles' const { height, width } = Dimensions.get('window') class Swiper extends React.Component { constructor(props) { super(props) this.state = {...
import "./common.scss"; import { html, render } from "lit-html"; import Diacart from "../lib/diacart"; const diacart = (window.diacart = new Diacart({ name: "diacart", title: "Shopping cart", totalPriceText: "Total amount", totalQuantityText: "Total quantity", removeFromCartBtnText: "", emptyCartText: "You...
/* eslint-disable react/no-unused-state */ /* eslint-disable array-callback-return */ /* eslint-disable no-shadow */ /* eslint-disable no-console */ import React from 'react'; import { View, Text, StyleSheet, SafeAreaView, TouchableOpacity, Alert, } from 'react-native'; import ProgressBarAnimated from 'reac...
import { format, isThisWeek, isToday } from 'date-fns' import project from './project' import task from './task' import showAside from './sidebar' const localStorageList = (function (){ const LSL = 'project.list' return LSL })() let array = (function (){ let createArray = JSON.parse(localStorage.getItem(lo...
/** Copyright 2017 ToManage 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 distr...
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray"; import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _createClass from "@babel/r...
var fs = require('fs'); var path = require('path'); if (process.argv.length <= 2) { console.log("Usage: " + __filename + " <your/path/to/models>"); process.exit(-1); } var splitter = '/'; if (process.platform == 'win32') { splitter = "\\"; } var modelsPath = process.argv[2]; var childDirectories = []; v...
import file from "./file"; import ui from "./ui"; const path = require("path"); const fs = require("fs"); const rootDir = __dirname; // require('electron-root-path').rootPath; const os = require("os"); import unzip from "./unzip"; import compiler from "./compiler"; import regex_parser from "./regex-parser"; var base...
const core = require('@actions/core') const exec = require('@actions/exec') const artifact = require('@actions/artifact') const cache = require('@actions/cache') const path = require('path') const fs = require('fs').promises const yaml = require('js-yaml') const crypto = require('crypto') // The various paths to cache...
const toString = Object.prototype.toString; const is = (obj, type) =>toString.call(obj)=='[object '+type+']' export const utils = {}; utils.toString = toString; utils.is = is; utils.isArray = obj=>Array.isArray(obj); utils.isObject = obj=>is(obj, 'Object'); utils.isString = obj=>is(obj, 'String'); utils.isNumber = obj...
function selectAcount(client) { let positionAcount; switch (BD_USUARIS[client].Acounts.length) { case 0: positionAcount = -1; break; case 1: positionAcount = 0; break; default: positionAcount = witchPositionAcount(B...
'use strict'; var Command = require('ronin').Command; var chalk = require('chalk'); var spawn = require('cross-spawn'); var path = require('path'); var util = require('../lib/util'); var GenerateRequireConf = require('../lib/generateRequireConf'); var restUtils = require('../lib/restUtils'); var depUtils = require('.....
import * as _Linker from "./Linker" // import { GeoRendererInstance as GeoRenderer } from "../engine/GeoRenderer" // import { SurfaceLoadInstance as SurfaceLoad } from "./SurfaceLoad" // import { ObjectListProcessorInstance as ObjectListProc } from "./ObjectListProcessor" // import { GameInstance as Game } from "./Game...
/*! @license Firebase v4.5.0 Build: rev-f49c8b5 Terms: https://firebase.google.com/terms/ */ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPermanentError = isPermanentError; exports.mapCodeFromRpcStatus = mapCodeFromRpcStatus; exports.mapCodeFromRpcCode = mapCodeFromRpcCod...
const canvas = document.createElement("canvas"); window.addEventListener("resize", () => { renderer.setSize(window.innerWidth, window.innerHeight); }); window.addEventListener("contextmenu", event => { event.stopPropagation(); event.preventDefault(); }); window.addEventListener("dragenter", event => { event.stopPropa...
var basePath = '/api'; var app = angular.module('adminApp'); app.controller('AccountController', [ '$routeParams', '$location', 'AuthService', 'ReferenceResource', 'AccountResource', 'RelationResource' , function($routeParams, $location, AuthService, ReferenceResource, AccountResource, RelationResource) { ...
const async = require('async'); const aws = require('aws-sdk'); const events = require('events'); const os = require('os'); const config = require('./config'); const log = require('./logger').cat('decider'); const swf = new aws.SimpleWorkflow({ params: { domain: config.workflow.domain } }); function registerTypes() ...
import React, { useState, useEffect, useRef } from 'react' import { ActivityIndicator, View, StyleSheet, Alert, TouchableOpacity, Linking, } from 'react-native' import { GiftedChat, Bubble, Send, SystemMessage, MessageText, } from 'react-native-gifted-chat' import { IconButton, Banner, Button } fr...
/** * @module API/export * @see @link https://stackoverflow.com/questions/31818538/jsdocs-documenting-node-js-express-routes */ /** * @overview The routing of the exports API. * @author <NAME> */ import express from 'express'; import fs from 'fs'; import path from 'path'; import moment from 'moment'; import * a...
// Once the DOM has finished loading, do stuff: document.addEventListener('DOMContentLoaded', (event) => createDOM()); /** * Submits the relevant variables from the form to the Google form and goes to * the next page. */ let submitAndGo = () => { // Get the user id for this computer and person: let sid = lo...
let _ROBOT_RESPONSE_ = "response"; let _ROBOT_RESPONSE_ID_ = "id"; let _ROBOT_RESPONSE_DESCRIPTION_ = "description"; let _ROBOT_RESPONSE_STATEMENTS_ = "statements"; let _ROBOT_RESPONSE_OPTIONS_ = "options"; let _ROBOT_STATEMENT_TYPE_ = "type"; let _ROBOT_STATEMENT_DATA_ = "data"; let _ROBOT_STATEMENT_TYPE__TEXT_ = "...
const Discordie = require('discordie'); const fs = require('fs'); const ourIgnoreList = require('./ignore.json'); const ourAuth = require('./auth.json'); const PREFIX = '?'; const ourClient = new Discordie({ autoReconnect: true }); function save(file, object) { console.log('Saving ' + file + '.json'); retur...
"use strict"; 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 ("value" in descriptor) descriptor.writable = true; Object.definePrope...
import { LANR_ARR, BASIS, LUNAR_MONTH, LUNAR_DAY, SHENGXIAO, TIANGAN, DIZHI, SOLAR_TERMS_MIN, SOLAR_TERMS_CN } from './config' class Canlendar { /** * 阳历 转 农历 * @param {number} sy 阳历年 * @param {number} sm 阳历月 0-11 * @param {number} sd 阳历日 */ solar_to_lunar = function (sy, sm, sd) { sm -= 1 ...
import { Reader } from "./models/reader.js"; let count = 10; let precise = (x, y) => Number.parseFloat(x).toPrecision(y); let margin = { top: 50, right: 35, bottom: 50, left: 50 }, w = 768 - (margin.left + margin.right), h = 500 - (margin.top + margin.bottom); let reader = new Reader("data/ZonAnn.Ts+dSST.cs...
import { useEffect, useState } from "react"; import React, { Component } from "react"; import { StyleSheet, Text, View, ImageBackground, Image, TextInput, Button, TouchableOpacity, Platform, } from "react-native"; import { MaterialCommunityIcons } from "@expo/vector-icons"; // to load weather icons im...
'use strict'; const _ = require('lodash'); const tls = require('tls'); const cheerio = require('cheerio'); const Simplecrawler = require('simplecrawler'); const URL = require('url'); const cursor = require('ansi')(process.stdout); const LoggerFactory = require('./Logger'); const ErrorHandlerFactory = require('./Error...
/* * mongo-edu * * Copyright (c) 2014-2016 <NAME> * Licensed under the MIT license. * https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE */ var path = require('path'), fs = require('fs'), youtubedl = require('youtube-dl'), filesize = require('filesize'), ProgressBar = require('progr...
import React from 'react'; // ------------- gql Imports ---------------------- // import { Query, Mutation } from 'react-apollo'; import * as query from '../../../constants/queries'; import { UPDATE_DOCUMENT, UPDATE_FOLDER, DELETE_FOLDER } from '../../../constants/mutations'; // ------------- Component Imports ---...
/************** SYSTEM INCLUDES **************/ var http = require('http'); var sys = require('sys'); var async = require('async'); var sanitizer = require('sanitizer'); var compression = require('compression'); var express = require('express'); var conf = require('./config.js').server; var ga = require('./config.js')...
const axios = require('axios') const ecomUtils = require('@ecomplus/utils') exports.post = ({ appSdk }, req, res) => { /** * Treat `params` and (optionally) `application` from request body to properly mount the `response`. * JSON Schema reference for Calculate Shipping module objects: * `params`: https://ap...
import { translations, i18nMixin } from '../i18n.js'; import { store } from '../app.js'; import { postData } from '../helper.js'; import { queryParamProp } from '../utils.js'; const SendStatus = Object.freeze ({ unknown: 0, inprogress: 1, success: 2, failure: 3, }); export default { name: 'WorkspaceShareView', ...
var selected_id = -1; // Get URL paramter location const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const location_estab = urlParams.get('local'); var estab_obj = JSON.parse(localStorage.getItem(String(location_estab))) if(estab_obj == null){ document.getElementByI...
// Copied from https://github.com/node-red/node-red/blob/6d294a0c74343601fb194066fa41edf3b092cdae/packages/node_modules/node-red/red.js // with major modifications 'use strict'; var http = require('http'); var https = require('https'); var util = require("util"); var express = require("express"); var crypto = require...
import { reduce, isArray, isFunction, mapValues } from 'lodash'; import { toCollectionName } from 'mongoose/lib/utils'; import { GraphQLList, GraphQLNonNull, GraphQLID, GraphQLObjectType, GraphQLSchema, GraphQLBoolean, GraphQLFloat } from 'graphql'; import { mutationWithClientMutationId, connectionArg...
/* * Copyright 2016 Mirantis, Inc. * * 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 ...
require('normalize.css/normalize.css'); require('../styles/App.scss'); import React from 'react'; import ReactDOM from 'react-dom'; // 获取图片信息 let imageData = require('json!../data/imageData.json'); // 利用自执行函数, 将图片名信息转成图片URL路径信息 imageData = ((imageDataArr)=> { for (let i = 0; i < imageDataArr.length; i++) { let...