jwenting 1,905 duckman Team Colleague

Don't bother with obfuscators. Nobody is going to want to look at your code anyway.
And even if, it's extremely unlikely your code is so brilliant people are going to want to steal it.

The SOLE reason to use obfuscators and stuff like that is if your code has such serious security implications if it gets compromised that you need to do everything possible to prevent that.
And if you were in that situation you'd not be here asking about this, you'd have a dedicated and highly trained security team working on it already.

jwenting 1,905 duckman Team Colleague

One important part of your graduation project is coming up with an idea that's well researched and with proper arguments for its validity.
If you can't come up with arguments yourself, and/or can find no data to back up your claims, that's usually a good indication that your idea isn't a good one.

jwenting 1,905 duckman Team Colleague

Best create a separate handler class per button (unless the buttons have very similar functionality).
As to the counting, traditional mechanism would use a HashMap<String, Integer>

jwenting 1,905 duckman Team Colleague

There is no 'official linux'. Rather, as you've found out, there are hundreds of different variations, each of which is linux.

Which of the platitude of options you choose would depend in large part on what you're going to want to use it for.

rproffitt commented: More distros than jellybean flavors. +6
jwenting 1,905 duckman Team Colleague

What you have there looks like a perfect candidate for a GridLayout for the rows of keys, with each row being a FlowLayout.

jwenting 1,905 duckman Team Colleague

toString() gives you a string representation of your object.
But you have to define that string representation if you want it to be anything meaningful and human readable.
The default implementation just gives you a hashcode for the object in memory, useful to distinguish between 2 instances but no more.

String.format() otoh will format the arguments into the template you provide as the first argument, and return the result. It's handy to fill in wildcards in a date string like you found out for example.
Mainly it's a bit of shorthand for String.replaceAll()

jwenting 1,905 duckman Team Colleague

why would you want to? It's called implicitly as is...

jwenting 1,905 duckman Team Colleague

if you look at what really happened, VW did nothing wrong. Some flunky broke a non-story as a major "evil corporations breaking the law with software to cheat" when that's not what happened at all.
Bosch created the software which controls the engine performance tuning of VW diesel engines (and many others, those same engine management units are used across the automotive industry).
Those diesel engines of necessity need to run in cycles. During part of the cycle the NOx produced by the engine gets scrubbed out in a filter, kinda like the cathalytic converter in a gasoline powered car.
But that converter gets after a while innundated with other products as well, reducing its effectiveness. To restore it the engine for a few minutes needs to run at a different cycle, which is less fuel efficient and emitting a small percentage of the scrubbed NOx (and some unburned carbohydrates) into the atmosphere.
On average over a long period the cars meet emission standards, just during those few minutes (which happen every few hours or so only) they don't.

All the Bosch/VW software did is to detect when a car is being driven in a way that's typical of engine emissions testing profiles and for the duration not enter the cleaning cycle.
The EPA has since admitted that that's not actually illegal at all, but the cat is out of the box, idiots in the encvironmental lobby, the press, and politicians go ape, and VW …

jwenting 1,905 duckman Team Colleague

Java does not give you direct memory access, that's one of the main reasons they designed the language in the first place, do away with all that messy malloc, calloc, etc. etc. you're stuck with in C.

And no, your program doesn't allocate any memory at all. It requests storage for an object from the JVM which puts it somewhere and hands back a reference through which the program can then retrieve the object again.

jwenting 1,905 duckman Team Colleague

an instance of an inner class exists only within the context of an instance of its outer class, UNLESS it's static.
Result is that an inner class of a non-serializable outer class is not serializable, even if it is marked as serializable itself.

jwenting 1,905 duckman Team Colleague

if you have so many exceptions that need logging that it affects performance there's more wrong with the system than just logging performance...

Exceptions should be rare, exceptions that need logging a stacktrace of because you don't know how to handle them should be even more rare.

jwenting 1,905 duckman Team Colleague

I didn't mean you are trolling, OP is. He's clearly not interested in providing any information at all. Wouldn't be surprised if there is no system...

