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 1161
0 votes

Pset8 Seats question

You'll probably need to create your own function that calculates and returns the number of available/occupied seats in the shuttle. Given that null represents an empty seat, you can have something lik …
kzidane's user avatar
  • 17.7k
0 votes
Accepted

Ensuring Permissions on PSET8

Assuming you're on the latest version of the IDE (run update50 to make sure), no need to set any permissions anymore. Perhaps just ensure that the files under bin are executable. If we're considering …
kzidane's user avatar
  • 17.7k
1 vote
Accepted

Error when I give a passenger a seat

The problem is caused when shuttle.seats[i] is equal to null as you're trying to set the name property of it to PASSENGERS[i]. In other words, there is no name property (or pretty much any other prope …
kzidane's user avatar
  • 17.7k
1 vote
Accepted

compare value to key (dropoff)

You can still access the lat and lng of a house using something like HOUSES["Adams House"].lat; // access the lat HOUSES["Adams House"].lng; // access the lng and use these along with a method like …
kzidane's user avatar
  • 17.7k
0 votes

PSET8 Graded upon submission

Yes, pset8 should be graded if it was submitted. It should be graded within a maximum of 2 weeks. For more information, see this! …
kzidane's user avatar
  • 17.7k
1 vote
Accepted

Why is there a "@" in front of the functions in php

Per the documentation, the @ (known as the error control operator) does exactly that PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any error m …
1 vote
Accepted

pset8 clicking on icon inconsistent behavior, 2 clicks needed

I haven't solved this year's pset8 yet, but I guess this may be because getJSON is asynchronous by default — it returns immediately. …
kzidane's user avatar
  • 17.7k
0 votes

pset8 - access html values in scripts.js

to access the value sent to the server through Javascript, you could give this <select> element an id and access the value of the currently selected option as follows: <!-- HTML --> <select id="my_m …
kzidane's user avatar
  • 17.7k
1 vote
Accepted

How to get phpmyadmin to work inside pset8?

Carefully add this line at the bottom of that file, which will associate pset8 with the appliance’s "loopback" address (which won’t ever change): 127.0.0.1 pset8 Then save the file and quit …
kzidane's user avatar
  • 17.7k
2 votes
Accepted

Pset 8 Error CS50 Library SQL (CS50 IDE)

it appears that you're using a database user called TODO instead of the one that you should be using. recall that you need to specify these settings in a file called config.json!
kzidane's user avatar
  • 17.7k
0 votes
Accepted

php: file_exist() syntax question

your US.txt seems to be located under pset8/bin/. you're passing pset8/US.txt as a command-line argument to import. this makes file_exists look under pset8/bin/pset8 which actually doesn't exist. …
kzidane's user avatar
  • 17.7k
1 vote
Accepted

int object not subscriptable in register route

Are you sure both session and results are dicts?
kzidane's user avatar
  • 17.7k
4 votes

Is Pset8 optional?

Quoting the professor's comment on a post on the course's Facebook group Original Post: In pset8, I am unable to get Google Earth plug-in working on my computer then can i skip this problem ? …
kzidane's user avatar
  • 17.7k
1 vote
Accepted

The difference between the format of houses.js and passengers.js

You can think of HOUSES as an associative array. It contains key/value pairs. The keys are the strings (e.g., "Adams House", "Cabot House", etc.) and the values are the objects that are mapped to thes …
kzidane's user avatar
  • 17.7k
1 vote
Accepted

pset8 pickup unable to access the values of the shuttle.seats

You are over-complicating things a little. First you're creating an array of one object. So the correct way to access the value of name in your example is shuttle.seats[j][0].name; Second, you co …
kzidane's user avatar
  • 17.7k

15 30 50 per page