All Questions

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

Can´t update the share values in cs50 finance /buy

So I´m currently working in the /index route and noticed it doesn't update the values when I buy something. After looking at the finance.db, I realized it doesn't update the shares or ptice at all ...
0
votes
1answer
104 views

expected output, not standard error

My program compiles and runs fine. There isnt even much memory leak. But still it doesn't pass the cs50 check. Link to my check code
2
votes
2answers
88 views

Difficulty submitting PSET7 to be graded

My pset7 zip file is about 700kb, i click in "Add files..." button and select pset7.zip, next i click the "Start upload" button, the uploader appears to fill pretty fast as normal but it doesn't ...
0
votes
2answers
1k views

I don't understand how the collatz(n) recursive function works

If you watch the short on recursion in week2 2018, Doug explains how calculate the steps for the collatz conjecture. I don't understand how the solution he proposes can work: int collatz(int n) { ...
0
votes
1answer
7 views

Implicit declaration of function of a declared prototype PSET4

I have this error code: helpers.c:56:13: warning: implicit declaration of function 'swap' is invalid in C99 [-Wimplicit-function-declaration] swap(height, width, image, i, j); ^ helpers.c:62:6: error:...
0
votes
1answer
118 views

PSET2 Readability, most of my code works as expected, but one passage provided below

