verruckt24 438 Posting Shark

I would like to ask you the reason that you are comparing it to an integer.

verruckt24 438 Posting Shark

rob role red

Mobile

verruckt24 438 Posting Shark

Yes, I think I can, But I know that doesn't matter ;)

Do you think you can be a moderator ?

verruckt24 438 Posting Shark

>I hate how resource hungry some java programs can be
Thats the thing from the Ice age. Now Java can really be as fast and efficient as some of the native language code.

>I did some searching around and found two books
Hmmm... Did you not search the sticky thread at the start of the forum ? It lists some good books for Java too and they really are worth.

I personally haven't read any of the books mentioned, I haven't even heard the name of Big Java before, I found Bruce Eckel's Thinking in Java quite good.

verruckt24 438 Posting Shark

I guess yes, but he would have been much happier if you would have dropped the multiple character typing (???) habit of yours too. That too is a symbol of chat/IM speak.

verruckt24 438 Posting Shark

You might be able to contact them or you won't, but starting a new thread for this would certainly attract much more attention from all the other posters here than posting onto an old thread, since not many of them might be interested in a thread that was started even before they were members here.

verruckt24 438 Posting Shark

>What makes you think the new member in question will bother to check that the thread was solved?

The fact that 'Solved' appears in bold, a bigger size font, and besides the thread title, where it is hard to be missed by posters who might accidently post onto such a thread, whereas the date appears below the thread title, in smller size font and is light coloured. And I didn't say that the new poster cannot post if he absolutely wants to post onto an old thead, which I don't think would be the case, I am saying marking it solved, would be a concious effort on our part NOT to make him post accidently onto an old thread.

This because it happens that one misses the date of the last post while posting, it has happened once to me.

verruckt24 438 Posting Shark

yes of course

Do you watch hollywood movies ?

You just broke a rule dear !!! You should have taken a look at the title of the thread. But I guess thats what happens when you post on two threads one where you have to answer in yes/no and another where you don't.

I like watching hollywood movies and sometimes our own bollywood products too !!!

Do you watch Bollywood movies ?

verruckt24 438 Posting Shark

So what in your opinion should be the right course of action for someone who a question similar to one asked in a thread (which was started years ago and has been dead since but was not marked solved) but doesn't find it answered from the previous posts on that thread. Should he be posting to the same thread or starting a new thread.

verruckt24 438 Posting Shark

read head death

Movies

verruckt24 438 Posting Shark

Posting in the Java forum of the community I have seen one thing happen more often than not. I have seen posters post onto a thread that has been solved years ago, but just weren't marked as solved by the OP. Take for example this recent thread in the forum. This thread was started on 20th April 2004, to which the first reply itself was 15 days later. On that day itself, the OP thanked the replier and never posted again on the thread which makes me believe that his query might have been solved. But he didn't mark it so. Then more than an year later somebody posted onto the thread again asking for the docs for the s/w, to which the first reply was four months later. Today after lying there for more than 3 years the same thread was revived by a poster asking for help using the s/w. To which I have posted my reply suggesting the poster to start the new thread siting that this one's more than 4 years old.

The point I want to make over here is, can't we have some auto-marking mechanism for threads which identifies the time the last post was made onto a thread and if this is more than some pre-specified value mark the thread as "solved". One thing that could be done before doing so is to check that the last post isn't by the OP, which would mean that somebody has "offered" something …

verruckt24 438 Posting Shark

@svincio: Did you happen to see the date of the previous post ? Way too back isn't it ? Perhaps start a new thread.

@Daniweb Community : This is what happens when a solved thread isn't mark solved, people keep posting there for ages.

verruckt24 438 Posting Shark

Instead of offering them the program, let them learn the way you did by, putting pieces together and asking wherever he's stuck. Plus it would certainly be of more benefit to all learners if it is kept on the forum. Not that he cannot PM you asking for help, but keeping it on the forum is always better for the community.

Also if you feel you have a piece of code worth sharing you can always add to the code snippets on the forum. This way the work of programming has a larger audience and user base.

verruckt24 438 Posting Shark

