Monday, January 23, 2012

How to capture the parallel port's output

How to capture the parallel port's output (PRN:, LPT1:, LPT2: .. LPT9:)

On Unix and Linux systems, redirecting the print output to a file is a very easy task, but on some old DOS or Windows Console Mode applications, the programmer did not give the end user this ability.

In this case you can redirect the LPT output to a file for Printfil, even if a parallel printer is physically connected to that port (for example a Windows-only Laser printer), and even if the parallel port is not physically installed on the PC (on new machines, the parallel ports are no more included nowadays).

Printfil can capture an LPT port by using 4 different tecniques (Mode 0, 1, 2, 3) on NT-based systems (Windows NT, Windows 2000, Windows XP, Windows 2003, Windows Vista, Windows 2008, Windows 7). On Windows 95/98/ME only Mode 1 is available


Friday, January 20, 2012

Thursday, January 19, 2012

Open source Web Appointment Scheduler System

 Overview of WASS

http://sourceforge.net/projects/wass/files/wass.4.0.1/


The WASS system supports appointment scheduling over the web.  Unlike traditional scheduling systems, which allow people to specify when they are busy (e.g., when they have meetings), WASS allows people to specify when they are free.  WASS allows appointments to be scheduled only for these free times, which WASS  refers to as "blocks". 

The way WASS works is as follows:

