Category "binary"

Go binary.Read into slice of data gives zero result

I want to read and write binary data to file and my data is simply slice. The encoding part is working, but my decoding via binary.Read gives zero result. What

Algorithm to find binary value of all cells in (n x n) Tic-tac-toe board?

I found this great answer by Gary C, which uses bitwise operators and minimal number of comparisons to check for a win in Tic-tac-toe. The only issue is that th

python stream file : no idea why this doesnt work ( but i have same stream id every time )

PS : (due to my country's teaching program, I need to write python code like this ) Hello, I have no idea why this doesn't work: from pickle import load,dump

Find Binary in a dir of text files Python or Bash

I have a series of log files that are all text. If a certain error happens it results in binary being inserted in the text. I want a Python or Bash script that

Ordered (n choose p) binary encoding and decoding

I want to 'impose' order on (n choose p) binary and be able to encode/decode items. Below you can see an example of p=2. For p > 2 it will need more loops. B

Output array of binary digits as a decimal number in NASM

I have a program that can add two arrays of binary numbers I'm sorry, I'm not very good at asm I can draw the conclusion myself, but to understand how to conver

NodejS Read/Write Binary Data to/from file

Alright, so I have a string with binary data ("111011 10001 etc"), and I'm trying to save it to a file to them read it on another file using streams, the issue

How to make in java an http post returning binary data using plain Sockets

Because some restrictions, I have to use plain Java sockets to download a file published in a http web site. This is how i am reading the response: String serve

How to fix unsupported text encoding in VS code

I have imported a folder of a web project and I was not able to run it due to this error in some files“the file is not displayed in the editor because it

Is there a difference in inserting a txt/csv file or an image into a BLOB column in Oracle?

I'm writing a Python script with CX_ORACLE which will take about 20K files and upload them into a BLOB column. They are PDFs,CSVs,TXTs, and JPGs. I'm just not u

Creating a half Byte dictionary of hexadecimals - without built in functions

base_destination (dict_create - the function receives as input the target base (8 or 16) as an integer And returns a dictionary so that the keys in the dictiona

creating dummy variable from ordinal data in r

I have an ordinal variable with the following categories very favorable (1) somewhat favorable (2) somewhat unfavorable (3) very unfavorable (4) don't know (8)

Find longest sequence of zeros in binary representation of an integer in JavaScript?

Well in this question I have to find the longest sequence of zeros in the binary representation of an integer. After a lot of hard work, I'm able to find the lo

How to convert a two-dimensional byte array into a single byte (Arduino)?

I have this array: bool data[] = {{1,1,1,1},{0,0,0,0}}; And I need to convert it into bool data type like this: byte data = 11110000; Any ideas?

How can I decode a string from base64 to binary to decrypt it with RSA in flutter?

I have an encrypted string with RSA that I have encoded in base64 to put it in a QR-code: echo "thesearesecretlogininfos"|openssl rsautl -encrypt -pubin -inkey

Conversion of binary lidar data (.bin) to point cloud data (.pcd) format

I have a lidar data collected with Velodyne-128 in .bin format. I need to convert it into pcd format. I use NVIDIA Driveworks for data manipulation but there is

Using R to Calculate the time since binary output=1

I have binary data in a dataframe with a time feature and I'm looking to produce a dataframe like below with a new column "duration since =1". I was able to fi

How is a binary/bytes column sorted in sql?

The following query sorts a binary column in BigQuery: with tbl as ( select B'123' as col union all select B'234' ) select * from tbl order by col; ----------

Ho to convert base 10 floating point input to base 2 in MIPS?

I have been tasked with writing a program in MIPS that converts a user-inputted base 10 floating point number to base 2. I am a relatively inexperienced program

How to export large pandas Data Frame to excel format?

I have converted binary files to NumPy array and then pandas data frame. The final shape is 217 rows × 524289 columns. When I tried to save it as .xlsx fo