All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
12 views

My Program is not recovering the jpegs correctly

My program is compiling properly it is even recovering the images but when I am opening the image to view, it is not opening. It is showing "Invalid or Unsupported file format". Please look ...
0
votes
1answer
14 views

Credit (Pset1) - Do While Loop

I am still really new to C and programming in general(just started a week ago) and I'm having difficulty with the do while loop. My code doesn't run beyond while (ccNUM < 0);. I tried running ...
0
votes
0answers
2 views

How can I receive POST data sent from the React frontend in Django Rest Framework using serializer?

As you can see when I print the serializer by print(serializer) statement, the output there is = AddCompanySerializer(data={'name': 'Nestle', 'est': '1866', 'org': 'Switzerland'}): name = CharField(...
0
votes
1answer
11 views

pset4 filter blur less got stuck

i have been working on blur and it works just fine as i run it. but when i run check50 i get this : :( blur correctly filters middle pixel expected "127 140 149\n", not "145 160 169\n&...
0
votes
1answer
8 views

Git hub on Chromebook

So, I've been doin Harvard's intro to computer science I passed week 0 an was pretty much done with week 1 when it said I couldn't run check 50 cause I hadn't authorized it. It gave me a link but I ...
0
votes
0answers
5 views

Q: how to read terminal window and debug in Finance?

I am receiving errors (in red) in my terminal window. However I'm not understanding what those errors actually mean. Can someone help direct me on how to 1) read the error 2) find out where exactly ...
0
votes
1answer
12 views

Pset 2, readability: is everything a float and rounding problems

I' at the very end of readability and am having trouble getting the math correct and rounding it. I'm getting the correct letters, words and sentences, but am getting wildly wrong values for the grade ...
0
votes
0answers
5 views

Lab 5 valgrind error only with specific variable name

I am currently doing lab 5:Inheritance on CS50. I came across a interesting error. when i create a person object with the name person as follows, //Create a new individual with generations person *...
0
votes
0answers
9 views

Tideman lock_pairs function

I'm working on the lock_pairs function, and what I do is creating another function called "cycle" to check whether each pair is going to create the cycle. If it will create the cycle, this &...
0
votes
1answer
15 views

Speller skips first word in dictionary

After chasing down and eliminating memory leaks, I think I am getting close to finishing speller. So far, valgrind says no memory leaks, and the output is formatted correctly. However, when running my ...
0
votes
0answers
12 views

Pset6 Readability Python: no output

from cs50 import get_string, get_int import sys def main(): statement = get_string("Text: ") count = len(statement) no_words = count_words(statement) no_letters = ...
0
votes
1answer
20 views

pset4 recover fread segmentation fault

guys I want to ask why am I constantly getting segfault with second fread inside of a while loop after checking jpeg header. first fread works perfectly going through first several 512bytes of card....
0
votes
0answers
6 views

Getting a segmentation fault on cs50's filter

I'm currently stuck on cs50's pset4 filter (less comfortable). The program compiles perfectly. I have tried out the first three parts of the code (grayscale, sepia & reflection) and their output ...
0
votes
0answers
13 views

credit pset1 cs50 sum while loop

I was doing the credit problem with the visa test card in the page: 4003600000000014 It passed that test, however in other tests it doesn't pass. I think it's a matter of the sum that it can't compute ...
0
votes
1answer
11 views

The sepia code passes 2 first tests but doesn't pass the rest of those tests. What am I doing wrong?

This is the code I have written but it fails to produce the intended result. I am really not able to figure out why it's wrong. Can somebody help me? [snip] if (image[i][j].rgbtRed > 255) { ...
0
votes
1answer
19 views

PSET 6 Credit More: always gives an output of INVALID

from cs50 import get_int, get_string import sys Prompt credit number input cardnumber = get_int("Number : ") #copying the credit card numbers into other variable / arrays cardnumber ...
0
votes
0answers
6 views

Search Button is not working Project 0

Gmail Images apps search ...
0
votes
0answers
10 views

MultiValueDictKeyError when using dropdown list with Pagination

I am working on CS50W project 2 -- Commerce -- I have decided to use Pagination in my app and it works in showing Active Listing page by page of 5 per page. problem occurs when i try the pagination ...
0
votes
1answer
6 views

Pset4 (Less). Filter sepia. In the output image, the white parts are magenta

For some reason, the image attached below is the output I get with Sepia filter. I don't know where the code is wrong. void sepia(int height, int width, RGBTRIPLE image[height][width]) { int k = 0;...
0
votes
1answer
19 views

Need clarity for Problem Set4 recover

I am working on set4 recover My program is always printing "Testing EOF", hence it looks card file is empty. Here is my code in detail. #include <stdio.h> #include <stdlib.h> #...
0
votes
0answers
8 views

Cannot Compile CS50 Library

I've been running into this problem lately. Here's one of my code: #include <cs50.h> #include <stdio.h> #include <string.h> // ... for (int i = 0; i < voter_count; i++) { ...
0
votes
1answer
7 views

pset1 problem set 2 readability

I completed the code for pset1 problem set 2 readability as follows #include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <math.h> int ...
0
votes
1answer
8 views

Isalpha not working for all char of my string

I'm trying to use the isalpha() function to check whether all characters of a string are letters or not. However, when I use the debug50 module, it looks like after the first character of the string, ...
0
votes
1answer
9 views

Pset 4 filter less comfortable, cant open the output BMP file

So I just made the greyscale function and it passes check50 but when I try to open or download the output.bmp file, it doesn't show anything. Anyone know how to fix this? This was the command I put in ...
0
votes
1answer
15 views

Caesar works as intended but check50 says it doesn't

I've tested all the possibilities where check50 says my code isn't working as intended and I always get the expected result. I can't seem to figure out what I did wrong. Here's check50: :) caesar.c ...
0
votes
1answer
6 views

Why is my C modulo code giving repeating identical output?

I am wondering why my output repeats before it gets to the final output: #include <cs50.h> #include <stdio.h> #include <math.h> int main(void) { long bignum = 4300123488893756; ...
0
votes
1answer
22 views

PSET 9 Finance index.html issue with displaying table results with html

I'm currently on CS50 PSET 9 Finance and stuck on the index.html portion of the assignment. This is my code from assignment.py: @app.route("/") @login_required def index(): stocks = db....
0
votes
1answer
12 views

Hello everyone, i have a problem with my code for caesar

So when i run the following code in the caesar.c that is located in the caesar folder, it seems to run only for the very first character of the given plaintext and then the next characters are missing....
0
votes
1answer
13 views

Pset6 - DNA - Strange Error

I'm in the [ Testing ] section and my program works fine with [ small.csv ], but the expected data is not the same as the real data: For example: If I run this: python dna.py databases/large.csv ...
0
votes
2answers
24 views

Char repetition in key

I 'm trying to avoid char repetition in key // making chars array of alphabets string alph = "abcdefghijklmnopqrstuvwxyz"; //making sure that there is no character repitition char rep[26] = ...
0
votes
1answer
14 views

Pset 4 Recover output shows Segmentation Fault

#include <stdlib.h> #include <stdint.h> //to use uint8_t as BYTE typedef uint8_t BYTE; int main(int argc, char *argv[]) { if (argc != 2) { printf("INVALID. There ...
0
votes
1answer
28 views

Implementation problem

#include <stdio.h> #include <ctype.h> #include <cs50.h> #include <string.h> #include <math.h> #include <stdlib.h> int main(int count, string input[]) { // ...
0
votes
0answers
7 views

Library = Collection of functions?

do I understand it right, that in that library there are only a collection of functions inside that i can use?
1
vote
1answer
11 views

Pointers Memory Allocation

Here I have a user-defined structure "person" that stores two pointers one for the name and one for the phone number. I create an array people of length 2 of type person. Each of the ...
0
votes
1answer
18 views

Filter - Structures & Headers

The problem statement states that BMP files have a particular header with: (1) BITMAPFILEHEADER 14 bytes long and (2) BITMAPINFOHEADER 40 bytes long. bmp.h (provided) includes the definitions of the ...
0
votes
0answers
18 views

CHECK50 for Plurality shows bug which manual testing can't find

Could anyone perhaps help me figure out what's wrong with the code below? When I check it manually, it works every time, in every scenario I can think of, but when I run check50 on it, I get ":( ...
0
votes
1answer
17 views

Why is an Array longer then the input?

why we can access more information than the lenght of the array? I thought that after the Null (0) the array ends. Why we can access position 40?
0
votes
2answers
39 views

CS50 Recover - fread into buffer

I am working on CS50 Recovery and I am unable to get the program to check the JPEG starting header. I used debug50 and added a couple print statements to try and find the problem. Every time I run the ...
0
votes
1answer
20 views

CS50 Final Project Help: SQL QUERY…inserting row from one table into another table after button pressed

I have nearly finished the Cs50x course but I am stuck on my final project. I am creating a website called 'Letterbooks' (inspired by Letterboxd) that allows you to log books that you have read. I am ...
0
votes
1answer
35 views

Indexing problem

when debugging, the inner-most if condition never entered. Whether the char is upper-text or lower text. I 'm using the same methodology in both cases. // testing if the char upper text if ...
0
votes
1answer
20 views

Frozen cs50 IDE terminal

Continuously frozen IDE terminal. This is not a frozen screen of computer or laptop but the IDE terminal itself: For the last few weeks. I've been experiencing problems with the cs50 IDE terminal. ...
0
votes
1answer
19 views

pset5 speller all words are spelled wrong

new error: most words are seen as spelling error Here's my full code: (UPDATED) // Implements a dictionary's functionality #include <stdbool.h> #include <string.h> #include <stdio.h>...
0
votes
1answer
18 views

CS50 - PSET 4 - Filter - Edges

//Pixel buffer RGBTRIPLE pixelBuffer[height][width]; //Iterates on every pixel and calculates Gx and Gy for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++)...
0
votes
1answer
16 views

Week 2 Lab (Scrabble)

This is my code: #include <ctype.h> #include <cs50.h> #include <stdio.h> #include <string.h> // Points assigned to each letter of the alphabet int POINTS[] = {1, 3, 3, 2, 1, 4,...
0
votes
1answer
11 views

cs50 Pset4 filter(more) blur

void add(RGBTRIPLE* a, RGBTRIPLE* b){ a->rgbtRed += b->rgbtRed; a->rgbtGreen += b->rgbtGreen; a->rgbtBlue += b->rgbtBlue; } // Blur image void blur(int height, int width,...
0
votes
1answer
14 views

Specification imposes a 5-minute length limit on videos

I have made a youtube video on Commerce project which exceed 5 minutes. For this cause, my Project2: Commerce submission grading failed. How can I submit the project again. Please help me anybody.
0
votes
0answers
14 views

Two-factor authentication (2FA) doesn't work

could someone please help me? I've enabled two-factor authentication (2FA), but it doesn't work. When checking my project in CS50X through the command line with ~/pset5/speller/ $ check50 cs50/...
1
vote
1answer
11 views

pset4 filter greyscale error

When I run "make helper," the following error comes up: "undefined reference to `main'" and "linker command failed with exit code 1" What am I doing wrong?? thank you in ...
0
votes
1answer
12 views

How do we delete existing flight in sqlite via Django?

In the notes for the SQLITE section, week 3, https://cs50.harvard.edu/web/2020/notes/4/#:~:text=delete%20your%20existing%20flight%20from%20New%20York%20to%20London It states: Every time we make ...

15 30 50 per page
1
2 3 4 5
252