Saturday, February 18, 2012



Hitu's reminder Today's in History

Wednesday, December 28, 2011

Linked List in JAVA

public class List{        
 int value;
List next;
public static void main(String [] args){

List node1 ,node2,node3;  
node1=new List();
node2=new List();
node3=new List();

node1.value=23;
node2.value=33;
node3.value=43;
node1.next=node2;  //node1->node2->node3->node1
node2.next=node3;  //
node3.next=node1;  //
System.out.println("value in node1=" +node1.value);
System.out.print("value of node which is next to node1="+node1.next.value);
}
}

output :
value in node1=23
value of node which is next to node1=33


Referencehttp://cslibrary.stanford.edu/106/



Friday, September 23, 2011

Sorting

Bubble Sort


public class BubbleSort {

/**
* @param args
*/
public static void main(String[] args) {

int[] bsort = new int[] { 6, 10, 9, 2, 7, 4, 8, 1, 5, 3 };
// OR we can use int [] bsort={6,10,9,2,7,4,8,1,5,3,};

int i, j;

for (j = 0; j < bsort.length; j++) { // (length -1) cycles of sorting
for (i = 1; i < ((bsort.length) - j); i++) {                         // =1 cycle of sorting
// -j to optimise the cycle because in later cycle last few
// element need not be sorted(see the animaton above)
if (bsort[i - 1] > bsort[i]) // a[0] [1] compare
{
int temp = 0;                  // suggestion given by system to initialize
// temp with 0
temp = bsort[i - 1];       // Swapping will start from here
bsort[i - 1] = bsort[i];
bsort[i] = temp;

}
// else portion will not needed because,
// bsort[i - 1] <= bsort[i] remain as it is,and we have to move
// forward without changing anything, which will be done by i++

}
}

System.out.print(bsort[0] + ",");
System.out.print(bsort[1] + ",");
System.out.print(bsort[2] + ",");
System.out.print(bsort[3] + ",");
System.out.print(bsort[4] + ",");
System.out.print(bsort[5] + ",");
System.out.print(bsort[6] + ",");
System.out.print(bsort[7] + ",");
System.out.print(bsort[8] + ",");
System.out.print(bsort[9]);

}

}




Monday, January 24, 2011

DO you know the history of http:// what we use to write/written before www.????

Here it is.....

Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. Its use for retrieving inter-linked resources led to the establishment of the World Wide Web.


HTTP development was coordinated by the World Wide Web Consortium and the Internet Engineering Task Force (IETF), culminating in the publication of a series of Requests for Comments (RFCs), most notably RFC 2616 (June 1999), which defines HTTP/1.1, the version of HTTP in common use.


Support for pre-standard HTTP/1.1 based on the then developing RFC 2068 was rapidly adopted by the major browser developers in early 1996. By March 1996, pre-standard HTTP/1.1 was supported in Netscape 2.0, Netscape Navigator Gold 2.01, Mosaic 2.7, Lynx 2.5, and in Internet Explorer 3.0. End user adoption of the new browsers was rapid. In March 1996, one web hosting company reported that over 40% of browsers in use on the Internet were HTTP 1.1 compliant. That same web hosting company reported that by June 1996, 65% of all browsers accessing their servers were HTTP 1.1 Compliant. The HTTP 1.1 standard as defined in RFC 2068 was officially released in January 1997. Improvements and updates to the The HTTP/1.1 standard were released under RFC 2616 in June 1999.


HTTP is a request/response standard of a client and a server. A client is the end-user, the server is the web site. The client making an HTTP request—using a web browser, spider, or other end-user tool—is referred to as the user agent. The responding server—which stores or createsresources such as HTML files and images—is called the origin server. In between the user agent and origin server may be several intermediaries, such as proxies, gateways, and tunnels. HTTP is not constrained to using TCP/IP and its supporting layers, although this is its most popular application on the Internet. Indeed HTTP can be "implemented on top of any other protocol on the Internet, or on other networks." HTTP only presumes a reliable transport; any protocol that provides such guarantees can be used."


Typically, an HTTP client initiates a request. It establishes a Transmission Control Protocol (TCP) connection to a particular port on a host (port 80 by default; see List of TCP and UDP port numbers). An HTTP server listening on that port waits for the client to send a request message. Upon receiving the request, the server sends back a status line, such as "HTTP/1.1 200 OK", and a message of its own, the body of which is perhaps the requested resource, an error message, or some other information.


Resources to be accessed by HTTP are identified using Uniform Resource Identifiers (URIs)—or, more specifically, Uniform Resource Locators(URLs)—using the http: or https URI schemes.
Labels: Hypertext Transfer Protocol (HTTP)