jasimp 427 Senior Poster Featured Poster

It's actually a pretty common question. At the bottom of the thread, where the reply box is, there is a large yellow button "Reply to Thread". Next to that button there is a link that says, "Mark as Solved" Click it and then voila, the thread is now solved.

jasimp 427 Senior Poster Featured Poster

I hope that you will be able to do something with these adverts. The site looking like "cheap" forum with all of them around

I can't see any advertisements; except for the one that says, "Is Daniweb Helpful? Click for details. "

jasimp 427 Senior Poster Featured Poster

Like a lot of people here I'm fairly new at using Java and I'm having difficulties using equals (==) statements. I need need to use the if statement to say "Do you have any data to enter?", if (input == "yes") then continue with the loop.

obviously this doesn't work and I've tried using String, char, linking either to an int value and then to the if but without any luck. I'm aware most will simply tell me they're not here to do my homework and I agree. I simply need someone to point me in the right direction (website, example, anything). Also arrays are off limits for this assignment; any help would be greatly appreciated. Thanks in advance.

*Edit* um yeah, thanks to anyone for taking the time to read this post but after 6 hours of searching the web I found out how to do it.

What you could have done is marked the thread as solved, that way everyone would know it was solved and would not read the whole thing. Or, if you really wanted to be helpful you could have put the edit at the top of your post, instead of at the bottom.

Alex Edwards commented: =P +4
jasimp 427 Senior Poster Featured Poster

When you use an InputDialog the input is received when you click OK, which also closes it, until it is called again. To get out of the while loop you can 'break' it. I wrote an example to show you what I mean.

public class LeapYear {
	
 public static void main(String[] args) {
  //creates the year varible and the sentinel value
  int year, sentinel =8;
  //creates a gregorian calender to use the year variable with
  GregorianCalendar calender = new GregorianCalendar();
  //this while loop will run until sentinel = 0 or a break; is called
  while(sentinel != 0){
  // gets the year from the InputDialog
  year = Integer.parseInt(JOptionPane.showInputDialog("What is the year? (0 to quit)"));
        //ends while loop if they entered the quit value
	if(year == 0){
	 	break;
	}
        //makes sure the year is within the correct range
	if(year < 1582 || year > 2020){
	        JOptionPane.showMessageDialog(null, "Year out of range");
        }
        //confirm leap year
	else if(calender.isLeapYear(year)){
		JOptionPane.showMessageDialog(null, "The year you entered is a leap year.");
	}else{
	         JOptionPane.showMessageDialog(null, "Not a leap year");
	}
    }
}

}

The if statement on line 9 checks the input gotten from the first JOptionPane.showInputDialog. The only way the input exists, is if you click OK in the input dialog, which closes it. The break; in the if loop breaks the loop, ending it and in doing so, ending the program. If the while loop never ends it will keep opening an InputDialog, checking to see if it is a leap year, and than start all over …

jasimp 427 Senior Poster Featured Poster

Chil i just requested some info or ideas if you have any, so tha means you can think and calculate logical stuff.. etc. so if you can't think you shoudn't be posting at the first place

If anyone shouldn't be posting it is you. Ezzaral is probably the most helpful person in the Java section and he knows more, or can at least think through problems better than you ever will. He told you to search the forums because we get a request like this about once a week, on average. You also need to learn to stop acting like a lazy punk because that is how you come across.

jasimp 427 Senior Poster Featured Poster

A few more problems:

cleanInputBuffer = input.nextLine();

cleanInputBuffer is never instantiated.

while (hourseWorked < 0)

"hourseWorked" should be changed to "hoursWorked"

I'm not sure what the bracket on line 27 is used for and the corresponding one is on line 42. I think you could get rid of them. Try formatting your code in the future; it is much easier to debug and read. Also when I run the program is does not output the way you want it to.

Enter Name of Employee:Testname
Enter a positive hourly rate:10
Enter a positive number of hours worked:10
The employeeTestname was paid $ 100.00this weekEnter Name of Employee:Enter a positive hourly rate:

