Archive

Posts Tagged ‘the value’

Ruby Rails Sticky Form

September 7th, 2011 Comments off

I am working on a project in Rails 3.0 and need some help with a few issues. The most important is that I can’t seem to figure out how to make the form sticky so that if there is an error in the controller, the information entered remains displayed. I have tried returning a parameter and setting the value of the field to that param, however, even though I can see the value by inspecting with FireBug, the value does not display on the screen. There must be an easy way to do this that I am missing.

I also need some help acessing the standard ruby library so that I can use the www_decode on a query string received via a curl api call.

Can you help me with these kind of issues as I work to complete this project?

Please give me some idea of your ROR experience.

Categories: Decoding, Form, Ruby Tags: , , , , , ,

Inventory Program

September 4th, 2009 Comments off

Part 3

Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product with the same name as the method previously created for the product class. The subclass method should also add a 5% restocking fee to the value of the inventory of that product.

Modify the output to display this additional feature you have chosen and the restocking fee.

Part 4

Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the GUI should display the value of the entire inventory, the additional attribute, and the restocking fee.

Part 5

Modify the Inventory Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, and the last item in the inventory. If the first item is displayed and the user clicks on the Previous button, the last item should display. If the last item is displayed and the user clicks on the Next button, the first item
should display.

Add a company logo to the GUI using Java graphics classes.

Part 6 (Final Part)

Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each unit. An item added to the inventory should have an item number one more than the previous last item.

Add a Save button to the GUI that saves the inventory to a C:datainventory.dat file.

Use exception handling to create the directory and file if necessary.

Add a search button to the GUI that allows the user to search for an item in the inventory by the product name. If the product is not found, the GUI should display an appropriate message. If the product is found, the GUI should display that product’s information in the GUI.

Development Of Integration

August 24th, 2009 Comments off

