jwenting 1,905 duckman Team Colleague

you mean you want to include links to different css files in the resulting html stream depending on some parameters?
What you're doing now is indeed the correct way to do that using servlets alone.
Were you using jsp, you'd set the string to be used as the uri to the css in the request object and in the jsp read that out and use jstl to insert it into the proper place in the html.

jwenting 1,905 duckman Team Colleague

I'd advise to never write it in the first place.
Use a tool that generates binaries using some fancy GUI tool without ever going through source code at all.

jwenting 1,905 duckman Team Colleague

something's not right, here. how are you gonna neuter a cat named "Betty" ?

:S

sex change operation?
or maybe a hermaphroditic cat?

jwenting 1,905 duckman Team Colleague

it will so something, if N != 0 and n is defined in scope for the method.
What it will do is cause an eventual numeric underflow when n drops below the minimum for its datatype :)

Of course the entire loop can be removed from this method, and the method condensed to "return 0;" which is all that the loop would ever result in if it wouldn't crash :)

jwenting 1,905 duckman Team Colleague

well, initialise it :)

jwenting 1,905 duckman Team Colleague

Making variables non-private is only an issue for public APIs.

Assume ALL API specifications to be public, period.

Protected (and even public) data members have their place, but that place is mostly to be found in performance critical situations where the extra overhead of creating call stacks for the getters and setters to these data members would be prohibitive.
Examples might be small classes that are uses extensively in an application, like a 3D Vector or 4D Matrix in a ray tracer.
For those (where the data members are accessed at a very high rate in comparison to most other operations) the use of getters and setters rather than direct access to the data members would yield an unacceptable performance overhead.

For most business applications however that's usually not a problem as they spend the vast majority of their time either waiting for user input, external events, or external data.

Another place might be classes that are completely internal to your library, like pure abstract classes.
For those there is no way they would ever be used directly, the only use is by derived classes. Giving those protected data members yields the same result as providing those data members as private in every inheriting class without the overhead of actually manually adding those members to each of those classes.

jwenting 1,905 duckman Team Colleague

Read the documentation of the jar tool (which is part of the documentation set of the JDK, as the jar tool is part of the JDK) for instructions on how to create executable jar files.

jwenting 1,905 duckman Team Colleague

The fact that they're being talked about means they're successful, which goes to show that annoying commercials make perfect sense to a marketeer.

jwenting 1,905 duckman Team Colleague

You forget #4: an "standard" rate of tipping that's to be a minimum is going to reward poor service, and customers should not reward poor service as that means there's no incentive any longer to give good service (and we see the result all the time with waiters and other staff in the services industry).
And #5: how the heck has a tip, always having been meant as a means of rewarding exceptional service, devolved into being the actual salary of the person it's being handed to, and thus not a reward for exceptional service at all?

jwenting 1,905 duckman Team Colleague

That said, I find that a very large proportion of the world's population is utterly incapable of analytical thought, and analytical thinking is crucial to becoming a successful software developer.
MAYBE such a mode of thinking can be trained, but if so a very large number of people seem either disinterested or incapable of receiving such training.

jwenting 1,905 duckman Team Colleague

Do NOT use scriptlets in JSP. Use a servlet instead.
And NEVER (I assume you want to, it's almost always on beginners' minds....) retain life database objects between requests.

jwenting 1,905 duckman Team Colleague

You're still using scriptlets.
Until you stop doing that, you're getting no more help.

jwenting 1,905 duckman Team Colleague

as I told your alter ego, that's not possible.
No need to create a new account if you don't get an answer you like in a few minutes.

jwenting 1,905 duckman Team Colleague

nope, not possible

jwenting 1,905 duckman Team Colleague

http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Date.html

So that is no longer correct? Or why else isn't it listed there.

That has always been correct, for SQL dates :)

BestJewSinceJC commented: :) . +5
jwenting 1,905 duckman Team Colleague

which should tell you all you need to know.
You're supplying the add() method with an argument of an incorrect type.
Fix that.

jwenting 1,905 duckman Team Colleague

you seem to even need help typing...
Best start again at kindergarten.

jwenting 1,905 duckman Team Colleague

I'm no teacher, could never survive in a job where I'd have to constantly restrain myself to not beat the crap out of lazy or annoying little buggers who refuse to maintain order or do their homework (let alone pay attention in class).

But I see a lot of people, and the standards to which they are educated are dropping with every new generation.
This can only mean the standards to which schools educate are declining.
I read the reports about students learning to be teachers being unable to complete the homework assignments they would hand out to their future pupils, which says a lot about the standards of teaching...
I see the highschool kids at checkout counters in the supermarket being slower to calculate change using their calculators than I can do it in my head.

