What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-18 07:21:02
combination with repetition algorithm js
(() => { 'use strict'; // COMBINATIONS WITH REPETITIONS ------------------------------------------- // combsWithRep :: Int -> [a] -> [[a]] const combsWithRep = (k, xs) => { const comb = (n, ys) => { ... Add solution -
Javascript 2021-09-17 20:11:02
react convert excel to json
import React, { useState } from "react"; import "./App.css"; import * as XLSX from "xlsx"; class ExcelToJson extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(thi... Add solution -
Other 2021-09-17 18:33:03
webrtc screen sharing without extension
var webRTCAdaptor = new WebRTCAdaptor({ websocket_url : websocketURL, mediaConstraints : mediaConstraints, peerconnection_config : pc_config, sdp_constraints : sdpConstraints, localVideoId : "localVideo", debug:true, callback : fu... Add solution -
Javascript 2021-09-17 01:35:03
Add no cores to fetch
//Obj of data to send in future like a dummyDb const data = { username: 'example' }; //POST request with body equal on data in JSON format fetch('https://example.com/profile', { method: 'POST', headers: { 'Content-Type': 'application/json', }, ... Add solution -
Javascript 2021-09-16 13:39:02
js save local storage
var testObject = { 'one': 1, 'two': 2, 'three': 3 }; // Put the object into storage localStorage.setItem('testObject', JSON.stringify(testObject)); // Retrieve the object from storage var retrievedObject = localStorage.getItem('testObject'); console.lo... Add solution -
Javascript 2021-09-16 02:42:01
example formidable multiple image upload
app.post('/upload',function(req,res){ var form = new formidable.IncomingForm(), files = [], fields = []; form.on('field', function(field, value) { console.log("field"); fields.push([field, value]); }); for... Add solution -
Javascript 2021-09-16 02:01:02
clone aJavaScript object
var student = {name: "Rahul", age: "16", hobby: "football"}; //using ES6 var studentCopy1 = Object.assign({}, student); //using spread syntax var studentCopy2 = {...student}; //Fast cloning with data loss var studentCopy3 =... Add solution