jwenting 1,905 duckman Team Colleague

Wow... I didn't know that.

it's not something the greens want known, it would ruin their agenda...

The electricity to charge those batteries is produced in coal fired powerstations in most areas.
Those aren't exactly clean. Then there are all the line losses before it gets to your house where you charge your car. Those line losses amount to over 30%, up to 70% in some areas.
In total only 5-10% at most of the caloric value of the fuel used to generate that electricity is actually used for propulsion of you "green" electric car.

With a petrol engine that's something like 50-60% (even taking into account the losses during transportation of the fuel to the gas station, something not taken into account with the calculation for electricity).

Take into account that petrol burns cleaner than does coal, and that it's easier to tune a car engine for optimum efficiency than a powerstation, and the effect becomes clear.

Of course if the car is powered using electricity from a nuclear powerstation (or hydro) the equation changes.
But hydro has its own drawbacks, many of which are only now becoming recognised.
The lakes behind hydro dams cause massive destruction of pristine wilderness, destruction of habitat on a massive scale and regularly cause species to go extinct.
The dams can also prevent species like salmon from reaching their spawning grounds.
Wind, tidal, als solar also have major drawbacks that aren't often mentioned …

jwenting 1,905 duckman Team Colleague

Filled her up 2 weeks ago for €1.42 per liter, highway prices were €1.51 per liter.
Things have gotten more expensive since, up to €1.45 or so per liter now here, €1.60 on the highway.

That's $8.21 per gallon, give or take a few cents.

jwenting 1,905 duckman Team Colleague

impossible to say.
For example you don't say what the errors are that you're getting...

jwenting 1,905 duckman Team Colleague

and get a decent (MODERN) book on JSP/Servlet programming.
O'Reilly's JSP book or Head First JSP and Servlets are the best.

JSTL is easy to use, but you do need a primer on architecture first which those books should provide.

jwenting 1,905 duckman Team Colleague

Do you have any idea at all what you're doing there?
Any idea in fact about what code is run where?

Because if you did (and you should if you're going to do any serverside development) you'd know why it's not working and in fact can't work.

Hint: you're trying to do something with files located on the client using code running on the server.

jwenting 1,905 duckman Team Colleague

"Basically,in Oracle,username would b scott and password would b tiger."

Only if the database engine were installed with all the defaults and not properly secured.
Any DBA worth his money will delete that account as soon as he's created a real one.

Same with the default account on any other database engine on any serious system.

~s.o.s~ commented: Yes, we already have a lot of crackers running around here and there ;-) +19
jwenting 1,905 duckman Team Colleague

"This makes is slower than unmanaged languages such as C++ but the .NET framework enables you to do complex things quite easialy."

Not necessarilly. The idea that a managed language will ALWAYS produce slower runtime performance compared to a natively compiled language is proven false.
A lot depends on the quality and runtime optimisations performed by the managed environment (JVM, CLR, however you call it).

jwenting 1,905 duckman Team Colleague

1) we don't do your homework for you, show some effort
2) we're certainly not going to let you order us around to do it "asap". If and when we do anything it'll be at a time and place of our choosing, not yours, suggesting anything else makes us LESS eager to help you.
3) (general warning) it's NOT "urgent" to anyone except possibly you, and if it is you should have started sooner.
4) properly define your problem domain. WHAT do you want to measure exactly? What that is defines where and how to measure it.

jwenting 1,905 duckman Team Colleague

A white collar crime is a crime committed by the upper class ... such as insider trading, embezzlement, tax fraud, etc.

or ever more just being upper class, having an income higher than minimum wage while not being a socialist (if you're a socialist you're allowed to have a high income, or else they'd have to disagree with their own founders, Marx and Lenin were both rich men).

jwenting 1,905 duckman Team Colleague

the light at the end of the tunnel is the headlight of the approaching train...

Typically in kidnapping cases if the victim isn't recovered in the first 24 hours (and that's optimistic, some agencies say 6 hours) there's a 90%+ chance they'll never be recovered (at least not alive).
And that's for abductions made for extortion of revenge purposes, where the victim and kidnapper usually don't go far (they need to remain in the general area to claim the ransom).
In cases where a child is taken for sale into slavery or for sale to people seeking adoption chances for recovery are even less as the search area is the entire world and the abductor doesn't seek attention (and likely will rapidly create an entirely new identity for the victim, usually combined with brainwashing sessions to remove any memories of the real parents).

