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

Search In

array and hashes in ruby

Ruby array is a list of elements that can be of any type either string or integer. Hence, In ruby it can be integer or string.  we can declare array by placing the elements inside the brackets like;- arr = [1,"array",2,3,"hello",6.5

Types of Security risks for web application

There are different types security risks for web application: Some of them are: 1. SQL Injection 2. Broken authentication and Session management. 3. Cross site scripting 4. Insecure Direct Object References 5. Security Misconfiguration 6. Sensitive

Select Vs Pluck in Rails

In this tutorial we will see how we can use pluck and select in rails active record queries.   Select is used to fetch records with specific attributes. It returns ActiveRecord::Relation object.   Project.select(:id) Project Load (41.5m

Image into base64 dataurl using javascript with demo

Converting image in base64 data url reduces the count of HTTP request and will increase the performance of the website because the load time to transfer data over the internet is too long and it will save the server request time. There are many adva

Using rolify devise and cancan gem together for user authorizations and access in rails

Hi friends, Whenever we create an application, there is always a case where we want to have different kind of users who needs to login into the app but they have different access rights, so that some functionalities are hidden for some users and some

Coin exchange problem solution Implementation in Java

Hi, In this blog I tried to provide an efficient solution for a famous coin exchange problem using dynamic problem in bottom up approach whose time complexity is O(mn). Problem Definition In coin exchange problem you can think of a coin v

Form objects with Reform gem (Rails refactoring)

We have been discussing refactoring in our previous posts. Next to our refactoring pattern, we will discuss few gems that can be used to improve our coding style.   In my last post i explained form objects pattern. Form objects are nothing but

Reusability of Cucumber steps

Many times it has been noticed that some set of steps were required in another cucumber step. One way is to write previous steps again in the required cucumber step but this violates the “Reusability” feature of cucumber. So, the best sol

Variables in Ruby

There are 4 types of variables in Ruby: Global, Local, Instance and Class. Ruby is a language where a variable can contain any type of object, you can assign a string to a variable which has previously an integer value. As in ruby we generally don

CRUD OPERATIONS IN MONGO DB

Basic CRUD command in mongo are listed below: 1) To list all the databases show dbs 2) To create a new database use dbName 3) Check in the list of database that db created or not. Use cmd: show dbs But your recently created db will not app

1 231 363
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: