2,443 Posted Topics
Re: Set the Content-type and content-disposition headers and send the bytes through exactly as you read them. Edit: nevermind that. Set your file/program associations in FireFox. | |
Re: Sorry about that. That was a MySQL Connection URL property "allowMultiQueries". From what I saw of your thread, you would be better off using Stement and the addBatch(String) method. | |
Re: Well, for one, I believe you meant [code]Carpark.setLayout(new GridLayout(3,2));[/code] rather than just [code]setLayout(new GridLayout(3,2));[/code] as that is the same as doing [code]this.setLayout(new GridLayout(3,2));[/code] would would be useless since you do [code]this.setLayout(new BorderLayout());[/code] right after that. Also, you probably want to do [code]this.add(Carpark);[/code] after doing [code]this.setLayout(new BorderLayout());[/code] rather than before, and … | |
Re: Your problem (if the queries really look like what you've presented there) is the single quotes (') around the table names. Remove those. If you're worried that the tablename might be "generally" invalid, thereby [i]needing[/i] to be quoted, then use double quotes (") not single quotes. | |
Re: Perl is [i]not[/i] only for websites. In fact, that is the [i]least[/i] that it's meant for, so all of that means, essentially, nothing. In fact, its [i]not[/i] meant for that, at all, not anymore than simple shell scripts are (which function just as well for CGI). Sure, there's a few … | |
Re: Show your code, so we can better understand what you're talking about. Generally speaking though, you do not need a "dynamic array", you need to use your "static array" properly. | |
Re: Well the [url=http://java.sun.com/javase/6/docs/api/java/sql/Statement.html]api docs[/url] say [quote]Executes the given SQL statement, which returns a single ResultSet object.[/quote] for executeQuery and [quote]Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.[/quote] for executeUpdate | |
Re: Well, read the API doc. Which package does it say JOptionPane belongs to? | |
Re: Uhm, create=true as part of the DB url, maybe? Can't say if that's case since you haven't shown us what you used, nor told us in what state the DB was in before you started. | |
Re: Sounds like a question for the producers of your IDE, as that is not a Java error. However, do you want an Applet or a Stand-alone app? You've extended Applet, but written a Stand-Alone, so which is it? | |
Re: As a text input type? See the [url=http://java.sun.com/javaee/reference/tutorials/]tutorials[/url]. | |
Re: [QUOTE=cool_whip579;1212274]Need Help with Comparable/Comparator.[/QUOTE] Good for you. I, however, have no idea what that needed help might be, since you didn't say/ask. | |
Re: See the API docs. You can add another argument to your FileWriter constructor call so that it appends rather than overwrites. | |
Re: JLabels can take HTML style text so simply use "<BR>". | |
Re: Make an arraylist with all the individual items. Generate a random number (not larger than the current size of the arraylist) and get then remove that index from the arraylist. Repeat. | |
Re: You can't. JSP runs on the server, Javascript (which is NOT Java) runs on the client. You might want to look into something like AJAX which will allow your javascript to make a complete connection to the server, receive data, and then update your page, which will make it look … | |
Re: As to how to connect to and use a DB in Java see [url=http://java.sun.com/docs/books/tutorial/jdbc/index.html]the tutorials[/url]. Then use the JDBC-ODBC Bridge to use Access and make sure to either properly configure an ODBC DSN (that is a Micrososft question) or use a DSNless connection (Google both "JDBC-ODBC Bridge" and "DSNless connection"). | |
Re: I have no idea what you mean with "be catch from my program". If you mean you want to snoop network traffic then Google "JPCap" | |
Re: [QUOTE=PCKing;324409]Thanks for replying, as I stated in my post, I'm a NOOB at this & I posted this to see if anybody could give me a suggestion on how to fix this error.[/QUOTE] No, judging from this post, you came here for someone to give you the code to complete … | |
Re: Either wrap the stuff in a try catch block, or simply check the lengths of the arrays. I.E. if checking whether [inlinecode]array[99][99][/inlinecode] exists (and is a valid object and not null) simply do [code]if ((array.length >= 100) && (array[99].length >= 100) && (array[99][99] != null))[/code] | |
Re: You have one too many close parens on the abs call. | |
Re: A Date object [i]always[/i] stores the date in UTC. When you then display that date (such as with toString) then the date/time will be displayed in the systems default timezone. If you wish to display it in a different timezone, or import a string as a date as if it … | |
![]() | Re: If the "WordSet" class implements a Collection/List/Map interface (or extends a Class that does so), then yes, it can be used, otherwise, no, it can't. Now, whether or not you can use it for this "WordSet" Class, I can't say, as I have no idea what the class looks like. |
Re: The weightx and weighty values are doubles, because they are percentages. A weight of 1 means 100%. If you want 10% it should be 0.1 Edit: Remember, though, that if the component [i]needs[/i] more space than that in order to be completely displayed it will take that space, so don't, … | |
Re: Okay? So, as a simple soultion, open a PrintStream to a file and set that to System.out. As a slightly better solution, open a FileWriter and set that as an instance variable and have the actionlisteners write to that rather than system. out, as a thid solution, but one which … | |
Re: When you open an ObjectInputStream it attempts to first read the "header" (which will automatically be created upon creating an ObjectOutputStream on the other end), which the API docs clearly state. And, since your groovy script is not creating an ObjectOutputStream for your java program to read your ObjectInputStream fails. … | |
Re: It's a Swing application, not an Applet, and, I'm sorry, [b]but[/b], if you can't figure out both that, and how to run it, from looking at the code, then I don't think the code is going to do you much good. What do you want it for? | |
Re: If your using Java 6 look at the Class Desktop. (As long as you are not [i]still[/i] attempting to start an application on the server in a Servlet/JSP and get it to appear on the client, you've been told often enought that that won't work.) | |
Re: add the JMenubar to the JApplet, not to "screens". | |
Re: It looks as though you have simply wrapped the entirety of your class definition with the main method declaration. Why? | |
Re: "project properties" "build path" | |
Re: Those were valid statements. A forum is not the place to learn a language from the ground up. It just isn't the right medium. Go to Sun's Tutorials web site and do the tutorials, from top to bottom, starting with Getting Started. | |
Re: Your method is returning a single double, rather than a double array, and you index into an array, not a double. | |
Re: Well, are you even [i]attempting[/i] to read the formatting? Or are you just trying to read the text? See HWPFDocument and its getStyleSheet method. All of the formatting is contained in the style sheets. The text is just the, well, [i]text[/i]. | |
| |
Re: Should be [inlinecode]if (dec8 == 0)[/inlinecode]. | |
Re: [QUOTE=girlymind;1194063][code]System.out.print("are you sure you want to delete this file ["my file+"]y=yes/n=no");[/code][/QUOTE] [inlinecode]my file[/inlinecode] or [inlinecode]myfile[/inlinecode] Take a closer look at that line. Also, what about the "connection" between the first quoted String and that variable? Isn't something missing there, as well? Once again, take a closer look at that line. | |
Re: Your constructor takes two parameters and you are calling it with 0. And don't try bringing up th "default constructor" (if you know about that) as that is only created by compiler if the doesn't already have any constructors. | |
Re: Okay? Show us your attempt at it, not just your assingment text, and we will help [I]you[/I] correct it, but we are not going to do it for you. Regardless of what your personal feeling about it would be, that would not help you, it would hurt you. | |
Re: Google a bit, this question has been asked almost as often as the "Is Java Pure OOP idiocy". By the second one you'll have to scroll a bit. [url]http://www.daniweb.com/forums/thread100646.html[/url] [url]http://www.java-forums.org/advanced-java/9997-very-urgent-need-help-calculating-difference-between-two-dates.html[/url] | |
Re: First of all, get the lengths of the "inner" and "outer" array of the pattern. Then, when looping through the matrix, there is no reason to go beyond matrix.outer.length - pattern.outer.length, or matrix.inner.length - pattern.inner.length as the pattern wouldn't fit in those spaces. Then loop until you find the first … | |
Re: As the first line of your "identify" method add [inlinecode]if (!di.isDirectory()) return;[/inlinecode] | |
Re: HashSet uses hashCode and equals as already stated. Also, as already stated, test the hashCode and equals outputs of Path, and ensure that you are getting what you expect, and ensure that the problem does not lie there. | |
Re: Yes, this [i]is[/i] a basic JSP/JDBC problem. It is [i]exactly[/i] what you should [i]not[/i] be doing. Learn what beans are and use them. Or, at least, the SQL JSTL tags. | |
Re: Try calling validate (and or pack) on the frame before calling setVisible (and then, you probably shouldn't have to call repaint). | |
Re: You shouldn't need to be doing all of that at all. With the methods being synchronised, the synchronisation is taken place on the instance of change anyway, so only one thread will have access to the instance at one time already anyway. [i]And[/i], since they both get the same instance … |
The End.