Advanced file type guesser [closed] - c++

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
How does (exactly) utility like UNIX file command guess the file type?
Are there any source-codes?

It uses various heuristics, mainly signatures which are described in a configuration file.
man -s 5 magic
will gives the file format.

It looks at the magic number in the first few (2-4?) octets of the file.

Here it is and quite interesting :)

Related

How to check multiple files for duplicates in C++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I need to compare 5 files by their file paths: a,b,c,d,e and find duplicates if exists.
How can I do this in c++ via md5sum comparison of files?
You'd need to compute a checksum for each file (write it yourself or call an external program), get hold of each file, ... This depends on the operating system. It is much easier to do something like this in a scripting language.

How to make a MATLAB function to be run in html? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I've developed a MATLAB code that I think it is useful to be used by researchers. How can I embed it in a website to be used free?
It gets two integers and return a set of integers
Also it is possible to convert it to c++, If it helps.
Thanks
Submit your m-file(s) to Matlab Central File Exchange, this is the perfect place for it.

BSDF - need an example [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm trying to understand in a simple raytracer what does the BSDF function does and in theory I got it but in practice I don't know how to implement one.
Can someone point me out some simple examples (well-explained if possible) on how to use it?
check PBRT project. It is great book, but if you do not want to read it, there is well documented source code availabe: PBRT

Tool for drawing mockup web interfaces [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
What program was used to draw the picture below?
Not a programming question...but I think is balsamiq: http://balsamiq.com/
That looks like it s made with balsamic mockup, it's not free btw.
A great source for wireframing tools can be found here.
Possibly Omnigraffle, an OS X app. See http://graffletopia.com/ for stencils (e.g. http://graffletopia.com/stencils/445)

Open Source UML Tool which generates C++ code [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Are there any open source UML tools for Linux which can generate C++ source code?
It needs to run on Ubuntu.
BOUML.
Moreover there is already a similar question right here.
According to the UML Tools Directory, you can add Astade to the above mentionned tools.
ArgoUML