2,443 Posted Topics
Re: [QUOTE=Rashakil Fol;791455]I'm not sure which is worse. Having students use throws clauses or having so-called professionals write [code] try { ... } catch (Exception e) { e.printStackTrace(); // or whatever it is }[/code] For that reason, I think encouraging people to mindlessly catch exceptions is worse than having them mindlessly … | |
Re: [QUOTE=javaAddict;785644]BURN THE HERETIC. KILL THE MUTANT. PURGE THE UNCLEAN. FOR THE EMPEROR!!!! [/QUOTE] Rape the horses and Pillage the women! <Pause> Ah, I mean ..... | |
Re: Set your path (not classpath) or type the full path to the command | |
![]() | Re: [QUOTE=zeeyon;785638]who knows?[/QUOTE] <raking metal cup across iron jail bars/> Nobody (at least the trouble I'm in)! It might help to know a [i]few[/i] more details. What is it doing, that it should not be? What is it not doing, that it should be? What compiler messages are coming (post them … ![]() |
| |
Re: First of all, why 25 different ping classes? Simply create [i]one[/i] with a constructor that takes parameters. And then you start 25 threads that each start an additional 10 processes and you're wondering why it might take a bit of time? And, you're performing all of these actions in the … | |
Re: sed with the -n option and the "p" "operator". Try reading the man page for sed again, then post your attempt here. | |
Re: Checkout the Map returned by conn.getTypeMap() (conn being your Connection object, of course). | |
Re: [QUOTE=stephen84s;778936]If you are on any Microsoft OS chances are that no such server exists on your system. You can also test the presence of an echo server by typing "telnet localhost 7" on your command line and see if it connects. If it displays "Connection Refused", then thats a confirmation … | |
Re: File has a method that returns all the system "roots". See the API docs for File. | |
Re: Well, I can at least say that that's nicely formatted. Otherwise ..... Did you have some sort of question you wished to ask? | |
Re: [code] hidebutton++ [/code] isn't that statement missing a ";"? | |
Re: The same way you would in any other layout, as an item listener is attached to specific components, and not to a layout. The layout has nothing to do with it. | |
Re: [QUOTE=javaAddict;774396]Who is stopping you from submitting it?[/QUOTE] His dog! | |
Re: Of course, since the only thing "in the vector" is a reference to the linked list, not the linked list itself. | |
Re: Simply use a Set (i.e. HashSet). That doesn't allow you to add duplicate entries, but doesn't through an exception if it is a duplicate (the method to add simply returns false if the entry already exists). | |
Re: To tell you the truth, I don't know what you mean "interpret a parameter determined by a JAR file". If it is simply to be an argument on the command line, then, of course, args[0]. | |
Re: [i]What[/i] exception? The full stack trace, please. And add a stacktrace to that first catch block, as well. Besides, getting one exception may close the resultset which would lead to the catch block simply throwing [i]another[/i] exception. | |
Re: It might help to know exactly [i]what[/i] exception occurred. But, first and foremost, you should not be doing this type of action in a JSP. And this "an exception occurred" doesn't help. | |
Re: See the API docs for Float, namely it's varying "parse" and "valueOf" methods. | |
Re: Then why use a textfield? Simply post the text. If you want to make it look like one, then use a small table and configure it properly. | |
Re: You're missing the loop. Think "while" | |
Re: The top left pixel [i]is[/i] 0,0 The divider itself, however, also has a width, and I believe the "location" for the divider is probably based on the "center" of the divider. Try using "getDividerSize", and some math for the adjustment. | |
Re: Yes, an upload is obviously the right way, but [i][b]not[/b] in a JSP[/i]. God's write an actual Servlet, for Christ's sake. This scriptlet stuff is becoming a real scourge. Let me guess, you got this from roseindia, right? Also, I assume that "/usr/programs/apache-tomcat-6.0.16/webapps/Pinnacle" is the directory in which your application … | |
Re: See the comments on this code here: [url]http://www.daniweb.com/forums/thread162658.html[/url] | |
Re: [QUOTE=baudday;747693]I have looked at that thread before, didn't find it was of much help.[/QUOTE] How could it not be? Do you honestly need someone to tell you how to access an environment variable? ([inlinecode]echo $RANDOM[/inlinecode]) Or maybe how to store it's results? ([inlinecode]varName=`echo $RANDOM`[/inlinecode]) | |
Re: Seemingly [i][b]not[/b] soooooo Urgent[/i], or you'd be working on it rather than simply whining/posting about it. | |
Re: smack package? What's it do? Spank you? | |
Re: An "order by" clause ? Your question has nothing to do with any programming language, what-so-ever. Find an SQL forum. | |
Re: Use the [code] read(byte[], offset, length) [/code] That method returns how many bytes were successfully read, or -1 at EOF. Use that return value to modify the offset and the length and call read again. Doing this in a while loop (i.e. != -1) will ensure your success (in the … | |
Re: I assume that these classes are all of the same type (or at least all extend the same type)? In that case simply pass the object itself along with the method call; Instead of [code] public class aclass { public static Color CopyAttributes (Color newcolor, int red, int green, int … | |
Re: What part of your homework do you not understand? We are not simply going to do it for you. If you post what you have, and ask some specific questions about what you're having problems with, we will help though. If it is simply that your personal life took precendence, … | |
Re: Stick with your thread on Sun, you are getting good advice there. [url]http://forums.sun.com/thread.jspa?threadID=5353799&tstart=0[/url] | |
Re: And you were already told, no. | |
Re: Integer math will return an integer and integers do not have decimal places. You need to cast one of those numbers to a double while doing the division. [code] PercentTotal = Votes[i] / (double) Totalv * 100; [/code] But, to tell you the truth I would probably simply make "Totalv" … | |
Re: Well, if you're simply going to be reading the entire file into a single String without any kind of work on the lines read until after the entire file is read, I wouldn't use either of those, and wouldn't use a Reader at all. I would do it like this … | |
Re: [QUOTE=umairsario;750740]hmmm in one program its also easy, he can do it also, if he know java ! well let me also post all these program into 1 class code ..[/QUOTE] No, don't. Read the terms and conditions of this forum again (which you agreed to when you signed up here), … | |
Re: [QUOTE=umairsario;750757]can you please explain in your words[/QUOTE] No. That's the whole point of your homework/test question. We are not going to do it for you. It is against the terms and conditions of this forum which you agreed to by signing up here (besides being morally and ethically wrong). | |
Re: Find an SMS Gateway (they provide internet service) and then read their documentation. | |
Re: Because you didn't do it right? Come on, how should [i]we[/i] know, when you haven't given us [i]any[/i] information to work with. | |
Re: You can' use access modifiers inside of a method and you can't use variables declared inside of a loop as part of that loops conditional expression. | |
Re: True, do [i]not[/i] do this from a JSP. If you feel you absolutely must do this (regardless of whether you do it from a JSP or not, and, again, you [i]shouldn't[/i] do this from a JSP), check out JSch from JCraft ([url]www.jcraft.com)[/url]. It is a (nearly) complete implementation of SSH2 … | |
Re: The description is pretty detailed. Give it a try, and if you have problems with the code, then post what you've written and we'll help you correct it. But, this post looks like a "do it for me post", and that is [i]not[/i] something we're going to do. | |
Re: Who says a tomcat server would accept an SMS? | |
Re: Assign that class instance to an instance variable, rather than a local variable, if you want to use that same instance throughout the class. I.E. [code] public class A { private B bObject; A() { bObject = new B(); } void whateverOne() { bObject.whatever(); } void whateverTwo() { bObject.whatever(); } … | |
Re: [QUOTE=Laidler;744300]now the [CODE] }while(!(my Input.equals(s4)));[/CODE] does not work because the myInput variable is not stated outside of the loop[/QUOTE] You're right [inlinecode]my Input[/inlinecode] is not, but [inlinecode]myInput[/inlinecode] is. Unfortunatly "myInput" is a scanner, not a String, and you want to compare Strings, so aside from moving the "read" line into … | |
Re: Maybe ask at a NetBeans Forum ([url]www.netbeans.org[/url] maybe?) | |
The End.