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…

Salesforce | Email workflow created on custom object throwing error while fetching the Related Contact Id

Author - Webner
|
0 Comments
|

In one of our Salesforce projects we are working on, we had a custom object with an email trigger that was supposed to send email to the Related Contact. When we clicked the email button to trigger the email sending process, the Related Contact Id was not passed to the Read more…

Salesforce | Different ways to use datepicker on visualforce page

Author - Shalini

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&gt Read more…

Salesforce | Show Email sent from Salesforce in activity history

Author - Webner
|
0 Comments
|

Problem : How to show Email sent from Salesforce in activity history of an object

Solution : Here are the steps :

1. Set WhatId

2. Make SaveAsActivity true

Code Sample:

Messaging.SingleEmailMessage emailTobeSent = new Messaging.SingleEmailMessage();
List ToAddress = new List();
ToAddress.add(‘Example@gmail.com’);
emailTobeSent.setToAddresses(ToAddress);
emailTobeSent.setSubject(‘Subject);
emailTobeSent 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
|
0 Comments
|

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…

Salesforce | Show picklist field value of custom object on Visualforce page

Author - Webner
|
0 Comments
|

We can show the picklist field value on Visualforce page in a selectlist ( dropdown) using the following code in the controller class:

public class classname
{
public List functionName
{
get
{
List options = new List();
Schema.DescribeFieldResult result = ObjectName.FieldName(pick list field name).getDescribe();
List pick = result.getPicklistValues();

for( Schema.PicklistEntry Read more…

Linux | How to grep only uncommented contents from any configuration file

Author - Navneet Kashyap

Problem : How to grep only uncommented contents from any configuration file which is big in size, has many comments and blank lines

Solution: This can be achieved by following single command :

# grep -v ‘^$’ /etc/httpd/conf/httpd.conf | grep -v ‘^ *#’ | less

Explanation of command :

^$ : Matches and removes all blank lines 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…

Zoho | Create Zoho Subscription using the PHP and subscription API

Author - Webner

We can create new Zoho Subscriptions via code by using PHP curl and with the help of Subscription APIs.

Below is the sample code which is required to create a subscription:

$headerArray = array(“Content-Type: application/json;charset=UTF-8”,
“X-com-zoho-subscriptions-organizationid: 00000000”,
“Authorization: Zoho-authtoken ——–Auth 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…

Moodle/ Totara | Page api to get activity details for particular activity

Author - Kritika Sood
|
0 Comments
|

In one of our Totara theme projects, we wanted to hide default breadcrumbs and show our own breadcrumbs on activity page like columns 1, columns 2 or columns 3. To get the activity details for a particular activity, we can write custom queries but as there were multiple activities like Read more…

Salesforce | Split function on some special characters like (.) does not work in apex

Author - Webner
|
0 Comments
|

Description: Using a Split function over some special characters like ‘.’ is bit ambiguous, As Apex does not recognise these characters to be part of the splitting string.

For Example: //this will fail reporting a size of 0
string s = ‘first.second’;
string[] part;
part = s.split(‘.’);
System.DEBUG(part.size 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…

‹ Prev page1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 Next page ›
Send your message