• 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
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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: 7631
177
  • 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?
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic