Category: Web Development
How to read csv from S3 bucket and insert into database
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
Moodle | Enrollment-API to get enrolled users based on course id
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.
Database Connectivity with Selenium Webdriver
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
Salesforce | How to merge BrandTemplate with HTML body in VisualForce page
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
PHP | Deleting files from local machine (unlink(): No such file or directory)
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
HTML | Browser Notifications
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
JavaScript/HTML | Get Id of inner child element
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 Courses</a> </li> <li> <span class=”arrow sep”>►</span> <a id=”breadcrumb_sc34″ style=”cursor:pointer;color:#087bb1;”>Javascript </a> </li> <li>
Salesforce | How to create and call a webservice in Salesforce
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
Javascript | How to change form action dynamically
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
