Business Website Archives - Page 6 of 11

LESS Introduction | Dynamic CSS styling

Author - Webner

LESS is an open source CSS pre-processor designed by Alexis Sellier in 2009. It is not exactly CSS but acts like one with the help of Javascript libraries that interpret the stylesheet and make it readable for browsers. The very first benefit of using LESS is that LESS is Read more…

Cookie messages on websites and cookie law

Author - Richa
|
0 Comments
|

Why some sites show cookies message (like this site uses cookies, do you accept?) – is it required, if yes then which body recommends it?

Many websites use cookie messages to store information which is required by them for fulfilling various purposes which includes storing user’s login information, saving passwords Read more…

How to create WSDL web service client using Maven

Author - Rita

Maven provides apache cxf plugin to generate web service client.
We have used below code in our pom.xml file to generate java artifact classes (web service client).

There are two ways to generate client code:

Using complete WSDL URL

Using WSDL artifact

1. Using complete WSDL URL Read more…

MySQL | Insert multiple records and update if record(s) already exist in a single query

Author - Ishpreet Kaur
|
0 Comments
|

In MySQL, we generally perform insert, update, select and delete operations on records of table. Multiple Insert operation can also be easily performed on table.

Take an example of Employees table with fields:

Multiple records can be inserted in Employees table in a single query using following MySQL query :

INSERT Read more…

Data Cleansing

Author - Webner
|
0 Comments
|

Data Hygiene or Data Cleansing or Data Cleaning – call it by the name you prefer – all point to the process of making the data better than it is before the process is applied. “Better data” means removing what is not required, fixing what is not right, restoring data correctness, and Read more…

Cordova/Phonegap | How to fix footer at bottom when virtual keyboard is opened

Author - Webner
|
1 Comment
|

Problem :

Footer is not visible or fixed at bottom, when virtual keyboard is opened in Phonegap/Cordova Application.

Solution :

Consider following div create for footer :

<div data-role=”footer” data-position=”fixed” class=’custom_footer’ data-theme=’b’ data-tap-toggle=”false”></div>

To keep Footer fixed Read more…

Netsuite | Invalid email address or account number error on NetSuite, but passed correct credentials

Author - Neha Mishra

ERROR: Invalid email address or account number error on NetSuite, but passed correct credentials.

Need to authenticate NetSuite sandbox account through java application and fetch all the contacts. Below is the link to the WSDL file used to log in:

Click here

But on attempting the login with Read more…

MySQL | Upgrade MySQL 5.5 to 5.6 in Ubuntu 14.04

Author - Webner

MySql 5.5 is the default version for Ubuntu 14.04

Steps to Upgrade the mysql-server

If you have existing database in Mysql 5.5. It should be migrated automatically.

Take the backup of existing databases:

mysql> mysqldump –lock-all-tables -u root -p -all-databases > backup Read more…

MySQL | Find if particular value is selected in multi pick list

Author - Webner
|
0 Comments
|

In simple pick list we can select only one value but in multi pick list we can select one or more values.

Scenario: We had to multi pick list data type field

Fields that we wanted to select :

1. Field_1
2. Field_2
3. Field_3
4. Field_4

Case 1 : Check if Read more…

PHP | Use Of strtr() function

Author - Webner

In PHP if you want to replace multiple variables of the string at one go you could use strtr() instead of using str_replace().

Example :

$vars = array(
‘##session_date##’=>$sessiondate,
‘##session_time##’=>$sessiontime,
‘##conferencelinenumber##’ =>$conferencelinenumber,
‘##pincode##’ =>$pincode,
‘##coachingcommnets##’=>$coachingcomments,
‘##actioncommitmnets##’=>$actioncommitmnets,
‘##reminders##’=> ‘ ‘,
‘##name##’ =>$name,
‘##breakline##’=>'<br><br>’,
);
$BODY=strtr Read more…

CakePHP | How to skip CakePHP authentication for some controller methods

Author - Rita

Description: By default, CakePHP authentication is applied to all application controllers. So it does not allow users to perform any of the action without login.

Solution: Each controller has a beforeFilter method which runs when some action is called from controller. Add below lines to your method:
Public function beforeFilter Read more…

Java | Delete empty string from list or array

Author - Webner

public class deleteEmptyStringQuick
{
public static void main(String[] args)
{
String[] emptyStringArray={“test”,”test1″,””,”test3″,””,”test4″};
ArrayList arrayListOfEmptyString=(ArrayList) Arrays.asList(emptyStringArray);

//normally we will do this
ArrayList filteredList = new ArrayList();
for(String string: arrayListOfEmptyString)
{
if(!string.isEmpty())
{
filteredList.add(string);
}
}

//You can achieve this with single line as well:
filteredList Read more…

PHP | Header function not working

Author - Webner

Code :
Function getredirect($subcontactid)
{
echo”contactid”.$subcontactid;
header(“location:https://subscriptions.zoho.com/app#/customers/$subcontactid”);
exit;
}

The header function in the above code does not work. But when we remove the echo from the code, it works properly.

Code after removing echo :
Function getredirect($subcontactid)
{
header(“location:https://subscriptions Read more…

Generate getter/setter for PHP Classes in Eclipse

Author - Webner

Using PHPGen Eclipse plug-in one can automatically generate getter /setter methods for instance variables.

Note: This Plugins is not available in Eclipse Marketplace.

Steps For Installation:

Start Eclipse and add “Help> Install New Software” from following URL: http://loge5.de/downloads/Eclipse/:

Click Add, enter http Read more…

Photoshop | Add audio to Gif animation in Photoshop

Author - Webner
|
0 Comments
|

Step 1. Click “Window” > “Timeline” to show the image sequence of animation.

Step 2. Go to timeline and click add audio.

Step 3. Select the desired audio you want to add in your .gif file.

Step 4. Select audio and click ok to import it.

Step 5. Adjust the audio Read more…

jQuery | Click event does not work on dynamically created HTML elements

Author - Ishpreet Kaur
|
0 Comments
|

Solution: Suppose we have the following HTML and jQuery code:

HTML:
<div id=”container”>
<button id=”1″ class=”createNewElement”>Button</button>
</div>
jQuery:
$(‘.createNewElement’).click(function(e)
{
alert(“Element with id ” + $(this).attr(‘id’) + ” is clicked!”); // tells id of button clicked
newElementId Read more…

Maintaining record history in database

Author - Webner
|
0 Comments
|

When you are building a web-based multi/single tenant system or a desktop system which has a database at its backend to maintain records, keeping the history of records proves to be very useful in the long run from information and security perspectives. History of records means keeping track Read more…

Java | Configure Tomcat as a service on linux

Author - Navneet Kashyap

Configure Tomcat service in Linux:

These instructions are related to installing and running Tomcat 7 as a service, which means that it will be launched at system boot and will be closed properly on system shutdown.

Running tomcat as a service in Linux:

For security reasons, you should not run Read more…

How to use SimpleSAMLPhp as a Service Provider for authenticating users?

Author - Ishpreet Kaur

How to use SimpleSAMLPhp as a Service Provider for authenticating users? Some Basic steps to start using simplesamlphp.

1. Download stable version of SimpleSAMLphp from this link:

Click here

2. Go to the directory or your workspace where you want to install simpleSAMLphp, extract the zip file. Give Read more…

CakePHP | Using Elements for common code

Author - Rita

Problem: How to separate redundant piece of code from your view using cakephp 3.0.

Description: Let’s take an example. You have a list of products to display. We show products at many places such as

1. Show all products.

2. Show products of the specific category.

3. Show Read more…