Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 12099
0 votes
Accepted

PSET 8 - CORS ERROR FIX WITH IDE?

https://ide50-jamesr1.cs50.io and https://ide50-jamesr1.cs50.io:8080 use different ports, and therefore are considered different servers. Instead of $.getJSON("https://ide50-jamesr1.cs50.io/articles? …
Blauelf's user avatar
  • 21k
1 vote

Route did not return true when username is available

As far as I know, it's jsonify(True).
Blauelf's user avatar
  • 21k
2 votes
Accepted

CS50 PSET 8 Finance 2019 - why does the length of a row queried from the database equal 1?

db.execute for a SELECT returns a list of dicts, a dict being some kind of key:value store. Each list entry corresponds to a database record. So len(rows) represents the matching number of records (w …
Blauelf's user avatar
  • 21k
0 votes

Finance /Check Username=undefined

You could use document.querySelector('input[name="username"]'), or probably document.getElementsByName("username")[0] (getElementsByName returns a NodeList, that's why you need to select an element). …
Blauelf's user avatar
  • 21k
1 vote

PSET 8: Finance /check

I don't think the "click" event of the form should be used, but the "submit" event. And I would do the preventDefault and the GET request in one callback function. In theory, you should use "/check?u …
Blauelf's user avatar
  • 21k
1 vote
Accepted

having problem in check() in cs 50 finance

I don't think it's a good idea to add listeners in a callback that way. They can pile up. The empty form does not seem to have one, empty form would submit, and you have no code for removing them late …
Blauelf's user avatar
  • 21k
1 vote

C$50 Finance Registering Error

/register The error message is because you don't return anything. Maybe return a redirect to / on success. Test the value db.execute returns for the INSERT. That one will tell you whether the INSERT w …
Blauelf's user avatar
  • 21k
0 votes

What is the purpose of using anonymous functions within other functions?

Your second example probably meant to be setTimeout(addMarkerMethod, i * 200); without the pair of parentheses. The event loop will cause your function to be called once it gets enqueued. In that …
Blauelf's user avatar
  • 21k
1 vote

Mashup: javascript variable doesn't retain value

Some background, skip if you want: JavaScript can only ever handle one piece of running code at a time. If you did the AJAX request in a synchronous way, waiting for it to complete before you continue …
Blauelf's user avatar
  • 21k
0 votes

CS50 Finance 2019 /check subproblem

Your data might be fine, your x is not. You are always returning undefined in your submit event handler, since the AJAX request is A, asynchronous, and your callback is executed long after submit bein …
Blauelf's user avatar
  • 21k
3 votes
Accepted

SQL3 SUM troubles

You can't use the aggregated value in WHERE. WHERE is applied to the table data, and the aggregated values are created later. There is the complementary HAVING clause, processed after aggregation. Us …
Blauelf's user avatar
  • 21k
1 vote

pset8 New errors without changing any old code

The API used in lookup stopped being available anonymously. One can get a personal token, but a person who did reported the free requests are pretty limited. Looks like CS50 staff got a token for us! …
Blauelf's user avatar
  • 21k
1 vote

Missing value for placeholder user_id pset8 history

That's happening in the first line of code you showed. The db.execute is missing a named argument, something like db.execute("... WHERE user_id = :user_id", user_id=session["user_id"]) …
Blauelf's user avatar
  • 21k
0 votes

Javascript isn't running at all in pset8 check

Static scripts should be placed in the static directory of your project. Somewhere in the code Flask is told to serve that one just as is, so they can be included like <script src="/static/script.js"> …
Blauelf's user avatar
  • 21k
1 vote
Accepted

PSet 8, Finance, cannot submit or reset button on register

Make sure to call the form's submit method, the submit button has no such thing.
Blauelf's user avatar
  • 21k

15 30 50 per page