Category Archive for 'Tech'

Constants in Objective-C

If you’re a Java programmer developing on the iPhone platform, you’ve probably wondered about how to set constants in your programs. Undoubtedly, you have have come across the #define preprocessor macro, and maybe a few other methods, but I’m going to show you my approach to this problem using the singleton design pattern.

OS X Inconsistencies

Many people are surprised to hear me say that I don’t think OS X has a well-designed GUI. As one of my professors puts it (I paraphrase):
Criticism is good. Criticism leads to change. Criticism makes things better.
In this post, I will try to do my part in making OS X better. The following [...]

BootCamp still in Beta?

BootCamp makes users reinstall OS X or buy software that shouldn’t be needed, in order to load another operating system on Apple hardware. My frustration with Apple products — particularly with OS X — is slowly but surely raising my blood pressure to levels I have never seen during my marriage to Windows.

Resetting MySQL Passwords

I downloaded a Ubuntu 8.10 VMPlanet.net image with MySQL server, but the root password was set to something other than the standard vmplanet.net password. Logging in without a password or username didn’t give me enough permissions to set my own users and change passwords. Here is the solution for this problem (thanks Keystone [...]

OS X .htaccess

For some reason, I could not get .htaccess files to work on my system for the longest time. I’ve since upgraded to Leopard, and I eventually just gave up on it (I could do that, since I’m only running a development environment).
Anyway, the solution depends on which version you’re running:
For Tiger, edit /private/etc/httpd.conf AND [...]

OSX, Octave, Gnuplot

To lessen the pain, here’s a tutorial on how to install gnuplot with Octave on OS X:
http://island94.org/setting-octave-and-gnuplot-osx
[EDIT: This method may be obsolete now]

PHP and Internalization

I was recently tasked with supporting multiple languages in a PHP script. I found an article on about.com that was a good starting point. The author basically suggested creating associative arrays with different translations:
(P.S. I modified his code just a little to better conform to PHP 5 standards)

MySQL Triggers

I came across an interesting problem: I needed to create priorities for records in a database so that they would be able to be displayed in a particular order. Moreover, I needed to find a way to reorder the priorities on the fly. My first instinct was for each record to have its [...]

…Four Months Later

After four months of using OS X, I still do not feel comfortable with it. Here’s why.

TI-85 KNN Classifier

Not really a KNN Classifier, as much as a mass, N-dimension euclidean distance calculator.
Input is a Matrix MAT of all the points to test against (row-based), and a Vector X the point to test against. Output is a Nx1 matrix V of all the distances between X and each row of the Matrix (in [...]