2016年4月23日

使用ajax在前后端传递数组

摘要: 我们都知道JSON作为前后端都兼容的数据格式,被很好的用于复杂数据的传输,特别是异步提交当中。当我们要将前端的js数组提交到后端并转化为list,继而又需要将后端的list传到前端转化为js数组的时候,JSON作为中间过渡的格式,必不可少。在此详细总结下。 编程组件 Struts2, FastJso 阅读全文

posted @ 2016-04-23 16:08 windrainer 阅读(2771) 评论(0) 推荐(0) 编辑

2016年4月8日

如何用js实现页面跳转

摘要: 利用window.loaction的属性实现界面跳转,这个可以用在ajax的回调函数中 var path = window.location.pathname; var slashIndex = path.indexOf("/", 1); //用来取得项目名 var context = window 阅读全文

posted @ 2016-04-08 16:24 windrainer 阅读(438) 评论(0) 推荐(0) 编辑

2015年11月28日

How to clean up files that were created some time ago.

摘要: find $AN_ABSOLUTE_FOLDER_PATH -mtime +$DAYS_TO_EXPIRE -type f -exec rm -f {} \you can also use command to change existing file time to test the above ... 阅读全文

posted @ 2015-11-28 14:27 windrainer 阅读(123) 评论(0) 推荐(0) 编辑

2015年11月1日

解析从服务器端返回的xml文件流

摘要: 服务器端有xml流过来,为了解析,最初使用的方法是构建一个StringBuilder,在onMessage方法中不断append,最终形成一个完成的xml文件字符串(其中包含多个xml).最后使用DocumentBuilder来解析。这种做法在数据量小的时候可以维持,当一次传来大量xml,便会出现O 阅读全文

posted @ 2015-11-01 19:30 windrainer 阅读(2354) 评论(0) 推荐(0) 编辑

2015年6月22日

How to add and configure jetty server in maven pom.xml

摘要: Jetty server configuration will be added as a maven plugin org.mortbay.jetty jetty-maven-plugin 8.1.7.v20120910 ... 阅读全文

posted @ 2015-06-22 21:10 windrainer 阅读(193) 评论(0) 推荐(0) 编辑

Compress multiple files into a zip file and assign a password.

摘要: First things first, include maven dependency to download zip4j jar files1 2 net.lingala.zip4j 3 zip4j 4 1.3.1 5 Second, write the zip... 阅读全文

posted @ 2015-06-22 20:47 windrainer 阅读(285) 评论(0) 推荐(0) 编辑

2013年8月29日

Struts2的基本配置(一)

摘要: 此文简要说明了如何配置一个struts2项目。准备工作:首先要下载tomcat7, 地址:http://tomcat.apache.org/download-70.cgi其次是struts2的开发包,其中包括相关的jar文件,例子,以及支持文档, 地址:http://struts.apache.org/download.cgi#struts2315-SNAPSHOT下载tomcat服务器插件并安装到eclipse,地址:http://www.eclipsetotale.com/tomcatPlugin.html,解压后放到eclipse的dropins文件夹下。开始配置:1. 打开eclips 阅读全文

posted @ 2013-08-29 11:51 windrainer 阅读(240) 评论(0) 推荐(0) 编辑

2013年8月22日

MYSQL中为单一数据库创建用户并给予最高权限

摘要: 如题,很简单,进入PHPMYADMIN,选SQL,接着输入eg.CREATE DATABASE drupal; //创建databaseCREATE USER username@localhost IDENTIFIED BY "password"; //创建一个用户GRANT ALL PRIVILE... 阅读全文

posted @ 2013-08-22 21:42 windrainer 阅读(302) 评论(0) 推荐(0) 编辑

2013年8月4日

C# notes 1

摘要: 1. Ajax ActionsLinks allows to submit request in an asynchronours manner, it updates a section without doing a whole page submit. eg. //Arguments: 1.link text, 2. method in action class, 3. ajax behavior setting @Ajax.ActionLink("Today's special!", "DailyDeal", new AjaxOption 阅读全文

posted @ 2013-08-04 13:21 windrainer 阅读(133) 评论(0) 推荐(0) 编辑

导航