All Questions

3
answers

What does it mean to assign Math.random () 0.5 to a variable?

What does this Math.random() > 0.5; mean in boolean ? Here is an example: class Pro { public static void main(String[] args) { int numero = 10; boolean[] array = new boolean[numero]; for(int i= 0;...
asked on 14.02.2016 / 22:48
4
answers

How to create a class in java?

I would like to know how to create a class in java , how to use this class in the main program and how the variable created in that class is.     
asked on 04.06.2015 / 18:49
4
answers

Help with exercise

Can anyone help me correct this exercise? I'm trying to finish these lines and I can not: module.exports = function restaurantBill(bill) { /* 1. Crie uma variável chamada tax (imposto em inglês) e atribua-lhe o resultado de multiplique a...
asked on 04.05.2018 / 18:48
3
answers

Catching more items in a list array in Python

I have an array in Python made up of arrays. But these arrays can have different sizes. For example: matriz = [[1,2,3],[4,5,6,7],[1,2,3,4,5,6]] What I want to know is if there is a medium (some python-ready function) that returns the size o...
asked on 07.12.2016 / 14:51
2
answers

Contest question: Java code about overwriting methods

I took a quiz and dropped the following question:    Check the alternative corresponding to the result of executing the main method of the Java program presented below: public class A { public void ml(){ mx(); } public static void mai...
asked on 02.02.2017 / 10:47
3
answers

What is the difference between the operator IN and ==?

I would like to know the difference between the IN and the == operator in Python?     
asked on 14.04.2018 / 22:45
3
answers

How to select an option in select using a text using jQuery?

I have <select> created this way: <select id="animal"> <option value="0">Novilha</option> <option value="1">Bezerro</option> <option value="2">Boi</option> </select> T...
asked on 26.01.2017 / 17:00
4
answers

Transform a Normal Array into Multidimensional

I have an array in this format: meuArray = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ...]; I would like to turn it into a multidimensional array with javascript / jquery leaving it like this: meuArray = [ [0] => [...
asked on 24.11.2016 / 12:57
2
answers

Constants of non-primitive types

In Java, constants are declared with the sequences of keywords static and final . When we have public static final int UM = 1; "it makes sense" to call constant, since your value can not be changed. Now, speaking of...
asked on 26.07.2017 / 18:31
2
answers

How to count the number of times a word repeats itself in a sentence?

I have a particular phrase declared in a variable. See: $bacco = "Você tem que abrir seu coração pro SQL e pedir o que realmente quer."; I can see if there is a certain word within the sentence using strpos , like this: if (strpos($ba...
asked on 26.01.2017 / 18:00