Issue: There is a long list of categories to select from. Since the list was long and it could not fit within the wrapper div the maximum height of the wrapper div had to be set and make the wrapper…
How to prevent parent’s onclick event from firing when a child tag is clicked with jquery?
Generally, Javascript events bubble (listen) to the highest point in the DOM to which a click event had been attached. So even if you don’t have any other explicitly click-able elements in the div, every child element of the div…
How to get records filtered by a condition of another table field through join in Mongodb
I have two tables, posts and categories. In posts table there is a field categoryId. I want that only those posts are shown category of which is in enabled state, i.e. for which categories.enabled = true.
How to specify a port other than 3000 to run a create-react-app based app?
This post will show you how to specify a port other than 3000 for an app based on create-react-app. This solution is valid if your app is based on create-react-app.
MYSQL – Useful commands you must know – Part-1
To know the current MYSQL version: SELECT version(); To format and formulate a float value: FORMAT(SUM(amount) * 0.6, 2) The above line sums up entire amount value, cut it down to 60% of total value and returns value precised up…
Setting up folder permissions for WordPress on Amazon EC2 (Amazon Linux)
Are you facing file uploading errors or not able to install plugins or upload files through ftp to your EC2 installation of WordPress? Possibly folder permissions?? Read on.
How to create simple counter app using Redux with React
Redux is a great tool to manage states. To share state among various components in React is always a challenge. Hence it is very useful and helpful to manage state amongh various components using Redux with React.
Passing data from child to parent component in ReactJS
Here is parent Passing data from child to parent component will look like Parent
MySQL ‘show tables’: How to list tables in a MySQL database?
This is very commonly asked question: How do I show or list all the tables in a MySQL (or MariaDB) database using mysql command line tool? In brief, to show the tables in a MySQL database, run the command:
file_get_contents(): SSL operation failed with code 1 certificate verify failed
I got this error when I moved a site to new server. It was a simple file_get_contents() call to read an image file. If i copy pasted the url of the same file to open in browser it would open…