Jquery | DataTables warning: table id – Cannot reinitialise DataTable

| By Webner

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 ({“aoColumns”: [ { “bSortable”: false },null,null,null ] }); “DataTables warning: table id=product-data-table – Cannot

Salesforce | Sort “wrapper class” objects alphabetically based on a String parameter

| By Webner

Suppose we have a Wrapper class with fName as a string instance variable and we want to sort a list of objects alphabetically based on value of this variable. Implement Comparable interface global class MyWrapperclass implements Comparable { public String

Salesforce | Different ways to use datepicker on visualforce page

| By Webner

1. Apex:inputfield: We can simply use apex:inputfield and bind the field with date type field and it will automatically use the Salesforce Calander: <apex:page standardcontroller=Contact> <apex:form> <apex:inputfield value=”{!Contact.Birthdate}”> </apex:form> </apex:page> 2. Apex:inputtext: <apex:page standardcontroller=”testcontroller” id=”vfPage”> <apex:form> <apex:inputText label=”Birth Date” value=”{!birthdateVariable}”

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

| By Webner

To check if a file or folder already exists on Amazon S3 Bucket, use the following code Code: $info = $client->doesObjectExist($bucket, $FileName) if ($info) { echo ‘File exists’; } else { echo ‘File does not exists’; } Webner Solutions is

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

| By 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 update If everything