elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: (TUTORIAL) Aprende a emular Sentinel Dongle By Yapis


  Mostrar Temas
Páginas: 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14
71  Sistemas Operativos / Windows / Herramienta para desbloquear Windows en: 8 Mayo 2020, 12:02 pm
Hola a todos,

hay una gran herramienta que se conoce como ophcrack que se puede usar para romper contraseñas de Windows. En realidad, es un ISO que se puede iniciar con la ayuda de usb o cd. Encuentra automáticamente el archivo SAM de Windows que almacena la contraseña. Sin embargo, algunos controladores de Windows, incluido el mouse, no son compatibles, por lo que debes arreglartelas con el teclado.

Código fuente para más información al respecto:
https://ophcrack.sourceforge.io/


Saludos
72  Foros Generales / Dudas Generales / ¿Opciones de datos en la nube en la dark web? en: 5 Mayo 2020, 12:38 pm
Hola a todos,

¿alguien sabe de alguna alternativa a Google Drive en la dark web? Estoy tratando de almacenar archivos de forma segura y remota.


Gracias y saludos
73  Programación / Java / Traducir este código de C# a Java en: 22 Abril 2020, 14:51 pm
Hola a todos,

¿alguien me puede ayudar, por favor, a traducir este pequeño código de C# a Java?

Código:
public static byte[] Decompress(byte[] data)
        {
            try
            {
                byte[] r = null;

                using (MemoryStream ms = new MemoryStream(data))
                using (Stream s = new InflaterInputStream(ms))
                {
                    List<byte> list = new List<byte>();
                    int count = 0;
                    byte[] b = new byte[8192];

                    while ((count = s.Read(b, 0, 8192)) > 0)
                        list.AddRange(b.Take(count));

                    r = list.ToArray();
                    list.Clear();
                    list = null;
                }

                return r;
            }
            catch { }

            return new byte[] { };
        }
En especial, no se cómo programar estás dos líneas con Java:
Código:
using (MemoryStream ms = new MemoryStream(data))
using (Stream s = new InflaterInputStream(ms))
Ya que en Java reemplazo el using por el try. Pero no funciona si lo hago dos veces en este caso.


Gracias y saludos
74  Foros Generales / Dudas Generales / Número virtual para Whatsapp en: 7 Abril 2020, 11:34 am
Hola a todos,

¿dónde puedo conseguir un número virtual para Whatsapp gratis?


Gracias y saludos
75  Programación / Desarrollo Web / javascript - Generador Sudoku en: 3 Enero 2020, 19:39 pm
Hola a todos,

aquí hay otra vez un javascript del usuario “Totalmente automático” (muchas gracias!). Se trata de un generador Sudoku, en el cual ustedes mismos podrán elegir el grado de dificultad.

En breve la explicación del juego para todos quienes todavía no lo conocen.

El objetivo del Sodoku es ubicar los números del 1 al 9 tanto verticalmente como también horizontalmente como también dentro de los bloques 3x3 correspondientes de tal manera que en cada fila, en cada columna y en cada bloque esos números respectivamente figuren solo una vez.

Si se ha logrado esto, el Sodoku esta solucionado.

Pues bien, que se diviertan desvanandose los sesos en el Sodoku :)

Código:
Código:
<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
// (c) Copyright by Totalmente automatico 2007
///////
var estadoSudoku = 1; // Ingresar aqui si el sudoku debe imprimirse completamente (3) o solamente condicionado (1)
///////


// Sry, ni idea de donde tengo el segmento hasta ***... :-|
// --> Google tiene la culpa...
 function arrayShuffle(){
  var tmp, borde;
  for(var i =0; i < this.length; i++)
  {
    borde = Math.floor(Math.random() * this.length);
    tmp = this[i];
    this[i] = this[borde];
    this[borde] =tmp;
  }
}
Array.prototype.shuffle = arrayShuffle;
// ********


function sudoku_reset() {
for (var i = 1; i <= 81; i++) {
document.getElementById('celdaSudoku'+i).value = "";
}
}

