Handling Duplicates using INSERT IGNORE

INSERT IGNORE: INSERT IGNORE is used for handling duplicacy in a table as it ignores the query if the data is already present in the table and if the data does not exist then new row will be inserted. Syntax: INSERT IGNORE INTO tablename...

How to restrict the file type to be upload using PHP

Hello Reader's If you are uploading the attachments with only selected file types then you have to use inarray function. Let's see the example as below:- Put the allowed types in an array and use in_array(). $file_type = $_FILES['foreign_...

How to list the visitor to your website using PHP

Hello Reader's if you want to know the users which are accessing your website then you can get them by their IP. Lets see the example as below:- Try this simple PHP function. <?php function ip_info($ip = NULL, $purpose = "location", $...

How to make PHP page as an image in return

Hello Reader's If you have to return a image from PHP page. then you can use the code as written below:- <?php // open the file in a binary mode $name = './img/ok.png'; $fp = fopen($name, 'rb'); // send the right headers header("Cont...

How to create coma separated string from an array

Hello Reader's if you have an array and you want it to converted into string with separated by coma then by using PHP you can do this as follow:- You have to use Implode function $arr = array(1,2,3,4,5,6,7,8,9); $string = rtrim(implode(...

How to get the name and details of function being called by PHP

Hello Reader's! if you want to get the name of function and method being called, Then by using PHP you can do this as explain below:- Lets's see the example as below:- We use the info provided by a php exception, it's an elegant solution: fu...

How to send email using Wamp server in PHP

Hello Reader's If you are working on your local host and not able to send the email then by configuring your WAMP server you can send email. Let's see how it is done:- First just install Fake Sendmail (download sendmail.zip). Then configure ...

How to pass a variable in jQuery from PHP

Hello Reader's! If you want to send variables from PHP to jQuery then you have to use the selectors:- Lets's see the example below:- This you have to put in the bottom of php page with the selector is "input[type=checkbox]" $("input[typ...

How to select images from database and show on page

Hello Reader's! If you have stored the image in database as blob. Then you need a php code to retrieve them and a html page to show them. Lets see an example below how to show them First create a php page getImage.php and code as written below...

What to you mean by variable $this mean in PHP?

Hello Reader's! If you have any doubt with the $this in PHP then you can see the example as below:- <?php class Person { public $name; function _&#95;construct( $name ) { $this->name = $name; } }; $t...

How to remove extra white spaces from string using PHP

Hello Reader's! if you are dealing with excess whitespace on the beginning or end of the string then you can use trim(), ltrim() or rtrim() to remove them. Also If have to delete extra spaces within a string consider a preg_replace() of multiple ...

How to dynamic generate password in PHP

Hello Reader's If you want to genrate password in PHP then you can use the code as below:- you just have to try this, use strlen instead of count, because count on a string is always 1:- function randomPassword() { $alphabet = 'abcdefg...

How to unlink a directory by using PHP

Hello Reader's If you want to delete a folder and all the files in it then by using PHP recursive function you can do it. Let's see on example as follows:- Before deleting the folder, delete all it's files and folders (and this means recurs...

How to get dates between two given dates in PHP

Hello Readers's if you want to get a recursive set of dates between two given dates, For example 10-12-2105 to 19-12-2015 there are 9 days all will have different dates. By using PHP you can get this as using the code below:- $startTime = st...

Difference between include and require in php

Hello Reader's If you are new to php then you must have to understand the difference between include and require, Lets see some of major difference between them. Using require means your script will halt if it can't load the specified file, an...

How to adjust height of animated GIF file using PHP

First of all you just have to create 3 folder name 1.frame_output 2.images 3.resized_frame_output Now download encoder and decoder class from this below link here. And Download class "GIFDecoder.class.php", Download class "GIFEncoder...

How to convert Image into base64 encoding using PHP

Hello Reader's! If you want to to encode an image with base64 then by using PHP you can do such. You can use the code as below:- This method is very simple and commonly used: function getDataURI($imagePath) { $finfo = new finfo(FILEI...

How to delete characters which can not be printable

Hello Reader's if your page is generating some non readable characters that are not able to print then by using PHP you can remove them as follows:- Many of the other answers here do not take into account unicode characters (e.g. ). In this c...

How you can set multiple checkbox in an array using PHP

Hello Reader's if you want to send the checkbox in post for this you have to pass the form name as an array and afterwards you can access all checked boxes using the var itself which would then be an array. Lets consider the example below:- &...

How to fix HTTP header to UTF-8 using PHP

Hello Reader's If you want to set the HTTP header to UTF-8 then html will itself allows you to convert it. But if you want it to be wrap by using PHP then you can use the code below:- You just have to use header to modify the HTTP header: ...

How to get the text matter from a given PDF using PHP

Hello Reader's, If you want to write a program that takes the matter from a given PDF then now you can use many libraries. These are well function performing and easy to use. Lets see an example below:- Download the class.pdf2text.php from he...

How to get all folders in a given folder using PHP

Hello Reader's! If you want to get all of the folder inside a given directory then PHP offers you many ways to do that, Lets see them from the basic programs. you can use glob() with GLOB_ONLYDIR option here's how you can see how to retrieve...

Difference between PHP $_SERVER['HTTP_HOST'] and $_SERVER['SERVER_NAME']

Hello Reader's! In working PHP you might have seen the two common syntax $_SERVER['HTTP_HOST'] and $_SERVER['SERVER_NAME']. They share similar name but they work different. $_SERVER['SERVER_NAME'] gives the value of the server name as defin...

How can you enrich your leadership practice?

Leadership/supervision practice follows the elementary concept that a lot of people say: practice makes practice. How can you enrich your leadership practice? Read books:- There are probably multiple of books on leadership/supervision publi...

Useful PostgreSQL Command

Some Useful PostgreSQL Command in below example-> Backup database- pg_dump -U geekstuff erp -f mydb.sql Restore database- psql -U erp -d erp_devel -f mydb.sql Change owner of database- ALTER DATABASE erp_v1 OWNER TO openerp; ...

Inheriting from mulitple class inOpenERP

If you want to Inheriting from mulitple class in OpenERP/Odoo use below mentioned example. class sale_order(osv.osv):   _name='sale.order'   _inherit=['sale.order','order.status']  class purchase_order(osv.osv...

Best Online Marketing

Best Online Marketing:- Everyone wants the conclusive list of the best online trade that myself and other top score online marketers use to stream line their work line, expand traffic & efficiency, Make more profits and many many more. You...

Setup New Chart of Accounts in an Existing OpenERPConfiguration

If you want to Setup New Chart of Accounts in an Existing OpenERP Configuration in Odoo-9 follow below mentioned steps. 1. Change Deferral method to None of all Account Types 2. Rename code of existing Account Types. 3. Import your new A...

Playing a YouTube Video in HTML

To display a youtube video in your web page, you have to use an id (like XGSy3_Czz8k) that will be displayed by the youtube when you save (or play or share) a video. You can use this id, and embed your video in the HTML code. Following are t...

Creating Views Dynamically inOdoo-9

The views in Odoo is done using .xml file. But there are many cases or situation where we are not aware about the exact layout of the form or the total number of fields to be displayed. It varies with users choice. The fields_view_get() function...

How to start with IOS Application testing via Phonegap?

As a beginner in iOS apps, the main focus should be understanding the scope and limitation of phonegap compared to native platforms. Especially for keyboard, calendar selection etc.you will not get same keyboards as we have in native apps. ...

sessions in cakephp

Session component provides a way to persist the data between HTTP requests. We can put any value to name and by this way we can write the session. SessionComponent::write($name, $value) $this->Session->write('User.fruit, 'apple'); ...

Comparison of using File System vs Database for storing large amount of files

In the below artice we disucss the pros and cons of using File System vs Database for storing large amount of files: Following are the problems associated with storing files on file system: 1) Using file system for storage leads to fragmen...

SQl Server : How to insert results of a stored procedure to a table?

In the following article we will learn how to insert results of a stored procedure to a table. There are two approaches to do this depending on whether we know the table schema beforehand or not. We will be using the following stored procedure t...

What is jquery append() method?

Hello Readers, append() is the jquery method and is used in jquery to Add elements to the end or after the completion of text in jquery of the selected elements. Syntax : selector.append( content ) Parameter : content this par...

Leadership Building a High Performance Culture

The main motive of understanding your organizational specification is to build a strong, vibrant culture which is the key to achieving long-term organizational success. Who you are and what you stand for is as important as what you sell or wh...

c# : How to use ThreadPool.QueueUserWorkItem ?

In this post we will see a simple code example which illustrates how to use the ThreadPool to queue up tasks in a multi-threaded environment. We first need to create an object that contains information required for the task. This object will be ...

what is fadeIn() in jquery?

Hello Readers, jquery fadeIn is the jquery method which is used to fade the hidden element or the jquery matched element. Syntax : $(selector).fadeIn(speed,callback); Parameters : Speed : this is a optional parameter which specif...

SQL Server : How to fetch records in one table that are not present in another table?

In this article we will see how to fetch records in one table that are not present in another table. First let us create two tables which will be used for illustration purpose: CREATE TABLE Table1 ( ID INT ) GO CREATE TABLE Tab...

parseFloat() function in JavaScript

JavaScript parseFloat() function : The parseFloat() function is used to get the floating point number from a passed string. It first parse the string and then return the number as a decimal number. Syntax of parseFloat() function : parseFl...

Importance of Stability of QA Team?

Stability is very important. At the same time it is hard to control. Team members learn a lot over the period of time in a clients project. Not every detail (lesson learnt) is documented. The team members know the pattern and the rhythm at which ...

Optimize Your Website Images with SEO Alt Tag Implementation

When you are working as a SEO specialist, then you have a challenge to make each and every component of website optimized as per the guidelines defined by the search engine. So for this ...

How to make ViewFlipper in android

In the below example i have created ViewFlipper function. Here I have used ViewFlipper attribute in main.xml layout. ViewFlipper can be used to slide views in and out on the users current view port. I have used two buttons When we will click next...

Significance of Workflow Reassignment in MDM

Workflow Reassignment describe the data changes through the defined workflow and track which change is in what status. Workflow Reassignment enable business users, data stewards and data owners to author and validate master data in the MDM hub...

decodeURI() function in JavaScript

JavaScript decodeURI() function : The decodeURI() function is used to decode the encoded URL. Syntax of decodeURI() function : decodeURI(uri) uri : Required. This is the encoded url which need to encode. Example of decodeURI() ...

How Metadata can be Managed?

Metadata Management:- There are a few guidelines of creating meta data. We must see that tags that we create should be inside the if it is a webpage. Also we need to provide meta data in pairs of name and values. Meta data is of two types,...

SIF Authentication test using SoapUI

You can test the SIF Authentication API using SoapUI. WSDL link for Generic API will be http://MyHostName:MyPortNo/cmx/request/wsdl/ . Create a project in SoapUI and this WSDL link to it. Expand the project and open authenticate method and doubl...

What is Meta Data?

Metadata Definition:- In easy words if we say, Metadata is Data about Data. So why do we need data about data? Take this scenario specially when we are dealing with enormous amount of data. For example there is a company in retail business...

Call Server Side Methods Using Page Method

We all know about the jquery Ajax which is a most popular and widely used methods to make server side calls from client side. ASP.NET provides an easier approach to make server side calls from client side using Page Methods. Below is the d...

Sample Query to fetch matched record from BO

Using the below query you can retrieve the records from the BO in which you execute the Match Job(manual merge) and to determine which records matched with other. select distinct(finalquery.src_rowid), finalquery.party_nm, finalquery.PARTY_...
1 171 292