736 Posted Topics
Re: [QUOTE=arvin2006;802451]Hi, everyone! I wish i could find someone who is diligent in answering to my queries since i am a beginner when it talks about java. I understand visual basic very well since it was the language i used when i am doing my thesis, and now i am working, … | |
Re: You need to first tell us what exactly are you expecting to be passed in the "code" parameter. Give us an example of how a correct format of String inside "code" (one that would output "yes") and an incorrect format example (one that would output "no"). Also are you even … | |
Re: Try [URL="http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Tech/Chapter05/formatterPrintf.html"]System.out.printf[/URL]. | |
Re: [QUOTE]i would say lazy student wouldn't even bother posting questions. [/QUOTE] Do not be so judgmental, If you hang around here long enough you will see your fair share of them. | |
Re: Put this chunk of code in a main inside class, compile it, then run it, add a System.out.println() after every statement to trace what is happening to your variables. Thats the most optimal way of finding out rather than asking people for a line by line explanation. | |
Re: Tomcat by default doesn't have support for JSF (amd definitely Tomcat 5.5 doesn't), Are you sure the new place has the JSF libraries because the following suggests the JSF libraries are mssing. [code] java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener [/code] Also have never seen as yet anyone use JSF with a Tomcat version prior … | |
Re: Yes, Next time you post wrap your code inside [noparse][code=java] and [/code][/noparse] tags. Also what do you need help for ? Tell us the problem (compile errors,logic problems etc etc) you are facing and this time please do not give the reason "I am a beginner" for not attempting something.:) | |
Re: This is more of a core java question, So it should have been posted in the Java forum. Anyways take a look at the javadocs of the [URL="http://java.sun.com/javase/6/docs/api/java/lang/String.html"]String[/URL] and [URL="http://java.sun.com/javase/6/docs/api/java/lang/StringBuffer.html"]StringBuffer[/URL] class you might find what you are looking for there, most probably it is the substring ([URL="http://java.sun.com/javase/6/docs/api/java/lang/String.html#substring(int,%20int)"]1[/URL],[URL="http://java.sun.com/javase/6/docs/api/java/lang/String.html#substring(int)"]2[/URL]) menthod.. | |
Re: [QUOTE]"allocated" clearly prints as equal to c[/QUOTE] But the condition in your do-while loop is [code=java] while(allocated < c) [/code] So definitely it wouldn't stop because technically "allocated" is not less than "c". If you want it to terminate when "allocated" and "c" are equal also then change the "<" … | |
Re: If you are using a Swing Form to get Input then I would suggest dropping the while loop altogether because your actionPerformed() method will be called whenever your user clicks on the GuessButton and you can perform all the necessary processing then. | |
Re: Try [URL="http://letmegooglethatforyou.com/?q=uploading+files+via+JSP&l=1"]this[/URL]. | |
Re: JSP is server side while Javascript is client side, you cannot access objects created inside your JSP in Javascript. | |
Re: You can start [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html"]here[/URL]. | |
Re: Well one word about the StringTokenizer class, this is what the javadocs have to say about it:- [QUOTE]StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the split method of String … | |
Re: @transplantedNYr If you are just begining Java as it appears to be, just like verruckt I suggest you use a minimalistic IDE, With Eclipse just as you noticed now by asking about the compile button, you will get lost trying to figure your way around. Use a minimalistic IDE without … | |
Re: Check out [URL="http://java.sun.com/docs/books/tutorial/uiswing/"]this tutoria[/URL]l on swing in case you want to get your GUI up and running and then you might want do some validations on the username and password either in the database (then you might want to look here for [URL="http://java.sun.com/docs/books/tutorial/jdbc/basics/index.html"]jdbc)[/URL] or want to use [URL="http://java.sun.com/docs/books/tutorial/essential/io/"]Files[/URL] instead. | |
Re: Well to calculate days I would prefer a more simpler method like this :- [code=java] // Current day would store the index of the day in the Array // 0 points to Sunday. int currentDay = 0 String days = {"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat" }; // Now … | |
Re: [code=java] final char grade; [/code] Declaring a variable as "final" is almost like making it a constant and hence its value cannot be changed later (which you are doing in the "if else" blocks. | |
Re: Try the [URL="http://api.openoffice.org/"]Open Office Java API[/URL]. I recollect Ezzaral suggesting it to another poster earlier. | |
Re: Either you generate the Id and assign it to the user yourself using an autoincrement or a UUID feature, but if you want the user to select his own ID you will have to perform a check in your records (database or files) to check if the ID has already … | |
![]() | Re: Can you also attach a snapshot of the screen you got. ![]() |
Re: Now when I see this line, I observe two problems :- [code=java] System.out.print(annualCost.format(mpg[m][cost])); [/code] Now when I see this line, I observe two problems :- [LIST] [*] There is no such as "annualCost" object declared or initialized in the main, and you are trying to call the method format(int) on … | |
Re: First of all you will need an API (provided by one of various currency exchange websites) which will feed you the data if you want live /real time exchange rates. I normally use [url]www.xe.com[/url] to check currency rates, they also have [URL="http://www.xe.com/dfs/product.php"]their own data feed product[/URL] where they will post … | |
Re: [URL="http://java.sun.com/products/javamail/"]Use the Java Mail API.[/URL] | |
Re: This is a HTML question rather than a JSP question and all you need to do is wrap the <img> tags inside the anchor element (<a> tags). | |
Re: [URL="http://letmegooglethatforyou.com/?q=Zip+directories+with+Java"]Let me google that for you[/URL] | |
Re: Now I am going to make some assumptions here on your merge method, My main assumption is if your method is called as [icode]arr2.merge( arr1 , arr);[/icode] then you want the contents of arr1 and arr merged and in sorted order inside arr2. Now if thats the case, why don't … | |
Re: Start your own thread if you are facing any issues do not simply revive ancient relics. Next there is also a separate forum for JSP in the Web Development Section, you should have made a thread there. Also define what you mean by "NOT-WORKING" and "WORKING WELL". Check the logs … | |
Re: The tomcat container (or whichever container you are using) itself creates and manages threads concerning your JSP page when it gets requests to serve your JSP. What I think you are looking for is how to track sessions in JSPs. [URL="http://www.jsptut.com/Sessions.jsp"]Here[/URL] is a basic example. | |
Re: Are you using httpd or are you using Tomcat ? AFAIK httpd doesn't support JSPs it supports CGI and PHP technologies. | |
Re: The following lines should be inside a method and not placed directly inside a class, you may place only member declarations / initialisations / methods or static blocks of code directly there. [code=java] Button1.addActionListener(listener); Button2.addActionListener(listener); Button3.addActionListener(listener); Button4.addActionListener(listener); Button5.addActionListener(listener); Button6.addActionListener(listener); Button7.addActionListener(listener); Button8.addActionListener(listener); Button9.addActionListener(listener); Button0.addActionListener(listener); astrButton.addActionListener(listener); boundButton.addActionListener(listener); [/code] | |
Re: Can you tell us what problem are you facing and where is your program going wrong ?? | |
Re: [URL="http://www.lowagie.com/iText/"]iText[/URL] is an extremely good option for making PDFs from Java and for reading MicroSoft formatt documents just like h3xc0de I too recommend the [URL="http://poi.apache.org/"]Apache POI[/URL]. | |
Re: Use code tags currently it looks like a mess I doubt anyone would feel like even looking at it. All you need to do is put your code inside:- [noparse] [code=java] // your code here [/code] [/noparse] | |
Re: Now assuming your File format is of the type :- [icode] Albert Einstein 0 Stephen Hawking 3 [/icode] You would need to add the following lines of code in your while loop before reading the grades like :- [code=java] . . firstName = inFile.next(); lastName = inFile.next(); num = inFile.nextInt(); … | |
Re: You could use the Logical (if I am correct) Operators ( AND (&&), OR (||) ) to achieve that. For example :- [code=java] while(status.equalsIgnoreCase("yes") || status.equalsIgnoreCase("yse") || ..) [/code] <EDIT> Three posts in a minute on the same thread, thats the first time I have seen it. | |
Re: Maybe if you would have gone through the forums first you would have already come [URL="http://www.daniweb.com/forums/thread168656.html"]across this thread[/URL]. | |
Re: Most probably the issue is your tomcat running on port 8080, chances are you most probably have a firewall which is blocking that port from being accessed from outside. Also some networks tend to block outbound traffic on 8080 port as this is usually an intranet port. You could either … | |
Came across this "map" a few days ago, do not know if any of you have seen it, but its really fun going through the various battling technologies etc. Entire history of this map located at [url]http://mshiltonj.com/software_wars/[/url] | |
Re: [QUOTE]but i didnt go thru even there. [/QUOTE] Can you please tell us something more on that, Especially with the code which you used while trying to connect to your database. | |
Re: Using the "root" account for MySQL for normal tasks is not recommended and definitely not a good idea to publish its password on a public forum. Also can you give us the exact stack trace what exception you are getting. | |
Re: [code=java]public InputStream(InputStream paramInputStream, boolean paramBoolean) [/code] Now I am just guessing here, but I think the paramInputStream parameter is of type Base64.InputStream . Since you have conflicting names, I suggest you change that definition to :- [code=java]public InputStream(java.io.InputStream paramInputStream, boolean paramBoolean) [/code] if you wish that InputStream refer to the … | |
Re: [code=java] max = maxF(inputFahr); max2 = maxC(inputCel); [/code] Err.. Doc, that happens cause, you are calculating the maximum temperature even before you have taken the input. By default in Java primitive numeric data types are initialized to "0", hence your Arrays -- inputFahr, inputCel contain only zeroes in them, when … | |
Re: <EDIT> Never mind Sorry wrong thread | |
Re: I assume you want a Speech API for Java, So you can look [URL="http://www.onjava.com/pub/a/onjava/2003/08/06/jsapi.html"]here[/URL] and [URL="http://java.sun.com/products/java-media/speech/forDevelopers/jsapi-guide/index.html"]here[/URL] for that. | |
Re: I suggest avoid using StringTokenizer class its a legacy class, to quote the javadocs of version 1.4.2:- [QUOTE]StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the split method of String … | |
Re: Am famished here !!! ^ is going to be great programmer someday ...(if not already) < Off to eat my lunch v Hates exercise | |
Re: Any Third Party Library you use in Java you needs to be added in your "classpath" that is what Eclipse indirectly does above, Else how would your Java program know about the APIs and functions in that library. Note:- If you do not wish to add it to each and … | |
Re: [QUOTE]don't make me hand out infractions under the 'Keep it pleasant' rule. [/QUOTE] Shucks I thought those were just some fictional stuff from some horror story to make us behave nicely. :-O :-O :-O :-O :-O Just to lighten the mood here. :) |
The End.