Microsoft Word has a bevy of powerful chart-making tools, capable of creating almost any kind of graph or chart that one can imagine. The way to create some of these charts are not immediately obvious, however, and one of these kinds of charts is the histogram (with an accompanying frequency polygon).
Continue readingCreating a bar-line chart in Microsoft Word
Are you tearing your hair out trying to figure out how to create a bar-line chart (i.e. a combination of a bar chart and a line chart) in Microsoft Word? Look no further, we’ve got step-by-step instructions for you in this post, as well as an accompanying video guide.
Continue readingA formula for rounding numbers
Most programming languages come with native functions that help us round our numbers, either upwards (i.e. ceiling operation), downwards (i.e. floor operation), or to the nearest whole (i.e. round operation). While this is convenient, we sometimes need a bit more than that — what if — for example — we want to round our numbers to the nearest 0.5, or the nearest 3rd?
Continue readingExport your Unity project by building an APK (for Android)
Are you planning to create a Unity game for mobile devices? Wondering how you can export your game and build it as an app on Android? Look no further — here’s a step-by-step guide to exporting your game onto your Android device, updated for 2023.
If you’re looking for a way to test your game as you’re making it, check out Unity Remote — it’s an Android app that mirrors Unity Editor’s Game screen when you are in Play Mode. Once you’ve installed it, we have a guide covering how to get Unity Remote working on your devices.
Continue readingContent begins after the advertisement:
PHP mail not sending domain emails to external mail server
Recently, I’ve done some work for a client with an odd issue: the contact forms on their website (let’s call it client-website.com
) — which delivered completed form enquiries using PHP’s mail()
function — could not send emails through to email addresses containing their own domain.
This means that, if we were to set the form to deliver enquiries to an address like hello@client-website.com
, the email would be completely dropped — you would neither find it in the junk or spam folders, nor find any trace of the email in their admin and mail logs. If we delivered the email to our own personal email addresses (e.g. personal@gmail.com
), or to emails from another domain (e.g. mail@terresquall.com
), then the email would go through (and skip right past the spam folder too).
For weeks, this problem confounded me, until now… and it’s actually a really simple fix.
Continue readingMaking date-based permalinks for custom posts in WordPress
If you didn’t know already, this blog is not the only thing that we work on — we also take on clients to work on website and web-related projects for them. Recently, we worked on a website project where we had to code a custom WordPress post type into the custom theme we made for the client (yes we make those).
This custom post type (which shall henceforth be called Articles — what we named the post type) was supposed to serve a purpose similar to the default WordPress Post — it was meant to go into a blog section for the website, and the client wanted to be able to assign categories to individual articles. All of this is pretty standard fare when it comes to WordPress customisation, as you can easily figure out how to do it reading official guides and documentation from WordPress:
- Adding custom post types: developer.wordpress.org/plugins/post-types/
- Adding custom taxonomies (e.g. categories): developer.wordpress.org/plugins/taxonomies/
register_post_type()
documentation: developer.wordpress.org/reference/functions/register_post_type/register_taxonomy()
documenation: developer.wordpress.org/reference/functions/register_taxonomy/
We needed something a bit more though, as we wanted to customise the permalinks (i.e. auto-generated URL) of our Articles such that they are:
- Preceeded by the
article
slug, e.g.example.com/article/my-article-title
- Display the year and month before the post title, e.g.
example.com/article/2021/03/my-article-title
- Display a list of articles posted on the specified year and month if it was specified in the URL, e.g.
example.com/article/2021/03
would show all the articles posted in March 2021.
Want to find out how we did it? Then continue reading.
Continue readingUsing Keap’s (aka Infusionsoft) PHP SDK (2021)
If you are creating applications that work with Keap CRM — formerly known as Infusionsoft — you might be unsure where to start. After all, many of the guides available online for working with Infusionsoft’s API are outdated. Additionally, although the official documentation is an option, it’s a little too vague, especially if you are new to the whole web API business.
I recently worked on a project where I had to integrate a set of fields in a web form with Keap’s CRM system — that is, users will fill up a web form, and the information will automatically be sent to Keap’s CRM database for storage. After a lot of trial and error, as well as source code reading, I’ve managed to get my form working.
I’ve put together this guide in the hopes that you can have a smoother journey of integrating Keap’s / Infusionsoft’s CRM into your web services.
In Keap’s / Infusionsoft’s defense, their documentation is much better in their GitHub repository, as they have more concrete instructions and examples. Once the API is set up on your web application, the information in the repository is actually very helpful.
Continue readingAdding virtual hosts on Bitnami Apache
Over the weekend, I’ve spent a substantial chunk of time figuring out how to add a virtual host onto a client’s subdomain. In laymen’s terms, this means that:
- My client has a website hosted on a domain (which we shall call example.com, for confidentiality reasons)
- We want to build a web application on app.example.com, which will be entirely separate from example.com.
- To save on cost, we want to host app.example.com on the same server that example.com is using (i.e. create a virtual host on the web server).
This means that we have to configure our web server so that it will serve a different webroot depending on the domain it is being accessed from.
Continue readingContent begins after the advertisement:
Shallow vs. deep copying in Python
If you’ve worked with Lists in Python before, you’ll quickly realise that they work differently from primitives like integers and strings. Consider the following:
a = "hello" b = a a = "world" print(a) # Outputs world print(b) # Outputs hello
Notice that changing the value of a
does not change the value of b
. This is called passing by value. In Python, Lists do not behave this way:
a = [2, 3, 4, 5] b = a a.append(6) print(a) # Outputs [2, 3, 4, 5, 6] print(b) # Outputs [2, 3, 4, 5, 6]
In the above example, notice that changing the value of List a
also changes the value of List b
. This is because both a
and b
are referring to the same List, and this is called passing by reference.
Drawing radar charts for stat UIs in Unity
As part of a school assignment in the past year, my team and I created Apoca Force, a tower defense game where WAIFUs (World Apocalypse Intercepting Frontline Units) are deployed onto a battlefield to combat an undead horde. To provide some variation (and eye candy) in gameplay, the game provides a variety of different WAIFUs for players to deploy.
To display the different stats WAIFUs have, we decided to include a radar graph on our build interface to illustrate the stats of each type of WAIFU. In this article, I will talk about the technicalities involved in making that happen.
I have previously written an article about how we rendered Unity’s NavMesh to show our WAIFUs’ walkable areas. Check it out!
Continue reading