There are three types of scopes used in a Custom Directive:-
1. Shared scope
2. Inherited scope
3. Isolated scope
1. Shared scope:-
Directives share the scope within that controller, in a shared scope. Since a new scope is not...
1. Install pod " pod 'MBProgressHUD', '~> 0.9.1' " in your Xcode project
2. Once pods are installed successfully close your Xcode project & now open Xcode xcworkspace.
3. Now import mbprogress hud as #import "MBProgressHUD.h" in yo...
In my last project I came across a requirement where I had to delete all the blobs from a container using a criteria for modified date with azure web job.
The criteria for deleting the files were to delete the files whose last modified date t...
To remove index.php from magento url follow these steps -
1) Log in to magento admin.
2) Go to System->Configuration.
3) Select Web tab under General section on the left side.
4) Select Yes for Use Web Search Rewrites.
Clear cache and...
There is easy way to create Pojo/Bean class for any Json scheme.
http://www.jsonschema2pojo.org/
Convert json data to Gson Pojo class:
Copy and paste Json text to http://www.jsonschema2pojo.org/
Enter package name and class name f...
PDO statement uses the setfetchmode() method to set the default fetch mode.
PDOStatement::setFetchMode($mode)
$mode: mode is a valid value pass to fetch() method.
Some of the commonly used fetching modes are:
PDO::FETCH_ASSOC:
...
JavaScript Comparing For and While Loop
Both the loops are similar in some ways, like both are used for repeated execution of statements as well as execution are done till the condition is true.
For loop and while loop they differ by the sy...
Method Overriding is a type of polymorphism.
It is dynamic type of polymorphism.
In this we have the method with the similar name in both parent class and child class.
But the child class override the method of the parent class when we create ...
Access data from mysql using PDO includes the following steps:
connect to a MySQL database:
$db_conn = new PDO("mysql:host=$hostname;dbname=$dbname", $username, $password);
create a select statement and then execute it by using query() m...
Method Overloading is a type of polymorphism.
Using this we can have two different method having the same name in a single class.
Method have the same name but different argument through which they are recognize.
Argument have
1.Different num...
To find out the country of the user please use the code below:
1- Add the coreLocation Framework to your project and import #import <corelocation corelocation.h="">
2- Set the CLLocationManagerDelegate as UIViewController
@interface...
JavaScript Math Object
The JavaScript math object is used to perform mathematical operation.
The Math object includes several mathematical methods.
Below are certain math objects with examples:
1)Math.sqrt(n)
this method returns the squa...
libPhoneNumber
libphoneNumber Library is used to validate the phone number and it is a google's library mostly used by google products and Whatsapp
phone number validation is important for app so that you can get valid number from your use...
Output buffering is mechanism in which sending a response to the browser . Without output buffering (the default) you HTML is send to the browser in pieces as php script . With output buffering your HTML is store in a variable and send to the b...
The difference between While and Do Whileis :
Whileloop checks the condition given with it first and if the condition is true then it enters inside the loop . That means the statements inside the loop is executed only if the condition is true....
Authentication plugin provides facility for user to authenticate the user from any source such as database. As all the plugins in Joomla are inherited by jPlugin class so we can create our own custom plugin which will inherit from base class for ...
Hello Reader!, If you looking for a front end validation for matching the two passwords feilds with Javascript
then you can see how to get it done.
Lets consider the example below
Here i'm using the html code for the form
<form clas...
PDO stands for PHP Data Objects. It is a php extension which provides an interface used to access the database. It basically provides an abstraction layer to access the database regardless of the database we are using. It supports many databases ...
I have faced the issue of Invalid method Mage_Catalog_Block_Product_View::_isSecure(Array()) after creating the copy of rwd theme in magento1.9.0. So would like to tell about the solution, if somebody will face the same problem then just copy the...
Hello Guys,
In this Blog, we are going to discuss How to redirect URL with the help of Php language. If you want simpler method like Html redirection for this you can visit my previous blog How to Redirect a Website using HTML Code.
Php C...
If a column is not in date datatype but the inserted values in that columns are as date type.
and you want to update that column in date type but without loosing values in that column.
You can use the following query-
UPDATE `tbl` SET `dat...
All the limits are configurable but not fixed by the HTTP protocol and vary from platform to platform (i.e. web-servers).
Tomcat :
maxHttpHeaderSize=>We can specify the max size of the request/response HTTP header in bytes, by defaul...
Joomla provides a powerful donation extension known as joom donation. It is very powerful and rich featured extension that is used for collecting donors information and get donation from them via online payment gateways such as paypal, authorise...
In case of using simple RewriteRule directive our URL changes with the query string as well but if we want to use the existing GET parameters along with the new parameters appended we should use the flag [QSA].Using flag [QSA] appends the new que...
In Javascript you can add one or more element into an array with the hepl of push() method and it will return new length of an array .
Syntax ->
arrayname.push(element1, element2 ,.........elementN )
Parameters ->
elementN- > New El...
JavaScript
Debugger is very important in javascript because It is difficult to write JavaScript code without a Debugger
Your code might contain syntax errors, or logical errors, that are difficult to diagnose.
There are no indications f...
The approaches that we use for bug isolation are :-
1- Bottom-up Approach
2- Top-down Approach
3- Bisection Approach
4- Refinement Approach
Bottom Up Approach:- The bottom-up approach is used when testers have an intuition about the item...
Component is a type of joomla extension. They work as a mini application in joomla. Joomla provides several components which gives it the power to be the best CMS in the world. Some of the top joomla components are:
Virtuemart:
Virt...
In this example user will have facility to add more input fields in form dynamically similarly user will also have facility to remove dynamic input fields so once user click remove link it removes the current input field by using its correspond...
In this tutorial I will describe that how you can search any value in multidimensional array in PHP.
I am taking an example to describe this. Like-
I want to fetch 'salary' with the name 'xyz' employee from an user array list.
$arr1=arra...
In Javascript there are several ways to detect array(variable is an array). But through this post , I will tell you ony four different ways to detect variable is an array .
Below there are 4 different ways are :->
1) Array.isArray(object) ...
Installation Testing
Installation testing is a type of QA (Quality Assurance) work in the software organization that concentrates on what consumer will need to do to establish and configuration the new software/application fortunately. Testing a...
Through this tutorial I will help you to solve the problem if "array_column" function is not working. May be you are using the older version of PHP.
Let me remind you, this will work with 5.5 version or higher of PHP.
Below I am writing t...
Array Dereferencing is a good feature which is available in PHP 5.4 version. using this user can directly access an array object directly of a method a functions.
The purpose of using this is to reduce the unnecessary lines of code because of th...
Open a Notepad and Excel to read-write in .NET
Suppose, if we required in our application to save the data in text format or in an Excel format for the analysis purpose, then there will be a need to open the Notepad and Excel and read-write da...
Hello Readers,
If you want to remove the default editor from your post type, then you may use below code.
It remove the default editor from your custom post type and you can use it for default post type as well.
remove_post_type_support() ...
Pinterest is a social platform for sharing images online in a well categorized manner. This social channel is basically named from the combination of two separate words pin and interest. Pinterest contains several categories starting from...
In this blog we are going to explain about how to create sitemap . Sitemap play very important role in SEO. Now lets got to the topic.
What is the Sitemap ?
Sitemap is list of of web pages urls . We create this file in the xml format ...
Hello Readers,
If you want to remove default <div> and <li> tags from the WP menu, you can use below code.
It will remove the default <div> Tag and default <ul> Tag from your menu item.
The defualt Wp code is below
...
Hi guys ,it really helps to add watermark on images . In this code you will see that we get the position of watermark .png image where you want to place then copy to the watermark image on the main images.
/*
* PHP GD
* adding watermark to a...
Follow the given steps:
1) Add the script in your page
<script type="text/javascript" src="/path/to/jquery-latest.js"></script>
<script type="text/javascript" src="/path/to/jquery.tablesorter.js"></script>
2) I...
Entity Lifecycle in EntityFrame Work:--
Before working on entity framework on asp.net, It's important to know the entity (like any table, list etc.) life cycle and how it is managed by the entity framework. During entitys lifetime, each entity...
What is Google+
Google+ is a social media platform provided from Google.com to all the users. It is one of the growing social channel. Google has launched this social media in June 2011. The main features of this platform include posting u...
These are the Following methods in Selenium are used in conditional and looping operations:-
isEnabled() method is used when you want to verify weather a certain element is enabled or not before executing a command.
WebElement txtbox-us...
Joomla is a CMS which provides several components. One such powerful component is K2. K2 is a content extension for Joomla which is very powerful and easy to use. It is used as a replacement of the default article system in Joomla because of rich...
I would like to prepare the JSON array by using the list view.
Prepared the CustomListView and adapted the data and performing onClikclistener() to give input and set the data. Now trying to use data in list adapter with some custom data to pre...
Hello Readers,
When we play a video on our webpage at the end of the of video it provides reference links of other videos so, if you want to play video and do not want to provide any reference links, below code will make this possible.
**H...
I have 3 array list which gets data from various model classes.. I want to display these 3 in a single listview with separate headers. How can I achieve this? Can anyone help me?
These days android came up with new material design so lets get updated with one of the many features ie. Action Bar which is also special type of tool bar.
Before we start make sure you have these requirements fulfilled.
Android Studio.
...
Method Overriding in Java
If child class has the same method which is declared in the parent class, it is known as method overriding in java.
Method overriding provides specific implementation of a method which is already provided by its par...