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) [source] [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 error: no match of right hand side value #Fun<erl_eval.6.82930912> 3> double = fun(value) -> ( 2 * value) end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 4> double = fun(value) -> 2 * value end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 5> Double = fun(value) -> 2 * value end. #Fun<erl_eval.6.82930912> 6> Double(5). ** exception error: no function clause matching erl_eval:'-inside-an-interpreted-fun-'(5) 7> b(). Double = fun(value) -> 2 * value end ok 8> Double(5). ** exception error: no function clause matching erl_eval:'-inside-an-interpreted-fun-'(5) 9> Double = fun(Value) -> (2 * Value) end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 10> Double = fun(Value) -> 2 * Value end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 11> Double = fun(Value) -> 2*Value end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 12> Double = fun(Value) -> 2*Value end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 13> Double = fun(value) -> 2*value end. #Fun<erl_eval.6.82930912> 14> b(). Double = fun(value) -> 2 * value end ok 15> Double(5). ** exception error: no function clause matching erl_eval:'-inside-an-interpreted-fun-'(5) 16> Double(2). ** exception error: no function clause matching erl_eval:'-inside-an-interpreted-fun-'(2) 17> value = 10 17> Double(value). * 2: syntax error before: Double 17> Double = fun(value) -> 2 * value end. #Fun<erl_eval.6.82930912> 18> Double(value). ** exception error: bad argument in an arithmetic expression in operator */2 called as 2 * value 19> Double = fun(value) -> 2 + value end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 20> Double = fun(value) -> 2+value end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 21> Double = fun(value) -> (2 + value) end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 22> Double = fun(value) -> value end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 23> Double = fun(value) -> value+1 end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 24> Double1 = fun(value) -> value+1 end. #Fun<erl_eval.6.82930912> 25> Double1(value). ** exception error: bad argument in an arithmetic expression in operator +/2 called as value + 1 26> Double1(3). ** exception error: no function clause matching erl_eval:'-inside-an-interpreted-fun-'(3) 27> summer = fun(Val) -> Val + 1 end. ** exception error: no match of right hand side value #Fun<erl_eval.6.82930912> 28> Summer = fun(Val) -> Val + 1 end. #Fun<erl_eval.6.82930912> 29> Summer(2). 3 30>
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 English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> lscalls png(file="Rbarplot-ls.png")
> barplot(lscalls)
> dev.off
function (which = dev.cur())
{
if (which == 1)
stop("cannot shut down device 1 (the null device)")
.External(C_devoff, as.integer(which))
dev.cur()
}
> dev.off()
null device
1
>
R ls plot
commandline session
> library(ggplot2)
Loading required package: reshape
Loading required package: plyr
Attaching package: ‘reshape’
The following object(s) are masked from ‘package:plyr’:
rename, round_any
Loading required package: grid
Loading required package: proto
> lscalls usecspercall qplot(lscalls,usecspercall,geom="line")
> plot(lscalls,usecspercall,geom="line")
Warning messages:
1: In plot.window(...) : "geom" is not a graphical parameter
2: In plot.xy(xy, type, ...) : "geom" is not a graphical parameter
3: In axis(side = side, at = at, labels = labels, ...) :
"geom" is not a graphical parameter
4: In axis(side = side, at = at, labels = labels, ...) :
"geom" is not a graphical parameter
5: In box(...) : "geom" is not a graphical parameter
6: In title(...) : "geom" is not a graphical parameter
> png(file="Rlsplot.png")
> plot(lscalls,usecspercall,geom="point")
Warning messages:
1: In plot.window(...) : "geom" is not a graphical parameter
2: In plot.xy(xy, type, ...) : "geom" is not a graphical parameter
3: In axis(side = side, at = at, labels = labels, ...) :
"geom" is not a graphical parameter
4: In axis(side = side, at = at, labels = labels, ...) :
"geom" is not a graphical parameter
5: In box(...) : "geom" is not a graphical parameter
6: In title(...) : "geom" is not a graphical parameter
> dev.off()
null device
1
> ggplot(lscalls,usecspercall,geom="point")
Error in ggplot.data.frame(fortify(data), mapping, ...) :
Mapping should be created with aes or aes_string
>
Erlang shell .
commandline session
$erl
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [async-threads:0] [kernel-poll:false]
Eshell V5.9.1 (abort with ^G)
1> q().
ok
2> $
$erl
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [async-threads:0] [kernel-poll:false]
Eshell V5.9.1 (abort with ^G)
1> h().
ok
2> h()
2> .
1: h()
-> ok
ok
3> pwd().
/home/jeffrin/Downloads
ok
4> cd("..").
/home/jeffrin
ok
5> 1+2.
3
6> 3*2.
6
7> 3-3.
0
8> 6-2
8> .
4
9> 2*v(6).
12
10> math:pi().
3.1415921003589793
11> math:sin(10).
-0.5440211108893698
12> 21
12> 12e23
12> 2*v(12).
* 2: syntax error before: 12
12> k=1.
** exception error: no match of right hand side value 1
13> k=1
13> k
13> .
* 2: syntax error before: k
13> k.
k
14> K=1.
1
15> K.
1
16> K=K+1.
** exception error: no match of right hand side value 2
17> K=K.
1
18> P=2.
2
19> K+P.
3
20> b().
K = 1
P = 2
ok
21> f().
ok
22> b().
ok
23>
R plot firefox + line graph
R plot . firefox statistics
R Graphics scatter plot
GCC COMMANDLINE OPTIONS PART 9
compiler option Testing
$ls
unsigned.c
$gcc unsigned.c
$./a.out
The Geek Stuff [-10]
$gcc -funsigned-char unsigned.c
$./a.out
The Geek Stuff [246]
$cat unsigned.c
#include<stdio.h>
int main(void)
{
char c = -10;
// Print the string
printf("n The Geek Stuff [%d]n", c);
return 0;
}
$
GCC COMMANDLINE OPTIONS PART 8 -ansi
commandline session
$cat main.c
#include<stdio.h>
#include<math.h>
int main(void)
{
int i=0;
float y;
printf("n The Geek Stuff [%d]n", i);
y=sinf(2.5);
printf("%fn",y);
return 0;
}
$gcc -ansi main.c
/tmp/ccBNR3rx.o: In function `main':
main.c:(.text+0x3c): undefined reference to `sinf'
collect2: error: ld returned 1 exit status
$gcc main.c
$
GCC COMMANDLINE OPTIONS PART 7
commandline session
$gcc -v main.c Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-4' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.7.2 (Debian 4.7.2-4) COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1 -quiet -v -imultiarch x86_64-linux-gnu main.c -quiet -dumpbase main.c -mtune=generic -march=x86-64 -auxbase main -version -o /tmp/cc6KHWV5.s GNU C (Debian 4.7.2-4) version 4.7.2 (x86_64-linux-gnu) compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version 3.1.0-p10, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../x86_64-linux-gnu/include" #include "..." search starts here: #include search starts here: /usr/lib/gcc/x86_64-linux-gnu/4.7/include /usr/local/include /usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed /usr/include/x86_64-linux-gnu /usr/include End of search list. GNU C (Debian 4.7.2-4) version 4.7.2 (x86_64-linux-gnu) compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version 3.1.0-p10, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: c5f63dedeacd449634699df94fe3d914 COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64' as -v --64 -o /tmp/ccw9UtSZ.o /tmp/cc6KHWV5.s GNU assembler version 2.22 (x86_64-linux-gnu) using BFD version (GNU Binutils for Debian) 2.22 COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.7/:/usr/lib/gcc/x86_64-linux-gnu/4.7/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.7/:/usr/lib/gcc/x86_64-linux-gnu/ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.7/:/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/4.7/collect2 --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -m elf_x86_64 --hash-style=both -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.7/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.7 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../.. /tmp/ccw9UtSZ.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.7/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o $




