Questions tagged [pset8]

The tag has no usage guidance.

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

How to enter Jinja variables as values in my tags

I am using Jinja and am trying to set the "value" of the option to a variable. I tried this: <option value = {{stock['name']}}>{{stock['name]}}</option>, but it thinks that the {{stock['...
0 votes
1 answer
42 views

Getting error in pset8 Finance

I get this error in register in pset8/finance when I run check50: :) application.py exists :) application starts up :) register page has all required elements :( registering user succeeds expected ...
0 votes
1 answer
195 views

Pset8 Search not working correctly

I am having trouble getting search.php to work correctly. I implemented a solution for if the user just searches one term that works great. However, I'm having trouble getting it to work when they ...
0 votes
0 answers
13 views

Week 8 - Lab - Trivia

I have completed the lab and my page works, but I had to move my javascript around the page, and I can't work out why. I tried use the DOMContentLoaded approach, but code within that function wouldn't ...
0 votes
1 answer
60 views

How to tell if selling shares results in a negative amount pset8

This is the code I have at the moment dbshares = db.execute("SELECT :shares FROM portfolio WHERE user_id = :user_id", shares=shares, user_id=session["user_id"]) if dbshares[0]['shares'] - shares &...
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 ...
0 votes
1 answer
602 views

CS50 Finance 2019 Check50 errors

I have been stuck on this for a while now. No matter how I change my code nothing works it's the same 3 errors. I think the issue is in my register.html but I can't find anything wrong with it. Here ...
0 votes
1 answer
34 views

AJAX form validation

I am trying to validate my form, I am having some difficulty. I have tried two the methods, I like the keyup method but think it will be a bit too complicated. One of the biggest issues is submitting ...
0 votes
1 answer
85 views

PSET 8 Description Struct problems

So I have chosen the iOS path. I have completed every part of the required Pokedex except the dictionary. I am 99% sure that the message I get about failing is because I do not correctly make the ...
0 votes
1 answer
70 views

How to run a command (like apology) inside of db.execute? PSET8

I have an IF statement inside of db.execute, but I can't figure out how to run a normal command depending on the result. I want to run like apology inside of the db.execute for testing, but I can't ...
0 votes
1 answer
72 views

When stock and user exist, update (PSET8)

I'm trying to make it check if the user already owns this stock, and if they do, then to update the portfolio. I'm confused about how to get this code to work as I don't understand how to check if it ...
0 votes
1 answer
17 views

Stuck on custom validation

I am trying to do the check part of the assignment in Finance via Bootstrap validation but I am failing miserably trying to understand how it works at all. https://getbootstrap.com/docs/4.1/components/...
0 votes
1 answer
44 views

Update portfolio on duplicate id and stock

So I think I know where the problem is, it's trying to update the variable shares taken from the form, and add the shares from the form and the new amount of shares, which is not helpful. I need to ...
0 votes
1 answer
15 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 ...
0 votes
1 answer
35 views

$.getJSON request for articles not working

I'm getting a bit confused about what I need to do here to retrieve my articles in scripts.js from /articles to display on my marker. I have done ample reading about AJAX and $.getJSON, but still ...
0 votes
1 answer
226 views

PSET8 Finance Buy

For some reason, my buy function will not work. When I try to "buy" a share of stock, it always goes to internal server error. Here is my code: def buy(): if request.method == "POST&...
0 votes
1 answer
27 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() { ...
3 votes
1 answer
63 views

Google Earth frame is displayed in front of javascript alerts

When I click start engine in the right rail of the application, an alert is displayed behind the Google Earth frame of the Harvard Yard. I cannot click on any items that are displayed on this alert, ...
0 votes
1 answer
731 views

Problem Set 8 / Web Track - Finance (Redirect Error)

My functions seens to work fine, but when i have that redirect the user to the homepage (redirect("/")) the application crash and show the error message: 500 internal server error and I don't know if ...
0 votes
1 answer
93 views

Javascript isn't running at all in pset8 check

I'm not sure how to run my javascript in pset 8. I used a normal script tag to link it in my register/html file. I'm not sure I need to link it from the application file. Do I need all the JS to be ...
0 votes
1 answer
72 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, ...
0 votes
1 answer
72 views

I can't even get register to work. What am I missing?

I'm getting a Error 500 (-Internal error due to server overload) when I attempt to flask run for pset8-Finance. Here is my app.route("/register") @app.route("/register", methods=["GET", "POST"]) ...
0 votes
1 answer
65 views

pset8 Mashup onion links problem

I've found many questions about onion links showing up instead of local news, but haven't found solution for that problem. So, I have the same problem and my question is: is there solution or ...
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 ...
0 votes
1 answer
57 views

Does index.html have to be changed at all? It is currently blank

At which point should I be seeing the map when I open my web page. I am at the scripts.js section of the pset and the instructions says to change the coordinates in options to recenter your map. ...
0 votes
1 answer
130 views

Pset8 Finance personal touch

I decided to go with trading from index without manually typing the symbol. Also, I decided to simply go to the buy/sell page with the symbol pre-selected by a GET method (without quantities being ...
1 vote
1 answer
270 views

Cannot remove placemarks

I am stuck on trying to remove the placemarks after picking up a passenger. The problem is that I can keep adding the same passenger even though the placemark has been visually removed. I need help ...
0 votes
1 answer
42 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
1 answer
296 views

pset8 - search function in application.py

My search function returns the correct results when I am using for example q=Cambri but when I try to search using for instance q=021 nothing is returned. In my database I have set postal_code field ...
0 votes
1 answer
202 views

No markers are showing and gives me a 500 error

I am slowly progressing, first I couldn't see the map and I fixed that issue but I cannot see articles, locations, etc. Every time I type a place it gives me the error 500. Any help would be ...
0 votes
1 answer
207 views

pset8/mashup.db

I am working on pset8/mashup.db and seem to be stuck into this for long. Actually the documentation per CS50 says that we should consider reading readme.txt and US.txt for finding the data types for ...
0 votes
2 answers
174 views

pset8/mashup need help

I have successfully implemented my articles and search route in application.py in so far as my articles route returns a JSON array of 10 objects which is to say 10 news feeds. I have implemented my ...
0 votes
1 answer
122 views

pset8 using the uk map - no local news!

Well, I thought I'd finished!! I got the pset8 mashup map working - it does what it's supposed to, and the articles on the larger locations anyway are from google not onion, BUT...I just checked the ...
1 vote
1 answer
258 views

Cannot load Google Earth Plugin

When I go to the webpage in a Chrome browser outside the appliance, there is a Google map of the Harvard area on the right, and a "Download the Google Earth Plugin" window on the left. I have ...
0 votes
1 answer
383 views

pset8 - access html values in scripts.js

Adding the personal touch to pset8 mashup. I want to have a select dropdown list in index.html, and access the selected value in scripts.js If it was a PHP file it would be no problem, but I'm not so ...
0 votes
1 answer
195 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 ...
0 votes
1 answer
189 views

Pset8 addMarker Help Needed (search textbox also not working)

I'm trying to do addMarker() on Problem Set 8. I've got one marker showing on the map with a label, but that's it. I can't figure out how to show all of the markers that should go on the map at a ...
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) { //...
0 votes
1 answer
236 views

PSET8 Problem with infoWindow from addMarker() function

This is my code: function addMarker(place) { var opts = { position: {lat: parseFloat(place.latitude), lng: parseFloat(place.longitude)}, map: map, title: place.place_name ...
0 votes
1 answer
268 views

pset8 addMarker JSON question

I'm struggling with pset8 quite a bit during the addMarker function. I try to access the JSON object returned from articles() but I can't seem to understand how to access it. I've tried JSON.parse(),...
0 votes
1 answer
164 views

pset8 /articles retrieve only the onion rss feed

I implemented articles in application.py Pset8. Everything seems ok except i only get articles from theonion and not from actual google news.Here's the code : def articles(): """Look up articles for ...
0 votes
1 answer
247 views

Search function do not work if several words entered

Both mine and stuff solutions do not work for examples like (where there is two of more words from different db fields): https://ide50-username.cs50.io/search?q=New+Haven,+Connecticut // http://pset8....
0 votes
1 answer
124 views

addMarker() adding exact news of clicked place but on one marker

I don't know what is the problem in this code. When I click on a marker, it opens exact news on that location in an info window. But when I click on some other marker, it displays the info window on ...
0 votes
2 answers
475 views

Pset8 addmarker map not showing

I'v almost(finally) finished pset8, but dont know what's wrong with the addmarker part :- function addMarker(place) { // TODO var myPos = new google.maps.LatLng(place.latitude,place....
2 votes
1 answer
282 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 ...
0 votes
1 answer
152 views

Very badly stuck at removing placemarks

I am having trouble removing placemarks. My pickup function picks up the passengers and renders the seating chart correctly, but placemarks from the 3D map are not being removed, thus I can pickup a ...
0 votes
1 answer
1k views

pset8 import: Problems with the delimiter in fgetcsv

*EDIT I seem to be having some trouble with the fgetcsv function. In my code I am trying to create a single row array with each tab separated value as a separate element in the array. Instead of ...
0 votes
1 answer
203 views

pset8 addMarker() - Problem displaying <ul> in the google maps textbox

I'm having a hard time figuring out why my function doesn't show the unordered list in the marker's info box but instead it does display "[object HTMLUListElement]". console.log(list) confirms that ...
1 vote
1 answer
303 views

CS50 Final Project: Dropdown Menu / Typeaheads

For my final project (a website where people can write diaries and read others' diaries), I am trying to implementing a search box where the user may search usernames to read others' diaries, so I ...
0 votes
1 answer
166 views

Pset8 Mashup cs50x 2016 version, issue to make it work

I've completed the cs50x 2016 version last december and I'tried to see the mashup code working again in order to see code and reuse it and maybe modify it. I tried to run it as usual but it didn't ...

1
2 3 4 5
9