include include include include include int main(void) { // Ask user for input string s = get_string("Text:"); // variable to store letter, word, and sentence count int letterCount ...
0
votes
1answer
11 views

Debug50 is not functioning properly

I was using debug50 over and over for pset5 speller and at some point it just stopped working. Now when I try to use it with simple programs it still won't work. I've restarted the ide from inside ...
0
votes
1answer
10 views

Sentence count stuck at 2 in readability

#include <stdio.h> #include <cs50.h> #include <ctype.h> #include <string.h> int main(void) { //Retrieve string of text from user string s = get_string("Text: &...
1
vote
1answer
257 views

CS50 IDE Debugger stops after having executed the code line at breakpoint

The debugger itself seems to work fine, but my problem is : When I set a breakpoint in the gutter and then I properly run the debugger, the code stop at my breakpoint, but it doesn't stop before ...
0
votes
1answer
7 views

Pset4 Filter Less Blur Runtime Error

Below is my Blur function, which does actually work, yet still returns 9 runtime errors all relating to the right hand side of the image (or the width-value edge). I added a couple of printfs to check ...
0
votes
1answer
2k views

Cannot find bounds of current function

My function works correctly till the end (line 61). File is created but after.... I have segmentation fault. Debugger says that it isn't able to find bounds of current function. I suppose that ...
0
votes
2answers
9 views

getting error on caesar

I keep getting an error on the last else idk what's wrong with that code. #include <cs50.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> ...
0
votes
1answer
87 views

Check 50 won't work

Whenever I run check50 for anything it says that: 'No such file or directory.. Please help.
1
vote
3answers
1k views

Can't run the staff implementation

i can't run the staff implementation for any problem set, i always get the same error, it's always something like : bash: ~cs50/pset4/breakout: No such file or directory
0
votes
1answer
12 views

Question about Pset1 - credit

I had work on the credit for 3 hours, and I had reach to most of the function - and I checked that the number received from: Luhn (a) last digit(c) and digit count (cc) are right by using ...
0
votes
1answer
101 views

recover compiles and runs but no jpeg is saved

I save the name of the picture in picname and open it in img and do the rest of the copying from memory card on img , the program compiles and runs fine but no image is saved in the current directory....
1
vote
1answer
221 views

PSET5 How can I test my code with small dictionary?

I'm trying to test my implementations of LOAD and CHECK with small dictionary of cs50 appliance, but it's look like I do the wrong thing... Someone can help me with that please! Thanks jharvard@...
0
votes
1answer
17 views

CS50 Runoff – Cannot get program to execute, am I stuck in an infinite loop somewhere?

I'm trying to execute runoff but after I enter the voters' ranks, the terminal window blinks back at me with nothing. I've scoured all over for similar problems but cannot figure out a solution. I've ...
0
votes
2answers
29 views

PSET4 recover. Why doesn't my counter increase?

Below is my working code but I've a question. If change my char filename[8] to char filename[7] the counter does not increase. Instead, I'll only have 2 output files: 000.jpg and 001.jpg, where 001....
0
votes
1answer
222 views

pset8 search.php failed to open stream:

When I am testing the implemented search.php in the browser, I get "Fatal error: Unknown: Failed opening required '/home/ubuntu/workspace/pset8/public/search.php' (include_path='.:/usr/share/php:/usr/...
0
votes
0answers
6 views

Final Project: Error on uploading files to CS50 IDE via form

tl;dr: CS50 IDE won't let me upload certain kinds of files (via a form on a webpage) without any explanation. I'm writing the function upload_file() that allows the user to upload a file. (It's a CSV ...
0
votes
1answer
82 views

I have trouble enciphering in Vigenere Cipher CS50 pset2

I have issues incrementing the index of the key and wrapping the key to the beginning. I have tried what I know, I have watched the videos several times and I have been at this for 3 days. What am I ...
1
vote
1answer
138 views

pset4 recover - 16 images recovered with Invalid or Unsupported Image Format

I'm really confused. I reviewed all similar problems, but did find my case. It seems like jpeg start bytes are detected, but wrong data inserts to the output file. Please advise! 24-Oct-2016: The ...
0
votes
1answer
88 views

Music: ./synthesize jeopardy.wav < songs/jeopardy.txt giving helpers.c:38:16: runtime error

Here's my program which compiles OK with make and ./notes and ./notes 5 but does not work with ./synthesize and gives helpers.c:38:16: runtime error: null pointer passed as argument 1, which is ...
1
vote
1answer
268 views

Cannot remove placemarks

I am stuck on trying to remove the placemarks after picking up a passenger. The problem is that I can keep adding the same passenger even though the placemark has been visually removed. I need help ...
0
votes
1answer
895 views

compiling clang string.c says relocation 0 has invalid symbol index 11

When i try to compile string.c file whose code is given below it say relocation 0 has invalid symbol index 11 ... and this happens on and on.. my code is : - #include <cs50.h> #include <...
1
vote
1answer
204 views

accessing pset7 from outside the appliance

I was just wondering if there was anyway to access the cs50finance webpage from outside the appliance, using a browser for example. I was hoping to get some friends who don't live in the same city, (...
0
votes
0answers
8 views

My runoff problem doesn't pass check50

when I run check50 this is the message I get and I don't know what to fix :( tabulate counts votes when all candidates remain in election tabulate function did not produce correct vote totals :( ...
0
votes
2answers
273 views

Querying portfolio for index route PSET7/C$50 Finance/index

I have created a table named "portfolio" in my database which stores users purchase data while I kept the user_id field of this table NOT UNIQUE ie no primary key so as to let the user buy more same ...
1
vote
1answer
160 views

Paddle is lagging and how to use drand48?

Well when I coded for the creation of paddle and the movement of the paddle in initpaddle(), it was moving fine but now after step 6 of the problem set. With the ball too moving the paddle is lagging, ...
0
votes
1answer
51 views

My print_winner from pset3/tideman is doing everything right and still check50 says it's wrong

void print_winner(void) { bool looser; for (int i = 0; i < pair_count; i++) { looser = false; for (int j = 0; j < pair_count; j++) //checks if each winner ever lost ...
0
votes
1answer
13 views

Pset3 Plurality returning “Invalid vote” in main programme code

When inputting vote names in "Plurality", the programme is returning Invalid vote. It looks like this in the terminal: ./plurality Alice Bob Garry Jim Number of votes: 4 Vote: Alice Invalid ...
0
votes
1answer
161 views

pset8 (mashup): Onion articles not showing

My links for non-Onion articles are displaying just fine in infoWindows attached to markers, but even though the Onion aricles are fetched correctly through ajax, they are not being displayed in my ...
0
votes
1answer
470 views

pset6 DNA. My code passes all tests but this one: python dna.py databases/large.csv sequences/18.txt

from sys import argv, exit import pandas as pd # Checks if the number of files is correct if len(argv) != 3: print("Usage: python dna.py data.csv sequence.txt") exit(1) # Reads the text file ...
0
votes
1answer
282 views

pset7 - Buy doesn't return correct value

I've ran into an issue while running Check50 on what I thought was my functioning solution for pset7, namely it doesn't find the correct value in the index after trying to run the buy function. This ...
0
votes
1answer
76 views

PSet 6 Parse Function (check50 issue)

I hope you are well! I am currently on pset6 and I am stuck on the parse function. So far I have managed to get check50 to go all but green on a few checks: https://sandbox.cs50.net/checks/...
0
votes
0answers
9 views

PSET 6 DNA ~ some STR count is above the correct value by 1?

I'm almost done with pset6 hopefully but I have one problem with my code When i run it with for example python dna.py databases/small.csv sequences/4.txt python dna.py databases/large.csv sequences/10....
0
votes
1answer
69 views

Hints on how to style the postal code in pset8

I've been trying to style the postal code like the staff version, but without success. The code runs if I enclose <%- postal_code %> with the <span> tag, but if I try to add an id, ...
0
votes
1answer
9 views

Keyerror Won't Go Away

I keep getting a key-error in pset7, Houses: Traceback (most recent call last): File "import.py", line 24, in <module> names = cutting(row["name"]) KeyError: 'name' ...
0
votes
1answer
532 views

pset3 implementing bubblesort, how should i test what is most likely garbage?

i am a total beginner and i tried to implement bubble sort as follows: void swap(int* a, int* b) { int temp = *a; *a = *b; *b = temp; } void sort(int values[], int n) { do int counter=0; ...
0
votes
1answer
89 views

Pset 3 Music. Brute forced the frequency function, no syntax errors but only getting 0's for all my answers? Any Ideas?

I know my code is not clean at all. For the frequency function I just brute forced it by just starting with "what if there were only A's?" and copied that for the rest of the letters. Naturally messy ...
0
votes
1answer
9 views

How do I generate random numbers between two number and fill them in an array in c?

I am trying to write a program that generates 10 random numbers between two numbers and put them into an array in c but am having a hard time on how to do it.
0
votes
1answer
67 views

Pset 6 sentiments init function

I'm working on the init function is sentiments and I'm struggling a bit on what to put in the for loop. This is what I have so far, can someone tell me if this is correct or how to fix it? def ...
0
votes
1answer
12 views

pset2 Readability test question

This is what I have so far. I realized that when counting letters there are more symbols you must exclude, but I am not sure how to do that. Also, my program isn't running for some reason and I am not ...
0
votes
1answer
94 views

Problem with Total (stock price * number of shares) and Number of Shares Value in Portfolio on Index

Just recently, on my implementation of CS50 Finance, I bought 4 shares of Netflix, and then another 2, but instead of showing 6 shares on the Portfolio, it's only showing 2.  The "Total" value for the ...
2
votes
1answer
450 views

CS50's Web Programming with Python and JavaScript on edx project submission

On the following course on edx: CS50's Mobile App Development with React Native CS50's Web Programming with Python and JavaScript I have been trying to submit the project work but it is "Coming Soon!" ...
0
votes
1answer
13 views

PSet1 Credit Invalid VISA that shows as Valid. My checksum must be wrong but dont know why

*/Here is the error I get: :( identifies 4111111111111113 as INVALID expected "INVALID\n", not "VISA\n" :( identifies 4222222222223 as INVALID expected "INVALID\n", not &...
0
votes
1answer
237 views

pset7/movies/13.sql: exclude Kevin Bacon from the resulting list

In pset7/movies, I want to dynamically exclude Kevin Bacon from the resulting list (e.g. not specifically mentioning his name with NOT or EXCEPT or copying and pasting code that calculates his ID, so ...
0
votes
0answers
6 views

Problem Set 3 - Tideman Lock Pairs

I am trying to solve the tideman problem for pset3. I have managed to get all parts of my code working apart from the the two parts which relate to checking whether cycles are created. :( lock_pairs ...
0
votes
1answer
130 views

pset7.zip won't unzip

I've downloaded the pset7.zip file as per the spec, but I can't get it to unzip. I've tried to unzip using both the unzip command in the terminal window as well as trying stuffit expander on my hard ...

15 30 50 per page
1
2 3 4 5
235