by Nate Starner view the original post
View PostZapping Stubborn Files from the Trash in Mac OS X
Sometimes holding the option key down while emptying the trash in Mac OS X is not enough. You may find yourself grappling with a file which claims to be “in use” by another application. In my case, it was located in a trashed Parallels directory. Mind you, I uninstalled Parallels eons ago. So, with the sys [...]
View PostEfficiently Selecting Random Rows From a MySQL Table
It’s tempting to simply use MySQL’s RAND() function to select random records from a table. Consider the following query: However, when considering overhead, this is a rather expensive method to employ. This becomes glaringly apparent when dealing with large datasets. One effective solution is to select the first and last ids, and let PHP generate [...]
View PostParsing Large XML Files Using PHP
I ran into a situation where I needed to parse a large (1 GB) XML file in order to extract the data into a MySQL table. As usual, I did my initial round of research. First, I decided to use the DOMDocument PHP class. First Mistake For my testing, I used a small subset of [...]
View PostOh My Word!
About a month ago, we ran into a problem with hyperlinks in a Microsoft Word document. Wait! What? H-y-p-e-r-l-i-n-k-s? Yup. The most basic operation known in the history of the internet; the fundamental building block for information sharing in today’s technological landscape. So, we decided to build a function in a web application which outputs [...]
View Post