I am doing Binary Serilization of big nested data structure.
Whenever [Serilizable] attribute is added to class, all the members are automatically serialized.
I want to specifically select the fields that need to be serialized.
As of now i am using [NonSerialized] Attribute for fields to opt out from serilization.
Is there any way i can...
Not a question, I've just scoured the internet in search of a solution for this problem and thought I'd share it with the good folks of SO. I'll put it in plain terms so that it's accessible to newbs. :) (Apologies if this is the wrong place -- just trying to be helpful.)
This issue occurs with almost any user OS X Snow Leopard who trie...
I'm using cvs2svn to migrate from CVS to SVN.
I've noticed a problem with my binary file after the conversion was completed.
I'm using auto-props file, which is very helpful.
After the conversion I took the file from CVS and compared it to the same file from SVN.
The file is binary. Using WinMerge, I see that there is a difference bet...
Hello Everyone,
I'm currently writing a web application that have about 6-12 pages. On each one of these pages, I want the user to be able to do some (or all) of the following actions: View, Add, Update, and Delete.
The current permission scheme I thought of is having an integer in a database. This integer will correspond to a binary n...
In decimal (base 10), 1/3 can only be approximated to 0.33333 repeating.
What number is the equivalent in binary that can only be represented as an approximation?
...
Is it possible to detect binary data in JavaScript?
I'd like to be able to detect binary data and convert it to hex for easier readability/debugging.
After more investigation I've realized that detecting binary data is not the right question, because binary data can contain regular characters, and non-printable characters.
Outis's q...
I'm writing some quick code to try and extract data from an mp3 file header.
The objective is to extract information from the header such as the bitrate and other vital information so that I can appropriately stream the file to a mp3decoder with the necessary arguments.
Here is a wikipedia image showing the mp3header information:
http:...
Hello,
I'm trying to simply convert a byte received from fget into binary.
I know the value of the first byte was 49 based on printing the value. I now need to convert this into its binary value.
unsigned char byte = 49;// Read from file
unsigned char mask = 1; // Bit mask
unsigned char bits[8];
// Extract the bits
for (int i = 0; ...
I'm moving some old C code that generates a binary file into our C# system. The problem is, the resulting binary file will still need to be read by another old C program.
The original code outputs several structs to a binary file, and many of those structs contain linked lists, with *next pointers.
How can I write these in C# so that ...
I am trying to extract the mp3 header from a file. This is different then the ID3 tags -- the mp3 header is where information about the MPEG version, bit rate, frequency, etc is held.
You can see an overview of the mp3 header structure here: http://upload.wikimedia.org/wikipedia/commons/0/01/Mp3filestructure.svg
My problem is, despite ...
I want to copy a binary master file in a new binary file. This file contain nothing but have a predefined size (20000 lines).
Here what i'm doing:
FILE *A_Lire;
FILE *A_Creer;
A_Lire = fopen(MASTERPath,"rb");
A_Creer = fopen(PARTPRGPath, "wb");
fseek(A_Lire,0,SEEK_END);
int end = ftell(A_Lire);
char* buf = (char*)malloc(en...
Hi,
Does it happen that some program (or even the OS itself) changes the contents of an executable's __TEXT segment, for whatever reason?
Note: Here, I'm referring to the "__TEXT" segment, not the "__text" section.
In other words: can I rely on bytes in the __TEXT segment of my executable to detect whether my executable has been da...
Hi, I exported a .bin file from RealFlow 4 and now need to be able to read it in Python, to make an importer. How do these files work?
...
Hello,
I am converting integer number to binary and put it in a header of a data message.
For instance the first meesage that arrived, I would convert the counter to binary that take 4 bytes and had the data message, which is a reguler message containning a, b, c etc'.
Here is how I convert the counter :
//This is preparing the count...
Hello
is there a fast algorithm, similar to power of 2, which can be used with 3, i.e. n%3.
Perhaps something that uses the fact that if sum of digits is divisible by three, then the number is also divisible.
This leads to a next question. What is the fast way to add digits in a number? I.e. 37 -> 3 +7 -> 10
I am looking for somethin...
Is there a way in dos (im using a dos boot disk on a linux machine) to view portions of ram?
ie. some form of command to read the binary at a given address?
edit: my bootable floppy doesnt have debug on it. when i type debug it says 'bad command or file name
how do i make a bootable dos floppy with debug on it?
...
I responded to another question about developing for the iPhone in non-Objective-C languages, and I made the assertion that using, say, C# to write for the iPhone would strike an Apple reviewer wrong. I was speaking largely about UI elements differing between the ObjC and C# libraries in question, but a commenter made an interesting poin...
Hi,
I am trying to figure out how to write a binary file with a FileStream and BinaryWriter, and keep the file locked for read while I am writing. I specifically dont want other applications/processes to be able to read from the while while its being written to.
//code to declare ba as a byte array
//dpath is the path to the file
Fi...
I was thinking about how I'm storing passwords in my database : appropriately salted SHA1 strings in a CHAR(40) field. However, since the character data in there is actually just a hex representation of a 160 bit number, I thought it might be better to store it as BINARY(20).
CREATE TABLE users (
password BINARY(20)
/* snip */
)...
Hi,
I am looking for an optimal algorithm to find out remaining all possible permutation
of a give binary number.
For ex:
Binary number is : ........1. algorithm should return the remaining 2^7 remaining binary numbers, like 00000001,00000011, etc.
Thanks,
sathish
...