Posts by Felipe Mariano • 262 points
11 posts
-
1
votes4
answers485
viewsA: How to determine the index of items in one list in another
Hello! See if this helps you: S_names=["A", "B", "C", "D", "E", "F", "G"] S_values=[1,3,4,2,5,8,10] other=["Z","W","B","S","A","E","X","T","D","G","L","C","F"] result = [] for name in S_names:…
-
0
votes2
answers715
viewsA: Get information from the url
Whoa! How are you? You can use PHP: <?php $primeiro = $_GET['primeiro'] $segundo = $_GET['segundo'] ?> so, every time you refresh the page by sending the parameters, php will capture them. I…
-
0
votes5
answers210
viewsA: Variable is not displaying the expected result
Start variables with 0. Depending on the value it may not enter one of the if’s.
-
0
votes2
answers89
viewsA: Replace number by string in results
Hey, buddy, help yourself: SELECT sum(pedidos_lentes.quantidade) AS value, CAST(pedidos_lentes.solara as CHAR(1)) AS label, JOIN pedidos_lentes ON pedidos_lentes.id_pedido = pedidos.id_pedido WHERE…
mysqlanswered Felipe Mariano 262 -
1
votes4
answers21246
viewsA: Doubt average with Python 3.5
Oops! Dude, I’m a beginner but I tried to implement a solution for you: qtd_notas = int(input("Digite a quantidade de notas: ")) notas = 0 for i in range(0, qtd_notas): notas += input("Digite a nota…
-
-2
votes3
answers4376
viewsA: What is the purpose of the return of the main function and the importance of this function?
The experienced ones correct me, but I believe that it is the main class of the program, where the program will begin to run. Already the Return, as we have int main(), we have the indication that…
canswered Felipe Mariano 262 -
4
votes1
answer113
viewsA: Why don’t you want to step up?
Girlfriend, follow the code working: #include <stdio.h> #include <stdlib.h> #include <string.h> void main(){ int i = 0; char testeNome[190]; int cont = 0; printf("Digite seu…
canswered Felipe Mariano 262 -
2
votes2
answers16389
viewsA: Remove Python punctuation and symbols
Try to use regex: import re string_nova = re.sub(u'[^a-zA-Z0-9áéíóúÁÉÍÓÚâêîôÂÊÎÔãõÃÕçÇ: ]', '', string_velha.decode('utf-8'))
-
3
votes1
answer854
viewsA: What is the use of the extern keyword in c?
Dude, after researches I understood that extern serves to indicate that a variable has already been defined in another part of the program as a whole. For example, if you divide a giant code into 2…
canswered Felipe Mariano 262 -
1
votes3
answers1508
viewsA: Python Vector Fill 3
I’m new to Python, but I think I’m turning the values of numero1 into float and playing an array [float(number) for numero in entrada1] And assigned the array above in1, which were previously…
pythonanswered Felipe Mariano 262 -
-2
votes1
answer2309
viewsA: how to turn a factor variable into a numeric in R?
Dude, try the following: variavel <- data.frame(nome_da_base, stringsAsFactors = F)
ranswered Felipe Mariano 262