• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Average Karma

 
Greenhorn
Posts: 24
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

The average of the karma doesn't show right away. I always try to clean the cache and cookies of the browser, I also login and log out several times, etc..and nothing, it always show the last vote instead of the average. Only, if I run again the project in eclipse again it updates the average (number of stars). For example, if the post already had 2 votes, and then, another user votes 5, the stars become 5 instead of 4 stars. Do you know what is happening?

Thanks.
 
Jackie Bermudez
Greenhorn
Posts: 24
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't resolved this. However, I would like to know how I can get the average in decimals ${post.karma.karmaPoints}

Original code:


So, what I'm doing in order to get the decimals, I removed the Math.round; however, the result is always with an integer, no decimals.

Thank you!
 
Saloon Keeper
Posts: 7073
165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you checked that resultset.getDouble actually returns a non-integer value?
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic