Posts by Luan Brito • 279 points
17 posts
-
2
votes2
answers294
viewsA: How can I finish a setInterval?
Only use clearInterval() Example: var myVar = setInterval(myTimer, 1000); function myTimer() { var d = new Date(); var t = d.toLocaleTimeString(); document.getElementById("demo").innerHTML = t; }…
javascriptanswered Luan Brito 279 -
0
votes2
answers86
viewsA: Why does the innerHTML property not run Javascript codes?
It is not uncommon to see the innerHTML property used to insert text into a web page. This comes with a security risk. var name = "John"; // presumindo que el é um elemento DOM HTML el.innerHTML =…
javascriptanswered Luan Brito 279 -
0
votes5
answers2164
viewsA: Square root manually in Javascript
This way I did, you decrease the number of code variables and can see the multi and counter values in the console: var numero = 100; var resultado = 0; for (var i = 0; i < numero; i++) { var…
-
1
votes1
answer27
viewsA: Creating part table link with Divs
a way will be doing this way, putting a tag for each div, and creating a class "div-table" that is resposable by generating the table that before was what the tag did, soon after only stylize the…
-
0
votes2
answers81
viewsA: Nodejs Async / Await / Promisse
I simulated here the return of its function, and managed to return ordered this way, using Promise.all async function parseCategories () { var categories = ["business", "entertainment", "health",…
-
0
votes2
answers1098
viewsA: How to write this SQL with Adonis query Builder?
Test like this and see if anything comes back return await Database .table('tbl_docente_turma_disciplina') .innerJoin('tbl_disciplina', 'tbl_docente_turma_disciplina.id_disciplina',…
adonisjsanswered Luan Brito 279 -
1
votes1
answer212
viewsA: Request in graphane API with PHP
Test this way by putting your api key in place of $Authorization KEY_API //Server url $url = "http://meu-ip/api/dashboards/home"; $authorization = "Authorization: Bearer KEY_API"; // Send request to…
-
0
votes1
answer44
viewsA: Beginner Doubt - Loop Error
Try to run this way by clearing the keyboard buffer double somaT = 0, mediaM = 0, mediaT = 0, altura, somaM = 0; double maiorH = 0, menorH = 999, maiorM = 0, menorM = 999; char nome[30], sexo; int…
-
1
votes4
answers75
viewsA: Find item in array
This way is right and you don’t even need to use Curl, if you just need to edit the way you think best, example working: <?php $url =…
phpanswered Luan Brito 279 -
1
votes1
answer24
viewsA: Prepare Shows no error
In your code the if is incorrect if ($rs->errno) is Rrno and not error. In case of nothing you can test the erroInfo() for more information follow the documentation with examples:…
-
4
votes1
answer57
viewsA: How to place the list of letters received from the database in a horizontal position and join it in a single page to the list of words of the searched letter
For him to stand side by side you just take out the <br> of that line: <a href='lista.php?letter=<?php echo base64_encode($row["abc"]); ?>'><? echo strtoupper($row["abc"]);…
-
0
votes2
answers666
viewsA: DELETE WITH LEFT JOIN
Must be in mysql safe mode try to run this. SET SQL_SAFE_UPDATES = 0; DELETE doacoes,animais FROM doacoes INNER JOIN animais WHERE animais.idAnimal = doacoes.idDoacao;…
-
0
votes1
answer28
viewsA: use methods of one class in another
Go to your Main() class and enter the Model class. Ex: main(){ Model model = new Model() model.addEmpresario(parametro) } don’t forget to import your class location at the beginning of the main file…
javaanswered Luan Brito 279 -
2
votes2
answers1295
viewsA: Changing colors when hovering the mouse
Follow code below, tested and every time you put the mouse on top of the square it changes color, I do not know if this is exactly what you want, but it is already a way to get there. <html>…
-
0
votes1
answer34
viewsA: Wait for a parameter
The function mysqli_query requires 2 parameters, the first being the connection and the second the query. mysqli_query($con,$sql). find the variable of your connection and put it in the function as…
-
3
votes1
answer26
viewsA: report in related tables (mysql)
Test this code and see if it works, and test without GROUP BY and see if it works anyway. select SUM(nfi.valor_total) from notafiscal_itens as as nfi inner join notafiscal as nf on nf.id = nfi.id_nf…
-
2
votes1
answer92
viewsA: What are Containers and Docker?
The Docker containers are seen as a way to virtualize an environment for the developer to work with and aim to create an environment separate from your original machine, ie you virtualize this…