function generar_sudoku ()
   {
   var campos = new Array();
sudoku_reset();
   
    var cola = new Array(1,2,3,4,5,6,7,8,9);
    cola.shuffle();
     for (var i = 1; i <= 81; i++)
     {
       campos[i-1] = cola[(i-1)%9];
       if (i %9 == 0) { var camino1 = cola[0]; var camino2 = cola[1]; var camino3 = cola[2]; cola.shift(); cola.shift(); cola.shift(); cola[6] = camino1; cola[7] = camino2; cola[8] = camino3; }
       if (i %27 == 0) { var camino = cola[0]; cola.shift(); cola[8] = camino; }
     }

     for (var cantidad = 0; cantidad < 400; cantidad++)   // 400 colas sustituidas!
     {
       if (Math.random() >= 0.333)
       {
       var betr_cola_1 = parseInt(Math.random() * 9);
       if (betr_cola_1 == 0) {   if (Math.random() > 0.5) { betr_cola_2 = 1; } else { betr_cola_2 = 2; }   }
       if (betr_cola_1 == 1) {   if (Math.random() > 0.5) { betr_cola_2 = 0; } else { betr_cola_2 = 2; }   }
       if (betr_cola_1 == 2) {   if (Math.random() > 0.5) { betr_cola_2 = 1; } else { betr_cola_2 = 0; }   }
       if (betr_cola_1 == 3) {   if (Math.random() > 0.5) { betr_cola_2 = 4; } else { betr_cola_2 = 5; }   }
       if (betr_cola_1 == 4) {   if (Math.random() > 0.5) { betr_cola_2 = 3; } else { betr_cola_2 = 5; }   }
       if (betr_cola_1 == 5) {   if (Math.random() > 0.5) { betr_cola_2 = 4; } else { betr_cola_2 = 3; }   }
       if (betr_cola_1 == 6) {   if (Math.random() > 0.5) { betr_cola_2 = 7; } else { betr_cola_2 = 8; }   }
       if (betr_cola_1 == 7) {   if (Math.random() > 0.5) { betr_cola_2 = 6; } else { betr_cola_2 = 8; }   }
       if (betr_cola_1 == 8) {   if (Math.random() > 0.5) { betr_cola_2 = 7; } else { betr_cola_2 = 6; }   }
       var entre = new Array();

         for (var i = 0; i <= 8; i++) { entre[i] = campos[betr_cola_1 * 9 + i]; }
         for (var i = 0; i <= 8; i++) { campos[betr_cola_1 * 9 + i] = campos[betr_cola_2 * 9 + i]; }
         for (var i = 0; i <= 8; i++) { campos[betr_cola_2 * 9 + i] = entre[i]; }
       }

       else if (Math.random() >= 0.666)
       {
       var betr_columna_1 = parseInt(Math.random() * 9);
       if (betr_columna_1 == 0) {   if (Math.random() > 0.5) { betr_columna_2 = 1; } else { betr_columna_2 = 2; }   }
       if (betr_columna_1 == 1) {   if (Math.random() > 0.5) { betr_columna_2 = 0; } else { betr_columna_2 = 2; }   }
       if (betr_columna_1 == 2) {   if (Math.random() > 0.5) { betr_columna_2 = 1; } else { betr_columna_2 = 0; }   }
       if (betr_columna_1 == 3) {   if (Math.random() > 0.5) { betr_columna_2 = 4; } else { betr_columna_2 = 5; }   }
       if (betr_columna_1 == 4) {   if (Math.random() > 0.5) { betr_columna_2 = 3; } else { betr_columna_2 = 5; }   }
       if (betr_columna_1 == 5) {   if (Math.random() > 0.5) { betr_columna_2 = 4; } else { betr_columna_2 = 3; }   }
       if (betr_columna_1 == 6) {   if (Math.random() > 0.5) { betr_columna_2 = 7; } else { betr_columna_2 = 8; }   }
       if (betr_columna_1 == 7) {   if (Math.random() > 0.5) { betr_columna_2 = 6; } else { betr_columna_2 = 8; }   }
       if (betr_columna_1 == 8) {   if (Math.random() > 0.5) { betr_columna_2 = 7; } else { betr_columna_2 = 6; }   }
       var entre = new Array();

         for (var i = 0; i <= 8; i++) { entre[i] = campos[betr_columna_1 + i * 9]; }
         for (var i = 0; i <= 8; i++) { campos[betr_columna_1 + i * 9] = campos[betr_columna_2 + i * 9]; }
         for (var i = 0; i <= 8; i++) { campos[betr_columna_2 + i * 9] = entre[i]; }
       }

       else
       {
       var betr_cola_bloque_1 = parseInt(Math.random() * 3);
       if (betr_cola_bloque_1 == 0) {   if (Math.random() > 0.5) { betr_cola_bloque_2 = 1; } else { betr_cola_bloque_2 = 2; }   }
       if (betr_cola_bloque_1 == 1) {   if (Math.random() > 0.5) { betr_cola_bloque_2 = 0; } else { betr_cola_bloque_2 = 2; }   }
       if (betr_cola_bloque_1 == 2) {   if (Math.random() > 0.5) { betr_cola_bloque_2 = 0; } else { betr_cola_bloque_2 = 1; }   }
       var entre = new Array();

         for (var i = 0; i <= 26; i++) { entre[i] = campos[betr_cola_bloque_1 * 27 + i]; }
         for (var i = 0; i <= 26; i++) { campos[betr_cola_bloque_1 * 27 + i] = campos[betr_cola_bloque_2 * 27 + i]; }
         for (var i = 0; i <= 26; i++) { campos[betr_cola_bloque_2 * 27 + i] = entre[i]; }
       }
     }

     if (document.getElementById('difiSudoku0').checked == true) { number = 36; }
     if (document.getElementById('difiSudoku1').checked == true) { number = 30; }
     if (document.getElementById('difiSudoku2').checked == true) { number = 26; }
     if (document.getElementById('difiSudoku3').checked == true) { number = 22; }
     var cuales = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81);
     cuales.shuffle();
     estado = document.getElementById('estadoSudoku').value;
   for (var i = 0; i < number*estado; i++)
   {
for (var k = 1; k <= 81; k++) {
if (cuales[0] == k) document.getElementById('celdaSudoku'+k).value = campos[k-1];
}
  cuales.shift();
   }
   for (var i = 1; i <= 81; i++) {
document.getElementById('celdaSudoku'+i+'_hid').value = campos[i-1];
   }
}