jwenting 1,905 duckman Team Colleague

yes, he's lazy. Doesn't even bother to write English, insists on using some sort of shorthand (probably thinking it makes him sound "kewl" or something silly).

jwenting 1,905 duckman Team Colleague

sounds like more trying to do something on the client with serverside code.

jwenting 1,905 duckman Team Colleague

don't do that. You're butchering JSP for something it's not intended for.
NEVER use scriptlets, use only JSTL and custom taglibs.

jwenting 1,905 duckman Team Colleague

correct. And she's placed in a special area of the prison to avoid problems with other inmates, not to pamper her.
Putting her in with anonymous ruffians would create problems for prison staff, potentially dangerous situations they would like to avoid. It's no different from putting child molesters in a separate area to avoid them being mugged constantly.

jwenting 1,905 duckman Team Colleague

I think it's supposed to be white collar crime :)

so now we're criminalising white collars. Good thing white shirts don't suit me, I prefer to wear black :)

jwenting 1,905 duckman Team Colleague

she was negligent. the parents were british and in britain its illegal to leave 3 young kids alone in a room. Should have known better

even if the kids are asleep and you're in another room in the same house?
And mind that they were NOT in the UK so all this took place under different jurisdiction.
The Empire is no longer able to assert its will on the world, and hasn't been for quite some time.

It's a sad world where someone breaks into your home to abduct your kid and you're blamed because you weren't in the same room at the time...

It's also a sad world where someone is accused of being a child molestor just because he's a single white male living in an area where a child disappeared...

Aia commented: Sad indeed. +2
WolfPack commented: calling a spade a spade, as always +8
arjunsasidharan commented: :) +2
jwenting 1,905 duckman Team Colleague

ah, another "expert" answer from rg...
Kid, MS SQL Server is a serious database used in massive transactional systems responsible for tens of millions (or more) of dollars of revenue each day per system.
Hardly "a toy".

Quite in contrast to MySQL and PostreSQL which ARE toys.

jwenting 1,905 duckman Team Colleague

in fact kid, my contribution was way more helpful than yours which would have him go on doing things all the wrong way...

jwenting 1,905 duckman Team Colleague

not urgent.
not something you should do from a JSP either.

jwenting 1,905 duckman Team Colleague

or write your own code to write out SLK...
Not the nicest code to look at, but you loose dependencies on another few external libraries which may be worth it.

jwenting 1,905 duckman Team Colleague

Best use a Timer and TimerTask, that's what they're there for after all :)

Creating your own mechanism using threads (which a Timer no doubt uses under the hood) is certainly possible, but why do things the hard way?

Do mind that whatever option you choose there are no exact guarantees for the interval you want. What you'll actually get will depend on outside influences (operating system timeslicing etc.) but with a Timer the JVM will try what it can to get as close as it can, while with your own threads it will only guarantee a minimum sleep period.

jwenting 1,905 duckman Team Colleague

real Men use IntelliJ :)

... climbs into asbestos suit ...

jwenting 1,905 duckman Team Colleague

Yes, that was me that mentioned ethanol. If it's not energy efficient then why is it included in the Energy Policy Act of 1992?

several reasons. At the time it was thought to be a potentially viable alternative to gasoline in the long run (which turned out not to be the case).
It was also a political statement towards oil producing countries in the middle east that the US wasn't going to be strangled by them, that they were working on ways to reduce their dependency on foreign sources for energy.
And it was required to please the environmentalist lobby into supporting the bill, which bought some required votes in congress.

jwenting 1,905 duckman Team Colleague

Again, this is a misconception. While ethanol can be used as a fuel additive instead of gasoline, ethanol is not energy efficient. It takes more energy put in through processing then it produces. In nearly every case, this energy put in comes from fossil fuels.

