Business Website

Jquery | DataTables warning: table id – Cannot reinitialise DataTable

Author - Webner
1 Comment

If you try to set properties of Jquery datatable 2 times as below, it will give an error:

table = $(‘#product-data-table’).DataTable({stateSave: true}) ;

table = $(‘#product-data-table’).DataTable
“bSortable”: false },null,null,null

“DataTables warning: table id=product-data-table – Cannot reinitialise DataTable”.

DataTables does not allow Read more…

Safari downloading files in .csv.html format | Workaround

Author - Webner


In one of the software we are developing, we faced a strange problem in Safari browser on Mac machine. A link on webpage was provided to download a file in .CSV format (server side code written in CakePHP). In Safari, downloaded file was being given the extension Read more…

PHP | Amazon S3 | Check if a file or folder already exists on Amazon S3 Bucket

Author - Webner

To check if a file or folder already exists on Amazon S3 Bucket, use the following code

$info = $client->doesObjectExist($bucket, $FileName)
if ($info)
echo ‘File exists’;
echo ‘File does not exists’;

Webner Solutions is a Software Development company focused on developing CRM apps (Salesforce, Zoho), LMS Read more…

AWS S3 | How to get the count of files in a folder in AWS S3

Author - Kiran Preet

There was a task in which we were required to get each folder name with count of files it contains from an AWS S3 bucket. If we used the general approach to start a counter and increment that in a foreach loop we were getting the exact count of files Read more…

Upgrade to php 5.6 and apache 2.2 to apache 2.4.17 in ubuntu 12.04

Author - Webner

These are the steps to upgrade to PHP 5.6:

Add the PPA containing version 5.6 of php for Ubuntu 12.04:
sudo apt-add-repository ppa:ondrej/php5-5.6
sudo apt-add-repository ppa:ondrej/php5
Run these command in terminal to upgrade php :
sudo apt-get Read more…

PHP | Send mail through Gmail SMTP server and phpmailer

Author - Tanuj

We have mail() function to send emails in PHP. It uses built in sendmail command that uses local mail server to send emails. PHPMailer, on the other hand, is very different. Rather than relying on sendmail, it communicates directly with the SMTP server and relays the mail itself.

One of Read more…

Does Java support call by reference?

Author - Webner

Java does not support call by reference because in call by reference we need to pass the address and address are stored in pointers. Java does not support pointers and it is because pointers break the security. Java does manipulate objects by reference and all object variables are references. Pass Read more…

Selenium | how to upload a csv file with Selenium script

Author - Namisha

In this post I will give an example of how to upload a csv file with Selenium script to a webpage. Below is the screenshot of webpage:

Code to automatically select a csv file and then click Submit button is given below. Go through the comments in the code.
package Read more…

How to show slanted text and images using CSS?

Author - Parminder Kaur

Slanted text and Images in CSS for different browser is given by transform property in CSS. We need to specify the angle by which to slant the image or text. Angle can be negative or positive. Positive angle inclines the image in clockwise direction and negative angle inclined it in Read more…

PHP | Load Data Infile to insert csv data into Mysql with PHP

Author - Webner

Problem: How to insert csv data into mysql table with mysql query in php. What problems usually you face with this and how to resolve them.

Description: I have csv file with thousands of records. I want to insert these records in mysql table with php Read more…

CSS | Animate elements in background screen

Author - Neelam

We can move elements on background screen using CSS properties.

Below @keyframes rule specifies the animation code and “movement” gives a name to the animation:
@keyframes movement {
0 % {
background – position: 0 px 0 px,
0 px 0 px,
0 px 0 px
50 % {
background – color: #FFA07A
100 % {
background – position: 500 Read more…

Java | difference among return, continue, break and System.exit in Java

Author - Webner

Question: What is the difference between return, continue, break and System.exit statements in Java?

Answer: The differences among these 4 statements are described here Read more…

Selenium | Data Driven Framework to read csv data

Author - Webner

During testing, I had a test case to add multiple employees automatically with selenium script so I have implemented Data Driven Framework. Using this we have to read the data from the CSV and register all the users in the system.

Note:  We need to add a jar Read more…

Eclipse SVN | Working Copy XXXX Locked during commit

Author - Webner

When you do svn update or commit in Eclipse you may face this problem- “working copy xxxxx locked”

Solution: Sometimes the problem can be solved with “project cleanup” or “move the project to some other location without .project and .svn files”. But you may have to solve it Read more…

Enum in Java

Author - Richa

What is Enum/Enumeration?

Enum/Enumeration is a data type in Java which is used to store a fixed set of constant values. For example, number of days in a week or a set of arithmetic operators (addition, subtraction, multiplication and division) or status of a customer’s bank account Read more…

Java | Deep cloning object containing list of other objects

Author - Harleen Kaur

Suppose you have a class like this:
public class Student {
private String name;
private int rollNumber;
private int grade;
private List subjects;

This is the Subject class

public class Subject {
private String sName;
You have an object sObj1 of Student class and it also contains a list of subjects assigned Read more…

Hadoop | Creating and running Mapreduce Programs in Eclipse and from Command line

Author - Webner

We can create and run the java Mapreduce programs in Eclipse as well as from command line.
Using Eclipse – For Eclipse first we have to install the plugin for hadoop mapreduce which inherits the libraries required to implement the mapreduce functionality. After this we have to build the path which Read more…

Java | static blocks

Author - Webner

Static Blocks: Static block is used to initialize the static data members. It is executed before main method and constructor at the time of classloading. A class can have any number of static initialization blocks and they can appear anywhere in the class body. The runtime system guarantees Read more…

Java | Variables in Java Interfaces

Author - Webner

In Java we have a concept called interfaces.A Java interface is same like a class, except a Java interface cannot contain an implementation of the methods, we have only signature of the method.It has static constants data member.

Can interfaces contain variables?
Yes, Interface can contain only Read more…

Lambda Expression in Java 8

Author - Neha Mishra

A lambda expression is a new feature that has been added to Java 8.
It is a function declared inside a method to which we can pass arguments as well as fetch lambda expressions in the form of return value of a function.

This feature is a way to Read more…

1 2 3 4 5 6 7 8 9 10 11 Next page ›