Category: Programming Languages

  • Erlang Tinkering

    ABOUT ERLANG Erlang (/ˈɜːrlæŋ/ UR-lang) is a general-purpose, concurrent, functional programming language, as well as a garbage-collected runtime system. The term Erlang is used interchangeably with Erlang/OTP, or OTP, which consists of the Erlang runtime system, a number of ready-to-use components mainly written in Erlang, and a set of design principles for Erlang programs.[3] The […]

  • R boxplot – Produce box-and-whisker plot(s) of the given (grouped) values

    R shell session > boxplot function (x, …) UseMethod(“boxplot”) > boxplot(1,2) > boxplot(1,2) > boxplot(1,2,3) > threads levels(threads) [1] “0” “1” “2” “3” “4” “5” “6” “7” “8” “9” > maximum boxplot(threads,maximum) > minimum boxplot(threads,maximum,minimum) > actual boxplot(threads,maximum,minimum,actual) > png(file=”Rboxplot.png”) > boxplot(threads,maximum,minimum,actual) > dev.off() null device 1 > FIXME : create a R boxplot image […]

  • Hacking with the Erlang Emulator

    The erl program starts an Erlang runtime system. The exact details (for example, whether erl is a script or a program and which other programs it calls) are system-dependent. commandline session $erl Erlang R15B01 (erts-5.9.1) [64-bit] [async-threads:0] [kernel-poll:false] Eshell V5.9.1 (abort with ^G) 1> b(). ok 2> double = fun(value) -> 2*value end. ** exception […]

  • R barplot for ls command details

    commandline session root>R R version 3.1.2 (2014-10-31) — “Pumpkin Helmet” Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type ‘license()’ or ‘licence()’ for distribution details. Natural language support but running in an […]

  • Array in PHP – Hypertext Preprocessor

    $ 4.1.5 20 84—> cat phparray.php $ 4.1.5 21 85—> php phparray.php Welcome PHP C C++ Java Perl Python Ruby $ 4.1.5 22 86—>

  • How does && and || operators combination Work ?

    commandline session $ 4.2.29 10 510—> [ -f wordmatc.c ] || echo hello hello $ 4.2.29 11 511—> [ -f wordmatc.c ] || cat baty && echo hello cat: baty: No such file or directory $ 4.2.29 12 512—> [ -f wordmatc.c ] && echo hello || echo kitten kitten $ 4.2.29 13 513—> [ […]

  • How does bracket expression and negation [^ ] work with grep ?

    commandline session $ 4.2.20 19 519—> grep ‘[^b ]sort’ worked Heapsort Quicksort Timsort $ 4.2.20 20 520—> cat worked Bubble sort Selection sort Insertion sort Shell sort Comb sort Merge sort Heapsort Quicksort Counting sort Bucket sort Radix sort Distribution sort Timsort $ 4.2.20 21 521—>

  • id – print real and effective user and group IDs

    A UNIX Command $id uid=1000(jeffrin) gid=1000(jeffrin) groups=1000(jeffrin),29(audio),1001(wireshark) $id -n id: cannot print only names or real IDs in default format $id -a uid=1000(jeffrin) gid=1000(jeffrin) groups=1000(jeffrin),29(audio),1001(wireshark) $id -g 1000 $id -G 1000 29 1001 $id -Gn jeffrin audio wireshark $id -r id: cannot print only names or real IDs in default format $id -rG 1000 29 […]

  • Relating inside code which creates a text layer in GIMP

    /* GIMP – The GNU Image Manipulation Program * Copyright (C) 1995 Spencer Kimball and Peter Mattis * * GimpTextLayer * Copyright (C) 2002-2004 Sven Neumann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the […]

  • APC alternate PHP cache ( apc_add )

    The alternate PHP cache is free and open opcode cache for PHP. http://en.wikipedia.org/wiki/Opcode $variable= ‘Iam ok’; apc_add(‘foo’,$variable); var_dump(apc_fetch(‘foo’)); the above code is not working as desired. the output we get is “bool(false)” http://www.techterms.com/definition/parse -r code Run PHP code without using script tags ‘ Armstrong, Neil: The Eagle Has Landed [audio:http://www.freeinfosociety.com/media/sounds/18.mp3%5D