/*
Made by [egyJs.com](https://www.instagram.com/egyjs/);
*/
install it on your localhost and try it :
/*
Made by [egyJs.com](https://www.instagram.com/egyjs/);
*/
install it on your localhost and try it :
| const fetch = require("node-fetch"); | |
| const urls = ["http://35.185.40.23/", "http://distance.rip:23469/"]; | |
| Promise.all(urls.map(fetch)) | |
| .then(responses => Promise.all(responses.map(res => res.json()))) | |
| .then(multiData => multiData.reduce((merge, data) => ({ | |
| ...merge, | |
| ...data | |
| }), {})) | |
| .then(merged => { |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>Add React in One Minute</title> | |
| </head> | |
| <body> | |
| <h2>Add React in One Minute</h2> | |
| <p>This page demonstrates using React with no build tooling.</p> |
| 'use strict'; | |
| var https = require ('https'); | |
| const functions = require('firebase-functions'); | |
| const DialogFlowApp = require('actions-on-google').DialogFlowApp; | |
| console.log('set me'); | |
| exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => { | |
| console.log('Inside Main function.....yessssssss'); |
| // The events are from https://www.w3.org/TR/html5/semantics-embedded-content.html#media-elements-event-summary | |
| import videojs from 'video.js' | |
| const Plugin = videojs.getPlugin('plugin') | |
| const EVENTS = [ | |
| 'loadstart', | |
| 'progress', | |
| 'suspend', | |
| 'abort', | |
| 'error', |
| /* | |
| Let't start | |
| 1. Create a vue project with vue-cli | |
| 2. npm i xlsx | |
| 3. copy below code & paste to App.vue | |
| 4. npm run dev | |
| Here are links that I referenced to make this code. | |
| SheetJS: https://github.com/SheetJS/js-xlsx | |
| Drop & Drag: https://codepen.io/Event_Horizon/pen/WodMjp |
| // for browser using, this code requires javascript 1.7+ | |
| var arr = [ | |
| { foo: 'bar', lorem: 'ipsum' }, | |
| { foo: 'bar', lorem: 'ipsum' }, | |
| { foo: 'bar', lorem: 'ipsum dolor sit amet' } | |
| ]; | |
| arr = arr.map(JSON.stringify).reverse() // convert to JSON string the array content, then reverse it (to check from end to begining) | |
| .filter(function(item, index, arr){ return arr.indexOf(item, index + 1) === -1; }) // check if there is any occurence of the item in whole array |
| javascript:(function(){var%20s=document.createElement('div');s.innerHTML='Loading...';s.style.color='black';s.style.padding='20px';s.style.position='fixed';s.style.zIndex='9999';s.style.fontSize='3.0em';s.style.border='2px%20solid%20black';s.style.right='40px';s.style.top='40px';s.setAttribute('class','selector_gadget_loading');s.style.background='white';document.body.appendChild(s);s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('src','http://www.selectorgadget.com/stable/lib/selectorgadget.js?raw=true');document.body.appendChild(s);})(); |
| /** | |
| * If there are service workers available to us, then on window load we can register our worker | |
| */ | |
| 'serviceWorker' in navigator && window.addEventListener('load', () => { | |
| navigator.serviceWorker.register('worker.js') | |
| .then(() => { | |
| // Registration was successful | |
| console.log('ServiceWorker registration successful!'); | |
| }, (err) => { | |
| // registration failed :( |