All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

My program does **NOT** skip the last pair if it creates cycle. #PSET3 #Tideman

my program has apparently one bug. check50 says my program does NOT skip the last pair if it creates cycle. However, I ran my function through debug and it did skip the last pair and did not write ...
0
votes
0answers
8 views

finance password strength validation fails to call function

I'm trying to call a function which I've defined but the code fails to call it. Does it matter where the function is defined? def register(): """Register user""" ...
0
votes
0answers
12 views

Why are the recovered jpgs messed up?

Sorry for asking such a general question but I cannot understand why my code does not recover the images fully. In most of the images one can see a fraction of the image. check50 tells me that there ...
0
votes
1answer
14 views

CS50 Final Project / Personalized HTML path

I'm on the Final Project for CS50 and trying to make a simple website to type in General Tasks and get information within different Subjects. I decided to use Flask over Django, however now I'm stuck ...
1
vote
2answers
12 views

Blur only working with middle pixel

I've been stuck in this problem for a while, and the code only works when its inputted a middle pixel. Does anyone have a clue? I've searched everywhere for this particular issue, but I have only ...
0
votes
0answers
11 views

Can't figure out how to fix my code, any help please?

# open the CSV file and read its contents into memory with open(argv[1], newline = '') as csvfile: readCSV = list(csv.reader(csvfile)) for raw in readCSV: pass # Your program should ...
0
votes
1answer
6 views

Pset4 Recover Problem With Seg Fault

Still having some challenges with this program. Right now it is creating a segmentation fault. Where am I going wrong? #include <stdio.h> #include <stdlib.h> #include <cs50.h> int ...
0
votes
1answer
10 views

can someone explain why i get this error code

~/pset1/ $ check50 cs50/problems/2020/x/mario/less Connecting..... Authenticating.... GitHub username: william ******** GitHub password: ******** Verifying.... Make sure your username and/or password ...
1
vote
0answers
8 views

pset4 filter - only blurs the corners correctly

i can`t get the picture blurred at all (it comes out a complete mash up of colours blended together ...) ...i' ve been trying to figure this out for months now :(( HELP! void blur(int height, int ...
0
votes
1answer
12 views

Pset4 Recover Creating Segmentation Fault

Trying to work through Pset4 Recover. Currently getting a segmentation fault and not opening any new jpegs. My logic thinking here was to: Make sure user submits just 1 command line argument Open ...
0
votes
0answers
10 views

pset6 DNA only getting “no match” SPOILER

I'm new to programming and have been stuck on the pset6 DNA assignment for a long time. The code outputs "no match" for everything, even though the output numbers from calculating the STR ...
0
votes
0answers
19 views

I'm stack with dna (pset6). can you please help me?

I have divided my code into three main pieces: 1- open the CSV file and read its contents into memory and open the DNA sequence and read its contents into memory 2- compute the longest run of ...
0
votes
0answers
10 views

I am getting 2 following errors on using check50 on my code. Can anyone help?

:( encrypts "This is CS50" as "Cbah ah KH50" using yukfrnlbavmwzteogxhcipjsqd as key output not valid ASCII text :( encrypts "This is CS50" as "Cbah ah KH50" ...
0
votes
1answer
9 views

Struggling to debug my code as I can't get print statements to work

I've been working on Project 1 from CS50W for a few days now and finally got my search bar to appear on my page! The issue I have now is I don't think the input is being pulled in from my form. I've ...
0
votes
0answers
4 views

Json header file for C

Is any header for json in C, form which we can parsh any json file of 2D, 3D , etc. or is any other way to work with json in C programming language. from which we can parsh our json data and get it ...
0
votes
1answer
9 views

PSET7 7.sql Error

The code gives the right amount of rows but is not passing the check50 SELECT movies.title, ratings.rating FROM movies JOIN ratings ON ratings.movie_id = movies.id WHERE year = 2010 ORDER BY title ASC
0
votes
1answer
12 views

pset7 6.sql rounding problem

My code works fine but check50 give me an error because it´s not rounded the same way. :( 6.sql produces correct result expected "7.74", not "7.75" SELECT ROUND(AVG(rating), 2) ...
0
votes
0answers
25 views

CS50 pset5 Speller - Code Does Not Compile Due to Issue with Hash Table/Load Function

I've been working on Speller for a little while now, but I've run into a roadblock. I finished my first draft of speller and have been clearing up errors until this point. Here's my dictionary.c so ...
0
votes
1answer
12 views

CS50 Pset 5 Speller Can't Handle Substrings

For some reason, when I run check50 cs50/problems/2020/x/speller, it says that my code can't handle substrings, but everything else works. My code recognizes that there are 2 words in the dictionary, ...
0
votes
1answer
11 views

Can anyone see what is wrong with my check function?

#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #include <ctype.h> #include <strings.h> #include "dictionary.h" int s = ...
0
votes
3answers
14 views

pset8 Finance History - rows repeat in the table in number of times per length of rows

Do not know the reasons why the row in the HTML table will repeat in number of times per the length of rows. Please see my codes as follows: application.py rows = db.execute("SELECT * FROM ...
0
votes
0answers
9 views

CS50 filter more edge

I've been stuck for hours trying to solve this, so I would appreciate someones help lol So my edges filter is only passing the test for the middle pixel: I can't figure out what is wrong with my code ...
0
votes
1answer
11 views

Pset4 Recover Segmentation Error. Valgrind unable to find anything

I'm sorry to bring about yet another segmentation fault but I cannot for the life in me find the error (Even valgrind is kinda malfunctioning). Here's my code- #include <stdio.h> #include <...
0
votes
1answer
9 views

Getting segmentation fault with strcasecmp function

When I try to compare a word with a word in a linked list below at table[index]->word place like follows I'm getting segmentation fault. if (strcasecmp(word, tmp->word) == 0) { checked = ...
0
votes
0answers
10 views

Recover, almost there… images doesn’t show correctly

I think I'm very close to getting this one right, but I've been trying different codes with the same results so I think my logic must be wrong. This code finds correctly the jpegs and creates the ...
0
votes
1answer
6 views

I can't reproduce a behavior to the hash table and the first node

1st. In dictionary.c the line: node *table[N]; declares an array of pointers or an array of nodes? 2nd. When I code: table[index] = n; table receive a value for ->word and ->next? or just ...
0
votes
0answers
16 views

In pset2: why i am able to iterate through the for loop for just one ? and also the program is processing after looping once?

#include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <string.h> int main(void) { string str= "Hello"; int l =strlen(str); string str2[l-1]; ...
0
votes
1answer
14 views

PSET5: Missing Words from Text and Memory Leaks

UPDATE: I just fixed the capitalized spell-checking errors. UPDATE 2: free didn't totally free the string "caterpillar". Look at image: My code seems to encounter a weird bug where it does ...
0
votes
1answer
24 views

CS50 Newbie needs help! Pset 1 cash problem. It compiles and runs but answers are wrong :(

Please check the code below. It runs fine but with a few "errors". when I input 0.41 as per the problem example, it gives me 16 coin count instead of 4. What is missing? Please help me ...
0
votes
1answer
13 views

pset5/speller Check produces a segfault if I introduce hash function

If I have a single bucket, the program runs seamlessly, however when I introduce the djb2 hash function as seen here the program produces a segfault. Here's my code with the hash function commented as ...
0
votes
0answers
4 views

Edge detection Program Gives Undesired Output

I have been struggling with the edge detection program. It produces weird output!!! The code is as given below: void edges(int height, int width, RGBTRIPLE image[height][width]) { float avgRedGx, ...
0
votes
1answer
13 views

FINANCE: GROUP BY doesn't add up the numbers of shares of the same stock

So in index i'm trying to display a table with all the stocks that the user has bought, one row for each stock, displaying the total number of shares in the user's portfolio along with the total value ...
0
votes
1answer
21 views

I can't assign a node to a bucket in a hash table with with right assignment of pointer and word values

When I assign table[index3] = n; what happens is that the value of the word receives a memory address and I can't follow table[index]->next to achieve the old n->word; This shouldn't happen. // ...
0
votes
1answer
33 views

PSET 6 DNA: How to get number of repeats for each value of STR's? [SPOILER: Full code]

I have written a code to count the highest number of consecutive repeats of specific DNA substring sequences in a long string of DNA...or so I thought. While my code can correctly count the longest ...
0
votes
1answer
10 views

Filter(less) Blur is all but correct for 1 or 2 values

I've been looking through the similar questions and they don't really help me. I clicked the link to see the results and double checked my code but it just doesn't seem to want to work. Here's my code:...
0
votes
1answer
11 views

cs50 grading specifications (2020)

I would like to ask a question about the grading system If an assignment is done, and it passes all the specifications given, does it mean that you get a 100%? I have submitted 2 problems (I am yet to ...
0
votes
1answer
17 views

cs50 pset 2 substitution

i am failing to see my fault in logic .... if i run ./substitution qwertyuioplkjhgfdsazxcvbnm and input plaintext: abc instead on ciphertext: qwe i get ciphertext: dvm ...i tried debug50 and it seems ...
0
votes
1answer
12 views

Pset2 Readability error: expected identifier or '('

I've been trying to compile this code but always get this error "error: expected identifier or '(' " for the line 13 (which is the first one starting with "for") COuld someone help ...
0
votes
0answers
7 views

I am trying to download Love for the games track but this blue and yellow shield prevents me from using the program, what do I do?

I have a windows 10 laptop, and whenever I try and use it, it asks me for the admin pin of the laptop, my parents keep on putting the pin but it never works, they tried to figure it out but came up ...
0
votes
0answers
13 views

Django model default value not working

For some reason, the default value for a Django model field I have doesn't work. As in, if the value is left blank by the user when creating an object for that model, then when the value is used in a ...
0
votes
0answers
9 views

i am Unable to Generate the ssh-key ,and what does ssh-aget mean and how to generate one?

i am unable get through the process of the SSH-key creation,below is the terminal error i am getting related the ssh-key.hope you all there try to figure this tedious quest of mine... ~/pset1/hello/ $ ...
0
votes
0answers
11 views

Minesweeper says it is making a safe move but chooses a mine

Minesweeper says it is making a safe move but chooses a mine. It also makes random moves even though there are safe moves it can make. I don't know why it does that. This is the link to my code below. ...
0
votes
1answer
14 views

Pset2 Readability error with “else” statement

readability.c:28:9: error: expected expression else: Shown above is the error I am getting. If anyone would point me to what exactly I am doing wrong. that would be great. Bellow, I will add my ...
0
votes
0answers
12 views

FINANCE: how to commafy numbers in jinja?

I was wondering about how to commafy large digits in jinja so that instead of [$10000 / $100000 / $1000000] these numbers would be displayed as such [$10,000 / $100,000 / $1,000,000] I've been looking ...
0
votes
1answer
15 views

pset4 recover: Not getting as many files as the problem requires

After reading a few submissions for help here and in the subreddit, People have told me there should be 50 files in the memory card. I have made a loop that correctly reads the file, but as soon as I ...
0
votes
0answers
24 views

code can't handle substring property

// Implements a dictionary's functionality #include <stdbool.h> #include "dictionary.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype....
0
votes
0answers
12 views

Please help, don't know what's wrong with my blur function

so I modified the code from last time, and it seems that instead of making copies of the image and calculating on them, takes the first if statement and makes it the new image so all the other values ...
0
votes
0answers
8 views

cs50 pset4 filter edge function. HOW TO FIX STACK OVERFLOW

void edges(int height, int width, RGBTRIPLE image[height][width]) { float b[height][width]; float g[height][width]; float r[height][width]; int gx_b[height][width]; int gx_g[height][width]; int ...
0
votes
0answers
4 views

cs50 pset4 fliter more edge function. CODE IS GETTING COMPILED BUT WHILE RUNNING IT IS SHOWING STACK OVERFLOW. HOW TO FIX IT

void edges(int height, int width, RGBTRIPLE image[height][width]) { float b[height][width]; float g[height][width]; float r[height][width]; float *blue; blue = malloc(sizeof(float)); float *green; ...
0
votes
0answers
7 views

не получается справиться с этими объявлениями-ошибками

:) caesar.c exists. :) caesar.c compiles. :( encrypts "a" as "b" using 1 as key expected prompt for input, found none :( encrypts "barfoo" as "yxocll" using 23 ...

15 30 50 per page
1
2 3 4 5
239