Questions tagged [pset8]

The tag has no usage guidance.

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

pset8 finance portfolio on new stock/id

I'm trying to make it so when the user doesn't already own the stock, it adds it to the table. If they do already own it, it should update. The problem is when I try it, it buys 2x what it is supposed ...
Joel Banks's user avatar
0 votes
1 answer
278 views

pset8 finance check sub-problem

Working on 'check' problem in finance. I've implemented the actual check function via GET HTTP and responses are valid, have also implemented into the register.html page, with simply displaying the ...
yehoshua zlotogorski's user avatar
0 votes
1 answer
747 views

CS50 Pset8 Finance /check - TypeError: The view function did not return a valid response

I've got most of finance working but I can't for the life of me sort out /check. No matter what I do, I get the error: 'TypeError: The view function did not return a valid response. The function ...
user23081's user avatar
0 votes
1 answer
110 views

SQL3 SUM troubles

Trying to create a portfolio by selecting all transactions of given stock symbol, summing the shares (negative for "sell" actions) and then displaying only positions where the user_id fits && ...
yehoshua zlotogorski's user avatar
1 vote
1 answer
1k views

Pset8 Finance Check error

I consistently get this error when running check50 on pset8 Finance problem from CS50 when I assume it tries to add a new user that isn't in the user database. However when I enter a new user myself, ...
booklvr's user avatar
  • 13
0 votes
1 answer
407 views

Route did not return true when username is available