jwenting 1,905 duckman Team Colleague

you're clearly trolling here. He already said what type of information he wants quite clearly.

jwenting 1,905 duckman Team Colleague

yup. Unless you're planning on making a system that allows plugging in new types of actions to handle on the fly, or an application framework like Spring, it's almost certainly overkill.
But you wanted alternatives to hardcoding stuff, and that's what you'd end up with.

jwenting 1,905 duckman Team Colleague

ah. You could create a class with an interface with a single method, then have for each case a class implementing that interface.
In your approveRequest method you'd create an instance of the required class based on the incoming request using reflection, the name of the class being somehow inferred from the parameters to the request (maybe a mapping in a properties file or database table).

Tricky to get right, not usually something you'd do unless the actual mappings and implementations of methods to be executed aren't known at the time the application is written, but it can and has been done.

jwenting 1,905 duckman Team Colleague

a switch would be appropriate here. And what makes you think chained if statements like that aren't "professional"?
Whether something's appropriate to use or not depends entirely on the scenario you're coding, and in this case it's entirely appropriate.

p.s. check your conditions. "=" in Java is an assignment, "==" is a reference comparison. You don't want either when comparing strings, you want .equals().

jwenting 1,905 duckman Team Colleague

though I do wonder what he's done that makes his eclipse project's compiling dependent on the order of dependencies in the project settings window :)

jwenting 1,905 duckman Team Colleague

Amazon is your friend... If you have a credit card of course. If not, try your local bookstore, they are likely happy to order it for you if you pay cash...

jwenting 1,905 duckman Team Colleague

sounds typical of office buildings across Europe, Jim...
Of course the managers, HR, and facilities management always get their own floor with real offices, indicating their special status in the company as compared to the worker bees.

jwenting 1,905 duckman Team Colleague

Snow, deer and mountains make a Jeep 4x4 about the best thing to drive.

hmm, my dad had one. Traded it in for a Range Rover to save on fuel and maintenance bills.
Thing uses about a quarter the fuel that Jeep did, and cheaper spares as well (in part because they don't have to be shipped from across the Atlantic I know).

I'll drive anything that agrees with my back and is affordable :)

jwenting 1,905 duckman Team Colleague

open plan offices were heavily promoted in the 1970s and '80s as being "better" than individual offices, and many companies to them like fish to water because it's much cheaper to do things that way and shift people around.

It's now been found that it's less effective than smaller rooms, with say 3-4 people to a room that work together closely. But many companies still sit in those big open plan buildings and more such buildings keep being built, except now they're marketed as "flex work environments", hailed as the next big thing where people no longer have their own desk at all, allowing the company to do away with numerous desks especially if they have a fixed percentage of remote workers (say everyone works remotely one day a week, they can now get away with 20% less floor space).

Cubicles are just a way to partition the open plan office into smaller cells. Few of the benefits of individual offices, few of the benefits of open plan as well.

jwenting 1,905 duckman Team Colleague

3 years reading this site and you
a) still don't know how to do something that basic
and
b) still don't know we're not your homework service?

sheesh

jwenting 1,905 duckman Team Colleague

the correct answer then would be "no, the data is incomplete"

jwenting 1,905 duckman Team Colleague

that's because in the matter of statistics the numbers invariably lie and often are so open for interpretation that there's no one correct answer...
To take safety with or without a gun in the house, what safety?
There might be more accidents in the house by a very small margin (depending on training of the people in the house mostly) but it can decrease the risk of being killed or seriously hurt in a burglary attempt a lot. Now, whether that latter is going to be a bigger benefit than the risk of the former depends on many factors often (almost universally, by all sides in the debate) not included in their calculations, like how likely a house is to be the target of a violent intrusion attempt, how well trained in the use of that weapon the inhabitants are, etc. etc..

With that skin cream it's far more clear cut. It either works or it doesn't for a specific skin condition (with a very small risk of allergic reactions).

So no, you can't really compare the two. Different levels of complexity entirely.

