M Burke

Ranch Hand
+ Follow
since Jun 25, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by M Burke

I do have one more question. Do I need these statements?

formatter.setTimeZone(TimeZone.getTimeZone("UTC"));  

paramCal.setTimeZone(TimeZone.getTimeZone("UTC"));
1 year ago

Jesse Silverman wrote:

M Burke wrote:...

Yes Jesse, that worked. Thank you. I am on Java 7



Yikes!!  I wouldn't recommend going to JODA date/time just to avoid Calendar/Date then, tho some would.

For curiosity's sake, since a lot of people like saying at Conferences, "I think we can ALL agree everyone is using at least Java 8, now" with a grin, do you have specific dependencies blocking you from Java 8 or just "Time, time!"??  I've been working to make Java 11 my "new normal" before Java 17 comes crashing down on us...



The app is 10 years old and runs on JBoss 6. Companies do keep apps for a long time. They are expensive and if the app is not broken they don't feel compelled to replace it.
1 year ago

Jesse Silverman wrote:Tho attempting to avoid Calendar in all new code I write, I note the following from SimpleDateFormat JavaDocs:

H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12


Do you see what I see?
Would changing to:
"yyyy-MM-dd HH:mm:ss" help cure what is ailing you?



Yes Jesse, that worked. Thank you. I am on Java 7
1 year ago
Hi,
My program gets a string that is already in UTC format. I need to convert it to a calendar object so I can compare it to the server time. I then compare the two in milliseconds and they are way off. But not all the time. Only when the server time passes 12:00.

Since the input string is already in UTC format, I expect the same value to be printed by the Calendar object. But it doesn't.

Sample input:
2021-09-01 12:11:10

The output looks like this
Sep 01 00:11:10 UTC 2021

1 year ago
Well, I got it working. I added a plugin to the pom. When I look at the compiled jar there are no entries in the manifest. I downloaded the Jackson libs and added then to the class path earlier.

I am not sure why this worked.

2 years ago
Is is possible to include the library in the compiled jar? It would be good if this thing will run stand alone.
2 years ago
Hi, I am having trouble with a runnable jar not finding an external library. The library is Jackson. It's in my pom file so it compiles. But when I go to run the jar it gives me a "cannot be found" error. How do I make the library visible to the jar?
2 years ago
I am a bit confused by the responses.


I will try to give an example. For the Java Map interface, there are several choices. HashMap, HashBitMap, ArrayLIstMiltimap, LinkedHashMap, and TreeMap. There are also thread safe versions. So in a short list, I need a description of each one and be able to compare and contrast them to decide which is the best to use in a given situation.

3 years ago
Is there a source out on the Web that lists the similarities, differences and best practices for collection classes? Like, TreeMap vs. HashMap and when best to use.
3 years ago
I took a video course in Network Architecture once. I am lucky I can even remember doing it. The content went in one ear and out the other. I also find it takes longer for someone to explain something than for me to just read it.
4 years ago
Recently I was tasked to learn React. I have used Java & C++ tech for years so I thought, "Not big deal, just another framework". I noticed there is a whole host of video based tutorials on YouTube, so I thought I would give them a try. So I went thorough one of them, twice. I followed along and understood what the lecturer was teaching...so I thought. Once I was done I tried to code a POC based on one of my current apps. I sat down, started a project...and my mind went blank. It's like the part of my brain that understood the video lecture is not the same part I use to code. So now, I went back to the traditional method, I am reading a book and coding the examples. It seems to work better. I wonder if anyone else has experienced this.  I have not been able to find anything online that confirms my suspicion that the brain is specialized in such a way that some parts get used more than others depending on the learning method and task.
4 years ago
Yes, I see online that React and Java don't play well together. Some people are trying to use Spring boot but it's painful. I find React frustrating, it's so different from anything else I have experience with. The learning curve is huge.
4 years ago
I took a tutorial in React. It seems it runs in it's only little world outside of an application server and the only way it can get data is with AJAX-REST calls. I am looking to re skin and application with a new front end, but keep the JEE backend intact. Management in my company is pushing React, so how can I make this work? When a user logs in, there is a lot of data structures loaded into the session and it would be impractical to load all of that in a browser.
4 years ago
I have coded in Java for a long time. But of course, one does not use all the features all the time, so I am rusty. I don't need a long "how to" explanation of the language, I just need to refresh my skills. Any suggestions?
4 years ago
So when the X Y coordinates are set they are based on where the element would be placed without positioning?