my check50 returns the following error: :( /check route confirms whether username is available route did not return true when username is available Log sending GET request to /check?username=...
FreshClicks's user avatar
0 votes
0 answers
205 views

PSET8 finance index giving internal server error, can't find a table that already exists

Whenever I go to the web server, and I log in, I get an internal server error. It says " no such table: transactions [SQL: 'SELECT stock, SUM(shares) as sumshares FROM transactions WHERE user_id = 1 ...
Joel Banks's user avatar
2 votes
1 answer
292 views

CS50 2019 PSET8 updating API from 2017 API

I have a lot of work from finance 2017, but it seems to use a different API than what I used last year. How do I update my code to use this new API? Or can I just use the one from last year? (I don't ...
Joel Banks's user avatar
0 votes
1 answer
477 views

Finance PSET8: Error: execute() takes 2 positional arguments but 3 were given

While implementing "Register" part in PSET8, I ran into the following problem - the code below returns: "TypeError: execute() takes 2 positional arguments but 3 were given". username = request.form....
RomanBlade's user avatar
0 votes
1 answer
86 views

Do we need an API key for mashup?

I get RefererNotAllowedMapError in console, and the whole screen is gray. But, at the bottom of the Mashup specification, there is changelog where it says that we don't need to get an API key. ...
11223342124's user avatar
1 vote
1 answer
2k views

CS50 Finance 2019 /check subproblem

In the 2019 edition of CS50 Finance there is a final subproblem where you have to use AJAX to ask the server if a username a new user is trying to register with is already taken, and then alert the ...
user22472's user avatar
0 votes
1 answer
35 views

Mashup: javascript variable doesn't retain value

I am trying to implement addMarkers function and calling "/articles" endpoint to get JSON data. However, while creating infoWindow javascript variable loses value. function addMarker(place) { var ...
jainilvachhani's user avatar
1 vote
1 answer
32 views

Map doesn't load properly pset8

When I go to flask run and open the web server, the google maps background is darkened and says "For development purposes only" and when I try to use the search feature nothing changes. Also I can ...
Joel Banks's user avatar
0 votes
1 answer
60 views

pset8 - addMarker and infowindow problem

I am having trouble with addMarker in pset8. The markers are only shown one by one each time I pan or zoom in/out the view. And after 10 moves it keeps adding markers (limitation to 10 isn't working). ...
luisavdornelles's user avatar
0 votes
1 answer
24 views

PSET8 invalid sw.

When I am trying to use the search bar, the autofill just gives me " , , " and when I click on that suggestion the console tells me "invalid sw". After reasearching the problem a bit, everyone seems ...
Turner Allen's user avatar
0 votes
1 answer
57 views

PSET8 Mashup : helpers.py

I can't understand the magic happening in helpers.py What is lookup.cache[]? I know lookup is the name of our function. I tried to search online for cache function but couldn't get any leads. I need ...
pankaj's user avatar
  • 111
0 votes
1 answer
34 views

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

What is the purpose of putting addMarketMethod() within an anonymous function in this example? function drop() { for (var i =0; i < markerArray.length; i++) { setTimeout(function() { ...
nvi's user avatar
  • 1
0 votes
0 answers
80 views

Exceeded Request Quota for API error

I am using a map in my final project, which was working fine up until a couple of weeks ago, and now it says 'for development purposes only' on my map though I have changed no code. I am using the API ...
M. Alex's user avatar
  • 135
0 votes
1 answer
74 views

Google maps API quota

I have found that after one request per day the google map of pset8/mashup doesn't load properly. I mean it displays the message that the site is for development purpose and doesn't load the map. So, ...
sk.76's user avatar
  • 312
0 votes
1 answer
173 views

Pset8 This page can't load Google Maps correctly

I tried to load my map today but I got an error message saying: This page can't load Google Maps correctly. When I look into Google documentation it seems that this is linked to billing being not ...
user21818's user avatar
0 votes
2 answers
247 views

PSET 8 Google Map API "You have exceeded your request quota for this API"

I get the title error message in my console with the map appearing in greyish, preventing me from furthering my work on this PSET. As this API key was given while downloading the files (more ...
SFYL's user avatar
  • 1
0 votes
1 answer
39 views

Javascript 'Undefined' Variable

I am trying to import values for coordinates using getJson however the map doesn't load now and if I try to print the coordinates in an alert box for testing purposes, it says 'undefined'. // get ...
M. Alex's user avatar
  • 135
0 votes
1 answer
54 views

RSS FEED pset8 mashup

In pset8 mashup, the lookup route in helpers.py has a code that has something to do with the rss feed and the url parsing. Can someone make me understand the line of code below like how it goes to the ...
sk.76's user avatar
  • 312
0 votes
0 answers
49 views

Been Trying to get Mashup To work

I've been trying to get my article's function to work in the mashup project but every time I use the test url I get an "Internal Server Error" my code is as bellow: @app.route("/articles") def ...
schapke's user avatar
  • 101
0 votes
1 answer
163 views

pset8 addMarker - markers not showing on map

When I run flask and open the map, I can't view the markers on the map. Is there something wrong with my addMarker function? Thank you. // Add marker for place to map function addMarker(place) { //...
Prav Elan's user avatar
0 votes
1 answer
89 views

mashup: add marker does not render infowindow

My code successfully creates markers that pop up throughout the view of the map. However, upon clicking, there is no info map that pops up. The terminal does show that the server receives the command ...
faelesterio's user avatar
0 votes
0 answers
37 views

Map not appearing

I implemented the configure() function. It worked for a few days but after that the map did not appear. There is only the search textbox which also doesn't work now. When I check the javascript ...
Amol Venkataraman's user avatar
0 votes
1 answer
73 views

Specify Multiple Search Conditions for SQL

this is a question about search() in pset8 Mashup. How does one select rows given multiple characteristics(for example in pseudo code, SELECT * THAT CONTAIN KEYWORDS "New Haven" AND "Connecticut" AND ...
faelesterio's user avatar
0 votes
1 answer
17 views

pset 8 us.txt file has more tabs than necessary

when i import us.txt file it seems to have excessive tabs. For eg, the very first row of us.txt has 3 tabs after admin_name3. This leads to the latitude field being left empty and the longitude field ...
Hasman404's user avatar
  • 101
0 votes
0 answers
188 views

pset8 mashup How To Work With The JSON Object?

As the title says, I'm having troubles about how to work with the returned data from the /articles route. My question is about accessing key->value pairs of the JSON Object. When I manually search ...
Dement0's user avatar
  • 13
0 votes
1 answer
243 views

Pset8 - Google Maps API - RefererNotAllowedMapError

I am re-posting this question as really want to complete this pset and cant find a solution. Have managed most of the problem set without a working map but now need to test markers. After running ...
PaleFire's user avatar
1 vote
1 answer
281 views

How can PSET8 be completed if RSS feed no longer supported by Google News

How are people going about PSET8 now that RSS feeds are not available on Google News. How do you access the stories for your info windows?
Breninio's user avatar
0 votes
1 answer
171 views

Search function - Pset8 - Mashup

I found the search query a little bit complicated, in the sense it can be difficult to adjust it to the user's input. For example, how do I permit the user to enter the parameters in different order ...
Marco Richetta's user avatar
0 votes
1 answer
524 views

jsonify not working when I add this line of code <<db = SQL("sqlite:///mashup.db")>> to application.py

I am trying to return a JSON on a certain URL in python application. Without this line db = SQL("sqlite:///mashup.db") everything works. The JSON is returned correctly. If I uncomment that line, ...
Giorgi Mamatelashvili's user avatar
0 votes
1 answer
328 views

Google is not letting me get API key

In pset8, I went to developers.google.com/maps/web as mentioned in the documentation. But google redirected me to developers.google.com/maps/overview. And there is no option to get an API key in the ...
Amol Venkataraman's user avatar
0 votes
1 answer
197 views

Pset 8 - Jquery of addMarker

I'm having some issues displaying the list of articles on my marker. I've definitely managed to get it to work and display things inside, but I think there's an issue with the syntax on my jquery ...
user avatar
1 vote
1 answer
263 views

Mashup: removeMarkers not removing markers? PLEASE HELP

Salutations good people, Been hacking away at Mashup for far too long on one issue after the next. Now my program works almost exactly as the staff solution, but I've noticed when dragging/zooming ...
Foxhole's user avatar
  • 29
0 votes
1 answer
250 views

Can't get articles on my marker, and city markers are persisting

function addMarker(place) { // Create marker var marker = new google.maps.Marker({ position: {lat: place.latitude, lng: place.longitude}, map: map, title: place["...
Sam The Man's user avatar
0 votes
1 answer
199 views

Pset8 - mashup (2018 or 2017): Downloading distribution code does not include txt files

I'm having some issues with downloading the distribution code for Pset8 (mashup). I am getting everything except US.txt and readme.txt. I do get the other text file, requirements.txt. Is anyone ...
brand n00bian's user avatar
0 votes
1 answer
298 views

pset8 2018 mashup search

I have changed nothing in the pset8 distribution code and only implemented search function and formatted configure in script.js, but no suggestion shows up from the search box 'q'. This worked ...
fufu's user avatar
  • 1
1 vote
1 answer
709 views

Mashup, how to add label outside the icons?

code var LatLng = {lat: place.latitude, lng: place.longitude}; var marker = new google.maps.Marker({ position: LatLng, map: map, title: place.place_name + ", " + place.admin_name1, label: place....
Nazariy Kushnir's user avatar
0 votes
2 answers
92 views

pset8 can't loop through JSON

I can't get my infowindow to show up a list of news and their links. I know that /articles?geo=[value'] will return a JSON but I can't loop through this JSON in InfoWindow. My code for addMarker is: ...
Ha Tran's user avatar
  • 74
1 vote
1 answer
135 views

Pset8: Please help, all my markers and news disappeared (Other peoples code don't work either)

Context: Update:* Checked other peoples code(https://github.com/endiliey/cs50) on the web and their icons are not showing up either. I also noticed that the staff implementation now no longer have ...
nvs0000's user avatar
  • 179
0 votes
1 answer
183 views

PSet8 Mashup Jsonify call fails on unmodified project

I took a long break from CS50, and came back to it today. I discovered that with no modifications and following the mashup directions, when running I always get an error on every method that returns ...
Tim's user avatar
  • 101
0 votes
1 answer
164 views

can't import US.txt into places

PSET 8 Mashup: I am not able to run the following commands as given by the problem set: $ sqlite3 mashup.db .separator "\t" .import US.txt places I've tried multiple ways, I am certainly in the same ...
NotABot's user avatar
0 votes
1 answer
829 views

DeletedApiProjectMapError and ApiNotActivatedMapError suddenly

When i was working on my project for 2nd day i got an error that i needed an API_KEY. I found it on this site by the instruction:(console.developers.google.com) i copied and pasted it but then i got ...
Ruslan Plastun's user avatar
1 vote
1 answer
43 views

What purpose does "eventData" serve in the pset8 source code "$("#q").focus(function(eventData)"?

I have read the jQuery documentation on .focus() as per the pset8 instructions. However, I still do not fully understand the code below: // hide info window when text box has focus $("#q").focus(...
Finesse Upscale's user avatar
0 votes
1 answer
290 views

How are script.js and application.py linked?

Question Why am I able to pipe variables from my database into my script.js file? I was able to pipe in "{{place_name}}, {{admin_name1}}, {{postal_code}}". script.js // configure typeahead $("#...
John Quinn's user avatar
0 votes
1 answer
72 views

PSET 8 - CORS ERROR FIX WITH IDE?

So I found out the issue I am having is not uncommon. The problem is the fixes that I have seen require you to have access to both client and server side headers and through the IDE I don't think we ...
Ryan A. James's user avatar
0 votes
1 answer
203 views

Pset 8 - Google News Search parameters (The Missing Manual)

I am trying to understand Google news parameters. Would anyone have an example of how to use these parameters? I got these from the link posted in the pset however no examples on how to use them were ...
Salamit's user avatar
  • 231

1 2
3
4 5
9