![]() ![]() |
| |||||||||
| Hotspots: Slides and Code TA Corner Comments? Announcements FAQ Static Webspace | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| No – the upload worked, but it's in the wrong format for the TA to grade. Sit down with your TA at breakout or office hours and figure out how to make JES turnin work. If it doesn't work at home, do it on-campus. Mark Guzdial |
| If you can't load the function, how do you know it works, and how do you know that you've completed HW1? It's not done until it runs correctly. (See the Grading Policy page.) Bring your laptop computer to Breakout or Office Hours, or bring a printout. Not being able to load typically means that you got the indentation wrong, or you have the wrong number of parentheses somewhere. Mark Guzdial |
| If you have a laptop, please bring your program to the breakout session or to someones office hour! We can try to help. If you don't have a laptop, print it out and bring it (although that will be harder to debug). Blair MacIntyre |
| The red value is getRed(pixel). Mark Guzdial |
| Read the FAQ. Off-campus, you'll be asked for a username/password which is attach/carmen. Mark Guzdial |
| We were having problems with overseas folks using our CoWebs for storage spaces for illegal MP3's, software, and images. We locked them to prevent non-campus folks from using our upload space. Mark Guzdial |
| Nope – it has to work for any picture, so the TA's will try it with a picture of their own. Mark Guzdial |
| That means that once you getRed(pixel) you want to setBlue(to the pixel value of red that you just found). Think about how can you combine those two functions so that you will be setting the blue value to that of the red value? Summer McWilliams |
| If your picture was named "...diskspinner.jpg" If ixed it for you, but you need to go back and add your name. When you upload a picture, make sure that you have "upload to the page" and "add a reference to the upload at the end of the page" both selected so that it will automatically show up on the page. Also, (this is in reference to when you have a blank box with the red X show up) you can't have spaces in your name of the file. Summer McWilliams |
| Exactly, you should not call a specific picture in your program. Summer McWilliams |
| This question has been answered a couple of times already-y'all please make sure you are keeping up with previously asked questions so things aren't asked repeatedly please! Anytime you attach to the coweb the username is "attach" and the password is "carmen". Summer McWilliams |
| You can either manually make and show the picture from the command area, or if you're brave, you could write another function that loads and displays the picture before and after hw1(). Check out some of the earlier lecture slides on how to do picture from the command area. Adam Wilson |
| You sure it wasn't "C://JES//MedisSources//barbara.jpg" The direction of the slashes matter. Mark Guzdial |
| You're okay with using single slashes, or using the backslashes (like Windows normally does) with an "r" in front of the string. We'll talk more about this in a couple weeks. Mark Guzdial |
| Be sure to ask in breakout this week! You need to setBlue(pixel,getRed(pixel)). Mark Guzdial |
| Absolutely NOT. The TA's are expecting to execute hw1(mypicture) in the command area. Mark Guzdial |
| Exactly – forgetting to Load is the most common cause of such errors. Mark Guzdial |
| You're calling the function with the variable "picture", yet "picture" is not defined outside the function. For homework 1, your function needs to input a picture as input, so you need to makePicture first (i.e. in the command area) and used that as input. Houman Khalili |
| The real problem in the above code is the picture is passed in as input AND is then defined inside the function. If you do that, the picture will be redefined. It won't be the input. Mark Guzdial |
| You need to make the name of your picture have no spaces. Right now it has a space between library and fountain. You need to rename it "libraryfountain1". Ashley Coker |
| We want the picture outside of the function. Program the code so that it takes in a picture. The TA will goto the command area and do something like >>>file = makePicture(pickAFile()). They will then do >>>hw1(file) to test your code Larry Olson |
| This question has been asked many times now. If you are off-campus, you will be required to put in a user name and password. The user name is attach and the password is carmen. Ashley Coker |
| Yep! Ashley Coker |
| hmmm...that's interesting because those commands should work and bring up a picture. It did that to me, too a couple times. I'm not sure how I fixed it exactly except that I just kept trying. I closed and re-opened JES, too. Anyone have any ideas??? Ashley Coker |
| Great! Weird, but glad to know you got it working. Did you just reboot JES or did you shut down and restart your entire machine? Ashley Coker |
| In the command area, you need to first select and make a picture- type picture=makePicture(pickAFile())-and then you need to do run the program- type hw1(picture). Then, you can either do show(picture) or if you already have the picture up-repaint(picture). Summer McWilliams |
| Think about what getRed(pixel) does...It gives you the red value of a pixel right, you used it in the top of the program. But, the red value is going to be different in almost every pixel, so you can't find each one and set each blue value to that value on your own, especially since the TA won't be using the same picture you will. You can instead use getRed(p) soemway to get the red value of a particualr pixel and instead of setting the blue value to some number- by typing setBlue(pixel, somenumber) you can set it to the value you got for red right? Summer McWilliams |
| So basically you're setting the blue value to getRed of the pixel. Ashley Coker |
| For the above and below comments, we will try to get that fixed soon. Sorry! In the future, y'all, please don't lock the coweb pages (unless it's your personal page that you don't want people to change). Ashley Coker |
| You're setting the blue value within the "posterizing function" which has not been done yet. You don't have one specific red value to set to. You want more of a generalization. Therefore, you would set blue to getRed(pixel) or getRed(p) or getRed(px) whatever you named your pixels to be. Ashley Coker |
| No, your writePictureTo(...) should have actually been done in the command area rather than the program area, but since you wrote it in your program, please take it out. Just think, if everyone leaves theirs in, when the TA is grading, they will end up with 50-somthing new pictures on their computers... Also, y'all, they said last night that someone had locked the picture posting page and we would get it fixed ASAP so you could post yours if you want to, sorry that it happened. Once you see that someone else has posted the exact same question you are going to ask, you really don't need to ask it again, and you especially don't need to be the 6th person to ask it. We will let you know as soon as it gets fixed ok! Summer McWilliams |
| Second what Summer said! I answered this question after the 2nd person asked it. Then the same question was asked again and again. Please look at what other people have asked because the question was answered! Ashley Coker |
| No, posting the picture to the gallery is optional. It's just for fun. Ashley Coker |
| The picture gallery has been unlocked. You can now post your pictures to the gallery. Ashley Coker |
| You function ends without showing or repainting the picture. Just end, just like the posterize example in the book. Mark Guzdial |
writePictureTo(picture,"filename.jpg"). Ways that you can find out more about writePictureTo:
|
| Also note: Putting a print statement in your program won't help seeing the program run, because prints don't appear until after the program is done. You can use the function printNow (look it up in the book – use the index, or look through the Movies chapter) will let you print immediately to see how things are going. Mark Guzdial |
| It's fine if you turn it in more than once. We will only check the second submission. And you should not have write to in your program. Summer McWilliams |
| It's unlocked. Ashley Coker |
| Ke: are you working on you own computer or a lab computer? I've never seen that error message before, but changing the location of your JES folder might help. Also, if hw1 is an attachment to your turnin, you might want to try putting that somewhere else on your computer. Also, the HW gallery is unlocked right now. Adam Wilson |
| Go to the link for "Homeworks" on the home page. Then scroll down to Homework 2. There is a link there for the questions page on HW2. Ashley Coker |
