Archive

Posts Tagged ‘following format’

Content Delivery System

August 29th, 2009 Comments off

I’m looking for some software which can be installed on systems (Windows 2000 / 2003 / XP / Vista / 7) by subscribers and will automatically deliver requested content by launching their default web browser… in essence, a more intelligent, remotely configurable version of the DeskTopPop product.

Content delivery can occur:

1) after a pre-determined period of time (hours), or

2) at a pre-set UTC time

…provided that a period of recent and continued user activity has been detected.

For example, I might decide to have the user’s browser display a URL every 8 or 12 hours, provided that their computer is currently being used and has been continuously used for a short period of time i.e. 5 minutes.

I do not want to have browser windows open simply based on a timer so some monitoring of the keyboard and/or mouse will be required.

The actual current “waiting period” between browser launches and the required period of user activity (both in minutes) before triggering will be specified within the string returned by my server script which also specifies the target URL.

Please also note that the “waiting period” for “time delayed” URLs is the minimum time to wait since the previous URL was launched and is not cumulative i.e. if the waiting time is set to 8 hours but the user does not use their computer for 20 hours then only one URL should be launched (after the required “continuous use” period) and the next URL should not trigger for at least another 8 hours.

The utility should be unobtrusive to the user i.e. must install as an application but be invisible (nothing on the task bar, in the system tray or in the Alt-Tab window / Task Manager) during normal operation.

It is very important that the utility is able to work with all the major browsers and should not trigger false-positives for anti-virus / spyware / adware / malware systems – it should also be firewall-friendly.

A unique, system generated ID should be created during the 1st run process and passed to my server (when appropriate) during communications so that duplicate content can be avoided for each user.

The overall process should be something along the following lines:

a) at 1st run, generate and store a unique “user” ID in the registry, along with the current UTC time (indicating the “last launch” time)

b) immediately contact my server via an http post, passing the user ID

c) server will return the appropriate “waiting” and “continuous use” periods (both as minutes) followed by the “time delayed” URL in the following format: 10|3|yahoo.com

– the returned URL, waiting and continuous use periods should be stored in the registry

d) immediately contact my server via an http post, passing NO user ID

e) server will either return the UTC “activation time” and “continuous use” period (as minutes) followed by the “time specific” URL in the following format: 200911281457|2|google.com OR a “nothing scheduled” instruction in the following format: ||

– if a time-specific instruction was returned, the URL, UTC activation time and continuous use period should be stored (or replaced) in the registry (separately to the “time delayed” information)

f) monitor the time passed since 1st run / last URL launch and most recent period of continuous user activity until:
i) 60 minutes have passed, in which case go to step d)
ii) the pending “time delayed” URL should be launched, in which case go to step g)
iii) the pending “time specific” URL should be launched, in which case go to step h)

g) launch the “time delayed” URL in the default browser, update the “last launch” time in the registry, then go to step b)

h) launch the “time specific” URL in the default browser, update the “last launch” time in the registry, then go to step d)

Notes:

1) the initial “time delayed” URL should not be launched until “waiting” period minutes after the UTC time stored during the 1st run

2) “time specific” URLs should be ignored (i.e. not stored in the registry) unless the launch time is in the future

3) “time specific” URLs take precidence over “time delayed” URLs so if a “time specific” URL is scheduled to launch within the next 24 hours (note that it may have been scheduled for several days already) then any pending “time delayed” URL launch should be postponed until “waiting” period after the “time specific” launch takes place

4) the registry location should be configurable to allow multiple copies of the system to run concurrently and deliver different scheduled content

The following PHP script can be used for testing purposes:

<?PHP
if (isset($_REQUEST['id']))
{
echo “10|3|yahoo.com”;
}
else
{
if (rand(0, 1) == 0)
echo gmdate(“YmdHi”, time() + 480) . “|2|google.com”;
else
echo “||”;
}
exit;
?>

Delphi is the preferred development language but not a necessity.

