sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").
// Returns true if valid, false if not. Note that registrationNumber param is a string (usually provided by HTML imput) | |
validateRegistrationNumber(registrationNumber: string): boolean { | |
if (registrationNumber.length !== 14) { | |
return false | |
} | |
let sum = 0 | |
let digit: number | |
for (let i = 0; i < registrationNumber.length; i++) { | |
if (i % 2 === 0) { | |
digit = parseInt(registrationNumber.charAt(i), 10) * 2 |
#!/usr/bin/env python | |
from threading import Thread, Lock | |
import cv2 | |
class WebcamVideoStream : | |
def __init__(self, src = 0, width = 320, height = 240) : | |
self.stream = cv2.VideoCapture(src) | |
self.stream.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, width) | |
self.stream.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, height) |