Ubuntu 14.04 | Installing postgresql 9.4

Author - Webner

Follow steps below to install Postgresql 9.4 (instead of 9.3 for which sources are added by default in Ubuntu 14.04):

1.  Remove the previous PostgreSQL Version:

*Make sure that you firstly backup your databases.
$ sudo apt-get –purge remove postgresql-*
2.  Add Repository:
$ sudo add Read more…

ACORD Forms autofill

Author - Webner

We get this request from a lot of clients in US insurance industry who want to generate ACORD forms automatically, means they want data of corresponding insurance Policy filled automatically in the editable ACORD PDF. Most of the clients have their data in a CRM system like Salesforce or Zoho Read more…

java.sql.SQLException: Data truncated for column date at row 1

Author - Webner

You may face this exception while trying to insert data in a mysql table using hibernate:

java.sql.SQLException: Data truncated for column date at row 1

While there can be different reasons of this problem, in our case it was occurring because by mistake we were trying to insert Read more…

PGAdmin not retaining created connections on reopening (Ubuntu)

Author - Webner

If you are using PGAdmin version 1.18.1 on Ubuntu and it is not retaining connections that you create, all you need to is this:

A. Open command prompt and create file .pgadmin3 in your home folder

B. chmod 755 .pgadmin3

Now create a new connection, close pgamin and Read more…

Zoho Creator or PHP based solution?

Author - Webner

A lot of Zoho users want to extend the capability that Zoho CRM provides out of the box. For example, one of our clients wanted to build a custom Quote Generator. They initially wanted to get the customization done to default Zoho CRM Quote form but their requirements were not Read more…

PHP | Convert date from one format to another in php

Author - Webner

To convert date from one format to another we need to specify to php interpreter the format of our current value. See code below:

/*
In statement below, we are providing date and format to DateTime::createFromFormat function so that function could know day, month and year values separately
*/

$date = DateTime Read more…

jQuery Datatables | Reloading data after filter values are changed

Author - Neha Mishra
|
0 Comments
|

Suppose there are two filters on the screen:

Date from
Date to

We need to reload data of Jquery datatable based on changed filter values.
“ Datatable “ plugin for jQuery needs to be called by including AJAX call as shown below :

Suppose id of the button on which we have to Read more…

Execute Javascript code on browser back button

Author - Kritika Sood

Here is sample code to trap browser back button and execute Javascript code on this event:

jQuery(document).ready(function($)
{
if (window.history && window.history.pushState)
{
$(window).on(‘popstate’, function() {//when back is clicked popstate event executes
//code here will execute on back click
});
}
});

Webner Solutions is a Software Development Read more…

Salesforce | Visualforce Component to AWS S3

Author - Webner

Description :

To access the features provided by amazon for storage and cloud computations from a visualforce component , the S3 service uses information from the form’s input fields to authorize uploads, and to set the properties of uploaded file objects.

To get Authorised make sure you got the object and Read more…

jQuery and HTML5 validations together

Author - Ishpreet Kaur
|
0 Comments
|

When we use HTML5 validation on form fields like required attribute, input type email, pattern attribute etc, then form data is not submitted until all HTML5 validations are passed. But if we associate some jquery code to the submit button then form is submitted ignoring HTML5 validations, which can be Read more…

Java | Execute SQL script using Maven

Author - Rita

Whenever there is a change in the database whether we are altering database structure or adding/updating data inside database most of the times we create a script file and run it manually. We can automate this process using Maven.

Solution: Maven provides a plugin called flyway-maven-plugin to Read more…

PHP | strpos() and result compare

Author - Webner

strpos($wholeText, $findText) in PHP returns position from which the $findText value starts if it is present in $wholeText. If it is not found then this function returns false. Fun starts when text is found at the very beginning (at position 0, as 0 is equivalent to false in PHP Read more…

Salesforce | Delete the Info/list of records permanently from Salesforce Recycle Bin

Author - Webner
|
0 Comments
|

You are not able to delete the records permanently and the records will be stored into the Recycle bin till 15 days from the deletion date:

Number of records stored in recycle bin = 5000* Number of Licenses your organisation has pursed.

If you want that all the records are deleted Read more…

PHP – Get files modified on a particular date

Author - Kiran Preet

Solution: In following example we have filtered files which are modified on current date (today’s date):
$source= “C:\wamp\www\Files\”;
$files = scandir($source);
$archiveFiles = array();
foreach($files as $file)
{
if (!in_array($file,array(“.”,”..”)))
{
$lastModified = date(‘d/m/y’,filemtime($source . ‘/’ .$file));
IF($lastModified==date(“d/m/y”))
{
array_push Read more…

Moodle/Totara | Moodle not inserting values to new column added to an existing table

Author - Webner
|
0 Comments
|

In Moodle, if we alter a table by adding a new column to it and use Moodle $DB->insert_record(‘table_name’,$dataobject) , it inserts the value which are assigned to old columns but not to the newly created columns.

For Example: if we have “queue” table having “cat”, “priminst”, “secinst Read more…

Selenium | How to locate an element with css selector and set value in it using code

Author - Webner
|
0 Comments
|

See the image below and html source of it. There is an element with name “email”. If we want to access that field and set a value in it, we can achieve that with this sample code:

public void test()
{
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS); driver.findElement(By Read more…

Salesforce | Get all the documents located in ‘My Personal Documents’ folder

Author - Shalini
|
0 Comments
|

In Salesforce, we can get list of all the documents located in a particular folder by using the following query :

folderId = [SELECT Id FROM Folder WHERE Name = ‘FolderName’]

[SELECT Id, Name FROM Document WHERE FolderId =:folderId]

But above query doesn’t work for ‘My Personal Documents’.

To get the list Read more…

IE11 – How to view webpage in different IE versions

Author - Namisha
|
0 Comments
|

Follow these steps to view the webpage in different versions of IE:

1. Open IE11.
2. Press F12 key.
3. Click on “Edge” that is displayed to the right side of the console bar. See screenshot below:

4. On clicking of “Edge” you will see all previous IE Read more…

Moodle | Fetch Site-Administrator user records from Moodle/Totara database

Author - Webner
|
0 Comments
|

Steps :

1. Open mdl_config table in Moodle/Totara database.
2. Look for the record with name field set to “siteadmins”.
3. The value field will contain comma separated list of user-ids that have administrative access to site.

Screen Shot below :

Webner Solutions is a Software Development company focused on Read more…

Salesforce | Uploading and using images in Visualforce page

Author - Webner
|
0 Comments
|

When there is requirement of displaying images in a Visualforce page, following methods can be adopted:

Method 1: If the image is present on another website/server.

Use this code:
<apex:image url=”Paste URL of the image” styleClass=”imageStyle”/>
Method 2: Uploading image in “Static Resources”

This 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