All, fully commented, source code should be provided.

Any 3rd party code included in the project must be public domain / GNU or similar i.e. no cost for commercial use.

Size and speed / simplicity of installation is important so any potential 3rd party downloads / code extensions i.e. dotNET, are not acceptable.

Confirmation of successful testing on Windows 2000, 2003, XP, Vista & 7 is a requirement.

Simple Binary Tree Inventory

August 12th, 2009 Comments off

You are to write a program that creates and maintains a binary search tree of items in a super market. Each item has a name and a value. All item names will be lowercase alphabetic strings of less than 30 letters. All values will be positive real numbers representing prices. Also, for each node in the tree, you are to maintain the value of all of the items in that subtree. Your tree should be “sorted” based on alphabetical ordering of the item names as determined by strcmp. Your program must allow the user to do the following:

1) Add an item to the inventory
2) Delete an item from the inventory
3) Print out all of the items in the inventory in alphabetical order.
4) Print out the value of all items underneath the subtree of a given item.

For example, if the user adds these items:

a) “soap”, $2.95
b) “raisins”, $2.00
c) “jellybeans”, $5.00
d) “tea”, $1.95

Input File Specification (inventory.txt)
The first line of the input file will contain a single positive integer, n, representing the number of commands to execute. The following n lines will contain one command each, in the other they are to be executed.

The first number of each of these lines will be either 1, 2, 3 or 4, to signify the choices listed above.

If the choice is 1, it will be followed by the name of the item added and its price (as a number), both separated by spaces.

If the choice is 2, it will be followed by the name of the item to be deleted.

Choice 3 will be on a line by itself.

Choice 4 will be followed by a single string storing an item.

Output Specification
For each command, your program should provide some output.
The output provided by each command should be separated by a blank line.

For choice 1, if the item to be added is NOT in the tree, output a line with the following format:

item has been added to the stock.

where item is the name of the item added. If the item is ALREADY in the tree, output a line with the following format:

Sorry, item is already in stock. No changes made.

For choice 2, if the item to be deleted is IN the tree and is successfully deleted, output a line with the following format:

item has been deleted from the stock.

If the item is NOT in the tree, then output a line with the following format:

Sorry, item couldn’t be deleted because it’s not in stock.

For choice 3, the first line should read:

Here is a list of the items in stock:

Each following line should have information about one item and the list should be in alphabetical order by item name. Here is the format for one of these lines:

item $price

The price should be printed out to two decimal places exactly.

Finally, for choice 4, print out the sum of the values of all the items in the subtree rooted by the designated item. If this item is NOT in the tree, $0.00 should be printed out. Here is the format for the output for this option.

The value of all the items underneath item is $price.

Implementation Restrictions
You must store the data in nodes of a binary tree. Each binary tree node must store 3 pieces of information: the name of the item, its price, and the sum of the prices of all the items in its subtree.

Sample Input File
11
2 soap
1 soap 2.95
1 raisins 2.00
1 jellybeans 5.00
1 tea 1.95
4 raisins
3
2 raisins
4 soap
4 cereal
1 soap 3.50

Sample Output
Sorry, soap couldn’t be deleted because it’s not in stock.

soap has been added to the stock.

raisins has been added to the stock.

jellybeans has been added to the stock.

tea has been added to the stock.

The value of all the items underneath raisins is $7.00.

Here is a list of the items in stock:
jellybeans $5.00
raisins $2.00
soap $2.95
tea $1.95

raisins has been deleted from the stock.

The value of all the items underneath soap is $9.90.

The value of all the items underneath cereal is $0.00.

Sorry, soap is already in stock. No changes made.

CAN I HAVE BEFOR AUGUST 15,2009
THANKS

Binary Search Tree

July 23rd, 2009 Comments off

(Need by Friday 10pm if possible)

