Hot answers tagged

1 vote
Accepted

The sepia code passes 2 first tests but doesn't pass the rest of those tests. What am I doing wrong?

Do you understand why you have to check for values over 255? You are doing it too late. A BYTE has 8 bits. That means the maximum value it can hold is 255. You are calculating the new value and ...
  • 18.4k
1 vote

Finance history, runtime error("unsupported value: {}".format(value))

Problems are here transaction_type = buy and here transaction_type = sell. buy and sell are functions, which is an invalid type to insert into the database. Perhaps you meant the string literals &...
1 vote
Accepted

How to identify cause of Segmentation Faults?

It's more important that you know how to locate seg faults. This is a very common defect and if you can't locate seg faults, you will be severely handicapped. There are two common ways. First, ...
  • 64.7k
1 vote

Unknown memory leak on "check function" - CS50 Speller

Your code node *checker = malloc(sizeof(node)); /* ... */ checker = hashtable[index]; means you allocate a new node, and then you throw away the only reference to that node, leaving this ...
  • 20.7k
1 vote
Accepted

pset4 recopy method Question

Here's the pseudo code from the walkthrough: psuedocode: "recopy" method for each row      for n-1 times           ...
1 vote

pset 2 vigenere help with keyword and formula

Whole plaintext/ciphertext should not be in the else path, but after the loop. You want to do that only after ensuring that the whole key is alphabetic. You need to increment the index for the key ...
  • 20.7k

Only top scored, non community-wiki answers of a minimum length are eligible