Hello Everyone, today I am here to guide you "How to calcuate distance between 2 place with the help of zip code in Php".
$point and $point are two places, you can pass these values into total_distance() function
$radius is earth radius in mi...
Maintenance page overriding
Though Drupal provide very elegant page for the maintenance. What if you want to customize it. Yes this could be done by overwriting the page
The system includes a default maintenance template, which is loca...
When we enter any text in textbox through sendKeys() then after entering the text also the keyboard is not dismissed. If we want to locate the element on the screen then the element could not be located, so to locate the element on screen, the ke...
In followers linked to new partner fields first we have to go in .py file (Python file) After that we have to decide where we want followers linked to new partner fields and then write start to end python code to that field.Use below .py code in ...
In openerp first install account module and inherit the views of account module and pass the id of account module views form xml file then give reference in your own module and add your new fields in xml file.
Use this code in your own module in...
In codeigniter, normally the routing is in the manner "host.com/controller/method/id" means, typically there is a one-to-one relationship between a URL string and its corresponding controller class/method.
But some time developer or client want ...
Below are the steps to Import an ORS:
Step 1: Launch the jnlp file.
Step 2: Enter you credential, select the ORS.
Step 3: Under Workbench, select Repository Manager.
Step 4: Connect to Master Database.
Step 5: Under Validate tab, validate th...
Basically activity have a default launch mode that is Standard launch mode but we can change launch mode according to our need.
There are four types of launch mode avaiable that are :
1.Standard
2.SingleTop
3.SingleTask
4.SingleInstance...
Below are the steps to Export an ORS:
Step 1: Launch the jnlp file.
Step 2: Enter you credential, select the ORS.
Step 3: Under Workbench, select Repository Manager.
Step 4: Connect to Master Database.
Step 5: Under Validate tab, validate th...
In MySQL join is used to combine records from 2 or more tables based on a common column between them.
INNER JOIN: It returns all rows when there is a match in both tables.
LEFT JOIN: It returns all rows from the left table and matched rows ...
JavaScript Array reverse() method : The reverse() method is used to reverse the order of the array elements.
Syntax of Array reverse() method :
array.reverse()
Example of Array reverse() method : Here in the following example I wi...
Hi All,
In this we will discuss about factories in Angular JS, as Factory and Services plays an important role in Angular jS application as they allows us to put reusable code at a single place that can later on used in many other places like ...
For doing that we need to create procedure first and also define the repeating interval to call it again
We will create procedure named getnotification from the particular database that gets fired after 3:30 hours on a daily basis.
Wh...
CHAR_LENGTH(str)
The string str length measured in characters is returned by CHAR_LENGTH. It also counts a single character for a multibyte character. This means, for a string containing five 2-byte characters, LENGTH() returns 10, whereas CHA...
Like we have state management in ASP.NET, ViewBag and ViewData are also used for providing the state management in MVC
Use of ViewBag and ViewData:
1 It helps to maintain data when you move from controller to view.
2 It is used to...
<-- Chapter 3: SQL Select
Chapter 4
SQL District
SQL District : District is a keyword which is used to fetch unique column values from database table OR we can simply say that ignores the column duplicate values. Syntax for district ke...
SQL(Structured Query Language) is a computer language used for storing, retrieving and management of data in Relational Database Management System(RDBMS).
The commands of SQL can be categorize into following categories :
1. DDL : DDL stands for...
Repository in MVC project is used to store and perform the crud database operations.
It is folder in which there is class file that contains definitions of functions performing the operations
So we are explaining the fun...
FormCollection class in MVC is used to send or retrieve form data from one view to another.
Using this you can access every element of your form means all the controls
Form collection is the collection of all the object that we use ...
Hello readers, today I will guide you to "remove <p> tag and <br> tag in default WordPress editor in admin panel".
In WordPress editor its a default functionality to add <p> tag and <br> tag. While creating a new post, ...
Hi All,
In this blog we will discuss about the async attribute is javascript, which is a boolean type of attribute that's either can be true or false and when ever we use this attribute to any script tag, it simply denotes that the available s...
Hi Reader's,
Welcome to FindNerd, today we are going to discuss what is process to convert string into an array using PHP ?
If you want to convert a string into a array then you should use str_split() function
let us know how it is works ...
In the design page if you want to add libraries for script files and CSS files so for doing that in MVC architecture you need to use two tags :
1 Styles.Render
2 Scripts.Render
Style.Render is used to add bundle of CSS files. S...
Sometimes we need to check how many duplicate values a column has in MySQL table. We can do this by using "group by" and "having".
Example: Suppose you have a table "user" with "fist_name" column from which you want to find all the records w...
The below code will help you to to change the site wide validation required marker as well the hover text. Though there are various approach you can do but this is one of the massively used approach.
Go to Drupal Root Folder->includes-&...
In Ruby it is possible to send a Hash as an argument to a method.
Suppose we have a method named conversion_method which has 4 default parameters(a,b,c,d). ex:-
2.1.5 :086 > def conversion_method(a:10, b:20, c:30, d:40)
2.1.5 :087?&g...
Hi Reader's,
Welcome to FindNerd, today we are going to discuss what is process to unzip a file uisng PHP ?
If you have a zip file and you want to unzip the file with php, then you should use zip_open().
This is very simple and useful f...
Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to use json_decode() function in php ?
So, Firstly let us know what is the use of json_decode() function ?
So json_decode() function is basically used for converting JSO...
Sometimes we have the requirement to count how many unique values are in the table. We can do this by using "Distinct" and count().
SELECT COUNT(DISTINCT column_name) FROM table_name;
Example: Suppose you have a table user from which you ...
There are some applications that requires user location when they are launched for the first time. The application requests to accept or reject the location. A popup appears and it should either be accepted or rejected. Its very difficult to loca...
Hello Everyone, today we will learn about "How to Check Unique visitor counter in your website".
There are many ways to check the user list who navigate your website, like Google Analytics Plugin in Wordpress etc.
With Google Analytics Plugi...
In this post we have learner how to enable contact us page
This form will always send email to the particular listed recipient email id's . But What if you have different departments in your company and each department want to use this con...
Welcome to FindNerd. We are going to discuss the in-build functions reset and each. each works like a loop. It returns the current element and move the pointer forward.
reset moves the pointer to first element. Please have a look.
<?php
$...
Enable Contact US Page
Contact Us page is a core module of Drupal 7, provided with the fresh copy of Drupal installation.
You need to enable the contact module to make it work.
Go to the module page
Search for contact ...
Hello friends,
If you are using the amazon S3 bucket to store the files and want to fetch the list of stored files list from terminal with respect to added time in bucket, means if you want to get the newly added items list from amazon bucket ...
Welcome to FindNerd. We are going to discuss the in-build functions in php to handle the pointer of the array. You can easily get the current pointer of the array by
using current() function, next function will advance the pointer of the array ...
When a sub class inherits the properties of super class , then we can override the method of super class. This will acquire the properties of super class but can define its own behaviour.
In general way, we can say the overriding means to ...
What is Smoke Testing ?
Smoke testing is a testing approach which is stimulated for hardware testing. In this testing we verified for the smoke with the hardware elements when we activated hardwares power. correspondingly in the software testi...
Hello Readers ,
If you want to post the form but do not want to refresh the browser then the best approach to follow by using AJAX call .
Following is the HTML and Jquery code.
HTML:
<form id="foo">
<label for="bar">A...
If the length of results is greater then the value if the max_allowed_packet system variable then the String-valued functions will return NULL
The first position of a string (for those functions which operate on string), is numbered 1.
Non-...
If i have a User object say user, i.e
>> user = User.find(1)
=> #<User id: 1, login: "james.warner", email: "james.warner@evontech.com",created_at: "2013-11-18 07:12:45", updated_at: "2014-02-03 10:51:02", designation: "Programmer...
If you want to add some extra features in your report you can like below feature
Twitter Bootstrap and FontAwesome classes can be used in your report template
Local CSS can be put directly in the template
You can insert a Global CSS in th...
Barcodes use in Point of sale module which indicates the product sequence number to stocks and warehouse management and Barcodes are images returned by a controller and can easily be embedded in reports thanks to the QWeb syntax: For example code...
If you want to translate reports then you need to define two templates:
1-The main report template
2-The translatable document
And follow the follow the following step in given below->
you can go to Settings Reports Report Search...
Field edition in odoo which is specific to a record should be saved on that record, soFor record fields, templates can use a special t-field directive which allows editing the field content from the website using field-specific interfac...
With the help of accessing data fetch the records from the database instead of having a static list and after that we can search() returns a set of records matching the filter.for example you can see below code and use in .controller.py file...
Demonstration data is the most important data in odoo-9 so it's possible to test it easily. This is done by adding a demodata file, which must be linked from the manifest. For example you can see below code .
<openerp>
<dat...
Hello Reader's If you want to know more about the PHP JSON Object then this blog will helps you. Lets see how to handle the working data of it.
<?php
$trends_url = "http://search.twitter.com/trends/daily.json";
// initialise the sessi...
Hello Readers! if you want to replace all the sepecial charracters from a string and replace white space by hyphen '-' then the code below will help you to learn:-
first we will replace all the white space with hyphen "-" from the string
fu...
Hello Reader's If you want to get all elements in the combinations then you can use PHP code to generate it.
Lets see the example as below:-
function pc_permute($items, $perms = array()) {
if (empty($items)) {
echo join(' ', $p...