Request for Technical Design Documents and code for 11 PHP coding problems

Annullerat Publicerat Jun 4, 2010 Betalades vid leverans
Annullerat Betalades vid leverans

11 tasks to be programmed in PHP: 10 functions and 1 small application that uses 2 screens. For each task I am looking for three prices, for:

?

(1) A Technical Design Document which explains how it would be programmed.

?

(2) A URL where I can test the code for the task.

?

(3) The code with installation instructions.

?

Number (1) describes the HTML tags or PHP commands or whatever language or technology that you decide to use?

SAMPLE (FAKE) Technical Design Document:

?

? “HTML tags TABLE, TR and TD create the table, PHP function AAA translates the URL into HTML, PHP function BBB returns the width of the screen, and PHP function CCC positions the table.

?

1. Begin with tag TABLE.

2. For Each Row

? ? a. Start the row with tag TR.

3. For each Column

? ? a. Start the cell with tag TD.

4. End each row with tag /TR.

5. End the table with tag /TABLE.

## Deliverables

*Request for Technical Design Documents and code for 11 PHP coding problems*

?

I have described below 11 tasks to be programmed in PHP: 10 functions and 1 small application that uses 2 screens.? It will be hosted and will be accessed by the user with a browser.? For each task I am looking for three prices, for:

?

(1) A Technical Design Document which explains how it would be programmed.

?

(2) A URL where I can test the code for the task.

?

(3) The code with installation instructions.

?

Number (1) describes the HTML tags or PHP commands or whatever language or technology that you decide to use and functions that must be used to code it the way you have in mind, plus a description of the overall algorithm of the function.? A good programmer in the chosen technologies would be able to code it using just what you say.? Here is an example.? It is not real, but shows the type of information to include.

?

SAMPLE (FAKE) Technical Design Document:

?

? “HTML tags TABLE, TR and TD create the table, PHP function AAA translates the URL into HTML, PHP function BBB returns the width of the screen, and PHP function CCC positions the table.

?

1. Begin with tag TABLE.

2. For Each Row

? ? a. Start the row with tag TR.

3. For each Column

? ? a. Start the cell with tag TD.

? ? b. The content is the sum of the array elements for this cell number.

? ? c. End the cell with tag /TD.

4. End each row with tag /TR.

5. End the table with tag /TABLE.

6. Position the table with function CCC.? The arguments are the table and the width of the screen divided by the number of columns.??

?

The above is the minimum you would provide.? If you wish, feel free to provide more detail as to how the task would be accomplished.

?

Note that each part of the spec must be described in this document and how it would be accomplished.

?

For number (2), for the 10 functions, there has to be a way for me to enter in the inputs for the function, and then it displays the value returned by the function.

?

A. Please indicate how to determine if a given hosting company will be able to run the code you are describing.

?

B. Please indicate how to tell if a given browser with given settings will work.

?

1. Function1(URL) = The html string that is contained in the page at url URL.

?

2. Function2(FILEPATH,URL) = The html string that is contained in the file at FILEPATH on the user’s PC.? This file was created by the user by saving the page at using their browser.? URL is the url that was saved to create the file or URL is “??.? Which types of files can you translate into their html using this function?

?

3. Function3(HTML,URL) : HTML is a string of html.? URL is the url from which html string HTML came or URL is “??.? Display HTML on the screen as it would be displayed by a browser.? If put into a cell in an html table (using html tags TABLE, TR and TD) the appearance of the rest of the display outside of the cell is not affected by the HTML displayed inside the cell.

?

4. Function4(X1,Y1,X2,Y2): Display a rectangle whose upper left corner is at point (X1,Y1) on the monitor and whose lower right corner is at point (X2,Y2).? In general point (x,y) on the monitor, where x and y are each between 0 and 100, is the point that is x/100 of the monitor’s width from the left edge and y/100 of the monitor’s height from the top edge.? For example, Function4(25,20,75,80) displays a rectangle whose width is 1/2 of the screen width, whose height is 3/5 of the screen’s height, and which is centered horizontally and vertically on the display.

?

5. Function5(HTML,URL) = (WIDE,TALL): HTML is a string of html that you imagine is displayed on the screen.? URL is the url from which HTML came or URL is “??.? Around that display imagine the smallest rectangle that it fits in.? In other words, the width of the rectangle is the maximum width of the display, and the height of the rectangle is the maximum height of the display.? If HTML were displayed inside the rectangle then it would just reach the top, bottom, left and right edges of the rectangle.? WIDE and TALL are the width and height of that rectangle to the nearest integer, where the height and width of the monitor (entire display) is 100.? You don’t display the HTML or the rectangle ??" you only calculate how big it would be if you did.? You can even not think of it as there being a rectangle, and just define WIDE and TALL to be the maximum width and height of the HTML display where the width and height of the entire monitor equals 100.

?

