## Conditional where in rails

T.L.D.RYou can pass blank object to where clause and it will return current relation as it is.Long versionSometimes, we need to apply where clause conditionally. For eg. apply timeframe

T.L.D.RYou can pass blank object to where clause and it will return current relation as it is.Long versionSometimes, we need to apply where clause conditionally. For eg. apply timeframe

Installing jenkins on Fedora is quite easy.$ sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo $ sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.

Problem -A function f is defined by the rule thatf(n) = n if n < 3 andf(n) = f(n-1) + 2 * f(n-2) + 3 * f(n-3) if n >= 3.Write a procedure

SICP Exercise 1.6 is very interesting. I found it difficult to understand the problem and then the solution. It was fun to actually understand and reason about the solution.In section 1.

Define a procedure that takes three numbers as arguments and returns the sum of squares of the two larger numbersI broke this problem into 3 stepsDefine a square function which will take one