This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

Ron McLeod

Saloon Keeper
+ Follow
since Feb 12, 2013
Ron likes ...
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
Richmond, BC, Canada
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 Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt Green check
expand Greenhorn Scavenger Hunt

Recent posts by Ron McLeod

Kevin Dean wrote:The problem comes when I comment out the @Resource annotation on the dataDirectory property

Are you commenting-out the entry in the server.xml file or the @Resource annotation in your Java code?
4 days ago

Miroslav Lehotsky wrote:Compiles fine also for me... Aren't you using JDK 1.7 or older by accident ?

Miroslav brings up a good point.  Which version of Java are you using?

RoderickFuentes Ramos wrote: It have compiler errors in lines 8,9,10 and 13.

It would be helpful if you would share the error text reported by the compiler (copy and paste the text only - not a screen image).

Monica Shiralkar wrote:Using that I can see the total number of cows but not that which post has been given the cow for.

It sound like you didn't follow the last step.  Click on the Cows count (the actual number) and you will be taken to a list of topics (in table form) in which you were awarded one or more cows.  Click on the topic name (it is a link), and you will be taken to the thread.  

From there, it will be a manual effort to determine exactly which post gained you the cows (usually it is the first post which receives the cows).

1 week ago

Monica Shiralkar do one know that which post exactly has given us a Cow?

1. Select My Profile from the menu at the top of the page
2. Click on view public profile in the upper right-hand area
3. Click on the Cows count on that page (the actual number)


1. Click on your name in the upper left-hand area of any post of yours
2. Click on the Cows count on that page
1 week ago

Rish Dave wrote:What will this command [line] do?

Why not give it a try and see what happens?

    cat    will concatenate the contents of a number of files (if more than one is specified), and then print the contents to standard output
      >    will cause the output of a command (which would normally go to standard output) to be redirected to a file

1 week ago

Serban Cameron wrote:Is it correct how I tried to connect through the proxy and authenticate?

Can you share the code where you are actually trying to connect?
1 week ago

Mike Simmons wrote:And we can also point to standard Java's Map.Entry as a typed tuple.

Sorry .. I missed that comment in one of your previous post
2 weeks ago

Piet Souris wrote:We have the javafx.util.Pair<K, V> class that I use regularly.

Mike Simmons wrote:That's not in the JDK though.

