jwenting 1,905 duckman Team Colleague

And with a List it'd do the same, as it creates the Collection based on the result of a database query.
Instead of trying to force something the wrong way, ensure that those database queries yield the results you need.

And no, that's not related to the "insert order in table". It's related to the SQL/JPQL you use to retrieve the data from the table.

Time to learn how to properly use your tools rather than floundering about, trying random things, and digging yourself an ever deeper hole.

guideseeq commented: Only theory, no practical reply, no reasoning +0
jwenting 1,905 duckman Team Colleague

impossible to say, but sure does change the game... And yes, you can't force Hibernate to use a specific implementation class.
And usually what you're getting back from a query would be either a Collection or a List, if I remember correctly.

jwenting 1,905 duckman Team Colleague

doesn't matter, he's pushing raw, uncompiled, unexecuted, JSTL code to the browser, which will never yield working HTML, let alone what he expects it will yield.

jwenting 1,905 duckman Team Colleague

Or better yet get yourself an introductory text on C++ and do your own research.

jwenting 1,905 duckman Team Colleague

no, #1 IS correct.
If you want to guarantee insertion order is maintained, use a List, not a Set.
While some Sets may be implemented to maintain insertion order, that's not the purpose of a Set.

jwenting 1,905 duckman Team Colleague

we're not here to do your homework for you, and this is clearly just your homework assignment that you're dumping here.

Show what you've done, give us your ideas, and maybe someone will tell you if you're right.

jwenting 1,905 duckman Team Colleague

JSTL code is executed on the server, not the client. So having a servlet send it to the client isn't going to work.

jwenting 1,905 duckman Team Colleague

Any general purpose programming language is effectively neutral, in that it doesn't restrict you in what you can do with it except for those restrictions imposed upon you by the platform on which the created software is executed.

And if you mean that Java can run on any operating system/hardware, that's theoretically true as long as you're able to implement a JVM that will run on that operating system/hardware combination (which might be impossible if you're for example severely memory constrained and simply can't load all the data a full JVM would require).

Of course this also ends up being about the dual nature of Java...
Do you mean Java the platform, or Java the programming language?
Java the platform is defined by the JVM specification, Java the language by the language specification.
It's quite possible to create a compiler for Java that doesn't compile to classfiles (and thus doesn't generate output that will run on a JVM that complies with the JVMS), or to create a language for the JVM that doesn't comply with the JLS (in fact many such exist).

jwenting 1,905 duckman Team Colleague

blame people who don't know that K means Kilo to invent something meaning something else that causes confusion when used outside of its intended context...

jwenting 1,905 duckman Team Colleague

find and download the library somewhere on the net, and add it to your project as explained in the documentation of your IDE.

That's all there is to it.

jwenting 1,905 duckman Team Colleague

You seam to know alot, so tell me why the dimension of Koch's curve is log(4)/log(3)?

mathematically dimensions can be broken numbers. Fractal geometry explains how those are calculated.

http://en.wikipedia.org/wiki/Fractal_dimension
http://davis.wpi.edu/~matt/courses/fractals/intro.html
http://www.vanderbilt.edu/AnS/psychology/cogsci/chaos/workshop/Fractals.html
http://www.wahl.org/fe/HTML_version/link/FE4W/c4.htm

It's a mathematical construct, not physical dimensions.

jwenting 1,905 duckman Team Colleague

As long as all the sources you need to compile the application are on the source path for the compiler it will compile them all into the output path (granted that any other classes needed are on the classpath for the compiler and there are no compiler errors generated of course).

You may have multiple source directories just like you may have multiple locations on the classpath, which can be handy when compiling a system comprised of multiple modules (though it's better to compile each module separate).

jwenting 1,905 duckman Team Colleague

well, that array element contains "nulla" because that's what you put in there...

jwenting 1,905 duckman Team Colleague

\\ he means :)

stultuske commented: yes indeed ... typo :) +13
jwenting 1,905 duckman Team Colleague

never liked Python. Java and LSL though... And I've always had a soft spot for Pascal.

jwenting 1,905 duckman Team Colleague

power consumption, and space. Those fast drives need more "stuff" to keep them stable, and use more electricity.
And of course laptops are traditionally not intended for the uses that require the highest performance. Running Excel, Powerpoint, and Word isn't going to be needing a 10.000rpm drive to keep up with the user...

And cost. It's one thing where laptop makers can shave a bit off of the higher cost of creating small things.

jwenting 1,905 duckman Team Colleague

Mac? In general overpriced compared to similarly spec'd machines from other brands.
But sweet machines if you can get them at a discount (which are rare, Apple tightly controls its prices).

