Anyone who knows how to program can probably solve a mathematical equation such as 5 + 3 * 6 - ( 5 / 3 ) + 7
, but how might you get a computer to understand the appropriate order of operations? The equation I listed is in a format known as Infix Notation.
Infix Notation via Wikipedia:
Infix notation is the notation commonly used in arithmetical and logical formulae and statements. It is characterized by the placement of operators between operands.
This format is not the most ideal to work with when attempting to solve.
Instead it is more appropriate to use format such as 5 3 6 * + 5 3 / - 7 +
which is more commonly known as Postfix Notation or Reverse Polish Notation (RPN). This conversion can be accomplished by what is known as the Shunting Yard algorithm.
I recently started making an application with Ionic Framework that made heavy use of images both remotely and locally. During this time, my goal was to present the images in a grid that looks good for all device sizes and orientations.
One might think this would be an easy task because Ionic offers both grids and a responsive class, however, trivial was far from the case. Instead I had to go to my programming roots and create some display logic when looping through my arrays of images. The following guide will show exactly what I had to do.
Read MoreHave you ever needed to come up with a random string of characters say for a password? Maybe you’re looking for a random string of characters for an oauth 1.0 nonce. Maybe you’re in a job interview and you’re asked to generate a random alpha numeric string.
Whatever the case, we’re going to look at generating a random string of characters of any given length using JavaScript.
Read MoreRecently I was tasked with reading a JavaScript Object Notation (JSON) file using Java. In my project, the JSON file contained properties information to be used inside the application.
There are many libraries available for reading or parsing JSON data in Java, but in particular we are going to be using the library found on json.org.
Read MoreThe Node Package Manager (NPM), is becoming a major go-to resource for all development software and libraries. It is easy to use and covers a lot of ground.
If you’re anything like me you’re going to have more than twenty global packages installed on your machine through NPM, but how do you go about tracking whether or not any of them have become outdated?
Read MoreSince writing my two tutorials regarding using SQLite in Ionic Framework and shipping an app with a pre-populated database, I’ve received many requests for a tutorial for making a full blown app. I listen to my readers, so I figured what better way to show such an example, than to create a todo-list type application.
In this tutorial, I hope to accomplish the following:
All items that I wish to accomplish have seen their own tutorials. If you’re familiar with the Marvel comic book movies, you’ll know that every hero has their own story, then they meet up for the bigger picture in an Avengers movie. Think of this tutorial like that.
Read MoreIt was brought to my attention that the File plugin for Apache Cordova has no documented methods for finding the available disk space on a device.
This does not mean that you cannot figure out how much space is available on your users device because you can make use of Apache Cordova’s nifty cordova.exec
function.