text
stringlengths
2
1.04M
import React from 'react'; import PropTypes from 'prop-types'; import cn from 'bem-cn-lite'; import {connect} from 'react-redux'; import _ from 'lodash'; import DataTable from '@yandex-cloud/react-data-table'; import {Loader, TextInput, Button} from '@yandex-cloud/uikit'; import EntityStatus from '../../components/En...
module.exports = { setupFiles: ['<rootDir>/tests/setup.js'], coverageDirectory: './coverage/', collectCoverage: true, roots: ['<rootDir>/src'], testRegex: '^.*.test.(t|j)s$', transform: { '^.+\\.tsx?$': 'ts-jest', '^.+\\.js$': 'babel-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'js...
import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { useNavigate, useParams, Link, Navigate } from "react-router-dom"; import Table from "react-bootstrap/Table"; import Container from "react-bootstrap/Container"; import DayJS from "react-dayjs"; import { R...
export const hashRE = /#.*$/ export const extRE = /\.(md|html)$/ export const endingSlashRE = /\/$/ export const outboundRE = /^[a-z]+:/i export function normalize (path) { return decodeURI(path) .replace(hashRE, '') .replace(extRE, '') } export function getHash (path) { const match = path.match(hashRE) ...
import {GeoWidgetPreview} from '.'; import triggerCustomEvent from '../utilities/triggerCustomEvent'; const DEFAULT_MODAL_CONFIG = { width: window.innerWidth > 1000 ? window.innerWidth * 0.5 : 500, height: window.innerHeight * 0.75, }; export class GeoWidgetButton { constructor(node, modalConfig) { ...
'use strict'; /** * Module dependencies */ var acl = require('acl'); // Using the memory backend acl = new acl(new acl.memoryBackend()); /** * Invoke Articles Permissions */ exports.invokeRolesPolicies = function () { acl.allow([{ roles: ['admin'], allows: [{ resources: '/api/articles', per...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = require('babel-runtime/helpers/extends'); var _extends3 = _interopRequireDefault(_extends2); var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties'); var _objectWithoutProperties3 = _inte...
import Newspanel from './../../../src/components/Home/Newspanel'; describe('<Newspanel /> component', () => { it('should display correctly', () => { const enzymeWrapper = shallow(<Newspanel />); expect(enzymeWrapper.find('div').text()).toEqual('Some news'); }) });
/** * Dependent on firebase. */ import React, { Component } from "react"; import { Route, Redirect } from "react-router-dom"; import { UserContext } from "../../firebase"; class PrivateRoute extends Component { static contextType = UserContext; render() { const { component: RoutedComponent, ...rest } = this...
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 (b.hasOwnProperty(p)) d[p] =...
QUnit.testStart(function() { const gridMarkup = ` <div id='container'> <div id="dataGrid"></div> <div id="dataGrid2"></div> <div id="form"></div> </div> `; const markup = ` <style> .fixed-height { height: 400px; ...
import 'react-app-polyfill/ie11'; import 'react-app-polyfill/stable'; // in theory, we should be able to add this to index.html // <script> // window.WebComponents = window.WebComponents || {}; // window.WebComponents.root = '../node_modules/@webcomponents/webcomponentsjs/'; // </script> // and then // import '...
/** * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'placeholder', 'km', { title: 'លក្ខណៈ Placeholder', toolbar: 'បង្កើត Placeholder', name: 'ឈ្មោះ Placeholder', ...
// Initialize app var myApp = new Framework7({ swipeBackPage: false, pushState: true, swipePanel: 'left', modalTitle: 'Title' }); // If we need to use custom DOM library, let's save it to $$ variable: var $$ = Dom7; $$('body').on('click', '.js-add-to-fav', function () { myApp.alert('You love this ...
import { createLocalVue, shallowMount, RouterLinkStub } from "@vue/test-utils"; import Header from "@/components/Header/Header.vue"; import Vuex from "vuex"; import VueRouter from "vue-router"; describe("Footer.vue", () => { const localVue = createLocalVue(); localVue.use(Vuex); localVue.use(VueRouter); const...
"use strict"; var util = require('util'); var async = require('async'); var lodash = require('lodash'); var request = require('request'); var cheerio = require('cheerio'); //for parsing html data var URL = require('url-parse'); //for parsing links var START_URL = "https://medium.com"; var pagesVisited = {}; var num...
import $ from 'jquery'; import vizMocks from '../../helpers/vizMocks.js'; import pointerMock from '../../helpers/pointerMock.js'; import { events as eventsConsts } from 'viz/components/consts'; import axisModule from 'viz/axes/base_axis'; import { Crosshair } from 'viz/chart_components/crosshair'; import trackers from ...
// set up ====================================================================== // get all the tools we need var express = require('express'); var app = express(); var port = process.env.PORT || 4000; var passport = require('passport'); var flash = require('connect-flash'); var cookieParser = require('c...
const { resolve } = require('path'); const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { mode: 'production', entry: resolve('src/index.ts'), // devtool: 'inline-source-map', output: { path: resolve('bin'), filename: 'index.js', }, module: { rules: [ { test...
var assert = require('assert'); var hell = require('../src/hell'); var promisified = require('../src/promisified'); describe('callbackHell', function() { it('should return the result of chained method calls', function(done) { hell.abc('start', function (result) { assert.equal(result, 'start -> ...
'use strict'; // Do this as the first thing so that any code reading it knows the right env. process.env.BABEL_ENV = 'production'; process.env.NODE_ENV = 'production'; // Makes the script crash on unhandled rejections instead of silently // ignoring them. In the future, promise rejections that are not handled will //...
// Use .env variables require('dotenv').config() const { openBrowser, goto, click, textBox, into, write, button, fileField, to, attach, closeBrowser } = require('taiko'); (async () => { try { // Open browser and navigate to page await openBrowser({ headless: false }); await goto("https://w...
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; /** * Namespace for async utility functions. */ var AsyncUtil = {}; /** * Asynchronous version of Array.forEach. * This executes a...
const config = require('./webpack.config.js'); const { merge } = require('webpack-merge'); module.exports = merge(config, { mode: 'development', devServer: { port: 8088, open: ['index.html'] }, });
import axios from 'axios' import router from '@/router/routers' import { Notification } from 'element-ui' import store from '../store' import { getToken } from '@/utils/auth' import Config from '@/settings' import Cookies from 'js-cookie' // 创建axios实例 const service = axios.create({ baseURL: process.env.NODE_ENV === ...
import { helper } from '@ember/component/helper'; import { isEmpty } from 'voca'; export default helper(function vocaIsEmpty(params/*, hash */ ) { return isEmpty(params[0]); });
var map; var mapDefaults = []; var mapMarkers = []; var players = []; var cities = []; var currentGuesses = []; var canSubmit = true; var messages = { 'start' : 'Wolfie has gone missing!! <br /><br />Can you help find him?', 'win' : 'YOU WIN!!', 'gameOver' : ' has found Wolfie! <br /><br /> Wolfie was hidden in...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true, }); exports.createFetchOnce = createFetchOnce; var _fetchedFlatOffers = require("../fetchedFlatOffers.js"); var _navigateToFlatOfferListPage = require("./navigateToFlatOfferListPage.js"); function createFetchOnce({ flatOffersUrl, parseF...
const React = require('react') const CompLibrary = require('../../core/CompLibrary.js') const Container = CompLibrary.Container const GridBlock = CompLibrary.GridBlock const siteConfig = require(`${process.cwd()}/siteConfig.js`) function imgUrl(img) { return `${siteConfig.baseUrl}img/${img}` } function docUrl(doc...
'use strict'; import {combineReducers} from 'redux'; import login from './login'; import mqtt from './mqtt'; const rootReducer = combineReducers({ login, mqtt }); export default rootReducer;
import {$set, extend, isPlainObject, isUndef, toArray, toString} from '@form-create/utils'; function defVData() { return { class: {}, style: {}, attrs: {}, props: {}, domProps: {}, on: {}, nativeOn: {}, directives: [], scopedSlots: {}, ...
/** * 描述 : 统一导航脚步, 依赖jquery * 注明 : * 导航配置(config) : { * "remove" : 自动移除的节点, 符合jquery选择器规则 * "ssoAcc" : 系统帐号(SSO帐号) * } * 导航数据(navData) : { * "userNike" : 用户昵称, * "system" : 系统数据 { * 系统标识(SSO帐号) : { * "acct" :x系统标识 * ...
exports.handle = async function(msg) { return this.logger(this, `The bot just ran into a non-breaking error, ${msg}.`, 'warn'); };
import React, { Component, PureComponent } from 'react' import reactCSS from 'reactcss' import throttle from 'lodash/throttle' import * as saturation from '../helpers/saturation' export class Saturation extends (PureComponent || Component) { constructor(props) { super(props) this.throttle = throttle((fn, da...
const fs = require('fs'); const path = require('path'); const fsExtra = require('fs-extra'); /** * @param {string} source the full path to the root folder of the installer, such /dev/project/node_modules/@deskpro/apps-installer * @param {string} destination the full path to the root folder where the installer should...
/* eslint-disable @typescript-eslint/no-var-requires */ const core = require('../core/core'); const path = './lib/core/stylesheet'; const generators = { StyleSheet_constructor() { const contract = { name: 'StyleSheet_constructor', contract: core.readFile(`${path}/stylesheet.json`, 'json'), }; ...
define("common.string.base", [], function(require, exports, module){ var _obj = require("common.object.base"); module.exports = { trim: function(str){ var result = ""; if(typeof str !== "string"){ str = this; } if(!str.length){ return _obj.charge(new String(result), module.exports); } r...
const path = require('path') const timezone = 'UTC+08:00'; module.exports = { "termStartdateOnMonday": new Date('2019-09-02T00:00:00'), "calendarId": "05obo7u8dkje1bssph5dt055b0@group.calendar.google.com", timezone, }
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. * Thanks to: Seamus Leahy for adding deltaX and delta...
var path = require("path"); var isAuthenticated = require("../config/middleware/isAuthenticated"); module.exports = function(app) { // If the user has valid login, send them to the homepage app.get("/", function(req, res) { res.redirect("/create") }); app.get("/create", function (req,res) { ...
define([ "dojo/_base/declare", "davinci/ve/widget", "davinci/commands/CompoundCommand", "davinci/ve/commands/RemoveCommand", "davinci/ve/commands/ReparentCommand", "./DataStoreBasedWidgetInput" ], function ( declare, Widget, CompoundCommand, RemoveCommand, ReparentCommand, DataStoreBasedWidgetInput ) { ret...
import sinon from 'sinon' import VueGoodPagination from '@/components/Pagination' import { mount } from 'vue-test-utils' describe('VueGoodPagination', () => { let wrapper, vm beforeEach(() => { wrapper = mount(VueGoodPagination, {propsData: { perPage: 10, total: 30} }) vm = wrapper.vm }) ...
import { useState, useEffect } from 'react'; // material import { Box, Grid, Container, Typography, Button } from '@mui/material'; import moment from 'moment'; // components import Page from '../components/Page'; import { YourAPY, YourRebase, YourBalance, YourReflection, YourReflection1, YourReflection2, ...
/*** * Nord File Extension */ exports.nordFileExtMap = new Map([ ["ncb", "Nord C2 Backup"], ["ncpg", "Nord C2 Program"], ["nc2b", "Nord C2D Backup"], ["nc2p", "Nord C2D Program"], ["neb", "Nord Electro 3 Backup"], ["neop", "Nord Electro 3 Organ Preset"], ["nepg", "Nord Electro 3 Program"],...
//# sourceMappingURL=/build/es2015/interfaces/augmented-error.js.map
/*! * config file for `lint-staged` * * update: wget -O lint-staged.config.js https://git.io/fjVj9 * document: https://git.io/fhNpF * */ module.exports = require('@fisker/lint-staged-config')
/* eslint-env jest */ const parseRules = require('../lib/rule-parser'); const example = ` [flerb] match-url = "^/foo" run = 'shutdown -r now' input = true `; it('should be able to parse toml', () => { const rules = parseRules(example, '/dir/example.toml'); expect(rules[0].name).toBe('/d/example.toml:flerb'); ex...
/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/license */
import { Client } from 'boardgame.io/client' import game from '@/../game/index' let client function initClient(config) { client = Client({ game, ...config }) client.connect() if (process.env.NODE_ENV === 'development') { require('vue-cli-plugin-boardgame/clientDebug').start(client) window.client = clie...
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_pre...
import React from "react"; import Query from "./search/Query"; import Results from "./search/Results"; import from "../utils/helpers"; class Search = () => { // Here we set the initial state variables // (this allows us to propagate the variables for maniuplation by the children components // Also note the "res...
var AlfrescoAppelService = require('./../alfresco.appel.js'); /** Classe permettant de récupérer les détail d'un noeud. */ class SupprimerNoeud extends AlfrescoAppelService { /** Initialise une nouvelle instance de la classe 'DetailDocument'. * @param id_noeud Le noeud du document. */ constructor(id_noeud) { ...
import React, { PureComponent } from 'react'; import { Layout, message } from 'antd'; import Animate from 'rc-animate'; import { connect } from 'dva'; import router from 'umi/router'; import GlobalHeader from '@/components/GlobalHeader'; import TopNavHeader from '@/components/TopNavHeader'; import styles from './Header...
import test from 'ava'; import React from 'react'; import { Server as SocketServer } from 'mock-socket'; import { shallow } from 'enzyme'; import TextWidget from '../../src/widgets/text/widget'; let mockServer; test.before(() => { mockServer = new SocketServer('ws://localhost:8080'); }); test.after(() => { mockS...
var createMediapipeSolutionsWasm = (function() { var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; return ( function(createMediapipeSolutionsWasm) { createMediapipeSol...
#!/usr/bin/env node /** * Set environment variables in Travis CI */ process.chdir(`${__dirname}/../..`) const { setEnv } = require('sugos-travis') const { PublicRepo } = setEnv.presets setEnv({ values: PublicRepo })
// // Provides the ePlus University link // module.exports = function(controller) { // Trigger(s) for activating the command controller.hears( ["university"], "message,direct_message", async (bot, message) => { // Message the bot will return to the user when triggered await bot.reply(messag...
/* * * * FILL IN EACH UNIT TEST BELOW COMPLETELY * -----[Keep the tests in the same order!]---- * (if additional are added, keep them at the very end!) */ const chai = require('chai'); const assert = chai.assert; const jsdom = require('jsdom'); const { JSDOM } = jsdom; let Solver; suite('Unit...
// Compiled by ClojureScript 1.10.520 {:static-fns true, :optimize-constants true} goog.provide('ajax.formats'); goog.require('cljs.core'); goog.require('cljs.core.constants'); goog.require('ajax.interceptors'); goog.require('ajax.util'); goog.require('ajax.protocols'); /** * This will literally return whatever the un...
const fs = require('fs'); const path = require('path'); const { expect } = require('chai'); const { HttpsProxyAgent } = require('https-proxy-agent'); const rewire = require('rewire'); const { getConfig } = rewire('../../../../built/bin/lib/config'); const contentfulClient = rewire('../../../../built/bin/lib/contentful...
/** * The MIT License (MIT) * Copyright (c) 2016 Krypto Fin ry and the FIMK Developers * * 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 limitatio...
function let_article_up(article_id) { if (article_id !== 0) { let articleObj = blog["文章列表"][article_id]; blog["文章列表"].splice(article_id - 1, 0, articleObj); blog["文章列表"].splice(article_id + 1, 1); BlogInstance.writeBlogData(); document.getElementById("container").innerHTML = "<br /><br /><br />"; ...
jobber = require('./lib/jobber.js')(function (e) { var async = require('async') var mongoose = require('mongoose') var User = mongoose.model('User') var KarmaService = require('app/services/karma') function workUser (user, done) { console.log('Redoing user', user.name) KarmaService.redoUserKarma(user, functio...
/* global $ */ /* eslint-disable no-unused-vars */ function adjustScroll(destination) { $("html, body").animate( { scrollTop: $("#" + destination).offset().top }, 1000 ); }
$(function() { $('#settlement').click(function() { window.location.href = "order.html"; }) $('.all').click(function() { $(':checkbox').prop('checked', $(this)[0].checked) sum() }) // $('tbody :checkbox').click(function() { // console.log($('tbody :checkbox')); ...
// // VKontakte // (function(hello){ function formatUser(o) { console.dir(o); /*if ( o.response && o.response[0].uid ) { var user = o.response[0]; o.id = user.uid; o.first_name = user.first_name; o.last_name = user.last_name; o.name = o.first_name + " " + o.last_name; if (...
function calculo() { var altura; var peso; var resultado; var img; altura = parseFloat(document.getElementById('altura').value); peso = parseFloat(document.getElementById('peso').value); resultado = peso/(altura * altura); document.getElementById('result').innerHTML = resultado; if (resultado <18.5) { documen...
import { genSalt, hash, compare } from "bcryptjs"; export const hashPassword = async (password) => { try { const salt = await genSalt(12); if (!salt) throw new Error("Failed to generate salt"); const hashedPassword = await hash(password, salt); if (!hashedPassword) throw new Error("Failed to hash password");...
/** * The copyright in this software is being made available under the BSD License, * included below. This software may be subject to other third party and contributor * rights, including patent rights, and no such rights are granted under this license. * * Copyright (c) 2013, Dash Industry Forum. * All rights re...
const ENV = process.env.NODE_ENV; const development = ENV !== 'production'; module.exports = { context: __dirname, mode: ENV || 'development', entry: !development ? { 'vue-plotly': './src/index.js', factory: './src/factory.js', } : { example: './example/example.js', }, output: { path: __...
import{r as s,h as t,H as o,a as i}from"./p-5aff386c.js";import{g as r}from"./p-049b04eb.js";import"./p-c090076e.js";const e=class{constructor(t){s(this,t),this.inputId="ion-selopt-"+n++,this.disabled=!1,this.selected=!1}render(){return t(o,{role:"option",id:this.inputId,class:r(this)})}get el(){return i(this)}};let n=...
import { HOME_INFO, HOME_SEARCH_COUNT, HOME_RECOMMEND, HOME_PIN } from '@constants/home' const INITIAL_STATE = { homeInfo: {}, searchCount: 0, pin: [], recommend: [] } export default function home(state = INITIAL_STATE, action) { switch(action.type) { case HOME_INFO: { // 每3个分成一组 con...
'use strict' import { app, protocol, BrowserWindow } from 'electron' import { createProtocol } from 'vue-cli-plugin-electron-builder/lib' const { ipcMain } = require('electron') import installExtension /*{ VUEJS_DEVTOOLS }*/ from 'electron-devtools-installer' import * as path from "path"; const isDevelopment = process...
//# sourceMappingURL=app.f6512eb3.js.map
import React, { forwardRef } from "react"; import classnames from "classnames"; import { node } from "prop-types"; import "./AddTime.styles.scss"; import { getClassesFromProps } from "../../utils/helpers"; const AddTime = forwardRef(({ children, additionalClasses, ...props }, ref) => { const addedClasses = getClas...
const shell = require('node-powershell'); const { memoize } = require('cerebro-tools') const { shellCommand } = require('cerebro-tools'); const systemApps = [ 'InsiderHub', 'CortanaListenUIApp', 'EnvironmentsApp', 'HoloCamera', 'HoloInemPlayerApp', 'Microsoft.MicrosoftEdge', 'Microsoft.PPL...
export const goodsstatus = function (val) { // 1 未批、2 待批、3 统购和4 自购 const line = { 1: '未批', 2: '待批', 3: '统购', 4: '自购' } return line[val] } export const liststatus = function (val) { // 0 未完成还在填写 1 未审批、2 正在审批 3 审批结束 const line = { 0: '未完成还在填写', 1: '未审批', 2: '正在审批', 3: '审批结束' } return line[val] } ...
import userService from '../services/user' import authService from '../services/auth' import cameraService from '../services/camera' /* --------- Create --------- */ export const CREATE_PROFILE_START = 'CREATE_PROFILE_START' export const CREATE_PROFILE_ERROR = 'CREATE_PROFILE_ERROR' export const CREATE_PROFILE_SUCCESS...
import './App.css'; import React, {useState, useEffect} from 'react'; import {BrowserRouter as Router, Link, Route, useHistory} from "react-router-dom"; import CreateRoom from './CreateRoom.js' import JoinRoom from './JoinRoom.js' import axios from "axios"; import background from "./img/background.png"; import Session...
p5.prototype.orbitControl = function(sensitivityX, sensitivityY) { this._assert3d('orbitControl'); p5._validateParameters('orbitControl', arguments); // If the mouse is not in bounds of the canvas, disable all behaviors: const mouseInCanvas = this.mouseX < this.width && this.mouseX > 0 && this.mous...
var setData = require('@progress/kendo-angular-intl').setData; setData({ name: "ha-GH", likelySubtags: { ha: "ha-Latn-NG" }, identity: { language: "ha", territory: "GH" }, territory: "GH", numbers: { currencies: { ADP: { displayName...
import {Geodata} from "../data/model/Geodata.js"; import "./v-autofocus.js"; import "./v-autoselect.js"; Vue.component('tm-input-geodata', { props: ['content', 'actions', 'autoselect', 'autofocus'], data: function () { return { geodata: new Geodata(this.content) } }, methods: { onChange: func...
const STOR = require("Storage"); global.wOS = { ON_TIME: 10, BRIGHT : 0.5, FACEUP:true, VIBRATE:true, awake : true, time_left:10, ticker:undefined, settings:undefined, buzz: (v)=>{ if (!wOS.VIBRATE) return; v = v? v : 100; if (v<=50){ digitalPulse...
'use strict'; const path = require('path'); const utils = require('util'); const resolve = utils.promisify(require('resolve')); module.exports = async function (root) { /* Find ember-cli's entry point module relative to the current projects root */ let emberPath = await resolve('ember-cli', { basedir: root }...
Ext.define('Ext.ux.form.SearchField', { extend: 'Ext.form.field.Trigger', alias: 'widget.searchfield', trigger1Cls: Ext.baseCSSPrefix + 'form-clear-trigger', trigger2Cls: Ext.baseCSSPrefix + 'form-search-trigger', hasSearch : false, paramName : 'query', initComponent...
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var vue = require('vue'); var script = vue.defineComponent({ name: "CaretBottom" }); const _hoisted_1 = { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }; const _hoisted_2 = /* @__PURE__ */ vue.createVNode("path", { ...
// parse command line options var minimist = require('minimist'); var mopts = { string: [ 'node', 'runner', 'server', 'suite', 'task', 'version' ] }; var options = minimist(process.argv, mopts); // remove well-known parameters from argv before loading make, // ot...
let savings = 100000; let period = 12; let addition = 10000; let percent = 0.135; let result = 0; let profit = 0; for (let i = 0; i <= period; i++) { if (i = 0) { result += savings * percent / 12 } else { savings += addition; result += savings * percent / 12; } }; console.log(resul...
// // Parser - for Twitter Streaming API // var util = require('util') , EventEmitter = require('events').EventEmitter; var Parser = module.exports = function () { this.message = '' EventEmitter.call(this); }; util.inherits(Parser, EventEmitter); Parser.prototype.parse = function (chunk) { this.message...
// HELP: import { _peek } from '../_utils'; export function find132pattern(nums) { if (nums.length < 3) return false; const min = getMin(nums); const stack = []; for (let j = nums.length - 1; j >= 0; j--) { if (nums[j] > min[j]) { while (stack.length > 0 && _peek(stack) <= min[j]) { stack.po...
export * from '@styled-icons/material/Check';
// @ts-check const { dirname } = require('path') const process = require('process') const util = require('util') const findUp = require('find-up') const gitRepoInfo = require('git-repo-info') const gitconfiglocal = require('gitconfiglocal') const isEmpty = require('lodash/isEmpty') const parseGitRemote = require('pars...
import { PropTypes } from 'react-view'; import { EuiCodeEditor } from '../../../../src/components/'; import { propUtilityForPlayground, dummyFunction, } from '../../services/playground'; import 'brace/theme/github'; import 'brace/theme/cobalt'; import 'brace/theme/dawn'; import 'brace/theme/eclipse'; import 'brace...
sitemap.behavior = sitemap.behavior || {}; sitemap.behavior.scrollAndZoom = function(options) { options = options || {}; var view = {x: 0, y: 0, k: 1}; var dispatch = d3.dispatch('change'); var minScale = options.minScale || 0.1; var maxScale = options.maxScale || 1; var margin = options.margin || 0; v...
const express = require("express"); const fs = require("fs"); const crypto = require("crypto"); const aes = require("aes-js"); const argon2 = require("argon2"); const mime = require("mime"); const path = require("path"); const moment = require("moment"); const multer = require("multer"); const helmet = require("helmet"...
class FormContainer extends BaseContainer { _afterSave = null; constructor(parentContainer) { super("form", parentContainer); } set afterSave(value) { this._afterSave = value; } saveData(url) { let formData = new FormData(this._htmlElement); let copy ...
var STRING = require('../../tokenizer').TYPE.String; module.exports = { name: 'String', structure: { value: String }, parse: function() { return { type: 'String', loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd), value: this.scann...
/* 东东世界 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ============Quantumultx=============== [task_local] #东东世界 15 3,9 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_ddworld.js, tag=东东世界, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled...
/* eslint-disable no-mixed-spaces-and-tabs */ /** * A function to calculate a string without using `eval()`. * * @since v2.5.2-beta.2 * @category Math */ class Calculator { /** * Creates a calculator * @since v2.5.2-beta.2 */ constructor() { this._symbols = {}; this.defineOperator('!', this.factorial, 'post...
const checkValue = (value) => !!(value && value.length); function createOscillatorsRatingFilter(rating) { return checkValue(rating) ? { filterOR: [ { left: rating, operation: 'in_range', right: [0.5, 1], // Strong buy }, } function create...