08 May

Use this command to find files of a given mime-type. In this example, we are looking for video files…


find -type f -print0 | xargs -0 file -i | grep -i video


And, by the way, this command, and the last two commands were sponsored by Mahesh. Happy now?

01 Dec

Find the contents of a file using this commande


file filename.txt

25 Jul

A dynamically typed language is a language where the type of a variable can be altered at any time. (It is a string, now it is a Fixnum, now it is a Time object, etc.)

A statically typed language is the opposite. (Decide what x is once for all and donâ€™t change your mind!)

A strongly typed language is a language that is being strict about what you can do with your typed variables. (Donâ€™t mix themâ€¦ or I will throw you an error in the face!)

A weakly typed language is the opposite. (Do what you want with your different types. Mix them all! Weâ€™ll see what happens!)

Original Article

[tags]type,types,duck,static,weak,strong,dynamic[/tags]

06 Mar

Find whether the given variable is an object,or is an Array?

function isArray(testObject) {
return testObject && !(testObject.propertyIsEnumerable('length')) && typeof testObject === 'object' && typeof testObject.length === 'number';
}

Original Page
[tags]javascript,object,array,type[/tags]