Tag: Zoho Creator
PHP | Convert date from one format to another in php
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
jQuery Datatables | Reloading data after filter values are changed
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
Execute Javascript code on browser back button
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 });
Salesforce | Visualforce Component to AWS S3
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
jQuery and HTML5 validations together
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
Java | Execute SQL script using Maven
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:
PHP | strpos() and result compare
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
Salesforce | Delete the Info/list of records permanently from Salesforce Recycle Bin
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
PHP – Get files modified on a particular date
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($archiveFiles, $file);