IntelliJ – Connect to MySQL running in Vagrant

The Database feature of IntelliJ/PHPStorm is very powerful compared to the MySQL CLI. It allows your edit your data from the UI easily without writing any MySQL commands. Here is how you can connect your MySQL server running in a vagrant machine to the IntelliJ’s database feature and improve your productivity during development. Create a… Continue reading IntelliJ – Connect to MySQL running in Vagrant

React – Render String with HTML tags as HTML

There are often times when you have a string with some HTML tags such as strong that you want to render as HTML on the DOM. Most solutions online recommend using dangerouslySetInnerHTML but that is dangerous as the name suggests. The proper way to render HTML from string is to use FormattedMessage from the formatjs… Continue reading React – Render String with HTML tags as HTML

Debug slow PHP applications using IntelliJ or PHPStorm

It is frustrating when your PHP application is really slow and you do not know which part of your code is taking up too much time. Google considers 2 seconds as the optimal loading time for a fast loading website. Enabling PHP XDebug Profiler PHP’s Xdebug extension can be used to profile your web requests… Continue reading Debug slow PHP applications using IntelliJ or PHPStorm

5 Reasons MySQL Foreign Key constraints fail to create

Finding out why Foreign key creation fail When MySQL is unable to create a Foreign Key, it throws out this generic error message: ERROR 1215 (HY000): Cannot add foreign key constraint – The most useful error message ever. Fortunately, MySQL has this useful command that can give the actual reason about why it could not… Continue reading 5 Reasons MySQL Foreign Key constraints fail to create

Avoiding Wildcard imports in Java/Kotlin with IntelliJ

What is a wildcard import or a star import? When you want to import multiple classes from the same package like this: Java has an option to combine them into a single line using wildcard imports: Is it bad? Performance-wise, no. Using a wildcard import doesn’t actually import all the classes in the package. When… Continue reading Avoiding Wildcard imports in Java/Kotlin with IntelliJ

How to run an HTML file?

Many modern editors are available to create and modify web pages. But we recommend using simple editors like Notepad (windows) and Textedit (Mac). How to open Notepad in windows? Open start and type notepad at search. (OR) Open Start > Programs > Accessories > Notepad. How to open Textedit in Mac? press command + space enter Spotlight search will appear… Continue reading How to run an HTML file?

React: How to use Apollo with ‘Union Types’ in GraphQL

Apollo is one of the most popular React library to work with GraphQL APIs. However they don’t have native support when your APIs contain union types. Let’s look at an example API that contains union types and how we can work with them using Apollo. Assuming you have an API like this: that returns this… Continue reading React: How to use Apollo with ‘Union Types’ in GraphQL

Published
Categorized as React Tagged

How to become a web developer

Everyone who wants to become a web developer must know basic HTML, CSS, and Javascript. Our posts will help you to learn Web development from Beginners to Master Level. No prior knowledge required. HTML is the skeleton of the webpage. CSS is the muscle and skin that covers the skeleton and makes it beautiful. Javascript… Continue reading How to become a web developer