Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

664

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

where r u friends???????

You have not asked any question yet. You just dumped some code in your post. And posting in "IM-speak" won't earn you much help either.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The errors are pretty clear. You're trying to use constructor signatures that don't exist for those classes. You need to examine the parameters for those constructors and use correct form.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

^ Definitely worth considering. If there is much processing involved in getting/generating those rows, adding them to the table model through EventQueue.invokeLater() may work out better. It's difficult to say, given how little detail was supplied.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The power supply is the only issue I would wonder about. The card specs say it requires a 450W or higher power supply and that Gateway model has a 400W. You may be just fine though.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, this post may help you out: http://www.daniweb.com/forums/post748240-23.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Anyone who finds themselves frequently posting some text fragments frequently ...

Ugh, this is what I get for multitasking while posting. I meant to say that anyone who frequently finds themselves posting the same text fragments may find the extension useful. :P

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

660

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Make determineGrade() a function that takes the test score as a parameter and returns the letter for the grade. Honestly, if this is a "final" you really should already know how to write a function.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It is another dog. They didn't show him actually getting off the highway though. I think he was trying to get dinner :twisted:

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You can probably get there pretty easily by just playing around with the coordinate space to color space translation formulas and a bit of basic trigonometry. It's still interpolation between the colors based upon the relative distance between your 2D points.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

656

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Anyone who finds themselves frequently posting some text fragments frequently (code tag admonitions, anyone?) may find this add-on for Firefox very useful: Clippings.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Sure, take a look at Process and ProcessBuilder.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

More than two points for what? You have a range from one value (min) to another (max) represented as a gradient between two colors. Do you mean more color ranges?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

This line from the JTable API explains your issue

Note that if you wish to use a JTable in a standalone view (outside of a JScrollPane) and want the header displayed, you can get it using getTableHeader() and display it separately.

. You probably want a scroll pane anyway if the number of rows can exceed your view area.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Posting this in the Java forum would probably get you an answer sooner.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

At it's most basic, a linearly interpreted gradient just calculates the new RGB values by applying the target value percent of the linear range to the each RGB component range. Here's a Java function illustrating that:

/** returns a color between start and end colors based upon percent of the range */
private Color gradedValue(Color beginColor, Color endColor, float percent) {
    int red = beginColor.getRed() + (int)(percent * (endColor.getRed() - beginColor.getRed()));
    int blue = beginColor.getBlue() + (int)(percent * (endColor.getBlue() - beginColor.getBlue()));
    int green = beginColor.getGreen() + (int)(percent * (endColor.getGreen() - beginColor.getGreen()));

    return new Color(red, green, blue);
}

Where "percent" is just the percentage of your spatial linear range, i.e. at position x=50 on a display area 200 pixels wide, "percent"=0.25. The intermediate color for that point on a gradient from white to blue would be obtained by gradedValue(Color.WHITE, Color.BLUE, 0.25f)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

650

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Then read the help file for that editor on how to include libraries on the classpath.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It all depends on which read() method you use. The exact behavior is detailed in the API doc of those methods.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The API says something about blocking. What exactly is blocking, when will it happen, and how will it affect the fact that I want the whole file to be read in at once?

Blocking in that context means that code execution will halt (or wait) until one of the conditions listed there is met.

This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.

So essentially, as long as an IO error does not occur and the end of the stream has not been reached, it will wait for data to be available to read, rather than immediately returning some empty result. It "blocks" your code from continuing until it's satisfied the return condition.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It's good for ad imprints I suppose....

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

646

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Console or GUI makes no difference at all. The methods to retrieve and update database information are the same. If you get a string from a result set, you can print it to the console or put it in a text field - it's just data. Same for update - hard-coded data, console input, or text field values can be used to set the parameters on a PreparedStatement in the same manner. JDBC just gives you the API to work with the database. It doesn't matter where the data values come from or what you do with them afterwards.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Both operations are covered in the JDBC Tutorial. You'll read the values from a ResultSet object to populate the text fields. To update the database, use a PreparedStatement.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

yeah i am currently working with raima database and there is no forum i can ask about it.

This certainly looks like a forum to me: http://www.raima.com/forum/

I doubt that Dani wants to create a separate forum for every single database that is available for use.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

What does that have to do with anything?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, I would imagine it told you why as well, rather than simply stating "This won't compile".

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"\t" is the tab character.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You can use a Scanner or the String.split() function.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I would say it's irrelevant. If your paint method is just rendering shapes that have already been computed, I wouldn't worry about it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Ok, so what is your question then?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No, it isn't, really. If you are still concerned about calling the same method again and again, instead of having your class maintain the state or cache the `red' value, shove the responsibility to the invoked method instead.

private void mutate() {
  int red = color.getRed();
  // some complicated, multi step calculation using `red'
  color.setRed(red);
}

And talking of terms like overhead for a program without any concrete profiling data whatsoever is wrong IMO.

++ to this.
Premature optimization in the absence of profiling data is a recipe for all kinds of trouble and makes baby Jesus cry.
The overhead of that method call vs the variable is negligible unless it's in a long loop and even then compiler will probably identify it as a loop invariant and use a local variable for it anyway. If not then you can always make one yourself just like s.o.s. showed.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

640

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The 9500 isn't junk, it just doesn't perform as well as some others in that same price bracket.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Oops, you're right. I missed the brace stuffed into the middle of that line. My apologies for the irrelevant comment.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You may need a call to validate() before the repaint().

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

They've really made a mess of their model numbers with the last couple of generations. What happened to the simple 6xxx > 5xxx > 4xxx and 5900 > 5700 > 5200. :(

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, it is a bit odd that the officer has been charged, yet the only detail of the incident said that the kid was about to throw a fuel-bomb at them.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The site was down for a bit when I posted the above, but here is the HD 4670 review and the 9500 GT review

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

First thing: try taking "public void moveTriangle" method out of the toString() method.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Here's some good rules:
1). Don't be retarted.

I realize it's a typo, but this made me chuckle :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

>So what do you think, was it right for the officer to shoot him?
Definitely.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The reviews for the 9500 weren't too great. Perhaps you should just return it and consider another from this article: http://www.tomshardware.com/reviews/radeon-geforce-graphics,2086.html

The HD 4670 sounds like a pretty good card for ~$80.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You don't want a while() loop in the mouseListener. You want to increment a counter each time a point is collected until you have recorded the required number of points for your polygon. You may only want to draw the points themselves until you have the entire polygon specified. You'll also need some way to reset it. Perhaps a seventh click or a right-click should clear the points and reset the counter.

stephen84s commented: You've got to have a high EQ with that IQ to put things that clearly in so few words +4
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

632

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Tyster commented: Many Thanks! I think using Callable will do the trick. Cheers! +2
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You could easily use a Future object to retrieve the result from a Callable process to aggregate the results.

This may be a useful read: http://blogs.sun.com/CoreJavaTechTips/entry/get_netbeans_6