Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Search In

Singleton methods in rails

A regular instance method can be used by all the instances of that class and all of them will inherit their behavior from its class. But what if we want a particular instance to have a specific behavior that no other instance can have that is where s

Difference between first & take in Ruby Arrays

Both first & take are applied on the ruby objects, they return the requested number of elements from the Array. There are some differences between them, and i have explained the major ones over here. 1) The method take always accepts an argument

How to define Functional field in OpenERP/Odoo ?

If you want to define Functional field in OpenERP use below code - class Demo1 (osv.osv): _name = ’Demo1’ _description = ’Contract’ _columns = { ’name’ : fields.char(’Contract Name’, size=30, required=True), ’employee_id’ : fields.many2one(’employee

Array and operations on array

Array is used to keep collection of objects. Array in ruby can have any type of objects together. Using array in ruby: >> a = [] >> arr = [1, 0, 7] >> arr[2] # => 7 >> arr.size # => 3 >> arr = ["string", 5, 0.8,

SQL Joins and it's Uses

In SQL **joins** are used when we want to select data and information from two or more tables on the basis of some relationships between one or more columns in tables. SQL Joins are used to relate information in different tables. Thus,we can say

Computes the intersection of arrays

If you want to get all those values which exist in an array and also exist in other array means intersect values between an array and the set of other arrays then you can use a predefined php function array_intersect. array_intersect() returns an arr

Help needed to read command line arguments in Nodejs

Hi, I am trying to accept input from the command line in Nodejs using process.argv in the code snippet, but currently getting an error when I run the following command on the terminal - node index.js "1 18" Error that I get - TypeErr

logical expressions in Odoo

In given below table logical expressions are defined . Operator Meaning Example Result == equals 1 + 1 == 2 True != does not equal 3.2 != 2.5 True <  less than 10 < 5 False >  greater than 10 > 5 True <= less than or equal t

How to create a new gemset & copy an existing gemset into it

We can create a new gemset to install a specific set of gems in it. In this i am copying an existing gemset into a newly created gemset. 1> To list the available gemsets we can type : rvm gemset list gemsets for ruby-2.2.3 (found in /home/tara

How to Solve Diamond Interface Inheritance Problem in JAVA?

Hello. I'm trying to solve the following problem. I have 4 interfaces that are in a diamond shape and 2 classes. The requirements is to make the method calls work, while keeping f1 as the interface of x. Can you guys give me a hand?   p

1 12 423
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: