server_crash 64 Postaholic

I still don't get it. Without some form of advanced voice recognition, they could n't perform required tasks such as clicking on a URL, or even typing in one.

server_crash 64 Postaholic

I hate to refer you to google, but I think that's the only way you'll find one.

server_crash 64 Postaholic

You have to precede the method call with a reference to the Complex class. I made the ComplexMath method static, and called it using the dot operator.

import javax.swing.JOptionPane;

public class Complex {

public static void main( String args[] ) {
	
ComplexNumber firstComplexNumber = new ComplexNumber();
ComplexNumber secondComplexNumber = new ComplexNumber();	

		
String sReal = "";
String sImaginary = "";
float fReal = 0;
float fImaginary = 0;
String result = "";
				
sReal = JOptionPane.showInputDialog("Please enter the real part of your first number:" );
fReal = Float.parseFloat( sReal );		
sImaginary = JOptionPane.showInputDialog( "Please enter the imaginary part of your first number:" );
fImaginary = Float.parseFloat( sImaginary );
			
firstComplexNumber.setReal( fReal );
firstComplexNumber.setImaginary( fImaginary );		
					
sReal = JOptionPane.showInputDialog( "Please enter the real part of your second number:" );
fReal = Float.parseFloat( sReal );				
sImaginary = JOptionPane.showInputDialog( "Please enter the imaginary part of your second number:" );
fImaginary = Float.parseFloat( sImaginary );				
							
secondComplexNumber.setReal( fReal );
secondComplexNumber.setImaginary( fImaginary );

// *****this is the method call the compiler doesn't like*****		
result = ComplexNumber.ComplexMath( firstComplexNumber, secondComplexNumber );
			
JOptionPane.showMessageDialog( null, result, "Result", 
JOptionPane.INFORMATION_MESSAGE );			

System.exit( 0 );
}	
}
public class ComplexNumber {

private float real;
private float imaginary;
	
public void ComplexNumber() {		
real = 0;
imaginary = 0;	
}
	
public float getReal() {		
return real;		
}
	
public float getImaginary() {
return imaginary;	
}
		
public void setReal( float a ){
real = a;
}	
	
public void setImaginary( float a ){
imaginary = a;
}	
	
public static String ComplexMath( ComplexNumber a, ComplexNumber b ) {
	
String answer …
server_crash 64 Postaholic

Here it is in Java notation. I don't know C.

int a;
int b;

a = a+b;


b = a-b;
a = a-b;

server_crash 64 Postaholic

How can a blind person even see a text based browser?

server_crash 64 Postaholic

I was joking. None of us will help you with your friends hacking attempt. I can't believe you would even think we would help you or your friend do something like that.

server_crash 64 Postaholic

Wow! Sounds like you'll have a happy mom pretty soon.

server_crash 64 Postaholic

Mi brothers, sisters and I are giving my mom a surprise party... she thinks we forgot about mothers day. The good news is that we haven't; she's gonna remember this day forever :) LOVE YOU MOM!!

What are you doing for her?

I didn't know it, but we got my mom a digital camera.

server_crash 64 Postaholic

This works. It's a little bit different than yours though.

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class CPB extends JFrame {

	public CPB() {

	Container content = getContentPane();
	setContentPane(content);
	setBackground(Color.black);
	setSize(300,300);
	setLayout(new FlowLayout());
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setVisible(true);
	}

	public void paint(Graphics g) {

                g.setColor(Color.white);
		g.drawString("Text should be here :S",100,100);
	}


	public static void main(String[] args) {

		CPB cmp = new CPB();
	}
}
server_crash 64 Postaholic

If you put code tags around your code I could help you more.

Untill then, take a look at the java.util.zip API. An easy way to compress a String is replace characters with multiple occurences with a number representation of the occurences, and then the letter.

server_crash 64 Postaholic

I have a burn mark on my screen, and it seems to get bigger and bigger. I don't know why it's there. I know about ghosting, but my screen saver is usually running if my computer is idle. The only thing I can think of, is how I run it all the time. It's a laptop, and I use it for everything: gaming, programming etc. It stays pretty hot because it's on about 6-8 hours a day.

Any suggestions/comments?

server_crash 64 Postaholic

Hehe. I get it now.

English to german:

Librarian(male) -- Der Bibliothekar

server_crash 64 Postaholic

Never heard of mambo?

server_crash 64 Postaholic

AHHHHHHHHHHHHHHHHHHh...Thanks for the reminder. :o :o :o

server_crash 64 Postaholic

hehe. A JPanel was my next suggestion.

server_crash 64 Postaholic

Thats the leftmost number :P, or if your counting, the last bit... highest bit.. I guess would be a more approprate term

I see where your coming from. I guess it doesn't matter how you look at it, as long as you get it.

server_crash 64 Postaholic

in java are signed bytes and the signed bit is the last bit...

The signed bit is the first bit, the leftmost bit.

1001 0000 0000 0000 0000 0000 0000 0000

The signed bit is a 1. -- negative


I think you got it, you just said the wrong thing!

server_crash 64 Postaholic

I've been working on this project and I've had to look at a bunch of code, and go through many tutorials. One thing I've consistently noticed is that the programmer checks to make sure the current thread (Thread.currentThread()) is equal to the one they created in the class constructor. Now, that would make since if there was more than one thread, but why what's the point when your only working with one(not counting the "main" thread)?

Hope that's not too confusing.

server_crash 64 Postaholic

By the way, use code tags so your code is easier to look at.

server_crash 64 Postaholic

If producer is static, then you shouldn't be calling it using the new keyword. It should be, ClassName.methodName().

I would have thought that would cause a "non static method being called from a static context" error though. Since that wasn't your error, then it could be that your method signature isn't correct, or that the parameter list isn't correct.

server_crash 64 Postaholic

Have you tried:

fm.setBackground(Color.black);
server_crash 64 Postaholic

Yes, it is spiele... I just got a bit messed up with my words, veräppeln means to play games with... not games... sorry :) and I typed Software because that was the original word in the last post it's not German... and games the word I thought of, which is spiele not veräppeln. Sorry big boo-boo :o ... my German is kind of getting rusty.

