What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-25 11:07:11
flask exception handler
'''Application error handlers.''' from app.models.s3 import S3ClientError from app.models.threatstack import ThreatStackError from flask import Blueprint, jsonify errors = Blueprint('errors', __name__) @errors.app_errorhandler(S3ClientError) @errors.app... Add solution -
Javascript 2021-10-25 05:24:11
Manually Parsing PDF in Node.js
/* This code comes from Vincent Lab And it has a video version linked here: https://www.youtube.com/watch?v=b2dLDqmYT4I */ // Import dependencies const fs = require("fs"); const PDFParser = require("pdf2json"); // Get all the... Add solution -
Other 2021-10-24 09:19:13
retrieving from local storage and converting into class instance
// Create some Point instances let p1 = new Point(1,2); // Store them in local storage localStorage.setItem("p1", JSON.stringify(p1)); // Retrieve the data into new variables let p1Data = JSON.parse(localStorage.getItem("p1")); // c... Add solution -
Javascript 2021-10-24 07:24:06
carry forward session storage one page to another page in javascript
// transfers sessionStorage from one tab to another var sessionStorage_transfer = function(event) { if(!event) { event = window.event; } // ie suq if(!event.newValue) return; // do nothing if no value to work with if (event.key == 'getSessi... Add solution -
Javascript 2021-10-23 03:53:09
store and retrieve object from localstorage
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 -
PHP 2021-10-21 19:59:08
remove slashes from json php
json_decode($val, true, JSON_UNESCAPED_SLASHES); Add solution -
Javascript 2021-10-21 15:25:12
javascript use css custom properties
Values in JavaScript To use the values of custom properties in JavaScript, it is just like standard properties. // get variable from inline style element.style.getPropertyValue("--my-var"); // get variable from wherever getComputedStyle(element... Add solution -
Other 2021-10-21 08:43:19
jep1x
He is coding in html, css, js and php He is the CTO of Nordic Code Add solution