What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-01 07:17:02
change default python version mac
#install or update brew $ brew install pyenv #install $ pyenv install 3.7.3 #make default $ pyenv global 3.7.3 # and verify $ pyenv version 3.7.3 (set by /Users/mbbroberg/.pyenv/version) $ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n &n... Add solution -
Python 2021-09-01 00:49:01
simple mastermind programpython
import random import os def clear(): os.system("clear") # Function to print the mastermind board def print_mastermind_board(passcode, guess_codes, guess_flags): print(&q... Add solution -
Python 2021-08-30 13:16:01
sort half in ascendng and descending array
take user inputs for Month and year in integer Month = int(input('Enter the Month :')) Year = int(input('Enter the Year :')) #Check condition for Month and leap year if(Month == 2 and (Year%4 == 0) or ((Year%100 == 0) and (Year%400 == 0))): #if condit... Add solution -
Javascript 2021-08-30 03:13:01
jquery checkbox
$( "SELECTOR" ).attr( "checked" ) // Returns ‘true’ if present on the element, returns undefined if not present $( "SELECTOR" ).prop( "checked" ) // Returns true if checked, false if unchecked. $( "... Add solution -
Python 2021-08-29 23:17:02
how to find pdf file in link beautifulsoup
# Find links to pdf files in HTML with BeautifulSoup import urllib2 from bs4 import BeautifulSoup my_url = 'http://slav0nic.org.ua/static/books/python/' html=urllib2.urlopen(my_url).read() sopa = BeautifulSoup(html) current_link = '' for link in sopa.fin... Add solution -
C++ 2021-08-29 06:16:01
3x3 matrix multiplication in c++
#include <iostream> using namespace std; int main() { int a[10][10], b[10][10], mult[10][10], r1, c1, r2, c2, i, j, k; cout << "Enter rows and columns for first matrix: "; cin >> r1 >> c1; cout << ... Add solution -
Shell/Bash 2021-08-28 20:11:02
how to check cron is running or not
$ systemctl status cron # checks if cron is running $ sudo systemctl enable cron.service # enable cron to run on boot $ sudo systemctl start cron.service # start cron now $ sudo crontab -l # show all currently running cr... Add solution -
Other 2021-08-28 03:28:02
capturing-video-from-two-cameras-in-opencv-at-once
import cv2 import threading class camThread(threading.Thread): def __init__(self, previewName, camID): threading.Thread.__init__(self) self.previewName = previewName self.camID = camID def run(self): print("St... Add solution