It's cool. I didn't mean the correction in a mean way. I'm pretty fluent in german, that's why I pointed it out!

Here's mine:


English -- German

Google Search ----> Google Suche

server_crash 64 Postaholic

German:

software--> Games >>>veräppeln

I thought games is Spiele, and software is Software in german?

server_crash 64 Postaholic

setBackground(Color.black);

server_crash 64 Postaholic

Correct. Looking at the negative rep points I get it's 90%+ from people whom I tell off when they ask for complete homework solutions...
Telling them they won't get those is in line with site policies so I do nothing wrong (and I do try to bring it gently more often than not :mrgreen: ) so the system is flawed there.
Those same kids would likely not give a + rep when someone does do all their work for them, leading to a skewered system in which you're more likely to get a negative rep than a positive one.

Yep, it's the same here. I got that neg rep I metioned earlier because I wouldn't exactly give someone all their homework. Then, as you know :D , I've done peoples homework for them several times. I've never got any rep for that.

server_crash 64 Postaholic

I think eliminating the ability to give reputation in the chit chat forum will do away with a lot of the messing around.

server_crash 64 Postaholic

I think it's an ok system. Revenge, and the fact that most people don't want to take the time to do it, is something we have to deal with.

server_crash 64 Postaholic

Giving negative rep to someone who is unusually rude

Hmm... Who would that be? :)

server_crash 64 Postaholic

its preventing him from reaching this site

Duh, they block all dirty content.

server_crash 64 Postaholic

Someone gave me some negative rep for making a suggestion that they should've listened to. They wrote: "servercrash was harsh and arrogant".... I thought that was pretty funny though.

server_crash 64 Postaholic

First, let me bolster my point that the US has a lot of support in its effort to secure the freedom of the Iraqi people.

Howard, Australia, Bush in the US and now, Blair in the UK were all re-elected. Doesn´t that tell all of the detractors of the Iraqi action something?

And, Catweazle, I would like to know more about the poem and ¨your mob¨ - I´m very curious about the connection.

The sad thing is that the UK is looked at as being our greatest allie in the war. Actually, Poland has supplied us with more troops than anyone.

server_crash 64 Postaholic

I love you all.

server_crash 64 Postaholic

well, when say the presidential debates happen, they dont directly insult their opponents character, just there actions. But politicians do, however mudsling, which is looked down upon. So when they are insulting each other it is more or less "off the record"...So, insulting the person is not part of debating.

Did you watch the edwards vs cheny debate? I heard some pretty nasty things, but they were on the record.

server_crash 64 Postaholic

Roxy, that chick in your avatar is hot.

server_crash 64 Postaholic

Precisely, and when a debate is being conducted all a person needs do is be mindful of the language they use and the fact that personally directed insults and/or abuse shouldn't be traded.

