What do you want to save?
Add Code snippet
New code examples
-
C# 2021-09-07 04:27:03
load webpage without crashing C#
public void LoadDocument(string html, string link) { string html = "<html><head>"; html += "<meta content='IE=Edge' http-equiv='X-UA-Compatible'/>\n" + "\n<body>" + "<iframe i... Add solution -
Other 2021-09-06 22:58:03
plotly heatmap hovertemplate vs hover text
import plotly import random plotly.offline.init_notebook_mode() colorscale = [[0, '#454D59'],[0.5, '#FFFFFF'], [1, '#F1C40F']] x = [2015, 2016, 2017] y = ['March', 'February', 'January', 'December', 'November', 'October', 'September', 'August', 'July', ... Add solution -
Other 2021-09-06 07:52:01
JET token authentication in Django UTC-1
from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase from django.contrib.auth.models import User class AuthViewsTests(APITestCase): def setUp(self): self.username = 'usuario' ... Add solution -
Python 2021-09-06 07:34:01
python round 1 decimal place
>>> x = 13.949999999999999999 >>> x 13.95 >>> g = float("{0:.2f}".format(x)) >>> g 13.95 >>> x == g True >>> h = round(x, 2) >>> h 13.95 >>> x == h True Add solution -
Python 2021-09-05 21:26:01
discord.py commands.group
@bot.group() async def git(ctx): if ctx.invoked_subcommand is None: await ctx.send('Invalid git command passed...') @git.command() async def push(ctx, remote: str, branch: str): await ctx.send('Pushing to {} {}'.format(remote, branch)) Add solution -
Javascript 2021-09-05 14:31:01
winston logger levels
const winston = require('winston'); const loggers = { mjson: winston.createLogger({ level: 'info', format: winston.format.json(), transports: [new winston.transports.File({ filename: 'app-info.log'})], }), simple: winston.createLogger(... Add solution -
Python 2021-09-05 09:51:01
how to convert pdf to word using python
# credit to Stack Overflow user in the source link # requires LibreOffice installed import os import subprocess for top, dirs, files in os.walk('/my/pdf/folder'): for filename in files: if filename.endswith('.pdf'): abspath = os.... Add solution