Search Results
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 pset8
Search options answers only
not deleted
user 4847
0
votes
Accepted
Why I am getting a whilte screen on pset8 mashup?
Don't know the exact cause of your issue, but while working on pset8, I did notice that when I added a new section of code to the project, if it wasn't working correctly, the map would not display and …
1
vote
Accepted
How to fix "PHP parse error" when running import?
The problem is simple. Look at the offending line:
if (!is_readable($sourcefile) {
Now check all of your parentheses pairings. This problem with mismatched parentheses occurs several times in …
0
votes
Pset8: NoApiKeys error and the map does not display
When I did this program in 2015, I found that, as I was coding, if I did something wrong, the map wouldn't display - only a blank white screen. If you haven't started coding, but are just working on …
0
votes
When stock and user exist, update (PSET8)
SQL code is a bit different from programming language syntax. Here's a template to give you an idea how to do what you want. You'll have to change the appropriate vars and values for your needs. ;- …
0
votes
Update portfolio on duplicate id and stock
The code would need to do a select on the table to find out how many shares are owned and then update the value. In this method, you need to do a SELECT from the table to find out if the user owns the …
0
votes
How to tell if selling shares results in a negative amount pset8
Shot in the dark:
if dbshares[0]['shares'] - shares < 0:
The precedence order has "<" over "-". That means that "shares < 0" is being evaluated first. Maybe try adding parentheses?
if (dbshares …
1
vote
Accepted
Define buy or selling function
I don't really see any practical reason or method to using the same function for both buy and sell. While there's overlap, the differences are enough that they should be separate functions. Combining …
0
votes
Accepted
Pset8 Finance stocks typed in lower case don't appear in portfolio
how about toupper(in c) or upper(python)?
Best practice is to convert every symbol to uppercase before putting it into a table and before trying to do a search on a symbol.
BTW, isupper only check …
1
vote
Import for Mashup
The table probably already has values in it or is getting some loaded in successfully, but the problem isn't with what is already in the table.
Basically, it looks like something is trying to do an …
0
votes
Accepted
Pset8 search.php (still) not working
Instead, try AGAINST (?)", Also, you must have a FULLTEXT index across all the columns in your query and include no other columns in that index. This index is created in the database, not coded in a …
1
vote
Accepted
pset8 query function
$lines[12] doesn't exist on $lines as return value from fgetcsv...get rid of "id" as one of your insert values – Mauricio Aguilar Cardenas 7 hours ago
Thanks, this has worked. Data seems to stop inp …
0
votes
Accepted
Mashup Infowindow Opening on Same Markers
If that's your last problem, then I think that you are finished! Think about the real-world practical application of what's happening and not the code.
The clue is that you clicked on two cities tha …
0
votes
finance how to compare requested shares to shares owned
It would be something like this:
SELECT shares FROM portfolio WHERE userid = :userid AND symbol = :symbol
The exact syntax is probably messed up (I haven't done this in a while) but the form of the …
1
vote
PSET8 Finance Buy. SQL query not executing
Did you test the query directly on the database?
My gut says that the "/" in the buy/sell column name is causing problems. Try changing the column name in the table to something without any special ch …
1
vote
Accepted
FINANCE: GROUP BY doesn't add up the numbers of shares of the same stock
BY doing "GROUP BY symbol, shares", it will do exactly that - any rows of AAPL, 4 shares will be grouped together, and any AAPL, 3 shares will be in a separate grouping.
try "GROUP BY userid, symbol" …