We are looking for a programmer to develop the integration between MS Office/Open Office documents (word, excel, etc) and the application Enterprise Forms (http://www.longnhi.com/), which is a web based workflow engine written in C#. This integration should be done according to the following requirements:

1. In the application Enterprise Forms we have created the following 2 templates:

–> 1.1. Parameters, with the following mandatory fields, among others:

—-> 1.1.1. Document Type
—-> 1.1.2. Revision Number
—-> 1.1.3. Format for the content: Office/EF Form
—-> 1.1.4. MS Office/Open Office template (Word, Excel, …) with predefined fields
—-> 1.1.5. Users that can save the MS Office/Open Office document locally

–> 1.2. Document named “Test”, with the following fields, among others:

—-> 1.2.1. Document Type
—-> 1.2.2. Title
—-> 1.2.3. Control Number
—-> 1.2.4. Revision Number
—-> 1.2.5. Status
—-> 1.2.6. Date Created
—-> 1.2.7. Date Released
—-> 1.2.8. Author
—-> 1.2.9. Launch in Office (MS Office/Open Office template (Word, Excel, …))
—-> 1.2.10. Approvers

2. When creating ANY DOCUMENT in Enterprise Forms:

–> 2.1. The Enterprise Forms document must receive the Revision Number (point 1.1.2.) and the MS Office/Open Office template (point 1.1.4), both defined in the Parameters document correspondent to the document type being created (point 1.1.). And the status field must have the value “In Process”.

–> 2.2. The Enterprise Forms document must have a button named “Launch in Office” (that is shown only if the option defined in point 1.1.3. of the Parameters document correspondent to the document type of the EF document is Office) and when clicked must launch the MS Office/Open Office attachment mentioned in point 2.1. above. The MS Office/Open Office attachment must be launched in a new window with the corresponding application (word/excel, …) and the Enterprise Forms document from were it was launched must also stay open.

–> 2.3. The MS Office/Open Office attachment launched must inherit automatically and immediately all the values of the fields from the Enterprise Forms document. These inherited fields cannot be editable in the MS Office/Open Office document (cannot be changed by anyone).

–> 2.4. The author of the Enterprise Forms document completes the content of the MS Office/Open Office document and when he saves and closes the MS Office/Open Office document it must be stored/embedded in the field “Launch in Office” of the Enterprise Forms document from where it was created.

–> 2.5. The update of the fields must be done always from the Enterprise Forms document to the MS Office/Open Office document, never from the MS Office/Open Office document to the Enterprise Forms document.

–> 2.6. Users must not be able to close the Enterprise Forms document or the application if there is an MS Office/Open Office document open. If they try to do it they must receive a message saying “You must first close the corresponding Office document”

–> 2.7. After the MS Office/Open Office document is saved the first time, every time the “Launch in Office” button (that is shown only if the option defined in point 1.1.3. of the Parameters document correspondent to the document type of the EF document is “Office”) is clicked it must open the saved/ambedded MS Office/Open Office document and not the template from the parameters document anymore. The MS Office/Open Office document must always be opened in a new window with the corresponding application (word/excel, …) and the Enterprise Forms document from were it was launched must also stay opened.

–> 2.8. Every time there is a change/update in the fields of the Enterprise Forms document the correspondent fields in the MS Office/Open Office document embedded in it must also be automatically and immediately updated, so that the fields that are common between the Enterprise Forms document and the correspondent MS Office/Open Office document have always the same values.

–> 2.9. Every time the MS Office/Open Office document is saved and closed it must update/replace the MS Office/Open Office document previously stored/embedded on the Enterprise Forms document (in the field Launch in Office).

3. After completing both the MS Office/Open Office document and the Enterprise Forms document, the Enterprise Forms document will go through an approval cycle and when approved the status field will become “Released”.

4. On the Enterprise Forms documents with the status field with the value “Released” a “New Revision” button must be made available, which when clicked must make a copy of the complete Enterprise Forms document (including the MS Office/Open Office Document embedded), and this copy should become available for editing again with the status “In Process”. In this new copy the field Revision Number (point 1.2.4.) must be incremented by 1.

5. When an Enterprise Forms document with the status “Released”or a previous version of the same document with the status “Archived” are opened, if the option defined in point 1.1.3. of the Parameters document correspondent to the document type of the EF document is “Office”, the correspondent MS Office/Open Office Document should be automatically opened in read only mode (no one can change it or save it in the Enterprise Forms document nor locally) using a corresponding viewer, and the Enterprise Forms document from were it was launched must also stay opened.

–> 5.1. In this case, the “Launch in Office” button must also be available and if it is used it must open the MS Office/Open Office Document in read only mode (no one can change it or save it locally), using a corresponding viewer, and the Enterprise Forms document from were it was launched must also stay opened.

6. When an Enterprise Forms document with a status different then “Released” or “Archived” is opened, the MS Office/Open Office Document should not be opened automatically and the users can open it manually from the “Launch in Office” button if and when they want to.

–> 6.1. In this case, when clicking the “Launch in Office” button, if the Enterprise Forms document is new and the option “Format for the content” in the Parameters document is defined as “Office”(point 1.1.3.), the MS Office/Open Office attachment/template (point 1.1.4.) defined in the corresponding Parameters document is launched in a new window, using a corresponding viewer and the Enterprise Forms document from were it was launched must also stay opened. If the Enterprise Forms document is not new and the option “Format for the content” in the Parameters document is defined as “Office” (point 1.13.), the MS Office/Open Office document previously saved/embedded in the Enterprise Forms document is launched in a new window, using a corresponding viewer and the Enterprise Forms document from were it was launched must also stay opened.

–> 6.2. When opening the MS Office/Open Office document, if the user at that moment has permissions to edit the Enterprise Forms document, the MS Office/Open Office document must be opened in edit mode and the user can change it and save it in the Enterprise Forms document, but must not be able to save it locally (except if the user is defined in the field “Users/Roles that can save the MS Office/Open Office document locally” (point 1.1.5.) of the Parameters document correspondent to the Enterprise Forms document in question). If the user doesn’t have permission to edit the Enterprise Forms document, the MS Office/Open Office document must be opened in read only mode and the user cannot change it or save it on the Enterprise Forms document nor locally.

–> 6.3. In this case, the author of the Enterprise Forms document must have also the option to delete the MS Office/Open Office document that had been saved/embedded in the Enterprise Forms document or to replace the MS Office/Open Office document that had been saved/embedded in the Enterprise Forms document with the current MS Office/Open Office document attached in the correspondent Parameters document (point 1.1.4.).

–> 6.4. The “Launch in Office” button must be hidden if when opening the Enterprise Forms document, in the Parameters document (point 1.1.) corresponding to this document the option “Format for the content” is defined as “EF Form” (point 1.1.3.).

7. This integration between Enterprise Forms documents and MS Office/Open Office documents must be available for use with any Enterprise Forms document/template if in the option defined in point 1.1.3. of the Parameters document correspondent to the Enterprise Forms document/template the value selected is “Office”. If this integration is being used for a certain Enterprise Forms document/template and the user changes the Parameters Document not to use integration for this Enterprise Forms document/template any more, from that moment on, when creating Enterprise Forms documents of that type they must not have integration any more, but the Enterprise Forms documents of that type that were created before this change must continue having integration and continue having the MS Office/Open Office document that had been saved/embedded in the Enterprise Forms document.

Regards,
Filipa Sousa

Categories: .NET, C/C++, Javascript, MS SQL, SQL Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

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

Programming Project 1248975251

July 30th, 2009 Comments off

Part 1 – Create a Java application that displays the product number, the name of the product, the number of units in stock, the price of each unit, and the value of the Inventory (the number of units in stock multiplied by the price of each unit).

Part 2 – Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the
price of each unit, and the value of the Inventory of that product. In addition, the output should display the value of the entire Inventory.

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.

Multiple Ajax Or Js Dropdowns

July 14th, 2009 Comments off

I will have about four dropdowns on a page. This is what I want to happen:

The user selects an option from DROPDOWN 1 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page
The user selects an option from DROPDOWN 2 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page next to the value of DROPDOWN 1
The user selects an option from DROPDOWN 3 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page next to the value of DROPDOWN 2
The user selects an option from DROPDOWN 4 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page next to the value of DROPDOWN 3

I don’t want the user to ever click a submit button. It should work with some type of onchange event or whatever you think will work best. I prefer the post method if you’re not using Ajax. The values of the select fields will be hardcoded-no MySQL. You can test with dummy data.

No portfolios or company info. Use the phrase not a bot in your bid if you want to be considered for this project. Escrow will be provided if you request it in your bid. I’d like this done now, so if you can’t do it in less than a few hours, please do not bid. I’ll expect you to meet the deadline that you set. People promising immediate delivery should have the project delivered with 20 minutes.

Multiple Js Or Ajax Dropdowns

July 13th, 2009 Comments off

I will have about four dropdowns on a page. This is what I want to happen:

The user selects an option from DROPDOWN 1 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page
The user selects an option from DROPDOWN 2 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page next to the value of DROPDOWN 1
The user selects an option from DROPDOWN 3 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page next to the value of DROPDOWN 2
The user selects an option from DROPDOWN 4 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page next to the value of DROPDOWN 3

I don’t want the user to ever click a submit button. It should work with some type of onchange event or whatever you think will work best. I prefer the post method if you’re not using Ajax. The values of the select fields will be hardcoded-no MySQL. You can test with dummy data.

No portfolios or company info. Use the phrase not a bot in your bid if you want to be considered for this project. Escrow will be provided if you request it in your bid. I’d like this done now, so if you can’t do it in less than a few hours, please do not bid. I’ll expect you to meet the deadline that you set. People promising immediate delivery should have the project delivered with 20 minutes.

Multiple Ajax Or Js Dropdowns

July 13th, 2009 Comments off

I will have about four dropdowns on a page. This is what I want to happen:

The user selects an option from DROPDOWN 1 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page
The user selects an option from DROPDOWN 2 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page next to the value of DROPDOWN 2
The user selects an option from DROPDOWN 3 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page next to the value of DROPDOWN 3
The user selects an option from DROPDOWN 4 (the user just selects the option. The user does not click a submit button at all)
The value is displayed on the page next to the value of DROPDOWN 4

I don’t want the user to ever click a submit button. It should work with some type of onchange event or whatever you think will work best. I prefer the post method if you’re not using Ajax. The values of the select fields will be hardcoded-no MySQL. You can test with dummy data.

No portfolios or company info. Use the phrase not a bot in your bid if you want to be considered for this project. Escrow will be provided if you request it in your bid. I’d like this done now, so if you can’t do it in less than a few hours, please do not bid. I’ll expect you to meet the deadline that you set. People promising immediate delivery should have the project delivered with 20 minutes.

Thanks.

Inventory Program

July 13th, 2009 Comments off

Part 1.
Choose a product that lends itself to an inventory (for example, products at your workplace, office supplies, music CDs, DVD movies, or software).
* Create a product class that holds the item number, the name of the product, the number of units in stock, and the price of each unit. *Create a Java application that displays the product number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory (the number of units in stock multiplied by the price of each unit). Pay attention to the good programming practices in the text to ensure your source code is readable and well documented.
* Post as an attachment in java format.

Part 2.
Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory.
* Create a method to calculate the value of the entire inventory.
* Create another method to sort the array items by the name of the product.
* Post as an attachment in java format.

Part 3.
Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product with the same name as the method previously created for the product class. The subclass method should also add a 5% restocking fee to the value of the inventory of that product.
* Modify the output to display this additional feature you have chosen and the restocking fee.
* Post as an attachment in java format.

Part 4.
Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the GUI should display the value of the entire inventory, the additional attribute, and the restocking fee.
* Post as an attachment in java format.

Part 5.
Modify the Inventory Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, and the last item in the inventory. If the first item is displayed and the user clicks on the Previous button, the last item should display. If the last item is displayed and the user clicks on the Next button, the first item should display.
* Add a company logo to the GUI using Java graphics classes.
* Post as an attachment in java format.

Part 6.
Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each unit. An item added to the inventory should have an item number one more than the previous last item.
* Add a Save button to the GUI that saves the inventory to a C:datainventory.dat file.
* Use exception handling to create the directory and file if necessary.
* Add a search button to the GUI that allows the user to search for an item in the inventory by the product name. If the product is not found, the GUI should display an appropriate message. If the product is found, the GUI should display that product

Collection Classes

June 14th, 2009 Comments off

I am looking for help with an Assignment I am working on. Let me know if you can help.

Problem Description:

Create a DOS console application that keeps track of a list of names. Your program should be able to add a name, remove a name at the current position, to concatenate two name lists, to retrieve a name from the list, and to print out the whole list of names in the list.

Implementation requirement:

You are going to use two classes to implement this assignment: TestStringArraySeq, StringArraySeq. The TestStringArraySeq is the application driver class and contains the main() method. The StringArraySeq is the worker class. You have to use sequence collection data structure to implement this worker class. The storage data structure for the collection class should be array. In this class, you need to implement the following methods:

StringArraySeq
public StringArraySeq ()
This constructor takes no argument. It initializes the instance variable manyItems to 0; initializes the instance variable currentIndex to 0, and allocates 10 cells for the arrary data.

StringArraySeq
public StringArraySeq (int initialCapacity)
This constructor takes one argument. It first checks to see whether the parameter is positive. If it is negative, the an exception is thrown. It then initializes the instance variable manyItems to 0; initializes the instance variable currentIndex to 0, and allocates initialCapacity number of cells for arrary data.

getManyItems
public int getManyItems ()
This simple method returns the value of instance variable manyItems. Setters and getters are used to enforce information hiding.

setManyItems
public void setManyItems (int m)
This simple method sets the instance variable manyItems to the value passed in.

getCurrentIndex
public int getCurrentIndex ()
This simple method returns the value of instance variable currentIndex.

setCurrentIndex
public void setCurrentIndex (int c)
This simple method sets the instance variable currentIndex to the value passed in.

addAfter
public void addAfter(String element)
addAfter places a new element after the current element. If there is no current element, then the addAfter method places the new element at the end of the sequence. In all cases, when the method finishes, the new element will be the current element.

start
public void start()
this sequence help method sets the current element at the front of the sequence.

isCurrent
public boolean isCurrent()
this is an accessor method used to determine whether this sequence has a current element. It should be called before calling the method getCurrent.

ensureCapacity
public void ensureCapacity(int minimumCapacity)
this help method changes the capacity of the sequence to the minimumCapacity. This method is only needed if the sequence is implemented using array.

toString
public String toString()
This method returns all a String with the names in the sequence class. Each name appears on a separate line.

getCurrent
public String getCurrent()
this is an accessor method used to retrieve the value of current element.

advance
public void advance()
this sequence help method moves forward so that the current element is now the next element in the sequence. Before calling this method, you should call isCurrent() method to make sure that there is a current element. If the current element is the last element, then after calling this method there will be no current element. Otherwise, the new element is the element immediately after the original current element.

removeCurrent
public void removeCurrent()
removeCurrent removes the current element from a sequence. Before invoking this method, you should call isCurrent() to make sure that there is a current element. When this method is called, if the current element is the final element, then after the removal there is no longer a current element; otherwise, the new current element is the one that used to be after the removed element.

concatenation
public static StringArraySeq concatenation(StringArraySeq s1, StringArraySeq s2)
concatenation method creates a new sequence that contains all the elements from the first sequence followed by another. The resulting sequence has no current element. The concatenation is somewhat similar to the union of two bags. This method is implemented with static method. As a general rule, the methods that operate on two collections are usually implemented as static methods. This is because of the reason that static methods are able to handle parameters that are null.

clone
public Object clone()
the clone method returns a copy of this sequence. The return object should have separate memory space. Subsequent changes to the copy will not affect the original, nor vice versa. The return value should be typecast to a StringArraySeq before it is used. Since the current element is not specified, you can set currentIndex of the returned object to any value.

getString
public static String getString(StringArraySeq s, String target)
This method returns the first occurrence of the target string in the sequence class. If there is not such a string, the method returns null. To implement this method, you must use the following methods: start(), isCurrent(), advance(), and getCurrent(). If the target is fund, you should set the currentIndex to the position where the target is; do nothing to the currentIndex otherwise.
Note: you can learn how regular methods use static methods from this.

removeString
public boolean removeString(String target)
This method removes the target string from the sequence class if it exists (first occurrence). The method returns true when the operation is successful and returns false if the operation fails. If the removal is successful, the following element is set to be the current element. If there was no following element, then there is now no current element.
Note: suggest to use getString(), removeCurrent() methods.

You can reference all the methods in the bag collection class and the supplement note 3. Most of the methods of the bag class and of the sequence class are almost identical, but you need to be careful for those that are different.
I suggest you to use the following class instance variables for the sequence class:
data

Categories: Java Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Isbn Validation

May 6th, 2009 Comments off

Need a program that validates both ISBN-10 and ISBN-13 from user input. Must follow the instruction below, its an assignment for a class and I have a family emergency I have to go out of town for and don’t know how else to get it done. The instructions are as follows:

INSTRUCTIONS

Write a program which asks for an ISBN number, then strips the
last digit (saving it) then re-calculates that last (check) digit from
the rest of the number. If they match, the function will validate the
ISBN number, otherwise the function will sound an alarm. See the bottom of this file for some sample runs.

Specific directions:

Create a function:

bool chk_isbn(string)

which receives a String Object containing user keyboard input. If the
user is in hir right mind and the keyboard is cooperating, the string
SHOULD contain a valid ISBN (International Standard Book Number).
The chk_isbn() function should parse the number, and calculate the
check digit from the first 10 data characters, ignoring dashes, spaces,and all non-digits in the first 9 columns. Once it has calculated the check digit, it should compare its answer with the check digit in the last column of the String Object. If they agree, the function should return true, otherwise it should return false.

Include a main() function which exercises the chk_isbn()
function, accepting command-line or interactive input from
the user. CLEAN UP THE USER INPUT so that what you pass to the
chk_isbn() function is ONLY a string of digits, no hyphens
or any other non-digit characters.

Your program will be tested against valid ISBNs from the real world,
and invalid ones. It should give the proper output in all cases.

Samples of VALID input:

“0-321-40939-6″
“ISBN 0-321-40939-6″
“ISBN 0 321 40939 6″
“0.321.40939.6″
“0321409396″

See the situation here? We are accepting input from USERS, and about
all we can demand from a USER is that s/he gets the digits right.
They will use any random character for the separator, or none at all,
so we have to write our code to cope. If a user can break our software, or get it to emit the wrong answer, we lose.

So your first task will be to “condition” the input. Lucky for
you, you’re taking this into a string object, and strings have the
string.erase(start,length) method to make it easy to “remove” characters from the string which don’t belong there using something like:

for ( int x = 0 ; x < 10 ; x++)
if (!isdigit(stringvar[x])
stringvar.erase(x, 1) ;

We ALWAYS ALWAYS ALWAYS have our USERS enter their input into
CHARACTER STRINGS. Then, if we are expecting a number from
them, we can examine and “validate” user input before risking
our program’s health by computing with unknown input.

USERS take a little management, and the programmer who learns
this Grate Trooth early will avoid much heayd hoortingz.

Here is some background information on ISBNs, which
illustrates how often even “learned” posters don’t
validate their factoids:

“ISBN is the abbreviation for the International Standard Book
Number. ISBN numbers are 10 digits in length. In an ISBN of
the form X-XX-XXXXXX-X:

-The first block of digits on the left represents the language
of the book (0 is used to represent English). This block is
usually 1 digit in length.

-The second block of digits represents the publisher. This
block is usually 2 or 3 digits in length

-The third block of digits represents is the number assigned
to the book by the publishing company. This is usually 5 or
6 digits in length.

-The fourth block consists of the check digit.”
(from: http://www.cs.queensu.ca/~bradbury/checkdigit/isbncheck.htm)

“An International Standard Book Number consists of 10 characters of information, organized into 4 groups with adjacent groups separated by a dash character.

The first group identifies the continent of publication,
the second group identifies the publisher,
the third group is the book number that the publisher assigns and
the last group with one character is a check digit determined by an algorithm.

Each non dash character, except possibly the last is a digit.

The last is either a digit or the character X for ten.

The value of the check digit comes from the following algorithm.

The ISBN is a number composed of digits 0-9 and X in
either 10 or 13 columns. The LAST COLUMN contains a
“check digit” which is computed from the other 9 or 12
digits. It is computed in a way that will reveal if
numbers are transposed (swapped) by careless humans.

Initialize sum to zero.
for i from 1 to 9(length of number string)
Calculate C = the number in COLUMN number i * COLUMN
Increase the sum by the product of the COLUMN and the value
of the digit in column i of the book number.
Reduce the sum mod 11.
(Replace the sum by its remainder when you divide the sum by 11.)
The value of the check digit C equals 11 – sum mod 11.
If C is 10, then C = the character X>

Example:
I will write down an arbitrary 9 digit number and compute its check digit.
digits = 918273645

Simulate the algorithm.

i digit[ i ] sum
0
1 9 0 + 9 * ( 11 – 1 ) = 90 mod 11 = 2
2 1 2 + 1 * ( 11 – 2 ) = 2 + 9 mod 11 = 11 mod 11 = 0
3 8 0 + 8 * ( 11 – 3 ) = 0 + 64 mod 11 = 64 mod 11 = 9
4 2 9 + 2 * ( 11 – 4 ) = 9 + 14 mod 11 = 23 mod 11 = 1
5 7 1 + 7 * ( 11 – 5 ) = 1 + 42 mod 11 = 43 mod 11 = 10
6 3 10 + 3 * ( 11 – 6 ) = 10 + 15 mod 11 = 25 mod 11 = 3
7 6 3 + 6 * ( 11 – 7 ) = 3 + 24 mod 11 = 27 mod 11 = 5
8 4 5 + 4 * ( 11 – 8 ) = 5 + 12 mod 11 = 17 mod 11 = 6
9 5 6 + 5 * ( 11 – 9 ) = 6 = 10 mod 11 = 16 mod 11 = 5

C = 11 – 5 mod 11 = 6 “

from: http://www.cbu.edu/~yanushka/j0/n.3

Extra Credit: on your own, research and impliment ISBN-13 logic,
and write your program so that it can process either ISBN-10 or
ISBN-13 without any special input from the user other than the number
itself.

Sample data I will use to test your programs:

0-13-615250-3
0-13-615250-8
0-13-613950-X
0-13-615250-X
–0—13-6–15–250-3
0–13—6 152 50.3

…and similar.

Here Are Some Sample Runs:

Script started on Mon 13 Apr 2009 07:25:32 PM PDT

ISBN: 0-13-615-25-8
0-13-615-250-8
0-13-615-250-8
013-615-250-8
013-615-250-8
013-615-250-8
013615-250-8
013615-250-8
013615-250-8
013615-250-8
013615250-8
013615250-8
013615250-8
013615250-8
0136152508
Stripped checkdigit: 8
checking: 013615250
sum: 124
MODDED sum: 3
Original checkdigit: 8 newly calculated checkdigit: 3
ERROR: BAD ISBN CHECKDIGIT!!
: Success
Updated/recalculated ISBN: 0136152503

ISBN: 0-13-615-250-3
0-13-615-250-3
0-13-615-250-3
013-615-250-3
013-615-250-3
013-615-250-3
013615-250-3
013615-250-3
013615-250-3
013615-250-3
013615250-3
013615250-3
013615250-3
013615250-3
0136152503
Stripped checkdigit: 3
checking: 013615250
sum: 124
MODDED sum: 3
Original checkdigit: 3 newly calculated checkdigit: 3
Updated/recalculated ISBN: 0136152503

ISBN: –0–13–615-250-3
–0–13–615-250-3
-0–13–615-250-3
0–13–615-250-3
0–13–615-250-3
0-13–615-250-3
013–615-250-3
013–615-250-3
013–615-250-3
013-615-250-3
013615-250-3
013615-250-3
013615-250-3
013615-250-3
013615250-3
013615250-3
013615250-3
013615250-3
0136152503
Stripped checkdigit: 3
checking: 013615250
sum: 124
MODDED sum: 3
Original checkdigit: 3 newly calculated checkdigit: 3
Updated/recalculated ISBN: 0136152503
ISBN: 9780814408902
9780814408902
9780814408902
9780814408902
9780814408902
9780814408902
9780814408902
9780814408902
9780814408902
9780814408902
9780814408902
9780814408902
9780814408902
9780814408902
Stripped checkdigit: 2
checking: 978081440890
sum: 332
MODDED sum: 2
Original checkdigit: 2 newly calculated checkdigit: 2
Updated/recalculated ISBN: 9780814408902
ISBN: 9780814408–90-2
9780814408–90-2
9780814408–90-2
9780814408–90-2
9780814408–90-2
9780814408–90-2
9780814408–90-2
9780814408–90-2
9780814408–90-2
9780814408–90-2
9780814408–90-2
9780814408–90-2
9780814408-90-2
978081440890-2
978081440890-2
978081440890-2
9780814408902
Stripped checkdigit: 2
checking: 978081440890
sum: 332
MODDED sum: 2
Original checkdigit: 2 newly calculated checkdigit: 2
Updated/recalculated ISBN: 9780814408902

Categories: C/C++ Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Inventory Program

April 21st, 2009 Comments off

Part 3

Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product with the same name as the method previously created for the product class. The subclass method should also add a 5% restocking fee to the value of the inventory of that product.

Modify the output to display this additional feature you have chosen and the restocking fee.

Part 4

Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the GUI should display the value of the entire inventory, the additional attribute, and the restocking fee.

Part 5

Modify the Inventory Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, and the last item in the inventory. If the first item is displayed and the user clicks on the Previous button, the last item should display. If the last item is displayed and the user clicks on the Next button, the first item
should display.

Add a company logo to the GUI using Java graphics classes.

Part 6 (Final Part)

Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each unit. An item added to the inventory should have an item number one more than the previous last item.

Add a Save button to the GUI that saves the inventory to a C:datainventory.dat file.

Use exception handling to create the directory and file if necessary.

Add a search button to the GUI that allows the user to search for an item in the inventory by the product name. If the product is not found, the GUI should display an appropriate message. If the product is found, the GUI should display that product’s information in the GUI.

Inventory Program

April 17th, 2009 Comments off

Inventory Program Part 2

Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory.

Processing Array

April 15th, 2009 Comments off

I need this done ASAP.

I have a multidimensional associative array that I need to process. As I loop thru the array (in PHP) I need to be able to evaluate the value from the sub-array. Depending on the results I will either print out the entire sub-array or throw it out and continue to the next sub-array key.

The first processing that I need to do is on the value for a sub-array key ‘url’. If the value contains ‘/path1/*.pdf’ then it will not print out the entire sub-array it will move on the the next key. If the value contains anything else it will print. (ex: ‘/path1/path2/*.pdf’.

The code needs to be well documented (inline is fine) with verbosely named variables so that I can easily modify it to evaluate other sub-array values, string values, etc. A dump of the array is attached to this project.

The code that I have been using is:

while(list($key, $value) = each($qry_results)) {

while(list($key1, $value1) = each($value)) {

if($key1 == “url”) {

reset($value);

while(list($key1, $value1) = each($value)) {

echo “<b>$key1</b> “;

echo “$value1<br>”;

}

}

}

echo “<br><br>”;

}

Upd. Num Values From Web Pages

April 12th, 2009 Comments off

I have the attached page, which has 3 values and an “Update” button to submit them.

I need a script that updates the 2nd and 3rd value from the web and submit.

Description of the second value: it’s simply the value in euro of 100 US dollars. The script must grab it from a popular value exchange site (for example finance.yahoo.com, oanda.com or xe.com).

The third value is the value in euro of 65 DTS. The value of 1 DTS in euro is defined in this page http://www.imf.org/external/np/fin/data/rms_five.aspx#cvsdr and it’s currently 1.124670 (the script should take the last shown day, even if it’s some days ago). The script must grab it there.
Note: SDR = DTS.

Both the values must be entered with two decimals.

In case the new value is different of more than 2% of the old value or is not in the correct format (number with two decimals), the script must show a red error/warning message showing the old and new values and must NOT submit them both, even if the error is for only one of them.

In addition, it must update in my homepage (make a sample page to test this, I will copy the code by myself to my homepage) an information box that has a text in this form “5/4/09: updated values 65 DTS = 72.63, $100 = 74.17″. I.e. it must update the date (format d/m/yy) and the two numbers.

Must be cross browser.

Escrow offered.

Simple Excel Macro / Vba

March 30th, 2009 Comments off

We need a simple XLS macro. I am estimating that it will be 20-30 lines long. For a VBA / Microsoft programmer I think this would be considered easy. And probably 1 or 2 hours work.

We need this within 10 hours so its a “straight-to-work” job.
Bonus paid if we get it within 3 hours.

We have a spreadsheet of data (attached). Each row is one record.
There are 27 Fields in each row, however we only have the data for 25 of them. The macro needs to calculate the data in the last two colums of each row (These are the “Catalog” and the “UKP value”, currency). The calculation is as follows:

UKP Value: To calculate the UKP value, read the value in the “Partner Share Currency”, this will either be AUD, EUR, USD, NZD, CAN, JPY or UKP. If the currency is set to UKP then just copy the value in “Extended Partner Share” to the red “UKP Value”. If it is not UKP then multiply the “Extended Partner Share” value by the appropiate exchange rate and then write into the “UKP Value” field. These are listed below. The result should be a number with 2 decimal places.

Catalog: To calcualte the Catalog value you need to read the value in the ISRC column and then look it up in a table of values. The table of values is in the 2nd tab of the spreadsheet “ISRC2Cat”. Remove the leading and trailing spaces from the ISRC and then match it to one in the ISRC2Cat table. When you match the value get the corresponding “Cat” number (e.g. Cat 61) and write that (as text) into the Cat field in Column Z. If there is no match
write “NO MATCH”.

Other general requirements
- Leave all other columns alone
- The macro should start from Row 1
- Make the macro read every row of the Input Sheet
- Pls comment the Code WELL

I enclose a sample set of data and ISRC codes however the final version should be capable of dealing with sheets containing up to 65535 rows of data.

I am online for 4 more hours on MSN to answer any questions.

AUD 0.45
USD 0.70
EUR 0.92
NZD 0.40
CAN 0.60
JPY 0.007

Inventory Program Part 2 And 3

March 30th, 2009 Comments off

Part 2- Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory.

Bear