93 Posted Topics
Re: Tomcat is server, so if you are deploying web app on the internet you just need to set a strong password for server and that is it. If you are developing it on localhost you don't need to worry because only you have access to that computer. | |
Re: I am working for company who build sms gateway's but it isn't free product, if you need more detalis inbox me. | |
Re: Start with [w3schools](http://www.w3schools.com/php/default.asp) they offer great tutorial for beginers. For every "step" you have example how to do that so that is starting point. If you want that your new page look like previus you need CSS template just insert few lines of codes and that is it. I will … | |
Re: I agree, but if you work with String (concating 1000 times) it is better to use StringBuilder because he is faster then String. Code example on this [link](http://hiddensciencex.blogspot.com/2014/04/speed-test-string-vs-stringbuilder-in.html): | |
Re: I work for a company who sell sms gateways if you need more info inbox me. | |
Re: I don't see logic with your question. You post like user so you are redirecting to admin, user isn't same as admin so he can't do what admin can... Hmm, you can do it in this way: Make a table in database for BlogPost with fileds like createdBy, text, subject, … | |
Re: On this [link](http://hiddensciencex.blogspot.com/2014/03/php-problem-with-mysqli-sql-database.html) you have example of mysql and mysqli... | |
Re: Because they have same value if you set one to "word1" and two to "word2" it will return false. If you want to compare one and two as objects try this: String one = new String("word"); String two = new String("word"); System.out.println(one.equals(two)); System.out.println(one == two); | |
Re: You need to buy hosting for Java Tomcat or JBOSS I don't know what are you using and then you need to deploy your website to that server. There is a lot of available hosting but you should know, if you choose sharead hosting you can't make your own changes … | |
Re: Hmm add semicolon at the end of the sql querry: $qry = "select project from PROJECTS_PROJECT where project='ab1234';"; If that don't work hmm enter same sql in phpmyadmin so if it works you have problem with code, secound it can be mysqli problem I think that in older versions of … | |
Re: If you want to learn best way is on [w3schools.com](http://www.w3schools.com/php/default.asp). You have examples and tutorials how to do form with post or get methods and so much more. I think that you will learn faster if you go over that examples, and if you still have questions post a new … | |
Re: You can't have method in method. method1() and method2() are in public static void main() so compailer is complaining... put method1 and method2 outside public static void main and it will be ok. | |
Re: A few minutes on google and here you go... import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; try{ AudioInputStream audioInputStream =AudioSystem.getAudioInputStream(this.getClass().getResource("path of relative sound file in src folder")); Clip clip = AudioSystem.getClip(); clip.open(audioInputStream); clip.start( ); } catch(Exception ex) { } Next time try to write your own code and if you came … | |
Re: On this [link](http://hiddensciencex.blogspot.com/2014/03/php-problem-with-mysqli-sql-database.html) you can see connecting to database with host, username, password and database. | |
Re: Hmm first of all all version of Java can read SQL database you just need to add jar (for example: mysql-connector-java-5.0.4-bin.jar) and it will work, secound you can build Web Services in Java EE, main thing is that you have some methods that do some stuff and you "publish" them … | |
Re: You need to write sql you need for that and you can make new page in php who will do that. On this [link](http://hiddensciencex.blogspot.com/2014/03/php-problem-with-mysqli-sql-database.html) you have a pice of code that will insert user in table with username and password you can learn from that. | |
Re: Here you can see different algoritms for sorthing array's so you can sort row by row with this algoritms. [Link.](http://hiddensciencex.blogspot.com/2014/02/best-algorithms-for-sorting-arrays-java.html) | |
Re: That is called "Cast". I will try to explain you. If you have array of class Object. Object class is parent class of every class in Java, so in that array you can put whatever you want... So if you have on like this: arrayOfObject[0] = 150; // int arrayOfObject[1] … | |
Re: int k = smt.executeUpdate("update pharmacy set mname='"+a2+"',desc='"+a3+"',amount='"+a4+"'where pid='"+a1+"'"); "mname" are you shure your field is called like that? | |
Re: Hmm I can't test it but i think it is all good, is StudentNumber unique? If it is unique then it will update just 1 row because you have singe row with that value... | |
Re: Hmm you don't need to worry about that because Java will, you can set it to import * but when you want to create .jar file Java will deploy classes that you need not all of them... if you wan't to test it you can try it with * and … | |
Re: Hmm maybe your code do like it should, but did you check that they dont colide again? I see that you add random*5 +2 so is it possible that one of the ball be on position 1,1 secound 4,4 first go 2,2 second 3,3 they have "collision" then first go … | |
Re: I think that is better to create servlet in java and just send it to him a user and password, or maybe problem is in your password, i don't think that you can set password same as username... if you didn't set password i think that password is by deufalt … | |
Re: You just go on your program you want to build as .jar. Go File>Export>Runnable Jar and then you have options how to pack it... Find what you want and it will automaticly include jdbc.driver in your .jar package... | |
Re: You need to make JTable with DefaultTableModel and AbstractTableModel and you have methods like: public void fireTableChanged(TableModelEvent e) - Forwards the given notification event to all TableModelListeners that registered themselves as listeners for this table model. public void fireTableCellUpdated(int row,int column) - Notifies all listeners that the value of the … | |
Re: Problem is because you do this: num1 = null; num2 = null; and you are calculating average with two null's you can't do that. You need to do like this: import java.lang.Math; import java.util.Scanner; public class PairTest { private static double num1; private static double num2; private static double average; … | |
Re: I think that you must add all that values in SQL Querry not just: pstmt.setString(1,"NAME"); pstmt.setString(2,"USN"); Because you have someting like this: email = ; What is values for email? Try to put all values in pstmt. | |
Re: Hmm that is tricky one, because you don't know how much variable need to be assigned, you can build it like compailer, with toknes and grammar but that is complicated. You can try to add new method who goes through input find first "=" and then assign values to some … ![]() | |
Re: Hmm, no, answer is correct. You can watch that as Folders in MyComputer, You have C:\ then you have User\ then you have Smile\ then you have Movies\ so your path is C:\User\Smile\Movies\ and you see content on disk in that folder in Java is the same way, he goes … | |
Re: Hmm, if you want to use someone's code you need that .jar package. For example if you want to read email in Java you need mail.jar. From mail.jar you get some implemented classes and you don't need to worry about that just see how to use it. You can see … | |
Re: You can do like this: for (int i = 0; i< vecA.size(); i++) { A newA = vecA.elementAt(i); // you get clas A Vector newVector = newA.s; // you grab vector from clas A if (newVector.contains("String1")) { // is that vector contains that string? ... System.out.println("We found it...!"); } } | |
Re: Hmm first of all you biggest problem is that you don't have qualified people. I just take a look on Java forum, they can't give proper answer because they don't know it. Try to find "expert" for every "topic" and make him admin for that special area, when I see … | |
Re: You dont use it well, try like this: Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); List<Company> lista = new ArrayList<Company>(); Criteria crit = session.createCriteria(Company.class); if (true){ // you can add restriction like this name is passed in to method... crit.add(Restrictions.like("name", name).ignoreCase()); } lista = crit.list(); sesija.getTransaction().commit(); And you can see a lot … | |
Re: You can do it in try block: try { } catch (Exception e) { e.printStackTrace(); } Or you can add on method throws IOException or what exception you need to catch... You can write your own exceptions lik this: class YourException extends Exception { YourException() { super("You can write your … | |
Re: Why do you need to see it? Maybe you program terminates after executing that code so you can't see it if your program is not working. If you are connected try to execute some query to se is it working or not... | |
Re: That error is when you make Jasper Report, I think that when you create Jasper file you didn't go in options and set proper language, for default it is groovy so you need to set Java, so you need to change it and then you can crate file who will … | |
Re: I will do it in different way, use split(" ") method to split the input in array so you get something like this {"8","+","33","+","1345","-","137"} then u can use "switch" with "for" and say someting like this: case number: case "-" do... case "+" do... case "/" do... etc... | |
Re: You can use JSTL tag library. Import it: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> and then you can call "if" method from taglib: <c:choose> <c:when test="${ok}"> ... </c:when> <c:otherwise> ... </c:otherwise> </c:choose> You have much more examples on this [link](http://hiddensciencex.blogspot.com/2013/05/is2-jsp-stranice-i-servleti.html). | |
Re: Hmm there is a good example of 3 different algorithms for sorting. You can learn about that algorithms on this [link](http://hiddensciencex.blogspot.com/2014/02/best-algorithms-for-sorting-arrays-java.html). | |
Re: There is a problem with mail.jar for Java. I have the same problem and I found solution, for android you need different mail.jar. You can read it all on this [link](http://hiddensciencex.blogspot.com/2014/01/read-email-in-java-android.html). | |
Hello friends i am new on DaniWeb and new in Python... I have a few problems so i need help... I have a text document with a code from some web page, how can i extract some string between a two different strings in line and then that stings write … | |
Re: You have nice tutorial on youtube... [URL="http://www.youtube.com/watch?v=O9tXHmIVP7w"]http://www.youtube.com/watch?v=O9tXHmIVP7w[/URL] |
The End.