BIM项目中一些高可用代码
来源:互联网 发布:ubuntu安装python2.7 编辑:程序博客网 时间:2024/06/06 01:16
1.页面显示内存使用情况
<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>JVM memory</title></head><body><%double total = (Runtime.getRuntime().totalMemory()) / (1024.0 * 1024);double max = (Runtime.getRuntime().maxMemory()) / (1024.0 * 1024);double free = (Runtime.getRuntime().freeMemory()) / (1024.0 * 1024);out.println("Java 虚拟机试图使用的最大内存量(当前JVM的最大可用内存)maxMemory(): " + max + "MB<br/>");out.println("Java 虚拟机中的内存总量(当前JVM占用的内存总数)totalMemory(): " + total + "MB<br/>");out.println("Java 虚拟机中的空闲内存量(当前JVM空闲内存)freeMemory(): " + free + "MB<br/>");out.println("JVM实际可用内存: " + (max - total + free) + "MB<br/>");%></body></html>
2.通用action配置
<action name="*_*_*_*" class="{1}Action" method="{2}"><result name="success">pages/{3}/{4}.jsp</result><result name="error">pages/{3}/{4}.jsp</result><result name="toquery" type="redirect">{4}.action</result><result name="noprivilege">pages/login/noPrivilege.jsp</result></action><action name="*_*" class="{1}Action" method="{2}"></action><action name="*.*.*" class="{1}Action" method="{2}"><result name="success">pages/{3}.jsp</result><result name="error">pages/{3}.jsp</result><result name="toindex">/pages/login/goPortal.jsp</result></action>
3.ArrayUtil
public static Object[] unionArray(Object[] array1, Object[] array2, Object[] array3){List<Object> tempList = new ArrayList<Object>();for(int i=0; i<array1.length; i++){tempList.add(array1[i]);}for(int i=0; i<array2.length; i++){tempList.add(array2[i]);}for(int i=0; i<array3.length; i++){tempList.add(array3[i]);}return tempList.toArray();}public static Object[] unionArray(Object[] array1, Object[] array2){List<Object> tempList = new ArrayList<Object>();for(int i=0; i<array1.length; i++){tempList.add(array1[i]);}for(int i=0; i<array2.length; i++){tempList.add(array2[i]);}return tempList.toArray();}public static Object[] insertNullObject(Object[] arr){List<Object> objectList = new ArrayList<Object>();for(int i=0; i<arr.length; i++){objectList.add(arr[i]);objectList.add("");}return objectList.toArray();}
阅读全文
0 0
- BIM项目中一些高可用代码
- 代码规范和Android项目中的一些可用工具
- 代码规范和Android项目中的一些可用工具
- 代码规范和Android项目中的一些可用工具
- 代码规范和Android项目中的一些可用工具
- 道路养护信息统计中可用的一些代码
- BIM工程代码分析
- BIM中IFC介绍
- 在项目中写一些冗余代码
- 一些不错的Redis高可用方案
- 高可用的一些思考和理解
- 高可用的一些思考和理解
- 高可用的一些思考和理解
- 信息化项目的高可用方案
- 如何修改BIM中数据类型?
- hadoop 高可用中journal 的作用
- 分享对BIM的一些理解
- 一些项目和代码
- QStandardItemModel的用法
- Linux系统运维工程该具备哪些素质
- linux中find命令的使用
- XYNUOJ 1246 Repair the Wall —贪心算法
- 【Oracle】rollup函数
- BIM项目中一些高可用代码
- 300W数据集测试MTCNN的landmark效果代码
- ajax之前loading
- c++的问题
- 进程间通信-创建管道实现机制
- WebService的知识总结(一)
- php后端强制前端下载文件
- adb shell 工具
- java中的xml操作