jwenting 1,905 duckman Team Colleague

no, it's not. Oracle has roughly a 2 week cycle of updates, and most of them are so minor they hardly matter.
E.g. here's the release notes for the latest release: http://www.oracle.com/technetwork/java/javase/2col/7u55-bugfixes-2180733.html

17 issues, 3 of them Mac only, 1 specific to Windows 8.1, 2 seems specific to certain Unix variants, one specific to Win32, and most of the others seem rather minor cosmetic issues that most users will never encounter.

And that's just about normal.

jwenting 1,905 duckman Team Colleague

wanna bet that "but my prof hasn't told about those yet"?

mc3330418 commented: yea, you're right. "my professor". this is for school sonny..... +0
jwenting 1,905 duckman Team Colleague

missing imports... Which should have been obvious from the errors you're getting.

jwenting 1,905 duckman Team Colleague

call it 4 times?
Seems rather obvious, once you think of it.

jwenting 1,905 duckman Team Colleague

if 2 values have the same count, report both...

jwenting 1,905 duckman Team Colleague

isn't it interesting how he thinks vb6 isn't bloated, when it depends on a massive runtime library as well as the entire win32 API to do anything at all?

Yet he considers anything else bloated that also depends on runtime libraries...

jwenting 1,905 duckman Team Colleague

yes, beating your computer is counter productive. Whipping however...

jwenting 1,905 duckman Team Colleague

even if you didn't read the rules, you should have known that it's your homework, and that you're supposed to do your own homework.
It's just common sense.

jwenting 1,905 duckman Team Colleague

.NET isn't bloated, get used to it.

If you want something that's going to be around in 20 years, go with PL/1 or Cobol. C too has a good chance of surviving that long.

jwenting 1,905 duckman Team Colleague

of course the second question already provides 2 of the required 3 methods for the answer to question 1 ;)

jwenting 1,905 duckman Team Colleague

What that code does is throw a compiler error.

jwenting 1,905 duckman Team Colleague

answer: simply add an else clause to your if statement to print something if the two are not equal ;)

jwenting 1,905 duckman Team Colleague

what's supposed to be true? I can't look into the brain of your teacher, but I assume if he hands you an assignment it's a true assignment...

jwenting 1,905 duckman Team Colleague

You will have a hell of a time proving you're supposed to have access to the account.
If I were Google and some pundit called me saying "please give me access to account xxxxxxxx, iamthwee set it up for me and then left without leaving the password" I'd be seriously suspicious.

jwenting 1,905 duckman Team Colleague

that breeder is probably getting a pretty decent kickback from the insurance company...
Conflict of interest anyone?

jwenting 1,905 duckman Team Colleague

you're wrong about Objectvision as not involving coding. There was no drag and drop system for building screens.

Objectvision was rather a unified library for creating user interfaces for DOS in an object oriented way, with implementations in C++ and Object Pascal.

You created forms and other screen elements (including the entire application) by instantiating and linking together (usually through impossibly long constructor chains) object instances.

It was a big improvement over earlier libraries however, where creating a user interface meant linking pointers together at pixel coordinates.
Object Vision did all that for you behind the scenes, you just said something like "give me a new dialog window of fixed dimensions for 10 lines of 50 characters, fill it with a new text field of 30 characters long, a label with text "hello world", a new text field of 20 characters long with a new label with text "your name", a new command button with text "submit" that calls a method doSubmit in a new instance of a class called "HandleHelloWorld", and a new command button that calls the cancel method on the dialog". And all that was a single constructor call...

I might still have the original Borland C++ 4.5 CDs and manuals somewhere, from long, long ago.

If you want more information, don't search for Object Vision however. Search for Turbo Vision, which was the name of the library as included in Borland C++ and Borland Pascal.
Object Vision was an attempt by Borland to market …

jwenting 1,905 duckman Team Colleague

You could even encode the actual size of each fragment into the sheet, but that would not be something you'd easily do by just copying and pasting images in gimp of photoshop.
The way would be to either add metadata in a comment field that some formats (like JPEG) understand, or encode it directly into the pixel values of the corner pixels of each fragment (e.g. the colour value of the first 2 pixels to be read from each fragment could indicate the number of pixels horizontally and vertically, the colour values of the last 2 pixels the starting position in the sheet of the next fragment).

jwenting 1,905 duckman Team Colleague

yes, and if your area is very large, maintain a larger box around the player, check all objects if their centers are in that box, then if they are check if there's a collision.

jwenting 1,905 duckman Team Colleague