1.       Someone who wants to be available for appointments (let's call her "PROFESSOR SMITH") goes into WASS and  creates a calendar for themselves (they only need to do this once).  They then add blocks of available time to that calendar.  They can add or delete such blocks whenever they like.  The blocks can either be single blocks              (a block of time on a specific date) or recurring blocks (e.g., every Tuesday from 9:30 to noon between a start  and end date).  Each block corresponds to a date and time when PROFESSOR SMITH is available to met with other people  (e.g., their "office hours").  PROFESSOR SMITH can divide any of these block into individual appointment "slots", or  treat them as a monolithic unit (first-come, first-served).  PROFESSOR SMITH can also assign various kinds of access limits to the blocks (e.g., restrict access to specified users and/or to users in specified courses).

2.       A person wishing to make an appointment (let's call her "STUDENT JANE") with PROFESSOR SMITH goes into WASS, looks up PROFESSOR SMITHS's calendar, finds a block of available time that is covenient for her, and schedules an appointment with PROFESSOR SMITH at that time.  STUDENT JANE can only schedule an appointment  during one of the blocks of available time that PROFESSOR SMITH has added to her calendar.  If the block she selects has been divided into appointment "slots" by PROFESSOR SMITH, then STUNDENT JANE must select an available slot.  PROFESSOR SMITH can set limits on how many appointments an individual student can sign up for, as well  as the total number of appointments for a given block.

3.       STUDENT JANE and PROFESSOR SMITH each receive email notifications and reminders about the appointments,                 and they can go into the system to view and/or cancel these appointments at any time. What differentiates WASS from standard calendar/scheduling systems is its ability to allow people to specify  their availability.  This is useful in situations such as office hours scheduling (the professor is only available on specific dates for specific periods of time).  It can also be used to schedule things such as specialized equipment (which has limited aviability) or rooms (e.g., squash courts).  WASS is useful in cases where a person or resource is available only on specific days during specific periods of time.  It is not intended to replace a standard calendar system (such as Outlook), but can be used an an adjunct to such systems (WASS can generate iCal streams which can be imported into systems such as Outlook).

 

The WASS system is fundamentaly asymetric.  It consist of a set of calendars created by people who hold office hours  (e.g., professors, deans, advisors), and appointments made by people who meet with the calendar owners (e.g, students).  Students do not need to create calendars; only people who hold office hours create calendars.  WASS also supports the notion of managers, people who manage a professor's calendar.   It should be noted, however, that WASS does not enforce any kind  of role assignment.  Anyone who can authenticate to the system can create a calendar.  Thus a student could create a calendar that other people would access to make appointments with the student (e.g., a student who was the leader  of a student organization could create a calendar on which they indicate their avaialbility for appointments with other students  who wish to meet with them).  A given user could use WASS both to publish their availability, and to make appointments with other users.  For example, a professor who has a calendar in the system could use WASS to schedule an appointment with another professor who has a calendar in the system.  In the interests of security, you should probably move this text file out of the WASS admin directory and into a directory that  is not accessible to web users.  It is not needed by the running WASS system.

Open source Web Appointment Scheduling System (WASS)


Overview of WASS

 

The WASS system supports appointment scheduling over the web. Unlike traditional scheduling systems, which allow people to specify when they are busy (e.g., when they have meetings), WASS allows people to specify when they are free. WASS allows appointments to be scheduled only for these free times, which WASS refers to as "blocks". The way WASS works is as follows:

 

1.      Someone who wants to be available for appointments (let's call her "PROFESSOR SMITH") goes into WASS and creates a calendar for themselves (they only need to do this once). They then add blocks of available time to that calendar. They can add or delete such blocks whenever they like. The blocks can either be single blocks (a block of time on a specific date) or recurring blocks (e.g., every Tuesday from 9:30 to noon between a start and end date). Each block corresponds to a date and time when PROFESSOR SMITH is available to met with other people (e.g., their "office hours"). PROFESSOR SMITH can divide any of these block into individual appointment "slots", or treat them as a monolithic unit (first-come, first-served). PROFESSOR SMITH can also assign various kinds of access limits to the blocks (e.g., restrict access to specified users and/or to users in specified courses).

 

2.      A person wishing to make an appointment (let's call her "STUDENT JANE") with PROFESSOR SMITH goes into WASS, looks up PROFESSOR SMITHS's calendar, finds a block of available time that is covenient for her, and schedules an appointment with PROFESSOR SMITH at that time. STUDENT JANE can only schedule an appointment during one of the blocks of available time that PROFESSOR SMITH has added to her calendar. If the block she selects has been divided into appointment "slots" by PROFESSOR SMITH, then STUNDENT JANE must select an available slot. PROFESSOR SMITH can set limits on how many appointments an individual student can sign up for, as well as the total number of appointments for a given block.

 

3.      STUDENT JANE and PROFESSOR SMITH each receive email notifications and reminders about the appointments, and they can go into the system to view and/or cancel these appointments at any time. What differentiates WASS from standard calendar/scheduling systems is its ability to allow people to specify their availability. This is useful in situations such as office hours scheduling (the professor is only available on specific dates for specific periods of time). It can also be used to schedule things such as specialized equipment (which has limited aviability) or rooms (e.g., squash courts).

 

WASS is useful in cases where a person or resource is available only on specific days during specific periods of time. It is not intended to replace a standard calendar system (such as Outlook), but can be used an an adjunct to such systems (WASS can generate iCal streams which can be imported into systems such as Outlook).

 

The WASS system is fundamentaly asymetric. It consist of a set of calendars created by people who hold office hours (e.g., professors, deans, advisors), and appointments made by people who meet with the calendar owners (e.g, students). Students do not need to create calendars; only people who hold office hours create calendars. WASS also supports the notion of managers, people who manage a professor's calendar. It should be noted, however, that WASS does not enforce any kind of role assignment. Anyone who can authenticate to the system can create a calendar. Thus a student could create a calendar that other people would access to make appointments with the student (e.g., a student who was the leader of a student organization could create a calendar on which they indicate their avaialbility for appointments with other students who wish to meet with them).

 

 A given user could use WASS both to publish their availability, and to make appointments with other users. For example, a professor who has a calendar in the system could use WASS to schedule an appointment with another professor who has a calendar in the system. In the interests of security, you should probably move this text file out of the WASS admin directory and into a directory that is not accessible to web users. It is not needed by the running WASS system.

 

Source: README.txt, updated 2011-10-13

Create an AJAX Application Using JSON and Java Servlets

How to Create an AJAX Application Using JSON and Java Servlets?

In this article I would like to show how JSON (JavaScript Object Notation) and Java servlet can be used together in a little AJAX (Asynchronous JavaScript and XML) application.

http://itspice.net/cms/web-internet/ajax-json-application-java-servle


Tuesday, January 17, 2012

Creating & Parsing JSON data with Java Servlet/Struts/JSP

Creating & Parsing JSON data with Java Servlet/Struts/JSP





java logo

http://viralpatel.net/blogs/2009/02/creating-parsing-json-data-with-java-servlet-struts-jsp-json.html

JSON (JavaScript Object Notation) is a lightweight computer data interchange format. It is a text-based, human-readable format for representing simple data structures and associative arrays (called objects). The JSON format is specified in RFC 4627 by Douglas Crockford. The official Internet media type for JSON is application/json.

The JSON format is often used for transmitting structured data over a network connection in a process called serialization. Its main application is in AJAX web application programming, where it serves as an alternative to the traditional use of the XML format.


Sunday, January 15, 2012

Sigma open source Ajax Grid

Sigma Ajax Grid

http://www.sigmawidgets.com/products/sigma_grid2/

Written in pure javascript, Sigma grid is an open source AJAX data grid for displaying and inline editing data in a scrollable and sortable table. It is very powerful yet  easy to use &  integrate with php, asp.net, jsp and RoR.

sigma ajax grid master / details sample screenshot

http://www.sigmawidgets.com/products/sigma_grid2/

jqGrid -> grid plugin for jQuery

wonderful jQuery related product on grid.

provides mulitple feature. Best suited for php


http://www.trirand.net/demophp.aspx

Monday, January 2, 2012

CSS Image Sprites example



For full details refer : 



CSS Image Sprites


Image Sprites

An image sprite is a collection of images put into a single image.

A web page with many images can take a long time to load and generates multiple server requests.

Using image sprites will reduce the number of server requests and save bandwidth.


Image Sprites - Simple Example

Instead of using three separate images, we use this single image ("img_navsprites.gif"):

navigation images

With CSS, we can show just the part of the image we need.

In the following example the CSS specifies which part of the "img_navsprites.gif" image to show:

Example

img.home
{
width:46px;
height:44px;
background:url(img_navsprites.gif) 0 0;
}

Try it yourself »

Example explained:

  • <img class="home" src="img_trans.gif" /> - Only defines a small transparent image because the src attribute cannot be empty. The displayed image will be the background image we specify in CSS
  • width:46px;height:44px; - Defines the portion of the image we want to use
  • background:url(img_navsprites.gif) 0 0; - Defines the background image and its position (left 0px, top 0px)

This is the easiest way to use image sprites, now we want to expand it by using links and hover effects.


Image Sprites - Create a Navigation List

We want to use the sprite image ("img_navsprites.gif") to create a navigation list.

We will use an HTML list, because it can be a link and also supports a background image:

Example

#navlist{position:relative;}
#navlist li{margin:0;padding:0;list-style:none;position:absolute;top:0;}
#navlist li, #navlist a{height:44px;display:block;}

#home{left:0px;width:46px;}
#home{background:url('img_navsprites.gif') 0 0;}

#prev{left:63px;width:43px;}
#prev{background:url('img_navsprites.gif') -47px 0;}

#next{left:129px;width:43px;}
#next{background:url('img_navsprites.gif') -91px 0;}

Try it yourself »

Example explained:

  • #navlist{position:relative;} - position is set to relative to allow absolute positioning inside it
  • #navlist li{margin:0;padding:0;list-style:none;position:absolute;top:0;} - margin and padding is set to 0, list-style is removed, and all list items are absolute positioned
  • #navlist li, #navlist a{height:44px;display:block;} - the height of all the images are 44px

Now start to position and style for each specific part:

  • #home{left:0px;width:46px;} - Positioned all the way to the left, and the width of the image is 46px
  • #home{background:url(img_navsprites.gif) 0 0;} - Defines the background image and its position (left 0px, top 0px)
  • #prev{left:63px;width:43px;} - Positioned 63px to the right (#home width 46px + some extra space between items), and the width is 43px.
  • #prev{background:url('img_navsprites.gif') -47px 0;} - Defines the background image 47px to the right (#home width 46px + 1px line divider)
  • #next{left:129px;width:43px;}- Positioned 129px to the right (start of #prev is 63px + #prev width 43px + extra space), and the width is 43px.
  • #next{background:url('img_navsprites.gif') no-repeat -91px 0;} - Defines the background image 91px to the right (#home width 46px + 1px line divider + #prev width 43px + 1px line divider )

Image Sprites - Hover Effect

Now we want to add a hover effect to our navigation list.

Our new image ("img_navsprites_hover.gif") contains three navigation images and three images to use for hover effects:

navigation images

Because this is one single image, and not six separate files, there will be no loading delay when a user hovers over the image.

We only add three lines of code to add the hover effect:

Example

#home a:hover{background: url('img_navsprites_hover.gif') 0 -45px;}
#prev a:hover{background: url('img_navsprites_hover.gif') -47px -45px;}
#next a:hover{background: url('img_navsprites_hover.gif') -91px -45px;}

Try it yourself »

Example explained:

  • Since the list item contains a link, we can use the :hover pseudo-class
  • #home a:hover{background: transparent url(img_navsprites_hover.gif) 0 -45px;} - For all three hover images we specify the same background position,  only 45px further down