Archive

Posts Tagged ‘the stock’

Buyin And Selling

June 16th, 2011 Comments off

The buying of stock implies the purchase of part of the ownership of the company. The price for the first issue are generally determine by the board of directors of the company. After the initial sale, the stocks are traded freely in the market. At this point the market value of the stock is determined by the force of supply and demand in various money points,by way of custom these points are measured. Stock are generally listed in alphabetical order in newspapers.
In the case of selling stock, as a general principle operators in the stock market buy at low prices and sell at high prices. A successful investor must pay attention to his portfolio of securities and meticulously deciding which and when to sell or buy. A reason to sell could be that the stock has not performed as well as expected or simply because money is needed for some other purposes.

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.

A Real Big Community Website

July 23rd, 2009 Comments off

CREATE BIG WEBSITE

I want to create a real big website. This website gonna be a community site.

This is the features required (sorry for my bad english, i’m french) :

- Every visitors can see all the stock in the website

- The website have a member area (needed to add stock). This member area need “email, username, pass, last name, first name)

- The member can add stuff like :

- PowerPoint files (.pps)
- Vid

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.

Oscommerce Moneybookers Mod

July 21st, 2009 Comments off

I have the moneybookers IPN mod installed: http://addons.oscommerce.com/info/5200 (same latest mod, but slightly modified).

This payment method current behavior is:
After selecting this method on checkout_payment.php and confirming the page, it moves to checkout_confirmation.php and at the same time it registers the order details and… it subtracts the stock.
I don’t like that it subtracts the stock at this stage, it’s too early and creates problems when a customer wants to go back and modify his order or change a payment method.

Desired behavior:
After selecting this method on checkout_payment.php and confirming the page, it moves to checkout_confirmation.php and at the same time it registers the order details BUT does NOT subtracts the stock yet.
Stock should be subtracted from the shop exactly at the moment the payment is finalized on Moneybookers (moneybookers sends back to the cart an IPN with “Processing” signal when a payment is completed, details: http://www.moneybookers.com/merchant/en/automated_payments_interface_manual.pdf).

If you have any questions, please ask before bidding.

Important:
Programmer is required to work directly on my dev server (do not download any files to your own server/s).
Programmer is required to email me a detailed changelog when the work is successfully done.

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.

Virtual Stock Exchange

April 6th, 2009 Comments off

We’d like to make a global footprint for ourselves by producing a web application that allows student to test their stock investing skills. Our idea is for prospective

Bear