------
## 最终结论
```python
def all_codes_in_string(s, k):
    # Generate all possible binary codes of length k
    def generate_binary_codes(k):
        return [bin(i)[2:].zfill(k) for i in range(2**k)]
    
    # Get all binary codes of length k
    binary_codes = generate_binary_codes(k)
    
    # Check if each binary code is a substring of s
    for code in binary_codes:
        if code not in s:
            return False
    return True

# Example usage:
s1 = "00110110"
k1 = 2
print(all_codes_in_string(s1, k1))  # Output: True

s2 = "0110"
k2 = 2
print(all_codes_in_string(s2, k2))  # Output: False

s3 = "0000000001011100"
k3 = 4
print(all_codes_in_string(s3, k3))  # Output: False

s4 = "00110"
k4 = 2
print(all_codes_in_string(s4, k4))  # Output: True

s5 = "0110"
k5 = 1
print(all_codes_in_string(s5, k5))  # Output: True
```