What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-18 15:54:01
promises in javascript
/* A Promise is a proxy for a value not necessarily known when the promise is created. It allows you to associate handlers with an asynchronous action's eventual success value or failure reason. */ let promise = new Promise((resolve... Add solution -
Javascript 2021-09-18 14:01:05
uses of axios.all
import axios from 'axios'; let one = "https://api.storyblok.com/v1/cdn/stories/health?version=published&token=wANpEQEsMYGOwLxwXQ76Ggtt" let two = "https://api.storyblok.com/v1/cdn/datasources/?token=wANpEQEsMYGOwLxwXQ76Ggtt" let t... Add solution -
Javascript 2021-09-18 13:59:04
upload photos cypress
// programmatically upload the logo cy.fixture('images/logo.png').as('logo') cy.get('input[type=file]').then(function($input) { // convert the logo base64 string to a blob return Cypress.Blob.base64StringToBlob(this.logo, 'image/png') .then((blob)... Add solution -
Javascript 2021-09-18 10:25:06
vanilla js post form data
document.addEventListener('submit', function (event) { event.preventDefault(); fetch('https://jsonplaceholder.typicode.com/posts', { method: 'POST', body: JSON.stringify(Object.fromEntries(new FormData(event.target))), headers: { 'Content-typ... Add solution -
PHP 2021-09-18 03:53:03
use sweet alert 2 to delete confirmation laravel
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no... Add solution -
Javascript 2021-09-17 23:50:04
gatsby creating pages from contentful
const path = require('path') exports.createPages = ({graphql, boundActionCreators}) => { const {createPage} = boundActionCreators return new Promise((resolve, reject) => { const storeTemplate = path.resolve('src/templates/store.js') res... Add solution -
Javascript 2021-09-17 20:40:02
react eznyme fetch api using hooks
//app.js import React from 'react' import FetchData from './FetchData' const fetchUsers = () => fetch('https://jsonplaceholder.typicode.com/users').then((res) => res.json()) function App() { return ( <> <FetchData fetchUsers={... Add solution