function resolver ()
{
for (var i = 1; i <= 81; i++) {
document.getElementById('celdaSudoku'+i).value = document.getElementById('celdaSudoku'+i+'_hid').value;
}
}

function sudokuInit() {
document.write('<input type="hidden" name="estadoSudoku" id="estadoSudoku" value="1" />');
document.write('<h3 style="display: inline;">Tu propio Sudoku</h3>');
document.write('<br />');
document.write('<fieldset>');
document.write('<legend>Generador Sudoku</legend>');
document.write('<br />');
document.getElementById('estadoSudoku').value = 1;

document.write("<style type='text/css'>");
document.write(".input { border: 1px solid #000000; width: 25px; height: 25px; text-align: center; font-family: Arial; font-weight: bold; }");
document.write("fieldset { width: 50%; padding: 10px; float: center; margin-left: auto; margin-right: auto; }");
document.write("</style>");
for (var j = 1; j <= 1; j++)
{
for (var i = 1; i <= 81; i++)
{
document.write("<input type='text' name='celdaSudoku"+i+"' id='celdaSudoku"+i+"' maxlength='1' style='overflow: hidden' class='input'> ");
if (i %3 == 0){ document.write("    "); }
if ( (i %9 == 0) && (i != 81) ){ document.write("<br />"); }
if (i %27 == 0) { document.write("<br />"); }
}
}
for (var i = 1; i <= 81; i++)
{
document.write("<input type='hidden' name='celdaSudoku"+i+"_hid' id='celdaSudoku"+i+"_hid' />");
}

document.write('<input type="radio" name="difi" id="difiSudoku0" checked="checked" /> <b>*</b>   ');
document.write('<input type="radio" name="difi" id="difiSudoku1" /> <b>**</b>   ');
document.write('<input type="radio" name="difi" id="difiSudoku2" /> <b>***</b>   ');
document.write('<input type="radio" name="difi" id="difiSudoku3" /> <b>****</b>');
document.write('<br /><br />');
document.write('<button onclick="generar_sudoku();">Generar</button>');
document.write('   ');
document.write('<button onclick="sudoku_reset();">Desechar</button>');
document.write('   ');
document.write('<button onclick="resolver();">Resolver</button>');
document.write('</fieldset>');
}
//-->
</script>
<script type="text/javascript">sudokuInit();</script>
<!-- Presentado por javascripts-gratis.de -->
</body>
</html>