The Problem
You are to write a program that creates and maintains a binary search tree of items in a super market. Each item has a name and a value. All item names will be lowercase alphabetic strings of less than 30 letters. All values will be positive real numbers representing prices. Also, for each node in the tree, you are to maintain the value of all of the items in that subtree. Your tree should be “sorted” based on alphabetical ordering of the item names as determined by strcmp. Your program must allow the user to do the following:

1) Add an item to the inventory
2) Delete an item from the inventory
3) Print out all of the items in the inventory in alphabetical order.
4) Print out the value of all items underneath the subtree of a given item.

For example, if the user adds these items:

a) “soap”, $2.95
b) “raisins”, $2.00
c) “jellybeans”, $5.00
d) “tea”, $1.95

in this order, then the structure of the binary tree would be as follows:

soap 2.95
total: 11.90
/
raisins 2.00 tea 1.95
total: 7.00 total 1.95
/
jellybeans 5.00
total: 5.00

Input File Specification (inventory.txt)
The first line of the input file will contain a single positive integer, n, representing the number of commands to execute. The following n lines will contain one command each, in the other they are to be executed.

The first number of each of these lines will be either 1, 2, 3 or 4, to signify the choices listed above.

If the choice is 1, it will be followed by the name of the item added and its price (as a number), both separated by spaces.

If the choice is 2, it will be followed by the name of the item to be deleted.

Choice 3 will be on a line by itself.

Choice 4 will be followed by a single string storing an item.

Output Specification
For each command, your program should provide some output.
The output provided by each command should be separated by a blank line.

For choice 1, if the item to be added is NOT in the tree, output a line with the following format:

item has been added to the stock.

where item is the name of the item added. If the item is ALREADY in the tree, output a line with the following format:

Sorry, item is already in stock. No changes made.

For choice 2, if the item to be deleted is IN the tree and is successfully deleted, output a line with the following format:

item has been deleted from the stock.

If the item is NOT in the tree, then output a line with the following format:

Sorry, item couldn’t be deleted because it’s not in stock.

For choice 3, the first line should read:

Here is a list of the items in stock:

Each following line should have information about one item and the list should be in alphabetical order by item name. Here is the format for one of these lines:

item $price

The price should be printed out to two decimal places exactly.

Finally, for choice 4, print out the sum of the values of all the items in the subtree rooted by the designated item. If this item is NOT in the tree, $0.00 should be printed out. Here is the format for the output for this option.

The value of all the items underneath item is $price.

Implementation Restrictions
You must store the data in nodes of a binary tree. Each binary tree node must store 3 pieces of information: the name of the item, its price, and the sum of the prices of all the items in its subtree.

Sample Input File
11
2 soap
1 soap 2.95
1 raisins 2.00
1 jellybeans 5.00
1 tea 1.95
4 raisins
3
2 raisins
4 soap
4 cereal
1 soap 3.50

Sample Output
Sorry, soap couldn’t be deleted because it’s not in stock.

soap has been added to the stock.

raisins has been added to the stock.

jellybeans has been added to the stock.

tea has been added to the stock.

The value of all the items underneath raisins is $7.00.

Here is a list of the items in stock:
jellybeans $5.00
raisins $2.00
soap $2.95
tea $1.95

raisins has been deleted from the stock.

The value of all the items underneath soap is $9.90.

The value of all the items underneath cereal is $0.00.

Sorry, soap is already in stock. No changes made.

Inventory.c

July 22nd, 2009 Comments off

Project due to me by 6 p.m. EST US time on Jul-22-09.
You are to write a C program that creates and maintains a binary search tree of items in a super market. Each item has a name and a value. All item names will be lowercase alphabetic strings of less than 30 letters. All values will be positive real numbers representing prices. Also, for each node in the tree, you are to maintain the value of all of the items in that subtree. Your tree should be “sorted” based on alphabetical ordering of the item names as determined by strcmp. Your program must allow the user to do the following:

1) Add an item to the inventory
2) Delete an item from the inventory
3) Print out all of the items in the inventory in alphabetical order.
4) Print out the value of all items underneath the subtree of a given item.

