Tags » Anand

I'll make original films till my mind is functional, says Rajkumar Hirani

Filmmaker Rajkumar Hirani, known for Bollywood entertainers like Munna Bhai MBBS, Lage Raho Munna Bhai, has nothing against those who make remakes but says he will make original films till his mind is functioning well. 159 more words

Entertainment

How to call Handlebar helper function from javascript?

I am new to Handlebar & have few questions.
Please help on the same.

Handlebars.registerHelper('formatNumber', function(options) {
  return "111";
});

How to call the above helper function from javascript ? 22 more words

Stackoverflow

How to ensure at most one admin in rails app with devise?

My rails app can have at most one admin, but any number of users.

I am using the devise gem, and am using a User model, with a boolean admin field to determine if a user is an admin. 379 more words

Stackoverflow

How to ensure at most one admin in rails app with devise?

My rails app can have at most one admin, but any number of users.

I am using the devise gem, and am using a User model, with a boolean admin field to determine if a user is an admin. 379 more words

Stackoverflow

Implementing Singleton as Enum in Java

I read that we can implement Singleton in Java using Enum as below:

public enum MySingleton {
     INSTANCE;   
}

But i didn’t understand how the above works? 33 more words

Stackoverflow

How to Copy and Insert rows into same dataframe based on count

I have a dataframe which looks like this (obviously with few variables compared to original data I need to work on with)

woe <- c('1:woe', '2:woe', '3:woe', '4:woe', '5:woe')
svi <- c('stated','verified','verified','stated','stated')
fico_avg <-  ceiling(runif(5,750, 780))
count <- c(8,12,34,24,7)
df <- data.frame(cbind(woe,svi,fico_avg,count))
… 120 more words
Stackoverflow

Gandhi and I

There was no planning behind this book and neither was there any research. This is an extensive conversation, a dialogue – a debate.

This all began by chance. 1,476 more words