What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-21 18:58:06
python cv2 screen capture
import numpy as np import cv2 from PIL import ImageGrab while True: img = ImageGrab.grab(bbox=(0, 1000, 100, 1100)) #x, y, w, h img_np = np.array(img) frame = cv2.cvtColor(img_np, cv2.COLOR_BGR2GRAY) cv2.imshow("frame", frame) ... Add solution -
VBA 2021-10-21 16:52:04
excel vba exit do loop infinite
'VBA has the Exit Do statement to exit a Do Loop: Do c = c + 1 If c = 750 Then Exit Do Loop While i < 1000 '------------------------------------------------------------------- 'Note: If multiple Do Loops are nested, Exit Do transfers ' ... Add solution -
Python 2021-10-21 15:43:10
how to get camera stream cv2
import numpy as np import cv2 cap = cv2.VideoCapture(0) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Display the resulting fr... Add solution -
Javascript 2021-10-21 02:28:06
5.4.3. else if Statements¶
/*If-else statements allow us to construct two alternative paths. A single condition determines which path will be followed. We can build more complex conditionals using an else if clause. These allow us to add additional conditions and code blocks, wh... Add solution -
VBA 2021-10-21 02:07:09
excel vba binary string to hexidecimal string
'Fast VBA function to convert binary string to hexadecimal string... Function BinToHex$(bin$, Optional groupBy& = 1) Dim c&, i&, j&, hNdx&, nibble&, bits$, s$ Dim b() As Byte, h() As Byte Static bHexChars() As Byte, po... Add solution -
Other 2021-10-20 07:32:03
Detect click outside React component
import React, { useRef, useEffect } from "react"; /** * Hook that alerts clicks outside of the passed ref */ function useOutsideAlerter(ref) { useEffect(() => { /** * Alert if clicked on outside of element */ ... Add solution -
Python 2021-10-20 03:38:09
fast right click loop python
import time import threading from pynput.mouse import Button, Controller from pynput.keyboard import Listener, KeyCode delay = 0.001 button = Button.left start_stop_key = KeyCode(char='s') exit_key = KeyCode(char='e') class ClickMouse(threading.Thread... Add solution