You need to reexamine your System.out.print statements

jasimp 427 Senior Poster Featured Poster

What I think is your friend either doesn't want you to have his IP address or doesn't know you are trying to get it. I also think it would be beneficial to those trying to help you if you showed them what you have done, i.e some code.

jasimp 427 Senior Poster Featured Poster

EDIT: Never mind, I hit the wrong button.

jasimp 427 Senior Poster Featured Poster

quite frankly any member who leaves the site after 20 seconds who cant be bothered to read the instructions doesn't really deserve to be here. :icon_wink:

Suppose a really great programmer or someone who knows XP and hardware inside and out, or someone like crunchie who is a genius when it comes to virus removal, joins Daniwed, and they are forced to read something they don't want to. Right there they might decide we don't deserve to have them. Then we would lose a potentially great member. I think it is better to have them join, have the option of reading the rules and if they break them often enough they will be banned; ridding us of their presence. Much better to lose an awful member, than a potentially great one.

peter_budo commented: Exactly my point +10
jasimp 427 Senior Poster Featured Poster

Maby a good idea would be to make a dialog appear just before submitting thats says (in a very big font) "USE CODE TAGS OR YOU WILL BE IGNORED OR YELLED AT!!!" for newbies who have less than 3-4 posts ? Perhaps that will get to em. ;)

It won't help, when confronted about not using code tags they will just ignore it, yell at us when no one does there work for them, and then leave. I think that would deter new members more than it would help.

jasimp 427 Senior Poster Featured Poster

I don't know who either of you are welcoming :-/

jasimp 427 Senior Poster Featured Poster

Its been that way for awhile, at least three or four months. Maybe it is different for mods. For a long time I have only been able to take away three reputation points, 7/2 is rounded down.

jasimp 427 Senior Poster Featured Poster

(according to member list top score goes to ancient dragon :) with currently 34 reputation point to give/take from any of us )

He can only take away 17, when you give neg rep it takes away half of what you have for rep power. He can, however, give all 34.

jasimp 427 Senior Poster Featured Poster

That appears to be the only time it happens, now with you, nav33n, and I saying those were the posts with problems.

jasimp 427 Senior Poster Featured Poster

Welcome!

jasimp 427 Senior Poster Featured Poster

No clue. I just load the page in IE and don't worry about it.

jasimp 427 Senior Poster Featured Poster

This has happened to me in all versions of Firefox I have used. It has happened around 5 times now; always when the code in a post is ridiculously long.

jasimp 427 Senior Poster Featured Poster

I'm pretty sure the only time a thread title will be bold is when you have unread posts in it, same with the down arrow.

jasimp 427 Senior Poster Featured Poster

Try clicking on "Latest Reputation Received"

Ancient Dragon commented: Good suggestion :) +32
jasimp 427 Senior Poster Featured Poster

Welcome!

Your thread title will appear bold when it has unread posts in it. Posting in a poll is if you want to poll people. You ask a question and give them options. They can choose any of the options and there is a graph showing how many people picked each category. A good example would be found here. Only moderators can use animated avatars. And yes, this thread does belong here.

Prabakar commented: Thankyou very much +1
jasimp 427 Senior Poster Featured Poster

Nano technology can potentially lead to human engineered miniature weapons that may spread like a bacterial infection in the enemy and get out of hand.

Prey, good book I read about 5 years ago.

jasimp 427 Senior Poster Featured Poster

This is just the Question of the Day thread all over again.

jasimp 427 Senior Poster Featured Poster

Post editing is only available for 30 minutes.

jasimp 427 Senior Poster Featured Poster

Try this.

jasimp 427 Senior Poster Featured Poster

Who has the closed mind? You just called someone stupid for not agreeing with you.

It is pointless to try and prove a point to nutcases, don't waste your time.

jasimp 427 Senior Poster Featured Poster

Welcome!

jasimp 427 Senior Poster Featured Poster

