How to convert double dash to em dash in WordPress Gutenberg

How I made double dashes automatically convert to em dashes in WordPress Gutenberg Editor

Over the weekend, I was tackling a client request requesting for us to help modify their WordPress backend so that when writing posts, the Gutenberg Editor will automatically convert consecutive double dashes -- to an em dash character.

It was a particularly difficult task for me, despite having coding in WordPress for many years, simply because the Gutenberg editor was relatively new, and there is very little documentation regarding it.

Continue reading
How to override Astra Pro templates in a child theme

How to override Astra Pro templates in a child theme

At the recommendation of a fellow web developer, I’ve been using the Astra theme in WordPress to develop Terresquall’s client websites for years now, and it’s been by and large a positive experience. Astra is a very versatile theme that can be used to build many different kinds of website, and their paid Astra Pro plugin adds even more customisation options, allowing for even more rapid customisation options.

If you are building your site upon the addition features that Astra Pro provides using a child theme, however, customising Astra Pro templates can be a bit difficult to do, because there isn’t much documentation about this.

Continue reading
What is a NullReferenceException?

What NullReferenceException errors are (and how to fix them) in Unity

An error involving a NullReferenceException is something that new developers often encounter when working on projects in Unity. These errors occur when attempting to access object variables, or members of object variables, when the variable itself is null.

Although the cause is simple, NullReferenceException errors can present themselves in many different ways. As a result, fixing them isn’t always as straightforward as following a standard series of steps. In this article, we will explore the various ways that a NullReferenceException can occur in Unity, as well as how to handle these various situations.

Continue reading
Why an ArrayList cannot contain primitives in Java

Why an ArrayList in Java cannot contain primitives like int, double or char

In Java, an ArrayList is a very convenient object that allows us to create and manage variable-length arrays. However, in Java, an ArrayList also has a weird quirk. You cannot declare an ArrayList that uses Java primitives. Below are a few examples:

import java.util.ArrayList;

public class ArrayListTest {
	public static void main(String[] args) {
		ArrayList<int> intList = new ArrayList<int>();
		ArrayList<double> doubleList = new ArrayList<double>();
		ArrayList<char> charList = new ArrayList<char>();
	}
}
Continue reading
Getting Unity Remote to work with iOS devices

Getting Unity Remote to work with iOS devices

If you are an aspiring game developer, or someone with a lot of experience making games, you may need to, at some point, test out your games on your mobile device. However, you may find that the process of having to build and install your game onto your mobile device a time-consuming and tedious process. Especially if you encounter any bugs or UI glitches and now have to go back into Unity, make the changes and repeat the installation process all over again.

With Unity Remote 5 however, this process can be entirely avoided as, not only can you directly test them through the editor, you can even make changes on the fly just by stopping the play and making your changes, before pressing play again to check and see the effects of the new changes.

Continue reading