I suppose that java.util.Map.Entry and java.util.AbstractMap.SimpleEntry could be used to represent a 2-tuple (and are included in the JDK)
2 weeks ago
After over a year's lapse, we decided to re-invent the Journal.  It is now an "editor's picks" format brought to you by the staff of JavaRanch.  Read what your favorite moderators think is hot!

  • September 2019 Journal
  • August 2019 Journal
  • July 2019 Journal
  • June 2019 Journal
  • May 2019 Journal
  • April 2019 Journal
  • March 2019 Journal
  • February 2019 Journal
  • January 2019 Journal

  • 2018
  • December 2018 Journal
  • November 2018 Journal
  • October 2018 Journal
  • September 2018 Journal
  • August 2018 Journal
  • July 2018 Journal
  • June 2018 Journal
  • April 2018 Journal
  • March 2018 Journal
  • February 2018 Journal

  • 2017
  • December 2017 Journal
  • November 2017 Journal
  • October 2017 Journal
  • September 2017 Journal
  • August 2017 Journal
  • July 2017 Journal
  • June 2017 Journal
  • May 2017 Journal
  • April 2017 Journal
  • March 2017 Journal
  • February 2017 Journal
  • January 2017 Journal

  • 2016
  • November 2016 Journal
  • October 2016 Journal
  • September 2016 Journal
  • August 2016 Journal
  • July 2016 Journal
  • May 2016 Journal
  • April 2016 Journal
  • March 2016 Journal
  • February 2016 Journal
  • January 2016 Journal

  • 2015
  • October 2015 Journal
  • July 2015 Journal
  • May 2015 Journal
  • April 2015 Journal
  • February 2015 Journal
  • January 2015 Journal

  • 2014
  • December 2014 Journal
  • October 2014 Journal
  • July 2014 Journal
  • June 2014 Journal
  • May 2014 Journal
  • April 2014 Journal
  • March 2014 Journal
  • February 2014 Journal
  • January 2014 Journal

  • 2013
  • December 2013 Journal
  • October 2013 Journal
  • September 2013 Journal
  • August 2013 Journal
  • July 2013 Journal
  • January 2013 Journal

  • 2012
  • September 2012 Journal
  • August 2012 Journal
  • July 2012 Journal
  • June 2012 Journal
  • March 2012 Journal
  • February 2012 Journal
  • January 2012 Journal

  • 2011
  • October 2011 Journal
  • August 2011 Journal
  • July 2011 Journal
  • June 2011 Journal
  • May 2011 Journal
  • April 2011 Journal
  • March 2011 Journal
  • February 2011 Journal
  • January 2011 Journal

  • 2010
  • December 2010 Journal
  • November 2010 Journal
  • October 2010 Journal
  • September 2010 Journal
  • August 2010 Journal
  • July 2010 Journal
  • June 2010 Journal

  • 2009 and earlier Journals
    2 weeks ago

    T h e . C o d e R a n c h . J o u r n a l  -  S e p t e m b e r . 2 0 1 9 . E d i t i o n

    A big howdy from all the CodeRanch staff, and welcome to the September edition of the CodeRanch Journal.

    N e w . a t . C o d e r a n c h
    New Forums
    Keep an eye on these new forums:
  • Quantum Computing
  • Reactive Progamming

  • Forum Features
  • Devaka brings us a new feature to help make forum watching even better: Get a notification when a thread has not been updated

  • I n t e r e s t i n g . C o d e R a n c h . F o r u m . P o s t s
    Here's some threads from this month that are worth giving a read:
  • Refactoring Exercise: An example
  • Why is "how are you" asked when the reply is always "I am fine" even if not so?
  • Is it acceptable to have long names for variable?
  • Everything's broke and nothing works?

  • Thanks to Junilu Lacar, Satyaprakash Joshii, Monica Shiralkar, and Joe Ess for starting these topics and everyone else that joined in for the discussions.

    B o o k . P r o m o t i o n s
    There's a book (or software) promotion just about every week at CodeRanch. Just ask a question in the appropriate forum and you're eligible to win a copy of the book (or license).
    Check the book promotions schedule.

    Upcoming promotions in October:
  • Graph Algorithms: Practical Examples in Apache Spark and Neo4j
         Mark Needham and Amy E. Hodler
         Learn how graph algorithms can help you leverage relationships within
         your data to develop intelligent solutions and enhance your machine learning models

  • Programming Quantum Computers: Essential Algorithms and Code Samples
         Eric R. Johnston, Nic Harrigan, and Mercedes Gimeno-Segovia
         Quantum computers are poised to kick-start a new computing revolution—and
         you can join in right away.

  • Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams
         Adam L. Davis
         Get an easy introduction to reactive streams in Java to handle concurrency, data streams,
         and the propagation of change in today's applications.

  • This month's book promotion winners:
  • The Java Module System
  • OCP Oracle Certified Professional Java SE 11 Programmer I Exam Fundamentals 1Z0-815

  • And a big Congratulations to our past Winners

    T h e . M o o s e . i s . L o o s e . o n . S o c i a l . M e d i a
    The CodeRanch announces latest news/developments frequently on our social media outlets. You can find us at:
  • Twitter:
  • Facebook:

  • Follow / Like us so you don't miss a thing.

    O u r . S t a f f
    Thanks to all staff that volunteer their time and share their knowledge to make this site the friendliest place on the web to learn.  A special thanks this month to the following members ...
  • Marshals: Campbell Ritchie · Liutauras Vilda · Tim Cooke · Jeanne Boyarsky · Bear Bibeault
  • Sheriffs: Knute Snortum · Paul Wheaton · Devaka Cooray
  • Saloon Keepers: Tim Moores · Stephan van Hulst · Ron McLeod · Piet Souris · Ganesh Patekar
  • Bartenders: Tim Holloway · Carey Brown · Salvin Francis

  • A b o u t . T h e . E d i t o r
    Ron McLeod has been a member of CodeRanch since 2013 and a Moderator since 2015.

    S u g g e s t i o n s / F e e d b a c k
    If you have any feedback on this month's journal then feel free to create a topic in our Ranch-Office

    J o u r n a l . A r c h i v e
    Our previously published journals are available online at Java-Ranch-Journal
    2 weeks ago
    In addition to be notified when there is activity on a thread, you can now be notified when there has been no activity with the thread.

    To activate this, go to the thread that you want to watch, and click the Watch Settings button near the top of the screen.

    The first checkbox is for the normal watch action - notifying you when when there has been a reply to the thread.

    The second checkbox is is for the new feature - notifying you when when there has been no activity with the thread for a specified number of day.

    2 weeks ago
    Yup -- looks like a case of old and/or sleep-deprived brain.  This is what gave me the idea that it was a combination of high/low temps for the day  

    2 weeks ago
    ... or is 26 the day of the month?  Maybe it's me that has the problem  
    2 weeks ago
    I saw this on my phone this morning - current temperature 26°C (79°F) - wow, pretty warm for the beginning of fall in Vancouver.

    Turns-out Seems like that rather than showing me the current temperature, the weather widget is showing me the sum of today's high (16°C) and low (10°C) temperatures
    2 weeks ago

    Calvin Dobson wrote:So I've been using Tomcat to try to host a websocket server ... but all this does is give me some 302 or 404 message.

    I would first try and figure out why the inconsistent result codes.  Why a redirect some times and a not found other times?

    I took your code and ran it as-is under Tomee 7.1.0 (Tomcat 8.5).  I was able to reliably establish a websocket connection (onError was trigger by me abruptly closing the connection by aborting curl - exception was:\home\micheal\someone\outlog (The system cannot find the path specified)).

    Test from command line using curl:
    Tomcat Console:
    2 weeks ago