What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-20 21:49:14
Python Tkinter timer animation
#!/usr/bin/env python3 # Display UTC. # started with https://docs.python.org/3.4/library/tkinter.html#module-tkinter import tkinter as tk import time def current_iso8601(): """Get current date and time in ISO8601""" ... Add solution -
Javascript 2021-11-20 19:30:21
strapi.io react
import React from 'react'; // Parses the JSON returned by a network request const parseJSON = resp => (resp.json ? resp.json() : resp); // Checks if a network request came back fine, and throws an error if not const checkStatus = resp => { if (r... Add solution -
Other 2021-11-19 11:40:36
new date to locale string
#New date to locale string: const event = new Date(Date.UTC(2012, 11, 20, 3, 0, 0)); const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; console.log(event.toLocaleDateString('de-DE', options)); // expected output: Donne... Add solution -
Shell/Bash 2021-11-18 20:37:14
pwa install
buttonInstall.addEventListener('click', (e) => { // Hide the app provided install promotion hideMyInstallPromotion(); // Show the install prompt deferredPrompt.prompt(); // Wait for the user to respond to the prompt deferredPrompt.userChoice.then... Add solution -
-
Python 2021-11-18 04:53:08
googletrans languages
# here be dict object of google translate languages 'cause that's the easiest way to explain it to you and you know how to code (or are learning) googletrans_key_for_languages = { 'af': 'afrikaans', 'sq': 'albanian', 'am': 'amharic', 'ar':... Add solution -
Other 2021-11-17 22:55:15
putchar getchar tolowercase char c language printf
#include <stdio.h> #include <ctype.h> int main() { char c; printf("Enter some character. Enter $ to exit...\n"); while (c != '$'); { c = getchar(... Add solution -
PHP 2021-11-17 06:19:14
php array to csv string
Instead of writing out values consider using 'fputcsv()'. This may solve your problem immediately. function array2csv($data, $delimiter = ',', $enclosure = '"', $escape_char = "\\") { $f = fopen('php://memory', 'r+'); foreach ($da... Add solution
Best helpers
Ranking is empty