Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

Grammar
Source Link
Siyual
  • 17k
  • 8
  • 47
  • 60

I have a string of binary I'm trying to convert to ints. The chunks were originally 8 hex chars each and converted into binary. How do you turn it into it'sits 64-bit int value?

s = 'Q\xcb\x80\x80\x00\x00\x01\x9bQ\xcc\xd2\x00\x00\x00\x01\x9b'
date_chunk = s[0:8]
value_chunk = s[8:]

Looks like hex now that I got it to print. How do I make two ints? The first is a date encoded to seconds since epoch.

I have a string of binary I'm trying to convert to ints. The chunks were originally 8 hex chars each and converted into binary. How do you turn it into it's 64-bit int value?

s = 'Q\xcb\x80\x80\x00\x00\x01\x9bQ\xcc\xd2\x00\x00\x00\x01\x9b'
date_chunk = s[0:8]
value_chunk = s[8:]

Looks like hex now that I got it to print. How do I make two ints? The first is a date encoded to seconds since epoch.

I have a string of binary I'm trying to convert to ints. The chunks were originally 8 hex chars each and converted into binary. How do you turn it into its 64-bit int value?

s = 'Q\xcb\x80\x80\x00\x00\x01\x9bQ\xcc\xd2\x00\x00\x00\x01\x9b'
date_chunk = s[0:8]
value_chunk = s[8:]

Looks like hex now that I got it to print. How do I make two ints? The first is a date encoded to seconds since epoch.

a
Source Link
Justin Thomas
  • 5.8k
  • 3
  • 44
  • 63

I have a string of binary I'm trying to convert to ints. The chunks were originally 8 hex chars each and converted into binary. How do you turn it into it's 64-bit int value?

s = 'Q\xcb\x80\x80\x00\x00\x01\x9bQ\xcc\xd2\x00\x00\x00\x01\x9b'
date_chunk = s[0:8]
value_chunk = s[8:]

Looks like hex now that I got it to print. How do I make two ints? The first is a date encoded to seconds since epoch.

I have a string of binary I'm trying to convert to ints. The chunks were originally 8 hex chars each and converted into binary. How do you turn it into it's 64-bit int value?

s = 'Q\xcb\x80\x80\x00\x00\x01\x9bQ\xcc\xd2\x00\x00\x00\x01\x9b'

Looks like hex now that I got it to print. How do I make two ints? The first is a date encoded to seconds since epoch.

I have a string of binary I'm trying to convert to ints. The chunks were originally 8 hex chars each and converted into binary. How do you turn it into it's 64-bit int value?

s = 'Q\xcb\x80\x80\x00\x00\x01\x9bQ\xcc\xd2\x00\x00\x00\x01\x9b'
date_chunk = s[0:8]
value_chunk = s[8:]

Looks like hex now that I got it to print. How do I make two ints? The first is a date encoded to seconds since epoch.

added 109 characters in body
Source Link
Justin Thomas
  • 5.8k
  • 3
  • 44
  • 63

I have a string of binary I'm trying to convert to ints. The chunks were originally 8 hex chars each and converted into binary. How do you turn it into it's 64-bit int value?

s = QÀÄÄõQõQÄõQõQÄõQõQÄõQ‘aõQÄõQõQÿØÄõQÄõQ‹§õQÄõQõQ‡òÄõ'Q\xcb\x80\x80\x00\x00\x01\x9bQ\xcc\xd2\x00\x00\x00\x01\x9b'

int(s) won't work Looks like hex now that I got it to print. How do I make two ints? The first is a date encoded to seconds since epoch.

I have a string of binary I'm trying to convert to ints. The chunks were originally 8 hex chars each and converted into binary. How do you turn it into it's 64-bit int value?

s = QÀÄÄõQõQÄõQõQÄõQõQÄõQ‘aõQÄõQõQÿØÄõQÄõQ‹§õQÄõQõQ‡òÄõ

int(s) won't work.

I have a string of binary I'm trying to convert to ints. The chunks were originally 8 hex chars each and converted into binary. How do you turn it into it's 64-bit int value?

s = 'Q\xcb\x80\x80\x00\x00\x01\x9bQ\xcc\xd2\x00\x00\x00\x01\x9b'

Looks like hex now that I got it to print. How do I make two ints? The first is a date encoded to seconds since epoch.

Source Link
Justin Thomas
  • 5.8k
  • 3
  • 44
  • 63
Loading
lang-py

AltStyle によって変換されたページ (->オリジナル) /