
java开发部分
谁对谁错重要吗
只有坚持不懈的努力,才能换来更广阔的天空,一起加油
展开
-
double类型四舍五入方法
private double method(double d) { BigDecimal b = new BigDecimal(d); d = b.setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue(); return d; }原创 2018-05-18 12:22:48 · 515 阅读 · 0 评论 -
获取数组最大值和下标
/** * 获取数组最大值和下标 * @param x * @param y * @return */ private double peakCenterResult(double[] x, double[] y) { double peakCenter; ArrayList<Double> darraylist=new ArrayList<...原创 2018-05-18 12:23:34 · 1236 阅读 · 0 评论 -
判断输入的是否是数字
public boolean isNumeric(String str){ Pattern pattern = Pattern.compile("[0-9]*"); Matcher isNum = pattern.matcher(str); if( !isNum.matches() ){ return false; ...原创 2018-05-18 12:24:08 · 560 阅读 · 0 评论 -
网页访问统计帮助类
//获取网页流量的统计ServletContext context = getServletContext(); Integer count = null; synchronized(context) { count = (Integer) context.getAttribute("counter"); ...原创 2018-05-18 12:24:52 · 165 阅读 · 0 评论