Asynchronous Apex
Asynchronous Apex in Salesforce allows developers to execute operations in a separate thread, enabling tasks to run in the background without impacting the user experience. This approach is particularly beneficial for handling long-running processes, callouts to external systems, and operations
Importing gmail contacts in your website using javascript
Importing gmail contacts in external website is common these day where you can login to gmail from within external website and then access your contacts directly inside external website. For example, the requirement could be to allow user to refer
Moodle | Calling custom function on an event
Event driven architecture is inbuilt into Moodle. There are various kinds of events present in moodle like: 1. Course completion 2. Course creation 3. Course deletion 4. Course Module creation 5. Category Creation etc. On trigger of an event we
Can static variables be local?
Static variables are the variables that belongs to class. Static variables are shared among all the objects i.e there is only single copy of that variable.These do not get memory in each object. They automatically get initialised to 0. For
WordPress | Add html form on a slide using Slider revolution Plugin
How can we add html form in a slide in slider revolution plugin in WordPress? Solution: Slider Revolution plugin gives us options to add image, shapes, layers to enter text for example. For placing a form on a slide follow these
Salesforce | Best Practices
Best Practices for Salesforce For Apex Classes: 1. Use Asynchronous Apex methods like @future methods, batch processing, scheduler that does not need to be executed synchronously. 2. Asynchronous Apex should be “bulkified”. It means able to handle collections of records.
CakePhp 3.x | Declaration of user defined constants
In cakephp 3 we declare constants in bootstrap.php file under /app/config folder. A constant can be declared as: Configure::write(‘CONSTANT_NAME’, Value, true); Example: Configure::write(‘USERNAME’, ‘Webners’, true); To use this constant in another file, use this: use Cake\Core\Configure; Now the constant can
PHP and AWS | Copy AWS S3 file to local folder
How to copy a file from Amazon s3 to some local folder using PHP code $t=file_put_contents(‘[Destination file address]’, file_get_contents(“[S3 url]”)); Here $t will get the size of file in bytes if successful otherwise 0. Before executing this make sure that
Java | Instance and Static variables with final keyword
When to use instance variables, static variables and when to use final with them? Instance variables belong to the object and each object has its own value for each instance variable. For example: The company has many employees and each
Cron jobs in Totara
When I made any new changes to the audience or add a new user(s) to existing audience in totara, it didn’t reflect in the member area of that audience. Sometimes it doesn’t even show changes made for many days because