
Search In
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
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
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
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
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
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
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
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
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
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
