Heroku | Change PHP session timeout

Author - Webner

In Heroku, there is no way to change HTTP session timeout (or some other php.ini settings) from user interface. For this create a file with name .user.ini and specify the properties in it. This file is to be created in root folder of project.

In our case we Read more…

Moodle/Totara | Create custom fields for a course

Author - Neha Mishra
|
0 Comments
|

Create custom fields for a course in Moodle/Totara.

1. Go to Site administration. Select custom fields inside Courses as shown below:

2. Select option – which type of custom field do you want (say, menu of choices):

3. Fill the below form as per your requirement and save:

4. Now Read more…

Selenium | Mass CSV file generation by fetching data from database

Author - Webner

In a project we are working on there are large number of pdf files for which field mapping data is stored in the database. In this project pdf forms are auto filled with data from Salesforce. Which PDF form field is mapped to which corresponding Salesforce object or field is Read more…

Font family looks regular in Ubuntu and Windows but looks bold in Mac

Author - Kajal Marwaha

In one of our web development projects, we used font family named Calibri for breadcrumbs. This font worked fine on Ubuntu and Windows but on each browser of Mac fonts appeared bold.

We wrote the following code for making the text font normal and consistent for all operating systems:
.breadcrumb Read more…

CakePHP | Redirect from http to https URL

Author - Kailash

If you want to redirect from http to https in CakePHP, generally redirect method code is like this:
$this­->redirect(array(“controller” => “myController”,”action” =>t; “myAction”));
But if your site is running on http protocol it will redirect to the url with http protocol:

‘http://www Read more…

Insurance Agency Management System – Direct versus Agency Billing

Author - Webner
|
0 Comments
|

Basics first – Client is the insured person or who gets himself, his property or vehicle insured by the insurance company. Insurance company is also known as Insurance Carrier or insurer. And there is insurance agency that acts as interface between Client and Carrier to make it easy for Client to Read more…

Moodle and Java | Retrieving users’ data from Moodle using External Java Application

Author - Richa

Retrieving users’ data from Moodle using External Java Application

We can write a basic REST moodle client code using Java to fetch users’ records from moodle. Before writing the code, you need to perform below steps in Moodle which are required in order to fetch the data:

1. Create external Read more…

AWS EC2 | How to automate the Snapshot command

Author - Navneet Kashyap
|
0 Comments
|

You can create snapshots of the EBS volume which can help to restore to a prior state in future if required. Better is you can create a bash script and put the commands for taking snapshot in it and then put the script in task scheduler to run at specific Read more…

Linux | Installation of custom AWS metrics script & prerequisites for AMI

Author - Navneet Kashyap

1.  Login to Amazon Linux-AMI / Centos / RedHat:

Using ssh

2.  To Upgrade from a previous version of the scripts:
# sudo yum install perl-DateTime
3.  To install the scripts for the first time:
# sudo yum install perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https
4.  Download & Unzip Read more…

Selenium | How to count the number of products on a web page

Author - Namisha

In this post I will give an example of a Selenium script to count the number of products displayed on a web page. This is the screenshot of webpage:

As you can see products are displayed row wise with 4 products in 1 row. On scrolling down there are many Read more…

MySQL | A short note on database indexes

Author - Webner

Index is used for storing values for a specific column in a table. An index is created on a column of a table and used to speed up search queries.

For Example :

Suppose we have a database table called Users with three columns – User_Name, User_Age, and User_Address. Assume that this Read more…

Curl | How to test a Restful web service using curl

Author - Rita

Let’s consider, we have a demo Restful service (created in Java Spring here but you can create in any language) to login user which accepts username and password as input and returns Success/Failure in response.

Request Object : Demo Login Request class :

Response Object :

Here is how to call Read more…

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…

PHP | Acord Forms to PHP integration

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…

‹ 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