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 not deleted user 10074
0 votes
Accepted

Pset6 - Help with Lookup Function

The question is a little confusing because of the comments. The compiler complains about type definitions for len and buf. And you say in the comments: //(need to declare a type here) len = last - fi …
DinoCoderSaurus's user avatar
1 vote
Accepted

PSET7 Finance Question Quote Lookup Page

One problem is here <form action="/quote.html" method="post">. There is not a quote.html in document root (it is in subdir templates), thus the 404. But do you really want the form action to be the ht …
DinoCoderSaurus's user avatar
0 votes
Accepted

LOOKUP IS GLITCHY??? PSET7

The problem seems to be with alphavantage. Staff solution gives the same problem (as of 9:21 am et us, 27-july-2017). Upon reading the alphavantage doc, the High Usage tag got me wondering.... I tr …
DinoCoderSaurus's user avatar
2 votes
Accepted

(PSET6) hello.php always displays hello, hello, world regardless of input?

There shouldn't be an need for allocating in lookup(). You should simply be returning the string literal, as described in the spec. Why is returning an allocated pointer a problem? … The call from main is const char* type = lookup(path);. When you allocate the local variable mime in lookup it gets a (new!) memory address. …
DinoCoderSaurus's user avatar
0 votes

pset6 2 errors with parse and lookup

Scope. Pointers. While debugging, if you are inspecting abs_path while in parse it may very well be right. Remember that main will use abs_path, so you need to inspect it there too, when you return fr …
DinoCoderSaurus's user avatar
0 votes

Finance PROBLEM with lookup: TypeError: quote_from_bytes() expected bytes

symbol is not submitted with the form because the name attribute needs to be defined on the select element. name is not a valid attribute for <option> elements, and the HTML will give errors if valida …
DinoCoderSaurus's user avatar
1 vote

first version of check50 not working pset6

All things being equal, the only place that server returns a 505 is the parse function. If this parse function reaches for(int i=0;i<strlen(line);i++), it will always return a 505. Howzat? Assuming a …
DinoCoderSaurus's user avatar
1 vote
Accepted

PSET6 check50 server1 cat.exe and non-existant file return error 505

server should return 505 in exactly one place, from the parse function http version check. That means that strcmp(HTTP_version, "HTTP/1.1") does not return 0. That means that HTTP_version is not "HTTP …
DinoCoderSaurus's user avatar
1 vote
Accepted

Why Pset6 check cat.exe and non-existant file going wrong?

First suggest you send a request to server from browser or curl. You will discover that server seg faults. (That's what this \ expected output, not an exit code of 0 feedback from check50 indicates). …
DinoCoderSaurus's user avatar
2 votes
Accepted

Pset6 one check50 error

So server returns a 404 error at line 209, before it executes lookup. See the link mentioned in the comment for hints on testing. NB this is not a duplicate of the referenced call. … That was a bug in lookup. This is a bug in parse. …
DinoCoderSaurus's user avatar
0 votes

Why is all my check50 server2 red?

There's a bug in lookup. From the man page atoi() does not detect errors. This line int k = atoi(ext); is wrong. ext is going to be string data, that would be an error. So k could be anything. …
DinoCoderSaurus's user avatar
1 vote
Accepted

Pset 9 Finance index function, current stock price not displaying correctly

The problem isn't lookup. The problem is portfolio. There are exactly two keys in the portfolio dictionary, "current_price" and "holding_total". …
DinoCoderSaurus's user avatar
1 vote
Accepted

Why does my lookup function keep returning "None"?

Since the quote spec calls for an element named "symbol", and this if not request.form.get("stock"): is apparently working, it looks like the element is not named properly in the html. FYI to change " …
DinoCoderSaurus's user avatar
2 votes
Accepted

Finance index function does not return lookup value in index.html

Each dict in portfolio contains 3 keys as returned from the execute. There is no key current_price, so the html does not render anything for that column. If the key gets created in the for loop in ind …
DinoCoderSaurus's user avatar
0 votes

check50 is returning errors on pset6 but if I search the pages on browser all of the pages work

The browser is very forgiving, what's one byte more or less? check50, on the other hand, is very precise. There is an extra byte in your content (and length) because of this usage: while (!feof(file)) …
DinoCoderSaurus's user avatar

15 30 50 per page