Posts by Patterson Silva • 279 points
4 posts
-
7
votes1
answer1031
viewsQ: How do I know if a point (x, y) is within the filled percentage of a pie chart?
I arrived at this code showing whether a point (x, y) is inside or outside a circle on a Cartesian plane. def dentro_fora(p, x = 0, y = 0): r = cx = cy = 50 if (x - cx)**2 + (y - cy)**2 < r**2:…
-
3
votes1
answer3038
viewsQ: Foreign key creation error in Mariadb
When trying to create the toy table, the following error appears: ERROR 1005 (HY000): Can’t create table brinquedos.brinquedo (Rrno: 150 "Foreign key Constraint is incorrectly Formed") Follows the…
-
7
votes2
answers798
viewsQ: Mariadb ERROR: ERROR 1709 (HY000): Index column size Too large. The Maximum column size is 767 bytes
When I run this code on Mariadb, it gives me this error when trying to create the toy table: ERROR 1709 (HY000): Index column size Too large. The Maximum column size is 767 bytes. I don’t know how…
-
0
votes1
answer225
viewsQ: How to increment the varchar() code field automatically in Mysql?
I need to do a stock control, where the code of the products should be varchar, because the code will be formed by the abbreviated name of the product category followed by a sequential number, so I…