web developer
Guangzhou, China
参考《集体智慧编程》这本书的第二章 ‘协作型过滤’
总记录数:totalRecord每页记录数:pageSize 算法一:totalPage = totalRecord % pageSize== 0 ? totalRecord / pageSize: totalRecord / pageSize+ 1 ; 算法二:(推荐)totalPage = (totalRecord + pageSize-1) / pageSize;