6. Function6(HTML,URL,FAC) : URL is the url from which html string HTML came, or URL is “??.? Display HTML on the screen as it would be displayed by a browser, except the width of the display is multiplied by FAC/100 and the height of the display is multiplied by FAC/100.

?

7. Function7(HTML,URL,WIDEFAC,TALLFAC) : URL is the url from which html string HTML came, or URL is “??.? Display html string HTML on the screen as it would be displayed by a browser, except the width of the display is multiplied by WIDEFAC/100 and the height of the display is multiplied by TALLFAC/100.

?

8. Function8(HTML,URL,X1,Y1,X2,Y2): URL is the url from which html string HTML came, or URL is “??.? Display html string HTML, scrolling horizontally or vertically if necessary, within an imaginary rectangle as defined in Function 4.

?

9. Function9(HTML,URL) = array $F[].? URL is the url from which html string HTML came, or URL is “??.? $F contains strings embedded (contained) in html string HTML from three sources:

?

a. Field Values that would be displayed by a browser displaying this string, which appear between > and < in the input string.? If the < tag does not visually separate the value between > and < from the value after the < . . . > to its right, then the two literals between the > and < pairs are part of a single Field Value.? For example, >ABC<XXX>DEF< is two Field Values, ABC and DEF if <XXX> separates ABC from DEF, and is one Field Value ABCDEF if <XXX> does not separate ABC and DEF.

?

b. URLs in the context of syntax <a href=URL> expanding URL to its full “http:// . . .?? form.

?

c.? Email addresses explicitly referenced in the HTML string constructs.? (You are not attempting to detect email addresses because a string looks like an email address e.g. contains the “@?? character.? Only its location and context in the HTML, the characters before and after it, (not the characters contained in the string) tells you that it is an email address.)? Furthermore each URL (b) or Email address (c), will not be included if there is a Field Value (a) that contains that string (URL or Email address) as a substring and so is already in $F elsewhere.

?

These strings are identified and numbered 1, 2, 3, etc. sorted by their position within the HTML string, where $F[1] contains the (a, b or c) string that is left-most (first) in HTML the input to this function.? An array is returned: $F[ Field Value number ] = ( Field Value , TYPE) where TYPE is “F?? or “U?? or “E?? for Field Value/URL/Email.? For example, the Google site HTML string would produce something like $F[1]=(??Web??,??F??), $F[2]=(??Images??,??F??), $F[3]=(??Videos??,??F??), $F[4]=(??Maps??,??F??), $F[5]=(??News??,??F??) etc. because these 5 text (English) phrases are what the user sees displayed on his screen before him when he connects to GOOGLE.COM.? Tasks 10 and 11 will use this $F for all references to Field Value number and Field Value.

?

10. Function10( 21 inputs ) :

?

? 1. X1: Integer 0 to 100

? 2. Y1: Integer 0 to 100

? 3. X2: Integer 0 to 100

? 4. Y2: Integer 0 to 100

? 5. FIT: 0 or 1

? 6. FIRST: integer (a Field Value number as in Function9, or 0)

? 7. LAST: integer (a Field Value number as in Function9, or 0)

? 8. HTML: An HTML string.

? 9. URL: The url from which html string HTML came or URL is “??.

10. DIMERASE: 0 or 1

11. DIMCOLOR: color name

12. DIMSIZE: integer

13. DIMBOLD: integer

14. COLORSIZE: integer

15. COLORBOLD: integer

16. NONCOLORSIZE: integer

17. NONCOLORBOLD: integer

18. READWHICH: “A?? or “N?? or “C??

19. READCOLOR: color name

20. COLOR[Field Value number] = color name

21. FNM = Field Value Number from $F in Function9 or 0.

?

This function returns an HTML string that when output displays the following: A rectangle is displayed based on X1,Y1,X2 andY2, as described in Function4 above.? You can assume that you have Function4 available if you wish to use it, or you can provide your own code to display the rectangle.? The HTML is displayed inside the rectangle, as it would be displayed by a browser.

?

If the HTML display is larger than the rectangle then do a, b and c as follows: (a) the display scrolls horizontally or vertically as needed, (b) if FNM>0 then the display is scrolled down so that Field Value number FNM is as close to the center of the display as possible, and (c) if FNM is 0 then the display is scrolled all the way up so that the beginning of the display is the beginning of the HTML.

?

However, the submit buttons and links are disabled, though still displayed as they would be by a browser, and if the user enters TABs he will not reach any of the forms, and display of each Field Value, as defined by Function9, may be altered based on the inputs, as follows:

?

The Field Value number FVN is determined using $F from Function9.? You can assume you have access to Function9 or include your own code for Function9.? The first check that passes determines how the Field Value is displayed:

?

1. Diminished Text

If FIRST is greater than 0 and FVN is less than FIRST, or if LAST is greater than 0 and FVN is greater than LAST, then the Field Value is displayed diminished as follows:

