I hereby claim:
- I am siliconsenthil on github.
- I am siliconsenthil (https://keybase.io/siliconsenthil) on keybase.
- I have a public key ASAvhTD5DMpraRaQA4HG0VBg896VGrlFVC6VLtTDMRpLJgo
To claim this, I am signing this object:
object RecursionVsTailRecursion extends App { | |
def iterative_sum(a: Long, b: Long):Long = { | |
var result = 0L; | |
for(i <- a until b){result=result+i} | |
return result+b; | |
} | |
def sum(a: Long, b: Long): Long = if(a > b) 0 else a + sum(a+1, b) | |
class CommentsController < ApplicationController | |
def create | |
Comment.create(params[:comment]) | |
render :text => 'Success' | |
end | |
end | |
################################################# | |
class Comment < ActiveRecord::Base |
class CommentsController < ApplicationController | |
def create | |
event_user = EventUser.find(params[:event_user_id]) | |
comment = Comment.create(:event_user => event_user, :text => params[:text]) | |
FayeClient.broadcast("/event_#{event_user.event_id}_comments", comment.as_json) | |
render :text => 'Success' | |
end | |
end | |
############################## |
I hereby claim:
To claim this, I am signing this object:
public boolean decide(int s){ | |
boolean result = false; | |
if (s == 1){ | |
result = true; | |
}else{ | |
result = false; | |
} | |
return result; | |
} |