Posts by Gabriel Belini • 545 points
24 posts
-
0
votes2
answers324
viewsA: Color-free code when filename starts with upper-case
Flutter is written in Dart, and by Dart’s good practice the filename should always start with lowercase letter and in "snake_case", follows reference:…
-
0
votes1
answer320
viewsQ: Change default directory of standard (specific) query in ADVPL
I am trying to create a specific default query where when the user opens the query the path is already filled with a specific directory defined by me. Today when he opens the directory it is always…
advplasked Gabriel Belini 545 -
1
votes0
answers365
viewsQ: Receive user input using Django Class Based Views
If you need more information about the problem (urls.py, complete code of the template, etc.) just ask me to post, just not to pollute the post too much. General description of the problem: Update…
-
0
votes1
answer2986
viewsQ: Free API for Weather History
As I explained to Guilherme in the comments, I make it very clear in my question that I want a climatological HISTORY. The question indicated as duplicate does NOT show how to recover climatological…
-
1
votes3
answers760
viewsA: Doubt with IF and LISTS python3
It enters 2 times in the loop and error until finding because it is testing value by list value to see if it is equal to 'eth2'. First forehead with eth0 afterward eth1 and only then with eth2. To…
pythonanswered Gabriel Belini 545 -
2
votes3
answers372
viewsA: Some help in function exercise (python)
You need to declare the variable i within the function recebe_m. The same problem will occur with the variable n_divisores, declare the same within the function. m = int(input("Digite um numero…
pythonanswered Gabriel Belini 545 -
1
votes2
answers399
viewsA: Problem with while repetition structure
import getpass user = str(input('Usuário: ')) # user é variavel global def login(): # user não existe dentro de login() while(user!='admin'): user = str(input('Usuário: ')) # essa linha deveria…
-
3
votes5
answers7541
viewsA: Is programming for iOS on a virtual machine feasible?
I used Virtualbox to test how it is to program in Swift, it took me a long time to get MAC OS X to run, at the time I think it was the Yosemite or El Capitan that I installed. After installing I…
-
1
votes2
answers83
viewsA: Root account error Math.sqrt with multiplication and division
Qe=(math.sqrt((2*(DEMANDA*CUSTOAQUISAO)/(CUSTOUNITARIO/TAXAARMAZENAGEM))) s="O Lote Econômico é composto por peças " # identado errado a partir daqui s=s+str(Qe) print (Qe) Python is a language…
-
1
votes3
answers3098
viewsA: Use return of a function in another function
def frequencia(lista): conv = str(lista) plSeparadas = separa_palavras(conv) listUnic = [] listFreq = [] for p in plSeparadas: if p in listUnic: i = listUnic.index(p) listFreq[i] = listFreq[i] + 1…
-
1
votes1
answer444
viewsQ: Update values from a chart using Django
I’m playing in a solo project to make a website to show the current coffee quotation along with a line chart of the daily variation of this price as a function of time. I get the price value of…
-
1
votes1
answer1831
viewsQ: Python API for real-time commodity values
I need an API that can provide me with real-time commodity prices (more specifically, Arabica Coffee price) I know practically nothing about the stock market, but I did some research and found that…
-
1
votes2
answers1631
viewsA: How to install Numpy via PIP windows 7 64 bit
Just run pip install numpy. Have you tried this? if it doesn’t work, paste the error message. To advance a little the possible mistakes: If the message says Pip is not installed, but you are sure it…
-
1
votes1
answer83
viewsA: Assertionerror: b' Working with test classes in Django (TDD)
Try to put self.assertEqual(response.content, 'Dados Corretos!.decode("utf-8")') or self.assertEqual(response.content.decode("utf-8"), 'Dados Corretos!'). This b in front means that the string is…
-
2
votes3
answers4863
viewsA: Install with PIP through the Resets.txt file inside Virtualenv?
The command is pip install -r requirements.txt. Just run it within the desired environment and all libraries contained in requirements.txt will be installed.
-
1
votes3
answers966
viewsA: How to store an int and a complete string from within an input?
If the number is always the first input element entered, a simple way to solve this would be to use slicing. N = N.split() numero = int(N[0]) alimento = ' '.join(N[1:])…
-
1
votes1
answer725
viewsA: How this recursive function (factorial function) behaves in Python
It’s a little complex to explain but I’ll try. The factor(4) function is called: Factorial(4) execution "hangs" when it needs to calculate fatorial(4-1); A new call is made to the function fatorial…
-
2
votes4
answers829
viewsQ: Compile-time type checking ADVPL
I am using the ADVPL language at my stage and having many problems with type errors, variable scope, etc. Things in general that, in my view, should be checked at compile time, however I can only…
advplasked Gabriel Belini 545 -
0
votes2
answers1459
viewsA: Delete and Query Python function
Pay attention to the scope of variables in your program. I have seen several lists that are created changed but die after function call because no function of yours has return value. I’ll give you a…
-
3
votes2
answers1752
viewsA: Split a worksheet into multiple worksheets
Try to use the function readlines for file handling: file = open('entrada.txt', 'r') lines = file.readlines() nfile = 0 # Numero para organizar os arquivos a serem criados, sera incrementado no loop…
-
4
votes3
answers2681
viewsA: Adding text files to python
I do not know if I understood your question right, you want to open some files and join all in 1 only? If so, try the following: arq = open("resultado.txt", "w") arq1 = open("texto1.txt", "r") arq2…
python-3.xanswered Gabriel Belini 545 -
4
votes2
answers1123
viewsA: Problem with lists - Python
Do things step by step. Try to isolate problems. First thing, the problem says it will be necessary to use the height average, so first thing, calculate the height average and store in a variable.…
-
1
votes1
answer2004
viewsQ: How to Update a BD Record using ADVPL
I’m struggling to do something that should be very simple. I created a custom field for a table called SALDO. In my code is made a SELECT to access the records that interest me with an alias TMP.…
advplasked Gabriel Belini 545 -
4
votes1
answer813
viewsQ: How to make a Chained List in Assembly?
I have a college job and I need to make a chained list at Assembly, would like to know how to do the loop to insert all items in the list and keep them connected. The list must contain the data of a…