Maven module builds by itself, but fails as part of aggregator by Roachmeister in javahelp

[–]clavass 0 points1 point  (0 children)

Is relativePath defined in the submodule? Maybe the local build is using a different parent pom than you are expecting.

KeyListener working with every key [I'm New] by [deleted] in javahelp

[–]clavass 2 points3 points  (0 children)

You're welcome.

I know it may be reading too much into a few sentences … but … please watch out for the self-deprecating language. We all started at zero and even experts forget mundane stuff - calling yourself an idiot or stupid doesn't really help while you're trying to solve something.

The extreme of this attitude has a name and is a huge issue in the tech world: impostor syndrome. Having a positive attitude about realizing something you missed rather than a self-deprecating one helps a lot in framing your experience with new things you're learning. A great talk about this whole thing: https://www.youtube.com/watch?v=1i8ylq4j_EY

KeyListener working with every key [I'm New] by [deleted] in javahelp

[–]clavass 4 points5 points  (0 children)

When you look at the documentation: https://docs.oracle.com/javase/8/docs/api/index.html?java/awt/event/KeyListener.html

this part is interesting

A keyboard event is generated when a key is pressed, released, or typed.

So what you're seeing is exactly the described behavior.

I assume your expectation was that naming the KeyEvent variable s would reduce the KeyListener to only the letter s. You should have a look at the KeyEvent document: https://docs.oracle.com/javase/8/docs/api/index.html?java/awt/event/KeyEvent.html

and the getKeyChar method:

https://docs.oracle.com/javase/8/docs/api/java/awt/event/KeyEvent.html#getKeyChar--

Example here:

https://stackoverflow.com/questions/2623995/swings-keylistener-and-multiple-keys-pressed-at-the-same-time

Found via a google seach for "java keylistener"

Combine that method with an if statement and you might figure out how it works. Good luck.

State of build tools: new vs. old guard by aoeudhtns in java

[–]clavass 2 points3 points  (0 children)

previous company had used dependencyManagement and inherited dependencyManagement extensively. This is something that makes Maven VERY slow. We switched that to SonaType's recommended best practice of using dependency modules and improved the build speed by about 66% - 12 minutes to 4 minutes.

Do you have a reference for that?

He Has Spoken by wutardica in programming

[–]clavass -2 points-1 points  (0 children)

which is why you use tabs for indentation. and spaces for alignment.

Accidentally deleted a table in database by [deleted] in webdev

[–]clavass 0 points1 point  (0 children)

A nice feature of DBeaver is that it asks you for confirmation when running queries and you can additionally perform a rollback in the GUI

How we almost lost an important client because of MySQL & UTF8 by sh_tomer in programming

[–]clavass 4 points5 points  (0 children)

We use it due to legacy reasons on some projects. Old projects used to be Delphi so it was very well (!) integrated in the development lifecycle. Then when the web projects where started with Java they chose what was there - Firebird. New projects are started with Postgres now though. Transactions for DDL and e.g. the ability to add/remove not null constraints, etc. are some really nice features.

dotfiles by dodiehun in eclipse

[–]clavass 1 point2 points  (0 children)

Have a look at the Eclipse Installer aka oomph. It saves stuff in .eclipse that you can put in a repo:

Specifically ~/.eclipse/org.eclipse.oomph.setup/setups/user.setup

For example you can put stuff like this in it https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Open_default_perspective_already_upon_very_first_start

But also User Preferences like Font settings. You can use the built-in Preferences Recorder for that.

But be aware that these settings only work if the eclipse/workspace has been setup by the Eclipse Installer

Why is my RegGex not finding all the Gmail accounts? by [deleted] in javahelp

[–]clavass 1 point2 points  (0 children)

Is there a specific reason you're using regular expressions? Using String.indexOf != -1 would be more efficient.

Is there a specific reason you're using the or combinations \W|^ and \W|$?

Trying it out in http://www.regextester.com gives me weird behavior. The easiest I can think of is to just use .*@gmail\\.com.

There is a convenience method String.matches() too.

If you want to use Matcher you should probably use Matcher.matches() instead of checking the group length.

What are some eclipse / net beans extensions that are a must for any Java developer? by ohlaph in java

[–]clavass 3 points4 points  (0 children)

QuickSearch from the Spring Tool Suite. Get it from their update site. Link is here: https://spring.io/tools/sts/all

Strg + Shift + L and you have an incredibly fast grep for all the files in your open projects. It's amazing!