fyn

Java调用外部程序

import java.io.*; public class RuntimeTest { public static void main(String[] args) throws IOException, InterruptedException { long begin = System.currentTimeMillis(); //调用外部程序 Process exec = Runtime.getRuntime().exec("ping 127.0.0.1"); InputStream

利用POI将PPT转成图片

1. 下载POI:http://poi.apache.org/download.html 2. 导入poi.jar与poi-scratchpad.jar(后边的这个必须导,不然没有HSLF这个包) SlideShow slideShow = new SlideShow(hslfSlideShow); if(slideShow.getSlides()!=null&&slideShow.getSlides().length>0){ Slide slide = slideShow.

IFrame 跨域自动高

先说一下不跨域的autoheight解决方案:iframe里 window.parent.frames[“frameId”].height=document.documentElement.scrollHeight 就可以。 如果跨域的话可以获取到window.parent这个对象,但是获取不到其他的对象,因为跨域。 但是可以这样解决: 在iframe里面再插入一个iframe,这个iframe是和最外层的同域的,即: aaa.com/index.html – > bbb.com/iframe.html -> aaa.com/agent.