All Questions

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

PSET 7 Movies SQL Q9

In 9.sql, write a SQL query to list the names of all people who starred in a movie released in 2004, ordered by birth year. ...Your query should output a table with a single column for the name of ...
0
votes
1answer
22 views

Speller pset 5: Valgrind gives me error

I am doing pset 5 speller and It seems to be okey less valgrind check. Valgrind HELP50 gives me these errors ==22585== Use of uninitialised value of size 8 ==22585== at 0x40110B: hash (dictionary.c:...
0
votes
0answers
27 views

how do I perform a search

This is project one for wiki and I am stuck this is my last thing to do. below are screenshots of the views.py, util.py and template. We are suppose to use the functions from util.py(This is the last ...
0
votes
1answer
15 views

PSET 5 Speller - Unload leaking a ton of memory

I've been trying to read other questions on stack exchange about it and do research on it but I really couldn't find a solution for my unload problem. It doesn't seem to unload much. I tried a lot of ...
0
votes
1answer
11 views

Directory structures

I'm trying to create a new directory inside my pset1 directory. When I execute "~/ $ mkdir ~/pset1/mario" I get "bash: /home/ubuntu/: Is a directory". I think I need a better ...
0
votes
1answer
10 views

i m getting segmentation fault in my code for cs50 caesar

#include <stdio.h> #include <cs50.h> #include <stdlib.h> #include <ctype.h> #include <string.h> int main(int argc, string argv[]) { //getting correct input for KEY ...
0
votes
1answer
33 views

lock_pairs skips final pair if it creates cycle lock_pairs did not correctly lock all non-cyclical pairs

can anyone please help I got only one error which is:- lock_pairs skips final pair if it creates cycle lock_pairs did not correctly lock all non-cyclical pairs and this is my code bool hash_cycle(int ...
0
votes
0answers
17 views

FILTER BLUR FAILS 3x3 and 4x4

The code works fine, but it fails blur filters a 3x3 and 4x4 image. I would like a help on why it correctly blur a middle pixel, but fails those two. Apparently, the wrong pixels are either on edge (...
0
votes
1answer
15 views

Seg Fault in Writing to JPG

I am working on PSET4 Recover, and got to writing to the output file, but for some reason, it SegFaults when I try writing to a jpg. The error, as far as I can tell, occurs in the While Loop in the ...
0
votes
0answers
10 views

“Error when executing query: too many statements at once” pset 7 movies

Hi! I wanted to know what this error message meant because all my sql statements give the correct output but submit50 shows that i've only got a 2/14 , "Error when executing query: too many ...
0
votes
1answer
9 views

Why updating a dictionary is not working?

for row in rowsList: if row['middle'] is None: row['middle'] == "" print("{} {} {}, born {}".format(row['first'], row['middle'], row['last'], row['birth'])) Where ...
0
votes
1answer
36 views

Please help! I'm stuck on Pset5 Speller!

#include <stdbool.h> #include <stdlib.h> #include "dictionary.h" #include <string.h> #include <stdio.h> #include <ctype.h> int wordCount = 0; // Represents a ...
0
votes
1answer
18 views

Can't seem to wrap my head around what the Bitwise AND operator does in Pset4 vs. && AND operator

I just watched the Recover video and I saw them mention bitwise arithmetic, but I am not exactly sure what that means nor what it does. I saw another forum post explain it but that also didn't really ...
1
vote
1answer
29 views

pset3 runoff help -> 3 :( showing on check50

I'm getting the following fails when I check pset3 runoff (all the rest are coming up as correct) :( tabulate counts votes when multiple candidates are eliminated tabulate function did not produce ...
0
votes
1answer
16 views

The tools from the android track are'nt working

I cannot seem to figure out why, but the code and autocorrect from the lectures don't work. I might be because I'm using Nougat, and he's using Pie, but I don't really see why that would make much of ...
0
votes
2answers
19 views

Speller Valgrind Issues

I've been trying to finish up the speller pset, and while everything works well, I keep getting a memory leak. When I rerun check50 with --log, I get: checking for valgrind errors... 56 bytes in 1 ...
0
votes
1answer
19 views

Speller - not sure what's wrong

I'm struggling trying to find what the error is or why speller is behaving the way it is. Currently, when I run help50 valgrind, I get this error message: ==8634== 56 bytes in 1 blocks are definitely ...
1
vote
2answers
26 views

Pset5: check unable to find words

Thankfully, I don't get any seg faults so I'm guessing unload() is working properly. Also, load() seems to run correctly when debugging, so I'm guessing the problem isn't on loading either. I don't ...
0
votes
1answer
10 views

Finance history, runtime error(“unsupported value: {}”.format(value))

After creating a table to handle and record all transactions, I seem to run into problems with my buy and sell functions when I try to update the history table. Specifically this line of code: # ...
0
votes
1answer
16 views

Finance PROBLEM with lookup: TypeError: quote_from_bytes() expected bytes

I have Finance barely ready but like most codes, it has a buggy near the finish line. I have a problem with lookup. Always return None. I check it. and Terminal shows this error: TypeError: ...
0
votes
1answer
10 views

Pset1 - Mario (less) - White Space

I am having a heck of a time trying to fix my error of "did you add too much trailing whitespace to the end of your pyramid?". It looks identical to me, but obviously I am missing something. ...
0
votes
0answers
9 views

pset8 Pong - Ball moving at high velocity ignores collision detection

I've implemented several working AI's for the game. When I put the best AI's up against each other, they play up until some point where the ball is moving very fast, and then the paddle collision ...
0
votes
1answer
19 views

Finance Buy function: Error when trying to create shares table, 'unknown column “user_id” in foreign key definition'

I'm trying to create a shares table for the buy function and have tried multiple CREATE TABLE commands with no success. Most recently, I tried: CREATE TABLE IF NOT EXISTS 'shares' ('id' INTEGER ...
0
votes
1answer
25 views

check50 in pset2

I won't post my code, because, as far as I could tell, it works fine, but I keep on getting this when I run check50 and I don't know know exactly what it means or how to fix it. My code runs perfectly ...
0
votes
0answers
14 views

pokedex android search error

the code right and I re-write it more than one time and compiler without error but didn't make search public class PokedexAdapter extends RecyclerView.Adapter<PokedexAdapter.PokedexViewHolder> ...
0
votes
1answer
30 views

Pset6 DNA Not matching to names in the database

The print statements seem to turn out what I hoped for up until trying to compare the STR counts to the database STR counts. I would just appreciate any pointers of where I'm going wrong thanks. ...
0
votes
0answers
23 views

Trouble filtering center pixels in pset4 filter blur

I am SO close on reflect but am still getting a few final errors. My code for pixels on the edge and in the corners seems to work fine. However, there is an issue with my code on the center pixels and ...
0
votes
1answer
23 views

Cannot compile Mario (less comfortable) in PSET 1

I have finally made code that works and allows itself to be "made". However when I try to compile the code to submit it, it presents me with an error that says "undefined reference to '...
0
votes
1answer
17 views

clarification validating command line arg

thanks for the answer. I tried to use a for loop, like this, for (int i = 0; i <= argc; i++) { if (isalpha(*argv[1])) { printf ("Usage: ./caesar ...
0
votes
1answer
15 views

Runtime error in pset4

I'm currently working on filter.c, and I'm struggling with the blur segment of it. I tried to write a code (I'm aware it's a mess of hard-code, but it's an attempt!), but I keep getting this error: ...
0
votes
1answer
16 views

Finance Portfolio (index) I can't go on. Need to take to HTML the actual price and total of stock

I am stopped at this part of Finance now. I can print at HTML the symbol and the sum of the shares... but I don't know how to take the iteration for each symbol to the HTML to know the actual price ...
0
votes
1answer
16 views

PSET5 Speller - Can't handle substrings properly

I've been doing the speller exercise for a while and I'm stuck in the "handle substrings properly". Here's my code: // Implements a dictionary's functionality #include <stdbool.h> ...
0
votes
1answer
10 views

when I compile my program this bug appear. error: control may reach end of non-void function [-Werror,-Wreturn-type] }

bool check_valid_key (string s) { for (int i = 0, len = strlen(s); i < len; i++) { if (!isdigit(s[1])) return false; return true; } }
0
votes
0answers
17 views

Lock pairs and Recursivity

I've been trying to solve this pset since more than a month and don't want to give up... so this is the first time I'm coming to ask for help. Basically I separated in two parts the lock_pairs ...
0
votes
1answer
17 views

Python - for loop not being executed, leading to NameError of variables defined in the loop

It's a simple Python program to find the number of primes until a certain number. The for z in range(1,y): loop does not execute, but rather execution jumps to the print(count," Pr...) statement ...
0
votes
1answer
18 views

CS50 (Speller) returns all words as misspelled

I'm right on the verge of cracking this problem. I ran the program on the small dictionary provided in the distribution code. It returned both words as misspelled. So I debugged the program. I noticed ...
0
votes
2answers
43 views

Pset4 Recover: succesfully recovers first and second image, unsure as to why no other image is recovered (spoiler)

I must admit I'm having particular trouble in this assignment. Maybe it's the amount of new concepts. I think I have the idea down but I must me missing an error regarding the loop. I've tried ...
0
votes
2answers
26 views

Question on Pset2 Caeser

I am a beginner to coding and a rising ninth grader. This is my code on the bottom and I ran check50 on it and everything was green but, I'm not sure if the code would be consider as "right" ...
0
votes
0answers
13 views

I keep getting invalid syntax at else. I am trying to redirect a page

here is the code. I keep getting invalid syntax at else. Can someone explain why and help please.
0
votes
1answer
24 views

pset4 recover - how can I get last few bytes to JPG

I've finally gotten recover.c to the point where it compiles. When I run it, it gives me this error message: munmap_chunk(): invalid pointer Aborted But it also generates all fifty of the pictures! ...
0
votes
1answer
35 views

pset4 Filter (more) Edge Detection help

void edges(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE copy[height][width]; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) {...
0
votes
0answers
27 views

Can't get pset3/tideman's lock-pairs function to work

Before going to Python I thought I'd go back to some previous homework that I hadn't been able to solve - pset3/tideman. I've spent ages on this but I just can't seem to figure out the lock function. ...
0
votes
1answer
13 views

validating command line argument

I'm doing caesar in pset 2 and it's working well when i enter ./caesar 1, or ./caesar a, or ./caesar 1 2, but when i try ./caesar 2h, it still runs the program. A couple of other people asked this ...
0
votes
1answer
19 views

Clang can't find -lcs50.h

I am trying to compile my code and make a clang file but every time I try to do it it tells me that the cs50.h file can't be found and I don't know what I can do to fix it. Please help me. I have ...
0
votes
1answer
13 views

Problem taking a SUM with SQL to python

I am doing Finance and I am fighting with this code... could anyone help me? I want to "select" some data from a sql table and put this value to a variable in python (a specific FLOAT number)...
0
votes
0answers
20 views

I keep getting - TypeError: unhashable typ

can't get page to redirect please help. I keep getting the error TypeError: unhashable type: 'dict' at line: return HttpResponseRedirect (reverse("encyclopedia:index", { "entries":...
0
votes
1answer
17 views

Pset4: filter greyscale UndefinedBehaviorSanitizer (not due to incorrect order of height and width)

I've seen all the other questions and answers regarding this specific error. Thankfully, or not so, my error was not due to the order in which I looped through the image. Here's my code: void ...
0
votes
2answers
25 views

Valgrind - 2 memory leaks | Recover.c | Pset-4

Valgrind encountered two errors in the following code. I'm not able to get why is this happening even when I close files and free allocs. Please help if you can. #include <stdio.h> #include <...
0
votes
0answers
18 views

how to save an entry and also add it to an existing list

My code won't work need help. for some reason when I try to save an entry it just refreshes me back to the homepage without adding or saving the new entry I tried to create. what can I do different? ...
0
votes
0answers
7 views

How to make the pong programs in CS50 run using Visual Studio Code application? How do I compile the Lua code and run successfully?

I have Visual Studio Community as well as Visual Studio Code installed on my machine. I am operating under Windows 10. I do not see any directions on how to launch the various pong programs? Is it ...

15 30 50 per page