For example, if the user adds these items:

a) “soap”, $2.95
b) “raisins”, $2.00
c) “jellybeans”, $5.00
d) “tea”, $1.95

Input File Specification (inventory.txt)
The first line of the input file will contain a single positive integer, n, representing the number of commands to execute. The following n lines will contain one command each, in the other they are to be executed.

The first number of each of these lines will be either 1, 2, 3 or 4, to signify the choices listed above.

If the choice is 1, it will be followed by the name of the item added and its price (as a number), both separated by spaces.

If the choice is 2, it will be followed by the name of the item to be deleted.

Choice 3 will be on a line by itself.

Choice 4 will be followed by a single string storing an item.

Output Specification
For each command, your program should provide some output.
The output provided by each command should be separated by a blank line.

For choice 1, if the item to be added is NOT in the tree, output a line with the following format:

item has been added to the stock.

where item is the name of the item added. If the item is ALREADY in the tree, output a line with the following format:

Sorry, item is already in stock. No changes made.

For choice 2, if the item to be deleted is IN the tree and is successfully deleted, output a line with the following format:

item has been deleted from the stock.

If the item is NOT in the tree, then output a line with the following format:

Sorry, item couldn’t be deleted because it’s not in stock.

For choice 3, the first line should read:

Here is a list of the items in stock:

Each following line should have information about one item and the list should be in alphabetical order by item name. Here is the format for one of these lines:

item $price

The price should be printed out to two decimal places exactly.

Finally, for choice 4, print out the sum of the values of all the items in the subtree rooted by the designated item. If this item is NOT in the tree, $0.00 should be printed out. Here is the format for the output for this option.

The value of all the items underneath item is $price.

Implementation Restrictions
You must store the data in nodes of a binary tree. Each binary tree node must store 3 pieces of information: the name of the item, its price, and the sum of the prices of all the items in its subtree.

Sample Input File
11
2 soap
1 soap 2.95
1 raisins 2.00
1 jellybeans 5.00
1 tea 1.95
4 raisins
3
2 raisins
4 soap
4 cereal
1 soap 3.50

Sample Output
Sorry, soap couldn’t be deleted because it’s not in stock.

soap has been added to the stock.

raisins has been added to the stock.

jellybeans has been added to the stock.

tea has been added to the stock.

The value of all the items underneath raisins is $7.00.

Here is a list of the items in stock:
jellybeans $5.00
raisins $2.00
soap $2.95
tea $1.95

raisins has been deleted from the stock.

The value of all the items underneath soap is $9.90.

The value of all the items underneath cereal is $0.00.

Sorry, soap is already in stock. No changes made.

Simple Binary Tree Inventory

July 21st, 2009 Comments off

You are to write a program that creates and maintains a binary search tree of items in a super market. Each item has a name and a value. All item names will be lowercase alphabetic strings of less than 30 letters. All values will be positive real numbers representing prices. Also, for each node in the tree, you are to maintain the value of all of the items in that subtree. Your tree should be “sorted” based on alphabetical ordering of the item names as determined by strcmp. Your program must allow the user to do the following:

1) Add an item to the inventory
2) Delete an item from the inventory
3) Print out all of the items in the inventory in alphabetical order.
4) Print out the value of all items underneath the subtree of a given item.

For example, if the user adds these items:

a) “soap”, $2.95
b) “raisins”, $2.00
c) “jellybeans”, $5.00
d) “tea”, $1.95

Input File Specification (inventory.txt)
The first line of the input file will contain a single positive integer, n, representing the number of commands to execute. The following n lines will contain one command each, in the other they are to be executed.

The first number of each of these lines will be either 1, 2, 3 or 4, to signify the choices listed above.

If the choice is 1, it will be followed by the name of the item added and its price (as a number), both separated by spaces.

If the choice is 2, it will be followed by the name of the item to be deleted.

Choice 3 will be on a line by itself.

Choice 4 will be followed by a single string storing an item.