I haven't seen any reasonably bad language, and insults are part of debates. Don't you watch the political debates!

server_crash 64 Postaholic

I can tell you how to get rid of the problems, but the program wont do anything. I don't like the coding style you've used, no offense. If I were going to write that, I would do something like this:

public class Invaders extends JFrame
{
           public Invaders()
           {
                     Container content = getContentPane();
                     JPanel stuff = new JPanel();
                     JButton btn = new JButton("Button");
                     stuff.add(btn);
                     content.add(stuff);
                    setLayout(new FlowLayout());
                    setContentPane(content);
                    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    setSize(300,300):
                    setVisible(true);
          }
}

That's just my preffered way of working with stuff like that.

To get rid of your problems with current code:

panel.add(this);

That will not work. First of all, your using the "this" keywork which would not work in the context. Then, your TRYING to add the JFrame to the JPanel, which also wont work.

Delete that line of code.


Then, you have this line of code:

g.drawImage(bicho, 40,40,this);

Your not currently working with an ImageObserver, so change it to this:

g.drawImage(bicho, 40,40,null);

server_crash 64 Postaholic

The java.sun.com site is a great one.

This is my favorite, I went through all of them and they are great:

http://chortle.ccsu.ctstateu.edu/CS151/cs151java.html

server_crash 64 Postaholic

I've had two minus rep on the 22nd of april for no reason in a word game... these rep arent used properly thats for sure...

It seems like nobody has got anything else to say about piracy...

I'll give you some positive rep. It's funny but stupid how some people are treating this. It's like, people don't understand that when your in a debate, you argue with people.

belama commented: returning the favour thx dude +1
server_crash 64 Postaholic

Goodness, My mistake. In the context it was posted, in such a heated debate, it seemed fairly agressive, and looked as though it was viewed with negativity, never happier to be wrong.

Ahh no problem. I kind of thought someone would take it the wrong way, but that's ok. I just wanted to know if that poem was in the book im thinking of.

server_crash 64 Postaholic

:lol: :lol: :lol:

I just looked and I've recieved one neg rep point for this because what I said was unnessasary(spelling)...Then I got one for another thread that says, servercrash was harsh and arrogant....muahhahahahhahah I love this rep thing.

server_crash 64 Postaholic

rofl slightly offtopic, but someone gave me a minus reputation point from this thread Oo

How do you check? I know I've got some negative rep the past few days!

server_crash 64 Postaholic

What's wrong with getting poems out of books?

Did I say there was?

server_crash 64 Postaholic

I didn't say there was. I think it's good that you read. I was just wondering if you got it out of a book called 1838, because I thought I remembered a book from history class called 1838. I didn't mean that it was a bad thing.

server_crash 64 Postaholic

You won't 'get it', that's for sure!

Hmmm.. And you were the one saying watch what you say.

And I did understand the poem.
By the way, isn't 1838 a book? Did you get that poem out of a book?

server_crash 64 Postaholic

Edit: And while terrorism and genocide are both horrendous things, they are definitely very different ones.

Really? What makes them so different to you?

server_crash 64 Postaholic

The x30 was what I was looking at. It's still a little too expensive right now!

server_crash 64 Postaholic

Ya, even with the help of the reference book, I couldn't figure out how to correctly use the Location class...

Yeah, I had some long drawn out solution I know was probably wrong, but that thing was tough.

server_crash 64 Postaholic

Using language like that is akin to calling someone a terrorist.


Actually that act was an act of Genocide, not an act of terrorism.


Get this topic back on track, people, and stop using terms and comments which offend others, or I WILL close it!

Did you read some of the things he said?
This is one of them: . I oppose Pakistan for being a front line state against "terrorism"

Now, he's saying he oposses Pakistan because they're against terrorism...After that, yes I was calling him a terrorist because he oviously supports it.

By the way, here is the definition of a terrorist:
terrorist >noun a person who uses violence and intimidation in the pursuit of political aims.

Exactly describing Sadam.


I'm done..If you want to complain anymore about my views on terrorist supporting people, or countrys..PM me.

server_crash 64 Postaholic

Which statements are these?

server_crash 64 Postaholic

Ya, I took a bunch of practice tests too and thought they were all harder than the real thing... but I did get a little hung up on the Marine Biology free response question... probably because I didn't study the methods as much as I should have. But I thought it was pretty cool that we got to use that big reference book on that.

Same thing I got stuck on. I didn't read one page of the MBCS, so I thought I was screwed until I saw that little green book. But still, it didn't help me much!