- 浏览: 42037 次
- 性别:
- 来自: 南京
-
最新评论
文章列表
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 ...
public static void main(String[] args)
{
Connection connection;
try
{
Class.forName("org.hsqldb.jdbcDriver");
connection=DriverManager.getConnection("jdbc:hsqldb:mem:demodb","sa","& ...
try
{
Class.forName("org.hsqldb.jdbcDriver");
Connection connection=DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/demodb","sa","");
System.out.println(connection.isClosed());
...
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延迟加载
- 博客分类:
- JavaScript
function myfunc()
{
window.parent.location.reload();
}
setTimeout(myfunc,1000);
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)) ...
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<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 ...