Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
Model Unit-Test case for validations and associations using "test-unit" gem in rails 4
In order to write a unit test case for model in rails 4, Let's suppose that we have a model city.rb which has some validations and associations.
#Rails 4.1.14.2 & ruby-2.1.7
Model path: my_app/app/models/city.rb, like...
class ...
6 Google Advanced Search Query Syntax for SEO Professionals
In 2016, Google made the record of 100 Billions monthly searches. Google has amazing average of 2.3 millions searches per second. Google covers over 70% market among the various search engines. As an SEO expert, we have to give special focus to G...
Super Global Variables in PHP
Super Global variables are an assosciative array, that are predefined in PHP. Superglobal means they are always accessible and can be used in function, class or file.
They are available in all scopes on script. We can use these variables dir...
How to deploy ASP.NET application in IIS
To deploy ASP.NET application in IIS follow the below steps:
1. Firstly, we need to check whether all IIS related components are installed or not.
2. For ensuring this we need go to Control Panel and Click on Programs th...
Spinning Preloader
Hello reader's, we all have seen preloaders whenever we visit any website, at the loading time it appears at the window panel. I have just tried to create a preloader using bright colours with a punch of animation over it which therefore seem...
Node.Js REPL command prompt
Its a command prompt like Unix/Linux shell where we can entered command and get output in interactive mode. REPL, i.e. Read Eval Print Loop, environment is bundled with Node.Js and REPL performs the following tasks.
Read &n...
How to calculate fields with total in account invoice line in Odoo-9?
In Odoo first, you have to install accounting module and in our system add existing fields and inherit the accounting module in our own module.
We will follow these step given below:
Step1- First we create our own module and inher...
How to show a menu badge in OpenERP/Odoo?
If you want to show a menu badge in OpenERP/Odoo then you should follow the below code:
class Shiva(models.Model):
_name = 'Shiva'
_inherit = ['ir.needaction_mixin']
STATES = [
('healthy', "Healthy Sh...
How to debug Android app wireless
There is some functionality which we cannot test on Android Emulator and Genymotion So we use Android actual device.
But we have to attach device always when we need debug app.
There is very clean and useful Android Studio Plugin which help...
How to start an Ionic Application Project
In this post, you will learn how to start any application using Ionic Framework. We will start with the downloading process of ionic and all the dependencies that are needed for developing any application.
Also we need to know the platforms th...
Fetch the particular data on click of dropdown and display that data in the table
To fetch a particular data with the help of id on click of a drop down, We have to make a database with table named products and in that table we have to add various columns like id, name, cost, color.
Then write following code in the ProductC...
Singleton class
A special type of class where only one instance per process is created and used is Singleton class. Singleton classes are commonly used the time when general services were offered by some classes. In Singleton class we can store values and wherev...
Convert byte array to hexadecimal string
To convert a byte array to hexadecimal string we use a following two methods:
Method 1:
In first method we use a BitConverter.ToString( Byte[] )
This method convert the define array of bytes to the hexadecimal string format.
...
How to Export Gridview to excel
In C#.net, GridView is use to display tabular data. With GridView it is not mandatory to specify column mappings. If not specified it automatically reads the column name from the data-table to which it is bound. However we must ensure that we spe...
How to catch SQL constraints violations in OpenERP/Odoo controllers?
If you want to catch SQL constraints violations in OpenERP/Odoo controllers this tutorial will help you,
So, You can add an SQL constraint to Odoo model without facing any difficulty, to do this we have to use the _sql_constraints list. O...
How to use modal popup in Angular UI Bootstrap
Angular UI Bootstrap provides $uibModal service to create modal windows. Before using this you need to create a template, controller and reference them with $uibModal service.
It has only one method i.e. open(options).
$uibModal's open ...
QueryString explained with example in ASP.NET
QueryString explained with example in ASP.NET
QueryString is the property of Request object which is used to pass variable values between html pages or between web forms. It is easier to pass data between web forms through QueryString.
Exam...
prevent countdown timer for being restarted
how to prevent countdown timer for being restart when you hit refresh in your browser
<div id="quiz-time-left"> </div>
<script type="text/javascript">
var total_seconds = 60*10 ;
var minutes = parseInt(total_se...
Ordering, Limit and Offset in Active Records Rails
Active records provide us with ways to set constraints in our queries to specify the order in which we have to get the records from the table.
This can be done through the following ways:
order
This method is used to get recor...
Xpath Functions
Xpath functions: Sometimes we need to create generic xpath to locate a web element. We can create generic xpath using the xpath functions. Some of the commonly used xpath functions are as follows:
1. contains()
2. starts-with()
3. last()
4....
Retrieving a Single Object From Active Records In Rails
Active records gives us different ways to retrieve single objects from it.
Those methods with examples are given below :
find
The find method allows us to retrieve a single object or we can say single record from the database ...
Fetch the data from the database and display the fetched data in the dropdown
In this web journal, I'll demonstrate to you generally accepted methods to bring the information from the database and showing the got information in the drop down. I do have a database named CakePHP and in that database I have one table name...
Count number of rows and fields in a result set using MySQLi functions
In my previous articles we learned how to perform CRUD operation using MySQLi Procedural and Object Oriented style. On performing CRUD operations, the data of MySQL table are affected. This article provides the details of functions which can be u...
Rspec PART 1 - Introduction
Introduction to Testing:
The question that always arises is that why we should test a software/code? can't developers code like we need not to write test cases for it to ensure its correctness and quality.
The answer to above ques...
Custom style/CSS for HTML5 placeholder attributes
Introduction of HTML5 Placeholder
HTML5 is one of the great inventions for web world. HTML5 introduce many new and important attributes, some are HTML based and some are through JavaScript API form. HTML5 Input “Placeholder” is one...
Adding a default value for a column through migration
Consider the following scenario.
Let us say we have a User model and users ,its corresponding table in the database has a column role_id along with other columns.
During the time of the attachment of the role_id to users table ,we could hav...
Rail Forms
form_for
<%= form_for(@article) do |f| %>
<%= f.label :title %>
<%= f.text_field :title %>
<%end%>
In this example i supplied an object of article to the form_for method.
It will generate the f...
implement thumbnail image in image uploader
how to implement thumbnail for image in rails.
step 1:-
go to uploader inside views where you have written image uploader code for uploading image. uncomment this section
#Create different versions of your uploaded files:
ve...
Use of seeds in Rails
Hi Friends,
Few days back I was facing an issue that once I was creating an application in development mode, I needed to sign up to my application with fake emails, so that was very troublesome process, so I found out about seeds in rails.
...
Integrate Postgresql with Node JS
Many Programmers feel comfortable to use Postgre SQL rather than MongoDB, member of MEAN Stack.
We are going to integrate Postgresql with NodeJS
To install NodeJS, please go through this Article
Now, when we are finished with Installatio...
views in ruby
Hello friends, I hope you all are doing well, so today I would be discussing rails view in ruby in rails. View in ruby is used to display the data which is requested by controller from web with the help of shareable variables. We usually end view...
Callbacks in NodeJs
A callback is a function which is called after completion of a current running task. In Nodejs, all APIs are fully supports the callbacks asynchronous i.e. Non-Blocking Code features of NodeJs.
Due to Non-Blocking features NodeJs makes highly ...
How to create Grid View with in View pager
In the below example I have created a GridView with in Viewpager. Here in activity_main.xml layout , I have added ToolBar, ImageView , TextView, TabLayout, Viewpager. In second step I have created three fragments xml layouts. In fragment_three.xm...
Rails Sql Queries
find method: The find method is used to find the particular object that matches with the parameter supplied to it.
article = Article.find(11) #It is used to find the article whose primary key is 11.
# => #<Article id: 11, name: ...
How to customize the redirect after a successful account updation using devise
Here we want to render a custom page like the user's profile page after a successful account updation.The solution is fairly simple,however one prerequisite i am assuming that we have already run rails generate devise:controller user co...
Audit Trails in PIM Desktop
Hello
Today we would discuss about the importance of Audit Trails in PIM Desktop.
Audit Trail
An audit trail comprises the transaction with a record of each stage involved in it. It aids in simplifying problem administration by tracing t...
Important Methods of Date in Ruby
We often stuck, how to manipulate Date in our rails Application.
We have two Date objects in Ruby
Time.now() // This will give Today's date
#=> 2016-05-17 17:02:28 +0530
Date.new() // This will need some arguments to pa...
Applying constraints using code in ios
We can apply constraints with the help of coding also.
Suppose we have a button and we have to give constraints to it so below coding can help us to do so.
Lets make a custom button first.
UIButton *firstButton;
firstBut...
Form and Html using Laravel 4.x:
As we all know that in each and every framework and project we will use form and html.Similarly by using Laravel 4.x we will create form and use html.
Opening A Form:
For opening a form in laravel 4.x the following syntax is used:...
Examples: Override Magento Blocks, Models & controllers
Hello Readers,
This tutorial will guide you about overriding mage core file using config.xml. Here i am gonna give an examples which guide you about "how to override magento blocks, Models & controllers. Always remember, it is not a goo...
Image Upload using Retrofit
We are assuming you are already familiar with Retrofit. If not then first go to this. We have used multipart request for uploading image on server using Retrofit.
Following are the simple and easy steps for image uploading using Retrofit:-
...
Metacharacters Of Regular Expression
Regular expression also supports a number of special characters that may be affect the way for matching a pattern.
For example: Enter the regex: sri.....
&n...
Basic MongoDB Queries
1) Create a "testDB" database.
use testDB
2) Create a collection name "users" and adding the value together using single command.
db.logins.insert({username:"neetu"})
or
First create a collecti...
0/1 Knapsack Solution in Java
Hi, this blog is to help you to know about 0/1 knapsack problem and how to solve it using Java.
Problem Definition
Suppose there is a thief who came to steal thing from someone's home. He has a knapsack(shoulder bag) ...
Convert ArrayList object to comma separated string
ArrayList is an heterogeneous collection of objects where each object can be indexed individually. While writing an application there could be some scenarios where we have ArrayList object filled with data and we want that data in delimited forma...
3D Spinning Cube Using CSS3
Hello reader's. I have created a 3D spinning cubes using CSS3 by simply using the transform,animation and transition property over the elements.
In my example, I have taken a cube element comprising of each face of the cube having its own ...
What is ReferenceError: $ is not defined
In this post, you will know the reasons behind having the ReferenceError in your console log. Also we will discuss some common case with examples.
There is a common javascript error like this line: you are trying to access a variable or call a f...
Best Practices : Version Control
Irrespective of the technologies used like .Net,Java or PHP software versioning plays a critical role in software development. In this blog we will go through a set of best practices for successful implementation of version control in an organiza...
Ionic Framework - $ionicPopup service in module
Hello Readers,
In this post we will discuss to generate popup on click on button using $ionicPopup service in ionic framework.
Basically, Usage of popup windows in application is to guide the user to what to do next?
$ionicPopup provides...
Storage Classes
Storage classes are used to check the visibility and scope of the variables. There are 5 types of storage classes.
auto storage class->
the auto storage class is a default storage class and it is for all local variables...