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…

Salesforce | How to show different apex message at different places on clicking a single button?

Author - Kiran Preet
|
0 Comments
|

In a Visualforce page we have multiple UI blocks (for simplicity we have considered only 2 blocks below). In each block we have a form with some html elements and few action buttons to submit form of only that block. In addition we also have global action buttons which submit Read more…

Moodle/Totara | How to give Grade to user in enrolled course

Author - Namisha
|
0 Comments
|

To give grade to user enrolled in course follow the below steps:

1. Open the course in which user is enrolled:

2. To the left, click on link labelled “Grades” as shown below:

3. Click on the button “Turn editing on”:

4. On clicking of “Turn editing on” button, the Read more…

Eclipse Luna | Dark theme and window split

Author - Kailash
|
0 Comments
|

1. You can select a dark theme for Eclipse Lune now:

To use the dark theme, go to Window -> Preferences -> General -> Appearance and choose ‘Dark’.

2. Editors can be split horizontally ( CTRL+_ ) or vertically ( CTRL+{ ) allowing you to edit two parts of a file Read more…

FileZilla | How to switch from current editor to other editor

Author - Kritika Sood
|
0 Comments
|

To get Eclipse or any other editor to open the file by default every time you download a file from fileZilla follow these steps:

Open terminal and find path from which your editor executes using which command.
$ which eclipse

Output : /usr/bin/eclipse

Open fileZilla, go to edit->settings

Go Read more…

Integrate Axis2 and Rampart

Author - Neha Mishra
|
0 Comments
|

Follow these steps to integrate Axis2 and Rampart:

1. Download axis2 from the below link:

Click

2.  Download Rampart.

3.  Set AXIS2_HOME using below commands on terminal:
$ vi /home/user/.bashrc
Add below line to the end of the file:

export AXIS2_HOME=/home/user/Downloads/axis2-1.6 Read more…

Ubuntu | Google Authenticator not working with SSH keys

Author - Navneet Kashyap

Purpose is to get MFA/ 2-step verification working i.e. google-authenticator + ssh Keys

First of all, install google authenticator on your server with following steps:

1. Yum install google-authenticator.x86_64 (Redhat/Centos)
sudo apt-get install libpam-google-authenticator (ubuntu OS)
2. Now vi /etc/pam.d Read more…

Ubuntu | How to avoid typing full ssh command to connect to remote server

Author - Rita

If you are using ssh (Secure shell ) to connect to remote server, typing long ssh commands in the terminal is unsecure and tedious job.

Following is the better and secure way to do this :

Just create a file with name config (without any extension ) inside your_home/.ssh folder (~/.ssh).

Add Read more…

Linux | Configure Tomcat service in linux

Author - Navneet Kashyap

Running Tomcat as a service in Linux:

For security reasons you should not run Tomcat as root service. It is better to create a new user and run Tomcat under it.

Create a file with the script:
$ sudo vi /etc/init.d/tomcat
(add following and set path of tomcat Read more…

Salesforce | Show red asterisk symbol in place of red vertical bar

Author - Kiran Preet
|
0 Comments
|

Problem : How to show red asterisk symbol in place of red vertical bar for all required inputFields in Visualforce page?

Solution : Sometimes we have some mandatory fields in our form, for this we can simply use required=”true” attribute with . This will show a vertical red mark before all mandatory 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 45 46 47 Next page ›