Posts by Mr. Satan • 207 points
21 posts
-
0
votes1
answer40
viewsQ: How to define my package name in Pypi?
I am creating a python module to distribute in pypi, I am studying the process of creating distribution of modules by some tutorials and the pypi guide itself, but even so I still have some doubts.…
-
1
votes1
answer26
viewsQ: Error running makemigrations on my Django project
I am trying to run makemigrations on my Django project but it is returning error saying that the argument default is not expected or something like, follows part of the error: TypeError: __init__()…
-
0
votes2
answers304
viewsA: What are the differences between match and switch in PHP8?
The differences: The match is a shorter expression that you don’t need to use break in its structure, you do not need to necessarily declare variables for each case, to return something, just tell…
-
0
votes2
answers47
viewsA: Compare the values of two lists
You can use the class set() which provides some functions such as union, intersection, difference and among others, in your case you that intersection, then just do result = set(a) & set(b) that…
-
2
votes2
answers44
viewsA: What is the "~*" operator for in a select in SQL?
In Postgresql the operator ~* serves to search for regular expressions containing the string passed as a search parameter, without differentiating between uppercase and lowercase characters, i.e.,…
-
0
votes1
answer44
viewsQ: How many Apps can I have in a Django project?
I’m studying Jango a little while ago, and recently seeing a third party project, I saw that apparently he had more than one app, with this raised me the following doubts, can I have more of an app…
-
0
votes1
answer56
viewsQ: Html form is not calling php
I’m making a simple php script that receives the login data from an html form, only apparently html is not calling the php script. snippet of html code: <form action="index.php" method="post">…
-
1
votes2
answers260
viewsA: Algorithm that creates a Python queue
The common way to create data structures in Python and other more modern languages is by using classes, you can create one class for the queue and another for the nos and within them implement…
-
1
votes2
answers63
viewsA: How to get only a chunk of a command output
You specify a character range you want to print. Try: echo $'git instalado com sucesso! Na versao: '${GIT_VERSION:12:17}$'\n' Explaining ${VAR_NOME:Primeiro caractere a ser impresso: ultimo a ser…
-
0
votes2
answers56
viewsA: Origin/master problem in git when trying to commit
You first have to add the files you want to add to the repository with your commit, after you write the commit and git push. You can give a git status to view the files that have been modified; Then…
-
1
votes2
answers242
viewsA: What is virtualenv for in Python?
virtualenv serves to create and manage virtual environments on your machine, virtual environments are isolated environments for you to develop your project, it will create a local and lean copy of…
-
0
votes1
answer36
viewsQ: Ellipsis in numpy array
What the object means ... in a numpy array. I am working with a database and when I use the Unique method in one of the columns, between the objects it returns this ... What these reservations…
-
0
votes2
answers228
viewsA: How to delete a commit?
Try to reverse the commit git revert [hash do commit] You can try too: git reset --hard [hash do commit]
-
1
votes1
answer30
viewsA: How do I get this matrix to zero in front of the F’s?
You are placing an Endl after the 'F', it will break the line and stay in front of the spaces of the previous line. Try this: for(int i = 0; i<18; i++){ cout<<'F'<<(i+1); for(int j =…
-
1
votes3
answers40
viewsA: PYTHON BEGINNER Why are you giving the error 'is not defined' , how do I fix it?
You have not created a variable called populacao_regiao. Also the type of your region variable is str, before doing the division operation make a conditional test so that you can use your created…
-
1
votes1
answer48
viewsQ: What is the appropriate style to write in Python?
What standard to name classes, methods, variables, etc., in Python, I thought just like in Java was Camelcase, but recently I heard to use snake_case. Is there any specific Python pattern? Which of…
-
0
votes2
answers31
viewsA: Error exited, Segmentation fault when adding a second element to my list
Good afternoon, I took a closer look at your code and made some changes, and with that I will tell you some points: -First: You weren’t creating a list, you just created a function that returns the…
-
0
votes1
answer26
viewsA: Error in my fgets can’t add data to it
I ran that same code here, and it worked, the only difference, was that I took out the system("pause"). Check the header files, if the main ta is well formatted. It can also be the compiler, I used…
-
0
votes1
answer59
viewsQ: Python encapsulation
I wonder if I can encapsulate a function that is not in a class, like, just a function in the same code, so that it is only accessed inside the file, and when I import this file I can’t access this…
-
0
votes2
answers31
viewsA: Error exited, Segmentation fault when adding a second element to my list
Try this if you want your second element to be inserted last: ... Ponteiro_Inicio->Ponteiro_Aponta_Proximo = Vetor_Apontador; Vetor_Apontador -> Ponteiro_Aponta_Proximo = NULL; return…
-
2
votes3
answers158
viewsQ: Use of virtualenv python
I’m starting to use virtualenv for projects and in the process I came up with a question, after activating the environment, every time I enter or exit the folder it activates and deactivates…