Check out the docs for java.util.Vector, where do you find the method getStandardDeviation() in it ? Also all the other errors are pretty straight forward, the compiler gives a reason for the error, the line number where the error occurs in your program and the shows the line too, you should be able to sort them out on your own, we would not explain the reason for and provide the solution for each and every error.

verruckt24 438 Posting Shark

See the example that I mentioned in post # 2

verruckt24 438 Posting Shark

Mark the thread as solved if it is.

verruckt24 438 Posting Shark

with thin hit

become

verruckt24 438 Posting Shark

Whats the error that you are getting ?

verruckt24 438 Posting Shark
for (guesses=0; guesses <= ichances; guesses++);

The semi-colon [;] at the end of the for loop makes this happen, remove it.

verruckt24 438 Posting Shark

You could attack this solution in this way: consider the x value that produces the maximum value for the function as a value that is to be "searched". And start off with an algorithm one like the binary search.
To put this into perspective, suppose 0-40 is your range set for values of x. You calculate the value of f(x) for the lowest possible value of x in the range set - 0 and the highest possible value for x in the range set - 40. Whichever x produces a larger f(x) value, you would divide the current range set into two halves and define the new range set as the half containing the value of x that produced a larger value of f(x). So if f(40) > f(0), your next range set would be 20<=x<=40 and so on. In this way you "chase" the value of x that will produce the max value of f(x).

verruckt24 438 Posting Shark

Again not a yes/no question. Guys where are you going you are forgetting the rules of the game.

None, I like more of pop music.

Do you like workouts ?

WaltP commented: It was a perfectly good yes/no question -- quite griping -3
verruckt24 438 Posting Shark

Cast sale cat

monkey

verruckt24 438 Posting Shark

Well this isn't actually a yes/no question.

Living in the equitorial plate, which at times can be real hot and humid, I like the winter season.

Do you like it ?

verruckt24 438 Posting Shark

There are three methods in MouseEvent which could be of particular help, getX(), getY() and getPoint(), getPoint returns the X,Y position relative to the source component while getX() returns the X coordinate and getY() returns the Y coordinate.

Now what you could do is, divide the image in sections for bets and then on the mouse click get the coordinates from which you could decide what section of the image has been clicked on and hence what part of it has the bet been placed on.

darkagn commented: Good idea to section off the image, thanks :) +3
verruckt24 438 Posting Shark

Suppose that you are taking the username as input from the user in the Login page and passing it to the Login page's target page, then in the target page writing the belowwritten code would save the username in the session variable, which will be available to you throughout the session on all pages, unless otherwise mentioned in the @page directive.

<%
   String name = request.getParameter( "username" );
   session.setAttribute( "theName", name );
%>

PS : I think you should have rather posted this in the JSP forum.

verruckt24 438 Posting Shark

I think what he wants is that it should happen not on the click of the button but as the user types into the textarea. Meaning as soon as the user enters a new line in the text, he should see the paragraph count incremented. If this is what you need you will have to catch the keystrokes as the user types and look for the keymap of the enter key. For this you will need to implement the KeyListener interface. Check the APi for the same on the link given for details. But if this is not what you are mentioning, detail out what you need to achieve.

verruckt24 438 Posting Shark

-1161

verruckt24 438 Posting Shark

Yes I do, I like beaches very much.

Do you like'em ?

verruckt24 438 Posting Shark

[I] [U]

verruckt24 438 Posting Shark

If it is profiling that you need to do on your program/application and not only the overall time required for execution, I would suggest you to use the profiling tool accompanied with modern day IDEs such as NetBeans. But if it is just the overall execution time that you require more of a ballpark then what javaAddict mentions should more than suffice your need.

verruckt24 438 Posting Shark

And why would you want to do anything like that ?

verruckt24 438 Posting Shark

What do you mean by auto calculate ?

verruckt24 438 Posting Shark

Being in India, they come here too early in the morning and I wake up really late and after that I have to rush to work.

Do you watch hollywood movies ?

verruckt24 438 Posting Shark

But if the doctor is cute, forget the fruit.

In my opinion Robdale forgot the rules of the game.

verruckt24 438 Posting Shark

