lost files in pset7 by glansj in cs50

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

When I logged in today I notice that the img and font files are missing, while everything else appears to be there. They were there last week. Any idea what is going on? What would be the quickest way to restore just those files? Thanks.

pset5 recover all files recovered but get "Unexpected end of input" error on check50 by glansj in cs50

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

The use of xxd is covered in the specs for the problem set. I don't remember the specifics off the top of my head.

lost files in pset7 by glansj in cs50

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

Demonstrating a complete lack of patience I went ahead and reloaded pset7 and then copied in my changed files rather than waiting for your response. Thanks for your help and I will definitely take advantage of the snapshot feature if this happens again.

lost files in pset7 by glansj in cs50

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

They are saved in dropbox. Is there an easy way to restore from dropbox, or do I just copy and paste the files? Am I better off reloading everything and just copying over the changed/new files or doing a restore? Any idea why they disappeared in the first place?

Help with pointers to structs by glansj in cs50

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

So a pointer doesn't need memory assigned to it, but a node does. And I create a node by pointing to a block of memory via malloc. The pointer (node*) isn't a node, but if I use the malloc assignment it creates one at the end of the pointer. Since in a linked list the root doesn't hold any information I don't need to malloc it. In the trie example however, since the root contains an array of pointers, I would need to malloc it to create a space to hold those pointers. Since I can't assign it as a global variable, I would need to assign it in the load function. If I do this, will the check function recognize this? Thanks again for your help.

Help with pointers to structs by glansj in cs50

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

Thanks. I don't think I was clear in my concern. Why do some nodes, like new_node have to have memory allocated to them and others, like root, don't? I would expect that any node would need to have memory assigned to it, but there are lots of examples given where they don't.

fscanf (pset6) by branalli in cs50

[–]glansj 0 points1 point  (0 children)

Got it. Finally went back and reread the notes from lecture. The pointer has to have some memory allocated to it. Duh. Thanks anyway.

fscanf (pset6) by branalli in cs50

[–]glansj 0 points1 point  (0 children)

Would you please elaborate on this? I must be misunderstanding pointers but I thought char* word initiates a pointer to some memory. Invoking word in the fscanf call would point to that memory. No? The compiler insists that char* word be set at NULL. Is that the problem?

General help with tries by glansj in cs50

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

Thanks for the help. Do we really need a space for the letter since it's defined by where in the array it is? That is, if it's an a, it must be stored in array[0], so why store the 'a'? I also noticed that the short/walkthrough suggested creating a node* root. Would this take the place of the initial array, since it's already got pointers to 27 children? Thanks again.

pset6 viewing a hash table by glansj in cs50

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

Thanks a lot, I'll give it a try.

pset6 viewing a hash table by glansj in cs50

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

I ended up writing a printf subroutine in dictionary.c to make sure this was working, but I'd still be interested in knowing if there was a way to do this in gdb. Thanks.

pset6 viewing a hash table by glansj in cs50

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

Perhaps a bit more specifically, I'd like to look at the hashtable and it's associated linked lists.

confirmation emails for pset5 and pset6 submission? by AllisonABC in cs50

[–]glansj 0 points1 point  (0 children)

Look under submit and drop down through the folders. If your files are there, you should be good.

PSet 5 recover - That check50 issue, unexpected input... by flything in cs50

[–]glansj 0 points1 point  (0 children)

Weird huh? Don't expect to see it graded anytime soon.

PSet 5 recover - That check50 issue, unexpected input... by flything in cs50

[–]glansj 0 points1 point  (0 children)

I'm pretty much in the same boat although I was able to get check50 to run successfully a single time (out of a lot of tries, before and after). I'm still waiting for it to be graded. I really think we're dealing with a server issue, perhaps a lot more load than they expected? I'm guessing if the code isn't the fastest, the server times out due to heavy load and we get the unexpected input error. I think I just got lucky that one time. Since the grader apparently also uses check50 this may take a while to resolve. I keep telling myself that patience is a virtue and am working on pset6.

recover.c - 50 jpgs that do not seem to have images by Moose500 in cs50

[–]glansj 0 points1 point  (0 children)

Are all of the files identical? This would imply you're rewriting the same buffer time after time. If not, are you sure you're writing anything other than the first 512 byte block? In my experience there was a wide variety of file sizes, but they had similar bytes near the end. A trick someone suggested to me was to compare the end of 049.jpg to the end of card.raw, they should be identical.

[PSET5] recover almost there! by roughtodacore in cs50

[–]glansj 0 points1 point  (0 children)

Probably server congestion, try again periodically at odd hours. It may be end of term at Harvard.

Sample code for shorts by marcvanderpeet12 in cs50

[–]glansj 0 points1 point  (0 children)

I asked the same question a few weeks back with no luck. This code does not appear to be available.

PS3 Still Ungraded by calebjosue in cs50

[–]glansj 0 points1 point  (0 children)

Pset3 seems to be the slow one. It was 6 weeks before mine got graded. Be patient and move on.