Posts by Gabriel Moura • 57 points
6 posts
-
0
votes0
answers14
viewsQ: Realtime Database duplicates records
Hello, I’m ranking a game using the Firebase database but every time I "push" the data Firebase makes two records. Code sample: The Handlegameover function is invoked when the Gameover variable is…
-
-1
votes1
answer168
viewsQ: Button Ubmit and building components dynamically in Reactjs
I’m making a revenue registration page. This is my form: <form onSubmit={handleSubmit}> <Input name="title" label="Nome da receita:" type="text" value={title} onChange={(event) => {…
-
2
votes1
answer842
viewsQ: Implementation Dijkstra algorithm in Python
I am implementing Dijkstra’s algorithm in a graph, but it returns only the first call to the function. Even if I call again there is no return, does anyone know why? Follows the code: def…
-
1
votes1
answer220
viewsQ: Add tuple in Python set
I am creating a graph with the following rules: The graph is a dictionary. The vertices are the keys of this dictionary and the values are the edges. Since I can have more than one edge for a…
-
1
votes1
answer327
viewsQ: Ordering cards in Python
I have a list of the cards and the suit of a deck that I need to sort. Considering the correct order: A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K And the suits: P(clubs). O(gold), E(sword), C(hearts)…
-
0
votes2
answers201
viewsQ: Matrix in python
I’m building a matrix in python, but I can’t make the right impression. Someone could help me. Follow the code: linhas = 4 entrada = input() valor = entrada.split() matriz = [] while (entrada !=…