Skip to main content

All Questions

Tagged with or
0 votes
0 answers
51 views

I'm trying to display a binary number as a string like so: let string = b.to_str_radix(2); But I cannot find a to_str_radix function in std. Searching in the Rust Standard Library gives zero results. ...
theKMan747's user avatar
-2 votes
0 answers
57 views

I'm trying to solve the Leet Code question #3677 (Count Binary Palindromic Numbers) in javascript. The algorithm works correctly, but I keep getting a 'Time Limit Exceeded' error when I submit. I've ...
visionary's user avatar
Advice
0 votes
7 replies
123 views

I was thinking about floats and doubles and was wondering if the fact that they use 32 bits and 64 bits respectively means there is a performance increase either in terms of memory used or time for ...
pcrt's user avatar
  • 1
1 vote
1 answer
50 views

I want to return binary files (e.g. images, PDF) from an AWS Lambda function with a function URL. I am not using API Gateway. The documentation for the return object does not say much about the body, ...
falsePockets's user avatar
  • 4,483
Advice
2 votes
1 replies
72 views

Apologies if this is a dumb question, I'm new to both stack exchange and programming in general. Anyway, here's the problem I'm facing: I'm writing a function for a lua program, and I need to convert ...
FishEnjoyer's user avatar
Advice
0 votes
7 replies
119 views

I have inherited a DAC that outputs voltages given serial commands (these commands go from the RS-232 port through a serial-to-fiber converter to the device). To get off the ground with it, I have ...
luiz_iniciante's user avatar
0 votes
1 answer
69 views

I was making an app in Godot that reads Flipnote PPM files thanks to the reverse engineering done on this file format. I'm trying to remake everything in Dart and Flutter due to some Godot limitations,...
Gabbinetto's user avatar
Advice
1 vote
6 replies
34 views

Does anyone know what the 'l' in the name of Python's binascii.hexlify is for? Why isn't it "hexify" instead of "hexlify"? Googling it gave me nothing. ChatGPT predictably gave me ...
Jimbobur's user avatar
  • 113
Advice
0 votes
3 replies
93 views

I am working on a program to convert CNG files to JPEG and cannot figure out how to write the binary bytes to a file. My test code is: import struct import os barray = bytearray() s = '...
Jeff's user avatar
  • 471
0 votes
1 answer
168 views

In C, I first opened a binary file like this--- FILE *BINfile = fopen("./tmp.bin", "rb+"); Then I transferred the data into an unsigned char array (typedef as byte) like this--- (...
Bedanta Hazarika's user avatar
Advice
2 votes
5 replies
154 views

I've written a program that takes in a text then prints the binary translation of it. İts been working perfectly fine until I tried the case where entire string is just made up of spaces. As to ...
Mehmet emi Sevim's user avatar
Advice
0 votes
4 replies
51 views

I have the following c source: int _start(){} which I compile as: gcc -c -o main.o main.c -ffreestanding then I link as: ld -oformat binary main.o The binary's hexdump looks as: $ hexdump a.out ...
mltm's user avatar
  • 595
Best practices
0 votes
4 replies
145 views

I have confirmed that the following VBA code works just fine. Dim mydate As Date mydate = Date Open "C:\Windows\Temp\dlctest.data" For Binary Access Write As #1 Put #1, , mydate Close #1 ...
Dave Clark's user avatar
4 votes
3 answers
207 views

I am trying to figure out a code that would be able to swap the higher half and the lower half of the binary form of an integer number such as for example: 0000000 00110011 01001001 11111110 turn into ...
Fe A person Mo's user avatar
2 votes
3 answers
194 views

I have created a simple hello.c which contains just the definition of an array: unsigned char arr[4] = {1,2,3,77}; I have then compiled it with gcc -r in order to produce a relocatable object file. ...
Sterpu Mihai's user avatar

15 30 50 per page
1
2 3 4 5
987