Quantcast
Channel: User Dan Armstrong - Stack Overflow
Browsing all 37 articles
Browse latest View live

Comment by Dan Armstrong on Unable to Execute a sql query on java using jdbc

Please, for the love of humanity, print stack traces or log your exceptions: e.printStackTrace(System.err);

View Article



Comment by Dan Armstrong on how do i make a JPanel background that won't update?

Do you get your desired effect if you override repaint to be an empty method and call update directly?

View Article

Comment by Dan Armstrong on Java Count the x's in a given string recusively

If you pass an empty string to this version, bad things will happen because the base case assumes at least one character.

View Article

Comment by Dan Armstrong on Java Count the x's in a given string recusively

Number 1 and 2 checked string length incorrectly, fixed. I was trying to take it iteratively away from your original code to then show other options. Just examples I typed - did you actually run these?

View Article

Comment by Dan Armstrong on Java method naming for boolean methods and...

has is not a valid prefix. Options are is or get. Possible duplicate: stackoverflow.com/questions/799280/…

View Article


Comment by Dan Armstrong on How does that for loop doesn't goes out of bounds...

The loop condition j < v.length is checked before each iteration of the for loop. So it is out of bounds and just ignored.

View Article

Comment by Dan Armstrong on Maven: download artifact and its deps to a...

Thank you. This approach works perfectly for us. Using dependency:copy to get the POM unlocks it.

View Article

Comment by Dan Armstrong on Should I do `Thread.currentThread().interrupt()`...

@IbrahimArief Use initCause(...). Three lines but it gets the job done: InterruptedIOException ioExc = new InterruptedIOException(); ioExc.initCause(e); throw ioExc;

View Article


Comment by Dan Armstrong on Simultaneously deploy artifact to Maven Central...

It's six years later, and I'm facing this same exact issue. If I find a solution elsewhere, I'll link it here.

View Article


Comment by Dan Armstrong on Building .war file using maven. Missing files and...

Please note the slight typo in this answer: the webapp folder should be src/main/webapp

View Article

Comment by Dan Armstrong on Division in postgres

This was long ago answered, but the cause of your syntax error is missing first "select": SELECT (SELECT COUNT(*) FROM Author as decimal)/(SELECT COUNT(*) FROM Paper);

View Article

Comment by Dan Armstrong on Maven - activate profile based on project property

As of Maven 3.9.0, "packaging" may also be used as a property for activation: maven.apache.org/guides/introduction/…

View Article

Answer by Dan Armstrong for im trying to load a grid view ,a tree , and 3...

Please consider providing a minimal working example of the problem. It's hard to give specific solutions to general statements.I know you referenced GlassFish and sessions, so you clearly have a server...

View Article


Answer by Dan Armstrong for Migrating over 3mill of data to MongoDB

MySQL supports cursors to fetch smaller amounts of a query in batches to save memory:https://dev.mysql.com/doc/refman/5.7/en/declare-cursor.htmlhttps://dev.mysql.com/doc/refman/5.7/en/fetch.htmlPlease...

View Article

Answer by Dan Armstrong for Generate jar for java 6 target using java 8 with ant

That warning can be ignored. It is warning you that you might accidentally use Java 1.8 APIs even when compiling for Java 1.6.To compile against the Java 1.6 APIs (getting more assurance of...

View Article


Answer by Dan Armstrong for Detecting specific frequencies/tones in raw audio...

Run the samples through a Fast Fourier Transform, matching to your expected frequencies within a certain tolerance, then count number of samples between when not matching?

View Article

Answer by Dan Armstrong for Good or bad database design

"better" is subjective, but there is no point in an auto-generated ID when there is already a naturally unique and reasonably short value. Make the codes the primary key and avoid the auto-generated IDs.

View Article


Answer by Dan Armstrong for what is Parse Error in css?

You have an extra closing curly brace:.boxed { width: 300px; border: 2px solid black; padding: 10px; margin: 70px; transform: translateX(120%) translateY(-5%);} }input.button { width: 100%; height:...

View Article

Answer by Dan Armstrong for spike in classes loaded, cpu, and threads in...

Did you deploy a new version of an application? You also have high garbage collection at that time as well as not many classes unloaded. It is possible your application cannot be unloaded correctly and...

View Article

Answer by Dan Armstrong for How to make HTTPS post request in Java?

Java is not able to verify the validity of the SSL certificate on the https server. It is either self-signed or signed by a certificate authority not known to the Java runtime.Your options are to...

View Article
Browsing all 37 articles
Browse latest View live




Latest Images