Forum: Java 2 Days Ago |
| Replies: 3 Views: 80 Thanks. That was just me being too lazy to look it up myself, and hoping the OP would figure out to do that. ;-) |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 80 Then also check with if (newRPos < protString.length). Also, is there any guarantee that input.length() is going to be larger than newRPos, as both of those are indexes (i.e. a start index and an... |
Forum: Java 2 Days Ago |
| Replies: 6 Views: 112 Well, text, is also "binary". If what you're reading might contain something that is not strictly plain text, then use a BufferedInputStream (with FileInputStream), rather than reader and convert... |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 115 by, instead of calling javac <filename> calling javac -Xlint:deprecation <filename> and letting the compiler tell you exactly what it doesn't like. The message, however, is only a warning. |
Forum: Java 2 Days Ago |
| Replies: 6 Views: 112 BufferedReader, readLine, a counter, and String's split. |
Forum: Shell Scripting 3 Days Ago |
| Replies: 3 Views: 145 That "^M" is a unix line end, use the dos2unix command first. For the rest use sed. |
Forum: Shell Scripting 3 Days Ago |
| Replies: 3 Views: 145 Do kindly explain exactly what you need. Junk character means nothing. |
Forum: Java 3 Days Ago |
| Replies: 3 Views: 86 http://java.sun.com/docs/books/tutorial/uiswing/components/button.html |
Forum: Java 3 Days Ago |
| Replies: 1 Views: 98 Add a System.out.println(System.getProperty("user.dir")) in there.
Otherwise use the search function for the OS.
But, the best way is to provide the full path to the file from the beginning. ... |
Forum: Java 3 Days Ago |
| Replies: 9 Views: 255 Which has already been covered. Did you read the thread or just knee jerk reply without bothering to find out what has gone before? |
Forum: Java 4 Days Ago |
| Replies: 4 Views: 141 The MySQL documentation shows you which class, at the very beginning of the page I linked to, and the tutorials (and the MySQL docs) show you how to use it. Read those.
Edit: Besides, why would... |
Forum: Java 4 Days Ago |
| Replies: 4 Views: 141 You don't load the jar, you load the Driver class and include the jar on the classpath. See the Tutorial (http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html) and the MySQL manual... |
Forum: Shell Scripting 4 Days Ago |
| Replies: 3 Views: 142 Configure the ssh to use private keys. |
Forum: Java 4 Days Ago |
| Replies: 1 Views: 124 So use a JTextArea, then, instead of using System.out.print or println, you use the JTextAreas append. |
Forum: Java 4 Days Ago |
| Replies: 4 Views: 157 I have no idea what you are talking about.
Maybe you should provide a bit of a sample of the data you start with and then a detailed explanation of what you are doing with it (showing the... |
Forum: Java 5 Days Ago |
| Replies: 9 Views: 255 Because without the static, that Test t = new Test(); is an instance variable, that is instantiated with every call to new. So, you call new Test() in main, which triggers another new Test, which... |
Forum: Java 5 Days Ago |
| Replies: 9 Views: 255 No it doesn't.
Does the real class maybe have a constructor?
And does that constructor maybe also call new on itself?
If so, what do think will happen if every call to new results in another to... |
Forum: Java 5 Days Ago |
| Replies: 6 Views: 206 Ahh, nevermind, I must have looked at a join date or something. Not, I repeat, not a zombie thread. |
Forum: Java 5 Days Ago |
| Replies: 6 Views: 206 Considering that you mentioned "email2.php", I assume you are running this from a hosted server? Well, does the "jar" run from the server? You say the "jar" worked, do you mean locally, or from... |
Forum: Java 9 Days Ago |
| Replies: 4 Views: 157 Strings can, of course be values in a hastable, but what does that have to do with the rest of the question?
What do you mean by "method generated Strings" and "plug them into another method"?
... |
Forum: Java 9 Days Ago |
| Replies: 4 Views: 157 Strings can, of course be values in a hastable, but what does that have to do with the rest of the question?
What do you mean by "method generated Strings" and "plug them into another method"?
... |
Forum: Java 9 Days Ago |
| Replies: 1 Views: 134 might help to know what this getOccurredDate method looks like, or what Class it's from if it's not yours. |
Forum: Java 9 Days Ago |
| Replies: 10 Views: 160 trim returns a String (as the API docs state), so where are you storing that String? Strings are immutable (which you should already know) which means you cannot change their contents. You can only... |
Forum: Java 9 Days Ago |
| Replies: 10 Views: 160 Between reading the String and adding it to set, of course. Do you need someone to hold your hand when using the bathroom? |
Forum: Java 9 Days Ago |
| Replies: 10 Views: 160 Uhm, no. He's using Strings and they are already comparable. |
Forum: Java 9 Days Ago |
| Replies: 10 Views: 160 to be found in the API docs. |
Forum: Java 9 Days Ago |
| Replies: 10 Views: 160 Try using trim on the Strings before you add them to the sets. |
Forum: Java 9 Days Ago |
| Replies: 1 Views: 105 toBinaryString only produces as many bits as is necessary to show the value. With negative numbers this should always be the complete amount as the leftmost digit is the "negative" indicator, but... |
Forum: Java 10 Days Ago |
| Replies: 2 Views: 148 Okay. What do you have so far? |
Forum: Java 10 Days Ago |
| Replies: 1 Views: 133 A bare number that starts with zero is an octal number. And octal numbers cannot include either an 8 or a 9. Remove those zeros. |
Forum: Java 10 Days Ago |
| Replies: 2 Views: 139 See your other thread on this.
http://www.daniweb.com/forums/thread234032.html |
Forum: Java 10 Days Ago |
| Replies: 4 Views: 143 Two duplicate threads:
http://www.daniweb.com/forums/thread234039.html
http://www.daniweb.com/forums/thread234032.html |
Forum: Java 10 Days Ago |
| Replies: 1 Views: 124 Well, I know how I would do it. The real question is how you think it should be done. We are not a homework service. Post your attempt at it here and we will help you correct it. We are not,... |
Forum: JSP 10 Days Ago |
| Replies: 5 Views: 2,216 |
Forum: JSP 11 Days Ago |
| Replies: 35 Views: 21,139 Yes there is. You have obviously never worked on anything that lasted more than a few days, or ever needed to be expanded or improved or fixed. Scriptlets are a maintenance nightmare. At the very... |
Forum: Java 11 Days Ago |
| Replies: 4 Views: 204 As in JMenu?
http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html |
Forum: Java 12 Days Ago |
| Replies: 4 Views: 154 Yes, CardLayout is a good option, but doing other's work for them is not. Simply suggest CardLayout and link to the tutorial for it, or give a "generic" example of it. |
Forum: Java 12 Days Ago |
| Replies: 4 Views: 154 call validate and then repaint (on the entire JApplet, i.e. just like you're calling getContentPane), rather than that content.paint call. |
Forum: Java 12 Days Ago |
| Replies: 6 Views: 202 Okay, now the question is whether you really want to replace the current list with the list that method returns, or if you want to add the items (not already included in the list) returned from that... |
Forum: Perl 12 Days Ago |
| Replies: 10 Views: 455 To help them learn. Definately not to do their homework for them.
Get them to attempt it, and post their code. Then, give them pointers on what they then need to do to fix that code, and get... |