Output Specification
For each command, your program should provide some output.
The output provided by each command should be separated by a blank line.

For choice 1, if the item to be added is NOT in the tree, output a line with the following format:

item has been added to the stock.

where item is the name of the item added. If the item is ALREADY in the tree, output a line with the following format:

Sorry, item is already in stock. No changes made.

For choice 2, if the item to be deleted is IN the tree and is successfully deleted, output a line with the following format:

item has been deleted from the stock.

If the item is NOT in the tree, then output a line with the following format:

Sorry, item couldn’t be deleted because it’s not in stock.

For choice 3, the first line should read:

Here is a list of the items in stock:

Each following line should have information about one item and the list should be in alphabetical order by item name. Here is the format for one of these lines:

item $price

The price should be printed out to two decimal places exactly.

Finally, for choice 4, print out the sum of the values of all the items in the subtree rooted by the designated item. If this item is NOT in the tree, $0.00 should be printed out. Here is the format for the output for this option.

The value of all the items underneath item is $price.

Implementation Restrictions
You must store the data in nodes of a binary tree. Each binary tree node must store 3 pieces of information: the name of the item, its price, and the sum of the prices of all the items in its subtree.

Sample Input File
11
2 soap
1 soap 2.95
1 raisins 2.00
1 jellybeans 5.00
1 tea 1.95
4 raisins
3
2 raisins
4 soap
4 cereal
1 soap 3.50

Sample Output
Sorry, soap couldn’t be deleted because it’s not in stock.

soap has been added to the stock.

raisins has been added to the stock.

jellybeans has been added to the stock.

tea has been added to the stock.

The value of all the items underneath raisins is $7.00.

Here is a list of the items in stock:
jellybeans $5.00
raisins $2.00
soap $2.95
tea $1.95

raisins has been deleted from the stock.

The value of all the items underneath soap is $9.90.

The value of all the items underneath cereal is $0.00.

Sorry, soap is already in stock. No changes made.

Binary Searchtree Problem In C

July 20th, 2009 Comments off

You are to write a program that creates and maintains a binary search tree of items in a super market. Each item has a name and a value. All item names will be lowercase alphabetic strings of less than 30 letters. All values will be positive real numbers representing prices. Also, for each node in the tree, you are to maintain the value of all of the items in that subtree. Your tree should be “sorted” based on alphabetical ordering of the item names as determined by strcmp. Your program must allow the user to do the following:

1) Add an item to the inventory
2) Delete an item from the inventory
3) Print out all of the items in the inventory in alphabetical order.
4) Print out the value of all items underneath the subtree of a given item.

For example, if the user adds these items:

a) “soap”, $2.95
b) “raisins”, $2.00
c) “jellybeans”, $5.00
d) “tea”, $1.95

in this order, then the structure of the binary tree would be as follows:

soap 2.95
total: 11.90
/
raisins 2.00 tea 1.95
total: 7.00 total 1.95
/
jellybeans 5.00
total: 5.00

Input File Specification (inventory.txt)
The first line of the input file will contain a single positive integer, n, representing the number of commands to execute. The following n lines will contain one command each, in the other they are to be executed.

The first number of each of these lines will be either 1, 2, 3 or 4, to signify the choices listed above.

If the choice is 1, it will be followed by the name of the item added and its price (as a number), both separated by spaces.

If the choice is 2, it will be followed by the name of the item to be deleted.

Choice 3 will be on a line by itself.

Choice 4 will be followed by a single string storing an item.

Output Specification
For each command, your program should provide some output.
The output provided by each command should be separated by a blank line.

For choice 1, if the item to be added is NOT in the tree, output a line with the following format:

item has been added to the stock.

where item is the name of the item added. If the item is ALREADY in the tree, output a line with the following format:

Sorry, item is already in stock. No changes made.

For choice 2, if the item to be deleted is IN the tree and is successfully deleted, output a line with the following format:

item has been deleted from the stock.

If the item is NOT in the tree, then output a line with the following format:

Sorry, item couldn’t be deleted because it’s not in stock.

For choice 3, the first line should read:

Here is a list of the items in stock:

Each following line should have information about one item and the list should be in alphabetical order by item name. Here is the format for one of these lines:

item $price

The price should be printed out to two decimal places exactly.

Finally, for choice 4, print out the sum of the values of all the items in the subtree rooted by the designated item. If this item is NOT in the tree, $0.00 should be printed out. Here is the format for the output for this option.

The value of all the items underneath item is $price.

Implementation Restrictions
You must store the data in nodes of a binary tree. Each binary tree node must store 3 pieces of information: the name of the item, its price, and the sum of the prices of all the items in its subtree.

Sample Input File
11
2 soap
1 soap 2.95
1 raisins 2.00
1 jellybeans 5.00
1 tea 1.95
4 raisins
3
2 raisins
4 soap
4 cereal
1 soap 3.50

Sample Output
Sorry, soap couldn’t be deleted because it’s not in stock.

soap has been added to the stock.

raisins has been added to the stock.

jellybeans has been added to the stock.

tea has been added to the stock.

The value of all the items underneath raisins is $7.00.

Here is a list of the items in stock:
jellybeans $5.00
raisins $2.00
soap $2.95
tea $1.95

raisins has been deleted from the stock.

The value of all the items underneath soap is $9.90.

The value of all the items underneath cereal is $0.00.

Sorry, soap is already in stock. No changes made.

PS: I may not answer right away to you bids, so after you bid please allow some time for answer.

Program Using Queues In C

July 7th, 2009 Comments off

The Problem
A university lacks a credible grocery store on campus. After a year of getting lousy over-priced food in the convenience store in the Student Union, you and all of your friends are frustrated. One of your friends majoring in business comes up with the brilliant idea of opening a grocery store on campus. But, they need your help to decide if their idea is viable or not. Your job will be to run various simulations of customers in line.

The model for the store is as follows:

Normally, there will be three lines in operation or customers to buy their groceries. Each line will have a capacity of 8 customers. The first line (line A) will only be for customers with 10 or fewer items. The other two lines (line B and C) will be for all customers. When a customer is ready to check out, here is how they decide what line to go to:

If the customer has 10 or fewer items and the

Desktop Bot Needed

May 19th, 2009 Comments off

I need a desktop bot that will do the following.

1. There will be a .txt file of CL accounts in the following format username:password

2.There will be a second .txt file with gmail or hotmail accounts in the following format username:password

3. The Bot will login to the CL accounts on the first list and change the email address for the account to one from the second list.

4. After it has changed tht email for the CL account there will be a verification email forwarded to a catchall email account, the bot will need to login to the email account, click the corresponding link and then alter a new password ( same password as email account from second list).

5. After it has successfully changed the account, It will produce a .txt file of the new craiglist accounts and new passwords in the following format username:password, if any have failed it will give a failed.txt file with the failure reason.

6. The bot needs to be able to get the links from either a gmail catchall account or a hotmail catchall account.

7. The bot will be very simple to use, it will have a browse button to load the CLaccounts.txt and a browse button to load the new emailaccounts.txt, it will have a username/password for the catchall account for either hotmail or gmail

Desktop Bot Needed Today

May 16th, 2009 Comments off

I need a desktop bot that will do the following, please only bid if you can finish the bot today.

1. There will be a .txt file of CL accounts in the following format username:password
2.There will be a second .txt file with gmail accounts in the following format username:password
3. The Bot will login to the CL accounts on the first list and change the email address for the account to one from the second list.
4. After it has changed tht email for the CL account it will login to a catchall email account to click the verification list that CL send on an email change and enter a new password which will be taken from the corresponding email from the second list.
5. It will produce a .txt file of the new craiglist accounts and new passwords in the following format username:password, if any have failed it will give a failed.txt file with the failure reason.

Again only bid if you can complete today.

Thanks

Bear