What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-03 15:25:06
python traceback single line logging module
import logging class OneLineExceptionFormatter(logging.Formatter): def formatException(self, exc_info): """ Format an exception so that it prints on a single line. """ result = super().for... Add solution -
Other 2022-03-03 04:20:03
flutter&dart recommended settings for vs code
{ // Causes the debug view to automatically appear when a breakpoint is hit. This // setting is global and not configurable per-language. "debug.openDebug": "openOnDebugBreak", "[dart]": { // Automatically format code ... Add solution -
Other 2022-02-25 02:40:22
sourcetree unable to authenticate PAT for Azure Dev ops
This is still the case in the SourceTree 3.2.0 Windows beta that is only a few days old. When trying to authorize with https://dev.azure.com/OrgName, it seems to succeed in logging in, but fail at gaining Git permissions. Swapping to https://OrgName.Visua... Add solution -
Javascript 2022-02-24 19:55:02
how to send json in js with post
// Sending and receiving data in JSON format using POST method // var xhr = new XMLHttpRequest(); var url = "url"; xhr.open("POST", url, true); xhr.setRequestHeader("Content-Type", "application/json"); xhr.onreadyst... Add solution -
Python 2022-02-24 19:45:12
record and store audio in pythn
import pyaudio import wave chunk = 1024 # Record in chunks of 1024 samples sample_format = pyaudio.paInt16 # 16 bits per sample channels = 2 fs = 44100 # Record at 44100 samples per second seconds = 3 filename = "output.wav" p = pyaudio.PyA... Add solution -
PHP 2022-02-24 13:55:02
how do you get reporting
There are different type of Cucumber reports. 1. Pretty Report: It only generates a very basic report on IntelliJ/Eclipse console. We can make the console output more readable by using "monochrome = true" under @CucumberOptions. 2. Cucumber ... Add solution -
Javascript 2022-02-24 12:15:02
google script get current date
Utilities.formatDate(new Date(), "GMT+1", "dd/MM/yyyy") function changeDate() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(GA_CONFIG); // You could use now Date(); on its own but it will not look nice. ... Add solution -
Other 2022-02-22 18:05:02
what is http interface
The HTTP Interface exposes a set of API endpoints that accept parameters & JSON payloads and return JSON results. These may be called from any program capable of making an HTTP request and decoding the JSON format used for responses (e.g., C++, C#,... Add solution