Longest string in an array of strings in Javascript
Find the longest string in an array of strings in Javascript
Check if brackets are balanced or not in javascript
Check if brackets are balanced or not in javascript
Check if given number is Armstrong number in Javascript
Javascript program to check Armstrong number
Basic array operations in Javascript
How to add elements at the start of an array in javascript? let list1 = [‘b’, ‘c’]; //using spread operator console.log([‘a’, …list1]); //Or using unshift method list1.unshift(‘a’); console.log(list1); How to add elements at the end of an array in javascript? let list2 = [‘a’, ‘b’]; //using spread operator console.log([…list2, ‘c’]); //or push method list2.push(‘c’); console.log(list2); …
What is async attribute in script tag in javascript?
What is async attribute in script tag in javascript? <script src=”test.js” async></script> If async attribute is present in script tag then script is executed asynchronously. async attribute is a Boolean attribute. What is the difference between async and defer? If async is present the file gets downloaded asynchronously and then executed as soon as it’s …
What is async attribute in script tag in javascript? Read More »
How to prepare for AWS Certifications
Useful Resources for AWS Cloud Certifications Recently I passed my AWS Certified Cloud Practitioner, AWS Certified Developer – Associate and AWS Certified Solution Architect – Associate certifications. Here is the list of resources which I used to prepare for these AWS Certification exams: Stephane Maarek courses from Udemy Neal Davis courses from Digital Cloud Training …
file_put_contents(): write of 1847 bytes failed with errno=13 Permission denied – Laravel
file_put_contents(): write of 1847 bytes failed with errno=13 Permission denied in Laravel If you get above error, follow below steps to resolve this: 1) Change permissions of the storage directory chmod -R 777 storage 2)Run below command composer dump-autoload
Most commonly used commands for Docker
Here is the list of most commonly used docker commands: docker –version This is used to check the version of the current installed docker. docker pull image_name This is used to pull images from the docket repository – hub.docker.com docker push image_name This is used to push an image to the docker repository at hub.docker.com …
Check if script is run as root user
#Check if script is run as root user whoami will give the name of the current user
How to change Add to Cart text for WooCommerce
How to change Add to Cart text for WooCommerce Please follow below steps to change the default “Add to Cart” text for WooCommerce Go to WordPress admin dashboard Go to Appearance Go to Theme Editor Here if you have a child theme then open functions.php file If you don’t have child theme then you can …
javac command not working on my windows
Download JDK and find the bin path from the directory. C:\Program Files\Java\jdk-15.0.2\bin The set the environment variables. Open control panel and edit path in the environment variables. Just add a new value under the “Path” as shown in the screenshots.
The provided API Key is expired
Google Maps API key error If you have generated Google Maps API key and when you save it gives the below error: It is because Google services takes about 10 mins to make service available for the newly created API keys.Wait for some time and it will start working.
How to fix Briefly Unavailable for Scheduled Maintenance in WordPress?
Briefly Unavailable for Scheduled Maintenance error in WordPress This error comes when updating plugins, themes or wordpress. In this case wordpress started an upgrade but failed to complete it. The error displays like this. This is actually not an error. Its just wordpress has put website under maintenance until the upgarde finishes. WordPress creates .maintenance …
How to fix Briefly Unavailable for Scheduled Maintenance in WordPress? Read More »
How to remove double line spacing in WordPress posts?
Remove double line space in WordPress posts Sometimes text editor in your wordpress website creates extra line space even when you add one line space. In this case you can write a custom css code to remove/add extra space. Change value of line-height and padding-bottom as per your requirements. You can add css code in …
How to remove double line spacing in WordPress posts? Read More »
How to create wordpress child theme?
Create wordpress child theme If you want your wordpress website to be upgrade safe, it is always best practice to create a child theme and then do the modifications. Child theme inherits all features from the parent theme. You can build custom theme by creating a child theme and your changes are not overwritten or …
How to add css specific to a page in wordpress?
Add css custom style specific to a page in wordpress You can add custom styles to a specific page in wordpress without affecting the whole website. Go to Appearance-> Customize->Additional CSS .page-id-1047{ color:#000; /* add your custom css style code here*/ } Here 1047 is the page id which you can get from the url …
How to install a WordPress Theme?
How to install a WordPress Theme Below are the steps to install a wordpress theme: Using WordPress theme directory Log in to your worpdress admin backend Go to Appearance on the left hand side bar Go to Themes Click Add New No you can upload a new theme here or install it from wordpress theme …