Hot answers tagged

4 votes
Accepted

Pset 6 Web Server

Don't look at it like a mountain and get so overwhelmed. It's just another pset, maybe a little more difficult than the previous ones. Start from the beginning, watch all the lectures and short ...
user avatar
  • 7,326
4 votes
Accepted

PSET7: web server permissions problem

403 Forbidden / permissions / chmod: the Definitive Guide TL;DR: PHP files and config.json need to be set to chmod 640 despite what it says in the Problem Specification. Hope this helps!
user avatar
  • 3,036
2 votes
Accepted

Problem Set 8 / Web Track - Finance (RuntimeError: UNIQUE constraint failed)

A problem is here: if rows == 1:. Remember, execute returns a list of dictionaries, therefore that conditional is never true.
user avatar
1 vote
Accepted

Blocked on C$50 Finance suggested personal touch feature - adapting index page to enable transactions in situ

The proximate cause of the error is id is not submitted with the form. There may be an easier way that would eliminate the code that is presumably duplicated between index and buy/sell. The button ...
user avatar
1 vote
Accepted

Week 8 - Finance - Buy - Getting Error Message Missing Shares

The name for shares is "symbol". It is in this line: <input autocomplete="off" autofocus class="form-control" name="symbol" placeholder="Shares" ...
user avatar
  • 992
1 vote
Accepted

finance cosntraint syntax error

The SQLite does not support adding constraints to existing tables. The use of an unique index shall deliver the same effect. CREATE UNIQUE INDEX example ON illustrations (reference) The documentation ...
user avatar
1 vote
Accepted

Finance sql doubt

Sure. Use the UPDATE sql command, It'll take the form of "UPDATE table SET some value WHERE some_condition". Google sql update For example: UPDATE users SET firstname = "Fred", ...
user avatar
  • 64.1k
1 vote
Accepted

Web track finance error

The "sequence" in the error message is shares, which is a string. From MDN doc on sending form data: Whichever HTTP method you choose, the server receives a string that will be parsed in ...
user avatar
1 vote
Accepted

Finance Register Checking for Duplicate Username Not Working

Iirc the users table in the db was provided for us, so while Cliff's solution would work it's not the issue. I'm not sure if the SQL in the below function is calling anything, so nothing will be ...
user avatar
1 vote
Accepted

PSET Tracks Flask and JS

The name of the attribute is 'disabled' (past tense), not 'disable'. And, of course, "submit" is enabled by default, so the toggle will not work if nothing is entered in the "task" input before the "...
user avatar
1 vote

Why can I not open my website in HTML?

"open index.html" is not the appropriate command to open the browser, if we are in the appropriate directory, this command will open a file like this name in the IDE editor, if the file does not exist ...
user avatar
  • 5,172
1 vote

Connection to the server problems

I've finally got the message. You were right. The 2015 and the 2016 versions of the instructions are different. I thought I was reading the 2016 version which in fact was the 2015 version. In the 2016 ...
user avatar
1 vote

Connection to the server problems

server gives the "Stopping server" message when it cannot find the "/path/to/root". So, there is no "public" folder in your current working directory when you execute ~cs50/pset6/server public. Either ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible