What do you want to save?
Add Code snippet
New code examples
-
Python 2021-08-30 02:10:02
numpy histogram 0 to 100 percent
kwargs2 = dict(histtype='step') fig, ax1=plt.subplots(1,1,sharey=True, facecolor='w',figsize=(8,6)) counts_zi, bins_zi = np.histogram(np.array(dt_mu_zi)*60) ax1.hist(bins_zi[:-1], bins_zi, weights=100*counts_zi/counts_zi.sum(),color='red', **kwargs2) x0... Add solution -
-
C++ 2021-08-30 00:06:02
find all occurrences of a substring in a string c++
#include <string> #include <iostream> using namespace std; int main() { string s("hello hello"); int count = 0; size_t nPos = s.find("hello", 0); // first occurrence while(nPos != string::npos) { ... Add solution -
VBA 2021-08-29 23:57:01
vba sheets add after last
Sheets.Add Sheets.Add After:=Sheets("Input") Sheets.Add After:=Sheets(1) Sheets.Add Before:=Sheets(2) Sheets.Add.Name = "NewSheet" ' Add sheet with name Sheets.Add After:=Sheets(Sheets.Count) ' To end of Workbook Sheets.Add(B... Add solution -
Other 2021-08-29 22:55:01
google place api online example
// This example displays an address form, using the autocomplete feature // of the Google Places API to help users fill in the information. function fillInAddress() { // Get the place details from the autocomplete object. var place = autocomplete.get... Add solution -
Shell/Bash 2021-08-29 22:14:03
bash only print duplicated lines
# Basic syntax: sort input_file | uniq -d # Sort the file first because uniq requires a sorted file to work # Note, uniq -d only prints one instance of lines that have duplicates # Use, uniq -c to count the number of duplicates in the file Add solution -
Python 2021-08-29 21:46:02
python execute shell command without waiting
import subprocess from subprocess import Popen import time from multiprocessing import Process,freeze_support def run_batfile(name='world'): subprocess.call(["launch_pg.bat"]) if __name__ == '__main__': # freeze_support() p = Process(target... Add solution