Posts by Bruno de Sales • 346 points
13 posts
-
3
votes2
answers163
viewsA: Conditional javascript call in Html5
Try: const URL1 = "http://leituracrista.com/audioplayer/"; const URL2 = "http://leituracrista.com/audioplayer/dispensacao/"; const URL3 = "http://leituracrista.com/audioplayer/hinario/"; let url =…
-
1
votes1
answer40
viewsA: Sum error in an array iteration
After searching a little about it I saw that I was changing the syntax, when used (0..n) with two points means that the n is included in the iteration. In this case you should have used (0...n) not…
rubyanswered Bruno de Sales 346 -
1
votes1
answer1247
viewsA: How to make an asterisk triangle in java
System.out.println("Indique um número inteiro positivo:"); int n = scanner.nextInt(); System.out.println("n: " + n); for(int i = 0; i <= n ; i++) { String out = ""; for (int j = 0; j < i; j++)…
-
1
votes1
answer542
viewsA: Intellij IDEA Community and database usage
Community does not have tools to manipulate the BD in the software itself. But you can work with it peacefully using the BDS of your choice.
-
0
votes1
answer40
viewsQ: Sum error in an array iteration
I started at Ruby the other day and I have a question. I was doing the Hackerrank exercises and in a certain exercise it was necessary to do the sum of the array elements, not simple? Yes. But my…
rubyasked Bruno de Sales 346 -
3
votes1
answer26
viewsA: I don’t understand an ordination resolution
Temporary variable The variable valor serves to temporarily store a values not to lose it. Come on, We receive three values, let’s assume for example: 11, 5, 3. Now we need to order them, so let’s…
-
-1
votes5
answers1054
viewsA: How to make each input stay on a separate line?
<form action="" method="post" name="loguin" class="log-adm"> <p><input type="text" name="usuario" placeholder="Usuário" required="required" class="log-adm-campos"></p>…
-
3
votes2
answers681
viewsA: How to Create an array from text snippets of a string?
const split = function (string) { string = string.split(/(over)/); return string; }; The method .split() will separate a string in substrings and return a array. The parameter I pass between…
-
0
votes5
answers7645
viewsA: Javascript number stack pairs
I do not understand why compare with 10, the loop already understands that 10 is included. The line msg += j + ", "; should be on probation if. Finally, break is not necessary in that case. Follows…
javascriptanswered Bruno de Sales 346 -
0
votes1
answer61
viewsA: What’s wrong with it?
When you declare num = entrada.nextFloat() != 0 this way you end up assigning a value of type boolean for num, this because the expression in this way returns whether or not the number typed is…
javaanswered Bruno de Sales 346 -
2
votes1
answer30
viewsA: Hiding element inside a menu
This code must do what you are wanting, it will hide all tags a page. const esconder = function(excluir) { if (excluir === 1){ let a = document.getElementsByTagName('a'); for (let i = 0; i <…
-
0
votes2
answers39
viewsA: Scalate a value in a given range
The answer in that case would be the alternative a.. You see, if we make a basic division of the possible variations between corVermelha and temperatura we have to every variation of temperatura…
-
0
votes1
answer77
viewsQ: Exception error in thread "main" in my Array
Guys, help me, I can’t find the error in my code. I know this error refers to not having the position in the array to store but I don’t know where to fix it. package…