Posts by Marcos Pinho • 98 points
7 posts
- 
		1 votes2 answers66 viewsA: I need to find out who’s sequence and who’s not, but my logic doesn’t workProvided that the first element is no successor to anyone: <?php $a = array(1,2,5,8,9,10,12); $length = count($a); for ($i=0; $i < $length -1; $i++) { if (($a[$i+1]-$a[$i]) == 1) { echo " "… phpanswered Marcos Pinho 98
- 
		2 votes1 answer468 viewsA: module 'cv2.cv2' has no attribute 'COLOR_BRG2GRAY'The right is COLOR_BGR2GRAY and not COLOR_BRG2GRAY'. gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) Conversion types can be seen here.… 
- 
		1 votes1 answer376 viewsA: How to eliminate noise in an image?Opencv provides 4 techniques to remove noise, one of which is the function cv.fastNlMeansDenoisingColored(). The parameters are: (original,destino,7,21,h,hColor), in which h is the parameter that… 
- 
		2 votes3 answers8133 viewsA: Count number of elements from a python listYou can use the index to find the position of the desired element and calculate the discounting amount of the total elements, for example: lista = [ 'A','B','C','D'] indice = lista.index('C')… pythonanswered Marcos Pinho 98
- 
		0 votes3 answers117 viewsA: Generate a query number?You can take the current time and multiply it with some random value, or even your bank’s last id. $id=10; $data = date('Y/m/d H:i:s'); $x = $id*strtotime($data);… 
- 
		0 votes1 answer601 viewsA: Tell what is the predominant colorIf you want to return the color as (red, yellow, green), first recommend you convert from RGB to HSV, and then make a range of each color, as for example, lower_blue = np.array([90,109,50],np.uint8)… 
- 
		1 votes1 answer47 viewsA: Search and insert do not work together - FlaskI recommend you do so: consulta = "INSERT INTO linksespecificos(ALVO) VALUES (%s)" cursor.execute(consulta,(ipLink,)) consulta = "DELETE FROM linksespecificos WHERE ID= %s"…