發表文章

Python- multiple delimiters for string split

圖片
Python - multiple delimiters for string split Google Colab - Multiple patterns for string Split & Line Continuation & String zfill & String Rjust Example

Python3/OpenCV/HoughCircleTransfer Sample

圖片
 #smarties16.png #smarties16A14.png from matplotlib import pyplot as plt import sys import cv2 as cv import numpy as np def main(argv,h):     #k=argv[1] if len(argv[1])>0 else '*'     print('argv,h====',argv,h)     default_file = 'smarties.png' #'smarties.png'     filename = argv if len(argv[0]) > 0 else default_file     #filename=default_file     print("Reading image...",filename,'&\r\n performing CV2.HoughCircle...\n')     #print('filename.....'+filename+'+++++argv[0]='+argv[0],'default_file='+default_file)     #print("111111A",filename)     # Loads an image     #src = cv.imread(cv.samples.findFile(filename), cv.IMREAD_COLOR)     src = cv.imread(filename)#, cv.IMREAD_COLOR)     # Check if image is loaded fine     if src is None:         print ('*Error* opening image fa...

(NodeJS) Repeated Replace

圖片
(Step#1) string to Array--- RegExp Parse Elements to Array <pattern match> (Step#2) Array to String --- join elements by new delimiter as string.

Inquery Parser 2019/04/10Am10:04

<!DOCTYPE html> <html> <body> <p>Click the button to list all the items in the array.</p> <button onclick="numbers.forEach(myFunction)">Try it (External Layer)</button> <p id="demo1">.</p> <p id="demo">.</p> <script> demo1 = document.getElementById("demo1"); demoP = document.getElementById("demo"); var numbers = [{"col1":"    PCB MATERIAL                      MINIMUM SPACING       MIN LINE WIDTH          NUMBER OF LAYER               FINAL PCB THICKNESS"},{"col1":"                                                                                ...