Multuple deletion in Mysql using PHP

Hello Reader's If you want to handle your html form to delete multiple value at once then by using Check box in array you can do it. lets see one example as below:- <?php $sql = "SELECT * FROM guest_book"; $res...

How to get current unix timestamp in PHP

Hello Reader's if you want to get the current time stamp of Unix in PHP, Then PHP offers your to use this by getTimestamp(). Now let's see this in the example below:- <?php $date = new DateTime(); echo $date->getTimestamp(); ?> ...

How to find elements from the group array in PHP

Hello Reader's! if you have set of arrays and you want to get all of them seperatly then the code below will help you. Let's say if you have [ [a], [b], [c], [a, b], [a, c], [b, c], [a, b, c] ] and you want this [a,b,c] The c...

Find day difference without weekends in php

Using php we can easily find difference in days excluding weekends. First take start date and end date and generate strtotime for these dates to convert into string. After manipulation using while loop we can easily get the count of week days exc...

Find routes between two points in google map

We can easily show the route which contain all stops including start point and end point in Google map. So to find stops we need to create markers json string contains all the stops with their latitude and longitude including start point...

BIT_LENGTH function mysql

BIT_LENGTH(str) BIT_LENGTH function returns the length of the string str in bits. for example, the bit length of text is 32 and hello is 40. mysql> SELECT BIT_LENGTH('text'); +--------------------+ | BIT_LENGTH('text') | +--------...

BIN (N) string function mysql

String-valued functions return NULL, if the the result's length would be greater than the value of the max_allowed_packet system variable. The first position of a string (for those functions which operate on string), is numbered 1. Noninteg...

Multiple data base connections in codeigniter

