Robert James Liguori

+ Follow
since Nov 27, 2007
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Robert James Liguori

This gets me to have SSL always...

But I need to know how to set up the certs!

I was given two .crt files and a .key file.

What do I do?  Can I assign the cert from the admin console?

I'm clueless here, please help.

6 years ago
Just wondering if anyone can find the seventh Liguori Prime?!?  

I discovered the first six with Java code here:

How do I configure SSL and Glassfish on AWS?


I get this: Ñ‚Ñ�Ñ�Ñ for my russian translation...

How can I support russian characters on the web page?  I'm using primefaces and I don't know where the issue is broke (Java, JSF, HTML, Firefox, etc).

7 years ago
I got it to work with this:

7 years ago
The following method grabs state from inputText components, but not from selectOneListbox components.

Please advise.

7 years ago

Norm Radder wrote:An observation: The discussion sounds like a how a Locale would be used.  A set of values that depend on ....

I'm still learning here... but apparently, the dry air constant isn't really a constant... so I made way to allow for changing the Molecular Mass in the Air by supporting a DryAir class...

However, this still doesn't resolved who and how the values for the volume ratios are set.

-- Robert
7 years ago

Paul Clapham wrote:I don't think this is a Java programming problem at all. It's a design problem. Like, you've got the opinions of four organizations about what the value should be for this constant and you want to use the constant in your application. So, are you going to ask the user which one they'd like to use? Or are you going to choose one and tell the user which one you're using? Or is there a rule that says that Version X should be used by engineers in Country Y because it's a professional standard there and you want to accommodate that? Or what?

... right, well said, thank you... so you see why I'm epically confused here.  This isn't helping:
7 years ago
Thanks norm... from my blog...

So I've been working on air density equations that use the dry air constant.

Since I'm working with Java I set this up simply like this...

Quite beautiful and simple, right?  No, wrong!

Since the constant is made up of gases... the overall 'constant' can be different based on location.  I discovered this eventually by trying to figure out why different air density calculators were giving different results.  For example:

Dry Air Gas Constant of 286.9 from The Engineering Toolbox
Dry Air Gas Constant of 287.22 from Peace Software
Dry Air Gas Constant of 287.05 from Brisbane Hot Air Ballooning
Dry Air Gas Constant of 287.058 from Wikipedia

So with all this being said, how do I implement my code?!? I gander there are a few options...

Constant/non-constant Option 1
OPTION: I could just create constants for each known location...

PROBLEM: However, I don't think this would work as it may not be practical to keep doing coding changes for locations, and what if the values at those locations change?  (you can't dynamically change a final constant).

Constant/non-constant Option 2
OPTION: I could set the code up with getters/setters to allow for the changing of the 'constant' :

PROBLEM: The desire is to have the utility available as a Java utility class, and getters/setters do not support this model.

Constant/non-constant Option 3
OPTION: perhaps I could enumerate the constants, and associate the values after the fact.

PROBLEM:  The code would still be subject to adding and modifying regional values.

Constant/non-constant Option 4
OPTION: I could utilize a web service that queries the dry air gas constant via location.  

PROBLEM: This seems to be the best approach, but such a thing does not exist

Constant/non-constant Option  5
OPTION: Since all the constants are very close in value... only provide one and let the user deal with difference in results from there desired value of which they cannot set.

PROBLEM: The result would not be accurate/precise.

Constant/non-constant Option  6
OPTION: Allow the user to pass into the methods as an argument, the desired constant value.

PROBLEM: Uh yeah, why would someone pass a 'constant' into a method?!?  Well, if you followed the post, this is apparently thee time you'd want to... and probably what makes the most sense.

Do you have other suggestions?  I posted this question to CodeRanch... let's see what those guys and gals have to say.

7 years ago
I love the CodeRanch, cause you guys always help me when I'm in a pickle... like I am here...

How do I code up constants that are not really constants?

Reference:  When a constant should be passed into a method -
7 years ago
JAirDensity is a Java utility class that determines air density from temperature, air pressure and dewpoint.  The source code for JAirDensity is available on GitHub;

It would be nice to have more developers maturing/refining/improving the utility class.  

Note: The utility is complete for dry air density and humid air density, but addition methods, algorithms, and tests can be added... such things will be identified in the issues.

7 years ago
Please consider purchasing my book, this will give me incentive to write more books:

Java 8 Pocket Guide: Instant Help for Java Programmers
7 years ago
So, with Java, I auto tweet the news and hashtag the first word:

I'd like to find the most trending word in the sentence/title and hashtag that instead.

Any ideas how this can be done?