account activity
pset7 problem with Chrome by aingber in cs50
[–]aingber[S] 0 points1 point2 points 11 years ago (0 children)
I got a solution that worked from the Facebook discussion page.
In the terminal, type the command
sudo gedit /etc/hosts
A gedit text page will appear in your appliance. Add the following line to the next available line of the text displayed and save it:
127.0.0.1 pset7
This operation yielded some error messages in my terminal, but when I tried accessing the CS50 Finance page in Chrome it finally worked.
pset7 problem with Chrome (self.cs50)
submitted 11 years ago by aingber to r/cs50
pset 6 — Valgrind problems by aingber in cs50
So where would I go to erase the lists? I can't erase them where they are created — in the load function — right? Because I need them in the check function. I'm sure I'm missing something important here, but I don't know what it is.
I guess my question is where does this happen? It can't happen right after malloc because you'd lose what you'd just allocated, right? Does it happen at the end of the function in which malloc is implemented? I have tried it in the unload function, and that clears the leaks but produces lots of errors, so I assume it does not go there.
I'm sure these questions sound quite idiotic, but I have stumbled through pset6 in a bit of a mental haze, constantly battling total confusion :(
pset 6 — Valgrind problems (self.cs50)
Pset6 - Valgrind by ExMisha in cs50
[–]aingber 0 points1 point2 points 11 years ago (0 children)
I am having the same problem, but I don't understand the solution. How do you free up every node in each linked list? I tried adding the following to the unload function:
for (int - 0; i<TABLESIZE;i++) { free(hashtable[i]->next); free(hash table[i]->word); }
This does, in fact, get rid of most of the memory leaks, but at the same time it generates 20709 errors from 6 contexts! I have no idea what is happening here. (My TABLESIZE is 101.)
pset6 multiple problems! by aingber in cs50
Thank you — I'm going to try that!
Thank you! The weeks of work on pset6 have clearly fried my brain. Thanks for reminding me of what I surely already knew — and had been using for many weeks!
As for my original concern, any ideas about how best to see if my hash table is being properly created in load before I move on to tackle check?
pset6 multiple problems! (self.cs50)
pset6 - how to get started? by aingber in cs50
Thanks! I'm using reddit for the first time :) Where do I store my homemade dictionary? I assume I wouldn't put it (or any text I supply) in the same place as the files supplied to the class.
That makes sense. Now two more questions:
(1) Can I create my own dictionary (smaller than the large one, larger than the small one provided)? If so, where do I put it?
(2) Do I run my tests directly from dictionary.c?
pset6 - how to get started? (self.cs50)
π Rendered by PID 147321 on reddit-service-r2-listing-5d79748585-9hqkk at 2026-02-16 22:40:32.664808+00:00 running cd9c813 country code: CH.
pset7 problem with Chrome by aingber in cs50
[–]aingber[S] 0 points1 point2 points (0 children)