True alternative sources are an extract from sugarcane (which the U.S. isn't currently looking at because of the problems with Chávez in Brazil (where most sugarcane is grown)). Solar power and wind energy are also good alternatives.

What our country needs as a whole is a grassroots rebellion geared on energy change.

Edit: Hydrogen cells are also an excellent alternative.

Chavez is in Venezuela, not Brazil.
Sugarcane doesn't come from Venezuela though (oil does), it comes from Cuba (another country not very popular and for good reasons).

Ethanol btw can be used to drive an engine, but it would need to be a different engine and would have to be far more massive to produce a similar power output than does a gasoline powered engine due to the lower energy content of the product.

I've already addressed the production problems of the stuff, and the reasons why wind, solar, tidal, and hydrogen aren't viable alternatives due to their environmental impact.
And that's not even taking into account the massive areas of land that'd need to be relegated to the wind and solar farms to cover energy needs.
It's been estimated that if we covered Europe with wind turbines at their …

jwenting 1,905 duckman Team Colleague

Isn't there some kind of new alternative called Ethanol? It's supposed to be included in the Energy Policy Act of 1992 along with biodiesel, electricity, hydrogen, natural gas, and propane.

there are major problems with ethanol and biodiesel (as with all "alternative fuels".

Ethanol and biodiesel are created from plant material, which means that large areas of land need to be set aside for growing those plants.
That means either reducing the agricultural land and turning it to growing plants for fuel (resulting in less food, thus famine) or turning pristine nature into farmland.
Both are currently happening (though the famine is at the moment prevented by increasing agricultural land by chopping down forests and increasing its output by more artificial fertiliser).

But that's only part of the problem. A study a few years ago discovered that it took more than a gallon of gasoline to produce and ship to the pump a gallon of ethanol or biodiesel. In other words, the system is at the moment counterproductive, nothing but a feelgood measure.
This is due to the vehicles and systems used to run the factories and farms (and the fueltrucks) all running on gas themselves, and those facilities usually being far from the places where the product is consumed due to the high cost of land near cities and the large amounts of land required for the production of "biofuels".
So instead of a 10 acre refinery on the outskirts of town you …

'Stein commented: all correct. +6
christina>you commented: Oo.. I see.. +11
jwenting 1,905 duckman Team Colleague

Okay, I'll get back on topic then. What other ways are there to possibly lower gas prices? Any ideas?

simple supply and demand dictates that if supply goes up and/or demand goes down the price goes down.
That doesn't take into account government action to keep prices artificially high.

So there are 3 possible solutions:
1) greatly reduce demand by greatly reducing the number of vehicles burning gas. This would have to be voluntary, which is highly unlikely to happen (forced reduction wouldn't work as it would be accompanied by measures to ensure government income by increasing fuel taxes).
2) greatly increase the availability of gas. This would mean increased production which isn't possible due to the construction of refineries being blocked at every opportunity by government agencies and environmentalists, and by the oil cartel refusing to deliver more crude.
3) get rid of the government.

All three are highly unlikely to happen.

jwenting 1,905 duckman Team Colleague

> white color crime ?
;)

under the new "hate crime" bill currently before congress it would effectively be a crime to Caucasian (aka white), because everyone knows that all white people are racist...

jwenting 1,905 duckman Team Colleague

not in a JSP, that's where you put it.

database code does NOT go in JSPs, in fact no code goes there at all.
JSPs contain JSTL tags and maybe tags from 3rd party tag libraries, and that's it.

jwenting 1,905 duckman Team Colleague

ever heard of division?

jwenting 1,905 duckman Team Colleague

if you can't find anything about session management and JSP you haven't looked...

You may want to just limit your form's memory to cookies... which you can handle with Javascript...

you don't. Leave it to the server to decide what session storage system to use. It will use cookies if needed and possible, other systems as required.

There's rarely a requirement to set a cookie explicitly, just about the only time is if you want to persist something across sessions clientside.

If you DO resort to using sessions for non-logged in users, be careful to use them wisely, and clear unused data as soon as it is no longer valid...

which is pointless to do explicitly as it's automatically done for you. The session expires after a period of time and whenever the user closes his browser window he no longer has access to it.

This is a serious problem for many developers...

Hardly. I've worked with JSP and servlets for a decade and that's never been a problem even on high volume online banking sites I've worked on.
Of course any halfway decent developer knows what's to be stored in a session and what's not.
He'll not store things there that aren't needed across requests for example, unless maybe if retrieving that data is very expensive.

jwenting 1,905 duckman Team Colleague

have the ID as part of the Record class, that way they have their own index.

jwenting 1,905 duckman Team Colleague

>I would rather allow ten murdurers to walk the street than to let one innocent man sentenced to the death penalty.

