Caching in Node.js with Redis: A Beginner’s Guide
Caching is a technique to store frequently used data in a temporary storage so that future requests for that data are faster. In Node.js applications, caching can help improve performance and reduce the load on your database. One popular tool
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
CakePHP | Calling Web API in CakePhp 3.x
Web API requests in CakePhp 3.x and difference from curl in php. Cakephp provides an easy method to communicate with webservices as compared to core PHP. In core php we make api requests using curl. Below is the sample code
Java | Few tips about Maven
1. How to compile maven project using different poms? Solution: When we start compiling project with mvn -clean install command, maven tool first attempts to search the pom.xml file in the current directory. If no pom is found in the
