Posts Tagged "Algorithms"

Linear Search for Sorted Lists: My Take

Today I give my take on a blog article I stumbled across today called "Computer Algorithms: Linear Search in Sorted Lists" which gives a look at applying the linear search model to something sorted. I will offer a suggestion to perhaps make this a bit better for implementation and perhaps performance reasons. So buckle up and we will take another spin around the Programming Underground! Ok, so if you are a ...

Convert Infix to Postfix in C++

Remember those pesky equations that baffled you in like 1st grade? Addition and subtraction along with their friends multiplication and division. Hey, you wanted to go play kick ball or chase that girl around the playground... not to hook up with her but to put dirt in her hair. Well, you probably learned to write your equations in infix form like 3 + 4 or 2 * 7. This makes ...

Rijndael Class Example for File Encryption in C#

Hello readers! It has been awhile since my last post. Lots of things have been going on lately and I have been busy developing some great code for some great people. In this entry I am going to show you a bit of plain text file encryption using the Rijndael Algorithm. This example is a fairly simple one and I hope to explain the basics as I move through an ...

Playing with Recursive Directory Diving in VB.NET

So recently someone asked about listing files from several directories but only to a given depth. They were using a DirectoryInfo object, as they probably should, to get a list of files. There was a problem with this however since the constructor of this object only offers a version where you specify no recursion on the sub directories or full recursion and get all the sub directories. This is an ...

Reflective N-bit Binary Gray Code Using Ruby

So what is behind the theory of binary gray code? It was named after Frank Gray and is a numerical system where each successive value differs from the one before it by one bit value. It is like counting in binary, but in binary counting a step may require changing two bits. For instance going from 1 (01) to 2 (10) would involve changing the most significant value 1 ...

Histogram Equalization Using PHP

The other day someone on the board had asked about histogram equalization and it had sparked some thoughts about how it is applied to picture correction and enhancement. Then of course it hit me like a ton of bricks (ouch!), why not make this into a blog post? So here I am telling all you fine people about using PHP to equalize the histogram information in pictures. Now we all ...