Find the cookies expiring, Programming Languages

Your program can be invoked with option: -d date, where date is entered in dd/mm/yyyy format. In this case, it must only print the following string:

Found cookies expiring before or on

To find the cookies expiring before, or on, the date given in the option, your program must convert this date to the Unix epoch format and compare it with the dates stored in cookies_file. The time of the date is always assumed to be 0 hours, 0 minutes, 0 seconds and the time used is the Coordinated Universal Time (UTC), also often referred to as Greenwich Mean Time (GMT). Perl has a function for converting a GMT time to the Unix epoch time.

Example with the example cookies_file given above:

Command line:

cookiemgr.pl cookies_file -d 31/12/2012

The Unix epoch format for 31/12/2012, midnight, is 1356912000. In file cookies_file there are three dates which are smaller or equal than 1356912000. Therefore, the output must be:

Found 3 cookies expiring before or on 31/12/2012 Option -d date can only be used once per command line (you can only ask for the cookies for a given date at a time).

In the case in which file  cookies_file contains no cookies expiring before or on the given date, your program must instead only print:

No cookies found expiring before or on

Example with the example cookies_file given above:

Command line:

cookiemgr.pl cookies_file -d 31/05/2010

The Unix epoch format for 31/05/2010, midnight, is 1275264000. In file cookies_file there are no dates which are smaller or equal than 1275264000. Therefore, the output must be: No cookies found expiring before or on 31/05/2010

Posted Date: 3/30/2013 1:20:26 AM | Location : United States







Related Discussions:- Find the cookies expiring, Assignment Help, Ask Question on Find the cookies expiring, Get Answer, Expert's Help, Find the cookies expiring Discussions

Write discussion on Find the cookies expiring
Your posts are moderated
Related Questions
Shopping Cart Purpose – Allows user to browse while keeping track of the items in which they will purchase at the end on the order page link and this will give a final price for al

Describe URL and hostname part? The hostname part of the URL should be a valid Internet hostname. It can also be an IP address like as 204.29.207.217 or 128.235.252.184. The

Shemrock Inc. is a brake pad manufacturing company. This company uses raw materials, such as carbon powder, iron, ash, and resin. It wants to develop an inventory management system

Question: (i) Prepare brief notes on the Logical Storage Manager. (ii) Show benefits that can be achieve by using the LSM Manager. (iii) LSM organizes and optimizes disk

1. Write a bash shell script which searches through your folders for files with the extension *.tex, and then interactively deletes the corresponding *.aux, *.dvi and *.log files (

Many applications require entering a number from a button and then the device counts that number down.  If it is a 2 digit number it can be stored in a single register.  If it is l

I need help with some simple matlab statements

Task: This assignment is about writing programmes and Web Services in C#: 1) Develop a console programme that reads a sequence of integer numbers from the console and sorts

Write a program to check whether a car will crash. There is an obstacle at a certain distance (say 100 m) and the car is travelling at a certain speed (try it with some different s

My kinect hand cursor only works for main menu but when it goes to another page it wouldn''t work.. especially when there is for camera feed