Evaluate A Reverse Polish Notation Equation With JavaScript

April 1, 2015 Nic Raboy

Previously, I demonstrated how to convert an Infix Notation expression into Reverse Polish Notation using JavaScript, but I never explained how to evaluate the expression.

Reverse Polish Notation via Wikipedia:

A mathematical notation in which every operator follows all of its operands, in contrast to Polish notation, which puts the operator in the prefix position. It is also known as postfix notation and is parenthesis-free as long as operator arities are fixed.

In this phase two article, we’re going to look at how to solve a mathematical expression that has been parsed into Reverse Polish Notation (RPN).

Read More

Make An AngularJS Library For The Imgur REST API

March 25, 2015 Nic Raboy

Imgur is a great image service for sharing and viewing images across the internet.

Since there is a lot of buzz around AngularJS lately and there isn’t already an AngularJS extension for the Imgur REST API, I decided to take it upon myself and start creating one.

Read More

Using Oauth 2.0 In Your Web Browser With AngularJS

March 22, 2015 Nic Raboy

I have a few popular Oauth related posts on my blog. I have one pertaining to Oauth 1.0a, and I have one on the topic of Oauth 2.0 for use in mobile application development. However, I get a lot of requests to show how to accomplish an Oauth 2.0 connection in a web browser using only JavaScript and AngularJS.

We’re going to better explore the process flow behind Oauth 2.0 to establish a secure connection with a provider of our choice. In this particular example we’ll be using Imgur because I personally think it is a great service.

Read More

Print Data To Paper Or PDF Using Ionic Framework

March 19, 2015 Nic Raboy

Have you ever built an app that has heavy content that might need to one day be printed to a PDF or to paper? Maybe you’re building the next great email or news app, both of which have an expectation that you should be able to print what you’re reading.

Both iOS and Android have printing functionality. We are using Ionic Framework, and lucky for us, printing to either of these platforms couldn’t be easier when we use the Apache Cordova Printer Plugin by Sebastian Katzer.

Read More

Sign Into Firebase With Facebook Using Ionic Framework

March 18, 2015 Nic Raboy

To continue on my trend of Firebase and Ionic Framework based tutorials, I thought, wouldn’t it be cool to sign into your Firebase application using a social media account such as Facebook?

Out of the box Firebase and AngularFire offer some nifty methods for authentication, however they don’t work quite as expected when it comes to mobile hybrid applications and I’ll explain why.

Read More

Parse With The Shunting Yard Algorithm Using JavaScript

March 16, 2015 Nic Raboy

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.

Read More

Make A Gallery-Like Image Grid Using Ionic Framework

March 12, 2015 Nic Raboy

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 More