2,443 Posted Topics

Member Avatar for bluebird

Try using a preparedStatement rather than cobbling together a query statement like that. See the API and Sun tutorials (a link can be found in the API) for more info.

Member Avatar for masijade
0
109
Member Avatar for claudiu_is
Member Avatar for shlmsnger

[code] for i in `ls` do head -1 ${i} done [/code] And I hope to God, that this is not homework assignment.

Member Avatar for masijade
0
80
Member Avatar for Kevin008

[code] int countChar = string.replaceAll("\\s*", "").length(); [/code] Just to be an @ss! ;-)

Member Avatar for masijade
0
185
Member Avatar for darkagn

An application designed to be used over the internet (usually through the use of a browser), written in Java.

Member Avatar for jwenting
0
93
Member Avatar for staneja

Where does a servlet run? On the client or on the server. Once you answer that question you will know whether or not you can perform client side validation in a servlet. Also, your application should never rely on any kind of operations on the client side. They may have …

Member Avatar for masijade
0
192
Member Avatar for mat111

The problem is quoting. The "last name" should be quoted in the SQL with single quotation marks ('). To avoid errors like this in the future (and to prevent SQL injection attacks), use PreparedStatement and its setString method. See the API for more information.

Member Avatar for mat111
0
90
Member Avatar for wasee

[QUOTE=ramia_1985;432100]yes u have be little more specific ...................[/QUOTE] Yes, definately. Considering, however, that this thread is three years old, I believe his due date is long past.

Member Avatar for masijade
0
166
Member Avatar for upstream

[QUOTE=iamthwee;431500](num1,num2,[COLOR=red]num2[/COLOR]));[/QUOTE] Classic typo. And isn't it grand! ;-) I hazard to guess, that it is a little embarrassing to have it come this far before being found, though.

Member Avatar for upstream
0
162
Member Avatar for Pyare007

Yes, code would definately help, but an applet is not a [b]J2EE application[/b]. It is a simple standalone application that just happens to be able to be run in a browser, and can be downloaded by the browser, just like an image (no more, no less) before being executed.

Member Avatar for masijade
0
80
Member Avatar for apontutul

Why did you start a new thread? Because you didn't like the answers you were getting? Please, do not multi-post in this manner. Stick with the original thread.

Member Avatar for apontutul
0
99
Member Avatar for staneja

Well, what the h3ll do you think you need to know?! God, it's not (as he said) rocket science. Geesh. Study the protocol. I myself, have no idea what the protocol looks like, but I assume it will be (in the basic form) text streamed over TCP/IP. So, obviously, you …

Member Avatar for sergeant
0
137
Member Avatar for w32.sysfile

Read the "Getting Started" Tutorial. And don't save anything to the "bin" directory (or any other directory inside of the jdk directory).

Member Avatar for w32.sysfile
0
145
Member Avatar for StrongOak

JavaScript != Java You have shown only JavaScript. There is no Java anywhere in that post.

Member Avatar for MattEvans
0
288
Member Avatar for onsir
Member Avatar for masijade
0
155
Member Avatar for JyotiC

Go through the tutorials without using any IDE whatsoever. Once you understand all the concepts (such as classpath and the like), then you can start worrying about an IDE.

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

That is not a Julian Date. That is simply the number of milliseconds since the "epic" (00:00:00 Jan 1st 1970 UTC) (i.e. a completely normal date as known in nearly all programming languages, excpet that some use seconds rather than milliseconds). Simply do [inlinecode]new Date(1187610073812);[/inlinecode].

Member Avatar for masijade
0
94
Member Avatar for mimsc
Member Avatar for shyamalaa

Because the shell will automatically expand those filename expansion characters before passing the arguments to the script. You might try using \* instead of *, but then, don't expect that the * will work as designed later (it may, then again it may not, I have not tried to "mask" …

Member Avatar for masijade
0
85
Member Avatar for shyamalaa

Check which quote you are using. On the keyboard it should be the one that slants from the upper left to the lower right, not the other way around and not straight up and down. In the code, it should also appear to slant in that direction and not appear …

Member Avatar for shyamalaa
0
126
Member Avatar for Mr.UNOwen

Read [url]http://java.sun.com/products/jdk/faq/faq-sun-packages.html[/url] to find out about sun.* packages (and this includes com.sun.* packages as well). Ezzaral, I would suggest you read this to, if you have not before, as a sun.audio.* class is not "an old part of the api", I'm sorry to say. Have fun reading. ;-)

Member Avatar for Mr.UNOwen
0
146
Member Avatar for apontutul
Member Avatar for damanjit

