Jump to content

sevillano665

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sevillano665

  • Rank
    Newbie
  1. Hi guys! I have a little problem and it's that I get an error in a determined function where I call my connection and I don't know why. The errors are: 1) Notice: Undefined variable: conexionidiomas in C:\wamp64\www\idiomas\preguntas-frecuentes.php on line 10 2) Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in C:\wamp64\www\idiomas\preguntas-frecuentes.php on line 11 This is what I have from "/Connections/conexionidiomas.php": # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_conexionidiomas = "p:localhost:3307"; $datab
  2. Hello, I'm trying to make a method that creates objects of a parameterized type randomly, but also to store the hashCode of different objects created and if at any time the percentage of different objects is less than 50% throw an exception. This last part is where I've gotten stuck. I have created a population property where I store the different hashCodes and update it in the method adding the new hashCode from the new object. But I don't know how to do for to know if the percentage of different objects is less than 50%. See if someone can help me out. Regards!
  3. But I really want that the result text boxes of every multiplication contain "0" if I don't introduce any number, in this way the sum will be made. I have tried to put by default a "0" in the result text boxes but when I introduce some number in some text box all result text boxes shows "NaN" and the sum is not made.
  4. Here is: <script type="text/javascript"> function multiplicar() { var contador1; var contador2 = 2; var contador3 = 1; var n1; var n2; var id1; var id2; var id3; var kgTotales = 0; var precioTotal = 0; for(contador1=1; contador1 < 60; (contador1)+2){ id1="n" +(contador1); id2="n" +(contador2); id3="result" +(contador3); contador1=(contador1)+2; contador2=(contador2)+2; contador
  5. It doesn't work, the same result I realized it and I changed, but the result is the same too :S
  6. The table multiply the 2nd column and the third one and the result is shown in the fourth, when I execute and write the values, the result is correct, so it's not possible there's some error en n1 or n2 I think, and precioTotal shows the correct result too. I think I'm doing something wrong and it doesn't recognize the var as a string. Like this? parseFloat(kgTotales);kgTotales = (kgTotales+n2);
  7. Hi! My problem is that I've made a function with "var kgTotales = 0". But when I sum "kgTotales = kgTotales + 2" the result is "02", it returns a string and not a number. I use this var in a bucle so the result is "kgTotales = 02...." and next to it the next numbers I want to sum. This is the code: <script type="text/javascript"> function multiplicar() { var contador1; var contador2 = 2; var contador3 = 1; var n1; var n2; var id1; var id2; var id3; var kgTotales = 0; var pr
×
×
  • Create New...