text
stringlengths
7
3.69M
'use strict'; const ZigBeeLightDevice = require('homey-meshdriver').ZigBeeLightDevice; const HueColor = require('../HueColor.js'); class LLC020 extends HueColor { } module.exports = LLC020;
import React, { useState, useEffect } from 'react' import { fetchRoute } from '../../../store/ducks/route/fetch-actions' import { Form, Row, Col, Button } from 'react-bootstrap' import { useSelector, useDispatch } from 'react-redux' import { fetchPoles } from '../../../store/ducks/poles/fetch-actions' import './style.s...
const arrow = document.getElementById('navbarArrow'); const howToRecordCancel = document.getElementById('howToRecordCancel'); const myGifsdiv = document.getElementById('gifsResults'); const continueButton = document.getElementById('howToRecordContinue'); const howToRecordDiv = document.getElementById('howToRecordDiv');...
export const FEED_URL = "http://api.massrelevance.com/MassRelDemo/kindle.json"; export const POSTS_COUNT = 20; export const UPDATE_INTERVAL = 3000;
import Vue from 'vue'; import AppButton from '@/components/AppButton'; import AppList from '@/components/AppList'; import AppListItem from '@/components/AppListItem'; import AppLoadingMessage from '@/components/AppLoadingMessage'; Vue.component('AppButton', AppButton); Vue.component('AppList', AppList); Vue.component...
const indexCtrl = {}; const db = require('../database/database'); indexCtrl.renderIndex = (req, res) => { res.render('index') }; indexCtrl.renderAbout = (req, res) => { res.render('about') }; indexCtrl.testDB = (req, res) => { Promise.resolve() .then(function(){ return(db.query('SELECT * FR...
var express = require('express') var app = express(); var bodyParser = require('body-parser'); var cors = require('cors'); var morgan = require('morgan'); var path = require('path'); // configuro los parámetros de mi servidor. app.set('puerto', process.env.PORT || 3003); app.use(bodyParser.json()); app.use(bodyParse...
webpackJsonp([2],{ /***/ 1: /***/ (function(module, exports, __webpack_require__) { console.log('hello world'); __webpack_require__(0) __webpack_require__(5); /***/ }), /***/ 5: /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }) },[1]);
/* Given a collection of intervals, merge all overlapping intervals. */ /*Example 1: Input: [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6]. */ /*Example 2: Input: [[1,4],[4,5]] Output: [[1,5]] Explanation: Intervals [1,4] and [4,...
var rock = "Rock"; var paper = "Paper"; var scissors = "Scissors"; var player1Score = 0; var player2Score = 0; var numberToWin = 3; var player2Choice; $(function(){ //when page is done loading player2Choice = getComputerMove(); console.log("Player 2: " + player2Choice); $(".move-rock").on('click', f...
var searchData= [ ['w',['w',['../classAether_1_1Element.html#a324fda305a92166da025d9cca85b1502',1,'Aether::Element']]], ['waituntildone',['waitUntilDone',['../namespaceAether_1_1ThreadPool.html#a1f12a9a1d957277a2e171511e17fd073',1,'Aether::ThreadPool']]], ['wraparound',['wrapAround',['../classAether_1_1Spinner.ht...
import { Routes } from 'Routes'; const NODE_ENV = process.env.NODE_ENV; const BASE_GROUP = process.env.BASE_GROUP; export const uwerSetCookieDefaults = { path: '/', httpOnly: true, signed: true }; export const getFullGroupName = groupName => `${BASE_GROUP}${groupName}`; export const ensureAuth = (returnUrl = '/') =...
define([], function () { return { "PropertyPaneDescription": "Konfigurieren Sie das Quiz.", "ConnectivityGroupName": "Konnektivität", "ApiUrlFieldLabel": "API-Url", "ValidateApiUrlNotNull": "Die API-Url darf nicht leer sein.", "ValidateApiUrlValidUrl": "Die API-Urll muss eine gültige URL sein.",...
'use strict'; const express = require('express'); const Item = require('../models/itemModel'); const Img = require('../models/imgModel'); var router = express.Router(); router.get('/', function (req, res){ Item.find({}).populate('itemImg').exec(function (err, items){ res.status(err ? 400 : 200).send(err || ite...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Field, reduxForm } from 'redux-form'; import TextField from '../../../form-fields/text'; import Checkbox from '../../../form-fields/checkbox'; import {maskCurrency} from '../../../../utils/normalizations'; import Typography from 'mat...
// Sources and compiles all handlebar templates found in this folder for future use. // This happens synchronously and only once, to ensure that they are available when needed. var fs = require('fs') , path = require('path') , handlebars = require('handlebars') ; function isHandlebar(file) { var ext = path.ex...
const jwt = require('jsonwebtoken'); class MiddlewareCompanies{ profile(req, res, next) { try { const payload = jwt.verify(req.headers.authorization.split(' ')[1], process.env.S); console.log(payload); if(payload.profile === "Administrador" || payload.profile === "Contac...
import React from 'react' function Footercard(props) { return ( <> <div className="footer_card"> <div className="footer_cards"> <div className="footer_card_header"> {props.title} </div> <hr...
module.exports = { checkLoggedUser: (req, res, next) => { req.session.currentUser ? next() : res.status(401).json({ code: 401, message: 'Please, log-in' }) } }
import React, {useEffect} from "react"; import {Button, FormControl, InputLabel, MenuItem, Select} from "@material-ui/core"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import {makeStyles} from "@material-ui/core/styles"; import {useHistory} from "react-router-dom...
import React from 'react'; const Header = () => { return( <header className='header row'> <div className='header-content col-md-12'> <h1>Nate Sargent</h1> <h3>Front-End Web Developer</h3> </div> </header> ); }; export default Header;
//Axios to handle POST/GET Async Request from Express const axios = require('axios').default; // var dotenv = require('dotenv'); dotenv.config(); // I am adding this just in case it essential to meet the project rubric :) // var meaningcloudApi = { // application_key: process.env.meaningcloud_API_KEY, // }; cons...
import { Meteor } from 'meteor/meteor'; import { Template } from 'meteor/templating'; import { Products } from '../../Collections/Products.js'; //import { Carts } from '../../Collections/Carts.js'; import './SellerHomeLayout.html'; import './SellerMainLayout.html'; Template.SellerHomeLayout.onCreated(function () { ...
const router = require('express').Router(); const Channels = require('./controller'); const MiddlewareChannels = require('./middleware.js'); const channels = new Channels; const middleware = new MiddlewareChannels; router.get('/channels', middleware.profile, channels.getChannels); router.post('/channel', middleware.p...
(function ($) { $(document).ready(function () { var messages = $.parseJSON(Drupal.settings.champ.notyMessages); for (var i = 0; i < messages.length; i++) { var noty = $("div#champ-state-noty-container").noty({ text: messages[i]['text'], type: messages[i]['...
module.exports = { meta: {}, data: { GOOGLE_MAPS: { URL: 'https://googlemaps.fake.api', KEY: 'th1sisafak3key' }, BACKEND_API: { URL: 'https://mysite.com/api' } } }
var prefix = "/comment" $(document).ready(function(){ $('body').layout({ west__size: 185 }); queryList(); }); function queryList() { var columns = [{ checkbox: true }, { field: 'author', title: '回复人' }, { field: 'replyer', ...
const HtmlWebpackPlugin = require('html-webpack-plugin') const path = require('path') module.exports = { module: { rules: [ { test: /\.(css|scss|sass)$/i, use: [ 'style-loader', 'css-loader', 'sass-loader', { loader: 'postcss-loader', ...
$(document).ready(function(){ var path = window.location.pathname; var page = path.split("/").pop(); var modal = document.getElementById('modalBackground'); if(page == 'confirm') { var cancelPurchase = document.getElementById('cancelPurchase'); var purchaseButton = document.getElementById('purchaseBu...
import React from 'react'; import classnames from 'classnames/bind'; import styles from './toggle.scss'; const cx = classnames.bind(styles); const Toggle = (props) => { const { type, onMouseDown, right, left, children, } = props; const handleMouseDown = () => { onMouseDown(type); }; ...
import React from "react"; import "../Vaccine/vaccine.css"; const VaccineInfo = () => { return ( <div id="Parent-Container-vaccine-Info"> <h2>Vaccine</h2> <div className="vaccine-info-container"> <p> The goverrnment has announced a priority campaign to get second doses to people in time. Check ...
// Generated by CoffeeScript 1.3.3 (function() { var Element; Element = (function() { function Element(value, browser) { if (value == null) { throw new Error("no value passed to element constructor"); } if (browser == null) { throw new Error("no browser passed to element cons...
! function ($) { "use strict"; var FormWizard = function () { }; FormWizard.prototype.createBasic = function ($form_container) { $form_container.children("div").steps({ headerTag: "h3", bodyTag: "section", transitionEffect: "slideLeft", //onFinish...
/* GetItemFrom( data, { Controller: function(x){ return x["Column"]; }, // or "Column" Name: function(x){ return x["Column"] }, // or "Column" Where: function(x){ return (x["Column"]=="valeur"); }, Options:{ option1: function(x){ return "Column"; }...
var request = require("request"); var events = require("events"); function Dashi(options) { this.access_token = options.access_token; this.options = options; events.EventEmitter.call(this); } Dashi.prototype.__proto__ = events.EventEmitter.prototype; Dashi.prototype.send = function(uri, data, done) { var self = ...
d3.selection.prototype.appendJSX = d3.jsx_append d3.select('#chart').appendJSX(<svg width={84} height={42}></svg>).appendJSX(<g id="group"> <rect className="test" width={50} height={50}></rect> <text x={25} y={25} dy="0.35em" textAnchor="middle" fill="white">Text</text> </g>)
import styled from "styled-components"; export const Container = styled.div` display: flex; justify-content: center; width: 100%; `; export const Form = styled.form` display: flex; flex-direction: column; background-color: #fff; padding: 40px; margin-top: 100px; margin-bottom: 100px; border-radi...
module.exports = { name: 'user-password', path: '/user-password/:id', components: { page: require('./../../../Views/Cartalyst/Users/-4-Password/Page'), header: require('./../../../Views/Cartalyst/Users/-2-Dashboard/Header') }, }
/* Sprout DB Update API John Brell G. Ladiero C.A.L.S.O */ var express = require('express'); var router = express.Router(); const update = require('../dependencies/update'); var bodyParser = require('body-parser') router.use(bodyParser.json()) router.use(bodyParser({limit: '3mb'})) //create router.post('/...
'use strict'; module.exports = (sequelize, DataTypes) => { var Model = sequelize.define('Entity', { id: { field: 'entity_id', type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true }, categoryId: { field: 'entity_category_id...
export const EVENTS = [ { id: 0, name: "Meet Apollo One", date: "August 22, 2020", image: "/assets/images/apollo-one.jpg", family: "Wanana" }, { id: 1, name: "Jeffy proposed to Bry", date: "July 25, 2020", image: "/assets/images/chu-bry...
var pic = 0; function picturechange() { if (pic==0) { document.getElementById("mainpic").style.display='none'; document.getElementById("altpic").style.display='block'; } else { document.getElementById("mainpic").style.display='block'; document.getElementById("altpic").style.display='none'; ...
import React,{Component} from 'react'; class Logo extends Component { render(){ const style = { color:"white", fontSize:'20px' } return ( <div> <h1 style = {style}>Mafia</h1> </div> ) } } export default Logo;
import { createClient } from '@supabase/supabase-js'; import axios from 'axios'; import { useCallback } from 'react'; export const supabase = createClient( process.env.NEXT_PUBLIC_SUPABASE_URL, process.env.NEXT_PUBLIC_SUPABASE_KEY ); export const typeTableDB = async () => { return await supabase .from('type...
/* * Copyright (C) 2009-2014 SAP SE or an SAP affiliate company. All rights reserved */ // define a root UIComponent which exposes the main view jQuery.sap.declare("sap.ca.scfld.md.ComponentBase"); jQuery.sap.require("sap.ui.core.UIComponent"); jQuery.sap.require("sap.ca.scfld.md.ConfigurationBase"); jQuery.sa...
// Learn cc.Class: // - [Chinese] http://www.cocos.com/docs/creator/scripting/class.html // - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/class/index.html // Learn Attribute: // - [Chinese] http://www.cocos.com/docs/creator/scripting/reference/attributes.html // - [English] ...
/** * Created by Vlad on 03.03.2016. */ var React = require('react'); var classNames = require('classnames'); var Properties = require('../../const/properties'); var Actions = require('../../actions/routes'); var Filters = require('../../actions/filters'); var Entertainments = require('../../actions/entertainments');...
import $ from 'jquery'; import 'jquery.dotdotdot'; export default function ellipsis() { function ellipsisGenerator($target) { const targetEllipsis = $($target); let targetHeight, $this; if($($target).length){ targetEllipsis.each(function(){ $this = $(this); ...
var term_level = require('../queries/term_level'); module.exports = { term_level: { get_query_fn: term_level.getQuery } };
module.exports = { jwtSecret: process.env.JWT_SECRET || '9165e573-6dbc-4585-89bc-369656498e56' };
var mongoose = require('mongoose'); //define schema var recordSchema = new mongoose.Schema({ date: String, username: String, time: Number, distance: Number, speed: Number, calories: Number }); var recordModel = module.exports = mongoose.model('Records', recordSchema);
export { default } from './ButtonForm'; export * from './ButtonForm';
/** * Created by miuan on 7/10/14. */ (function() { function BlockOperators(langs){ 'use strict'; var self = {} self.words = {}; self.usagesWords = {}; self.langs = langs; self.diffWordUsages = function(actUsages, prevUsages){ //var actualWordCount =...
// routes/home.js var express = require('express'); const nodemailer = require('nodemailer'); var router = express.Router(); // Home 프로젝트 리스트 가져옴 router.get('/', function(req, res){ res.render('index'); }); router.post("/", function(req, res, next){ let email = req.body.email; let message = req.body.message; ...
/** * Copyright (c), 2013-2014 IMD - International Institute for Management Development, Switzerland. * * See the file license.txt for copying permission. */ define([ 'Underscore', 'jquery', 'rangy-core', 'rangy-classapplier', 'util/PubSub' ], function (_, $, rangy, cssapplier, PubSub) { 'u...
import React from 'react'; const BlogDetails = (props) => { const {title, desc, img} = props.blog; return ( <div class="card" style={{width: '25rem', marginBlock: '1rem'}}> <img src={img} class="card-img-top" alt="..."/> <div class="card-body"> <h5 class="card-t...
import DataType from 'sequelize'; import to from 'await-to-js'; import Model from '../../sequelize'; const Setting = Model.define('Setting', { // id: { // type: DataType.INTEGER(11), // allowNull: false, // primaryKey: true, // autoIncrement: true, // }, applicationName: { type: DataType.STRI...
var x = 5; var y = 1; var arr = [9,10,10]; var jumps = 0; var metersCrossed = 0; console.log(arr.length); for(i=0; i < arr.length; i++ ){ jumps = jumps+1; metersCrossed = metersCrossed + x; console.log('jumps1', jumps); console.log('metersCrossed1', metersCrossed); if(metersCrossed < arr[i]){ ...
// let and var- let allows us to use block scoping in JS, //thanks to let youare sure that variable you use inside //the block stays in that block and isn't accesible outside of it //varchanged to let for backward compability reasons /*let age = 30; if (true) { let age = 27; } console.log(age);*/ //const - we ca...
import React from 'react' function Overview() { return ( <div> <h1>Overview Page</h1> </div> ) } export default Overview
const shpping = () => { return { categories: [ { id: '1', name: 'すべてのカテゴリ' }, { id: '2498', name: '食品' }, { id: '2501', name: 'コスメ、美容、ヘアケア' }, { id: '2502', name: 'スマホ、タブレット、パソコン' }, { id: '2505', name: '家電' }, { id: '2511', name: 'ゲーム、おもちゃ' }, { id: '2512', name: 'スポーツ' ...
/** * Copyright (c) 2013 Oculus Info Inc. * http://www.oculusinfo.com/ * * Released under the MIT 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 without restrictio...
var label = require('./db_settings').label; module.exports = function(db,start,end){ return new Promise(function(resolve,reject){ db.cypherQuery('MATCH p=allShortestPaths((a:'+label+')-[*]-(b:'+label+')) WHERE a.index={start} AND b.index={end} RETURN rels(p)',{ start:start, end:end ...
const octokit = require('@octokit/request'); const ProgressBar = require('progress'); const token = process.env.TOKEN; if (!token) throw Error('no TOKEN provided'); const owner = 'everscale-actions'; const repo = 'evernode-se'; async function main() { const headers = { authorization: `token ${token}` }; const r...
angular.module("ngApp.hsCodejobs").controller("NoHSCodeJobsController", function ($scope, UserId, toaster, $uibModalInstance, uiGridConstants, JobService, AppSpinner, $translate) { var setMultilingualOptions = function () { $translate(['FrayteError', 'FrayteWarning', 'PleaseOperatorFromDropdown', 'ErrorWh...
/** * @description 为内容提供遮罩,一个页面只需new一次即可 * @constructor */ class Mask { /** * @description 显示遮罩层 * @param {Object} parameter 遮罩层的样式 backgroundColor背影颜色 transparency透明度 zindex层级 */ show(parameter = {}) { let oMask = this.oMask || document.createElement("div"); this.oMask = oMas...
//风云人物 const api = require("../../../utils/request.js") var app = getApp() var page = 0 var num = 20 Page({ /** * 页面的初始数据 */ data: { // isHideRefresh: true, isHideLoadMore: true, isLoadMore: true, searchType: 0, innovationIndex: '', increase: '', increasePercentage: '', fieldId...
// LIST OF SURNAME // 1. Create surname array let surnames = ["Bianchi", "Neri", "Rossi", "Verdi", "Gialli"]; // 1.1 Inject list elements as li const printList = (newMember) => { document.getElementById("surname-list").innerHTML = ""; for (let i = 0; i < surnames.length; i++) { if (surnames[i] === newM...
import React from 'react'; export const withValue = (value) => (OriginalComponent) => (props) => ( <OriginalComponent {...props} value={value} /> ); const HoC = (props) => { return ( <div> <h1>Testing</h1> <h3>Value: <span>{props.value}</span></h3> </div> ); } export default withValue(...
var searchData= [ ['hasbehavior',['hasBehavior',['../classRobot.html#aac3b345eec6840d59d92a79c088aa516',1,'Robot']]], ['haskicker',['hasKicker',['../classRobot.html#a4c4623d22f15e0517a9b56a1751ac14d',1,'Robot']]], ['hassupport',['hasSupport',['../namespacejoystick.html#ac257eddebaf44cdcaaf2142b3d552f75',1,'joysti...
// jscs:disable jsDoc module.exports = function () { return function persist (Model, instance, callback) { var key = this.createEphemeralKey(Model, instance.getPrimaryKey()) this.client.persist(key, function (err, reply) { (callback || function () {})(err, reply === 1) }) } }
describe('ga_time_service', function() { var gaTime; beforeEach(function() { inject(function($injector) { gaTime = $injector.get('gaTime'); }); }); it('converts correct timestamps to year', function() { var t = '20101231'; var y = gaTime.getYearFromTimestamp(t); expect(y).to.equal(...
module.exports = { "content": [ { "id": "5ebd188e7d5b7b0343a860ee", // id "country": "string", "internalName": "internalName 1", // Cast name "metaData": [ { "displayName": "displayName 1", "shortBio": "string", "nickname": "string", "seo": "...
function solve() { class Figure { constructor(units = 'cm') { this._ratio = { 'm': 0.1, 'cm': 1, 'mm': 10 }; this.units = units; this._k = this._ratio[this.units]; } toString() { return `Figures units: ${this.units}`; } } clas...
import WebMercatorViewport from 'viewport-mercator-project'; import useException from './useException'; const DEFAULT_ZOOM = 16; const bboxExceptions = { fr: { name: 'France', bbox: [ [-4.59235, 41.380007], [9.560016, 51.148506], ], }, us: { name: 'United States', bbox: [ ...
export function app(id) { // Your web app's Firebase configuration var firebaseConfig = { apiKey: "AIzaSyCWH_f74iDZvJE7cMG8mIdRqtffLZmWmbo", authDomain: "nienluancntt-b1606931.firebaseapp.com", databaseURL: "https://nienluancntt-b1606931.firebaseio.com", projectId: "nienluancntt-b1606931", stora...
/** * 读取src/pages/home/menuList.json 文件获取配置 */ const fs = require('fs'); const path = require('path'); const ROOT_PATH = process.cwd(); const MENU_LIST_PATH = path.join(ROOT_PATH, 'src/pages/home/menuList.json'); module.exports = () => { return new Promise((resolve, reject) => { try { const menu...
(function(window, document, $, undefined){ $.fn.responsiveImage = function(resolution, callback){ if (! resolution) return; $(this).each(function(){ var self = $(this); var node = self.is('noscript') ? self : self.find('noscript'); var sources = $.parseJSON( node.attr('data-src') ); ...
import React from 'react'; import styled from 'styled-components'; import FooterLinks from './FooterLinks'; import FooterLogos from './FooterLogos'; import Section from '../Section/Section'; const StyledSection = styled(Section)` > div { display: flex; flex-wrap: wrap; flex-direction: column; paddin...
const express = require('express'); const ProdutoController = require('../controllers/ProdutoController'); const router = express.Router(); router.get('/criar', ProdutoController.criarProduto); router.get('/deletar/:id', ProdutoController.deletarProduto); module.exports = router;
/* loadConf is called when at least one toggle changes state requirements: - at most one configuration can be load in the same time - at least one loaded configuration at any time parameters: - field: the clicked field */ function loadConf(field) { console.log(field.getAttribute("checked")); // TODO: Change th...
import React, { useEffect, useState } from "react"; import Loader from "./Loader"; import StationsFilter from "./StationsFilter"; import Stations from "./Stations"; import InfoSection from "./InfoSection"; import { RadioBrowserApi } from "radio-browser-api"; const STATIONS_LIMIT = 80; function App() { const [isLo...
import React from 'react'; import List from "@material-ui/core/List"; import ListItem from "@material-ui/core/ListItem"; import ListItemText from "@material-ui/core/ListItemText"; import Divider from "@material-ui/core/Divider"; import Card from "@material-ui/core/Card"; import {makeStyles} from "@material-ui/core/styl...
const mongodb = require("mongodb"); const assert = require("assert") const config = require('../config/db.config'); const objectID = require('mongodb').ObjectID; const url = config.dataDB; //database url const dbName = config.userCollection class UserService{ user_auth(username,password,success,error){ /...
import React from 'react' import styled from 'styled-components'; export default function FlexRow({ style, children }) { return ( <S_FlexRow style={style}> {children} </S_FlexRow> ) } const S_FlexRow = styled.div` display: flex; flex-direction: row; `;
import styled from 'styled-components'; export const Preview = styled.div` flex-grow: 1; width: 100%; height: 300px; max-width: 600px; background-image: url('${({ src }) => src}'); background-size: contain; background-repeat: no-repeat; background-position: center; background-color: gainsboro; bord...
///The Coercion of Javascript..... console.log('5' + 5) console.log('5' - 5) //The Arrow Function.. let myArrow = (num1, num2) => { num1 = parseInt(num1) return num1 + num2 } console.log(myArrow('5', 5)) //The Array Object... let ourMembers = [{ na...
var users = angular.module('users', ["xeditable"]); users.config(function($interpolateProvider){ $interpolateProvider.startSymbol('[['); $interpolateProvider.endSymbol(']]'); }); users.controller('usersController', function($scope, $http, $filter, $window) { $http.get('http://beer/api/user').success(fun...
export const ADD_TODO = "ADD_TODO"; export const DELETE_TODO = "DELETE_TODO"; export const TOGGLE_COMPLETED = "TOGGLE_COMPLETE"; export const MARK_COMPLETE = "MARK_COMPLETE"; export const UPDATE_TODO = "UPDATE_TODO";
async function main() { console.time("runtime"); // Check if Geolocation is not supported by the browser if (!navigator.geolocation) { $(".error > p").append("Geolocation is not supported by this browser."); $(".sk-chase").addClass("d-none"); $(".error").removeClass("d-none"); ...
const formidable = require("formidable") const moment = require("moment") const fs = require("fs") const JSZip = require("jszip") // Download a file exports.downloadFile = (req, res) => { let timeStamp = req.params.timeStamp fs.readdir("/tmp", (err, items) => { let filesMatched = [] items.forEach((item)...
import 'promise-polyfill/src/polyfill'; // Plain Javascript //event listener: DOM ready function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function () { if (oldonload) { ...
export const muiStyles = theme => ({ typographyRoot: { marginRight: 10, alignSelf: 'center', marginBottom: 12, }, })
function foo1(){ let arr1 = []; for(var i = 0; i < 3; i++){ setTimeout(() => {console.log(i)}, 0); } return arr1; } function foo2(){ let arr2 = []; for(let j = 0; j < 3; j++){ setTimeout(() => console.log(j), 0); } return arr2; } console.log(foo1()); console.log(foo2());
import React, {Component} from 'react'; export default class ToDoItemList extends Component { constructor(props) { super(props); } render() { return ( <ul> { this.props.items.map((item, index) => ( <li key={index}> ...
/** * Created by Sahil Makhijani on 4/15/2017. */ var express = require('express'); var fetch = require('node-fetch'); var router = express.Router(); router.get('/:id/edit', function(req, res) { fetch('https://southernct-443-robots-api.herokuapp.com/api/robots/' + req.params.id) .then(function (response)...
function runTest() { FBTest.openNewTab(basePath + "script/watch/5019/issue5019.html", function(win) { FBTest.enablePanels(["script", "console"], function(win) { FBTest.waitForBreakInDebugger(null, 17, false, function() { FBTest.setWatchExpressionValue(null...
const typography = { fontFamily: [ "Inter", "-apple-system", "BlinkMacSystemFont", '"Segoe UI"', "Roboto", '"Helvetica Neue"', "Arial", "sans-serif", '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"', ].join(","), fontSize: 13, fontWeightLi...
/* eslint-disable react/no-unused-prop-types */ /* eslint-disable no-plusplus */ import PropTypes from 'prop-types'; import Head from 'next/head'; import React, { useState, useContext } from 'react'; import { Container } from 'react-bootstrap'; import SweeperCreate from '../../src/components/sweeper/SweeperCreate'; i...
"use strict"; // Задача №4 (function () { console.log('****** Task 4 ******'); //********* function newFunc(s, a, b) { return Math.max(s.lastIndexOf(a), s.lastIndexOf(b)) } //******** function func(s, a, b) { if (s.match(/^$/)) { return -1; } var i = s.length -1; var aIndex = -1; var bI...