jwenting 1,905 duckman Team Colleague

Turbo C is a 20+ (going on 30) year old product created for a different operating system entirely, an operating system that hasn't been supported by Microsoft for 15 years.

No, it's not going to be supported. Anyone with a grain of common sense would realise that, and would not even attempt to use Turbo C, instead using more modern compilers.
Sadly it seems common sense is sorely lacking in many places.

jwenting 1,905 duckman Team Colleague

And because we've been doing it for years (well over a decade in fact...) rather than failing utterly to do it for even a few hours before dumping our homework on some forum and insulting those who might help us when they told us why we should do it ourselves.

jwenting 1,905 duckman Team Colleague
// this is overkill
Date now = new Date(System.currentTimeMillis());

Why is this overkill?

Because the default constructor for Date implicitly gets you a Date object reference referring to the system date/time at moment of creation.

Doing it like you do here is therefore redundant.

jwenting 1,905 duckman Team Colleague

In some states marginal students are simply forced out to increase the test scores. What do we do with all those uncounted dropouts?

In far more places their scores are artificially inflated in order to increase average test scores.
In some places I've read there's even an official policy to ensure average test scores across racial groups are the same. For example if black kids in a class on average get 50%, white kids 60%, the grades of all black kids are raised by 20% to match those of the rest in order to "prevent racism" (the reverse I guess would also be done).
In others they've abandoned the concept of kids failing altogether, effectively raising the minimum score you can get on a test to the lowest score needed to pass it.

What to do with dropouts? Forced education towards low-skill labour might work. Always need for gardeners, bricklayers, and people like that.
Right now few enter those professions because it's hard work for little pay, they'd rather be on the dole and live on state handouts all their life.
Force them to take up unskilled labour, or loose those handouts. The work is out there, now being filled by foreign "guest workers" and illegal immigrants.

jwenting 1,905 duckman Team Colleague

It's not that it's impossible, just not really practical.

For him it's impossible. If it wasn't he'd know the answer to his question without asking :)

jwenting 1,905 duckman Team Colleague

Do NOT use Visual C-- 6 AT ALL. It's WAY outdated, unsupported, non-standard compliant, etc. etc.
There is NO NEED WHATSOEVER to use it unless you're maintaining a large project created with it years ago that would take a lot of effort to migrate (in which case it's probably best to rewrite the whole thing, only doing critical maintenance on the old version while doing so).

jwenting 1,905 duckman Team Colleague

ah, the typical homework kiddo response. Doesn't get its homework done for it pronto, gets abusive and asks to be banned.

Do you really think you're going to get help this way, kiddo? Because if you do you're sorely mistaken.

jwenting 1,905 duckman Team Colleague

don't hijack other peoples' threads.
don't revive long dead threads.
do your own homework.
don't ask for private help by email.

jwenting 1,905 duckman Team Colleague

I already gave you step by step directions. What didn't you understand?

