This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I copied the gems to my box and installed them with the below command.. (it did take a while to install). Thus, please give it sometime before you think it might hang for ever. | |
mohnish@mohnish-laptop:~/xxxx/latest/prj_name/vendor/cache$ gem install ruby-debug19-0.11.6.gem -l | |
Building native extensions. This could take a while... | |
Building native extensions. This could take a while... | |
Successfully installed linecache19-0.5.12 | |
Successfully installed ruby-debug-base19-0.11.25 | |
Successfully installed ruby-debug19-0.11.6 | |
3 gems installed | |
Installing ri documentation for linecache19-0.5.12... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--<!doctype html>--> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Static Bar Charts</title> | |
<link rel="stylesheet" href="css/demo.css" type="text/css" media="screen" charset="utf-8"> | |
<link rel="stylesheet" href="css/demo-print.css" type="text/css" media="print" charset="utf-8"> | |
<script src="https://raw.github.com/DmitryBaranovskiy/g.raphael/master/raphael-min.js" type="text/javascript" charset="utf-8"></script> | |
<script src="https://raw.github.com/DmitryBaranovskiy/g.raphael/master/g.raphael.js" type="text/javascript" charset="utf-8"></script> | |
<script src="https://raw.github.com/DmitryBaranovskiy/g.raphael/master/g.bar.js" type="text/javascript" charset="utf-8"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!AmCharts)var AmCharts={};AmCharts.inheriting={}; | |
AmCharts.Class=function(a){var b=function(){arguments[0]!==AmCharts.inheriting&&(this.events={},this.construct.apply(this,arguments))};a.inherits?(b.prototype=new a.inherits(AmCharts.inheriting),b.base=a.inherits.prototype,delete a.inherits):(b.prototype.createEvents=function(){for(var a=0,b=arguments.length;a<b;a++)this.events[arguments[a]]=[]},b.prototype.listenTo=function(a,b,c){a.events[b].push({handler:c,scope:this})},b.prototype.addListener=function(a,b,c){this.events[a].push({handler:b,scope:c})}, | |
b.prototype.removeListener=function(a,b,c){a=a.events[b];for(b=a.length-1;0<=b;b--)a[b].handler===c&&a.splice(b,1)},b.prototype.fire=function(a,b){for(var c=this.events[a],g=0,h=c.length;g<h;g++){var k=c[g];k.handler.call(k.scope,b)}});for(var c in a)b.prototype[c]=a[c];return b};AmCharts.charts=[];AmCharts.addChart=function(a){AmCharts.charts.push(a)};AmCharts.removeChart=function(a){for(var b=AmCharts.charts,c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1)};A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Total Months via hashes: 8 | |
#{numbers["two"]} | |
zero | |
5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | |
6 | |
Using size(above) n length(below) properties to print no. of elements in a string | |
6 | |
tryin to print anything outside array bounds ..like value of a[8] prints nill.. do note.. | |
11 | |
note how through a[-3] we get the value of the third last element of the array 7 | |
changing value of 1st element of array to 25.. and printing it.. note the way its printed..25 | |
Dyanmically do note how the size of an array can be increased in Ruby..Making things simpler n Faster..and a programmer can't be happier.. Yukihiro Matsumto | |
value of a[6]: zero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 | |
6 | |
50 | |
Subtraction of 50 - 30 is: 20 | |
Exponentiation of 3^3 is: 27 | |
Value of 5 modulo 3 is: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print('HI..!! enter ur name please: ') | |
name = gets() | |
puts("Hello #{name}") | |
#this symbol is mainly used for comments.. what role is it playing here..?? | |
# the hash symbol in the puts stmnt above within quotes can be used to print the value of the entity within the quotes | |
puts("\n") | |
#<<name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Playing with operators in Ruby | |
limit = 5 | |
p = 2 * Math.sqrt(4) < limit | |
puts(p) | |
k = 2 ** 4 # Exponentiation Operator.. | |
puts(k) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Equality operators( '==' and check this '==='( case equality operator.. do note.. ) ). | |
a1 = 3 | |
a2 = 4 | |
a3 = 0 | |
s1 = (a1==a2) | |
puts(s1) | |
s2 = (a3!=a2) |
OlderNewer