Página web:
https://drive.google.com/open?id=1LKzs8_a1B0JiVA76r3RjjUT24Nqd3RBr

Autor: Totalmente automático

Saludos
76  Programación / Desarrollo Web / Lights Out 2 en: 19 Octubre 2019, 10:50 am
Hola a todos,

del usuario "totalmente automático" viene esta versión del juego Lights Out.

El objetivo del juego es que también aquí se clickee los campos de tal manera que al final no quede ningún gancho más.

En contraste con la otra versión del juego, aquí existe ahora la posibilidad de poner los campos aleatoriamente al principio. Además se integro una vía de solución que les muestra cómo resolver la constelación actual en el juego.

Con vía de solución solamente se tiene la mitad de la diversión pero ella muestra que no es imposible resolver la tarea  ;). Que se diviertan con eso!

Código:
Código:
<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- präsentiert von kostenlose-javascripts.de -->
<script type='text/javascript'>
<!--
// (C)opyright by Vollautomatisch June 4 2007

    function arrayShuffle()
  {
    var tmp, borde;
    for(var i =0; i < this.length; i++)
    {
      borde = Math.floor(Math.random() * this.length);
      tmp = this[i];
      this[i] = this[borde];
      this[borde] =tmp;
    }
  }
  Array.prototype.shuffle = arrayShuffle;

  function validate (uno, dos, tres, cuatro)
  {
    if (document.getElementById('campo_' + uno).checked == true)
    {
      if (document.getElementById('campo_' + dos).checked == true)
      {
        if (document.getElementById('campo_' + tres).checked == true)
        {
          if (document.getElementById('campo_' + cuatro).checked == true)
          {
            return true;
          }
        }
      }
    }
    return false;
  }

  function solve ()
  {
    var viejo = new Array();
    for (var i = 1; i < 26; i++)
    {
      viejo[i-1] = document.getElementById('campo_' + i).checked == true;
    }
    var draws = new Array();
    var numero = 0;
    for (var i = 1; i < 21; i++)
    {
      if (document.getElementById('campo_' + i).checked == true)  { draws[numero] = (i + 5); numero++; cambia(i + 5); lightsOut(i + 5); }
    }
    if (document.getElementById('campo_21').checked == true)  { draws[numero] = 4; numero++; cambia(4); lightsOut(4); draws[numero] = 5; numero++; cambia(5); lightsOut(5); }
    if (document.getElementById('campo_22').checked == true)  { draws[numero] = 2; cambia(2); lightsOut(2); numero++; draws[numero] = 5; numero++; cambia(5); lightsOut(5); }
    if (document.getElementById('campo_23').checked == true)  { draws[numero] = 4; numero++; cambia(4); lightsOut(4); }
    for (var i = 1; i < 21; i++)
    {
      if (document.getElementById('campo_' + i).checked == true)  { draws[numero] = (i + 5); numero++; cambia(i + 5); lightsOut(i + 5); }
    }

    if (validate(16, 16, 21, 22) == true)  { draws[numero] = 21; numero++; cambia(21); lightsOut(21); }
    else if (validate(20, 20, 24, 25) == true)  { draws[numero] = 25; numero++; cambia(25); lightsOut(25); }
    else if (validate(17, 21, 22, 23) == true)  { draws[numero] = 22; numero++; cambia(22); lightsOut(22); }
    else if (validate(18, 22, 23, 24) == true)  { draws[numero] = 23; numero++; cambia(23); lightsOut(23); }
    else if (validate(19, 23, 24, 25) == true)  { draws[numero] = 24; numero++; cambia(24); lightsOut(24); }
    else if (validate(17, 17, 21, 22) == true && validate(19, 19, 24, 25) == true)  { draws[numero] = 22; numero++; cambia(22); lightsOut(22); draws[numero] = 24; numero++; cambia(24); lightsOut(24); }

    for (var i = 1; i < 26; i++)
    {
      if (viejo[i-1] == true)  { document.getElementById('campo_' + i).checked = true; }
      if (viejo[i-1] == false)  { document.getElementById('campo_' + i).checked = false; }
    }

    var copy = new Array();
    for (var i = 0; i < draws.length; i++)
    {
    cut = draws[i];
      if (cut == 1)  { copy[i] = 'A1'; }
      else if (cut == 2)  { copy[i] = 'B1'; }
      else if (cut == 3)  { copy[i] = 'C1'; }
      else if (cut == 4)  { copy[i] = 'D1'; }
      else if (cut == 5)  { copy[i] = 'E1'; }
      else if (cut == 6)  { copy[i] = 'A2'; }
      else if (cut == 7)  { copy[i] = 'B2'; }
      else if (cut == 8)  { copy[i] = 'C2'; }
      else if (cut == 9)  { copy[i] = 'D2'; }
      else if (cut == 10)  { copy[i] = 'E2'; }
      else if (cut == 11)  { copy[i] = 'A3'; }
      else if (cut == 12)  { copy[i] = 'B3'; }
      else if (cut == 13)  { copy[i] = 'C3'; }
      else if (cut == 14)  { copy[i] = 'D3'; }
      else if (cut == 15)  { copy[i] = 'E3'; }
      else if (cut == 16)  { copy[i] = 'A4'; }
      else if (cut == 17)  { copy[i] = 'B4'; }
      else if (cut == 18)  { copy[i] = 'C4'; }
      else if (cut == 19)  { copy[i] = 'D4'; }
      else if (cut == 20)  { copy[i] = 'E4'; }
      else if (cut == 21)  { copy[i] = 'A5'; }
      else if (cut == 22)  { copy[i] = 'B5'; }
      else if (cut == 23)  { copy[i] = 'C5'; }
      else if (cut == 24)  { copy[i] = 'D5'; }
      else if (cut == 25)  { copy[i] = 'E5'; }
    }

    for (var j = 0; j < copy.length; j++)
    {
      for (var i = 0; i < copy.length; i++)
      {
        if ( (copy[i] == copy[j]) && (copy[i] != "") && (i != j) )  { copy[i] = ""; copy[j] = ""; }
      }
    }

    var salida = new Array();
    var numero = 0;

    for (var i = 0; i < copy.length; i++)
    {
      if (copy[i] != "")  { salida[numero] = copy[i]; numero++; }
    }

    salida.shuffle();
    document.getElementById('solven').value = salida.join(" -> ") + "... Done!!!";
  }

  function random ()
  {
    var numero = parseInt(Math.random() * 10 + 25);
    for (var i = 0; i < numero; i++)
    {
      var campo = parseInt(Math.random() * 25 + 1);
      cambia(campo);
      lightsOut(campo);
    }
  }

  function cambia ( campo )
  {
    campo = parseInt(campo);
    if (document.getElementById('campo_' + campo).checked == true)  { document.getElementById('campo_' + campo).checked = false; }
    else if (document.getElementById('campo_' + campo).checked == false)  { document.getElementById('campo_' + campo).checked = true; }
  }

  function lightsOut (campo)
  {
    campo = parseInt(campo);  
    if ( (campo > 6) && (campo < 10) || (campo > 11) && (campo < 15) || (campo > 16) && (campo < 20))
    {
      var campos = new Array(-5, -1, 1, 5);
      if (document.getElementById('campo_' + (campo-5)).checked == true)  { document.getElementById('campo_' + (campo-5)).checked = false; }
      else if (document.getElementById('campo_' + (campo-5)).checked == false)  { document.getElementById('campo_' + (campo-5)).checked = true; }

      if (document.getElementById('campo_' + (campo-1)).checked == true)  { document.getElementById('campo_' + (campo-1)).checked = false; }
      else if (document.getElementById('campo_' + (campo-1)).checked == false)  { document.getElementById('campo_' + (campo-1)).checked = true; }

      if (document.getElementById('campo_' + (campo+1)).checked == true)  { document.getElementById('campo_' + (campo+1)).checked = false; }
      else if (document.getElementById('campo_' + (campo+1)).checked == false)  { document.getElementById('campo_' + (campo+1)).checked = true; }
 
      if (document.getElementById('campo_' + (campo+5)).checked == true)  { document.getElementById('campo_' + (campo+5)).checked = false; }
      else if (document.getElementById('campo_' + (campo+5)).checked == false)  { document.getElementById('campo_' + (campo+5)).checked = true; }
    }
    else
    {
      switch (campo)
      {
        case 1: cambia(2); cambia(6); break;
        case 2: cambia(1); cambia(3); cambia(7); break;
        case 3: cambia(2); cambia(4); cambia(8); break;
        case 4: cambia(3); cambia(5); cambia(9); break;
        case 5: cambia(4); cambia(10); break;
        case 6: cambia(1); cambia(7); cambia(11); break;
        case 10: cambia(5); cambia(9); cambia(15); break;
        case 11: cambia(6); cambia(12); cambia(16); break;
        case 15: cambia(10); cambia(14); cambia(20); break;
        case 16: cambia(11); cambia(17); cambia(21); break;
        case 20: cambia(15); cambia(19); cambia(25); break;
        case 21: cambia(16); cambia(22); break;
        case 22: cambia(17); cambia(21); cambia(23); break;
        case 23: cambia(18); cambia(22); cambia(24); break;
        case 24: cambia(19); cambia(23); cambia(25); break;
        case 25: cambia(20); cambia(24); break;
        }
      }
    }
