Holiday Assignment(Perl)

Submitted to:-
S.S.Paul Sir
Submitted by:-
Rahul Singh
Reg No- 20098023(IT-2)
Submitted to:-
S.S.Paul Sir
Submitted by:-
Rahul Singh
Reg No- 20098023(IT-2)
by Rahul SinghThis report is a brief overview of the use of Perl in networking and communicating between servers and clients. It explains sockets and modules associated to them in Perl. Additionally, it also gives a brief idea about a Software Requirement Specification (SRS), its meaning, purpose and contents.

by Rahul SinghThis report is a brief overview of the use of Perl in networking and communicating between servers and clients. It explains sockets and modules associated to them in Perl. Additionally, it also gives a brief idea about a Software Requirement Specification (SRS), its meaning, purpose and contents.

SOCKET PROGRAMMING IN PERL
What is a Socket?Sockets are a mechanism that allows programs to communicate, either on the same machine or across a network. The way it works is pretty simple: Each machine on a network is identified by some address. In tcp/ip networking a network address implies an IP address. (like 192.168.4.4) Apart from the IP address that specifies a machine, each machine has a number of ports that allow handling multiple connections simultaneously.

How does communication using sockets work?A program that wishes to receive a connection from another program, asks the operating system to create a socket and bind it to some port. Then the program sits and listens on the socket it has created to receive incoming connections. The other program also creates a socket for communicating with the receiver. The caller needs to specify the IP address and the port number of the receiving end. The two programs may exchange information, each by writing to and reading from the socket it has created. How do sockets apply to Perl programs?

Perl provides support for the socket API natively. Perl socket modules provide an object interface that makes it easier to create and use TCP / UPD sockets. Socket programming in Perl, as with any other language, has two sides to it- the server (receiver) and the client (sender). The Server: The socket operation such as socket creation, binding and listening to the socket is performed by the IO::Socket::INET module. The first thing to do is to create a socket. The code for doing that is as given- use IO::Socket;

my $sock = new IO::Socket::INET (
LocalHost => 'thekla',
LocalPort => '7070',
Proto => 'tcp',
Listen => 1,
Reuse => 1,
);
die "Could not create socket: $!\n" unless $sock;The program needs to specify the local hostname and the port to which the socket will be bound. if the port is already in use this call will fail. The 'Listen' variable specifies the maximum number of connections that can be queued by the socket waiting to accept. Its value 1 here means the queue can be 1 connection long. The 'Reuse' variable tells the system to allow reuse of the port after the program exits. This is to ensure that if the program exits abnormally and does not properly close the socket, running it again will allow opening a new socket on the same port. To wait for a connection, the accept() method is used, which will return a new socket through which we can communicate with the calling program. Information exchange is achieved by reading/writing on the new socket. The socket can be treated like a regular filehandle. my $new_sock = $sock->accept();

while(<$new_sock>) {
print $_;
}
close($sock);
The Client: At the other side of the communication, meaning the client side, all we need to do is to create a socket specifying the remote address and port. The...

...HOLIDAYSASSIGNMENT [2012-13]
CLASS XII
SUB: PHYSICS
One investigatory project is to be performed from the following list of suggested projects
or from any topic related to senior school physics.
1. To study the quality of detergents by capillary rise method.
2. To study the effect of temperature on surface tension of liquids.
3. To study the factors affecting the rate of loss of heat of a liquid.
4. To study the breaking stress of different materials of varying diameter.
5. To study the Inter conversion of potential and kinetic energy.
6. To determine the specific heat capacity of liquids.
7. To study the factors affecting the range and height of a projectile.
8. To study the factors affecting the coefficient of friction between 2 surfaces.
9. To study the factors affecting the time period of a simple pendulum.
10. To determine Faraday’s constant.
11. To determine electrochemical equivalent of a material.
12. To study the validity of ohm’s law for different types of material.
13. To study various factors on which the internal resistance /emf of a cell depends.
14. To study variations, in current flowing in a circuit containing a LDR , because of
variation.
a. In the power of the incandescent lamp used to ‘illuminate’ the LDR.
(keeping all the lamps at a fixed distance)
b. In the distance of an incandescent lamp, (of fixed power), used to
‘illuminate’ the LDR.
15. To find the refractive indices of (a) water (b) oil...

