Monday, 2 June 2014

String Revers in C#


String abc = "abcd";
int a= abc.length();
String reverse="";
for (int i=a-1;i>=0 ;i--)
{
reverse= reverse + abc.charAt(i);
}
System.out.println("Reverse of String abcd using invert array is :"+reverse);
Or
String abc = "abcd";
int a= abc.length();
StringBuilder sb1 = new StringBuilder();
for (int i=a-1;i>=0 ;i--)
{
sb1= sb1.append(abc.charAt(i));
}
System.out.println("Reverse of String abcd using StringBuilder is :"+sb1);

Why Http known as stateless protocol?



HTTP is called a stateless protocol because each command is executed independently, without any knowledge of the commands that came before it. This is the main reason that it is difficult to implement Web sites that react intelligently to user input. This shortcoming of HTTP is being addressed in a number of new technologies, including ActiveX, Java, JavaScript and cookies.

What is the most expensive car ever sold at auction?

Mercedes-Benz

A 1954 Mercedes-Benz race car sold for a record $30 million at an auction in England on July 12, 2013. While collectible cars have been sold privately for more, this is the highest price ever paid for a car at a public auction. The record was previously held by a 1957 Ferrari Testa Rossa Prototype which sold at an auction in California in 2011 for $16.4 million. The Mercedes W196R Formula 1 race car, powered by a 2.5-litre 8-cylinder engine, was one of a group of race cars that won 9 World Championship-qualifying Grand Prix races in 1954 and '55.

Sunday, 1 June 2014

Difference between stateless protocol and state-full protocol?


stateless Protocol:-
1).When stateless protocol is used between a server and the client, the server does not remember anything. It treats any message from a client as the client's first message and responds with the same effects every time
2). A stateless server does not keeps state between connections.
=>So,When you send a request to a stateless server, it does not create any objects that track information regarding your requests. If you "open" something on the server, the server retains no information at all that you have something open. A "close" operation would make no sense, since there would be nothing to close.
3). A stateless system can be seen as a box ,where at any point in time the value of the output(s) depends only on the value of the input(s) after a certain processing time.
4). A stateless protocol does not require the server to retain session information or status about each communications partner for the duration of multiple requests.
5). stateless sessinobean:can not maintain the state,cannot maintain the persistance(data base),onece sutdown machine,we cannot see that data,cannot have the passivate,activate states. ex:atm mini statements.
Example = UDP(User Datagram Protocol) , HTTP, NFS
Statefull Protocol :-
1). Stateful protocol means the server remembers what a client has done before.
2). .A stateful server keeps state between connections.
=> when you send a request to a stateful server, it may create some kind of connection object that tracks what information you request. When you send another request, that request operates on the state from the previous request. So you can send a request to "open" something. And then you can send a request to "close" it later. In-between the two requests, that thing is "open" on the server.
3). a stateful system is like a state machine with "memory" as the same set of input(s) value can generate different output(s) depending on the previous input(s) received by the system.
4). a protocol which requires the keeping of internal state is known as a stateful protocol.
5). statefull Protocol :- maintain the state,but cannot maintain the persistance,once we shutdown the system the values stored in local hard disc,can have the passivate and activate states. ex:shopping card
Example = SMB, FTP,Telnet
Ref:http://wiki.answers.com/Q/Difference_between_stateless_protocol_and_statefull_protocol

What is the difference between Debug and Release in C#


Debug and Release are different configurations for building your project. As the name implies, you generally use the Debug mode for debugging your project, and the Release mode for the final build for end users. The Debug mode does not optimize the binary it produces (as optimizations can greatly complicate debugging), and generates additional data to aid debugging. The Release mode enables optimizations and generates less (or no) extra debug data.

How to Open Term store Management in SharePoint 2013


SharePoint 2013 Term Store Management
Open SharePoint 2013 Site Collection
Site Settings
Term Store Management (Under Site Administration)
Or
Open SharePoint 2013 Central Admin
Manage Service Applications
Click on Managed metadata service

What country is the largest producer of bananas?

India
Bananas are worldwide a very important source of food with an annual production of more than 130 million tons. India is the largest producer in the world with almost 30 million tons, whilst Latin American countries dominate the international banana trade. Some of commercial varieties of bananas include the Jamaica, the Martinique, the Belize, and the red banana.