Questions tagged [cs50x]

The tag has no usage guidance.

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

CS50 PSET 8 Finance

Still coming up with the following errors in my code, which won't allow me to check for the rest of my functions. I ran Check50 and the following errors are: :( registering user succeeds ...
0
votes
1answer
8 views

CS50: 'resize less', problem with padding

The resize algorithm works well for smiley pictures but fails for 'small.bmp'. I suspect that the problem is about padding, but I cannot figure out what is the problem. // Copies a BMP file ...
0
votes
0answers
5 views

Getting AttributeError: 'NoneType' object has no attribute '_instantiate_plugins'

Still getting the problem with instantiate plugins after defining the DATABASE_URL before using it directly. This is the code that I'm using: from sqlalchemy import create_engine from sqlalchemy.orm ...
0
votes
1answer
28 views

CS50 Finance 2019 Check50 errors

I have been stuck on this for a while now. No matter how I change my code nothing works it's the same 3 errors. I think the issue is in my register.html but I can't find anything wrong with it. Here ...
0
votes
2answers
28 views

CS50 Finance Check/Register Issues

I keep getting the same errors. I'm pretty sure the reason most my code won't work is because of my check function. I don't if it's not communicating well with my register function (which I am ...
0
votes
1answer
24 views

PSet 3: resize (less) bfsize error

I'm SO close (I think!) to being done with "Resize (Less)" after a grueling run. After running check50, I'm a bit kerfuffled. Hexadecimal form of output file seems correct, as do the values of and ...
0
votes
1answer
34 views

PSet 3: Help with colors for “whodunit”

I've successfully decoded the solution to "Whodunit" from CS50 2018 (won't put the spoiler here, though will say the culprit's name has six letters), but will admit it was a lucky guess involving ...
0
votes
1answer
56 views

CS50 [Speller_hashtable] my hashtable is weird!

After debugging for a long long time, it turned out that my hashtable must have some problem. Therefore, to find out where the problem is, I put this line of code after I insert a word in the ...
0
votes
1answer
32 views

Pset 8 Finance - check50 error

pset8:finance iam tired of trying what now??
0
votes
1answer
17 views

adminer.cs50.net Not working

Guys there has been a problem in the website : "https://adminer.cs50.net" I tried to login multiple times and keeps giving me the error: "Session expired, please login again." could someone please ...
0
votes
1answer
17 views

CS50 pset1 problems

I have started CS50 and I'm trying to complete my pset1. I have the following: ~/pset1/hello/ $ ls hello* hello.c ~/pset1/hello/ $ ./hello hello, world ~/pset1/hello/ $ check50 cs50/2018/x/hello ...
0
votes
1answer
33 views

CS50 pset3 recover

After running it, I got the error massage "double free or corruption (top) Aborted". And I only got 000.jpg. Need some advice, thanks. int main(int argc, char *argv[]) { //ensure proper usage ...
0
votes
1answer
14 views

dictionary.c trie: setting variable to NULL doesn't set element to NULL

Working on the unload function in speller (dictionary.c)... My current test dictionary simply contains a letter c, as I'm just trying to make sure one iteration will work. So I should (and do, ...
0
votes
1answer
11 views

Speller w/ trie

Code compiles but still having issues on getting non misspelled words. I legit just can't keep up with this memory allocation stuff. Any help would be useful, please be specific though. // Implements ...
0
votes
1answer
49 views

Resize pset4 - Can someone check my code

Please someone help me with my code. I think that problem is the fseek function. I don't know how to calculate the number of bytes needed to be skipped. I obtained wierd images with distorted collors. ...
0
votes
1answer
34 views

Check50 issues, Pset 4, Speller

My code finally works, and I believe it is operating correctly but check50 says otherwise. Anyone see any blatant issues in my code that you can point out? // Implements a dictionary's functionality ...
0
votes
1answer
18 views

Caesar in Python

On cs50 IDE, for problem set 6 Caesar, it keeps saying my program is wrong and giving me a 37% but it compiles perfectly. I checked with check50 and everything it say's it doesn't do it does precisely....
0
votes
1answer
95 views

Recover: Fatal error: glibc detected an invalid stdio handle

I'm trying to do the recover assignment, but when I try to run it I get the error: Fatal error: glibc detected an invalid stdio handle Aborted I have no idea what this means or where to start to ...
0
votes
1answer
34 views

PSET3 Recover generates 50 files, but they are only 0-50% complete. Review appreciated

#include <stdio.h> #include <stdlib.h> #include <stdint.h> typedef uint8_t BYTE; int main(int argc, char *argv[]) { // ensure proper usage if (argc != 2) { ...
0
votes
1answer
13 views

Speller/Trie issues continued

I've almost given up. I literally cannot figure out what's the issue. I can't even debug my code for issues because this command error keeps coming up. Please, help me and be straight forward I'm ...
0
votes
1answer
45 views

Vigenère wrap around

I'm stuck on pset2 Vigenère for a couple of days now. What's left for me to do is the wrap around. A recent draft of the below program compiled and worked fine if the length of the plaintext was equal ...
0
votes
1answer
11 views

Python syntax issues

Okay, this is heavily frustrating. First, time ever using Python. Code compiles but when input the following: python caesar.py 13 plaintext: hello, world I get, ciphertext: hello, world. I have no ...
0
votes
1answer
44 views

I'm stuck on cs50 pset2 - crack

I am new to coding. I am trying to solve crack problem of cs50. The problem works hashing 1 character, but when i try to hash 2 characters i can't pass arguments from the string to the crypt function. ...
0
votes
1answer
28 views

Pset4 'Recover' - Help! How can I solve this segmentation fault?

For pset4 'Recover', I'm facing a segmentation fault but I cannot find what I did wrong in my code. If I use echo$? to find where the bug is, it returns the value 1. Can someone help me to point me in ...
0
votes
1answer
18 views

In CS50 pset3 resize (less), the bfSize and biSizeImage are different than the correct values. Why?

outbf = bf; outbi = bi; outbi.biWidth = n*bi.biWidth; outbi.biHeight =n* bi.biHeight; // determine padding for scanlines int padding = (4 - (outbi.biWidth * sizeof(RGBTRIPLE)) % 4) % 4; int ...
0
votes
1answer
35 views

CS50 Recover compiles, but doesn't compile on check50?

on the 2019 pset 3 on CS50, my code for "Recover" is working and compiling, but when I go to check50, it fails to compile. Picture of code: https://pastebin.com/rCALvDjq Picture of error messages: ...
0
votes
0answers
38 views

resize: issue with sending cursor back

recently I have been working on resize problem of CS50 Course. I am stuck at I believe last step, but I just dont know how to solve this. Can somebody help me please? I think that the issue is with ...
0
votes
2answers
65 views

Problem with CS50 Pset3 Resize Less

The issue that keeps occurring after compiling and running the file, is that the resulting output bmp file changes to an unsupported file format(as stated when clicking on the bmp image file after ...
0
votes
1answer
26 views

do they review your assignment and gave you grades if you audit the course?

I am doing cs50x and I need to submit my problem set 0 but i can't. Everytime I upload it in cs50, they aren't showing my grades in cs50.me ....Also, i need to ask..do they review your assignment and ...
0
votes
1answer
38 views

what just happened after check50 update

now i am getting this error when i use check50: File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master ws.require(__requires__) File "/usr/local/...
0
votes
1answer
32 views

resize pset3 i'm having a problem with the downsizing

so my program is working correctly the only problem is with the downsizing i can't make it work correctly here is my code #include <stdio.h> #include <stdlib.h> #include <stdlib.h> #...
0
votes
1answer
21 views

CS50 Finance pset8 KeyError on /buy of application.py

I am having real trouble solving the issue I have with the /buy section of the task. I keep getting struck with an issue on the following section of code: db.execute("INSERT INTO transactions (...
0
votes
0answers
34 views

pset 8 finance :( sell handles valid sale

The final check on the final (check50) assignment, and it won't pass. The specific error is 'expected to find "56.00" in page, but it wasn't found.' My code seemingly works as the desired value is on ...
0
votes
1answer
54 views

Memory error -Valgrind [duplicate]

I'm doing PSET4 SPELLER, My code is working properly but Valgrind is giving errors, I'm unable to figure out why so. valgrind 32 bytes in 1 blocks are still reachable in loss record 1 of 1 Re-...
0
votes
1answer
56 views

CS50 Pset1 credit

after 2 days and half i did it it's tricky at first but this problem made me understand loops and array much deeper , the question is my code is good as style and design ? any ideas should consider ...
0
votes
1answer
53 views

jpg's are not proper, mix of multiple images. Can anyone tell me whats wrong?“RECOVER”

here is my code while (fread(buffer, 512, 1, inptr) == 1) { if (buffer[0] == 0xff && buffer[1] == 0xd8 && buffer[2] == 0xff && (buffer[3] & 0xf0) == 0xe0) ...
0
votes
1answer
74 views

Validating the key in PSET2 caesar?

int main( int argc, string argv[]) { if(argc ==2) { for(int i = 0, n = strlen(argv[i]); i < n; i++) { if(isdigit(argv[1][i])) { ...
0
votes
1answer
33 views

CS50 pset3 i want to resize this image, code is working for some and not for others? Can anyone tell me whats the problem?

int n = atoi(argv[1]); // read infile's BITMAPFILEHEADER BITMAPFILEHEADER bf,bfR; fread(&bf, sizeof(BITMAPFILEHEADER), 1, inptr); bfR = bf; // read infile's BITMAPINFOHEADER BITMAPINFOHEADER bi,...
0
votes
1answer
81 views

CS50; PSet1; Don't know how to connect for loop with user's input + expected identifier or '(' error

I don't know how to properly connect user's input part and for-loop(which is incorrect) in this program. I was seeking for how to do this but didn't find anything useful. Here are my code: #include &...
0
votes
1answer
36 views

pset8 c$50 finance /buy - transactions RuntimeError: (sqlite3.OperationalError) near “''”: syntax error

I'm stuck on pset8 c$50 finance /buy: Form validation works properly but when i try to execute the INSERT INTO transactions table i get the following error: RuntimeError: (sqlite3.OperationalError) ...
0
votes
1answer
124 views

CS50 Mario Less Comfortable Printing Pyramid

I have been working on this problem for about 2 weeks. I can receive input from the user and print hashes based on the number the user entered. However, I can't print a right aligned pyramid made up ...
0
votes
1answer
55 views

cs50 pset 1 greedy algorithm

#include <cs50.h> #include <stdio.h> #include <math.h> int main(void) { float y; do { y = get_float("Change: "); } while (y < 0); printf("%f\n", y * 100); ...
1
vote
1answer
124 views

pset 7 survey: trying to redirect to /sheet returns invalid syntax error

For part of CS50's survey problem from pset7, I'm supposed to redirect from a route that checks if the user has entered in all the survey's fields / appends the values to a csv file --> a route that ...
0
votes
1answer
35 views

CS50 Recover image does not match

I have been working on this problem for a while but could never get it to work. Check50 says that the recovered image does not match. When I opened the recovered images manually, they are all blank. I ...
0
votes
1answer
105 views

CS50 Bleep Incorrect Output

I am encountering a problem in CS50 Bleep. When censoring the message, the censored message consists of only one * for the entire word, rather than the length of the word. Here is my code: from cs50 ...
0
votes
1answer
32 views

PSET 6: Sentimental [Mario.py(less)]: How exactly do I “reject input” in Python as specified in check50?

this is my first time posting on here and I'm trying to not break any rules but sorry if I do. So, I followed the specification to make mario.py ( they are the same ones for mario.c ) in Sentimental ...
0
votes
1answer
21 views

pset8 finance: Problem with calculaton for “/sell”

I'm implementing the "sell" function and have a problem with the calculation of the new value for "share" and "cash". Here is my code: @app.route("/sell", methods=["GET", "POST"]) @login_required ...
1
vote
1answer
67 views

html and CSS link do not work Homepage Problem

everyone. I am currently working on the CS50 pset5 homepage problem. I have encountered a problem in my code. The code needs to contain at least four different .html pages, and it should be possible ...
0
votes
2answers
19 views

Got into an unexpected error while compiling the code

#include<stdio.h> #include<cs50.h> int main(void) { string name = get_string("what is your name?\n"); printf("hello,%s\n",name); } When I compile the above code using command "...
0
votes
1answer
23 views

cs50 Recover segmenation fault

I am working on the CS50 Recover Problem and got stuck on the segmentation fault. #include <cs50.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { ...