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.
Continue Reading »
Tags: Cocoa Touch, Constants, Design Patterns, iPhone, Objective-C
Posted in Apple/OS X, Objective-C, Programming, Tech • No Comments »
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 [...]
Continue Reading »
Posted in Apple/OS X, Tech • No Comments »
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.
Continue Reading »
Posted in Apple/OS X • No Comments »
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 [...]
Continue Reading »
Posted in Linux, MySQL, Ubuntu • No Comments »
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 [...]
Continue Reading »
Posted in Apple/OS X, PHP, Tech, Web Dev • No Comments »
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]
Continue Reading »
Posted in Apple/OS X • No Comments »
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)
Continue Reading »
Posted in PHP, Programming, Web Dev • No Comments »
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 [...]
Continue Reading »
Posted in MySQL, Tech • No Comments »
After four months of using OS X, I still do not feel comfortable with it. Here’s why.
Continue Reading »
Posted in Apple/OS X, Tech • No Comments »
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 [...]
Continue Reading »
Posted in Math, Programming • No Comments »