Questions tagged [untagged]
The untagged tag has no usage guidance.
88
questions
0
votes
0
answers
2
views
For my CS50 final project I have created a bucket list app that allows us to add items . I want to implement a complete function for each item in list
@app.route("/index")
@login_required
def index():
user_id = session["user_id"]
lists = db.execute("SELECT wish FROM lists WHERE user_id =?", user_id)
return ...
0
votes
1
answer
12
views
Function declaration in lecture 2
In lecture 2 at the timestamp below, the function average(int length, int array[]) is never declared at the top of the code like we did in lecture 1. Is this a mistake in lecture or will the program ...
0
votes
0
answers
15
views
pset5 storing the head of linkedlist in Table array
In pset5 I am trying to store the *head ptr which is head of the linkelist of nodes. Should I store the value of head or the address of head.
ex. let's say the word is apple so n= 0 , then I want to ...
0
votes
1
answer
156
views
ImportError: numpy.core.multiarray failed to import-even though I have installed NumPy?
I have installed NumPy version 1.19.5 for a python program (I am using python 3.6.8, so NumPy 1.19.5 is the latest version it accepts I think), using <pip3 install numpy==1.19.>. However, I keep ...
0
votes
1
answer
10
views
Pset 2 : Readability
In my code, in order to find the number of words by counting the number of spaces, I am having a logical error
My intention is to count the number of spaces using a for loop and an 'if' condition. I ...
0
votes
1
answer
28
views
Sepia and reflect function output the image unchanged
The grayscale function works fine, but when i try the sepia and reflect the new image is un changed from the old one. (code below)
#include "helpers.h"
#include <math.h>
// Convert ...
0
votes
1
answer
13
views
I'm getting a expected expression error. pls help me solve this
#include <stdio.h>
#include <stdbool.h>
void printMenu(void);
void printLine(void);
int option;
float scores[3];
float getAvg(float*anyArray, int size);
char getGradeLetter(float x);
int ...
0
votes
1
answer
183
views
Error when fetching data from Heroku Postgresql: AttributeError: 'NoneType' object has no attribute '_instantiate_plugins'
I am getting the following error while fetching data from Heroku,
Traceback (most recent call last):
File "list.py", line 6, in <module>
engine = create_engine(os.getenv("DATABASE_URL"))
...
0
votes
1
answer
178
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
1
answer
70
views
PSET5: Serve Greyed Out/ CSS Changes Not Reflected on Page Despite Saves
I'm on to working on my extra HTML and CSS pages for PSET5. I've run HTTP-SERVER, clicked on Port 8080 and selected Open where upon I get a directory tree and select the HTML file I want to run. ...
0
votes
1
answer
410
views
I really want to use Express and Node JS for my final project - is this possible?
I got the app running fine in the terminal but can't seem to get it going in the browser. This is where it should run:
https://-.c9users.io
I tried inserting my username and the workspace name which ...
0
votes
1
answer
14
views
Why is my program rejecting "Hax0r2" in vigenere.c?
#include <stdio.h>
#include <string.h>
#include <cs50.h>
#include <stdlib.h>
#include <ctype.h>
int main(int argc, string argv[])
{
int j = 0;
int m;
int l;
//checks ...
0
votes
2
answers
96
views
calling square function
#include <stdio.h>
#include <cs50.h>
int square (int x);
int main(void)
{
int x = get_int ("x:");
printf("%i\n", square(x));
}
int square (int x)
//here in this line which ...
0
votes
1
answer
25
views
Hey guys i am new in cs50 and i am struggling to submit my CaeserCipher assignments please help
please assist I really need to submit my work.
0
votes
2
answers
731
views
expected identifier or '(' { error
I'm trying to run this code and here's the error that i get:
clang -fsanitize=signed-integer-overflow -fsanitize=undefined -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow zeki....
9
votes
1
answer
2k
views
cs50w project1 - AttributeError: 'NoneType' object has no attribute '_instantiate_plugins'
I am trying to import the books.csv file into the online PostgreSQL database via Python code, as shown in the lectures and I get this error message when sqlalchemy is attempting to create the engine. ...
0
votes
1
answer
117
views
why cant i use the hexadecimal codes in my program?
whodunit.c:77:40: error: invalid digit 'f' in octal constant
if (triple.rgbtRed == 0000ff)
whodunit.c:79:33: error: equality comparison result unused [-Werror,-Wunused-comparison]
0
votes
1
answer
19
views
i cant unzip my whodunit file even after downloading it from the given website from cs50. help me out
~/workspace/pset4/whodunit/ $ unzip whodunit.zip
unzip: cannot find or open whodunit.zip, whodunit.zip.zip or whodunit.zip.ZIP.
1
vote
1
answer
229
views
problem with my cash file in pset1
its still showing me the same error..
make: *** No rule to make target `cash'. Stop.
0
votes
1
answer
254
views
nothing to be done for - error message
I've created a new file called hello3 - using exactly the same code from my previous mario file, however when I go to 'make' it, it produces an error message stating the following: 'nothing to be done ...
0
votes
1
answer
125
views
after check50, my speller compilies but i am getting expected code 0,not 139 from big board and frown turns upside down from bench marking
[removed code per academic honesty guidelines]
0
votes
1
answer
10
views
Course was archived but granted access. What affect will this have
Let me start by saying that I have been trying for 2 days to find this answer for myself. I started the CS50 course in 2017 and due to medical reasons could not return to the course until last week. ...
0
votes
2
answers
157
views
APCS50 Problem: Chill Out can't figure out the problem with my code
I'm new to programming and I'm stuck on this program which converts Celsius to Fahrenheit.
Please help me figure out the problem with my code:
#include <cs50.h>
#include <stdio.h>
#...
0
votes
1
answer
9
views
Not valid text in initials more
int main(void)
{
string s = get_string();
if ((s[0] >= 'A' && s[0] <= 'Z') || (s[0] >= 'a' && s[0] <= 'z')) printf("%c", toupper(s[0])); //print first letter in ...
0
votes
1
answer
167
views
I can't log in to my CS50 finance page after I register as a user
Whenever I try to log in with a registered user, I get a ValueError: View function did not return a response error. It doesn't make sense because I can see that the users are registered in my database ...
0
votes
1
answer
66
views
Ctrl + S returns (i-search)`':
in CS50; when I hit Ctrl+S to Save it returns
(i-search)`':
Same for Ctrl+Shift+S. Same return.
Ctrl + S is working to save other documents on my computer
Thank you
0
votes
1
answer
25
views
I have completed all the projects two months ago but no certificate recieved!
I have completed CS50 from 11 September 2017. I still have not received my certificate or any response at all (e.g. my final project did not pass).
What should I do? Is there anyone with the same ...
0
votes
1
answer
29
views
Hi, I'm new to coding. Just got the hello world but water is already giving me trouble
This is my code, I know the curly brackets should come before you start coding but it gives the same error 'expected identifier' in every debug I tried. I have seen your other post to others as well ...
0
votes
1
answer
101
views
Why is uncompressed bitmap image checked with the condition biCompression != 0?
For week 4 problem set, in line 50 of copy.c there is a conditional statement to check if the image is uncompressed - biCompression != 0. According to the MSDN documentation for bitMapInfoHeader, the ...
0
votes
0
answers
18
views
Is my code completely wrong
I am trying to implement crack.py.I haven't done crack.c...I am really confused.Can anyone please kindly explain me what is wrong with my code
import sys
import crypt
def main():
if len(sys.argv)...
0
votes
1
answer
66
views
How to store a Reference board of the original values in sudoku.c
i am looking for help on sudoku.c. i need to store the original numbers that come with the board so that the number values can not be changed. i am having trouble figuring out how to store these ...
0
votes
1
answer
193
views
Check_flag in sort race
I have a quick question about the check_flag function in sort race. Just looking for a hint or advice to lead me in the right direction. I cant quite figure out how to reference the argv[1] values. I ...
0
votes
1
answer
401
views
CS50x Problem set week 0 Objective?
I am from colombia. Sorry If my english is not perfect !! I subscribed to CS50x and just completed the lecture. Now I am ready for problem set 0. The description for problem set is only "program in ...
0
votes
1
answer
36
views
Using Stack Exchange
How to type the code (code would come seperately)? Can anybody help me? I am using it about two three weeks, but can not understand ( I also tried to read the instruction but wasn't helpful)
1
vote
0
answers
115
views
picatic the puzzle day
Can anybody tell me what the first puzzle is about? What the images show?
Link for the question is
https://medium.com/@cs50/this-was-cs50x-puzzle-day-2016-1b1519b77353
2017 question
0
votes
1
answer
26
views
testing linear search
I had got some good advice previously but need just a little more help as really struggling. How do I test my linear search algorithm?
#include <cs50.h>
#include <stdio.h>
/**
* Returns ...
0
votes
1
answer
15
views
Function prototype - error
~/workspace/ $ make prototype
clang -fsanitize=integer -fsanitize=undefined -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow prototype.c -lcrypt -lcs50 -lm -o prototype
...
0
votes
1
answer
48
views
doesn't passes all test of check50 2016.vigenere vigenere.c
Showing following error
encrypts "world, say hello!" as "xoqmd, rby gflkp!" using "baz" as keyword
\ expected output, but not "ciphertext:xoqmd, szz gflkp!\n"
what should I make change in my ...
0
votes
1
answer
20
views
Save function blanked out
OK, thanks - have finally solved it.
For some reason, the font in the code area was set at '1'! The first few lines of the code were not visible. Everything looks good now. Just scared to logout for ...
2
votes
1
answer
168
views
Adding CS50.h to MacOS?
I've been trying to import the cs50.h library by all ways to my mac or xcode with no luck, I followed the instructions on https://manual.cs50.net/library/
nothing is working
Do you have any ...
0
votes
2
answers
46
views
pset5-speller: dependency issue
Please, I need your help. I have dependency issue with my code. This is check50 response on my code.
I guess the problem is with my load function. After a few tweaks on the code to fix the dependency ...
0
votes
1
answer
110
views
How to check curly braces?
When your code gets longer, how do you check your curly braces?
I am writing my first "longer" piece of code (approx 200 lines) and find it difficult to check that I have all my braces closed ...
0
votes
1
answer
106
views
using char arrays
if we use
char a[10];
for(int i=0;i<9;i++)
{
a[i]=GetChar();
printf("%c",a[i]);
}
While assigning every char to a char array, should we always leave the last byte in char array for '\0' ...
0
votes
1
answer
19
views
Lecture 4 : pointer size question
should the size of int*, double* be the same? (4 or 8?) as the int* just means the data type the pointer points while we are saving the address of a.
int a;
double b;
int is 4 bytes while double is ...
0
votes
0
answers
107
views
where is the file imprecision.c located?
i can not find the file imprecision.c. does any one know the location of this file imprecision.c ? or whats the path to run this file from CS50 IDE?
0
votes
2
answers
199
views
Could not load dictionary in cs50 pset5
I wrote the load code for pset5 which compiles but when I execute speller.c it says "Could not load dictionary". I have used both my own dictionary text file and the dictionary at home/cs50/pset5/...
0
votes
2
answers
302
views
is my implementation to insertion sort correct?
is my implementation to insertion sort correct?
for(int i = 0; i < n; i++)
{
for(int j = i; j > 0; j--)
{
int t;
if(a[j] < a[j - 1])
{
t = a[j - 1]...
0
votes
1
answer
42
views
Download lectures?
How do I download the lectures? When I click "Download Video" in Courseware, it plays the video but doesn't download it. I've tried doing this using Safari/OSX10 and Firefox/Windows8.
Thanks very ...
0
votes
1
answer
38
views
myspace in study.cs50: How do I walk through the loop correctly?
I've been trying to solve the problems in study.cs50.
I know for myspace I need to loop through the input string and stop at spaces,
before finally stopping at strlen(input string), (and I'm not doing ...
0
votes
0
answers
29
views
froshims-1 week8 walkthroughs
I am having an issue with froshims-1 in week8 walkthrough. It seems like the following line of code has no effect at all
<link href= "/css/bootstrap.css" rel="stylesheet"/>
I have pretty much ...