masijade 1,351 Industrious Poster Team Colleague Featured Poster

Does Mac have/use OpenGL?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

And your question is?

saadismail85 commented: just to know Is this acceptable ..? +1
masijade 1,351 Industrious Poster Team Colleague Featured Poster

dear mr topest1

thanks for reply. your given code really work and now my problem is solved .
thanks for such cooperation
shashikant

This is exactly what the API docs tell you. Did you even bother to look? No? You'd rather spend days begging at a forum for someone to do it for you than to take two minutes to RTFM and do it yourself? I can see your productivity in the workplace is just going to be through the roof!

masijade 1,351 Industrious Poster Team Colleague Featured Poster

:sigh: Take a look at the left-hand side of the "drjava" page. Do you see the bold heading "Feedback"? What is directly under it? You see that? It is the word "support". OMG, It's a link! Maybe clicking that will help.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Do not use == to compare Strings. Use Strings "equals" method.

if ("2".equals(theparam)) {

The "2" is done first as this will avoid any possible NullPointerException.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I've given up. The OP hasn't even asked a question, yet. And, considering the line numbers in one of the above posts, seems to be copying the code from elsewhere on this forum, so I see no point in continuing.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Hi Masijade,
I used the cmd given by you , but its showing this & date isnt changing.

Please help

touch -mt 200911141130.00 f1.sh
usage: touch [-amcf] file ...

I didn't mention, that was on Solaris. On something else the "t" may not be necessary (and is seemingly not on your system), but that decimal point is (when including seconds).

Hi All,
I have another question
Does \n not work in csh?
If not, then how do I get to put my text in a new line...

Please help

echo "${var} \n" >> ${MAIL_FILE}

There is a tutorial at the head of the scripting forum here. Read it.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The code might help.

However, marking your post as "URGENT" is extremely rude. Suggesting that your problem is more important than anyone elses and more important than anything we, ourselves, might be doing and so we should drop everything we're doing and concentrate on your problem. Well, I'm sorry, but it's not, for us, and marking it as such is only going to cause most people to look away from your problem, rather than help you with it.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

My another question is ...

How do we get the modification date of a file.?
I just/only want the modification date.?

i cant use 'ls' cmd, this displays all fields

Please help!

Thanks

The man page for ls and the awk command.

-E           The same as -l, except  displays  time  to  the
                  nanosecond  and  with  one format for all files
                  regardless       of       age:       yyyy-mm-dd
                  hh:mm:ss.nnnnnnnnn (ISO 8601:2000 format).

                  In addition, this option  displays  the  offset
                  from  UTC  in  ISO  8601:2000  standard  format
                  (+hhmm or -hhmm) or no characters if the offset
                  is  indeterminable.  The  offset  reflects  the
                  appropriate standard  or  alternate  offset  in
                  force  at  the  file's displayed date and time,
                  under the current timezone.
ls -E f1.sh | awk '{print $6, $7, $8}'
masijade 1,351 Industrious Poster Team Colleague Featured Poster
touch -m 20091114113000 f1.sh
touch -mt 200911141130.00 f1.sh

Take a closer look at the man page.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Deprecation warning can be removed in this way only.

Uhm, no. It can, and should be updated to use the "current" procedure, not to mention other javac options (which I already mentioned earlier).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

You are write
But this also works fine

i have tried this !

Then only because the programmer decided to be generous, but since it is not documented this way do not count on it always working this way, and especially not with all options.

Edit: And, definately do not suggest that other's do it that way.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

sir
sorry for wrong sentence.
after wriitnig the javac -Xlint:deprecation filename.java i got the warning
"[deprecation] show() in java.awt.Dialog has been deprecated fd.show()"
in open and save dialog box.
pls reply as soon as possible.

Okay. And have you looked at the API docs for Dialog to see if that method description suggests a solution?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

oh! sorry,

I forgot to put - sign before Xlint:deprecation

use:
"javac filename.java -Xlint:deprecation"

Thanx for pointing out my mistake !

You also have the option in the wrong position relative to the filename list. That is rather important.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

It seems that you have not yet tried

"javac filename.java Xlint:deprecation"

method

try this or else
Post your code !

You have it wrong, though. See above.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

So, as I said, post what it was you got.

P.S. You hopefully did not actually type javac -Xlint deprecated file name.java but rather javac -Xlint:deprecation filename.java which is what the initial message said (for the option) and only common sense (for the argument) besides the fact that I had already explicitly posted that.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

And have you used that option to javac, yet? Using an option on a command line is not a Java issue, and if you do not know how to provide options and arguments to a command on the command line then you need to learn that, first. And, as said, that is not a Java issue.

If it is that you are using an IDE and don't know how to set the options in the IDE, well, read the user documentation for your IDE and find out how.

Once you have the respective issue corrected, then do that. If you still don't understand what's wrong, then post here what that compilation attempt gave you and we will help you further.

P.S. PM's asking for help are summarily ignored.

Edit: If you simply want the warning to "go away" then use the "@Deprecated" annotation (Google that) or use the "-nowarn" or "-Xlint:none" options to javac.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Gladly. Show what you have, and let us know exactly what problems you are having with that.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

?????

I have no idea what you want.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Okay? And you are telling us this because .... ?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No. That 500 sets the initial size of the array that "backs" the arraylist, as well as the size of all subsequent arrays used to back the arraylist once it exceeds that size, but the "indexes" are populated from front to back and are not "immediately" available. If the arraylist has already grown to that size, then you can insert into an arraylist in that manner, but you cannot set an index beyond the end of the current size of the list.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Java does not have an Eval. You would have to either parse it and perform actions logically, or you would have to create a class "on the fly", either with BCEL (Google that) or by generating and then compiling code, or you can look into the scripting engine support in 1.6 (I.E. Google "Rhino").

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I'm afraid you are going to have find a support link at the site from which you are downloading.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Find out what it is suppossed to be doing and reprogram it in Java. Trying to achieve a 1-to-1 translation is an exercise in futility, and, even if you do get it to run, it is not likely to be at all performant.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Every time you execute "java" from the command line you are starting another JVM.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Yes it will. Why don't you try showing us what you tried.

P.S. Did you try typing "man touch" first?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Scriptlets alone are a bad idea in a JSP. If you insist on doing this "on the spot", then at least make a bean out of it.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

This is not the sort of thing you do from a JSP page itself. This would be something that should (if part of a webservice) be started in a thread (or a few threads) when the application starts and left running. They should then perform a pooling operation (i.e. every few minutes attempt to connect) and write the statuses in a DB (or flat file) and the JSP should do nothing but show the results.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Good for you. A lot of people react negatively to that sort of advice, so, truthfully, way to go.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, you are doing your recursion wrong. Do you really want to recurse before printing the first character (which you're not doing anyway since the recursive method doesn't return anything), and then recurs again?

You need to println charAt(0), then recurs substring(1)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

So do it the same way for MySQL, just with different strings for the Driver and url.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, what is stored in the Map is a String, you cannot simply cast a String to a List. Do you want to create a List from multiple elements in this String, or do you want to simply add this String (and other's like it) to another list? If the second, you, of course, want to use add. If the first, the use split (if applicable) and create an array, instead.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Seems as though it is Strings stored in the map and that the map was declared using generics.

So, why are you trying to use a String as a List?

IOW, what is in the map and what are you trying to do here?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Simply connect and catch the exception. On an exception, it is, seemingly, not running, or not running properly. Use HttpURLConnection and connect to the actual site and you can even check the returned http codes (i.e. 404, 501, etc).

masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Okay? And your question is? Just so you know, we are not going to do it for you.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Read the result into a two-dimensional array and then use

((DefaultTableModel) jTable.getModel()).setDataVector(<2darray>, <columnNames>);
jTable.repaint();

Edit: P.S. Since you cannot, reliably, know, beforehand (without some futzing around), how many rows the resultset contains read it into a List<String[]> and then use List's toArray method to get the List as an array.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

it is a common problem when dealing with applet so you need to create an applet to view the output or if not an applet program look at the compillation options given to you after compilling

Huh? This is purely a compilation issue. What does applet, or not applet, have anything to do with it?

shashikant.v commented: thanks fo ur reply +1
masijade 1,351 Industrious Poster Team Colleague Featured Poster

$file_name, not file_name
ditto for the other variables
use "sed -e" not just "sed"
and change $file.new to ${file}.new just to be safe

Edit: So many problems, so little text. ;-)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Okay? And your question is?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

API doc states:

Thanks. That was just me being too lazy to look it up myself, and hoping the OP would figure out to do that. ;-)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

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 end index) not a start and length, and I don't know how substring reacts if the end index is smaller than the start index..

masijade 1,351 Industrious Poster Team Colleague Featured Poster

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 the text parts to text with new String(byte[]).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

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.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

BufferedReader, readLine, a counter, and String's split.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

That "^M" is a unix line end, use the dos2unix command first. For the rest use sed.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Do kindly explain exactly what you need. Junk character means nothing.

masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster

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. Why simply deal with defaults that can change due to configuration and/or operating parameters when you can control the operation.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The code does not give any stack overflow error.
it runs fine.

Which has already been covered. Did you read the thread or just knee jerk reply without bothering to find out what has gone before?