- Strength to Increase Rep
- +16
- Strength to Decrease Rep
- -4
- Upvotes Received
- 401
- Posts with Upvotes
- 351
- Upvoting Members
- 141
- Downvotes Received
- 45
- Posts with Downvotes
- 44
- Downvoting Members
- 26
Application Developer and Software Architect
2,443 Posted Topics
Re: executeUpdate returns an int indicating how many rows were affected by the query. It does not return a resultset. So, on the line where you are carrying out an executeUpdate, you should not be expecting a ResultSet as the return value. | |
Re: A bit of game (and there are better ways, to be sure) but, parse it as an int (I know it's the wrong value, but bear with me), get the binary value of that int, lop of the left most bit (the string will only contain enough bits to represent … | |
Re: Manual. Gives full control with no "bolierplate", repetitive, rigid code. But that's not what you're looking for is it? I dislike [i]all[/i] "Gui builders", as they all produce rigid, reptitive code that is hard to modify correctly, and is not always that effecient when any action to be performed is … | |
Re: The same way you do in HTML, since all a JSP (or actually a Servlet judging by what you posted) does is produce HTML (not that you "call" css, at all, you reference it). Of course you have to escape the quotes that appear within the quotes. | |
Re: Why are you doing System type stuff using Java? It is not designed for it. If you want a command line command to get the "application" list that appears in TaskManager, then why are you asking in a Java forum? Ask in some Windows forum somewhere. Edit: And this is … | |
Re: Sorry, but you do realize that that only investigates the first element in the list, right? | |
Re: [url=http://www.lmgtfy.com/?q=Java+Custom+Cell+Renderer]here[/url] | |
Re: Hey James, Dani. Glad to hear it. I no longer have much time to look in here, but glad to see it is still around, and still willing to take, and act on, user input. | |
Re: Simply modify your query. "SELECT contact, start FROM appointment WHERE createdBy = ? and start >= ? and start <= ?" // and use ps.setString(1, MainApp.currentUser); ps.setString(2, new Date()); ps.setString(3, new Date(new Date().getTime() + (1000 * 60 * 15))); // 1000 millisecond * 60 seconds * 15 minutes = number … | |
Re: That parse method is giving you a java.util.Date object, you need a java.sql.Date object in the setDate method. See the Date(long) constructor of java.sql.Date and the getTime() method of java.util.Date and use the latter as the argument in the former to get a java.sql.Date instance. Edit: P.S. it would have … | |
Re: [inlinecode]find /path/to/directory -type f -mtime 61 -exec rm -f {} \;[/inlinecode] 61 (days) works for everyting except it is one day short for July August and 1 to two days long for (January/February) / (February/March). Edit: make it 62 if it absolutely must be every last day for two months. … | |
Re: If the only thing in the file is filenames simply do rm `cat input.txt` if there is more than just filenames, but say the third word of every line is a filename then do the following: rm `awk '{print $3}' input.txt` (the fourth word would be $4, etc) | |
Re: It's [i]not[/i] an "apache setting". It is a "Web Container"/"Application Server" configuration. I.E. Tomcat, Glassfish, Sun Application Server, WebSphere, WebLogic, JBoss, Jetty, etc. Find out which one you are going to use and read its documentation. | |
Re: Eww, that with the notification email could also turn out to be a windfall for the hackers. What's to stop them from sending a phishing attack (although that is not really necessary, but could also give them the "new" password) or trojan email using that as the bait? ![]() | |
Re: [QUOTE=bloody_ninja;655019]I haven't seen any tutorials for JSP , so I guess I will post this one link that I found. [URL="http://www.visualbuilder.com/jsp/tutorial/pageorder/1/"]http://www.visualbuilder.com/jsp/tutorial/pageorder/1/[/URL][/QUOTE] [url]http://java.sun.com/j2ee/1.4/docs/tutorial/doc/[/url] [url]http://java.sun.com/javaee/5/docs/tutorial/doc/[/url] | |
Re: Yes. Write a Comparator. (see the API docs for Comparator and the Collections Tutorials) | |
Re: wordMap.put(word, wordMap.get(word)++) | |
Re: You don't, you create executable jar files (not "exe"s). [url]http://java.sun.com/docs/books/tutorial/deployment/jar/index.html[/url] Edit: And, if you want a "real exe" (i.e. a native executable), then use a language designed to produce a native executable (which Java is not). If you insist on doing something that will negate all the "advantages" gained by … | |
Re: Because you have mangled your url. See the [url=http://download.oracle.com/javase/tutorial/jdbc/index.html]tutorials[/url]. | |
Re: I'm not certain, but I think you are simply hitting up against some "minimum size" type restrictions. As you can see the orange (dark yellow?) square is the same size as the green and yellow squares and it's relation to the red square has become even more skewed than the … | |
Re: SYOT Start your own thread and clearly state your problem and post both your code (or at least a small self-contained example that reproduces the problem) and any and all error messages. | |
Re: Closing this abused zombie now. | |
Re: Um, check if Arial exists and if not set something else? ![]() | |
Re: First, ensure a garbage collection is done, then see if it is reduced, at all. Other than this, java will only return memory to the system if a certain percentage of the heap space is "free", there are command line parameters to use increase/decrease these ratios, but I suggest caution. … | |
Re: [QUOTE=mr.sweetchuck;333254]Hi, I'm trying to use the replace() method to take out all instances of " " , (space) with an underscore, ("_"). I'm doing this because I'm using URLs to connect to a servlet. I keep getting this error: replace([b]char,char[/b]) in java.lang.String cannot be applied to ([b]java.lang.String,java.lang.String[/b]) [code] url.replace(" ", … | |
Re: Google for JUnit and design unit tests, and then do extensive "business" tests as well. And then you will know that your program is as good as you are currently able to test it for, but some user will STILL find bugs (and you can only hope it isn't a … | |
Re: traverse the directory and remove all sub directories, and all sub directories of the sub directories, etc, a recursive method will suffice. | |
Re: Use Boolean not boolean. | |
Re: Well, don't use scriptlets. Either use a Bean, or google for the sql jstl tag package. | |
Re: See the Desktop class and its open method (passing it a url). | |
Re: My guess is that if your Access file is not password protected the username and password make no difference. | |
Re: Add a "default" case to handle the 31 day months (since they make up more than half of them), and remove those individual cases, and it will also ensure that your variable gets a value. The reason you get that error is because what hapens if the user enters a … | |
Re: It MIGHT help to know WHAT error you are getting (you will probably have to look at the logs). But what will REALLY help is to STOP WITH THE SCRIPTLETS. Program PROPERLY. | |
Re: Use the getData() method of the DatagramPacket class, wrap the resulting byte array in a ByteArrayInputStream, and use the MessageDigest class and its MessageDigest.getInstance("MD5"); and then DigestInputStream with the BAIS and the MD in the constructor and its digest method. | |
| |
Re: Sorry, until you get rid of those scriptlets and program your JSPs PROPERLY, I am keeping quiet. | |
Re: Uhm, place the mysql jdbc driver jar on the classpath? | |
| |
Re: Yes. How, and with what language, or even IF to do so, rather than using one that already exists, depends on your requirements. | |
Re: Just the value of "total" is not getting output, or is that entire line not getting output. I.E. do you see nothing or do you see "THE TOTAL IS" and nothing more. Edit: And did you look at the web containers logfiles to make sure no errors are being thrown … | |
Re: Also posted [Here](http://www.java-forums.org/new-java/84119-audio-level-meter-new-post.html). Anyone answering may wish to check that they are not repeating anything already stated. | |
Re: Change your println calls to out.println("<pre>==="+ans+"===</pre>"); out.println("<pre>==="+cans+"===</pre>"); to ensure no whitespace is messing up your comparison. But you REALLY need to learn how to use beans and the varying jstl tag libraries as all this scriptlet stuff is BAD. Scriptlets are JSP 1.0. The ONLY reason they still exist is … | |
Re: > Also note that Integer is a class, so you are creating 1000 new instances of that class. That's not the same as 1000 ints (primitives) that would be just 4 bytes each However, if you look at the class, the only non static member is an int, so, logically, … | |
Re: If there is an embedded JVM (which do exist) and you are using Java RealTime (which sounds like an oxymoron, but it exists and [i]is[/i] real time, although I don't know if it is applicable to the embedded market), which [i]isn't[/i] free, BTW (a pretty hefty license, to tell the … | |
Re: You are using the same dates on every query. Where are you setting the month/year (by year overlap) and where are you setting the first day of the month on the start date? | |
Re: Well, what have you got? If nothing, then [Start Here](http://lmgtfy.com/?q=java+cubic+root). | |
Re: Have fun. I don't think ANY one person would be capable of writing those photo (and even worse video) recognition algorithms. | |
Re: srv_date'$srv_date', Edit: REALLY. LOOK at your query String AND the error. The first recongnizable part of thequery in the error String is "stage_two", SO, look at the query String dirctly BEFORE that. |
The End.