Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
Advice
0 votes
3 replies
78 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 = '...
0 votes
1 answer
140 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--- (...
Advice
2 votes
5 replies
148 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 ...
Advice
0 votes
4 replies
45 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
142 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
195 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 ...
2 votes
3 answers
150 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. ...
0 votes
2 answers
162 views

I'm building a Huffman compressor in Java. I already have: The original text, the Huffman code table (Map<Character, String>), and the order of character appearance. My current goal is to write ...
0 votes
0 answers
94 views

The problem: "Use Hamming's code to detect if there was an error in the following message and correct it." m_8 m_7 m_6 m_5 m_4 m_3 m_2 m_1 c_4 c_3 c_2 c_1 1 1 1 0 1 0 1 1 0 0 0 1 My first ...
0 votes
2 answers
193 views

I have a C program that I made that is supposed to convert binary into a signed integer, but it does not give the correct result. Here is the function of the code that converts binary numbers to ...
0 votes
1 answer
137 views

I coded int num1_bin = 00000010; However, in the debug console, it comes out as 8. Is there a mistake in my code, or a setting in C++? I just started coding in C++ for univ. I expected int num1_bin = ...
Whadaboi23's user avatar
-1 votes
3 answers
100 views

Assume I have a 1 source variable (int) which is 10 bits long. Let's call it src. I have 2 destination variables (int) which are 8 bits long namely byte1 and byte2. MSB LSB src ...
0 votes
2 answers
142 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 ...
3 votes
1 answer
168 views

I want to code a shinyApp which can convert a string from binary (0 and 1, not hex) to utf-8 and vice-versa. Example : encode("Aé") # return "010000011100001110101001" decode("...
2 votes
1 answer
185 views

I'm writing a Winforms app that will allow me to change my cursor. My goal is to have buttons with each having their own respective cursor as their image by converting their files into bitmaps. ...
ElateTugboat's user avatar

15 30 50 per page
1
2 3 4 5
...
987

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