Class Definition Related div.entry h2.title, div.entry h1.title { padding-bottom: 22px; background-color: #4e9258 ; font-family: serif; font-size:150%;} Object-oriented programming (OOP) is a programming paradigm that uses “objects” – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs Reference/Source: http://en.wikipedia.org/wiki/Object-oriented_programming Code Exposition p.first{ color: blue; } p.second{ …
Category Archives: Uncategorized
gcc limits and -Wformat
#include <stdio.h> #include <limits.h> int main (void) { unsigned long ul = LONG_MAX; short int si = SHRT_MIN; printf (“%d\n”, ul); printf (“%s\n”, si); return 0; } $gcc printme.c $./a.out -1 Segmentation fault $gcc printme.c -Wformat printme.c: In function ‘main’: printme.c:7: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’ …
gcc options.
$gcc hello.c -o hello $du -h hello 8.0K hello $gcc -pg hello.c -o hello $du -h hello 8.0K hello $ls -l hello -rwxr-xr-x 1 7417 Nov 2 05:46 hello $rm hello $gcc hello.c -o hello $ls -l hello -rwxr-xr-x 1 6593 Nov 2 05:47 hello $ some content supressed. The gcc compiler accepts both single-letter …
Languages
There are three types of languages: 1. Imperative. 2. Functional. 3. Logical. In computer science, imperative programming is a programming paradigm that describes computation in terms of statements that change a program state. In much the same way that imperative mood in natural languages expresses commands to take action, imperative programs define sequences of commands …
find command part 1
$cat 1 $ $cat 2 $ $find . ./2 ./1 $find . . ./2 ./1 $ls 1 2 $find . -print . ./2 ./1 $find -print . ./2 ./1 $find -name 1 ./1 $ The find command is used to locate files on a Unix or Linux system. find will search any set of director- …
Yauap . simple audio player
$yauap physics.mp3/Joy\ of\ science/Joy\ of\ Science.18.The\ Bohr\ Atom.mp3 yauap 0.2.4 (C) 2006-2008 Sascha Sommer loading url file:///home/jeffrin/Music/physics.mp3/Joy of science/Joy of Science.18.The Bohr Atom.mp3 Cannot connect to server socket err = No such file or directory Cannot connect to server socket jack server is not running or cannot be started title=The Bohr Atom artist=Audio Books album=The …
media gateway control protocol
Network Internals switch (mi->mgcp_type) { case MGCP_REQUEST: if(mi->is_duplicate){ /* Duplicate is ignored */ ms->req_dup_num++; } else { ms->open_req_num++; } break; Actions to be taken for MGCP commands. If “mi->is_duplicate” is a non-zero value, then the packet is ignored, otherwise a ty- pical value is incremented to count of a newer request. Above Explanation May Not …
www.ivarch.com/programs/pv.shtml
if (opts->argc size = sb.st_size; return; } stat, fstat, lstat – get file status stat() stats the file pointed to by path and fills in buf. fstat() is identical to stat(), except that the file to be stat-ed is specified by the file descriptor fd. Reference/Source : Linux Programmer’s Manual. pv (Pipe Viewer) can be …
kern.log part 1
$cut -d ‘ ‘ -f6-20 /var/log/kern.log [22293.016178] kjournald starting. Commit interval 5 seconds [22293.016218] EXT3-fs warning: maximal mount count reached, running e2fsck is recommended [22293.016635] EXT3 FS on sdb2, internal journal [22293.016647] EXT3-fs: mounted filesystem with ordered data mode. $ The First field shown above is a timestamp. The kernel ring buffer is not really …
mkfifo command.
$ls -l jeffrin ls: cannot access jeffrin: No such file or directory $mkfifo jeffrin $ls -l jeffrin prw-r–r– 1 jeffrin jeffrin 0 Oct 12 00:02 jeffrin $ $ls -d > jeffrin “another terminal” $cat < jeffrin . $ A “FIFO” is a special file type that permits independent processes to communicate. One process opens the …