自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 资源 (2)
  • 收藏
  • 关注

原创 代码常用注释

TODO:+说明 :有功能代码待编写,待实现的功能在说明中会简略说明FIXME : + 说明:说明标识该处有代码待修正,甚至是代码错误,无法工作,如何修正会在说明中简述。XXX :+ 说明 : 说明该处代代码虽然实现了功能,但实现方法有待改善,要改进的地方会在说明中简述。

2017-12-31 19:57:10 329

原创 json与jsonp的区别

json: javascript object notation (JS 对象标记) 是一种数据传输的格式。jsonp : JSON width Padding,是基于JSON格式的为解决跨域请求资源而产生的解决方案。

2017-12-20 16:09:24 195

原创 正则表达式入门语法篇

正则表达式:使用单个字符串来描述,匹配一系列符合某个语法规则的字符串实例化RexExp语法 : 1. var reg = /此处为正则表达式/; eg: var reg = /\d{4}/ 2. var ref = new (‘此处为正则表达式’) eg: var reg = new(‘\d{4}’)正则表达式语法概念 正则表达式由

2017-12-16 17:43:03 227

原创 网站性能优化核心

网站性能优化核心最近读完了<<高性能网站建设指南>>这本书,仅此结合自己项目记录我读后所悟所感,若有错误,忘各位不吝赐教!性能优化从减少组件下载时间(Content Download)下手。网站响应时间 10%左右用来渲染文档,差不多90%的时间花在了等待组件下载上。实践出真知嘛,我立马拿自己参与开发的上线项目做了小白,访问登陆页面的时间线如图所示。如图,终于知道了网站响应慢的核心原因了,组件下载!

2017-12-15 12:18:27 186

DREAWERA 8

PPT 以DW8为例介绍了网站设计的静和动态部分

2015-01-09

20111009_maven3+S3S2JPA2_nullPointError_babasportrefactoring

package com.itcast.web.action.product; import com.itcast.bean.QueryResult; import com.itcast.bean.product.ProductType; import com.itcast.service.product.ProductTypeService; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Controller; @Controller("/control/product/type/JsonTable") public class JsonTable { //Your result List private List<ProductType> gridModel; //get how many rows we want to have into the grid - rowNum attribute in the grid private Integer rows = 10; //Get the requested page. By default grid sets this to 1. private Integer page = 1; // sorting order - asc or desc private String sord; // get index row - i.e. user click to sort. private String sidx; // Search Field private String searchField; // The Search String private String searchString; // he Search Operation ['eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','cn','nc'] private String searchOper; // Your Total Pages private Integer total = 0; // All Record private Integer records = 0; @Resource(name = "productTypeServiceBean") private ProductTypeService productTypeService; public String execute() { int to = (getRows() * getPage()); int from = to - getRows(); QueryResult<ProductType> qr = productTypeService.getScrollData( ProductType.class, from, to, "o.visible=?1", new Object[]{true}); setRecords((Integer) qr.getTotalrecord().intValue()); setGridModel(qr.getResultlist()); //calculate the total pages for the query setTotal((Integer) (int) Math.ceil((double) getRecords() / (double) getRows())); return "success"; } public String getJSON() { return execute(); } /** * @return the gridModel */ public List<ProductType> getGridModel() { return gridModel; } /** * @param gridModel the gridModel to set */ public void setGridModel(List<ProductType> gridModel) { this.gridModel = gridModel; } /** * @return the rows */ public Integer getRows() { return rows; } /** * @param rows the rows to set */ public void setRows(Integer rows) { this.rows = rows; } /** * @return the page */ public Integer getPage() { return page; } /** * @param page the page to set */ public void setPage(Integer page) { this.page = page; } /** * @return the sord */ public String getSord() { return sord; } /** * @param sord the sord to set */ public void setSord(String sord) { this.sord = sord; } /** * @return the sidx */ public String getSidx() { return sidx; } /** * @param sidx the sidx to set */ public void setSidx(String sidx) { this.sidx = sidx; } /** * @return the searchField */ public String getSearchField() { return searchField; } /** * @param searchField the searchField to set */ public void setSearchField(String searchField) { this.searchField = searchField; } /** * @return the searchString */ public String getSearchString() { return searchString; } /** * @param searchString the searchString to set */ public void setSearchString(String searchString) { this.searchString = searchString; } /** * @return the searchOper */ public String getSearchOper() { return searchOper; } /** * @param searchOper the searchOper to set */ public void setSearchOper(String searchOper) { this.searchOper = searchOper; } /** * @return the total */ public Integer getTotal() { return total; } /** * @param total the total to set */ public void setTotal(Integer total) { this.total = total; } /** * @return the records */ public Integer getRecords() { return records; } /** * @param records the records to set */ public void setRecords(Integer records) { this.records = records; } //Getters and Setters for Attributes }

2015-01-09

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除