Posts by Rafael • 309 points
16 posts
-
2
votes1
answer65
viewsQ: Program works by debugging but not running
I’m doing an old game and I’d like to know if the button pressed that I set in class MenuPrincipal is returning the correct value to the main class that controls the change between windows. Normally…
-
2
votes0
answers139
viewsQ: Does switching username destroy commits?
I switched my username to a more professional one. Before I switched I saw that I had some warnings that mistakes could happen when doing this, but I didn’t care because I said they were rare cases.…
-
0
votes2
answers198
viewsQ: Installation Cartopy
I’m trying to install the cartopy library. But I’m not getting it. Can someone help me? I tried by pypi and returned the following error: C:\Users\Rafa>pip install cartopy Collecting cartopy…
-
1
votes1
answer57
viewsQ: Numpy delete method doing strange thing
i was testing the delete method of the array class of the numpy library and a strange thing happened: I had the element of Indice 0 deleted from the array, but the element of Indice 1 is deleted. I…
-
-2
votes1
answer235
viewsQ: Error using Qlabel - Pyqt5 class method
I am trying to create an application that does the following: every time the user clicks on an image that will be inside a Qlabel, it will open a dialog for the user to open another image. It turns…
-
0
votes1
answer88
viewsQ: Error using np.concatenate
I’m doing a mergesort using numpy library. It turns out it’s giving error in the line "np.concatenate(result,left[i:])" there in the merge function. That is the mistake: /sorts/main.py", line 30, in…
-
1
votes2
answers5228
viewsA: Typeerror: Calcularsalario() Missing 1 required positional argument: 'Title'
Why did you put these attributes as static? It would not be more logical to put it into a method init? Type Thus: class Professores(): def…
-
2
votes1
answer112
viewsQ: Overload of the Sort method
Studying polymorphism in python. I am trying to overload the Sort method of the list class that was inherited by my group class. It turns out that the ordering is not coming out right. I don’t think…
-
0
votes2
answers478
viewsA: Reading list of integers from a binary file
People, I was able to find the error. I’m used to c/c++ and there is no need to convert whole bytes when reading a binary file. Here it is necessary. Below the corrected code: import time…
-
1
votes2
answers478
viewsQ: Reading list of integers from a binary file
I need to read the 10 million integer numbers that are in a binary file and put them in a list. The program does not fail, but the readings give some strange numbers: main:…
-
3
votes1
answer2575
viewsQ: Inheritance with builders
I need to create a base class animal and 3 other hereditary classes of other animals. Each class must have its own function emitirSom. They should be invoked polymorphically through a vector. I…
-
2
votes1
answer620
viewsQ: Operator overload in C++
I’m learning operator overload. For this I am testing to overload the * operator so that it is interpreted as | string class object * variable type int = string class object concatenated with it so…
-
0
votes2
answers173
viewsQ: Independent member function in C++
I am learning POO with C++. I made a program here to train object arrays question. My question eh: The program is working, but was it efficient that I put the function display2 as independent? I…
-
1
votes1
answer181
viewsQ: Is there a system call to read just one file line on Assembly 8086?
Type the fget of c, which sends to a variable all the characters of the line between the beginning of it and the character Carriage Return
-
2
votes1
answer51
viewsQ: Error condition in C
When I moved in Python I remember I had how to make one if if any assignment or operation returned error. Type like this int v[]={1,2}; int v1; if((v1=v)==ERRO) //faça isso; There’s something like…
-
2
votes1
answer292
viewsQ: Object assignment in Python
Can anyone tell me why in the first iteration the assignment retangulo=retangulo() works, but on Monday? This error appears in Pycharm: <<'rectangle' Object is not callable>> Code: from…