Posts Tagged "Programming Theory"

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 ...

Parsing XML and a Dynamic Callback in JavaScript

One of the most common tasks for a web developer is implementing an AJAX solution to create a more dynamic interface. A common method is to query a database, get some results, parse the results and update the interface without needing to refresh the page. But how do we customize our data, prepare it for some parsing, use the data returned to create something useful? The other day I had ...

Interfacing with VB.NET

Sure, you might have heard the term "interface" before in another language and yet not truly know what they mean by "a contract". Don't worry, you are not alone. Several books talk about interfaces with the term "contract" and never really explain what they mean by saying a class is bound by that contract. So lets take a closer look at interfaces and specifically how VB.NET "implements" them. We use ...

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 ...

Watermarking Images With Text in C#

Have you ever wanted to watermark your images in a C# application? Write your own little copyright on the photo and prevent those lamahs from actually ripping it off your site and using it for their own dastardly deeds? Ever wonder why I talk with questions and sound like I am an infommercial? Neither do I but after seeing a great question on the boards about watermarking, I thought I ...

Avoid Tying Classes to Your Forms

So you have a great class written and you want to integrate it into your project. Whether it be C#, Java, VB even C++ you may have asked yourself "How do I go about getting my class to update my form controls?" or "How do I get the class to change something on my interface or another class?" It is a common question asked on the board and the answer ...