Posts by Aleczk • 97 points
8 posts
-
0
votes0
answers55
viewsQ: Even using a traffic light, I face block repetition. Why and how to avoid?
So, I have a code that I put a semaphore, thus avoiding overlap in the print, but I notice some strange occurrences of the same while. Why does this happen? There are ways to avoid? import threading…
python-3.xasked Aleczk 97 -
1
votes1
answer31
viewsQ: Is it bad practice not to specify NOT NULL in a SERIAL field? Postgresql
Hello, I was doing some activities and I differed from some colleagues. The end result was the same, but I was wondering if it is bad practice to use the following code CREATE TABLE Estudio ( codEst…
postgresqlasked Aleczk 97 -
0
votes0
answers43
viewsQ: Why does the output of my objects break (in different lines) if there are more than 60 characters?
My question is very simple: why if my object has more than 60 characters, in total, it prints in different lines each key and value, while if it has less than 60 all is printed in one line? It’s…
-
2
votes1
answer119
viewsQ: How to make each element of a number array multiply each of its digits within a substring?
I came from Python and am trying to create a function whose goal is to calculate the largest product for a continuous substring of digits of length N. Ex: for the '102181952' input, the largest…
javascriptasked Aleczk 97 -
2
votes2
answers166
viewsQ: How to create the boolean AND condition in a . bat code?
I have a simple program that deletes certain files if they exist, but I would like to improve it using a boolean condition in case the two files do not exist. Is it possible simply? I found answers…
-
0
votes1
answer118
viewsQ: Is it possible to apply a CSS attribute only to a page that contains a substring?
Hello, I’m a beginner in CSS and I’m creating a black theme for the Globo site using Stylish, anyway, I wonder if it is possible to apply an attribute/rule that is only respected within a site that…
-
1
votes0
answers41
viewsQ: Why is my matrix rewriting itself?
I want to create a square matrix of order N (N is read), but when entering the loop, my matrices are rewriting themselves and always assuming the last number I typed. I tried to change the range,…
-
1
votes1
answer174
viewsQ: My Python code works, but I don’t understand why an int()
I did a time-calculation program on medications. According to the calculations everything is running perfectly, but I did not understand a detail, why the need to use a int() at a certain point in…