i trying split utf-8 string bytes in python 3. problem is, when use bytearray, byte, encode etc functions array size of element 14 bytes, not 1 byte expected. need split text file sequence of bytes , send them byte after byte using sockets. tried this: infile = open (file, "r") str = infile.read() byte_str = bytes(str, 'utf-8') print("size of byte_str",sys.getsizeof(byte_str[0])) print gives me 14, need 1... suggestion? quoting official documentation : sys.getsizeof(object[, default]) return size of object in bytes. object can type of object. built-in objects return correct results, not have hold true third-party extensions implementation specific. only memory consumption directly attributed object accounted for, not memory consumption of objects refers to. if given, default returned if object not provide means retrieve size. otherwise typeerror raised. getsizeof() calls object’s __sizeof__ method , adds ...
hello i'm new javascript, , i'm try write out code test site , i'm having problems, dow below code , keep getting error , can't figure out why. typeerror: null not object (evaluating 'document.getelementbyid("h3").innerhtml = "<h3>you date!</h3>"') this second method tried using. i'm trying have have version list first 1 had pull .js file , build table, didn't work thought try this, guess happened? not working my code i'm using below. if can amazing. thanks, dakmessier var current = "1.0"; function get_latest(){ document.getelementbyid("bob").innerhtml = current; } if (local != current){ document.getelementbyid("get").innerhtml = "<button><a href=\"bla\">get latest update!</a></button>"; } else if (local == current){ document.getelementbyid("h3").innerhtml = "<h3>you date!</h3>"; } else { document.g...