jwenting 1,905 duckman Team Colleague

the entire question makes no sense at all... "he sells at a 10% loss on the sales price", and then goes on to ask "what is the percentage loss on the purchase price". What does that even mean...
Either he sold at a sales price that's 10% under the purchase price, or he sold at 10% below the normal sales price.
First case he already has his answer, second case we can't possibly know the answer as we don't know the difference between his purchase price and his sales price.

jwenting 1,905 duckman Team Colleague

The computer stores that integer as a series of bits and bytes, iow in base 2. It's only for our own convenience as humans who're used to thinking in base 10 that most programming environments use base 10 for inputing and outputing numerical data.
To output in another base, most languages have either built in or 3rd party libraries available to do just that, no need to reinvent the wheel.

jwenting 1,905 duckman Team Colleague

so now we're getting even math homework assignments pasted here verbatim, not just programming assignments any longer?

jwenting 1,905 duckman Team Colleague

now why did I read that as "voodoo chili" and my mouth started watering :)

jwenting 1,905 duckman Team Colleague

hmm, most freelancers I've come across sit in an office in some customer's building 10+ hours a day, working harder than anyone else, for less pay than the employees, billing 8 hours at most, and just hoping that their contract will be extended...
Extreme stress, little reward.

jwenting 1,905 duckman Team Colleague

if he's like all other homework kiddos he is now waiting for someone to give him a document with a fully worked out solution where he just has to put in his own name as the author...

jwenting 1,905 duckman Team Colleague

flowchart? Didn't we replace those with interaction diagrams and things like that 20 years ago?

jwenting 1,905 duckman Team Colleague

no such thing as "senior" or "junior" years here when I was in school. Just a mild hazing of the new kids on the first few days of the school year (independent of age, always got some transfering from other schools) and after that it was all hands defend the fort together against the other school 2 blocks away (who were not averse to mild (or not so mild) vandalism, including turning over the cars of our teachers, throwing rocks at our windows, and things like that).
That went on (and got worse) for years until the school boards of both schools got together and locked the fences during recess to prevent groups of pupils from making way for the enemy stronghold (oops, school).

jwenting 1,905 duckman Team Colleague

same as any other, except you get it out of the array first.
If you don't know how to, learn about arrays...

jwenting 1,905 duckman Team Colleague

in fact, you're often better off with a job that pays a bit less but has a lot less stress. Far better for your health (both mental and physical) and thus your future.
Don't want to end up burned out and on a disability pension (or worse, social security) because you find it impossible to work the ratrace under the incredible pressure of the "top job" with the "big name" company you thought was such a dream come true.

jwenting 1,905 duckman Team Colleague

you set your sights pretty high and narrow. Unless you're far better than most people (and you almost certainly aren't) you can forget about being hired by those companies.

Just look at the job openings on Monster and other career sites, contact some recruiters, send out resumes, and see what you can get locally.
Forget about being hired by the likes of Google and Amazon, ain't gonna happen if you have to ask what you're asking.

jwenting 1,905 duckman Team Colleague

hmm, Disney Star Wars... Hannah Montana meets a tribe of dancing Jar Jar Binks and they sing Kumbaya together while the planet explodes around them, only to be saved at the last second by Han Solo flying by in a shining white space ship that runs on moonbeams and leaves a rainbow trail as it goes into hyperspace.

jwenting 1,905 duckman Team Colleague

it's "plz hlp mi". Be sure to get your question title right next time.

jwenting 1,905 duckman Team Colleague

or the filename. MacOS is case sensitive, so is Java, so make sure the filename is correct.

jwenting 1,905 duckman Team Colleague

it doesn't handle negative grades...

JeffGrigg commented: Yes; that's what we needed to know. +6
jwenting 1,905 duckman Team Colleague

@moaz, you might want to learn to be polite to people. It often helps to get help from them...
You might also learn to think for yourself, it helps you not need to ask for help so often.

And of course you might learn to search for information yourself, helps a lot too.
You can download the API docs (or reference them online) from the same place you can download the JDK...

