Posts by wensiso • 626 points
27 posts
-
0
votes1
answer41
viewsA: How to relate two form Fields in Django?
In fact, the correct way to implement it is by using a Foreign Key (foreign key) to the Architect from CAT. According to what you described, your templates are correct. What appears to you in Admin,…
-
3
votes1
answer53
viewsA: What are the differences between setInterval x requestAnimationFrame?
The function requestAnimationFrame() and the function setInterval() do completely different things. The function setInterval() configures a timer (stopwatch) and executes a function or a code…
-
0
votes1
answer43
viewsA: One Layer Perceptron Neural Network, Inputs
The easiest way to do it is by using the library numpy. To install numpy, run: pip install numpy # ou pip3, dependendo do seu sistema After installation, just use: import numpy entrada =…
-
1
votes1
answer104
viewsA: Structure Package Intellij
There is no such option in Intellij. The only possible options are: display the folders above the files (as illustrated in the print) or; display content in alphabetical order (mixing files and…
-
1
votes2
answers33
viewsA: how to display keys in the browser?
If I understand correctly, you want to write the characters '{' and '}' literally, if that’s the case, just write it that way: {'{' + Luciane + '}'}…
-
0
votes1
answer691
views -
1
votes1
answer506
viewsA: C string array
There are several ways to do this. I’ll tell you the ones I find simpler. If you don’t want to change the strings, you can just do: const char *a[2]; a[0] = "blah"; a[1] = "hmm"; When you do so, you…
-
3
votes2
answers139
views -
0
votes1
answer215
viewsA: Phonebook
The entire agenda could be a dictionary whose key is the person’s name and the value is the phone number (or a phone list if you prefer). It makes no sense to implement the agenda as a list that has…
-
1
votes2
answers3740
viewsA: how can I use group by next to order by
In charge select you inform all the columns you are requesting in your query. What is not on select is not part of the consultation. If in command select you did not request the field id then you…
-
1
votes1
answer749
viewsA: Format an html form input as a currency
Javascript has an internal function for this. Number.prototype.toLocaleString var valor = 16.00; var texto = valor.toLocaleString("pt-BR", { style: "currency" , currency:"BRL"}); console.log(texto);…
-
0
votes1
answer21
viewsA: Problem with printing data from an array
The problem is that in the while command you are creating a new array for each iteration... Then for each row the query returns, instead of adding in the array you delete the array and create a new…
-
5
votes2
answers548
viewsA: How to create getter and Setter from Arraylist?
In this case you can make two types of getter: one that returns the entire array and one that returns only one item of the array. //retorna o array inteiro ArrayList<String> getOpcao() {…
-
0
votes1
answer110
views -
0
votes3
answers419
viewsA: Browser only emits audio after I click on it
First, I think you need to add the autoplay attribute to the audio tag. Second, it seems to me that Google Chrome disallows autoplay by default. So you should test on other browsers first. I hope…
-
1
votes1
answer23
viewsA: Store each news in a table or a table for all news?
The correct thing is to create a table where all the news will be. Each row of this table will be different news and each column represents a news property (text, date, author, or anything else you…
-
1
votes1
answer112
viewsA: Files do not appear after deleting gitignore
I think you need to commit the change you made (delete the .gitignore file) and then manually add the files that were in gitignore. I believe if you execute the command git add . should work. If it…
-
3
votes1
answer177
viewsA: If function with decimal numbers
In the first line of the function change the parseInt() for parseFloat().…
-
0
votes1
answer31
viewsA: How to register multiple
I believe the problem lies in its variable $insert_id. Since the variable is not being updated in the for loop, when the program tries to insert the second treatment it uses the same id as the…
-
4
votes1
answer156
viewsA: I have a problem trying to use an increment in the printf - C function
The standard language C does not establish the order of evaluation of the parameters of a function. Therefore, according to the standard of the language its code has undefined behavior. The order of…
-
1
votes1
answer668
viewsA: css file does not update on Django
Try using CTRL+F5 to refresh the page by forcing the reload of all objects, even those already in the browser cache. Pressing only F5 does not require the browser to download the new version of the…
-
0
votes2
answers70
viewsA: Socket com Python
I believe that by default, sockets are blocking. That is, the function that reads the data coming from the network blocks the current thread waiting for the data to arrive. Therefore, if you are not…
-
0
votes3
answers335
viewsA: Error when De-locating Matrix - double free or corruption C
I’ve written a little program to simulate the matrix you’re trying to make... When reading and writing in the matrix I had no errors. I also managed to run the free command without problems. Take a…
-
0
votes1
answer139
viewsA: int storage in c
If fscanf is running, then the contents of the file where you store the last record are blank or not being read properly... and fscanf ends up writing the value 0 in the variable. Because of this,…
-
1
votes1
answer844
viewsA: Multiple connections with PHP Socket to receive HTTP messages and save to Mysql
The problem is that as soon as the client receives the welcome message from the server he is running the socket_close function and terminating the connection. This way, when the server tries to send…
-
0
votes5
answers2691
viewsA: Array, how to apply in this question?
You will need a variable to count how many students arrived at the correct time. This variable should start at zero. Then you should use the go command to scroll through the array and use an if to…
-
1
votes4
answers7488
viewsA: How to change the database name in Mysql Workbench 8.0 using ALTER DATABASE?
Using the command to rename a database in mysql often generates a lot of headache... Instead there are two alternatives: a) Create a new database with the name you want and then copy all tables from…