2,443 Posted Topics

Member Avatar for senthil12345

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.

Member Avatar for saikatparbat
0
301
Member Avatar for ceyesuma

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.

Member Avatar for masijade
0
118
Member Avatar for RossMc

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 …

Member Avatar for masijade
0
131
Member Avatar for ceyesuma

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.

Member Avatar for ceyesuma
0
302
Member Avatar for jephthah

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 …

Member Avatar for jephthah
0
122
Member Avatar for sarath.koiloth

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.

Member Avatar for javagrendel
0
143
Member Avatar for Stefano Mtangoo

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

Member Avatar for masijade
0
327
Member Avatar for debargha

Well, read the API doc. Which package does it say JOptionPane belongs to?

Member Avatar for masijade
0
95
Member Avatar for ceyesuma

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.

Member Avatar for ceyesuma
0
125
Member Avatar for luttinj

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?

Member Avatar for luttinj
0
120
Member Avatar for reyadr

As a text input type? See the [url=http://java.sun.com/javaee/reference/tutorials/]tutorials[/url].

Member Avatar for masijade
0
46
Member Avatar for cool_whip579

[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.

Member Avatar for masijade
0
132
Member Avatar for electricrain

See the API docs. You can add another argument to your FileWriter constructor call so that it appends rather than overwrites.

Member Avatar for masijade
0
73
Member Avatar for geteducated
Member Avatar for sharathk60

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.

Member Avatar for sharathk60
0
382
Member Avatar for vijaysdon

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 …

Member Avatar for peter_budo
-2
2K
Member Avatar for lola_fcis

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").

Member Avatar for jwenting
0
88
Member Avatar for tamagochi

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"

Member Avatar for jwenting
0
39
Member Avatar for PCKing

[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 …

Member Avatar for masijade
0
230
Member Avatar for thompsonSensibl

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]

Member Avatar for masijade
0
90
Member Avatar for Joanna234
Member Avatar for KrishnaDas_003

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 …

Member Avatar for masijade
0
105
Member Avatar for CF019

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.

Member Avatar for JamesCherrill
0
123
Member Avatar for SasseMan

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, …

Member Avatar for SasseMan
0
7K
Member Avatar for bahnini

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 …

Member Avatar for bahnini
0
128
Member Avatar for ajay_p5
Member Avatar for KirkPatrick

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. …

Member Avatar for KirkPatrick
0
968
Member Avatar for gsuje_18
Member Avatar for Phaelax

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?

Member Avatar for masijade
0
471
Member Avatar for hidash_in

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.)

Member Avatar for masijade
0
236
Member Avatar for IOwnAndPwnU
Member Avatar for motinade

It looks as though you have simply wrapped the entirety of your class definition with the main method declaration. Why?

Member Avatar for stultuske
0
1K
Member Avatar for gonzi.p12
Member Avatar for yohanus

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.

Member Avatar for masijade
0
323
Member Avatar for sweetgurl

Your method is returning a single double, rather than a double array, and you index into an array, not a double.

Member Avatar for sweetgurl
0
131
Member Avatar for poojagupta02

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].

Member Avatar for masijade
0
81
Member Avatar for ceyesuma
Member Avatar for letigre
Member Avatar for anjal_pawar
Member Avatar for girlymind

[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.

Member Avatar for masijade
0
63
Member Avatar for BuhRock

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.

Member Avatar for vchandra
0
125
Member Avatar for saggykulji
Member Avatar for bubunchan

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.

Member Avatar for bubunchan
0
160
Member Avatar for white feather

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]

Member Avatar for white feather
1
119
Member Avatar for whimsical1987

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 …

Member Avatar for whimsical1987
0
805
Member Avatar for xsach

As the first line of your "identify" method add [inlinecode]if (!di.isDirectory()) return;[/inlinecode]

Member Avatar for masijade
0
121
Member Avatar for neti1987

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.

Member Avatar for neti1987
0
2K
Member Avatar for Bobon

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.

Member Avatar for Bobon
0
145
Member Avatar for k2k

Try calling validate (and or pack) on the frame before calling setVisible (and then, you probably shouldn't have to call repaint).

Member Avatar for k2k
0
198
Member Avatar for nikolaos

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 …

Member Avatar for JamesCherrill
0
113

The End.