We can create multiple database connections easily by providing second database information in application/config/database.php. Normally we already set the default database group which is by default. Like this $db['default']['hostname...

redirect non-www to www url string using htaccess

There must be a situation where we need to redirects all non www requests to www. We can easily redirect user from non-www to www url string using following ways. for example , if a user makes a request for http://mysite.com/param1/param2, so wit...

What should be the process of testing ?

Many people have an idea that testing is not a mandatory task for an application which is in development or has been developed but I think that testing equally plays the same roles as development in the successful launch of the application. If th...

Websites Creation & WordPress Themes?

The list of these web hosting providers looks a bit long? It should be... There are a ton others and the ones listed here serve different purpose plus have different plans and pricing. The good thing is we know about these guys and you'll be in g...

Load view into another view in codeigniter

We can load view into another view in codeigniter by creating a helper function and place the following code. function loadView($view,$data = null){ $CI = get_instance(); return $CI->load->view($view,$data); } Next in ...

Use of LIKE in MySQL

This article explains how to use LIKE operator to get data from MySQL table based on pattern matching. The LIKE operator used with WHERE clause of SELECT, UPDATE and DELETE statement which search for a specified pattern in a column. In MySQL L...

ASCII(str) String Function MySQL

String-valued functions return NULL, if the the result's length would be greater than the value of the max_allowed_packet system variable. The first position of a string (for those functions which operate on string), is numbered 1. Noninteg...

how to create filter in openerp?

To create a filters in OpenErp, First install product module and inherit view of product module and use filtering for particular fields and create filter in your own module. For example use this below code in .xml file <record id="rent_p...

password encryption in joomla

Joomla password are stored in database in the form of hash and salt such as {hash}:{salt} where salt is a random string which contains 32 characters in length. Joomla password are salted before making password hashed.So we can create password i...

Drupal User Related Some Useful Links

Direct link to user login page By default, the Login Page Form can always be found at: http://www.mysite.com/?q=user. Direct Link to User Registration Page http://www.mysite.com/?q=user/register. Direct link to Request Password Form ...

Kanban view in Odoo-9

Kanban view defined as A kanban view shows a set of cards possibly grouped in columns it is important for odoo module to describe xml functionality. For example you can see below code which is use in .xml file. <record model="ir.ui.vi...

What is jquery before() method ?

Hello Readers, jquery before() method is the opposite of jquery after() method and it is used to insert the given content before the specified of each selected content or elements in jquery. Syntax : $(selector).before(content,function(...

Waht is a functional field and how to calculate it's value

A functional field is a field whose value is calculated by a function in openerp, hence in openerp functional fields values is calculated by the function and its process of function given below, Parameters: fnct, arg=None, fnct_inv=None,...

jQuery clone() Method

The clone() method is used to make clone of the elements that are matching to the selected elements and select the clones. It basically makes copies of the selected DOM element to some other place in the DOM. Syntax: selector.clone() ...

What is Webhosting & Domain Services?

Web Hosting services are the ones that provide the service that assists restore your website's files. There a number of them present out there, But here you'll find the only FEW & faith one with everything you need. Speed, Quality support. Re...

Create new helper in codeigniter

Helper in codeigniter is not a php class but it is a function which is existing in helper file. Create a file with the name of your helper in /application/helpers here name as myhelper.php and place the following code in that file. function ...

Touch events in javascript

There are following Touch events in javascript:- touchmove - this event triggers when the touch point is moved by the user across the touch surface. touchstart - this event gets triggered when the user makes contact with the touch surface...

Use of TimeStamp while reset password

While resetting password there is a need to prevent links to reopen again. For doing that you need an expiration check to validate whether link is in used state or not So you need to store the current date time while sending the link to the us...

What is jquery after() method ?

Hello Readers, jquery after() method is used to insert the given content after the specified each selected content or elements. Syntax : $(selector).after(content,function(index)) content : this is required parameter which specifie...

Remove index.php from url in codeigniter

We can easily remove index.php from url in codeigniter with the help of htaccess file. We only need to place the below code in htaccess file. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d Rewrite...

Separate a column value into 2 column in MySQL table

Hello friends, I am here to share a issue which I faced once, That is I want to separate a columns values into 2 columns. So if you are also looking to separate a columns value into 2 columns, You can use following syntax- UPDATE your_tab...

CSRF with Spring and AngularJS

In this blog, We will see how to configure CSRF protection and how to make AngularJS allowed to send information with a CSRF token to the server. In AngularJS, $http service reads a token from a cookie which is named by default XSRF-TOKEN and se...

snow fall effect using pure css

Hi all, Below is an example of snow falling effect using pure css3. in this example I'm just using css animation and change the snow image position - css #snow{ background: none; background-image: url('snow.png'),url('snow2.png'...

Create user friendly url using htaccess

WE can create user friendly url using url rewriting with the help of htaccess file. It helps to make URLs with duplicate content should have canonical URLs specified for them. Also beneficial for search engine optimization(SEO) for url crawlin...

push() method of JavaScript Array

JavaScript Array push() method : The push() method is used to add new element in the array. The push() method add the new element at the end of the array. The push() method returns the new length of the array. Syntax of Array push() method...

what is jquery apppendTo() method?

Hello Readers, appendTo() is the jquery method which is used to insert the any HTML elements at the end of the given selector as a parameter into the appendTo() method. Syntax : $(content).appendTo(selector) Parameters : content...

CSRF configuration in Spring

In this blog, I am going to explain how to implement Cross-Site Request Forgery protection in Spring. No need to worry to enable CSRF in Spring. Spring Security comes with CSRF enabled. And if required we can disable it as well. Although disablin...

die() function in PHP

die() function is error handling method in PHP which used to handle a error in web application. It's also used to check whether the function is work properly or not. <?php $file=fopen("myfile.txt","r"); ?> If myfile.txt file does ...

Manage menu items visibility in fragments

Creating menus in activities is a good choice but what would be if we are creating menus in each fragments ? Basically a fragment depends on Activity life cycles and its parent activity features so if you want to create different different men...

Creating dynamic CSS styling

Basic ideas behind dynamic theming In addition to creating templates that are displayed conditionally, the Drupal also provide us to apply CSS for specific conditions on any given page. $classes this variable aid dynamic CSS styling. Cond...

How to set check-box with a certain value checked in jquery?

To set a checkbox checked with a certain value we use a function prop() with the attribute selector. $('selector').prop('checked', true); For example: <input class="chkbox" name="ex[]" type="checkbox" value="0">0 <input clas...

What is $this->HTML->url and $this->HTML->link in cakephp

$this->HTML->url takes two arguments one is url containing routing array and other is boolean value which is either true or false.It returns a url which points to a combination of controller and action.It boolean value is true it prepend ...

Use of OFFSET in limiting data selections from MySQL

On selecting the data from MySQL if we are required to limit the data but also it is needed to start from some offset only not from the first record, then there we can add OFFSET in the clause of the query. Lets take an example where we requir...

What is jquery prepend() method?

Hello Redaers, jquery prepend() is the jquery method which is used to append or add the content or jquery elements at the BEGINING of the each selected or matched elements in jquery. Syntax : $(selector).prepend(content,function(index,ht...

Change Column data-type from VARCHAR to DATE

Hello friends, I am here for share the solution of a MySQL problem. If you want to change the data type of a column from varchar or any other one to date, you should need to use following query- UPDATE `tbl` SET `date1` = STR_TO_DATE(`date...

How to limit data in selections from MySQL

In PHP if we are working on database and it is required to limit the data we want from the select query we can do it by appending a clause in the query. This can be helpful in pagination etc in our page. Lets take an example in which we are re...

pop() method of JavaScript Array

JavaScript Array pop() method: The pop() method is used to remove the last element of the array. The pop() method returns the removed element. The pop() method changes the length of the array by decreasing one. Syntax of Array pop() method...

How to fetch request variable in Zend Framework

Hello Friends, If you are looking to fetch the request variable in Zend Framework like As a web-page get submit lots of variable posted through GET or POST method. If you want to fetch these variable in Zend Framework, please use the below cod...

How to send hashmap from one activity to another

HashMap is basically an implementation of map and this is not synchronized. HashMap basically contains key value pair data. From sending activity we can create and send hashmap value like this : HashMap<String, String> mHashMap= adapt...

Cakephp HTMLHelper

HTMLHelper is used to make html options easier and flexible.some are the HTMLhelper examples whciha re given below. HtmlHelper::charset($charset=null) is used to create a meta tag. echo $this->Html->charset(); HtmlHelper::css(mix...

Hide Soft keyboard in android

Below I am writing a method that will hide the soft keyboard in android. I just use hideSoftInputFromWindow() method of InputMethodManager in this method. public static void hideKeyboard(Activity activity) { //start with an 'al...

Switch from one application to another application at runtime in Appium

There are many times we have to switch from one application to another while in the middle of execution. In this case we have to switch to the second application and then perform some action and then again return back to the previous application....

How to use page redirection in Zend Framework

Hello Friends, If you are looking to use page redirection in zend framework. Like as you know we always need to redirect our web-page from one page to another webpage for example after successful record insertion in you always wants to redirec...
1 165 292