Category: shots

single quoted string VS Double quoted string [RUBY]

Single Quoted Double Quoted Does not allow string interpolatio foo = 'Hello' puts foo => Hello foo = 'Hello' bar =  'check #{foo}' => ##Error Allows string interpolation foo = “World” puts foo =>Hello foo = 'Hello' bar =  “check #{foo}” puts bar => check Hello Single quotes preserve escaped characters puts 'i \n love … Continue reading single quoted string VS Double quoted string [RUBY]

Advertisements

Select VS Detect [RUBY]

Ruby Select Ruby Detect Returns an array containing all elements of enum for which the given block returns a true value. If no block is given, an enumerator is returned instead.  Returns the first element for which block is not false. If no object matches returns nil . If no block is given, an enumerator is returned instead. items.select(...) returns all elements that meet criteria … Continue reading Select VS Detect [RUBY]

What is NoSQL databse?

NoSQL  or Not Only SQL database provides a mechanism for storage and retrival of data which is simpler in means other than the tabular relations used in relational databases. Relational databases (RDBMS) rely on tables, columns, rows, or schemas to organize and retrieve data. In contrast, NoSQL databases do not rely on these structures and use more flexible data models. … Continue reading What is NoSQL databse?