Until a dear one gets killed by one of them, whom the police had had and went up before a court only to be let go on a technicallity.
Murderers have been let go here because someone signed a search warrant a minute too late, despite overwhelming evidence against them and admissions of guilt.
They usually go straight on murdering, repeat offenses are at something like 85% for violent crime (the 15% being purely domestic disputes which went out of hand, the classic "I didn't mean to do it" cases, people who never get off on technicallities and wouldn't want to because their own feeling of guilt is worse than whatever a court can do to them).

jwenting 1,905 duckman Team Colleague

you are just kidding yourself if you think that will do any good. Its been tried before and nothing at all happened to gas prices. Big oil companies could care less what we the consumer think -- they can charge anything they want and we are stupid enough to pay it. $3.00 per gallon is nothing compared to european prices. Last time I heard it was over $10.00/gallon in UK.

Not just that, but they have precious little control over the price...
The vast majority is made up of taxes and fixed cost (purchase price, recovering investment in refineries, transport cost, salaries of workers, etc.)
Out of the $7.50 equivalent that gas costs in Europe (per gallon) only about $0.50 is theoretically profit, and that's taxable as well at 45%. So the company makes a grand total of $0.25 per gallon, which is shared between the oil company and the gas station.

It might hurt the government if it went on a long time (weeks or months) and people used non-taxed alternative transport (so not trains and busses, which wouldn't survive the overload anyway), but that would drive the small franchise holders who run most gasstations out of business who need to survive on a few cents per gallon times a few thousand a day (at most) but especially on all the other stuff the drivers purchase in their shops (drinks, newspapers, candy, cigarettes, etc.).
The oil companies themselves would hurt as well, but their main …

jwenting 1,905 duckman Team Colleague

look again... You'll notice you can get the day as a number.
An array is indexed on a number.

Put 2 and 2 together and you'll have insight.

jwenting 1,905 duckman Team Colleague

forum etiquette both here and elsewhere says you share your insights when you find a solution.

jwenting 1,905 duckman Team Colleague

That sounds like a rather expensive way to store the data for your TableModel.

Far more efficient to use a simple List and index that.

jwenting 1,905 duckman Team Colleague

sounds like a bad jar file. Impossible to say which though (but most likely your own).

jwenting 1,905 duckman Team Colleague

one word: ant

jwenting 1,905 duckman Team Colleague

And what implementation are you using for your datamodel?
The problem is almost certainly in that.

And no, it will not necessarilly only consider the few items that fit inside the viewport.
For one it'll need to decide WHAT to show inside the viewport, which may well depend on all the data (for example when it's sorted realtime).
Or maybe it's been designed to retrieve the data for the entire TableModel whenever the viewport changes from a database or network connection.

Optimise your TableModel implementation, that's where your problem most likely is.

jwenting 1,905 duckman Team Colleague

Strings aren't arrays, arrays aren't strings.

What's the difference between a basketball and a barbequeue?

jwenting 1,905 duckman Team Colleague

he didn't ask you. He asked someone called "u" who last I checked wasn't a member here.

jwenting 1,905 duckman Team Colleague

have you actually added the required classes to your classpath when running your application?

jwenting 1,905 duckman Team Colleague

NetBeans (http://www.netbeans.org) is supposed to run on several OS, have you tried that?

which is explicitly NOT what he was asking for. I'll not remove this as spam (though it could be considered such) unless you try the same again.

jwenting 1,905 duckman Team Colleague

there is no such component, you have to make your own as a composite of the components listed...

The text can simply be set as part of the border to the JPanel, which can also be used to set the bevel.

jwenting 1,905 duckman Team Colleague

the version of NB could very well be important.
Not only does NB suck in general and do later versions suck a bit less than older ones, but older versions may not work with the JVM needed to use modern libraries.

jwenting 1,905 duckman Team Colleague

there are several libraries available both commercially and for free that will allow you to do that.
If you've not found them you've not looked for them.

And no, we're not going to write your software for you, certainly not before being paid in full in advance at going consultancy rates which currently stand at $150 an hour for a minimum of 2 weeks.

jwenting 1,905 duckman Team Colleague

I must be watching different news to yourself

I'm sure I would have noticed. I live on the thing and it being destroyed with me on it would certainly have been quite apparent.
Flying off into outer space in between a cloud of debris with no space suit isn't something you forget for the rest of your life.

jwenting 1,905 duckman Team Colleague

and why's he using NB 4.1? 5.5 is available and 6.0 in beta.

jwenting 1,905 duckman Team Colleague

seems his keyboard is stuck...

jwenting 1,905 duckman Team Colleague

Again, that's the current US system. Some would turn that into "cruel and unusual punishment".

the key word there is AND.
If enough people do it it's not unusual therefore doesn't fall under the definition...