How to check if a file is binary?

Use utility file, sample usage: $ file /bin/bash /bin/bash: Mach-O universal binary with 2 architectures /bin/bash (for architecture x86_64): Mach-O 64-bit executable x86_64 /bin/bash (for architecture i386): Mach-O executable i386 $ file /etc/passwd /etc/passwd: ASCII English text $ file code.c code.c: ASCII c program text file manual page

How to parse into base64 string the binary image from response?

I think part of the problem you’re hitting is that jQuery.ajax does not natively support XHR2 blob/arraybuffer types which can nicely handle binary data (see Reading binary files using jQuery.ajax). If you use a native XHR object with xhr.responseType=”arraybuffer”, then read the response array and convert it to Base64, you’ll get what you want. Here’s a … Read more

Where is the difference between “binaries” and “executables” in the context of an executable program?

An executable file is one which can be executed; you would run it on the commandline by writing the name of the file itself as the command. On Unix systems, the file’s “executable” flag must also be set. On Windows, the file’s extension must be one of a fixed set of executable file extensions, including … Read more

Why is the binary output not equal when compiling again?

ANOTHER UPDATE: Since 2015 the compiler team has been making an effort to get sources of non-determinism out of the compiler toolchain, so that identical inputs really do produce identical outputs. See the “Concept-determinism” tag on the Roslyn github for more details. UPDATE: This question was the subject of my blog in May 2012. Thanks … Read more

Evaluating HDF5: What limitations/features does HDF5 provide for modelling data?

How does HDF5 compare against using something like an SQLite DB? Is that even a reasonable comparison to make? Sort of similar but not really. They’re both structured files. SQLite has features to support database queries using SQL. HDF5 has features to support large scientific datasets. They’re both meant to be high performance. Over time … Read more