Train / Bus Reservation Example in Java

ALLLLLL ABOARD! Buy your tickets right here for the DIC train of love. In this episode we talk about a problem that pops up once in awhile on the boards, a seat reservation system. People have their preferences and the DIC train is no different. Some people like the windows, some people like the aisle seats and some even like to hang out there in the caboose (Yeah you know ...

Let the Carnage Begin! Josephus Solution in C++

It was a dark stormy night, the staff of DIC had been running all night up this steep mountain trying to avoid the hordes of newbies asking for solutions. "Run for the cave!" yelled supersloth. So the crew ran into the cave hoping to elude the beasts that will not let a programming master sleep. Shortly after the 10 staffers made it safely inside... "BOOM POW CRASH!" the cave entrance ...

Building Shapes With Loops

From time to time it has been asked how to build standard 2D shapes with simple loops. It could be a rectangle of some sort or a right / equilateral triangle. Maybe even a triangle that is facing the left rather than facing the right. Even the diamond pattern is a good one asked by many instructors around. But why on Earth would instructors ask you to build these types ...

Playing with a ToolStrip Control in C#

Ready for another action packed, fun thrilled entry? In this episode we talk about the Toolstrip control and creating one dynamically through code. Sure we can add one through the toolbox and configure it at design time, but knowing how to create controls and manipulate them at runtime is also great practice. You might be asked many times to create a control and then have it update its appearance as ...

Generating Non-Repeating Random Values in C++

I have seen this question pop up on the board from time to time about generating random number values, in a given range, but not repeating any of the values. It is simple enough to create your standard number generator, and even simple to test the value it generates against previously selected values, but that method has always been a "brute force" type of approach and can be a nightmare ...

Fading Objects in Javascript

Ever visit a website and see some elements which seem to disappear or appear with a gradual fade in or fade out effect? Ever wonder how that is done? I am sure you have at one point. You probably dug around Google and would find some long winded scripts that may or may not work quite right. Maybe they are hard to setup and always had bugs. We here at ...