Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
136 views

I'm trying to implement a lambda function (for educational purposes) to initiate an array to append to the front of potentially encrypted data to save information like salt and initiation vector, ...
Lucy's user avatar
  • 71
0 votes
1 answer
173 views

Please I'm having an issue where I need to split a payload coming from an energy meter into chunks of 5-bytes each that represent different values of line parameters. The payload length is 35 bytes as ...
bquark's user avatar
  • 21
0 votes
2 answers
126 views

In an excel cell, I have a large number represented as a string, lets say 12345689994765411. I am looking for a way to reverse the bytes inside that number to get the decimal representation of that ...
Manuel Selva's user avatar
  • 19.1k
1 vote
2 answers
132 views

I am messing around with c#, and i noticed something. If i were to instantiate an sbyte with 8 bits, such as 0b_1111_1111 (-1), it throws an error, but if i were to first make a byte with it, and then ...
infinitychances's user avatar
0 votes
1 answer
42 views

The methods AI showed me are not working. However, one method mentioned by AI seems to be usable, but it is private: private CodedOutputStream(byte[] buffer, int offset, int length) So, how can I ...
21k's user avatar
  • 439
-5 votes
1 answer
80 views

I am getting the error message data_new.write(binary_data[j]) TypeError: a bytes-like object is required, not 'int' although binary_data should be bytes-like. data_new = open(Datei_neu, "wb"...
Bulova's user avatar
  • 1
0 votes
1 answer
118 views

I would like to extract text from a textbox and use it as a hexadecimal: When someone types in "80" into the textbox, I want to be converted from string to hex "0x80", not "...
winter's user avatar
  • 67
0 votes
0 answers
45 views

I'm running a python script that receives data over a TCP connection. This connection can send multiple messages that consists of multiple variables which have multiple data types. When a string is ...
Arn's user avatar
  • 1
0 votes
0 answers
48 views

I am trying to write a binary string as binary data to file but my function seems to be having a problem with the int conversion. I am reading a text file and manipulating it which gives me a string ...
user3840530's user avatar
0 votes
0 answers
32 views

I'm working on a python program that uses mpmath to implement the Chunovsky algorithm for computing pi. I want to make my program log its progress to a file on regular intervals, so that I can ...
ulsbai's user avatar
  • 1
0 votes
0 answers
48 views

Does anyone know how we can store images obtained from a URL to object box ? This is what i currently have: @Entity() class ServiceModel { @Id() int id = 0; @Unique() final String identifier; ...
Mervin Hemaraju's user avatar
0 votes
2 answers
101 views

Hey all I am getting the following error when running this code: byte[] bytes = new[] { Convert.ToByte("&H" + Conversion.Hex(127)), Convert.ToByte("&H" + Conversion....
StealthRT's user avatar
  • 10.6k
0 votes
1 answer
72 views

I would like help please to get the 4 Return meter values (post gain/trim, gate, dyn gain reduction and post‐fade) from the X32 behringer mixer, these are in 32 bits floats, little‐endian coded. to ...
Ossama's user avatar
  • 2,441
3 votes
2 answers
170 views

I have a hex string of unknown (variable) length and I want to pack or unpack at any time to convert to bytes. ["a"].pack("H*") # => "\xA0" I'm getting \xA0 -- is ...
q9f's user avatar
  • 11.9k
-2 votes
1 answer
96 views

I got a byte[] array from an input file (ASCII text file) and I'm trying to delete all bytes of a pre-set hex value, without converting the array to string and without using lists. This is the code I ...
maykuul's user avatar
  • 13
1 vote
3 answers
148 views

Consider the following code: signed a = -1; unsigned b = UINT_MAX; printf("%d\n", a==b); signed char c = -1; unsigned char d = UCHAR_MAX; printf("%d\n", c==d); The result will be:...
Elicon's user avatar
  • 219
2 votes
1 answer
267 views

Is there a consistent way of reading a c struct from a file back into a Python Dataclass? E.g. I have this c struct struct boh { uint32_t a; int8_t b; boolean c; }; And I want to read it's data ...
Brendon Mendicino's user avatar
-2 votes
1 answer
57 views

I'm trying to confirm this struct is being formatted correctly for network byte order, but printing out the bytes and printing out the hex of the bytes give me different output, with the hex being the ...
Thundercleez's user avatar
1 vote
1 answer
551 views

I am trying to convert a vector of ASCII bytes into a rust string. I found the std::str::from_utf8() function, that should be able to handle all ASCII strings. For some reason it cannot read the ...
rwutscher's user avatar
-2 votes
1 answer
213 views

I recently found out that bytes.nth(i) is waay faster than chars.nth(i) if you want to iterate over a String. pub fn test(word1: String) { for i in (0..word1.len()).rev() { word1.bytes()....
SebastiaanTheCoder's user avatar
1 vote
3 answers
338 views

I have results returned from a function and storing it in a dictionary like this ${results}={'value': b'\x01\x00\x01\x00\x01\x00', 'type': None, 'error': None} Now I want to extract only the value of ...
Usha RH's user avatar
  • 11
3 votes
1 answer
99 views

I'm writing a .wav PCM file header in C, but one part I'm still stumped on handling is the bits per sample format parameter of a file. Right now I've only added support for 8-bit and 16-bit PCMs (...
opl23590's user avatar
4 votes
2 answers
251 views

Why does the VB expression Asc(ChrB(128) & ChrB(0)) yield 63 and not 128? Recently, I've been looking at Visual Basic's InputB function for reading binary data. According to the help system, ...
Ant's user avatar
  • 42
0 votes
3 answers
111 views

I have a Python scripts for printing a decimal string-represented integer as a 4-bytes little-endian representation: import sys i4 = int(sys.argv[1]) sys.stdout.buffer.write(i4.to_bytes(4, 'little')) #...
Vadim Kantorov's user avatar
1 vote
2 answers
295 views

I wanted to make sure that I understood what is happening in the following code: #include <stdio.h> #include <stdint.h> int main (void) { uint8_t a = 255; a = a + 5; printf(&...
Guilherme Cintra's user avatar

1
2 3 4 5
157