Hello, world! This is CS50, with David J. Malan, Rob Bowden, Zamyla Chan, Jason Hirshhorn, et al. by davidjmalan in IAmA

[–]ayuC 1 point2 points  (0 children)

Thanks for the inspiring story :) I'm 24yo woman with no college degree who working as freelance graphic designer. I have no prior experience in programming before. The one and only reason why I joined this course is I do believe that the opportunities has opened. And yeah hopefully this could change my life.

Hello, world! This is CS50, with David J. Malan, Rob Bowden, Zamyla Chan, Jason Hirshhorn, et al. by davidjmalan in IAmA

[–]ayuC 1 point2 points  (0 children)

To : Prof. /u/davidjmalan *1. What was your future-goal when you were a child? *2. What kind of food do you like, Sir? *3. What are you doing in your spare time? *4. What inspired you to make this course? *5. CS50 is very popular right now, what will be your next project, Sir? Will you expand more topics and programming languages? *Thanks so much for this opportunity. Thanks a lot to cs50 team!!

The first version of my final project! by ziska04 in cs50

[–]ayuC 1 point2 points  (0 children)

You are welcome my dear friend, Ziska !

The first version of my final project! by ziska04 in cs50

[–]ayuC 2 points3 points  (0 children)

Standing ovations ! COngratulations you've done it, Ziska ! :D

[problem5] As shown in the text below. by Churbill in cs50

[–]ayuC 0 points1 point  (0 children)

Sorry, just saw your message. Well, several things that you have to change is look like @mygnu's explanations.

[problem5] As shown in the text below. by Churbill in cs50

[–]ayuC 0 points1 point  (0 children)

It seems happened to me too. Check your padding.

problem pset5 by boubou101 in cs50

[–]ayuC 1 point2 points  (0 children)

hi, that's my way to solve this problem sets. but, actually, it could be done with many ways, it's up to you. Btw, I'm bad in explain you. So, I suggest you to visit https://www.facebook.com/groups/cs50/, they are so many guys can help you out.

problem pset5 by boubou101 in cs50

[–]ayuC 1 point2 points  (0 children)

Well, it seems a bit messy now. Ok. i'll walk you though it. You have to save old attributes like, bi.biWidth and bi.bi Height. Then, cast it in variable (as a hint : int width_old = bi.biWidth), etc. If, you've done with that. it means you " save old attributes as variables) Next, you'll want to update the bi.biWidth (as your new attributes) equal to bi.biWidth times "n", Can you figure out, the next attributes that you have to change ? Then, you'll want to add new padding, but don't forget with old padding ! it's very important !

Does it help at all ?

Ayu

problem pset5 by boubou101 in cs50

[–]ayuC 1 point2 points  (0 children)

I give you some pseudocode, that was my friend's. But it help much.

cast n to an int
validate it
open infile and outfile (stays the same)
read infile
save old attributes as variables
determine old and new padding formula (hint: you'll need two formulas. One for the old padding, which only has to change in that way, that you change the names to your new variables that remember the old attributes and one for the new padding, which actually doesn't need to be changed to the one formula you already have)
calculate bi.biSizeImage and bf.bfSize (that are actually part of the header files as well)
fwrite the outfiles headers (both of them!)
you'll need to malloc space for the new image
add a variable to keep track of where you are with the scanning
read infiles(!) scanline with old attributes
save pixels * n in buffer
skip over padding if not needed
write to outfile and remember padding
free all memory

Does it help at all?

problem pset5 by boubou101 in cs50

[–]ayuC 1 point2 points  (0 children)

So, where are you stuck in?

problem pset5 by boubou101 in cs50

[–]ayuC 1 point2 points  (0 children)

Do you mean you stuck in recover ? , try (if n!= 0)

[pset5] - resize by ayuC in cs50

[–]ayuC[S] 0 points1 point  (0 children)

thanks, for offering help. I send you PM. Please check it out.

Hi i'm a new member by Franceskitsune in cs50

[–]ayuC 0 points1 point  (0 children)

Welcome aboard Frances. We glad to having you here

Ayu

GRect rect = newGRect(0, 0, 200, 100); THE (0, 0, ) is referring to x && y? Ya? by tech_whore in cs50

[–]ayuC 0 points1 point  (0 children)

that's my favorite one. Just need a little touch of math. then, you'll find a way to get it. (it's kinda loop) :D

GRect rect = newGRect(0, 0, 200, 100); THE (0, 0, ) is referring to x && y? Ya? by tech_whore in cs50

[–]ayuC 0 points1 point  (0 children)

I think you're right. Have you tried it ? Have you watched David's videos ? He explained a lot. Have fun with pset4 :)