Category Archives: Programming

Java File System Simulation

The Java file system simulation was developed by me during my OS project in 2003. I was transfering my files from old drive to new one and found this project. I thought why not to share my work. This application is great example for those students who are taking Operating System course. I did my best to comment the code and its well organized too. Please do not ask me any questions regarding to java programming because its now almost 5 years passed I left Java programming.

Here is screenshot of the application

This project is hosted on Source forge, to download or view the features click on this link.

Please do not take this as your OS or any other course project, you will be caught I am sure! These days teachers are becoming very smart, because they already did same trick 😉

ASP: Digg Style Pagination Script

This is ASP based pagination script, similiar to Digg.com pagination. The credit goes to Jason Coleman who written this script in PHP and I simply converted this into ASP. I have attached screenshot this will help you to see how it looks like.

Demo Digg Style Pagination Script

Download Script

Usage

Many people were asking how to add this code into our own projects. I have included the code, I hope this will help you in integrating this script.

<!–#include file=”pagination.asp” –>
<%
dim objcon, objrs, totalpages, page, numPerPage, countItem
set objcon=Server.CreateObject(“ADODB.Connection”)
set objrs=Server.CreateObject(“ADODB.RecordSet”)
countItem = 0
numPerPage = 5
objrs.cursorlocation = 3
if request(“page”) = “” then
page=1
else
page=cLng(request(“page”))
end if
objcon.open connectionString
objrs.open “SELECT * FROM Customers”, objcon,1,2
if objrs.EOF then
Response.Write(“<h2>Sorry! No Search Result Found</h2>”)
else
objRs.pageSize = numPerPage
totalpages = objRs.PageCount
objRs.absolutePage=page
while not objrs.EOF AND countItem < objRs.pageSize
Response.Write(“YOUR CODE GOES HERE”)
countItem = countItem + 1
objrs.movenext()
wend
ps = getPaginationString(page, objrs.RecordCount, numPerPage, 2, “demo.asp?yourcustomparams=PARAM&name=NAME&Search=Search”)
Response.Write(ps)
end if
‘always cleanup things
objrs.close()
objcon.close()
set objrs=nothing
set objcon=nothing
%>