he needs zuh koduz asap! :(

jwenting 1,905 duckman Team Colleague

In California there is the STAR testing and a school is judged on those results. They are standardized tests based on what students should know (whether the tests really are a good barometer is hotly contested) at every grade level. The school is graded by the test results. Certain levels of probation are imposed if the fail rate is over the minimum level as a percentage of students. They're shipped to the teachers by the state with strict rules of how they are to be administered and they are graded by the state, so unless a teacher out and out cheated and gave the kids the answers when she administered the test, they're pretty immune to grade inflation. A decent teacher performance test would be to give those STAR tests the first week of school, get the results, then give them again at the end of the year. If they improve, the teacher gets the bonus. That levels out the playing field.

We have something similar here, though here the teachers' wages and bonusses aren't influenced by the results (the school's budget is, if they do well they get extra funding for things like new equipment and outings).

It works, schools thrive as a whole to get ratings up as they are published and schools that do poorly tend to loose pupils which again influences their budget (and may loose funding altogether in extreme cases).

jwenting 1,905 duckman Team Colleague

I've never needed repairs on anything between the time the normal warranty expired and the "extended" would have expired :)

I have had a design flaw kick in in an old laptop, needed a new motherboard.
Took several months to fix as the motherboard first had to be designed, produced, and shipped in from Japan.
Will have cost Toshiba a fair bit as it was near the end of the (then 2 year) warranty period and probably a lot of those machines were already being replaced.

jwenting 1,905 duckman Team Colleague

think recursion.

jwenting 1,905 duckman Team Colleague

2) One tech call equals or exceeds the price of a 3 year warranty in most cases. Its up to you, but really consider it.

Depends. Most times if you need service after the standard 1 year warranty it's either something that's by law to be paid by the manufacturer (like a design flaw) or they'll claim it's not covered under the extended warranty after all.

And that's from personal experience, and talking with people whose job it was to sell those extended warranties.
They look nice on paper but in reality cover nothing. They're insurance policies effectively, against things you're already covered for by law.

jwenting 1,905 duckman Team Colleague

don't need to, got taught all that in kindergarden.

jwenting 1,905 duckman Team Colleague

There is something (in fact a lot) to say for it, BUT it can also lead to artificially inflated grades.
A teacher who knows she's not doing a proper job may resort to handing kids grades higher than they deserve so she gets a higher salary or bonusses.

Unless strict safeguards are in place against that, the quality of education will therefore only degrade further as the grades kids get are no longer in any way (or even less than today) related in any way to their actual performance but only to the grades their teachers need to hand out in order to get maximum pay.

jwenting 1,905 duckman Team Colleague

well, the original was also wrong.
The politically correct solution is simple:

System.out.println("you're morbidly obese");

is the correct response to any data entered into the application.

jwenting 1,905 duckman Team Colleague

People that make a big deal about Dates really do make me angry!!

They give me gas.

jwenting 1,905 duckman Team Colleague

Indeed. If there is ONE thing that makes life easier for mods it is using the flag post feature to report spam etc.

Problem is spammers post faster than I can report them, given the minimum time required between posts.

jwenting 1,905 duckman Team Colleague

I've more than enough black T shirts to last me through the current ice age, thank you very much.

jwenting 1,905 duckman Team Colleague

everyone can teach me???

I sincerely doubt whether anyone can.

jwenting 1,905 duckman Team Colleague

most game studios write their own engines and libraries and those are among their biggest trade secrets.

jwenting 1,905 duckman Team Colleague

no, it's quite impossible.

jwenting 1,905 duckman Team Colleague

no need to be lost, just read the course notes your teacher gave you, and the book he told you to buy.

jwenting 1,905 duckman Team Colleague

sounds like a career in management or marketing is in order. That's where all people who don't have a clue what they want end up.

jwenting 1,905 duckman Team Colleague

have you made sure you're running a 64 bit version on 64 bit Windows (if relevant)?
Might make a difference.

I've not heard of performance problems of Java applications running on W7 from colleagues using the OS (and we're a Java heavy development shop) so it's unlikely to be something generic to the combination Java/W7 (which of course doesn't exclude the possibility that there's some combination of applications/JVMs/OS variants that can be problematic).

You might try updating to 6u19 and see if that makes a difference, but it may not, there are some applications that just don't perform well on a 6.0 JVM (especially some older applications that make use of specific workarounds for bugs in 1.4 and earlier JVMs).

jwenting 1,905 duckman Team Colleague

certainly not. It's a 32 bit command shell, not a 16 bit operating system :)

Anyway, I doubt you will be able to mount a 5 1/4" drive under WinXP (or if you can, whether you can actually get one for the computer it's running on).
3 1/2" would be a better bet :)

jwenting 1,905 duckman Team Colleague

don't try to do that with strings.
Check whether the actual amount (number!) is >1.0 instead, much easier.

And btw, you add 4 amounts there, not 3 :)

jwenting 1,905 duckman Team Colleague

MS-DOS is NOT available in Windows XP, nor is it in Windows 98.

It was retired with Windows 95. There is a command shell that has pretty similar commands available to it, but that's not the same.

jwenting 1,905 duckman Team Colleague

A file can not be opened by merely giving fstream the path. It also need the filename. And use fstream's open() method. Search the net because there are billions of examples.

The filename is part of the "location" of a file :)

jwenting 1,905 duckman Team Colleague

And your problem? We're not here to do your homework for you...

First think, then code. You have the beginnings of a design document. Turn that into a real design document.
Then use that to create the functional design, the technical design, the specs for the artwork, etc. etc.
From those start building the system piece by piece, then glue the pieces together.

jwenting 1,905 duckman Team Colleague

Doesn't matter. Without a complete rewrite to use proper OO techniques and actually have it be Java rather than Basic using Java syntax you should get a major fail on that assignment anyway.

jwenting 1,905 duckman Team Colleague

You don't, since you quite obviously have never heard of inheritance, class hierarchies, etc. etc..
First learn Java well, then start thinking about meddling with things like creating customised GUI libraries.