text
stringlengths
3.07k
16k
var express = require('express'), checkRightsAdmin = require('../../middleware/checkRightsAdmin.js'), getData = require('../../../modules/getData.js'), // insertData = require('../../../modules/insertData.js'), randNumber = require('../../../modules/randNumber.js'), renderTemplate = require('../../....
// Global deps // - three // - stats.js // - three-orbit-controls // - three-ctm-loader import { CanvasResizer } from '../lib/canvas-resizer.js'; import { Animator } from '../lib/animator.js'; import { Wave2dCanvas } from './wave2d-canvas.js'; /** * Constants */ const ENABLE_STATS = false; const ENABLE_ORBIT_CONTRO...
// Inspired by https://github.com/steven-elliott/vcard-json var fs = require ('fs'); var EventEmitter = require("events").EventEmitter; var moment = require('moment'); var _ = require ('underscore'); var s = require("underscore.string"); var utf8 = require('utf8'); var quotedPrintable = require('quoted-printable'); v...
//----------------------------------------------------------------------------------- // // Notes // //----------------------------------------------------------------------------------- var note_tags=null; // Initialisation function notesInit(all_tags) { note_tags = new tagger($('#note-tags'), { allow_dup...
/** * Module dependencies. */ var _ = require('underscore'); var mongoose = require('mongoose'); var Feature = mongoose.model('Feature'); var Content = mongoose.model('Content'); var messages = require('../../lib/messages'); var async = require('async'); /** * Load */ exports.load = function (req, res, next...
/* * Bosonic transpiler * https://github.com/bosonic/transpiler * * Copyright (c) 2013 <NAME> * Licensed under the MIT license. */ 'use strict'; var _ = require('underscore'), fs = require('fs'), cheerio = require('cheerio'), esprima = require('esprima'), escodegen = require('escodegen'), es...
const XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; const { API_URL, TDK_WORD_LIST_URL, WORDS_DIR, } = require('../constants'); const cheerio = require('cheerio'); const NE = require('node-exceptions') const WordService = { /* * Tdk'nın sitesinden istenilen kelimenin sayfasını veya ...
require("dotenv").config({ path: `.env.${process.env.NODE_ENV}`, }) const escapeStringRegexp = require("escape-string-regexp") const pagePath = `content/blog` const algoliaQuery = `{ pages: allMarkdownRemark( filter: { fileAbsolutePath: { regex: "/${escapeStringRegexp(pagePath)}/" }, } ) { ed...
/*Chrome now has issues with cross origin HTTP/S requests. To compensate, this script determines if the user is accessing the site via HTTP or HTTPS. If HTTPS, the geolocation request must go through another server, crossorigin.me, which will make it work. If HTTP, the location will be pulled from the user's IP. This i...
import PropTypes from 'prop-types'; // material import { Grid, Link, Stack, Checkbox, TextField, IconButton, InputAdornment, FormControlLabel, FormControl, Select, MenuItem, InputLabel, OutlinedInput, FormHelperText } from '@mui/material'; import { LoadingButton, MobileDatePicker, Localizati...
import classnames from 'classnames' import isEmpty from 'lodash/isEmpty' import React, { Component } from 'react' import onClickOutside from "react-onclickoutside" import storage from 'storage' import { getRecentStreams, getStreams } from '../api' import InboxIcon from './InboxIcon'; require('./StreamSelector.less') ...
import { Game } from "snake-rs-wasm"; import { memory } from "snake-rs-wasm/snake_rs_wasm_bg"; let keyCode = ''; function handleKeyEvent(event) { //console.log("keypress event, code: " + event.code); keyCode = event.code; if (keyCode === 'Space') { togglePlay(); } } function registerKeyEventH...
var mongoose = require('mongoose'); var _ = require('lodash'); var async = require('async'); var Col = require(__base+"classes/calculator/helpers/Col.js"); var Doc = require(__base+"classes/calculator/helpers/Doc.js"); var Calc = require(__base+"classes/calculator/Calculator.js"); var RabbitManage...
const _ = require('lodash') const cp = require('child_process') const chalk = require('chalk') const Listr = require('listr') const debug = require('debug')('cypress:cli') const verbose = require('@cypress/listr-verbose-renderer') const { stripIndent } = require('common-tags') const Promise = require('bluebird') const...
// tslint:disable const execSync = require('child_process').execSync; const path = require('path'); const fs = require('fs-extra'); const _ = require('lodash'); const chalk = require('@caporal/core').chalk; const globalConstants = require('@villedemontreal/general-utils').globalConstants; let _isScriptingLibItself; e...
const fs = require('fs') const path = require('path') const sharp = require('sharp') const _ = require('lodash') const tf = require('@tensorflow/tfjs-node') const Bluebird = require('bluebird') if (process.argv.length !== 3) { console.error('USAGE: train-good-model.js <input_dir>') console.error(process.argv) pr...
"use strict"; // preparation for jsdom on nodejs (not entered on browsers) if (typeof document === "undefined") { var jsdom = require("jsdom"); var document = jsdom.jsdom(); } function testMatched(id, selector) { var elems = document.createElement("div"); var a = document.createElement("span"); a.id = id; ...
import { DrawerContentScrollView, DrawerItem } from "@react-navigation/drawer"; import { CommonActions, DrawerActions, useLinkBuilder, } from "@react-navigation/native"; import I18n from "i18n-js"; import React, { useState } from "react"; import { Pressable, ScrollView, StyleSheet, Text, TouchableOpacit...
import React, { Component, Fragment } from "react"; import { Motion as RealMotion, spring } from "react-motion"; import PropTypes from "prop-types"; import uniqid from "uniqid"; const config = { stiffness: 30, damping: 10 }; const FakeMotion = ({ children }) => children({}); const Text = (props) => { const text =...
const tools = new (require('../../util/Tools.js'))() const mongoose = require('mongoose') /** The base URI for connecting to the remote MongoDB instance */ const mongoUri = require('../../util/config.json').mongoUrl /** Our collection of colors used to style the embed */ const colors = require('../../util/colors').De...
/*global chrome hashblot blotpass bloticon*/ "use strict"; function updateFromPhrase(phrase) { document.getElementById('blotpath').setAttribute('d', phrase ? hashblot.sha1qpd(phrase) : ''); } function calculateHashblot() { updateFromPhrase(blotpass.blotString({ email: document.getElementById('email').valu...
export const changeApp = () => { // to change btwn light and dark mode eventually } export const months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] export const styles = { // REUSAB...
import * as React from "react"; const STYLES_CONTAINER = { width: "100%", height: "auto", }; const STYLES_GRAPH = { viewBox: "0 0 600 600", // backgroundColor: "#f7f7f7", borderRadius: "4px", height: "600px", width: "600px", }; const STYLES_XLINE = { stroke: "#b2b2b2", srokeWidth: "1", fill: "non...
import React, { useState, useEffect } from "react"; import axios from "axios"; import { Link, useNavigate } from "react-router-dom"; import Button from "../shared/Button"; import Input from "../shared/Input"; import { useDispatch } from "react-redux"; import { showBanner } from "../../redux"; import FormHelperText from...
import React from 'react' import PropTypes from 'prop-types' import { Link, graphql } from 'gatsby' import styled, {keyframes, ThemeProvider} from 'styled-components' // import { useInterval } from '../components/useInterval' import { Layout, Wrapper, Button } from '../components' import BlocInfos from '../components/...
$(function () { //0.初始化fileinput var oFileInput1 = new FileInput(); oFileInput1.Init("momentsImgFile", "/open/uploadMomentsImg"); var momentsId = $("#momentsImgFile").attr("momentsId"); //保存为草稿 $("#saveMoments").click(function () { var content = $("#content").val(); var imgPath...
var matriz=Array(10).fill("") var titulos=Array(25) let cont = 0 titulos[0] = "Arma" titulos[1] = "<NAME>" titulos[2] = "Jean" titulos[3] = "Amber" titulos[4] = "Barbara" titulos[5] = "Beidou" titulos[6] = "Bennet" titulos[7] = "Diluc" titulos[8] = "Chongyun" titulos[9] = "Fischl" titulos[10] = "Kaeya" titulos[11] = "...
import express from 'express'; import Category from '../models/categoryModel' import { isAuth, isAdmin } from '../util'; import multer from "multer"; import {parseString} from 'xml2js'; import fs from 'fs'; import util from 'util'; import jp from 'jsonpath'; const {JSONPath} = require('jsonpath-plus'); import Product f...
const companyInterestTab = document.querySelector("#company-interest"); const candidateInterestTab = document.querySelector("#candidate-interest"); const interviewTab = document.querySelector("#interviews"); const matchingSkillsTab = document.querySelector("#matching-skills"); const companyBtn = document.querySelecto...
//Autor: <NAME> https://github.com/rubenfilipe07 var showAmPm; var showframe; var hourFormatIs12; var dateformat; var framecolor; var framecolorAsCss; function initialSet() { window.wallpaperPropertyListener = { applyUserProperties: function (properties) { var schemeColor = properties.schemecolor.value.sp...
const test = require('tape'); const LevelBlock = require('../../src/js/game/LevelMVC/LevelBlock'); const LevelPlane = require('../../src/js/game/LevelMVC/LevelPlane'); const BaseEntity = require('../../src/js/game/Entities/BaseEntity'); const Sheep = require('../../src/js/game/Entities/Sheep'); const Player = require(...
import React, { Component, useState, useEffect } from "react"; import { View, Text, StyleSheet, TouchableOpacity, ScrollView, Linking, Alert, Platform, ActivityIndicator, Image, Dimensions } from "react-native"; import { Card, CardItem } from "native-base"; import { Entypo } from "@expo/vector-ico...
const fs = require('fs-extra'); const path = require('path'); const utils = require('../utils/utils.js'); const pathUtil = require('../utils/pathUtil.js'); const t = require('@babel/types'); const nodePath = require('path'); const parse = require('@babel/parser').parse; const generate = require('@babel/generator').de...
var test = require("tape"), sanitize = require("./"); var REPLACEMENT_OPTS = { replacement: "_", }; test("valid names", function(t) { ["the quick brown fox jumped over the lazy dog.mp3", "résumé"].forEach(function(name) { t.equal(sanitize(name), name); }); t.end(); }); test("valid names", function(...
Invoke = {}; //定时器编号 Invoke.timerId = 0; //获得服务信息列表 Invoke.getServices = function(){ var $selModule = $("#sel-module"); var $selService = $("#sel-service"); var modules, services; $.ajax({ type : "GET", url : ESB_PATH + "/manger/modules/list", async : false, dataType : "json", success : f...
/* GAME SETUP */ //Canvas Variables: var canvas; var context; //Mouse Variables: var x = 0; var y = 0; var down = false; //Wait Times: var mouseWaitTime = 10; var chatWaitTime = 1000; //Onload: window.onload = function () { /* Game Controls */ //Gets the Game: getURL(); getGame(); ...
// pages/my_addShippingAddress/my_addShippingAddress.js const app = getApp(); const util = require("../../utils/util.js"); const api = require("../../api/index.js"); Page({ /** * 页面的初始数据 */ data: { addressType: "", // 无初始值,不影响结果 nowdata: [], name: "", phone: "", address: "", // 收货地址 de...
var btn_modal = document.getElementById('btn_modal'); $(document).ready(function(){ $('#btn_buscar').click(function(){ var cedula = document.getElementById('cedula').value; if(validate_cedula(cedula)){ $.ajax({ type:'POST', url:"<?php echo site_url('...
//@program /* Copyright 2014 DouZen, 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 ...
const util = require('util'); const Transform = require('stream').Transform; /** * "Init" state * @description :: State which indicates that StreamReader is initializing * @type {Number} * @private */ const INIT_STATE = 1; /** * "Buffering" state * @description :: State which indicates that StreamReader is gra...
'use strict'; // See Number.EPSILON for smallest possible error number. export const PRESET_EPSILON = 1e-08; // Simple set of colors for drawing and debugging export const COLORS = { orange: 0xFFA500, yellow: 0xFFFF00, greenyellow: 0xADFF2F, blue: 0x0000FF, lightblue: 0xADD8E6, red: 0xFF0000, gray: 0x...
$('body').show(); $('.version').text(NProgress.version); NProgress.start(); setTimeout(function () { NProgress.done(); $('.fade').removeClass('out') }, 1000); (function () { $('img').attr('draggable', 'false'); $('a').attr('draggable', 'false') })(); function setCookie(name, value, time) { var strs...
import cax from './cax' const defaultValue = { width: 0, height: 0, color: black } export function draw(root, width, height) { const stage = new cax.Stage(window.innerWidth, window.innerHeight, 'body') // root.style.x = 0 // root.style.y = 0 root.style._width = root.style.width === undefined ? width : root.sty...
import React from 'react'; import ReactDOM from 'react-dom'; import * as d3 from 'd3'; import { legendColor } from 'd3-svg-legend'; import './index.css'; class Chart extends React.Component { constructor(props) { super(props); this.state = { baseTemperature: 0, dataset: [] } } componen...
/** * @author: @AngularClass */ require('dotenv').config(); const helpers = require('./helpers'); // used to merge webpack configs const webpackMerge = require('webpack-merge'); // the settings that are common to prod and dev const commonConfig = require('./webpack.common.js'); /** * Webpack Plugins */ const Def...
let jsonData = JSON.parse(localStorage.grades) console.log(jsonData) let classData = {} const assignmentTemp = { name:"New Assignment", weight:"All Tasks / Assessments", score:"0 / 0" } for(data of jsonData){ let key = data.Title; classData[key] = data } let assWeights = {} for(period of ...
import React, { useState } from "react"; // @material-ui/core components import { makeStyles } from "@material-ui/core/styles"; import InputLabel from "@material-ui/core/InputLabel"; import Select from '@material-ui/core/Select'; import FormControl from '@material-ui/core/FormControl'; import Switch from '@material-ui...
var _str = require('underscore.string'); function emptyfn() { } /** * Perform an HTTP request * * @param cfg {Object} the request configuration as follows: * - endpoint: {String} (Required unless url is specified) the endpoint key that will be used to lookup a corresponding endpoint defined in /config/api * - me...
// audio let audioContext = null; let audioStream = null; // audio data let audioData = []; const bufferSize = 1024; let audio_sample_rate = 0; const startAudio = async () => { audioData = [] const stream = await navigator.mediaDevices.getUserMedia({ audio: true, video: false }) audioStream = stream window.A...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _Registry2 = _interopRequireDefault(require("../shared/Registry")); var _without = _interopRequireDefault(require("../../utils/collection/without")); function _interopRequireDefault(obj) { return obj && obj....
const crypto = require('crypto'); const fs = require('fs'); const mkdirpSync = require('mkdirp').sync; /** * Assert that actual and expected match or throw an Error with the given message appended by information about expected and actual value. * * @param {*} actual * @param {*} expected * @param {string} message...
import React, {useEffect, useState, useCallback, useRef} from 'react'; import {withStyles, makeStyles, fade} from '@material-ui/core/styles'; import { Table, TableBody, TableCell, TableRow, TableHead, TableContainer, Paper, Typography, Grid, InputBase, Link } from "@material-ui/core"; import {filterByType} ...
/* __ _ __ _ __ ____ __ __/ /_(_) / _________ _____(_)___ / /_/ __/ / / / / __/ / / / ___/ __ \/ ___/ / __ \/ __/ /_ / /_/ / /_/ / / (__ ) /_/ / / / / / / / /_/ __/ \__,_/\__/_/_/____/____/ .___/_/ /_/_/ /_/\__/_/ /_____/ /_/ ...
const _ = require('lodash'); const chevrotain = require('chevrotain'); const Lexer = chevrotain.Lexer; const createToken = chevrotain.createToken; const Symbol = createToken({ name: 'Symbol', pattern: /[a-zA-Z_$]\w*/ }); const KeywordLiteral = createToken({ name: 'KeywordLiteral', pattern: /:[a-zA-Z_$]\w*/ }); const...
"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new Typ...
var ot = require('./ot.js'); function Client() { this.doc = ''; // The 'master' document that the server knows this.rev = 0; // Current document revision number that the server knows this.workspace = {}; this.clientDoc = ''; // The current document from the client's point of view this.clientId = 0; ...
const util = require('../../utils/util.js'); const api = require('../../config/api.js'); const user = require('../../services/user.js'); const { SessionCheck } = require('../../config/api.js'); //获取应用实例 const app = getApp() Page({ data: { floorGoods: [], openAttr: false, showChannel: 0, ...
import extend from '../../core/extend' import {axisRight} from 'd3' // Default values. const DEFAULTS = { format: x => x, values: null } /** * Component implementing the radial axis for charts. When this component is available for a widget, its API is exposed * via the {.radialAxis} namespace. * * @function R...
const Discord = require("discord.js"); const ytdl = require("discord-ytdl-core"); let NIGHTCORE = [ "-af", "asetrate=44100*1.6,aresample=44100,equalizer=f=40:width_type=h:width=50:g=10" ]; let ECHO = ["-af", "aecho=0.6:0.3:1000:0.5"]; const db = require("quick.db"); class Music { constructor(client) { this.c...
// Copyright (c) 2022, <NAME> and contributors // For license information, please see license.txt frappe.ui.form.on('Pawn Ticket Jewelry', { validate: function(frm, cdt, cdn){ var temp_principal = 0.0; $.each(frm.doc.jewelry_items, function(index, item){ temp_principal += parseFloat(item.suggested_appraisal_va...
/** * twit-manager.js * * Manages all interaction concerning * tweets. Its functions are used in * server.js which requests tweets * based on queries supplied from the * client. twit-manager.js then returns * lists of tweets either from the Twitter * API or the database. Additionally, it * stores and handles ...
import React, { useEffect, useState, useCallback } from "react"; import { BrowserRouter, Route, Switch, Link, Redirect } from "react-router-dom"; import Home from "./core/Home"; import Users from "./user/Users"; import Signup from "./user/Signup"; import Signin from "./auth/Signin"; import EditProfile from "./user/Edit...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }...
import * as R from 'ramda'; import { resolveKey } from 'utils/s3paths'; import * as Resource from 'utils/Resource'; import * as errors from './errors'; const catchErrors = (pairs = []) => R.cond([ [R.propEq('message', 'Network Failure'), () => { throw new errors.CORSError(); }], [R.propEq('message', 'Acce...
'use strict'; const maxRounds = 25; let currentRound = 0; //reference to the object on the page let leftItem = null; let middleItem = null; let rightItem = null; //reference button const resultsButton = document.getElementById('get-results'); function shuffle(array) { //randomizes the index of each item in a gi...
/* Questions */ const arr = [11, 23, 11, 56, 11, 34, 23] const remoDuplicates = arr => { let newArr = [] arr.map(n => !newArr.includes(n) && newArr.push(n)) return newArr } const remoDuplicatesWithoutPredfined = arr => { let newArr = [] for (let i = 0; i < arr.length; i++) { if (!newArr.includes(arr[i]))...
"use strict"; const charm = require('charm'); const utils = require('./utils'); class Pace { constructor(options) { options = options || {}; if (!options.total) { throw new Error('You MUST specify the total number of operations that will be processed.'); } this.total = options.total; this.hideFini...
///////////////////////////////// // Base class ///////////////////////////////// let BASE_LEN = 2; class Base { constructor() { this.type = int(random(4)); // 0 = A, 1 = T, 2 = C, 3 = G } binds(b) { let sum = this.type + b.type; return (sum == 1) || (sum == 5); } getColour() { let c;...
/* * use fs, http(Request, Response), (except for those as parameters) * written by Mzero for MikoSite, MIT License * parseFormData and store file into writestream, can proc even ~GB(per file) files * example: * new (require("./formFileParser"))({ uploadDir: __dirname + "/test" }) * .parse(request, funct...
import * as shared from "shared.js"; function addSpell() { console.log("addSpell"); } function searchForSpells() { console.log("searchForSpells"); } function saveNewitem() { let name = document.getElementById("new-item-name").value; let cost = document.getElementById("new-item-cost").value; let quantity = ...
require('dotenv').config() const express = require('express') const axios = require('axios'); const app = express() // get config const config = require('./config.json') const port = config[0].web_port const speechKey = config[0].subscription_key; const speechRegion = config[0].region; const endpoint_id = config[0].en...
import React,{useState,useEffect} from 'react'; import Footer from './Footer'; import Nav from './Nav'; import {connect} from 'react-redux'; import {addcart,allcartitems,realextras,totalcart,deleting,checkout} from '../action/action'; import { Elements } from "@stripe/react-stripe-js" import { loadStripe } from "...
"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 from "react"; import PropTypes from "prop-types"; import { createUseStyles } from "react-jss"; import clsx from "clsx"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faClock } from "@fortawesome/free-solid-svg-icons"; import Loader from "react-loader"; import { numberWithCommas...
"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 (b.hasOwnPrope...
/* eslint-disable linebreak-style */ /* eslint-disable func-names */ const { v4: uuidv4 } = require('uuid'); const validator = require('validator'); const Product = require('../models/Product'); const Category = require('../models/Category'); const { successResponse__, ErrorResponse } = require('../utils/apiResponse');...
/* MIT License Copyright (c) 2021 King-BR 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, distri...
import L from 'leaflet' export const TrackPlayBackControl = L.Control.extend({ includes: L.Evented.prototype, options: { position: 'bottomleft' }, initialize: function (trackplayback, options) { L.Control.prototype.initialize.call(this, options) this.trackPlayBack = trackplayback this.trackP...
var gulp = require('gulp'); var gulpSequence = require('gulp-sequence'); var less = require('gulp-less'); var watch = require('gulp-watch'); var size = require('gulp-size'); var autoprefixer = require('gulp-autoprefixer'); var minifyCSS = require('gulp-minify-css'); var cleanCS...
require('dotenv').config() const express = require('express') const http = require('http') const WebSocket = require('ws') const compression = require('compression') const multer = require('multer') const uniqid = require('uniqid') const path = require('path') const mime = require('mime-types') const Logger = require('...
/* Copyright (c) 2017 amano <<EMAIL>> 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, distri...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ var users; var month_sets = []; var lineChart=null; var lineChartCanvas; var lineChartOptions; $(document).ready(function () { ...
/** * Copyright 2015 IBM Corp. * * 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 wr...
// TWITTER HANDLING STUFF //using npm twitter module /** * get the tweets from bh and rj during the period specified at battleTimeInSeconds * * @param {number} battleTimeInSeconds the time in seconds to collect tweets. * @param {function} callback A callback function that receives (error, bhArray, rjArray) where ...
"use strict"; const expect = require('chai').expect; const javaDeserialization = require('../'); const STREAM_MAGIC = "aced"; const STREAM_VERSION = "0005"; const TC_NULL = "70"; const TC_REFERENCE = "71"; const TC_CLASSDESC = "72"; const TC_OBJECT = "73"; const TC_STRING = "74"; const TC_ARRAY = "75"; const TC_CLASS...
// 1. Ages function age(num) { let n = Number(num); if (n >= 0 && n <= 2) { console.log("baby") } else if (n >= 3 && n <= 13) { console.log("child"); } else if (n >= 14 && n <= 19) { console.log("teenager"); } else if (n >= 20 && n <= 65) { console.log("adult"); }...
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import Box from 'grommet/components/Box'; import Button from 'grommet/components/Button'; import Heading from 'grommet/components/Heading'; import SpinningIcon from 'grommet/components/icons/Spinning'; import List from 'grommet-...
/* * Copyright (c) 2008-2021, Hazelcast, 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 required ...
import React, { useState} from 'react'; import {View, Text, StyleSheet, TouchableOpacity, KeyboardAvoidingView, Dimensions, StatusBar} from 'react-native'; import GoBack from '~assets/icons/drawable/goback.svg'; import Progress4 from '~assets/icons/drawable/progress_4.svg'; const BannerWidth = Dimensions.get('window'...
const Promise = require('bluebird'); const helpers = require('./helpers'); /* ======================================================================== */ /* ==== External message store implementation using ElasticSearch. ==== */ /* ======================================================================== */ cons...
import React, { Component } from "react"; import "./App.css"; import Form from "./Components/Form"; import PetList from "./Components/PetList"; import uuid from "uuid"; import _ from "lodash"; import ShowMore from "./Components/ShowMore"; import fetchJsonp from "fetch-jsonp"; class App extends Component { state = { ...
const Table = require('cli-table2') const helpers = require('./helpers') async function _getUserBikedToWorkDistance (state, userId) { const rows = await state.db.query('SELECT * FROM users WHERE id = $1', [userId + '']) if (rows.length !== 1) return null const user = rows[0] return user.biked_to_work_distance...
import React, { useState, useEffect } from 'react'; import { LatLng, circleMarker, DomEvent } from 'leaflet'; import { MapContainer, TileLayer, GeoJSON, useMapEvents } from 'react-leaflet'; import randomPointsOnPolygon from 'random-points-on-polygon'; import moment from 'moment'; import { Bar, Line } from 'react-chartj...
const xapi = require('xapi'); const SERVICE_NOW_INSTANCE_URL = 'yourinstance.service-now.com'; // Specify a URL to a service like serviceNow etc. const MONITORING_URL = 'https://' + SERVICE_NOW_INSTANCE_URL + '/api/now/v1/table/incident'; // Specify a URL to a service like serviceNow etc. const CONTENT_TYPE = "Con...
const chai = require('chai'); const { expect } = chai; const { solidity } = require('ethereum-waffle'); chai.use(solidity); const hardhat = require('hardhat'); const { deployments, ethers } = hardhat; describe('NativeStrategyCurve3Crv', () => { let deployer, treasury, user; let dai, t3crv, usdc...
const fs = require('fs'); const gulp = require('gulp'); const log = require('fancy-log'); const colors = require('ansi-colors'); const isNil = require('lodash/isNil'); const projectPath = require('../../lib/project-path'); const packageScriptsTask = cb => { const pkgFile = `${projectPath( global.SETTINGS_C...
//global var for setSizes() var pause = false; // IE blicking prevention function setSizes() { if (typeof(document.body.style.maxHeight) != "undefined" && !pause) { if (navigator.appName.indexOf("Internet Explorer")== -1) { setSizesExecute(); } else { setTimeout(function(){setSizesExecute(); pause = false;...
document.addEventListener('DOMContentLoaded', function() { var toggleName = new buiToggle('[data-bui-toggle="management-menu"]'); }); // textarea auto height var inputResize = function(elem) { var elemParent = elem.closest('.submit-form'); if(elemParent.querySelector('.target-name')) { var target = elemParent...
$(document).ready(function() { $('#datatable').DataTable({ "ajax" : digitasLink + "/admin/presence/variant/data?type=" + $("#data").data("id"), "lengthChange" : false, "processing" : true, "serverSide" : true, "pageLength" : 10 }); // call datatable $('#datatable').on( 'draw.dt', function ...
'use strict'; // Начало фикса Array.from для IE // Шаги алгоритма ECMA-262, 6-е издание, 22.1.2.1 // Ссылка: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from if (!Array.from) { Array.from = function () { var toStr = Object.prototype.toString; var isCallable = function isCallable(fn) { ...