Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Final Exam Review Fall 2003: Applying your knowledge

Questions, comments, answers?

Back to Fall2003 Final Exam Review


I: a.
b. the program knew what was red based on the RBG values

II: DNS server is down

III: databases are often used in large websites because they are fast and efficient way to access data in a standardized mechanism that can be accessed from more than one place in more than one way.

(I) The computer knows a red, green, and blue, value for every pixel in the picture. When it removes the red eye, all it does is looks at every pixel in the selected area to see if it is a certain distance from a color red defined by the program. If the color falls within the correct range, it is replaced by the selected eye color. If not, it is left alone. Thus all the red eye is removed while everything else is left alone.

(III) Large websites that are accessed by many people often use databases because they are fast and efficient at being accessed by many different people in different places at the same time. The HTML is generated by a programming language such as SQL. That way no one has to type in new HTML every time the database is updated, but it is done automatically.


The programming doesn't have to be done by SQL, but it can be. Nice discussion of color ranges for red eye! Mark Guzdial

I. Photo editing software thinks of pixel colors in terms of their Red, Green, and Blue values. In the selected area, the computer swapped the known RGB range values for red, with the color values that the user wants.

II. The actual web site has a numeric IP address. The name is simply an alias to the IP address. This alias is linked to the IP address by a DNS, Domain Name Server. Because the Domain Name Server is down, http://www.cnn.com will not work. Therefore, the user must type in the specific IP address to access the web site.

III. The web site is simply a reflection of the information that's stored in the database. In other words, the real information is actually stored "behind the scenes" in a database, and not on an HTML generated web site. All the web site does is reflect what the information the database has. The web site is automatically updated via SQL, Secure Query Language, or any other auto-HTML updater, which instantaneously takes the information in the database, and auto-updates it into a new HTML file, the web site that you see.

SQL is not an auto-HTML updater. Mark Guzdial

I am pasting my attempt at part three. I talk about the virtues of databases, because I am really not sure how they are used to write websites. Please help! #12
(III) Databases are capable of high levels of complexity and correlation. They are fast due to their use of indices (for example, important fields of data can indexed). They are standardized which means many different people can access them through different languages. Fields of data are given names and the databases can store how the data interrelates. And databases can become more complex by simply adding more tables or employing a join. Basically, databases make conditional tests possible and storing/processing easier. The website was authored by a database (perhaps using a system like SQL) by accessing and choosing the data that one wants to display on the site. (ii) The HTML is actually created as pieces of data are assembled as strings.

That's pretty good, Cassy, but you might want to make clear that we're talking about different programming languages.
Let's think about this completely pragmatically. You're CNN. It's your job to have an up-to-date website all the time. You want reporters and editors working as fast as possible, wherever they are. You want to generate the website at a regular interval, with whatever stories are available. You don't want the reporters and editors worrying about technical details. How do you do it?
You set up a database for stories to be pumped into and for editors to edit. You have techies write programs to pull out stories and generate the actual web pages, throwing in whatever advertisements and links and other things that you need—things that the reporters and editors don't need or want to care about. Your HTML generating programs can run at any time on whatever stories are available in the database. POOF! Thus we have CNN.com.
Does that help? Mark Guzdial


Yes! Thank you. #12

haha, we students are bankin a lotta faith in the acronym SQL...kinda funny.

And SQL stands for...? Mark Guzdial


structured query language

Which one is it? Stuctured query language or secure query language?






Structured, not secure. SQL isn't necessarily secure :-) Mark Guzdial

(I) (i) By setting the color of those pixels in the circle that are very close to the pre defined red (RGB = 255,0,0) to the color selected from the palette. (ii) By finding the distance between the pre defined red and the color at each pixel and if that distance is less than some threshold value then the color of that pixel is set to the replacement color. This threshold value replaces colors of only those pixels that are very close to red.

(II) The domain server where all the domain names, i.e. www.cnn.com, are registered is down. The domain server is the place where all the IP addresses, i.e. 64.236.24.20, are assigned a domain name. IP address is the location of the website on the Internet. If the domain name server is down then the Internet doesn’t recognize the domain name of the website. Then Internet can locate the website only by IP address of the website.
It's not that "the Internet doesn't recognize the domain name of the website." The Internet is a LARGE collection of computers. It can't be "down" unless every computer on it was down. Your browser (YOUR computer) can't get the IP address, and that's why you can't reach the website. In a real sense, the Internet ONLY understands IP addresses. Without a DNS, you can't get the address, so you can't find the server you want. Mark Guzdial

(III) (a) By connecting the database stored on a local computer or a network to the company’s website through the Internet. If all the information on the website comes from that database and if the database program is broken, then obviously the website will have no information to display. (b) I am guessing that the user writes the html for the queries, the queries are translated into SQL by the Internet, the Internet submits the SQL to the database, the database generates the result for the SQL, and the results are translated back into html and displayed on the website by the Internet. I guess I am not sure about the part Internet doing all this. Can someone pls. give me some understandable explanation for this, meaning not too “techie”?

Also, can someone correct me if I am wrong on any of the parts explained before?
You have a lot of faith in the Internet :-) The user doesn't write HTML for the queries. Some programmer (not a reporter) writes a program that queries the database for stories (probably using SQL for the query, but the overall program for generating the HTML could be written in Python or Perl or other languages), then combines that text with HTML (like in the example we did in class where I took a story and headling out of a database). The combined HTML file is then stored on a server for users (via their Web browsers) to access. The Internet per se doesn't play a big role in the Web page generation process. Mark Guzdial

whats the difference between background replacement and doing the blue or green screen thing to replace the background and put someone on the moon???

That was a question on the last quiz. BOTH algorithms are background replacement. Background subtraction is where you compare two pictures (one with the subject/person/foreground, and one with just the background) and bring in pixels from a new background if comparable pixels are the same. Chromakey is where the background has a known color, so you simply replace pixels of the known color. In other words, background subtraction and chromakey are two different algorithms for background replacement. Mark Guzdial



BHGBHGH



Link to this Page