function initFields() {
  document.write('<table cellspacing="0">');
  document.write('<tr>');
    document.write('<th></th>');
    document.write('<th>A</th>');
    document.write('<th>B</th>');
    document.write('<th>C</th>');
    document.write('<th>D</th>');
    document.write('<th>E</th>');
  document.write('</tr>');
  document.write('<tr>');
    for ( var i = -5; i < 32; i++ )
    {
      if (i == 1)  { document.write('</tr><tr><td>1</td>'); }
      if ( (i > 0) && (i < 26) )  { document.write('<td><input type="checkbox" name="campo" id="campo_' + i + '" onClick="lightsOut( ' + i + ' )" style="background-color: #ffffff;" /></td>'); }
      if ( (i <= 0) || (i >= 26) )  { document.write('<td><input type="checkbox" name="campo" id="campo_' + i + '" style="visibility: hidden;" /></td>'); }

      if ( (i %5 == 0) && (i > 0))  { document.write('</tr><tr>'); }
      if ( (i > 0) && (i < 25) && (i %5 == 0) )  { document.write('<td>' + (i /5 + 1) + '</td>'); }
    }
  document.write('</tr>');
  document.write('</table>');
}

//-->
</script>
<button onclick="random()">Aleatorio</button>
    
<button onclick="solve()">Resolver</button>
  <br />
  <br />
