Questions tagged [pset8]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
260 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
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 ...
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
269 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
169 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
250 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
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 ...
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
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 ...
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 ...
1 vote
1 answer
317 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
55 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
1k views

C$50 Finance Registering Error

In check and register, my application is returning wrong results for if there is a duplicate username. If I type a duplicate username, it just adds it to the database. A registering and logging in ...
0 votes
1 answer
169 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 ...
2 votes
2 answers
316 views

pset8 - Cities with two part names

I'm having an issue with search.php. I am wondering how to parse $_GET["geo"] so that it can find cities with a space in the name (i.e. New York, San Diego). I used the 'LIKE' sql command and strtok() ...
0 votes
1 answer
95 views

PSET8 announcements not visible

The announcements are partly hidden by the border of the chart div. I have tried to modify the css but it isn't working. Any ideas on how it fix this?
0 votes
1 answer
637 views

using variable in <option> tag of <select> tag

I want to make a drop down menu containing list of all buildings while adding html to div id=teleport thru jquery.html(). while looping for populating the list, I don't know how to use a variable like ...
0 votes
1 answer
294 views

CS50 pset8 addMarker Getjson not working

I got "success" in the console which mean getjson returning an object. I try assign it to a var name news and put in back in showInfo but showInfo always output a loading image which mean typeof news ...
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 $("#...
0 votes
1 answer
225 views

pset8 search.php failed to open stream:

When I am testing the implemented search.php in the browser, I get "Fatal error: Unknown: Failed opening required '/home/ubuntu/workspace/pset8/public/search.php' (include_path='.:/usr/share/php:/usr/...
0 votes
1 answer
73 views

Hints on how to style the postal code in pset8

I've been trying to style the postal code like the staff version, but without success. The code runs if I enclose <%- postal_code %> with the <span> tag, but if I try to add an id, ...
0 votes
1 answer
118 views

CS50 Library error

I had an error trying to restart apache2 but when I resolved this problem, with some help on this forum, I'm now getting the following error message: The error message reads: Fatal error: CS50 ...
0 votes
1 answer
167 views

pset8 (mashup): Onion articles not showing

My links for non-Onion articles are displaying just fine in infoWindows attached to markers, but even though the Onion aricles are fetched correctly through ajax, they are not being displayed in my ...
1 vote
1 answer
231 views

mashup.db places - change primary key/accuracy data type

When I create places table in mashup.db, I created country_code as primary key and not be null until I realize how stupid this is. But how could I change it using sqlite statement? Or should I just ...
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["...
0 votes
1 answer
136 views

Staff's solution of search doesn't pass required tests. Mine does, but works much slower

As per specifications we are given links to test return of JSON data for our search requests. But staff's solution doesn't pass them. Check, only first one returns something. http://pset8.cs50.net/...
0 votes
1 answer
304 views

Finance /Check Username=undefined

I've been struggling with the check function of the Finance problem set. It seems it's unable to identify the username within the form based on the error for the link "/check?username=undefined". I'...
0 votes
1 answer
309 views

PSET8 Graded upon submission

I understand that PSET8 is optional, if it is submitted will there be a grade assigned? I have been checking for updates on PSET8 but I have not seen a grade assigned, but I did submit the optional ...
0 votes
1 answer
570 views

Need help with pset8/mashup/scripts.js/add_marker

I am done with mashup.db, apllication.py but seem to be stuck into add_marker. In so far as I have been able to write the code for instantiating a marker, adding labels and simple icons to it. For ...
1 vote
1 answer
143 views

PSET8 - Error: near "wc": syntax error

I am trying to execute the command : wc -l US.txt inside the sqlite3 terminal but I keep getting the following error: Error: near "wc": syntax error This is the sequel of the commands I am trying ...
0 votes
1 answer
370 views

Pset8: addMarker: markers not appearing but marker icon is loaded in Developer Tools

in mashup, the markers are not appearing, although they appear to be loading in my Network tab in Developer Tools. Here is my addMarker function. function addMarker(place) { // TODO var lat ...
0 votes
1 answer
144 views

'import' works: just 'latitude' and 'longitude' values are all 0.000?

'import' gets 'US.text' into 'places'. All values are correct, but 'longitude' and 'latitude'are all 0.0000; In 'places' I defined those as Decimals(7.4) specifying as 0.0000; What could have went ...
0 votes
2 answers
150 views

a question about forms in pset8

i'm in pset8 and I'm familiar with html and css and a little bit of java script .i implemented search.php and configure. the search is working properly but the form in index.php is quite confusing.i ...
0 votes
1 answer
90 views

dropoff() stops when I assign a null value

For some reason, every time my code comes to this line of code, shuttle.seats[passenger]=null; it executed that line, but does not continue on. This is the line of code in context: for (passenger ...
0 votes
1 answer
51 views

PSET8 Web Finance - Index/Portfolio - Why do my for loop variables not pull over to Portfolio.html?

I have the below code for my application: #valid stock row queries valid_stocks_rows = db.execute("SELECT symbol, SUM(shares) as sum_total FROM ledger WHERE user_id=:user_id GROUP BY symbol ...
0 votes
2 answers
102 views

pset 8 - Unable to write in text box

When I hover over the text box in Mashup the cursor doesn't even change into a typing cursor... The pset 8 PDF doesn't mention this anywhere. In fact, they refer to it in a sense that makes me think ...
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 ...
1 vote
1 answer
107 views

Driver error in the CS50 library

I am currently having a technical problem getting started with CS50 pset8. I intiailly had problems in the CS50 IDE window when I tried to import the file US.txt in to the MySQL phpMyAdmin database ...
0 votes
1 answer
244 views

pset8 c$50 finance /buy - transactions RuntimeError: (sqlite3.OperationalError) near "''": syntax error

I'm stuck on pset8 c$50 finance /buy: Form validation works properly but when i try to execute the INSERT INTO transactions table i get the following error: RuntimeError: (sqlite3.OperationalError) ...
0 votes
1 answer
60 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
3 answers
2k views

CS50P - PSet 8 - Seaons of love - seasons.py

I am trying to follow instructions for the exercice Seasons of Love on PSET8. Unfortunately, while running the "check50" command, it seems that I missing one input in order to replace "...
0 votes
1 answer
151 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
197 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
1 answer
72 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 ...

1
2 3 4 5
9