Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Get Remote HTML Data And Parse It In Express For Node.js

Have you ever wanted to fetch remote HTML data in a similar fashion to cURL or Wget using some backend web service and parse it? If you said no, don’t worry, I said the exact thing until I was challenged to do so. For the challenge, I chose to use Express as my framework and a few libraries to assist in the process of fetching and parsing.

I chose to use the HTTP and HTTPS libraries for fetching the data and the htmlparser2 for parsing the HTML data. These are of course only a few of many alternatives to choose from for such a task.

Read More

Draw A Graphic To A SurfaceView Using Native Android

There are many ways to create mobile Android games. For example you can use a framework like Unity3D or Unreal Engine, or you can use native APIs like the SurfaceView canvas or OpenGL. All the different methods have their pros and cons.

In this particular example we’re going to see how to render graphics to the Android screen by extending the SurfaceView class and a canvas.

Read More

Ending My Adventure At UC Merced And Starting Fresh

Back in 2010 I was hired by the University of California, Merced (UC Merced) after having first worked as a student employee for two years prior.

I was hired as part of the Student Information Systems (SIS) team of IT. Although my responsibilities spanned across all departments, I primarily supported the needs of the Undergraduate Admissions department.

I designed, developed, and supported many of the applications to address the growing needs of the department. These applications stretched from simple information management systems to complex automatic review processing systems using a variety of programming languages such as Java, ColdFusion, PLSQL, and Shell.

Read More

Use RegEx To Test Password Strength In JavaScript

Recently one of my Twitter followers asked me how they might validate password strength using regular expressions (RegEx) in their code.

Regular expressions via Wikipedia:

A sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching.

RegEx is nice because you can accomplish a whole lot with very little. In this case we are going to check various aspects of a string and see if it meets our requirements, being a strong or medium strength password.

Read More

All About Java Modifier Keywords

I’ve been a Java programmer for a while now, however, recently someone asked me a question regarding one of Java modifier keywords and I had no clue what it was. This made it obvious to me that I needed to brush up on some Java that goes beyond actual coding and algorithms.

After a few Google searches, I got bits and pieces on the topic, but never really the full story, so I’m using this post as a way to document the subject. This is a great interview question to test your computer science book-smarts.

Read More

Sort An Integer Array Using Bubble Sort With Java

Previously you saw an implementation of Quicksort, one of the better sorting algorithms. This time we’re going to look at a much inferior sorting algorithm which generally makes its appearance in introduction to computer science type courses. I’m talking about the Bubble Sort algorithm.

Bubble Sort via Wikipedia:

Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order.

The Bubble Sort algorithm is sub-par because of the outrageous time-complexity that it has for all sorting calls and we’re going to see why.

Read More

Create A Minesweeper Game With Native Android

So recently I was presented with a challenge. Make a Minesweeper game using native Android with no additional frameworks such as Unity3D or similar.

Minesweeper via Wikipedia:

A single-player puzzle video game. The objective of the game is to clear a rectangular board containing hidden “mines” without detonating any of them, with help from clues about the number of neighboring mines in each field.

This task can be accomplished many ways. For example we could choose to use OpenGL, a 2D canvas, or something else. In this particular tutorial we’re going to be using a 2D canvas because it is simple and acceptable for a game with minimal to no animations.;

Read More