`
tianyalinfeng
  • 浏览: 443150 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论
文章列表
before在每个测试方法之前都会运行一次,只需声明成public beforeclass在类中只运行一次,必须声明成public static  
ByteArrayOutputStream bo = new ByteArrayOutputStream(); ObjectOutputStream os = new ObjectOutputStream(bo); os.writeObject(obj); return bo.toByteArray(); 其中obj可以是java里的任何可序列化对象 byte流转为对象 byte[] serialize ByteArrayInputStream bis = new ByteArrayInputStream(serialize); ObjectInputStream ois = new Objec ...
1.在windows系统中cmd进入tomcat的bin目录 2.运行 service.bat install 这样即可将tomcat服务安装到系统中,即可以在系统服务(services.msc)中设置自动启动 注: service.bat文件里 set SERVICE_NAME=Tomcat7 服务名 set PR_DISPLAYNAME=Apache Tomcat 7 系统服务里显示的服务名称
File --> InputStream InputStream in = new InputStream(new FileInputStream(file));   InputStream --> File public void inputstreamtofile(InputStream ins,File file){    OutputStream os = new FileOutputStream(file);    int bytesRead = 0;    byte[] buffer = new byte[8192];    while ((bytesRe ...
  public static String getMimeType(String fileUrl) throws java.io.IOException { FileNameMap fileNameMap = URLConnection.getFileNameMap(); String type = fileNameMap.getContentTypeFor(fileUrl);   return type; }   // 上传带附件的参数: public static String uploadFile(String filePath, String id, ...
filter:alpha(opacity=50);  -moz-opacity:0.5;  -khtml-opacity: 0.5;  opacity: 0.5;  opacity: 0.5; This is the “most important” one because it is the current standard in CSS. This will work in most versions of Firefox, Safari, and Opera. This would be all you need if all browsers supported current ...
postMethod.addRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
String _cookies = getCookieStr(postMethod.getResponseHeader("Set-Cookie"));     private String getCookieStr(Header header) { StringBuilder sb = new StringBuilder(); HeaderElement[] elements = header.getElements(); for (int i = 0; i < elements.length; i++) { Header ...

常用工具

    博客分类:
  • Java
diagramdesigner 流程图  powerdesigner uml设计  yourkit_java_profiler java程序性能监测  rational rose uml设计  SharpDevelop C#轻量IDE  JetBrains PyCharm python IDE  Snagit 截图  filezilla ftp  SQLyog Enterprise mysql数据库  UM 局域网通信  HttpWatchPro IE网页数据分析  firebug 火狐网页数据分析  SetupRegexBuddyDemo 正则表达式  VisualSVN-Serve sv ...
//相对路径 String rootPath = ServletActionContext.getRequest().getContextPath(); //绝对路径 String rootPath = ServletActionContext.getServletContext().getRealPath("");   摘自:http://www.chahushequ.com
ehcache.xml中已经将overflowToDisk="true" 但当缓存数大于maxElementsInMemory时,依然没有将溢出的数据保存到硬盘 原因:如果缓存的对象要写入到硬盘中的话,则该对象必须实现了Serializable接口才行。   摘自:http://www.chahushequ.com
<s.c.r.i.p.t type="text/javas.c.r.i.p.t"> /* * 智能机浏览器版本信息: * */ var browser={ versions:function(){ var u = navigator.userAgent, app = navigator.appVersion; return {//移动终端浏览器版本信息 trident: u.indexOf('Trident') > -1, //IE内核 presto: u.indexOf('Presto') > -1, //opera内核 webKit: u.inde ...
<div id="nav" style="width:0px;height:600px;position:fixed;left:0px;"> <div id="navcontent" style="z-index:10;background:lightgreen;width:0px;height:100%;overflow:hidden;position:fixed;"></div> <div style="z-index:1;float:left;text-ali ...
background:url(../images/0419.gif) fixed;
http://www.chahushequ.com/read.bbscs?action=topic&id=2fa997433a97112e013a97367ac2000c&bid=36&fcpage=1&fcaction=index&tagId=0
Global site tag (gtag.js) - Google Analytics