its not homework... i solved but its not efficient, i need some ideA to get started, i did many functns of second program too. plz plz i cant get u ferrari, but i can pray dat u get ferrari...

Then I too cannot help you do your assignments, but believe me I will offer more than the traditional rituals in prayer to request GOD to help you get your assignments done. ;)

Okay on a more serious note, put out the code here, whatever you've written, specify the problems or where you get stuck and I am sure people will help you here, even if they don't actually get a ferrari.

verruckt24 438 Posting Shark

The forum announcement here suggests that no one here would be willing to provide you homework help unless you show some effort. But I ain't much of an obeyer of the rules myself....sssssshhh.... *talking in a low voice* I can help you solve these assignments, even if you don't show any effort, provided you help me buy a Ferrari.

verruckt24 438 Posting Shark

I had just suggested to convert the value of the int before setting it as the text of the text field, using String.valueOf() and not to convert the variable.

And for the errors here are the causes:
1. paragraph is already defined

String paragraph;
int paragraph = 0;

Defining the same variable with two different types may make the compiler not know when to use what and go mad eventually. ;)

2. incompatible types

paragraph=txtAreaArticle.getText();

when you say getText be assured that the JVM will return text and not int so please be a good boy and assign what it returns to a string and not int ;)

3. countLinesIn(java.lang.String) in PartOfSpeech cannot be applied to (int)

public int countLinesIn(String article)
...
then
paragraph = countLinesIn(paragraph); ????

This is where you don't trust yourself. You write a method that takes a string as an input and then, surprisingly, put an int param into it, and then, even more surprisingly, assign, what the method returns to the same variable that you gave it as input. What are you doing here please let me know ?

4. cannot find symbol
symbol : constructor BufferedReader(java.lang.String)

BufferedReader reader = new BufferedReader(article);

Hmm.. here the compiler tells you that it cannot find a method in the BufferedReader class that creates a BufferedReader object that takes a String as an input. Here are the docs for the BufferedReader class tell me whether you can …

verruckt24 438 Posting Shark

the problem here is setText() method takes a string as an input, and 'nParagraphs' is an int.

Solution: Converting the int to String first.

txtField1.setText(String.valueOf(nrParagraphs));
verruckt24 438 Posting Shark

Not a castle actually, but a few hillocks with tunnels in them, yes.

Did you make a castle ?

verruckt24 438 Posting Shark

-1159

verruckt24 438 Posting Shark

Lit bit bite let yet bet

Market

verruckt24 438 Posting Shark

Strings in Java cannot be compared using '=='. You need to use the equals method of the String class. So basically

if (paragraph == "\n\n")

convert this to

if (paragraph.equals("\n"))

Also are paragraphs always going to be with two new lines ("\n\n"), if not what you could do is:

if (paragraph.startsWith("\n"))

So that this could handle one or multiple new lines as well ;)

verruckt24 438 Posting Shark

start a new thread probably this one's already more than 3 years old.

verruckt24 438 Posting Shark

If the image resolution is more then specified critarea image lable automatic increas it's size and all other component of JFrame will become hidden or unmannaged.

i have also that problem one month ago.that's why i use Stretching of image. however it has one disadvantage that it takes some moter time then JLable cause it drows the image on panel.

You can always restrict the size of the JLabel to disallow it to grow more than a specified size.

@OP : Mark the thread solve if it is.

verruckt24 438 Posting Shark

How will we know, how you can do that, unless you post the relevant code and mention what problems do occur ?. Think before you post.

verruckt24 438 Posting Shark

632

verruckt24 438 Posting Shark

It should be treeInsert(node, data) rather, where node is whose left and right are to be searched for a place to insert the new data. Once you find such node you create a new node with the data inside it and put its reference in the node's left or right part. Read my previous post again with the changes mentioned here.

verruckt24 438 Posting Shark

And where's the code ?

Seriously, I have never felt so much trouble making the sense of any post here. Do you have a serious question toask here or do you have the habit of occassional blabbering ?

verruckt24 438 Posting Shark

Yes, simply love it.

Why don't you like it ?

verruckt24 438 Posting Shark

-1157