<textarea name="solven" id="solven" id="solven" rows="5" cols="40" style="overflow: auto;" readonly="readonly"></textarea>
<script type="text/javascript">initFields();</script>
<!-- Presentado por javascripts-gratis.de -->
</body>
</html>

Página web: https://drive.google.com/open?id=1h4K2om6vBVk-bIAHV98zx91aQQDLKYYt

Autor: totalmente automático


Saludos
77  Programación / Desarrollo Web / javascript - Entrenador uno por uno en: 18 Octubre 2019, 10:06 am
Hola a todos,

este javascript esta principalmente dirigido a los alumnos de la escuela primaria y entrena el 1x1.

Con ello se plantean tareas aleatorias y el javascript calcula la puntuación basandose en las respuestas.


Que se diviertan con eso :D

Código:
Código:
<!DOCTYPE html>
<html>
<head>
  <title>Ejemplo de javascript</title>
  <meta charset="UTF-8">
</head>
<body>
<!-- Presentado por javascripts-gratis.de -->
<script type='text/javascript'>
<!--
/*
Este script proviene de Freddus.
Ustedes lo pueden usar libremente.
Aunque ustedes no deben cambiar nada y sería agradable
agregar un link hacia mi página principal (ver abajo).
El entrenador uno por uno es principalmente para alumnos del 2. al 4. grado.
*/
let resultado,puntos,corriendo;
resultado=5;
puntos=0;
corriendo=0;
function fininicio(){
window.status=("Entrenador uno por uno 1.0 by Nobstyle");
if (corriendo == 0){
corriendo=1;
document.getElementById('inicioFin').value="finalizar";
document.getElementById('batten').style.visibility="visible";
document.getElementById('entrada').style.visibility="visible";
document.getElementById('entrada').value="";
document.getElementById('entrada').focus();
tareanueva();
}// fin if
else{
corriendo=0;
document.getElementById('visualizacion').innerHTML="<p align='center'><font color='blue'>Bienvenido al entrenador uno por uno!</font></p>";
document.getElementById('inicioFin').value="Ah\u00ED vamos!";
document.getElementById('batten').style.visibility="hidden";
document.getElementById('entrada').style.visibility="hidden";
puntos=0;
document.getElementById('salidaDePuntos').innerHTML="<font color='green'>Puntos: "+puntos+"</font>";
}// fin else
}// fin function

function tareanueva(){
const numero1=Math.ceil(Math.random()*10);
const numero2=Math.ceil(Math.random()*10);
resultado = numero1*numero2;
document.getElementById('visualizacion').innerHTML="<p align='center'><font color='blue'>"+numero1+" x "+numero2+"</font></p>";
} // fin function

function verificar(){
if (document.getElementById('entrada').value == resultado){
puntos++;
document.getElementById('salidaDePuntos').innerHTML="<font color='green'>Puntos: "+puntos+"</font>";
document.getElementById('entrada').value="";
document.getElementById('entrada').focus();
if (puntos>=50){
alert("Estupendo, has ganado el juego!");
fininicio();
}// fin if
else{
tareanueva();
}// fin else
}// fin if
else{
if (document.getElementById('entrada').value == ""){
alert("Tienes que ingresar algo...");
}// fin if
else{
puntos=puntos/2;
document.getElementById('salidaDePuntos').innerHTML="<font color='red'>Puntos: "+puntos+"</font>";
document.getElementById('entrada').value="";
document.getElementById('entrada').focus();
}// fin else
}// fin else
} // fin function

window.status=("Entrenador uno por uno 1.0 by Nobstyle");
//-->
</script>
<font align="center">
<center>
  <table border="3" width="250" bordercolor="#000080" bordercolorlight="#000080" bordercolordark="#000080">
<tr>
  <td width="100%" id="visualizacion" colspan="2"><p align="center"><font color="blue">Bienvenido al entrenador uno por uno!</font></p></td>
</tr>
<tr>
  <td width="100%" colspan="2"><p align="center">
  <input type="text" id="entrada" size="20" style="visibility:hidden" />
  <input type="button" value="OK" id="batten" onclick="verificar()" style="visibility:hidden" />
</p></td>
</tr>
<tr>
  <td width="50%"><p align="center" id="salidaDePuntos"><font color="green">Puntos: 0</font></p></td>
  <td width="50%"><p align="center">
  <input type="button" value="Ah&iacute; vamos!" id="inicioFin" onclick="fininicio()" />
</p></td>
</tr>
  </table>
</center>
</font>
</body>
</html>

Página web: https://drive.google.com/open?id=1DN6KR0y5bx1ePoK6CW3Lfd869-ncS8IZ

Autor: Freddus


Saludos
78  Foros Generales / Sugerencias y dudas sobre el Foro / Web Application Firewall (WAF) Blocked en: 16 Octubre 2019, 17:36 pm
Hola a todos,

al tratar de crear un post me sale este error:

Web Application Firewall (WAF) Blocked

::CAPTCHA_BOX::
Una regla de seguridad ha sido aplicada. Si crees que es un error (falso positivo) contacta con webmaster@elhacker.net. Gracias.

He pedido ayuda pero a nadie le interesa. Esto es lo último que haré.

Realmente, en comparación con otros foros, bue... mejor no escribo nada. Quizas los administradores se sientan tan ofendidos que me darán ban....


Gracias y saludos
79  Programación / Programación General / Procedimiento de Delphi con ayuda de orientación? en: 27 Septiembre 2019, 01:43 am
¡Holu hola!

Tengo que hacer una tarea del hogar en el proceso clásico de Delphi (panel de expertos) y ya he encontrado algunos subgrupos de este método científico, uno de los cuales se llama Delphi con ayuda de orientación, pero todo lo que encontré en Internet para esta guía fue que la subsecuente retroalimentación debería representarla.

¿Hay alguien que lo sepa mejor?


Gracias de antemano!
80  Programación / Programación General / Delphi form mouse tira form más grande sin presionar el botón derecho del mouse? en: 27 Septiembre 2019, 01:30 am
Buenas días,

tengo un pequeño problema con mi aplicación esta mañana.

El error es, como se describió anteriormente, que mi formulario Delphi, cuando quiero moverlo con el puntero del mouse, que luego ya no lo detiene después de completar presionar el botón derecho del mouse con el proceso de destino. Solo se detiene cuando lo presiono nuevamente.


Gracias y saludos
Páginas: 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines