What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-31 01:26:15
sttripe for payment in react native andorid
import React from 'react';import AddSubscriptionView from '../components/AddSubscriptionView';const STRIPE_ERROR = 'Payment service error. Try again later.';const SERVER_ERROR = 'Server error. Try again later.';const STRIPE_PUBLISHABLE_KEY = 'Your Key';/*... Add solution -
Javascript 2021-11-20 23:44:09
node sleep
// one liner await new Promise(resolve => setTimeout(resolve, 5000)); // or re-usable `sleep` function: async function init() { console.log(1); await sleep(1000); console.log(2); } function sleep(ms) { return new Promise((resolve) => { ... Add solution -
Javascript 2021-10-01 15:57:03
javascript resize image base64
function resizeImage(base64Str, maxWidth = 400, maxHeight = 350) { return new Promise((resolve) => { let img = new Image() img.src = base64Str img.onload = () => { let canvas = document.createElement('canvas') const MAX_WID... Add solution