// archives

C / C++ / Objective-C

This category contains 7 posts

C Preprocessor Life Saver(s) – Part 1

More and more when I write code, I’m looking for optimizations, short cuts and less typing. This can mean a careful balance between maintainable code and author convenience. Here’s an example of something I use in every program I write. I use the preprocessor to define debug modes for myself to produce debug output under […]

Getting OpenCV setup on Fedora Linux with QT

Funny thing I’ve found about Linux distros and software applications… settings are meant to be paid attention to and tweaked. There are no common folder layouts that one should really count on. Maybe /bin or /usr/bin. But anyway, getting a QT project setup to utilize OpenCV libs was interesting. Here’s what I did: 1. Install […]

Getting OpenCV setup on iOS

Let me start off by saying, I don’t claim to be an expert. I had to find out how to get OpenCV running on an iOS device by reading a lot of other people’s advice, hacking, then trial and error. Step 1. Use port to install OpenCV and all the dependencies. sudo port selfupdate sudo […]

plotto the office lottery pool iphone app

Update: 2011-08-27 – Price change to $.95! yes, just Ninety-Five cents! Rock out America! – Version 1.1 coming soon! – Also, there’s been some curiosity about data persistence in the app, so let me clear this up. All app data is stored on the phone using a SQLite database. No data is stored remotely and […]

Book Review: Programming iOS 4

“Programming iOS 4” by Matt Neuburg; O’Reilly Media Summary: Good book. Lots of background on Objective-C. Good for experienced programmers that are new to programming Objective-C and those needing review of the basics. Great for programmers new to iOS. I’ve just finished reading “Programming iOS 4” by Matt Neuburg. It’s a book about programming Objective-C […]

ANSI C++ MySQL Client Wrapper Class

So as you can imagine by the title, I was recently tasked with working on a command line project for MySQL. I wanted to be able to reuse whatever I made, so that meant creating a down and dirty wrapper class for some of the MySQL C API functions. This is my start. Another requirement […]

CGI Hit Counter

C++ Hit Counter, 1.0. Non-Object Oriented. Pretty light weight. // // HitCounter // @author Randy Melder // @version 1.0 // #include <iostream> #include <fstream> using namespace std; // file name const char *filename = “/tmp/hits.bin”; // quantity of hits struct Hits { long unsigned num_hits; }; void readHitsFile(const char *file_name, Hits *hits); void writeHitsFile(const char […]

%d bloggers like this: