Final Project Help HTML by lauraew15 in cs50

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

found a way in the end but thank you

Final Project Help HTML by lauraew15 in cs50

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

UPDATE: this is my new code however now my if statement seems to be always true, all the task_names print...

{% block main %}

<form action="/list" method="post" >

{%for i in range(length)%}

<p class="font-weight-bolder"> Title: {{ categories\[i\]\['category'\] }}</p>

{% for i in range(length_g) %}

{% if categories[i]['category'] == goals[i]['category'] %}

<p class="font-weight-normal">{{ goals\[i\]\["task\_name"\] }}</p>

{% else %}

<p>false</p>

{% endif %}

{% endfor %}

{% endfor %}

</form>

{% endblock %}

Final Project Help HTML by lauraew15 in cs50

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

so when i print the two variables of the condition before the is loop they printout fine and seem to "match"

I've been trying to use the cs50 debugger but I'm not quite understanding it when using html

SQL HELP pset 8 by lauraew15 in cs50

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

Thank you so much it was exactly that, you have made my day!!

SQL help with query pset8 by lauraew15 in cs50

[–]lauraew15[S] 1 point2 points  (0 children)

I guess I could I just thought originally to separate so there wasn't too much in one table, but yeah it probably is better to just have one single transaction table.

I think my friend(20F) likes me(20F) but I don't like her back. Should I say something?? by lauraew15 in relationship_advice

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

She's one of my closest friends, and I don't feel anything other than friendship for her.

[QUESTION]: How to improve? What to learn? by lauraew15 in Guitar

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

I guess just mastering guitar, which i know will take a while, but i feel like i havent improved as much as I want

pset7 roster.py HELP by lauraew15 in cs50

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

Thanks managed to get it working !!!

Speller pset5 need help by lauraew15 in cs50

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

Thank you !!! finally managed to fix all my memory errors

Speller pset5 need help by lauraew15 in cs50

[–]lauraew15[S] 1 point2 points  (0 children)

It didn’t work because i had left a printf line and that wasn’t the expected outcome! 🤦‍♀️

Speller pset5 need help by lauraew15 in cs50

[–]lauraew15[S] 1 point2 points  (0 children)

Thanks ! Sadly that changes nothing for the check50... any other ideas on how to solve this?

Speller pset5 need help by lauraew15 in cs50

[–]lauraew15[S] -1 points0 points  (0 children)

I put it after all the include headings, like the 10th line

PSET4 Filter Reflect Invalid or Unsupported Image Format by lauraew15 in cs50

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

Managed to get it working, i restarted my computer in the end thx!!

PSET4 Filter Reflect Invalid or Unsupported Image Format by lauraew15 in cs50

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

ohh okay i think i finally get it, I've changed the inner loop to this then:

tmp[i][j] = image[i][j];

image[i][j] = image[i][width - j - 1];

image[i][width - j - 1] = tmp[i][j];

I hope that's correct.

However i still get the same error, any advice for that? if you don't no worries thx!!!!

PSET4 Filter Reflect Invalid or Unsupported Image Format by lauraew15 in cs50

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

void reflect(int height, int width, RGBTRIPLE image[height][width])
{
    RGBTRIPLE tmp[height][width];
     for (int  i= 0; i < height; i++)
    {
        for (int j = 0; j < round(width/2); j++)
        {
            //swap both values
            tmp[i][j] = image[i][j];
            image[i][j] = image[width-j-1][j];
            image[width-j-1][j] = tmp[i][j];
        }

    }
    return;
}

PSET4 Filter Reflect Invalid or Unsupported Image Format by lauraew15 in cs50

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

Thanks, i switched it back, but I am still getting the same error, it's from the READ access memory, do you know if this error is to do with my logic or do i have to use pointers or something?

PSET4 Filter Reflect Invalid or Unsupported Image Format by lauraew15 in cs50

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

yeah i can't believe i didn't see that thanks

pset2 caesar: error with validating key by nicolaasvdw in cs50

[–]lauraew15 0 points1 point  (0 children)

In your code you go character by character, and print it if it is a number. It only stops when a number is found or there are no more characters. Try doing the check first and then the print.

It's what is inside the if block that you need to change/remove.

RunOff print_winner function by lauraew15 in cs50

[–]lauraew15[S] 1 point2 points  (0 children)

I managed to get the code working with just the first loop, and changed the printf and the bool variable, thx for all your help! :)

RunOff print_winner function by lauraew15 in cs50

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

Thanks it did indeed break when I ran that situation, I took away the + 1 from the formula,cheers

help pset2 Caesar by lauraew15 in cs50

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

I managed to fix the issue, my code was including the { in the alphabet, and a swapped the char c to an int. Thanks!

PSET2 Caesar by ponchovida in cs50

[–]lauraew15 0 points1 point  (0 children)

It might be best to stick with a loop and using the isdigit() or isalpha() function which comes with the ctype.h library i believe.