...Tourism Destinations
Assignment 2
Hand out date:
Hand in date:
P2: describe the appeal of one UK town or city destination, one seaside resort and one countryside area, each focusing on appeal for a different type of visitor
Scenario:
You are work for Enjoy England, a national tourist board and have been asked to design 3 leaflets to persuade people to come to different tourist destinations around the UK.
What will I have to do?
1. Choose three options from the box below, one town/city, one seaside and one countryside area and then choose a different visitor type for each.
Destination
Destination Type
Visitor Type
Blackpool
Seaside
Young adults
Brighton
Seaside
Families
London
Town/city
School groups
Manchester
Town/city
Inbound tourists
Lake District
Countryside area
Retired people
Peak District
Countryside area
Special needs
2. Outcome: Design a leaflet for each place, giving information on how the following features provide appeal for your chosen visitor type at the destination. For a blank leaflet, ctrl + click here.
1. Visitor attractions (eg National Trust, English Heritage, theme parks, museums, historical sites, heritage sites, wildlife parks?)
Seaside Resort
Town or City
Countryside or Coastal area
2. Natural features (eg mountains, beaches, lakes, rivers, coast)
3. Range of accommodation (eg hotels, guesthouses, B&B, self catering, camping and
caravanning,...

...Case Study on Business Ethics: Holiday Cheer or Ethical Dilemma?
Williams had joined Star Corporation, one of the leading consumer electronics company, only a few days back as the Purchase Manager and he was going through the employees conduct manual. He was attracted by the clause, prohibiting acceptance of gifts by the employees of the purchase department. It read as follows:
“Purchase department employees shall not accept gifts from vendors. This is to ensure that no vendor is given any special treatment and the employees work only in the best interest of the firm at all times. Any deviation from the above would be dealt with severely and could mean dismissal from the firm.”
Williams remembered his experience with his previous firm, Maple Corporation, where he had worked from 2000 for six years as purchase head prior to joining the Star Corporation.
It was only six months since he was with the Maples when it was New Year. With the New Year came some inconsequential gifts like ball pens and key chains. The rule in the firm was that an employee could accept no gift worth more than 25 USD. One day one of the vendors brought three wall clocks, one for the MD, one for the GM, and one for Williams. The vendor explained that as his firm had purchased the clocks in bulk they cost only 25 USD each and as such there should not be any hesitation in accepting the same. He added that in any case he is going to accept the Maple’s calendar and dairy for his...

...3/2/13
2nd Period
Love the Holiday
(Billie Holiday Report)
Born Eleanora Fagan on April 7, 1915 in Philadelphia, PA; the amazing jazz vocalist never imagined she was going to become one of the biggest jazz musicians of all time. Rose Primarily in Baltimore, MD with her mother, Sady Fagan, who gave birth to Billie at the age of nineteen. Billie was raised primarily with her mother. Her father, believed to be Clarence Holiday who was a successful jazz musician himself, wasn’t around often in her life. Her mother married a man by the name of Philip Gough in 1920 and for a few years, Billie had a somewhat stable home life. But the marriage ended years later, leaving Billie and Sadie to struggle once again. At times she was left under the care of others who didn’t care very much for her. Living in poverty, Holiday started skipping school at the young age of 9 and ended up dropping out in just the fifth grade. She found a job running errands in a nearby brothel.
With her mother trying to find a job, once again the lady Fagan’s had to migrate to the street of Harlem, NY. Growing up in a one parent household, Holiday didn’t have many options to choose from especially with the path she took at a young age. Desperate for the mighty dollar, the errands Billie was running for the brothel turned into running the streets of Harlem. She had convicted for prostitution but was then released back to...

...The Holidays
The meaning of holidays is essentially a time we embark moments and share
time with love one’s. In the United Sates, holidays are a very superior time that many of us
embrace. Many can think back on holidays that they’ve encountered and recollect favorable
moments. For many, it is the time of the year when people seem to grasp inside of one another
and distinguish the best of things. Clearly, to some amount the “holiday season” gives people a
sense of pleasure. Halloween and Christmas are two holidays that many people choose to rejoice.
Indeed, they are both the most decorated holidays of the year, and both originate from Christian
beliefs. But there’s something about the two that have mystified throughout their existence.
Halloween and Christmas share similar attributes, but they are also vastly different in history,
culture and traditions.
On October 31, many people celebrate the eve of All Saints' Day; better
known to the world as Halloween. When people think of Halloween, they think of a day filled
with frights, terror and fun. There are many cultural influences that have prompted to the holiday
we now call Halloween; such as Day of Dead and All Souls Day. Halloween is refrained by
death, but this doesn't make the holiday wicked. In fact, it's a time of celebration for...

...Hoolidays, A time everyone gets hyped up over, parents planning activities for the family to spend quality time with and school children ( as well as teachers) jumping for joy. Hello, waking up late, celebrating, goin for tuition and best of all, vacations! In myy case, a holiday I would never forget is a fruitful one I expereinced five years ago, where my family I spent six days in the land of K-Pop and ' kimchi '- Korea.
Finally, after ages of waiting, our family arrived in beautiful Korea. Stepping out of the plane, we could feel the chilly weather to our bones. Never experiencing that kind of weather, my siblings and I were totally excited. Passing through immigration and baggage claim, we were talking animatedly about our new surroundings. Since we went with tour group, we knew we were in good hands.
Incident number one. We were supposed to take a bus to check in at the hotel, as instructed. I guessed I was overeager and without thinking. I ran to a random bus and knocked on the door. The young bus driver opened the door and looked at me with a puzzled expression. He started asking me something in Korean, which of course I did not understand. I tried to reply in English, but before I could make the attempt, my father quickly apologized to the driver and walked me back to the tour group who was watching from afar, shaking with laughter. It turned out that the bus I was running to was not the bus we were supposed to take. I dismissed...