How to handle grub rescue problem in dual boot systems

Author - Webner

Description: In a dual boot system (Ubuntu/windows), if you delete the boot partition of ubuntu or delete the Linux operating system by formatting the drive then you will face the grub rescue problem.

In this problem we have two cases:

You have deleted the boot partition of Read more…

PHP | Header function not working

Author - Webner

Code :
Function getredirect($subcontactid)

The header function in the above code does not work. But when we remove the echo from the code, it works properly.

Code after removing echo :
Function getredirect($subcontactid)
header(“location:https://subscriptions Read more…

iOS | Inconsistent Status Bar in iOS Phonegap Application

Author - Vivek Gautam

Problem : Header goes under the status bar and menu button is not clickable in Phonegap/Cordova Application.

Solution :

In the iOS version 7.0, App View covers full screen including the status bar, and the view starts from top of the screen i.e. origin(0,0); which was not Read more…

Salesforce | Change value of an object’s field on button click and reload page

Author - Webner

We can change the value of an object’s field on button click by using javascript like this (and this will also reload the page):
var rec = new sforce.SObject(“Contact”);
rec.Id = “{!Contact.Id}”;
rec.IsActive= ‘true’;
var result = sforce.connection.update Read more…

Generate getter/setter for PHP Classes in Eclipse

Author - Webner

Using PHPGen Eclipse plug-in one can automatically generate getter /setter methods for instance variables.

Note: This Plugins is not available in Eclipse Marketplace.

Steps For Installation:

Start Eclipse and add “Help> Install New Software” from following URL:

Click Add, enter http Read more…

Salesforce | How to get the User Informations like ORG_ID, User_ID etc in VisualForce code

Author - Webner

To get the active user info or org info in Visualforce code one of the best programming practice is to get the values from the controller class of the Component.

Here is sample controller class:

public with sharing class GetUserInfo
// getters and setters for the variables
Public string orgID {get Read more…

Heroku | Checkout Git project into Eclipse from Heroku

Author - Webner

1. Go to Heroku and copy the link of the specific apps that you want to take checkout of:

2. Open eclipse and start the git perspective, then click cloning icon:

3. Paste the URL link into the dialog box that appears:

4. Edit pasted url – replace protocol type i Read more…

Photoshop | Add audio to Gif animation in Photoshop

Author - Webner

Step 1. Click “Window” > “Timeline” to show the image sequence of animation.

Step 2. Go to timeline and click add audio.

Step 3. Select the desired audio you want to add in your .gif file.

Step 4. Select audio and click ok to import it.

Step 5. Adjust the audio Read more…

jQuery | Click event does not work on dynamically created HTML elements

Author - Ishpreet Kaur

Solution: Suppose we have the following HTML and jQuery code:

<div id=”container”>
<button id=”1″ class=”createNewElement”>Button</button>
alert(“Element with id ” + $(this).attr(‘id’) + ” is clicked!”); // tells id of button clicked
newElementId Read more…

Maintaining record history in database

Author - Webner

When you are building a web-based multi/single tenant system or a desktop system which has a database at its backend to maintain records, keeping the history of records proves to be very useful in the long run from information and security perspectives. History of records means keeping track Read more…

Java | Configure Tomcat as a service on linux

Author - Navneet Kashyap

Configure Tomcat service in Linux:

These instructions are related to installing and running Tomcat 7 as a service, which means that it will be launched at system boot and will be closed properly on system shutdown.

Running tomcat as a service in Linux:

For security reasons, you should not run Read more…

How to use SimpleSAMLPhp as a Service Provider for authenticating users?

Author - Ishpreet Kaur

How to use SimpleSAMLPhp as a Service Provider for authenticating users? Some Basic steps to start using simplesamlphp.

1. Download stable version of SimpleSAMLphp from this link:

Click here

2. Go to the directory or your workspace where you want to install simpleSAMLphp, extract the zip file. Give Read more…

New & Custom workspace in Illustrator

Author - Webner

New & Custom workspace in Illustrator:

1. Go to the file or press Ctrl + N in Windows system / command + N on Mac:

2. This will open New window panel on your screen. You can change the title of your document here:

3. Next step is to choose the Read more…

How to move complete site from one location to another using gdrive for heavy files via terminal

Author - Navneet Kashyap

Problem: How to move complete site from one location to another using gdrive for heavy files via terminal.


1.  Log on to server where site is hosted via SSH.

2. Make a tar.gz of folder/directory of your site located.

3. Download gdrive in Read more…

CakePHP | Using Elements for common code

Author - Rita

Problem: How to separate redundant piece of code from your view using cakephp 3.0.

Description: Let’s take an example. You have a list of products to display. We show products at many places such as

1. Show all products.

2. Show products of the specific category.

3. Show Read more…

PHP | Rename all the files in zip and then extract zip in PHP

Author - Kiran Preet

Description: In one of our PHP projects, we wanted to rename all the files in zip folder and then extract the zip.

The code for this is written below :

$zip = new ZipArchive;
$res = $zip->open($sourceFolder.’\’.$file);
for ($i = 0; $i < $zip->numFiles; $i++)
$filename = $zip->getNameIndex($i);
$arr Read more…

Moodle | New lang strings not accessible

Author - Kritika Sood

In Moodle we had declared some new strings in lang file of a plugin like this:

$string[‘LIBRARY_NAME’] = ‘E-Lab’;
$string[‘BOOK_READ_SUCCESS’]=’Congratulations on reading the book’;

We wanted to use it in view.php file of the plugin like this:

$result=Get_String(‘BOOK_READ_SUCCESS’, ‘plugin name’);

But the output was Read more…

PHP | How to merge multiple PDFs into single file using pdftk

Author - Webner

Using PDFtk we can merge multiple files into a single file using a command like this:

Example : pdftk file1 file2 output file3.

Sample code to accomplish the same using PHP is given below:

$outputPDFName = “mergeResult.pdf”;
$dir =”Files/GeneratedPDFs/”;
for($i =0;$i<sizeOf($arrayOfPDFFiles);$i++)
$multiplePDFs = $multiplePDFs Read more…

Moodle/Totara | Upgrade Moodle database after making changes to a plugin

Author - Webner

In one of our Moodle projects, we modified a plugin’s code to add extra functionality to plugin. The modification in plugin’s code was not reflected and Moodle showed the older version of plugin.

To solve this problem, we upgraded the Moodle database and changes in plugin’s code Read more…

Eclipse | Undo deleted file in Eclipse

Author - Parminder Kaur

Problem: Undo deleted file in Eclipse

Solution: We were working on a project in Eclipse. Accidentally one of the PHP files got deleted in which code was written. Eclipse does not use the Linux ‘Trash’ but keeps local history from where we were able to recover the file.

Follow these 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