What do you want to save?
Add Code snippet
New code examples
-
C# 2021-09-10 15:04:03
php encrypt message encrypt() decrypt
function encrypt_decrypt($string, $action = 'encrypt') { $encrypt_method = "AES-256-CBC"; $secret_key = 'AA74CDCC2BBRT935136HH7B63C27'; // user define private key $secret_iv = '5fgf5HJ5g27'; // user define secret key $key = hash(... Add solution -
Other 2021-09-10 14:29:01
Network Scanner #2
import os import platform from datetime import datetime net = input("Enter the Network Address: ") net1= net.split('.') a = '.' net2 = net1[0] + a + net1[1] + a + net1[2] + a st1 = int(input("Enter the Starting Number: ")) en1 = int(... Add solution -
Python 2021-09-10 13:15:01
take screenshot of video python
import cv2 import os import time def get_frames(inputFile,outputFolder,step,count): ''' Input: inputFile - name of the input file with directoy outputFolder - name and path of the folder to save the results step - time lapse between each... Add solution -
Javascript 2021-09-10 09:45:02
javascript detect mobile device
function isMobileDevice() { var check = false; (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|i... Add solution -
Javascript 2021-09-10 05:26:01
js random id
var ID = function () { // Math.random should be unique because of its seeding algorithm. // Convert it to base 36 (numbers + letters), and grab the first 9 characters // after the decimal. return '_' + Math.random().toString(36).substr(2, 9); }; Add solution -
-
Python 2021-09-09 13:53:04
Extract bounding boxes OpenCV
import cv2 im = cv2.imread('c:/data/ph.jpg') gray=cv2.cvtColor(im,cv2.COLOR_BGR2GRAY) contours, hierarchy = cv2.findContours(gray,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE)[-2:] idx =0 for cnt in contours: idx += 1 x,y,w,h = cv2.boundingRect(cnt) ... Add solution