The following graph shows the time taken to execute an algorithm with an array size of 500 using ruby language. Graph is plotted for 5 consecutive executions. The values for plotting the above graph is taken from the values which is produced with the help of time command. Mon Apr 7 18:34:34 IST 2014 real …
Author Archives: jeffrin
BUBBLE SORT USING RUBY . ARRAY SIZE 400
The following graphs shows the time taken to execute an algorithm using ruby language with an array size of 400. Graph is plotted for 5 consecutive executions. Both graphs plot the same values except that one is kind of monochrome and the other one is in color mode. The values for plotting the above graphs …
BUBBLE SORT USING RUBY. GRAPH FOR ARRAY SIZE 300
Wed Apr 2 21:06:24 IST 2014 real 0m0.193s user 0m0.032s sys 0m0.004s real 0m0.033s user 0m0.028s sys 0m0.004s real 0m0.030s user 0m0.028s sys 0m0.000s real 0m0.032s user 0m0.024s sys 0m0.008s real 0m0.028s user 0m0.024s sys 0m0.000s
BUBBLE SORT USING RUBY. GRAPH FOR ARRAY SIZE 200
approx (Mon Mar 31 21:39:42 IST 2014) real 0m0.388s user 0m0.048s sys 0m0.000s real 0m0.025s user 0m0.020s sys 0m0.004s real 0m0.029s user 0m0.020s sys 0m0.008s real 0m0.029s user 0m0.024s sys 0m0.004s real 0m0.024s user 0m0.020s sys 0m0.000s
What does true and false commands do ?
commandline session $true $true $? $echo $? 0 $false $echo $? 1 $echo $? 0 $echo $? 0 $false ; true $echo $? 0 $true ; false ; echo $? 1 $true ; false ; echo $? 1 $true ; false ; echo $? 1 $true ; false ; echo $? ; echo $? 1 …
Tinkering with grep.
commandline session $cat colors Asian Paints. Chapel grey — hall– color family : brown 8441 tree bark — kitchen. — color family : brown 8566 oyster grey — both bedrooms — color family: brown 8473 $ $cat colors Asian Paints. Chapel grey — hall– color family : brown 8441 tree bark — kitchen. — color …
BUBBLE SORT USING RUBY. GRAPH FOR ARRAY SIZE 100
Sun Mar 30 17:49:05 IST 2014 real 0m0.398s user 0m0.032s sys 0m0.008s real 0m0.019s user 0m0.016s sys 0m0.000s real 0m0.023s user 0m0.020s sys 0m0.000s real 0m0.024s user 0m0.020s sys 0m0.000s real 0m0.024s user 0m0.020s sys 0m0.000s
BUBBLE SORT USING RUBY ARRAY SIZE 100
#!/usr/bin/ruby =begin bubble sort in php by detour@metalshell.com Generate random numbers then sort them. Ported to Ruby by Jeffrin Jose T Licensed : GPL =end array_size = 100 x = 0 y = 0 z = 0 hold = 0 ran = Array.new(array_size) while x < array_size ran[x] = rand(1..1000) x +=1 end x = …
What is the difference between ls -a and ls -A ?
commandline session $who jeffrin tty7 2014-03-30 00:04 (:0) jeffrin pts/0 2014-03-30 00:06 (:0) $’who’ jeffrin tty7 2014-03-30 00:04 (:0) jeffrin pts/0 2014-03-30 00:06 (:0) $`who` bash: jeffrin: command not found $ls -a > a.txt $ls -A > A.txt $diff a.txt A.txt 1,2d0 < . A.txt $cmp a.txt A.txt a.txt A.txt differ: byte 1, line 1 …
Continue reading “What is the difference between ls -a and ls -A ?”
BUBBLE SORT USING C . ARRAY SIZE 500
Fri Mar 28 18:17:40 IST 2014 real 0m0.004s user 0m0.000s sys 0m0.000s real 0m0.004s user 0m0.000s sys 0m0.000s real 0m0.003s user 0m0.000s sys 0m0.000s real 0m0.004s user 0m0.000s sys 0m0.000s real 0m0.002s user 0m0.000s sys 0m0.000s