Skip to content

Instantly share code, notes, and snippets.

@sunilsoni
Last active December 18, 2015 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunilsoni/5787240 to your computer and use it in GitHub Desktop.
Save sunilsoni/5787240 to your computer and use it in GitHub Desktop.
Useful Codes
JQuery No conflict
jQuery.noConflict();
var $j = jQuery.noConflict();
$j(document).ready(function(){
$j("div").hide();
});
Decimal Points round off
public static double round(double unrounded, int precision, int roundingMode)
{
BigDecimal bd = new BigDecimal(unrounded);
BigDecimal rounded = bd.setScale(precision, roundingMode);
return rounded.doubleValue();
}
How to Call: round(yourNumber, 3, BigDecimal.ROUND_HALF_UP);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment