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

 

 


Tema destacado: Curso de javascript por TickTack


  Mostrar Mensajes
Páginas: 1 ... 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 ... 79
191  Seguridad Informática / Nivel Web / Re: Entrar en una base de datos en: 26 Agosto 2010, 01:08 am
Deberías buscar información sobre sql injection
192  Seguridad Informática / Nivel Web / Re: [SQLi]Problema al obtener informationschema.tables en: 25 Agosto 2010, 23:24 pm
http://pastebin.com/3SR7vT30
193  Programación / Ejercicios / Re: Un Problemilla con Un Ejercicio(Java) en: 25 Agosto 2010, 23:07 pm
q tal asi

Código
  1. private void calcularJButtonActionPerformed( ActionEvent event ){
  2. try{
  3. int i = Integer.parseInt(numero.getText())-2;
  4. for(int j=i;j>0;j--){
  5. if(!(j%2==0)){
  6. total.setText("Primo Menor: "+j);
  7. break;
  8. }
  9. }
  10. }
  11. catch(Exception e){
  12. JOptionPane.showMessageDialog(null, "Ingrese un valor numerico", "Valor Numerico No encontrado", JOptionPane.ERROR_MESSAGE);
  13. }
  14. }
194  Seguridad Informática / Nivel Web / Re: [SQLi]Problema al obtener informationschema.tables en: 25 Agosto 2010, 22:35 pm
Si :xD
195  Seguridad Informática / Nivel Web / Re: [SQLi]Problema al obtener informationschema.tables en: 25 Agosto 2010, 22:28 pm
information_schema.tables no esta en la version 4 tendras que hacerlo a ciegas XD
196  Programación / Java / Re: ayuda con aplicaciones para celular (lee esto seguro te interesa) en: 25 Agosto 2010, 22:21 pm
1: Posible, claro como una aplicación mas

2: J2ME
197  Programación / Java / Re: Autosalto de línea JTextArea y evitar división de palabra en: 20 Agosto 2010, 16:51 pm
Con el metodo setlinewrap del textarea
198  Programación / Java / Re: problema netbeans en: 19 Agosto 2010, 18:33 pm
Si quieres pasar datos a un txt, una forma fácil seria con java.util.Properties

Código
  1. Properties properties = new Properties();
  2. File FILE = new File("data.txt");


Salida
Código
  1. FileOutputStream fileOutputStream  = new FileOutputStream(FILE);
  2.  


Guardas los valores en properties.
Código
  1. properties.put("1", "value 1");
  2. properties.put("2", "value 2");

Luego los guardan en el txt
Código
  1. properties.store(fileOutputStream, "datos");

y para leer ese txt usas el mismo java.util.Properties
Código
  1. properties.load(fileInputStream);

y puedes obtener los valores por sus keys
Código
  1. FileInputStream  fileInputStream   = new FileInputStream(FILE);
  2. System.out.println(properties.get("1"));
  3.  
199  Programación / Java / Re: Metodo darCarta en: 19 Agosto 2010, 17:49 pm
http://foro.elhacker.net/java/dudas_con_un_juego_de_poker_en_java-t255041.0.html
200  Programación / Ejercicios / Re: Retos C/C++ en: 19 Agosto 2010, 05:31 am
Código
  1. #include <iostream>
  2. #include <string>
  3. #include <sstream>
  4. using namespace std;
  5. void String(string a,string b);
  6. int main(int argc, char *argv[]) {
  7.    string n="";
  8.    ostringstream stm;
  9.    int value=0;cin>>value;
  10.        for(int index=1;index<=value;index++){
  11.        stm<<index;
  12.            n=stm.str();
  13.        }String("",n);
  14.    return 0;
  15. }
  16. void String(string a, string b) {
  17.    if(b.length() <= 1)
  18.    cout<<a + b+"\n";
  19.    else
  20.    for (int i = 0; i < b.length(); i++) {
  21.        string n = b.substr(0, i) + b.substr(i + 1);
  22.        String(a + b.at(i), n);
  23.      }
  24.  }
  25.  

Reto #3

No me critiquen por lo fácil jaja XDDDD

Generar esta matriz para un entero N dado:

si se ingresa 4

1 0 0 0 0
1 2 0 0 0
1 2 3 0 0
1 2 3 4 0
Páginas: 1 ... 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 ... 79
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines