All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
19 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
0answers
7 views

in finance I want to go to page if the user clicks a page link. An ex is if I click on sell go to sell else go to sold Is this possible?

in finance I want to go to page if the user clicks a page link. An ex is if I click on sell go to sell else go to sold Is this possible? Thanks for the help.
0
votes
1answer
11 views

Pset2 Vigenere some flaws in the code

I somehow managed to come up with this code to vigenere but it gives me 9/11 with check50. It encrypts it badly when using the keyword BaZ and BAZ. Why is that please? And also I think I was supposed ...
0
votes
0answers
5 views

Migration Issues

Is anyone else getting this error while trying to migrate sqlite3 to Postgres for deployment on Heroku(Step 15 on https://cs50.readthedocs.io/heroku/)? Does anyone know of any fix? Could the ...
0
votes
0answers
9 views

Pset 7 (Survey) - How to validate select dropdown value is not empty from external javascript file?

I have my form and HTML in a file called form.html like so: <div class="form-group row col-sm-2"> <select class="form-control" id="states"> <option selected ...
0
votes
1answer
15 views

Speller/Trie issue

Having a painfully hard time trying to understand all of this linked list stuff and exactly where my memory is being allocated too. This is something I never mastered in the past. I'm having a ...
0
votes
1answer
11 views

cs50.me problem

I have been away from CS50 for some time and have now returned to it. I understand that CS50 IDE is no longer used and I have read:'If you started CS50x before 2018, know that scores from CS50x 2017 ...
0
votes
1answer
16 views

pset4 WHODUNIT Is there a way to wget the files on the CS50 IDE?

I'd like to complete the whodunit using CS50 IDE. Is there a way to use wget to get the files from WHODUNIT so i can work on them?
0
votes
1answer
12 views

Pset2 Vigenere: Control reaches end of non-void function

I´m trying to solve this pset but I got stuck with function declaration. I did everything according to the tutorial but the clang keeps showing an error: "control reaches end of non-void function" on ...
0
votes
0answers
9 views

need help in project 1 in web

please guys anyone help me i'am very disappointed and confused .. my problm is i'am in project 1 and i don't know where i can write th source code i download the git bash but i don't have any idea how ...
0
votes
2answers
15 views

What does the loop for padding do in Resize(less)?

// skip over padding, if any fseek(inptr, padding, SEEK_CUR); // then add it back (to demonstrate how) for (int k = 0; k < old_padding; k++) { ...
0
votes
1answer
12 views

Case sensitivity of keyword in pset 6 Python Vigenere

I've been stuck on Vigenere in pset6 for a few days now, and I've finally got it. It somehow took me longer to do Vigenere in Python than in C, interestingly. But, I'm confused about one thing: why do ...
0
votes
1answer
8 views

The test shows this failure: expected exit code 0, not 4

#include <cs50.h> #include <stdio.h> #include <math.h> int main(void) { // prompts user for amount of change until user enters a valid number float dollars; do { ...
0
votes
1answer
10 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
10 views

pset 6 similarities more '<' not supported between instances of 'str' and 'int' error while compiling in helpers.py distances

heres my code from operator import itemgetter class Operation(Enum): """Operations""" DELETED = 1 INSERTED = 2 SUBSTITUTED = 3 def __str__(self): return str(self.name....
0
votes
1answer
22 views

db_stock_info in the for loop is not displaying in index.html. I can't figure out why any help appreciated?

index.html {% extends "layout.html" %} {% block title %} index {% endblock title %} {% block main %} <table> <tr> <th> SYMBOL </th> <th> NAME </th>...
0
votes
1answer
17 views

Modulo math and while loops in cash.c

I'm not sure why my while loops do not give me the correct answer: while (cents % 25 > 0) { count++; cents -= 25; } while (cents % 10 > 0) { count++; ...
0
votes
1answer
11 views

When I type in a random stock symbol for quote…it says internal server error. I did not understand what the error was.Please help

@app.route("/quote", methods=["GET", "POST"]) @login_required def quote(): """Get stock quote.""" if request.method == "POST": if not request.form.get("symbol"): return ...
0
votes
0answers
9 views

How do I run flask app on windows?

I'm working on project 1 of CS50's Web Programming with Python and Javascript. While going through the steps given, I'm now stuck at running the app through command line. (step 6) The path to the ...
0
votes
1answer
11 views

I get 5/11 on check50 after submitting vigenere, even though my actual output and expected output are the same. Can someone please help me?

Here is my code [removed code per academic honesty guidelines] And here is the link to the check50 if it can be helpful https://submit.cs50.io/check50/b2fae7703d9488a6c2737ebd8aa7319b95daefbb
0
votes
1answer
14 views

pset7 similarities throws a 400 error when submiting

I'm in my pset7, similarities. Python part of compare works without any issues. But when i check web page with flask, when i click submit, it shows a 400 error. I could not find where the error is. ...
0
votes
2answers
16 views

mario (less) getting 53% score

I submit pset1 Mario (less), and my code works correctly but in cs50.me showing that I have only 53% scores even though that my code work correctly. #include <cs50.h> #include <stdio.h> ...
0
votes
1answer
27 views

I can't seem to fix or find the error in finance. Can someone help? I realize in index.html the if condition needs to be fixed

The code was working before. index function @app.route("/") @login_required def index(): """Show portfolio of stocks""" # User reached route via POST (as by submitting a form via POST) #...
0
votes
1answer
12 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
23 views

My solution to Pset2's Caesar works but I only got 40% on it. Why?

I worked my way through Caesar as well as Vignere in PSet2. I got a score of 99% for Vignere but only 40% on Caesar, which is really strange as I worked off of Caesar for Vigenere.. If anyone could ...
0
votes
1answer
11 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
1answer
10 views

CS50 Recover Issue

So far I believe my code should be operational. I thought I got it down but no matter what I change I continue to have this output that says " UndefinedBehaviorSanitizer:DEADLYSIGNAL ... ". Anyone ...
0
votes
1answer
24 views

What are primitives?

In the WHODUNIT problem set in week 3 it says: "Open up bmp.h, and you’ll see actual definitions of those headers we’ve mentioned, adapted from Microsoft’s own implementations thereof. In addition, ...
0
votes
0answers
17 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
1answer
23 views

C$50 Finance Buy and Quote not working

When I test my code myself, it seems to work, but check50 is showing otherwise. Quote has a single problem, and buy has two problems, but I am not able to figure out where in the code is the error and ...
0
votes
2answers
35 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
3answers
22 views

Why are algorithms mentioned in week 2

In week 2 David mentions Algorithms e.g. Bubble sort, Binary search etc... But why are they important? and where do they fit into the bigger picture? I only did the Caesar cypher and Vigenere cypher ...
0
votes
1answer
11 views

pset5 speller IDE and check50 show different outputs even though theyare run with the same code

When I run my speller code, it works perfectly fine in the IDE. However, after seeing check50, the output appears to be the following Anyone knows why this happens and how to fix it?
0
votes
1answer
13 views

i have tried it with small diffs a lot of times.i feel more comfortable about this, but still not working.what am i doing wrong??thanks in advance

// creat a counter that keepw trach of jpegs found int counter = 0; // crate a string filename for sprintf char filename[8]; // FILE* picture = NULL; // chech if we have found ...
0
votes
1answer
10 views

c:30:25: error: invalid operands to binary expression ('char *' and 'string' (aka 'char *'))

Hey guys could someone advice me on the flaws in the following line of code. I'm visited by the following error message: c:30:25: error: invalid operands to binary expression ('char *' and '...
0
votes
1answer
20 views

Getting a phishing warning when running flask on cs50 IDE

Everything was working fine, but suddenly my browsers and anti-virus spit out warnings when I want to run flask on the cs50 IDE. I don't want to disable my antivirus every time I'm working on my ...
0
votes
1answer
41 views

Finance register function does not insert data in database

I am trying to finish the register function but something goes wrong. I get an error message " It seems that although registration is claimed to be ok (from check50) nothing is actually added in the ...
0
votes
1answer
13 views

PSet 2: How do I ensure that the entire string is checked before printing a statement

In this problem set, we are supposed to obtain one argument ( which omprises of digits), failing which, the user are prompted with a message, "Usage: ./caesar key". I have attached the problem ...
0
votes
1answer
15 views

valgrind in speller unload says I am using a variable without a value, when I assign it in the previous line

I just finished my pset5 and when I try to run valgrind with help50, it appears that Looks like you're trying to use a variable that might not have a value? Take a closer look at line 115 of ...
0
votes
1answer
19 views

PSet 2: Code successfully compiled but does not meet desirec requirement

In this problem set, we are supposed to obtain one argument ( which omprises of digits), failing which, the user are prompted with a message, "Usage: ./caesar key". I have attached the problem ...
0
votes
0answers
45 views

Encountering Error When Attempting to Update Submit50

Issue: When running the terminal command "pip install --upgrade submit50", I am getting the following error: "ERROR: Command errored out with exit status 1: /usr/local/bin/python3.7 -u -c 'import ...
0
votes
1answer
14 views

PSET3 Resize (more comfortable), resizing f > 1 correctly, but pixels are different colors. Does not work when f < 1

**Relevant code is after comment: // iterate over infile's scanlines This code is able to make a new larger bmp with the correct dimensions, but the pixels are not the same color as the original bmp. ...
0
votes
1answer
7 views

Would remaking a past project be a valid Final Project submission?

I had made a certain command-line application in Python some time ago, independently, and am now considering porting it to Java and giving it a GUI; this would require me to essentially rewrite all ...
0
votes
1answer
19 views

speller check50 fails trying to check for memory errors but valgrind reports none

All tests pass except for the memory one saying it cannot find the misspelled words. Comparison with keys/ is perfect for multiple large texts. :) handles substrings properly running ./speller ...
0
votes
1answer
16 views

Pset5 speller load returns member access within null pointer of type node

I am curently working pset5 speller in the load part and, when run with ./speller texts/lalaland.txt, returns the following dictionary.c:68:32: runtime error: member access within null pointer of ...
0
votes
1answer
22 views

CS50 Problem Set 2 Code Not Fully Executing

I am trying to get the code to check that: 1) Only a numerical argument is passed through 2) If a non-numerical, number is pass through, an error message is revealed to the user. Here are the ...
0
votes
1answer
16 views

pset3 resize less

so im having some problomes and cant seem to find the bugs, what is happening is that it seems to function correctly but cs50 check says that the file is too large.. would love some one to take a look ...
0
votes
1answer
13 views

it is running fine except of (ie key: baz ,plaintext: hello, world! ,cipher should be: iekmo, vprke! , my cipher is: iekmo, wnslc! ..thanks in advance

for (int i = 0, n = strlen(message); i < n; i++) { if (islower(message[i])) { vigenerevalue = (((int)message[i] - 97 + (int)tolower(w[i % len]) - 97) % 26 + 97); ...
0
votes
1answer
27 views

how to make a history table pset8

I can not get a history table to work. I'm confused about how to get each value that needs to be in each row of the table. Here is what I have right now, I just don't understand how to pull each value ...
0
votes
1answer
21 views

Pset 4--51 files created instead of 50

Apologies for including all my (60 lines) of code, but I've been thoroughly confused by this for a while. I've written code to do Recover, and it's working fine and recovers images perfectly--it just ...

15 30 50 per page