Desktop Programming

Desktop programming related articles not related to .NET (Java, Python, Ruby etc)

Page Scraping Links with Ruby

Tinkering around with Ruby I figured I would write up a project that involved a little of everything a common Ruby program might have. A little sockets, a little class creation, array handling etc. The only thing I didn't include was a module but you could easily build one in if you like. The result was a nice little project which scrapes links from a given page. Ruby is gaining ...

Setting File Time in C/C++

It was asked recently how one might go about changing the various access times (last modified, creation date etc) of an existing file through C/C++. The idea we will show you below takes advantage of a few functions in windows.h for altering file and system times. And no it can't be used on your homework to change the due date. And no it doesn't include the creation of a flux ...

Selection Sort (Definitive Series)

In a long standing tradition here on the Programming Underground we are going to add another entry to the definitive series. For those of you who are still relatively new to my blog, the definitive series is a series of blog entries where we take an algorithm and run it through the paces of five different languages: C++/C#/Java/VB.NET/PHP. With the code side by side we can see the similarities as ...

Iterators and STL Lists

You may have heard of an iterator. You might have even used one and hadn't even known it. Iterators are a common tool in all sorts of languages from C++ and the STL to .NET to java and beyond. When you use an array and loop through it or manipulate its "internal pointer" from subscript 1 to subscript 2 you are manipulating the most basic of iterators. In the later ...

Add an Icon to the System Tray Using Java 6

So you may have wondered "How do I get a nifty little icon in the system tray for my Java App?" and after 20 minutes of banging your head against the wall you got dizzy, fell down, and probably passed out to only wake up and forget what you were doing. Then you go on your merry way to play some Nintendo Wii Fit. Yeah right! We all know you ...

Plant a Node, make a Binary Tree Forest in C++!

Once in awhile I really like to push the crazy and bizarre in the way of programming theory. Twist something mother nature made into a computer mutation that only a mad computer scientist would love. I fell upon the idea of creating a binary forest. What is that you ask? Well it is what I am calling a vector made up of binary trees. Each tree would have its own ...