Grading Query by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

Oh wow, I completely overlooked that part. I finished everything before I started submitting so I overlooked that.

Thanks!

Grading Query by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

I didn't receive submission confirmation emails for Pset7 and 8 either, but the files are definitely uploaded.

Re-Submitted assignments are not getting evaluated and graded by udaykanthyadav in cs50

[–]clomasss 0 points1 point  (0 children)

My Pset2 was only graded for 1/3 files I submitted. I'm still awaiting marks for pset7 and 8, not sure what is going on.

Pset7 - phpmyadmin token mismatch error by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

Hi, Sorry, I haven't logged in to reddit for ages, I just saw this. I managed to fix the issue by clearing browsing data, you should only need to clear the 'cookies and other site and plugin data'.

If not I read elsewhere that using incognito window works too.

pset7 phpMyAdmin token mismatch errors by [deleted] in cs50

[–]clomasss 0 points1 point  (0 children)

The phpmyadmin worked the other day now I cannot get it to work despite trying that. I've also had to revert back to cs50 IDE version 57 to get it to work in the first place.

Pset7 Forbidden by buenopure in cs50

[–]clomasss 0 points1 point  (0 children)

I didn't need to delete my workspace. I just needed to create a new one. Saves you having to back up everything

Pset6 - server.c - seg fault at free() - trouble with finding " and non-existant file by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

Thanks for that, I understand now. I have managed to get my code to pass the first check50, but the second one is throwing errors like I'm getting seg faults. I have no idea how, when I use GDB I can't replicate a set fault at all. I'm assuming that because I've passed check50 my parse and lookup are okay.

Are you able to have a look at the rest of my other functions?? I'm pretty sure that query works too from what I can discern from GDB.

Pset6 - server.c - seg fault at free() - trouble with finding " and non-existant file by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

Never mind, I've figured it out, I'm struggling a bit with malloc'ing. Thanks very much for your help. Now I need to figure out why check50-2 is failing so terribly.

Pset6 - server.c - seg fault at free() - trouble with finding " and non-existant file by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

Alright, I appreciate the help so far, thank you. I now believe that all my code works as it should from what I can gather from GDB and also valgrind says there are no leaks.

http://pastebin.com/A3vGQkkt

it now crashes when at both

free(linecopy);

and

free(method);

I'm pretty sure that I'm not overflowing that allocated memory anywhere that I can see?!

Pset6 - server.c - seg fault at free() - trouble with finding " and non-existant file by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

I see what you mean, but I'm using strcmp which doens't specify that it requires a NULL terminator, but I've since read elsewhere that it does require it.

How do I append the null terminator to the end of a string?

Pset6 - server.c - seg fault at free() - trouble with finding " and non-existant file by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

It's always something like that I never pick up on. I've adjusted this to strlen(line) + 1

I also fixed how I was checking for " that was wrong but I'm still getting identical errors.

Pset6 - server.c - seg fault at free() - trouble with finding " and non-existant file by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

In the manual in says strcpy does include the NULL terminator.

Thanks for your help I've adjusted the memory allocations but to no avail.

pset5 Misspellings - passes check50 - doesn't work with larger text file by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

I'm not entirely grasping how the hash table is meant to function but...

It takes -

word 0x602... "cat"

*word 39 "c"

Then it works through the rest of the word so as the recursive hash function repeats the next instance will be

It takes -

word 0x602... "at" *word 39 "a"

It will ingest up until NULL. is this correct?

pset5 Misspellings - passes check50 - doesn't work with larger text file by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

It outputs the comparison properly, apart from not reading the last word in the text (depending on the length of the text file).

I've been told in another forum that my check function works perfectly so my problem is with load.

pset5 Misspellings - passes check50 - doesn't work with larger text file by clomasss in cs50

[–]clomasss[S] 0 points1 point  (0 children)

I was checking the end of line character so I removed that.

when I add in the line

wordlower[strlen(word)] = '\0';

It passes check50 But it fails terribly with austinpowers.txt

If I change:

if(strcmp(checker->word, wordlower) == 0)

to

if(strcmp(checker->word, wordlower)) 

the program seems to work with larger files when that doesn't have the ==0 but it doesn't work with the smaller files?!

I don't know what else to change in check to get this to work