There exist already tablets that can have keyboards attached to them, they aren't replacing laptops because they're still cumbersome to use.
The main drawback of tablets as is is the small screen size, lack of connectors for external appliances (keyboard, mouse, screen, printer, harddisks, DVD drives, card readers, security devices, you name it). And if you add all that, it's too large to be useful as a tablet :)

jwenting 1,905 duckman Team Colleague

Each rectangle is a tile, or can be thought of as living inside a tile if it's rotated.

What you need is to determine the bounding boxes around your objects, and then determine whether those bounding boxes overlap.
If your objects are simple rectangles that aren't rotated, the rectangle itself is its bounding box (though you might want to add a few pixels if you want to detect a collision before it actually happens).

So you have for example 2 boxes of 10x10 pixels, existing at <12, 23> and <21, 19>.
It's now a simple matter of geometry to determine whether those two boxes overlap (these two do).

jwenting 1,905 duckman Team Colleague

I know. But the comparison holds. If he didn't have health insurance for himself, his own doctor's bills would be of similar magnitude.

jwenting 1,905 duckman Team Colleague

Your personal doctor and meds would cost the same without them having bulk contracts with your insurance company, Stuugie.
That's part of the thing many people tend to forget.

Your health insurance negotiates prices with clinics and pharmacies for thousands of patients together. And more often than not have a "take it or leave it" attitude. If the doctor doesn't agree to their $10 per consult offer they'll just tell their customers to go to another doctor next door who did agree to that offer.

jwenting 1,905 duckman Team Colleague

yes, that's a high price. Depending of course on what's included.
And where you are. If it's a small remote community with few pets and a single vet it's bound to be more expensive than in a large city with a lot of pets and a lot of competition.

jwenting 1,905 duckman Team Colleague

Cutting your dogs' ears is illegal (and rightly so, it's animal abuse) in many places. Would you like to have your ears cut off, AD?
If not, why do you tell people to do it to their pets' ears?

And with a pair of unsterilised cissors even, recipe for serious infections.

jwenting 1,905 duckman Team Colleague

yes, you can add notes to an eBook. But try easily looking back through them in context...
Much easier to do with a dead tree than with a dead electron.

Reverend Jim commented: True dat. +0
jwenting 1,905 duckman Team Colleague

Just ordered me 2 thick paper books. Study guides that are going to have a lot of dogears, sticky notes, yellow and green highlights, and penned in notes.

Can't do that as easily with an eBook, or browse back and forth between pages as quickly.

jwenting 1,905 duckman Team Colleague

never heard of any database engine giving as an error "the database has stopped unfortunately".
Again, list the actual error...

jwenting 1,905 duckman Team Colleague

depends on how long you'll be on that boat :)
And it's a conundrum. If you're going to be there long you're going to need many books but won't have room to stash them because it's needed for food.
Solar charger for the Kindle might be a better option...

Of course you can use the books for toilet paper, not so easy with a Kindle I've been told.

jwenting 1,905 duckman Team Colleague

ah, I much prefer everything in capitals rather than lowercase if we're going to use underscores between words.
Anyway, it's not USER_NAME but USERNAME, single word.
USERID or USER_ID, your choice.

jwenting 1,905 duckman Team Colleague

making any assumption about equality between floating point numbers is a mistake.
http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html read this for the nitty gritty details.

To summarise: it's impossible to map a floating point number with exact precision, therefore all you'll ever get is an approximation.
How good an approximation depends on hardware, operating system, and the phases of the moon and stars (well, not really that, but there's randomness involved).

That's why you should never compare floating point numbers for identity.
If you need to compare them at all, compare them to be identical within a specific accuracy range, say +/- 0.001 (or whatever you require, but the more accurate you expect things to be, the bigger the chance that you're going to reject things that you shouldn't).

And that's why in any serious calculations where precision is required, floating point numbers are not used.
Instead use integer mathematics or fixed precision numerical computation libraries, and only convert to floating point (if at all) for final presentation.
For example, an amount of money can be represented in dollars and cents as a floating point number, but is far better represented as an integer number denoting cents (as $1 is 100 cents).
Your more precise, and as an added bonus your calculations are faster as well.

jwenting 1,905 duckman Team Colleague

might help if you tell us what the error is...

jwenting 1,905 duckman Team Colleague

Any well rounded programmer should know at least C and Assembler. And can't go wrong knowing a bit of Cobol.
But maybe I'm old fashioned :)

jwenting 1,905 duckman Team Colleague

think I still have one of those, in an old machine I've never gotten around to dismantling and and destructing :)