debakun

Members
  • Content count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About debakun

  • Rank
    Newbie
  1. Oh thank you!! Was using an outdated version of the j/connector we used at school.Thank you for your help.:-)
  2. So is there sumthing wrong with netbeans or mysql?
  3. So i have created a basic program on retrieving a table from mysql(named "book") onto a table in java (name "buklau"). The name of the database is "12sci". I cant get it to work! Pls help me out. Thank you. Heres the code on the retrieve button: DefaultTableModel model= (DefaultTableModel)buklau.getModel(); try{ Class.forName("java.sql.Driver"); Statement stmt = con.createStatement(); String query="SELECT * FROM book"; ResultSet rs=stmt.executeQuery(query); while(rs.next()){ String nm=rs.getString("name"); String ph=rs.getString("phone"); String ct=rs.getString("city"); model.addRow(new Object[]{nm,ph,ct}); } rs.close(); stmt.close(); con.close(); } catch(Exception e){ JOptionPane.showMessageDialog(null, "e"); } heres the pic of the msql database
  4. Ok i dont get it. Sorry...
  5. I created a program to help me code my sentences.Please help me debug this program. The compiler works just fine but the decompiler wont!!Thank you!! imp - Copy.html
  6. I created a program to help me code my sentences.Please help me debug this program. The compiler works just fine but the decompiler wont!!Thank you!! <!DOCTYPE html> <html> <body> <p id="demo"><button onclick="code()">Encode</button></p> <P><button onclick="decode()">Decode</button></p> <script> function code(){ var word=prompt("Enter Sentence to Code"); var length= word.length; var hey= length/2; var lol=Math.floor(hey); for(i=0;i<length;i++){ var mampi = word.substring(i,i+1); if(mampi==="a"){ document.write("86832"); } else if(mampi==="b"){ document.write("11111"); } else if(mampi==="c"){ document.write("10101"); } else if(mampi==="d"){ document.write("13364"); } else if(mampi==="e"){ document.write("54272"); } else if(mampi==="f"){ document.write("48382"); } else if(mampi==="g"){ document.write("94702"); } else if(mampi==="h"){ document.write("47029"); } else if(mampi==="i"){ document.write("74302"); } else if(mampi==="j"){ document.write("10111"); } else if(mampi==="k"){ document.write("13831"); } else if(mampi==="l"){ document.write("12434"); } else if(mampi==="m"){ document.write("13338"); } else if(mampi==="n"){ document.write("14352"); } else if(mampi==="o"){ document.write("15356"); } else if(mampi==="p"){ document.write("55316"); } else if(mampi==="q"){ document.write("37417"); } else if(mampi==="r"){ document.write("16478"); } else if(mampi==="s"){ document.write("99190"); } else if(mampi==="t"){ document.write("23374"); } else if(mampi==="u"){ document.write("23741"); } else if(mampi==="v"){ document.write("22473"); } else if(mampi==="w"){ document.write("26433"); } else if(mampi==="x"){ document.write("23454"); } else if(mampi==="y"){ document.write("57439"); } else if(mampi==="z"){ document.write("26143"); } else if(mampi===" "){ document.write("00000"); } else if(mampi==="A"){ document.write("01111"); } else if(mampi==="B"){ document.write("00101"); } else if(mampi==="C"){ document.write("13304"); } else if(mampi==="D"){ document.write("50272"); } else if(mampi==="E"){ document.write("40382"); } else if(mampi==="F"){ document.write("9e702"); } else if(mampi==="G"){ document.write("47h29"); } else if(mampi==="H"){ document.write("7E302"); } else if(mampi==="I"){ document.write("10011"); } else if(mampi==="J"){ document.write("0a831"); } else if(mampi==="K"){ document.write("12034"); } else if(mampi==="L"){ document.write("00338"); } else if(mampi==="M"){ document.write("14052"); } else if(mampi==="N"){ document.write("15056"); } else if(mampi==="O"){ document.write("55016"); } else if(mampi==="P"){ document.write("30417"); } else if(mampi==="Q"){ document.write("16M78"); } else if(mampi==="R"){ document.write("921A9"); } else if(mampi==="S"){ document.write("G3542"); } else if(mampi==="T"){ document.write("230W1"); } else if(mampi==="U"){ document.write("2A473"); } else if(mampi==="V"){ document.write("26Aa3"); } else if(mampi==="W"){ document.write("23D54"); } else if(mampi==="X"){ document.write("57A39"); } else if(mampi==="Y"){ document.write("QB143"); } else if(mampi==="Z"){ document.write("KKFD3"); } else if(mampi==="Z"){ document.write("KKFD3"); } else if(mampi===","){ document.write("mac00"); } else if(mampi==="."){ document.write("B4[]("); } else if(mampi==="+"){ document.write("+1+2*"); } else if(mampi==="-"){ document.write("-----"); } else if(mampi==="*"){ document.write("*****"); } else if(mampi==="/"){ document.write("/////"); } else if(mampi==="1"){ document.write("1234q"); }else if(mampi==="2"){ document.write("ddh21"); }else if(mampi==="3"){ document.write("bbdjz"); }else if(mampi==="4"){ document.write("K1113"); }else if(mampi==="5"){ document.write("53FD3"); }else if(mampi==="6"){ document.write("11111"); }else if(mampi==="7"){ document.write("94932"); }else if(mampi==="8"){ document.write("W4322"); }else if(mampi==="9"){ document.write("E42SD"); }else if(mampi==="0"){ document.write("-000-"); }else if(mampi==="Z"){ document.write("KKFD3"); } } } function decode(){ var word=prompt("Enter code to decode"); for(i=0;i<length;i=i+5){ var mampi = word.substring(i,i+5); if(mampi==="86832"){ document.write("a"); } else if(mampi==="11111"){ document.write("b"); } else if(mampi==="10101"){ document.write("c"); } else if(mampi==="13364"){ document.write("d"); } else if(mampi==="54272"){ document.write("e"); } else if(mampi==="48382"){ document.write("f"); } else if(mampi==="94702"){ document.write("g"); } else if(mampi==="47029"){ document.write("h"); } else if(mampi==="74302"){ document.write("i"); } else if(mampi==="10111"){ document.write("j"); } else if(mampi==="13831"){ document.write("k"); } else if(mampi==="12434"){ document.write("l"); } else if(mampi==="13338"){ document.write("m"); } else if(mampi==="14352"){ document.write("n"); } else if(mampi==="15356"){ document.write("o"); } else if(mampi==="55316"){ document.write("p"); } else if(mampi==="37417"){ document.write("q"); } else if(mampi==="16478"){ document.write("r"); } else if(mampi==="99190"){ document.write("s"); } else if(mampi==="23374"){ document.write("t"); } else if(mampi==="23741"){ document.write("u"); } else if(mampi==="22473"){ document.write("v"); } else if(mampi==="26433"){ document.write("w"); } else if(mampi==="23454"){ document.write("x"); } else if(mampi==="57439"){ document.write("y"); } else if(mampi==="26143"){ document.write("z"); } else if(mampi==="00000"){ document.write(" "); } else if(mampi==="01111"){ document.write("A"); } else if(mampi==="00101"){ document.write("B"); } else if(mampi==="13304"){ document.write("C"); } else if(mampi==="50272"){ document.write("D"); } else if(mampi==="40382"){ document.write("E"); } else if(mampi==="V"){ document.write("F"); } else if(mampi==="47h29"){ document.write("G"); } else if(mampi==="7E302"){ document.write("H"); } else if(mampi==="10011"){ document.write("I"); } else if(mampi==="0a831"){ document.write("J"); } else if(mampi==="12034"){ document.write("K"); } else if(mampi==="00338"){ document.write("L"); } else if(mampi==="14052"){ document.write("M"); } else if(mampi==="15056"){ document.write("N"); } else if(mampi==="55016"){ document.write("O"); } else if(mampi==="30417"){ document.write("P"); } else if(mampi==="16M78"){ document.write("Q"); } else if(mampi==="921A9"){ document.write("R"); } else if(mampi==="G3542"){ document.write("S"); } else if(mampi==="230W1"){ document.write("T"); } else if(mampi==="2A473"){ document.write("U"); } else if(mampi==="26Aa3"){ document.write("V"); } else if(mampi==="23D54"){ document.write("W"); } else if(mampi==="57A39"){ document.write("X"); } else if(mampi==="QB143"){ document.write("Y"); } else if(mampi==="KKFD3"){ document.write("Z"); } else if(mampi==="Z"){ document.write("KKFD3"); } else if(mampi==="mac00"){ document.write(","); } else if(mampi==="B4[]()"){ document.write("."); } else if(mampi==="+1+2*"){ document.write("+"); } else if(mampi==="-----"){ document.write("-"); } else if(mampi==="*****"){ document.write("*"); } else if(mampi==="/////"){ document.write("/"); } else if(mampi==="1234q"){ document.write("1"); }else if(mampi==="ddh21"){ document.write("2"); }else if(mampi==="bbdjz"){ document.write("3"); }else if(mampi==="K1113"){ document.write("4"); }else if(mampi==="53FD3"){ document.write("5"); }else if(mampi==="11111"){ document.write("6"); }else if(mampi==="94932"){ document.write("7"); }else if(mampi==="W4322"){ document.write("8"); }else if(mampi==="E42SD"){ document.write("9"); }else if(mampi==="-000-"){ document.write("0"); }else if(mampi==="Z"){ document.write("KKFD3"); } } } </script> </body> </html>
  7. So i created a program which will help me to encode any sentence or paragraph. So when i made a decompiler it wont work.Please help me out here.Thank you! <!DOCTYPE html> <html> <body> <p id="demo"><button onclick="code()">Encode</button></p> <P><button onclick="decode()">Decode</button></p> <script> function code(){ var word=prompt("Enter Sentence to Code"); var length= word.length; var hey= length/2; var lol=Math.floor(hey); for(i=0;i<length;i++){ var mampi = word.substring(i,i+1); if(mampi==="a"){ document.write("86832"); } else if(mampi==="b"){ document.write("11111"); } else if(mampi==="c"){ document.write("10101"); } else if(mampi==="d"){ document.write("13364"); } else if(mampi==="e"){ document.write("54272"); } else if(mampi==="f"){ document.write("48382"); } else if(mampi==="g"){ document.write("94702"); } else if(mampi==="h"){ document.write("47029"); } else if(mampi==="i"){ document.write("74302"); } else if(mampi==="j"){ document.write("10111"); } else if(mampi==="k"){ document.write("13831"); } else if(mampi==="l"){ document.write("12434"); } else if(mampi==="m"){ document.write("13338"); } else if(mampi==="n"){ document.write("14352"); } else if(mampi==="o"){ document.write("15356"); } else if(mampi==="p"){ document.write("55316"); } else if(mampi==="q"){ document.write("37417"); } else if(mampi==="r"){ document.write("16478"); } else if(mampi==="s"){ document.write("99190"); } else if(mampi==="t"){ document.write("23374"); } else if(mampi==="u"){ document.write("23741"); } else if(mampi==="v"){ document.write("22473"); } else if(mampi==="w"){ document.write("26433"); } else if(mampi==="x"){ document.write("23454"); } else if(mampi==="y"){ document.write("57439"); } else if(mampi==="z"){ document.write("26143"); } else if(mampi===" "){ document.write("00000"); } else if(mampi==="A"){ document.write("01111"); } else if(mampi==="B"){ document.write("00101"); } else if(mampi==="C"){ document.write("13304"); } else if(mampi==="D"){ document.write("50272"); } else if(mampi==="E"){ document.write("40382"); } else if(mampi==="F"){ document.write("9e702"); } else if(mampi==="G"){ document.write("47h29"); } else if(mampi==="H"){ document.write("7E302"); } else if(mampi==="I"){ document.write("10011"); } else if(mampi==="J"){ document.write("0a831"); } else if(mampi==="K"){ document.write("12034"); } else if(mampi==="L"){ document.write("00338"); } else if(mampi==="M"){ document.write("14052"); } else if(mampi==="N"){ document.write("15056"); } else if(mampi==="O"){ document.write("55016"); } else if(mampi==="P"){ document.write("30417"); } else if(mampi==="Q"){ document.write("16M78"); } else if(mampi==="R"){ document.write("921A9"); } else if(mampi==="S"){ document.write("G3542"); } else if(mampi==="T"){ document.write("230W1"); } else if(mampi==="U"){ document.write("2A473"); } else if(mampi==="V"){ document.write("26Aa3"); } else if(mampi==="W"){ document.write("23D54"); } else if(mampi==="X"){ document.write("57A39"); } else if(mampi==="Y"){ document.write("QB143"); } else if(mampi==="Z"){ document.write("KKFD3"); } else if(mampi==="Z"){ document.write("KKFD3"); } else if(mampi===","){ document.write("mac00"); } else if(mampi==="."){ document.write("B4[]("); } else if(mampi==="+"){ document.write("+1+2*"); } else if(mampi==="-"){ document.write("-----"); } else if(mampi==="*"){ document.write("*****"); } else if(mampi==="/"){ document.write("/////"); } else if(mampi==="1"){ document.write("1234q"); }else if(mampi==="2"){ document.write("ddh21"); }else if(mampi==="3"){ document.write("bbdjz"); }else if(mampi==="4"){ document.write("K1113"); }else if(mampi==="5"){ document.write("53FD3"); }else if(mampi==="6"){ document.write("11111"); }else if(mampi==="7"){ document.write("94932"); }else if(mampi==="8"){ document.write("W4322"); }else if(mampi==="9"){ document.write("E42SD"); }else if(mampi==="0"){ document.write("-000-"); }else if(mampi==="Z"){ document.write("KKFD3"); } } } function decode(){ var word=prompt("Enter code to decode"); for(i=0;i<length;i=i+5){ var mampi = word.substring(i,i+5); if(mampi==="86832"){ document.write("a"); } else if(mampi==="11111"){ document.write("b"); } else if(mampi==="10101"){ document.write("c"); } else if(mampi==="13364"){ document.write("d"); } else if(mampi==="54272"){ document.write("e"); } else if(mampi==="48382"){ document.write("f"); } else if(mampi==="94702"){ document.write("g"); } else if(mampi==="47029"){ document.write("h"); } else if(mampi==="74302"){ document.write("i"); } else if(mampi==="10111"){ document.write("j"); } else if(mampi==="13831"){ document.write("k"); } else if(mampi==="12434"){ document.write("l"); } else if(mampi==="13338"){ document.write("m"); } else if(mampi==="14352"){ document.write("n"); } else if(mampi==="15356"){ document.write("o"); } else if(mampi==="55316"){ document.write("p"); } else if(mampi==="37417"){ document.write("q"); } else if(mampi==="16478"){ document.write("r"); } else if(mampi==="99190"){ document.write("s"); } else if(mampi==="23374"){ document.write("t"); } else if(mampi==="23741"){ document.write("u"); } else if(mampi==="22473"){ document.write("v"); } else if(mampi==="26433"){ document.write("w"); } else if(mampi==="23454"){ document.write("x"); } else if(mampi==="57439"){ document.write("y"); } else if(mampi==="26143"){ document.write("z"); } else if(mampi==="00000"){ document.write(" "); } else if(mampi==="01111"){ document.write("A"); } else if(mampi==="00101"){ document.write("B"); } else if(mampi==="13304"){ document.write("C"); } else if(mampi==="50272"){ document.write("D"); } else if(mampi==="40382"){ document.write("E"); } else if(mampi==="V"){ document.write("F"); } else if(mampi==="47h29"){ document.write("G"); } else if(mampi==="7E302"){ document.write("H"); } else if(mampi==="10011"){ document.write("I"); } else if(mampi==="0a831"){ document.write("J"); } else if(mampi==="12034"){ document.write("K"); } else if(mampi==="00338"){ document.write("L"); } else if(mampi==="14052"){ document.write("M"); } else if(mampi==="15056"){ document.write("N"); } else if(mampi==="55016"){ document.write("O"); } else if(mampi==="30417"){ document.write("P"); } else if(mampi==="16M78"){ document.write("Q"); } else if(mampi==="921A9"){ document.write("R"); } else if(mampi==="G3542"){ document.write("S"); } else if(mampi==="230W1"){ document.write("T"); } else if(mampi==="2A473"){ document.write("U"); } else if(mampi==="26Aa3"){ document.write("V"); } else if(mampi==="23D54"){ document.write("W"); } else if(mampi==="57A39"){ document.write("X"); } else if(mampi==="QB143"){ document.write("Y"); } else if(mampi==="KKFD3"){ document.write("Z"); } else if(mampi==="Z"){ document.write("KKFD3"); } else if(mampi==="mac00"){ document.write(","); } else if(mampi==="B4[]()"){ document.write("."); } else if(mampi==="+1+2*"){ document.write("+"); } else if(mampi==="-----"){ document.write("-"); } else if(mampi==="*****"){ document.write("*"); } else if(mampi==="/////"){ document.write("/"); } else if(mampi==="1234q"){ document.write("1"); }else if(mampi==="ddh21"){ document.write("2"); }else if(mampi==="bbdjz"){ document.write("3"); }else if(mampi==="K1113"){ document.write("4"); }else if(mampi==="53FD3"){ document.write("5"); }else if(mampi==="11111"){ document.write("6"); }else if(mampi==="94932"){ document.write("7"); }else if(mampi==="W4322"){ document.write("8"); }else if(mampi==="E42SD"){ document.write("9"); }else if(mampi==="-000-"){ document.write("0"); }else if(mampi==="Z"){ document.write("KKFD3"); } } } </script> </body> </html>
  8. Thank you very much for your help. I really appreciate it
  9. I tried to add 2 variables inside a function.I assigned the value of var a= prompt("Enter value"); and value of var b =prompt("Enter value");.I ran the code. I entered the value of var a = 12 and the value of var b = 3. The result should come 15. But it shows 123. The code is given below. I really need help. Its a school assignment. <html> <head> <script src="javascript1.js"></script> </head> <script> function q(){ var a= prompt("Enter value"); var b =prompt("Enter value"); document.getElementById("demo").innerHTML=a+b; }; </script> <button onclick="q()">Click on me</button> <p id="demo"><p>