Questions tagged as 'metodos'

3
answers

array without repeated numbers

My program consists of the following: We generate an array of 10 positions with random numbers from 1 to 20, then with a method called repeated we check that the numbers that have been generated are not in the array, in case they are on and g...
asked by 17.05.2018 / 11:02
1
answer

Error defining the methods of a class

I have this date.h , where I have a class Date . I define my methods and then implement them in a date.cpp but the compiler throws me errors of:    error: "method ...." previously defined here. and error: redefinition of "m...
asked by 02.09.2017 / 03:49
1
answer

The split ("") method of an array returns the messy array

I want to save the value of a text area in an array and I am doing it with a let array = texto.split(" ") , but when doing console.log(array) it returns it messy. What can I do? Here is the code: let t_Area = document.que...
asked by 19.09.2018 / 01:13
1
answer

How do I average the method: calculate AverageWeightDownload? POO Java

I have to do this program, my question is how to do point 4), which is to calculate the average of the Locomotive class. At the time it occurred to me to do a summation for Carload weight that belongs to the vagon class and another sum for amoun...
asked by 26.11.2018 / 00:49
1
answer

3 buttons with the same method, differentiate them

I had a little problem where I repeat the same code 3 times, and I'm trying to reduce it to one without success, the code I have is this public void shared(View view ) { Intent emailIntent = new Intent( Intent.ACTION_SEND ); emailIn...
asked by 15.07.2018 / 10:27
2
answers

How to update a specific field of a table without being related to another one by foreign?

I have a little problem with this code and maybe someone can help me. It happens that I have three tables, loan, item, inventory. the loan and item tables are related, but the inventory is not, the fact is that when I make a loan, I have to decr...
asked by 20.05.2018 / 06:41
1
answer

Math class does not work [closed]

public double getStringToDouble(String x){ return Double.parseDouble(valorMod); } public String getDoubleToString(double x){ cadena = String.valueOf(valorMod); return cadena; } With those methods I transform from String to Double, to...
asked by 22.10.2017 / 01:40
1
answer

question about getUserMedia

Hi, I'm good at this, I do not understand why it is necessary to do an if here, (navigator.mediaDevices & & navigator.mediaDevices.getUserMedia), if my mediaDevices object and my getUserMedia method is true enter the block, but I could skip...
asked by 05.01.2018 / 13:44
2
answers

Problem with Methods and Arguments JAVA

I have a method x that receives an entire parameter, and I have a method z which, in order to work, uses the x method. My problem is that they require me not to use global variables. Therefore, I can not ask the x method parameter and...
asked by 01.10.2017 / 19:12
1
answer

How do I show a table of multiply in java with JPanel and JFrame form?

I want that when I press a button I display a multiplication table but it does not throw me errors and I do not know if it is doing well. import java.awt.Graphics; import java.awt.event.ContainerListener; import java.util.Scanner; import javax...
asked by 02.04.2017 / 04:20