Archive for March, 2006

C++ How to: Convert from string to int and int to string

Posted by CobyR on March 27th, 2006

How do I convert a string to an int in c++? The simplest way is to use the function int std::atoi(const char*) declared in cstdlib. For example, std::atoi(“42”) returns 42. Alternatively, you can use std::strtol() or std::strtoul(). These functions provide more functionality such as the ability to convert hexadecimal or octal number strings, and are […]

Tray Icon in VB6

Posted by CobyR on March 27th, 2006

I had to go back and do a minor upgrade to a VB6 Print Monitor application I created a few years ago. The application is part of a Conference Registration and Check In system. The checkin application is web based and runs against the server. When an attendee checks in the web server puts a […]

Linux on MIPS

Posted by CobyR on March 27th, 2006

The ISO to CD approach for my Indy was flat wrong. I was unable to actually boot from CD’s. So I setup a TFTP server and DHCP server on one of my Ultra 5 workstations and booted the Indy using bootp to start from the network. I was able to get a debian linux 2.4.18 […]

Linux on different architectures

Posted by CobyR on March 25th, 2006

Well as I have been spending more and more time on linux, I decided it was time to break out some of the old hardware. I have an SGI Indy, and several Sun Ultra 5 machines, that still have their native OS’s installed. It’s time to move them to Linux, I’ve decided to use debian […]

Time Measurement in c++

Posted by CobyR on March 24th, 2006

In C++, you can measure time with the following: #include clock_t start,finish; double time; start = clock(); // The Code you want to clock goes here. finish = clock(); time = (double(finish)-double(start))/CLOCKS_PER_SEC;

A little bit of shell scripting…

Posted by CobyR on March 22nd, 2006

The following information was handy since I have not done much in the way of shell scripting in a very long time. Borrowed this information from: Update: (10/7/2008) The above link is no longer valid, and since I didn’t reference enough of it to be useful, this post is now pointless.

std::vector – easy way to get arrays from c++ to Perl

Posted by CobyR on March 22nd, 2006

We have been working on getting the results from our c++ library out to the perl programs in our system. Using SWIG ( Hit some snags with passing arrays of strings. So we changed to using vector’s, and things are work smoothly now. On to createing the class that will represent the Database(s) in the […]

How to Clear the screen in a console app

Posted by CobyR on March 21st, 2006

Having started developing in c++ again, I found my self writing a simple test harness as a console application, haven’t moved up to cppunit yet. It dawned on me that it would be nice to clear the screen at the begining of the test execution. How to do this? I found lots of references to […]

Conference System

Posted by CobyR on March 21st, 2006

I spent last night working on a client’s Conference System Software. This is an annual ritual that usually involves one or two nights work this time of year. I wrote the print system for a web based conference registration system about four years ago for them. Each year they tend to redesign the database, and […]

Blog Software choosen

Posted by CobyR on March 19th, 2006

I’ve played around with various forms of blogging since 1995.  The last four or five years, I have more or less left the topic alone.  I’ve done some work with Wiki’s and other forms of collaborative documentation, but had not found a tool that I liked enough to bother blogging on a regular basis. After […]