Cakephp 3.0 | Steps to create theme controller

Author - Rita

Description : Cakephp 3.0 provides a way to display different front end view for different clients using Themes. Theme is a plugin which follows the same structure as other cakephp plugins. Before Cakephp 3.0 it was only used to separate front end view for the clients. But in Cakephp Read more…

Add buttons to ACORD forms, submit ACORD form to a webservice

Author - Webner

ACORD pdf forms are editable. We can not only fill data in existing input elements but also add more elements (like new buttons and fields) in the forms and invoke actions to submit data from pdf to an external URL.

In the example below we have an ACORD PDF in Read more…

Javascript | How to post Acord PDF Forms data to a Web URL

Author - Webner

Description : You have Fillable PDF on which you have button “Save Entered Data”. On button you want post the form data to php file.

Solution :

Follow these steps :

1. Open Form with Adobe Acrobat Pro. Goto–>Tools.

2. From Tools, Go to Tools–>Rich Media.

3. Click on Select Object Read more…

jQuery EasyUI datagrid | How to solve “no text wrapping” problem

Author - Webner

See the screenshot below :

Line no 7 and 8 indicate problems due to no word wrapping

Solution :

Use Javascript property ‘nowrap=false’ in your datagrid creation.

Code :

<table id=”dg” title=”Activity Info” class=”easyui-datagrid” style=”width:100%;height:81%”
toolbar=”#toolbar #searchtoobar” nowrap=”false”
rownumbers=”true” fitColumns Read more…

Javascript | How to write code in Adobe Acrobat

Author - Shalini

Steps to write script in Adobe Acrobat Pro

1. In Adobe Acrobat Pro, open Tools panel on the right, and search for Action wizard.

2. Double click on Action Wizard to open it. Click on New Action Wizard. It will open a new window. Click on More tools label and Read more…

PHP | Why HTML to PDF does not show same styling as on HTML page?

Author - Webner

Sometimes, HTML to PDF conversion does not show the same styling in PDF as it shows in HTML.

There are several reasons for that such as :

1. Bootstrap classes:

Using bootstrap classes in creating PDF could be the problem. A4 paper size has different width and height than our screen Read more…

How to read csv from S3 bucket and insert into database

Author - Webner
|
0 Comments
|

While working on a project, we wanted to read csv from s3 bucket, store this data in another local file and insert it into database. We had S3 bucket url where csv was kept.

Samp S3 URL -‘http://www.xyz.com/1234.csv’;

Below is the sample code which reads Read more…

Moodle | Enrollment-API to get enrolled users based on course id

Author - Webner
|
0 Comments
|

In one of our Moodle projects, we wanted to retrieve the list of users enrolled in a particular course. One way of getting this data was to query Moodle database and join all the relevant tables as listed below:

1. mdl_context – get records with contextlevel = CONTEXT_COURSE (CONTEXT_COURSE = 50) and instanceid Read more…

Database Connectivity with Selenium Webdriver

Author - Webner

How to connect to Mysql in Selenium script?

Step 1: Import Mysql connector (JDBC driver):

Download connector from:

Find-ur-pal

Download this jar file and import in Eclipse : MySQL-connector-java-5.1.18-bin.jar

Follow these steps in Eclipse:

Add the downloaded Jar to your Read more…

Salesforce | How to merge BrandTemplate with HTML body in VisualForce page

Author - Kiran Preet
|
0 Comments
|

Problem: We tried to merge BrandTemplate with HTML body of Email template but haven’t got a proper solution (BrandTemplate is the letterhead object in Salesforce).

Solution: For now the problem is solved with a trick as we noticed that template is merged dynamically when email is sent.

Firstly Read more…

PHP | Deleting files from local machine (unlink(): No such file or directory)

Author - Kiran Preet

Assume following is the path on your system in which you want to delete some files through code (unlink function):

C:\wamp\www

Now if we use the same address in source variable (“C:\wamp\www”), it gives the following error:

unlink(): No such file or directory

This is because Read more…

HTML | Browser Notifications

Author - Ashish
|
0 Comments
|

Below is the sample code to get permission of user to display browser notifications in case he approves. Save the following code in simple HTML file:

<script>
document.addEventListener(‘DOMContentLoaded’, function ()
{
if (Notification.permission !== “granted”)
{
Notification.requestPermission();
}
});

function notifyBrowser(title,desc)
{
if (Notification.permission !== “granted”)
{
Notification.requestPermission();
}
else Read more…

JavaScript/HTML | Get Id of inner child element

Author - Kritika Sood

Suppose from html code below we want to get id of each <a> element inside home_menu.

<ul id=”home_menu” class=”appendmenu” style=”float: left”>
<li>
<span class=”arrow sep”>►</span>
<a id=”breadcrumb_mainc3″ style=”cursor:pointer;color:#087bb1;”>Programming Read more…

Salesforce | How to create and call a webservice in Salesforce

Author - Webner
|
0 Comments
|

We can create a web service in Salesforce using “web service” keyword. The web service is always of static type and can return values.

Here is the code to create a web service:

Syntax:
public class className
{
webservice static returnType webserviceName(type perameterName)
{
// Write the webservice code to Read more…

Javascript | How to change form action dynamically

Author - Kritika Sood

Suppose on click of an element we want to change the form action URL. In this example, we are assuming a textbox in which user will type a value and then click search magnifying glass icon. On click of search icon we want to check if textbox is empty or Read more…

Netsuite | Authentication/Login to Netsuite sandbox account through java code using Netsuite WSDL

Author - Richa

Authentication/Login to Netsuite sandbox account through java code using Netsuite WSDL

In order to login to your sandbox Netsuite sandbox account via code, you need to have below files handy:

1. Netsuite sandbox WSDL:

The latest version of wsdl can be downloaded from Netsuite site’s developers Read more…

Mysql Workbench | How to copy Remote database into your local machine

Author - Rita

1.  Select Database: Schema Transfer Wizard from the Mysql workbench menu bar. You will see schema transfer wizard on your screen as below:

Click on Start the Wizard option.

2.  Connection Selection: Now select your source and destination location to copy database:

If you want to Read more…

How to send SMS through code

Author - Webner
|
0 Comments
|

There are many SMS sending gateways that provide REST services to send SMS. You need to register and purchase credits first before SMS can be sent. One such gateway is ClickaTell:

Click to view

Below is the sample REST call of Clickatell service provider:
http://api.clickatell.com Read more…

Salesforce | Show Loading on AJAX request and disappear after completing its progress.

Author - Kiran Preet
|
0 Comments
|

Solution : In many scenarios, apex button click sends an AJAX request (for e.g. to render a part of Visualforce page after completing its progress). Sometimes the AJAX request takes so much time.

To cope with this issue we have to show loading or waiting message to the user as Read more…

Salesforce | Send email using apex code along with attachment and manage email history

Author - Shalini
|
0 Comments
|

1. Send simple email using apex :

Messaging.SingleEmailMessage emailTobeSent = new Messaging.SingleEmailMessage();
List <String> listEmailMembers = new List<String>();
listEmailMembers.add(’email@domain.com’);
emailTobeSent.setToAddresses(listEmailMembers);
emailTobeSent.setSubject(‘Hi, Just Testing’);
emailTobeSent.setHtmlBody(‘msg : ‘ + msg);
Messaging.SendEmailResult [] r1 = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {emailTobeSent}
2. Use 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 39 40 41 42 43 44 Next page ›