Computer Programmer

AJAX: Status of “0” for an XMLHttpRequest

If you experience getting a status of “0” returned during an XMLHttpRequest, then the problem could be the result of several things. However, a status of “0” for an XMLHttpRequest (XHR) in AJAX quite often indicates a network error or a CORS (Cross-Origin Resource Sharing) issue. You might especially see this problem if you’re developing on a local machine, and trying to access a remote resource of some sort, and you probably need to set the Access-Control-Allow-Origin header. Here’s how.

Continue reading »
JavaScript

How to Shorten document.getElementById in JavaScript

After you’ve been writing JavaScript for a while you’ll eventually become aware that it’s a real pain in the neck to keep on typing “document.getElementById”. It takes time to type and, even if you’re using some auto-complete editor feature, it still takes up visual space in your editor and also byte-space in your file. So, is there a better way? Sure there is; it’s the same idea that you’ve probably seen in jQuery or similar libraries, with those mysterious $ signs everywhere. 

Continue reading »
Google Fi Phone Plan

Mobile and Virtual Phone Services – Reviews

There are so many different mobile phone services today that navigating the various services can be confusing and challenging. The same is true of virtual phone numbers too; these are services with which you can sign up for a number in the location of your choice, and use it similarly to a regular number, without it being tied to a particular device. Each service always seems to have its pros and cons, and my experiences with a few of the providers are provided below.

Continue reading »
GIMP - Image Manipulation Program

GIMP – How to Resize Images / Canvas / Layers

Knowing how to resize images in GIMP, and resizing the canvas and various layers, is one of the most basic skills you need for image manipulation. It’s not difficult to learn these skills, and once you’ve done it a few times it becomes second-nature. However, if you’re new to image-editing, or specifically to GIMP, then you may need a gentle pointer in the right direction. That’s what this tutorial hopes to achieve!

Continue reading »
Microsoft WSL

WSL2 – Add a Local SSL Certificate with mkcert

It’s often useful, if not essential, when developing a project or website on a local development to be able to use an SSL certificate. You can then test things out with https,  and get the little lock in your browser address bar. However, with the made-up domain  and local IP address of your local development machine, you can’t simply use something like LetsEncrypt. This is where mkcert comes in very useful. This article explains how to add SSL for local addresses on a machine with WSL2.

Continue reading »
HitFilm Express

HitFilm Express – How to Add Scrolling Credits

So, your amazing movie is nearly finished, and naturally it will win lots of plaudits for excellence, and maybe even awards. But one thing remains; because you’re a decent guy/gal and a class act, you need to give credit to all of the talented people and resources that helped your movie come together. Cue scrolling credits! We’ll show you exactly how to create cool scrolling credits using HitFilm Express software.

Continue reading »
Microsoft Windows

Microsoft Windows – Inverted Screen

If your Microsoft Windows screen has mysteriously turned upside down, or skipped from its natural landscape mode into portrait mode, then read on. It’s easily resolved. Or, if you want to have some gentle fun, and invert someone else’s screen, then carry on reading. We’d only ask that you don’t do this on any critical systems, and that you promptly re-instate screens to their original style in a timely manner.

Continue reading »
WordPress

How to Set Cookies in WordPress

Setting Cookies in WordPress. As a budding WordPress developer or hobbyist, once you’ve become familiar with the basics of WordPress, you’ll no doubt want to experiment further by developing your own widgets and plugins, or by creating your own themes, etc. And, along the way you’ll at some point want to know how to set cookies in WordPress. Once you know how to do it, you’ll realize how simple it is to accomplish. Here we explain.

Continue reading »
Computer Programmer

JavaScript & CSS – How to Determine Script Usage

Once you have your fancy new website looking pretty, one of the next things you might do is to try and optimize various aspects of it. This may include optimizing images so they load more quickly, and making sure the site is easily accessible for those with impaired vision, for example, and ensuring the site is usable on various types of device. These are all excellent ideas; another is to ensure that the JavaScript and CSS files being included in your pages are actually being utilized properly.

Continue reading »
WordPress

WordPress – Get the SQL Query Used by get_posts()

The get_posts() function in WordPress retrieves an array of posts matching the parameters provided by the programmer. Thus, it’s one of the most important and useful functions of WordPress, since posts are quite often at the heart of any WordPress website. The results of any query to the function can obviously be seen by examining the output, but sometimes it’s really helpful to examine the SQL query actually created by get_posts().

Continue reading »
123