-n means suppress output (i.e. read the lines in the file, but don't output them). [inlinecode]s/ *\|/\|/g;[/inlinecode] means replace all occurrences of [inlinecode]of zero or more whitespace followed ba a "|" (i.e. "|", or " |", or " |")[/inlinecode] with [inlinecode]"|"[/inlinecode]. And the print after that means output the lines …

Member Avatar for masijade
0
108
Member Avatar for staneja

Have you tried simply removing the "-" characters from those three lines? Some XML Parsers (possibly Tomcat's included) are a little picky.

Member Avatar for ~s.o.s~
0
177
Member Avatar for arkaprava

You tried to do "java mynote.java" when you should be doing "java mynote" after compiling. Than again, seeing as how you are talking about compiling you may have done "java mynote.java" when you should have done "javac mynote.java". And, start your own thread when you have a question rather than …

Member Avatar for arkaprava
0
95
Member Avatar for nathanpacker

Do it in three steps. First use grep and (sed, cut, or awk) to retreive the groups that the user already has, then place these groups, along with the new groups, in a comma separated list string, then call usermod -G ${stringvar} ${user}

Member Avatar for nathanpacker
0
95
Member Avatar for shaqnolysis

[QUOTE=shaqnolysis;418619]This implies that am gonna read the File and store my values in someBuffer..... [/QUOTE] Well, that is not what it does. It simply buffers the read stream so that every read function does not have to actually be directly reflected on the disk. It saves a little time (in …

Member Avatar for masijade
0
97
Member Avatar for apontutul

I believe this may be your problem [code] public static void main(String[] args) { // TODO Auto-generated method stub //private void readData() //} private PieDataset readData() { [/code] Did you really mean to comment out the } at the end of your main method? Somehow I don't think so.

Member Avatar for apontutul
0
6K
Member Avatar for baltazar

When you initiate the array (i.e. [inlinecode]int[][] array = new int[20][20];[/inlinecode]) every position is already filled with 0 (since a primitive cannot be null). So, if zero is not one of the numbers you are using, simply cycle through the arrays with a nested loop replacing 0 with 99.

Member Avatar for anamika_nagpur
0
113
Member Avatar for mimsc

A very simple answer, move all that scriptlet stuff out of this JSP into a (or probably multiple) beans.

Member Avatar for masijade
0
67
Member Avatar for thiyagu_mca2006

Well, if your company were to use a proxy server that the other machines would have to use to reach the internet, you would already have this information.

Member Avatar for jwenting
0
137
Member Avatar for Aarsyth

grep will return false if it does not find the searched for String. So an easy way to this is to change if [ $fname = `| grep $fname sname.txt` ] ; then fname=stored_fname elif [ $fname != `| grep $fname sname.txt` ] ; then fname >> sname.txt ; then …

Member Avatar for masijade
0
130
Member Avatar for George2
Member Avatar for George2
0
2K
Member Avatar for mayur_kulkarni
Member Avatar for i_am_Andrew
0
137
Member Avatar for muskan
Member Avatar for masijade
0
186
Member Avatar for agrothe

As long as the object properly implements serialisable then you can send it through an ObjectOutputStream wrapped around the OutputStream retreived through socket.getOutputStream, and read through an ObjectInputStream wrapped around the receiving ends socket.getInputStream. And, of course, RMI and CORBA are other possibilites as long as you define your stubs …

Member Avatar for agrothe
1
108
Member Avatar for mayur_kulkarni
Member Avatar for lnarayanan

[code] // the code which would generate a Unicode file from a CSV ( Comma Seperated File) given as input. [/code]

Member Avatar for jwenting
0
74
Member Avatar for lnarayanan

Sure, post the code you already have together with any errors (or unexpected results) and we will be glad to help you correct your code. Oh, wait, you wanted a handout, didn't you. Well, you are not going to get one. We will be more than glad to help, but …

Member Avatar for jwenting
0
74
Member Avatar for vinutha1309

In addition, even if we did want to help you, after your demand that we drop everything else and concentrate on your, I repeat [b]your[/b] problem, that question (demand?) you posted just does not contain anything that we could work with.

Member Avatar for jwenting
0
117
Member Avatar for damanjit

It takes 9 command line arguments (which are filenames), reads the content of the first four, doing varying operations on the data within, and writes results to the last five. It seems to have to do with loan balances, fees, and, seemingly, the determination of FICO scores.

Member Avatar for masijade
-1
200
Member Avatar for baltazar

What do you have so far, and what problem is it giving you? FileReader with BufferedReader and String.split, or Scanner are good starting points, though.

Member Avatar for ~s.o.s~
0
600
Member Avatar for thekashyap

If you simply want to run already compiled classes, you should not need to do anything special (AFAIK). If you wish to compile 1.4 sources, then you also need the -source=version argument for javac.

Member Avatar for jwenting
0
307
Member Avatar for vijaygandhi559
Member Avatar for vijaygandhi559
0
124
Member Avatar for sunithamcsit

Well, this code is fairly bad, I'm sorry, I don't mean to be offensive, I'm just stating the way it is, but for a quick fix try this. You are currently doing this [code] for (int iDay2 = 1; iDay2 < 8; iDay2++) { [/code] which is essentially cycling through …

Member Avatar for masijade
0
130
Member Avatar for nathanpacker

Try [code] sed -e '/[\{\}]/d' -e 's/ = /=/' -e 's/;$//' filename > tmpFile . tmpFile rm -f tmpFile [/code] That will turn all those lines with = signs into variables and source them, cleaning up afterwords.

Member Avatar for nathanpacker
0
129
Member Avatar for sunithamcsit

Of course, be forewarned, that unless you have locked the table you're using (and if you don't know how then just forget I mentioned that as I am not going to explain it), then between the time that you get the total with that query, and then actually pull the …

Member Avatar for masijade
0
137
Member Avatar for Vikas Katara

Well this is guaranteed to get you answers. Have you never heard of Google? Or even the command "man ftp", since that, itself, describes the .netrc file and your "logfile" can be simple output redirection ">". Id10t

Member Avatar for masijade
0
103
Member Avatar for Mr.UNOwen

[QUOTE=Mr.UNOwen;407834]Isn't there something in standard library for this?[/QUOTE] Everything jwenting listed is in the standard library. [QUOTE=Mr.UNOwen;407935]I just noticed a class called ClassLoader and I was wondering how you'd use it. It's abstract, so I'm a little confused about using it. Can someone show me an example of how to …

Member Avatar for thekashyap
0
86
Member Avatar for manusp

[QUOTE=manusp;408377]Guys, sorry but just give me exactly how the code should be written, so i cn turn in my assignment by tonight! Like i said i'll never be a java programmer and i am just trying to complete this class.. I have no shame here but there has been an …

Member Avatar for masijade
0
142

The End.