Where I work we still have some Cobol programs in use and I am the only one that supports them. I decided that I needed an easy way to pull the source code to my PC so I could use a slightly more friendly way to review the code and figure out what it does (so I could replace it with C# code).
Turns out that old school is the way to go. I FTP'd into the server, changed into the appropriate library and did a get on the source file I wanted. Very nice and easy. Then I decided why not just pull it all so I did an mget and it worked. Very nice! Dropped all the source onto a Linux box so I could grep it anytime I wanted. Did a WC on it and found that we had about 1.5 million lines of code spread across 7000 programs.
Wanted to share how I did it for others:
cd (some folder here to store the source files)
ftp servername
Enter Username & Password
cd (library here)
prompt (to turn off prompting for each file)
mget source.*
(wait for it to finish)
quit
Enjoy!
Thursday, July 14, 2011
Saturday, July 9, 2011
Finished TARDIS Piggy Bank
Thought I would share pictures of the TARDIS "Piggy Bank" I made for Sam. He chose the color. It is 17" tall by 7.25" wide (square). The light on top is a single LED bulb that cycles through 7 different colors and flashes. It can also show any one of the individual colors (by pressing the black button). Josh's is very similar but blue and a little bit shorter.
Saturday, July 2, 2011
Old but still great code
I decided to resurrect some old 3D dot rotation code (1993). It was in C so I converted it to C# (not a big stretch) and it works pretty good. The key was double buffering.
Right now I am working on a whole 'font' that will allow me to rotate just about any string.
(these are predefined elsewhere but thought I would include them so you could see how the are created)
offScreenBmp = new Bitmap(this.Width, this.Height);
offScreenDC = Graphics.FromImage(offScreenBmp);
backBrush = new SolidBrush(Color.Lime); // i set the form transparency key to this
this.TopMost = true;
the 'display' code looks like this (I will be cleaning it up later):
private void DoDotAnimation()
{
while (! ClosingIt)
{
MoveDots(); // never guess what this does...
Graphics clientDC = this.CreateGraphics();
offScreenDC.FillRectangle(backBrush, 0, 0, this.Width, this.Height);
Color newColor = System.Drawing.Color.Red;
for (i = 0; i < PointsN; i++) // run through the dots array and draw them { if ((TheNewDots[i, 0] > -1) && (TheNewDots[i, 1] > -1))
offScreenDC.DrawEllipse(new Pen(newColor, 2), TheNewDots[i, 0], TheNewDots[i, 1], dotSize, dotSize);
}
clientDC.DrawImage(offScreenBmp, 0, 0);
Application.DoEvents();
}
}
Right now I am working on a whole 'font' that will allow me to rotate just about any string.
(these are predefined elsewhere but thought I would include them so you could see how the are created)
offScreenBmp = new Bitmap(this.Width, this.Height);
offScreenDC = Graphics.FromImage(offScreenBmp);
backBrush = new SolidBrush(Color.Lime); // i set the form transparency key to this
this.TopMost = true;
the 'display' code looks like this (I will be cleaning it up later):
private void DoDotAnimation()
{
while (! ClosingIt)
{
MoveDots(); // never guess what this does...
Graphics clientDC = this.CreateGraphics();
offScreenDC.FillRectangle(backBrush, 0, 0, this.Width, this.Height);
Color newColor = System.Drawing.Color.Red;
for (i = 0; i < PointsN; i++) // run through the dots array and draw them { if ((TheNewDots[i, 0] > -1) && (TheNewDots[i, 1] > -1))
offScreenDC.DrawEllipse(new Pen(newColor, 2), TheNewDots[i, 0], TheNewDots[i, 1], dotSize, dotSize);
}
clientDC.DrawImage(offScreenBmp, 0, 0);
Application.DoEvents();
}
}
Sunday, June 19, 2011
Cool ASCII Text Generator
Found this cool ASCII Text generator awhile ago... thought I would share with you http://www.network-science.de/ascii/
________ __________ ___ __ \_____________ /___(_)___ ________ ___ __ /_/ / _ \_ __ \ __/_ /_ / / /_ __ `__ \ _ ____// __/ / / / /_ _ / / /_/ /_ / / / / / /_/ \___//_/ /_/\__/ /_/ \__,_/ /_/ /_/ /_/ ________ _____ ___ __ \_________(_)______ ________ __ /_/ /_ ___/_ /__ __ `__ \ _ \ _ ____/_ / _ / _ / / / / / __/ /_/ /_/ /_/ /_/ /_/ /_/\___/
Saturday, June 11, 2011
Soda Can Airplane
Many, many, many moons ago, I was given a Soda Can Airplane made out of Mountain Dew cans. I've always wanted to make another but with the "Pitch Black" Mt Dew cans.
I've looked all over the Internet for 'free' plans but no one has them.
I found this site today: http://www.sodaplanes.com/pictures/cutting%20cans.pdf that at least gives me good instructions on how to cut the cans.
Now if I can just figure out how to build a duplicate of the one I have I'd be really happy. My boys would be very happy too because they would get one :)
I also found a site that sells plans for making a corsair (my favorite plane... probably due to Black Sheep Squadron), but I'm thinking I'm too cheap to buy them... at least for now... Someone else can feel free to buy them and send them to me... :D
I've looked all over the Internet for 'free' plans but no one has them.
I found this site today: http://www.sodaplanes.com/pictures/cutting%20cans.pdf that at least gives me good instructions on how to cut the cans.
Now if I can just figure out how to build a duplicate of the one I have I'd be really happy. My boys would be very happy too because they would get one :)
I also found a site that sells plans for making a corsair (my favorite plane... probably due to Black Sheep Squadron), but I'm thinking I'm too cheap to buy them... at least for now... Someone else can feel free to buy them and send them to me... :D
Wednesday, May 4, 2011
Totally Want to build this
I've seen these before, but never saw a comprehensive "How To" to make one. I really would LOVE to build this.
http://www.instructables.com/id/Led-Cube-8x8x8/
http://www.instructables.com/id/Led-Cube-8x8x8/
Sunday, May 1, 2011
Web Hosting Picked...
For the past 11 years I have had my own physical server Co-Located with Kansas Hosting. They have been EXTREMELY helpful and have taken complete care of my server. Over the years they have fixed any issues (even ones that I caused myself) and have been a terrific provider.
I originally went with them because a friend of mine worked for them (Hi Brian!) and convinced the owner to co-locate at a reasonable rate (a 4U server). Several years later, I built and setup a new server (a 1U server) and sent it to them, and presto, my co-locate rate dropped even more.
With that in mind, I contacted them to get an idea of how much bandwidth my server uses in a given month. Unbeknown to me, they hooked my server up to an un-metered network connection (unlimited bandwidth). I was floored... customer service above and beyond to say the least.
So I explained that I was tired of upgrading my server every 5 years or so and was considering a new hosting solution. I told them what features I was looking for and what my price range was.
And you know what? They came back and said THEY had the solution for me and would provide it at the same price I've been paying for the last several years.
These guys are truly customer oriented and all around fantastic to work with. I would recommend them any day.
Kansas Hosting
I originally went with them because a friend of mine worked for them (Hi Brian!) and convinced the owner to co-locate at a reasonable rate (a 4U server). Several years later, I built and setup a new server (a 1U server) and sent it to them, and presto, my co-locate rate dropped even more.
With that in mind, I contacted them to get an idea of how much bandwidth my server uses in a given month. Unbeknown to me, they hooked my server up to an un-metered network connection (unlimited bandwidth). I was floored... customer service above and beyond to say the least.
So I explained that I was tired of upgrading my server every 5 years or so and was considering a new hosting solution. I told them what features I was looking for and what my price range was.
And you know what? They came back and said THEY had the solution for me and would provide it at the same price I've been paying for the last several years.
These guys are truly customer oriented and all around fantastic to work with. I would recommend them any day.
Kansas Hosting
Subscribe to:
Posts (Atom)