Create a Jar Just follow the directions.

jasimp 427 Senior Poster Featured Poster

Note: I really tried to follow the Keep it Clean rule here: A virus is like a penis. Not technically alive but some would say it is. It appears to have a mind of its own, even though it doesn't. It has to inject into another being to reproduce.
Viruses are not alive. They cannot reproduce on their own so they are not classified as living, although they are not dead either.

jasimp 427 Senior Poster Featured Poster

b-t-b, is there a kind of marking?

Do you mean so that you can do [code]

[/code] types of things?
If that is what you mean it is [noparse] [/noparse]

jasimp 427 Senior Poster Featured Poster

Maybe it was not receiving a lot of attention so Dani removed it to make room for advertising. For an answer that is not speculation you would have to ask her.

jasimp 427 Senior Poster Featured Poster

It has been gone for a few months.

jasimp 427 Senior Poster Featured Poster

Glad to have you with us!

You really need to read what the poster is saying first. I would rather have them leave then stay. They just wanted us to do their homework for them.

zandiago commented: Maybe I'm glad...who knows? -1
jasimp 427 Senior Poster Featured Poster

I know; I get chilly for anything lower than 20 C. From what I hear that's pretty "warm" for temperate folks

10 C and I am outside in a t-shirt. :)

jasimp 427 Senior Poster Featured Poster

About 26-30

jasimp 427 Senior Poster Featured Poster

Ha. I get that every day.

Yeah but the heat where you live would annoy me. I don't like it above the mid 80's.

jasimp 427 Senior Poster Featured Poster

Welcome!

jasimp 427 Senior Poster Featured Poster

C'mon, everyone knows it's turtles all the way down.

See the turtle of enormous girth
on his shell he hold the earth
his thought is slow but always kind
he holds us all within his mind
on his back all vows are made
he sees the truth but mayn't aid
he loves the earth and loves sea
he even loves a child like me

---From the greatest story ever. The Dark Tower. I recited that from memory so if there are any mistakes my apologies.

jasimp 427 Senior Poster Featured Poster

please watch you are saying. i dont lie, alright ?! this is what happened.
if you dont want to believe me, well its ok. just dont be mean !
peace.

I never said you were lying. I also was not being mean. You are not a new member so I expect you know how to navigate the site, therefore, could have found a better forum.

jasimp 427 Senior Poster Featured Poster

We are being tolerant. If you are referring to the edited Ezzaral post, before he edited it, then that was not intolerance. If you are referring to Steve's post then there was not intolerance there either.

jasimp 427 Senior Poster Featured Poster

If you were a file I'd hit delete.

:) I like it. I think I might use that one.

jasimp 427 Senior Poster Featured Poster

It is not possible to sort the memberlist by solved threads, which is what I believe Salem is interested in.

Just out of curiosity why is it not possible?

jasimp 427 Senior Poster Featured Poster

i know it has nothin to do with java ( sorry but i couldnt find the right forum :( )

That is a horrible excuse. You could have found forums much closer than this. The Techies' Lounge or somewhere in Hardware.

jasimp 427 Senior Poster Featured Poster

There is no limit.

jasimp 427 Senior Poster Featured Poster

Just link it to

http://www.daniweb.com/forums/thread74236.html

Everything we need is in there.

jasimp 427 Senior Poster Featured Poster

@ TFQuestion Constructor, you are using boolean variable "true", which is not allowed to be a variable in java. It is a keyword.

Really? It was my impression you can set a boolean to either "true" or "false".

boolean started = false;

if(x == 4){
   started = true; 
}
jasimp 427 Senior Poster Featured Poster

Absolutely hilarious, and partially true. Not all men are that stupid.

jasimp 427 Senior Poster Featured Poster

If you read the whole lesson they provide example snippets.

jasimp 427 Senior Poster Featured Poster
jasimp 427 Senior Poster Featured Poster

Welcome!

jasimp 427 Senior Poster Featured Poster

don't.

That was a little rude.