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

Fall 2004 Homework 4 Questions

Got questions on your linkpage? Ask 'em here!

i have tried the examples from the book and the powerpoint and book, as well as the hints given in breakout and when i save and then got to my web browser to open the page all that comes up is the text that i wrote and a box with a red "x" in it. what am i doing wrong?

How many pictures and sounds do we need and where do we get them? Should we just pick some from the Media Sources folder?

There is no specification as to the number it must process. To be thorough your program should work with any number from 0 on up. It would be good practice to test with a mix of different files (i.e. sounds longer and shorter than 3 seconds, different numbers of sounds and images, perhaps even a few files which are neither wav nor jpg just to make sure it handles that case properly.)Bill Leahy

can the short forms of the .wav files be previously created and simply be linked to or does the actual file where we are creating the html file have to contain the function to create the short version of the .wav file

It has to create the .wav files.Bill Leahy

So is the function "linksPage" supposed to be a general function that does all the requested tasks and then writes the file "index.html" or what? I am a little confused as to what the function is supposed to do.

Yes, that's exactly right. Imagine you have a folder of your Aunt Mildred's birthday party. It contains jpg's of all the partygoers as well as Mildred blowing out the candles. It also has lots of wav files of people wishing Aunt Mildred a happy birthday. Now you could go through by hand and create short little versions of the wav files and then create an index.html page which would have links to the wav and jpg files. But why bother when you are a coder? So you write this program and all you do is run it, passing it the string which is the path to the directory. It automatically reads the directory, creates the little short sound files and also a web page (index.html) which has all the links, etc. Does that make sense?Bill Leahy

Thank you. Also, are the pictures suppose to be exactly "half" the size, or are we allowed to shrink the photos like they do in the example in the book by making the image height 100?

You should make the height half of what it originally was. That would only be 100 in the case where the original height was 200. Kelly Lyons

When is homework 4 due?
Friday, October 15, 2004 at the normal time.Bill Leahy

I'm not sure how to begin the assignment. What is the DOCTYPE and what do I use in it?
Read all of the assigned readings, review lectures slides and come to lecture and breakout this week and we will, hopefully, answer all of your questions. If not just post them here. DOCTYPE is a line of information that needs to be at the top of an HTML file. It tells the browser information about what version of HTML is contained in the file, etc. For this assignment when you need a DOCTYPE statement best bet is to copy/paste one from the lecture slides.Bill Leahy

Can we create a new folder with some of the sounds & pics from media sources if we don't happen to have an existing folder with any besides that?

Yeah I'm confused about that part. Is our TA going to choose the directory for input, or do we hard-code the directory into the function?

Answering both of the above posts: This is a general purpose function. you give it any directory and it goes therough the directory and does what the instructions call for on wav and jpg files. Which also implies it should ignore other files! For developing the program you should have at least one (if not more) test directories in which you can put whatever images and sounds you would like. When the TA tests it they will call the function and pass it the name of some directory. So you don't hardcode it.Bill Leahy


Your TA will choose a directory to run your code on. In fact, they will run it on more than one directory. You can create as many directories as you want to test your code on. Do NOT hardcode any of these directories into your program. Your program should be able to handle any directory with any number of sounds, images, and other things (even a directory with nothing in it) Kelly Lyons

I'll try to make this make sense: For the reference, should it be the path to the folder or to the pic w/in the folder? Then, for the anchor, is it >path to pic but make the anchor pic 1/2 size?

The idea is that the index.html file that you create will remain in the same folder as the pictures and sounds thus you won't need to specifiy a path for any of the links–just a filename.Bill Leahy

Can you please explain what the final product is supposed to be, or give us a visual example?

It is supposed to be a text file named index.html which will contain valid HTML. When this file is loaded by a browser it should display links to picture and sound files as described in the assignment. We will be talking about related topics in lecture and breakout this week.Bill Leahy

Is the anchor a visual pic?

An anchor is basically what generates a link. I would type in an example except that the coweb would convert it into a link since it would be valid html. Look in yout textbook to what an anchor looks like. But in general an anchor consists of two pieces of information: One is the actual link to be displayed which could be text or an image (or both) and the other is where to go when the link is clicked on. The where-to-go part is the href while the link text and/or image is what is between the a and /a tags.Bill Leahy



For the sounds that are less than three seconds, do we need any links for them in the html file, and if so do we keep them as long?

Yes, you should still have two links for each sound file. All the links you create in the html file are forever?Bill Leahy

so, should the link image portion of the anchor just be >pic.jpgUnknown function: if

Link to this Page