?

If DIMERASE is 1: Nothing is displayed and any images associated with the text are also not displayed.? If two sequential Field Values are diminished ( Field Value number X and number X+1) then nothing between them is displayed.

?

If DIMERASE is 0: (a) the color of the Field Value is DIMCOLOR, (b) no text other than diminished text is displayed in color DIMCOLOR, (c) the size of the text is increased by DIMSIZE if DIMSIZE is greater than 0 and reduced by -DIMSIZE if DIMSIZE is less than 0, and (d) the thickness of the text is increased by DIMBOLD if DIMBOLD is greater than 0 and reduced by -DIMBOLD if DIMBOLD is less than 0.? Comments in the program indicate the possible range of values for DIMSIZE and DIMBOLD.

?

2. Text with Color, Size, Thickness and a Read

?

2.a. If COLOR[FVN] is set then the color of the text is COLOR[FVN].? Otherwise the color is the same as if displayed by a browser unless it would be the same color as DIMCOLOR (as stated in (b) above) in which case it is displayed using the default color (black) of the browser.

?

2.b. If COLOR[FVN] is set then the size and thickness are altered by COLORSIZE and COLORBOLD the same way that DIMSIZE and DIMBOLD are used in (c) and (d) above.? Otherwise the size and thickness are altered by NONCOLORSIZE and NONCOLORBOLD the same way.

?

2.c If READWHICH=??A??, or if READWHICH=??C?? and COLOR[FVN] is set and READCOLOR = COLOR[FVN], then the user can click on this Field Value and the form submitted indicates the value of FVN.? That is, I will be able to write code to display the string returned by this function, and when they click on a Field Value in the display I can detect that and determine the Field Value number clicked on.? Comments in the function describe how the Field Value number is represented in the variables submitted.? I will be able to write code that captures the Field Value number of the Field Value that they clicked.? I will use that code.? You will supply only the function for me to display the page with different colors and sizes, and I will supply its inputs, call it, display its value and detect which Field Value number the user just clicked on. ? The $F array produced by Function9 is the mapping from FVN to values displayed or embedded, as $F[FVN]=(Values displayed or embedded,TYPE).

?

11. Browser

?

A program (script, file) containing executed PHP code and functions that this code uses.? You can assume access to any of the functions Function1 to Function10 above, or you can describe/write your own code for everything.

?

The code begins by assigning a positive integer to $wide and $tall, and 0 or 1 to $fit.? Then it displays the FIRST SCREEN: a rectangle, centered horizontally and vertically, that is $wide/100 of a screen wide, and $tall/100 of a screen tall.? For example, $wide=100 and $tall=100 would display a rectangle with the 4 sides all the way to the left, right, top and bottom of the screen. Above the rectangle are 3 reads which allow the user to enter in any 1 (and only 1) of the following 3 values:

?

1. A URL e.g. “[login to view URL]?

?

2. An html string that you might see when you VIEW SOURCE in Internet Explorer e.g. “<!doctype html><html onmousemove="google&&[login to view URL](event)"><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title>??.

?

3. A file on the user’s PC that was created using SAVE AS while visiting a URL using a browser.? Note that the file type can be any one allowed by the browser.

?

In each of the 3 cases (reads), the input is translated into an HTML string and the SECOND SCREEN is displayed in place of the first screen.? Only one of the two screens is displayed at a time.? The rectangle is filled with the display of this file as it would be displayed by a browser.? If the display does not fit within the rectangle, then if $fit=0 then the display is scrolled within the rectangle, and if $fit=1 the display is shrunk to fit in the rectangle.? If the display is smaller than the rectangle, then the rectangle shrinks to the size of the display, width or height.

?

The user can then use the rectangle as a browser and click on a link, submit or input into a form.? Above the rectangle are now two submits: STOP and BACK.? If STOP is clicked, the program returns “??.? If BACK is clicked, the display goes back to the previous URL that was left via a LINK, and if there is no previous URL then it goes back to the first screen above.

PHP XML

Projekt-id: #3477075

About the project

6 offerter Distansprojekt Aktivt Jul 11, 2010

6 frilansare har lagt bud på i genomsnitt $854 för det här jobbet

hassana19

See private message.

$595 USD inom 14 dagar
(16 omdömen)
4.1
expertphpcodervw

See private message.

$828.75 USD inom 14 dagar
(9 omdömen)
3.5
thinking2716

See private message.

$637.5 USD inom 14 dagar
(3 omdömen)
2.3
sarathdrvw

See private message.

$552.5 USD inom 14 dagar
(5 omdömen)
1.8
Rampayoda

See private message.

$1870 USD inom 14 dagar
(2 omdömen)
3.9
webdevelopesllph

See private message.

$637.5 USD inom 14 dagar
(2 omdömen)
0.0