`
文章列表

Play MySQL

    博客分类:
  • Play
1.create a schema in the mysql.(named task) 2.project/build.scala val appDependencies = Seq(       // Add your project dependencies here,       "mysql" % "mysql-connector-java" % "5.1.18"     ) use the sbt import the driver into the project 3.application.conf ...

Hsqldb In Memory

public static void main(String[] args) { Connection connection; try { Class.forName("org.hsqldb.jdbcDriver"); connection=DriverManager.getConnection("jdbc:hsqldb:mem:demodb","sa","& ...

Hsqldb Server

try { Class.forName("org.hsqldb.jdbcDriver"); Connection connection=DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/demodb","sa",""); System.out.println(connection.isClosed()); ...

Tomcat配置Https

1.为服务器生成证书 keytool -genkey -v -alias tomcat -keyalg RSA -keystore E:\tomcat.keystore CN=192.168.1.100, OU=snc, O=sms, L=nj, ST=js, C=cn 2.为客户端生成证书 keytool -genkey -v -alias myKey -keyalg RSA -storetype PKCS12 -keystore my.p12 -dname "CN=192.168.1.100,OU=snc,O=sms,L=nj,ST=js,C=cn" ...
JSP页面: <form action="uploadPhoto.action" method="post" enctype="multipart/form-data"> <table> <tr> <td><input type="file" name="photoFile"></td> <td><input type="submit" val ...
<result name="success" type="redirect-action"> <param name="actionName">photo</param> </result>

JS延迟加载

function myfunc() { window.parent.location.reload(); } setTimeout(myfunc,1000);

Table不换行

    博客分类:
  • CSS
<td nowrap>***</td>

保存文件

    博客分类:
  • Java
public void Download() { int byteRead=0; try { URL url=new URL(link); URLConnection conn=url.openConnection(); InputStream is=conn.getInputStream(); FileOutputStream os=new FileOutputStream(path); byte[] buffer=new byte[262144]; while((byteRead=is.read(buffer)) ...

保存PDF文件

    博客分类:
  • Java
public static void savePdf(String fileName,String linkstr) { try { URL url= new URL(linkstr); BufferedReader in =new BufferedReader(new InputStreamReader(url.openStream())); PrintWriter pw=new PrintWriter(new FileOutputStream("D:\\WebPage\\"+fileName+".pdf")); ...

获取Map中的数据

    博客分类:
  • Java
Map<String,String> linkMap=(Map<String,String>)getPdfList(); Iterator link=linkMap.entrySet().iterator(); while(link.hasNext()) { Map.Entry entry=(Map.Entry)link.next(); Object key=entry.getKey(); Object value=entry.getValue(); if(key!=null && value!=nu ...
...
...
...
...
Global site tag (gtag.js) - Google Analytics