jwenting 1,905 duckman Team Colleague

well, the compiler can throw Exceptions and crash ;)

jwenting 1,905 duckman Team Colleague

Seen them used in some companies as flashy accessoiries in demo rooms and reception desks.
Tried one even, was indeed highly uncomfortable.
Ramming your fingers down on a hard surface with no tactile feedback you get from a real keyboard doesn't make for a nice typing experience.
But it looks good, high wow factor, which makes them ideal for product presentations and impressing visitors in "high tech campusses".

jwenting 1,905 duckman Team Colleague

no, we're not going to help you to pirated books and other stolen property.

jwenting 1,905 duckman Team Colleague

books about core concepts are ok. Swing isn't changing much, and hasn't changed much in years, so a book is good.

The main problem with books is books about The Next Big Thing (tm)(r) as such things tend to not last long enough for books to be written about them that are more than rubbish before the hype blows over.

jwenting 1,905 duckman Team Colleague

A big part of making websites is creativity. You're showing that you're not creative, not a good start...

Anyone can learn to hack some html together. It's the rest, which you want us to come up with for you, that's the part that sets the amateurs apart from the professionals...

jwenting 1,905 duckman Team Colleague

it's not cultural rejection, it's political rejection. It stems from the same reason as the call for "population control", the wish to massively reduce the population of the planet.
And what better way to do that than to cause famine, and prevent diseases from being cured...
That's also why DDT (which is perfectly safe) had to go.

jwenting 1,905 duckman Team Colleague

It's impossible to answer that question without knowing the level of technology available to those people as well as a lot of other things.
A nomadic hunter-gatherer society needs a lot of room per person, a society employing industrial scale agriculture with high yield crops, field rotation, efficient water recycling systems, intensive animal husbandry, etc. etc. needs far less.

That's one big reason why the current world population has more food per person available (on average) despite being far larger than what was estimated would lead to perpetual famine just a few decades ago (another reason is that the people coming up with the estimate were deliberately alarmist, their very agenda being one of forced depopulation of the world down to a few hundred million, they're still at it to this day).

jwenting 1,905 duckman Team Colleague

The page says exactly what it is...

Which translates into human readable text as: the dot product gives the distance between points in space.
In this case that's the distance between a point and a plane.

jwenting 1,905 duckman Team Colleague

What we are going to see, and soon, is far more control over the internet by governments, far more restrictions on what you can do there, with eventually entire countries being unable to communicate with entire other countries.
Think the Great Firewall of China erected around every country or group of countries, active and passive censorship (all in the name of "protecting morality", "fighting terrorism", "stopping bullying", "preventing muslims from getting upset", etc. etc.).

That's going to affect everyone, obviously. The spread of information around the world we've come to expect and rely on will slow to a crawl, what is spread becoming seen as just government propaganda, and peoples and countries will end up as isolated as they were in the 1950s.

almostbob commented: You are right, and I hate that you are right, I like seeing everything I can think to look at +0
jwenting 1,905 duckman Team Colleague

Corporatization/monopolization of the internet -> this has already started but I expect in 5 years most uses of the internet will be dominated by a single company, and there will be far fewer start-ups.

They've been saying that for 20 years...

Possibly Quantum computing (hard to know if that is 5 or 20 years) from large-scale adoption.

Same

I suspect some more professionalization of programming (eg. self-regulating accreditation bodies like doctors and lawyers)

nope. Those are just government granted monopolies to lobby groups.
Doesn't work in an international context.
And as I can hire programmers in Uzbekistan to do my work for me if the ones in my home country are too expensive because a labour union demands they pay tens of thousands of dollars to get a permit from them to do their job, that's exactly what's going to happen (and that's exactly what most all "professional licensing" amounts to).

Probably more secrecy since the US patent system is becoming more strict about what algorithms/software is patentable.

That's been going on for decades as well. In fact in many countries it's illegal to use any encryption at all. And in other countries it's illegal to ship any encryption code to other countries (and/or you need a government license to use such code).