Tag Archives: hack

[JavaScript] Finding Equidistant Lat/Long Coordinates

Here’s a quick one that was inspired by a StackOverflow question and built using the references posted here. It allows you to compute the position of an arbitrary number of points (expressed as latitude/longitude pairs) equidistant from a given centerpoint … Continue reading

Posted in coding, javascript | Tagged , , , , | 1 Comment

[JavaScript] Creating an Animated Hurricane Tracker

Here’s a fun little diversion I came up with when the news was all abuzz with information about Hurricane Irene. Now I use Wikipedia almost exclusively for keeping track of this sort of thing as I find that it consistently … Continue reading

Posted in coding, javascript | Tagged , , | 1 Comment

Resurrecting sun.misc.Unsafe

Here’s one that only the hardcore Java hackers will enjoy. Perhaps you are already familiar with sun.misc.Unsafe. This heavily protected internal class provides access to a number of low-level memory operations and system functions that are generally hidden away from … Continue reading

Posted in coding, java | Tagged , | 2 Comments

[Objective-C + Cocoa] iPhone Screen Capture Revisited

Awhile back I posted a handful of simple iOS utilities. Among them was a basic ScreenCaptureView implementation that would periodically render the contents of its subview(s) into a UIImage that was exposed as a publicly accessible property. This provides the … Continue reading

Posted in coding, objective-c | Tagged , , , | 156 Comments

[Java] Override HTTP Request Parameters

Often in a Java web-application I come across cases where it would be useful to directly override or modify one or more HTTP request parameters. To be clear, by “request parameter” I am referring to the value that is returned … Continue reading

Posted in coding, java | Tagged , , | 2 Comments

[Objective-C + Cocoa] Screen Capture, Multiplexing, and More

It’s been a bit quiet on the coding-front lately, so I thought I’d share a small handful of various utilities that I’ve developed over the past few weeks. None of them are particularly revolutionary, but they can certainly prove useful … Continue reading

Posted in coding, objective-c | Tagged , , , | 16 Comments

[JavaScript + CSS] Fun with Google Maps

Here are a couple of quick Google Maps hacks that I came up with quite awhile ago; several years ago, in fact. While not hugely useful or profound, they do expose some fairly large holes in the Google Maps API. … Continue reading

Posted in coding, javascript | Tagged , , | 2 Comments

[Cocoa + iPhone] Avoiding ‘_handleMemoryWarning:’ Crashes

Spend enough time developing iPhone applications (particularly if you go to the trouble of collecting crash logs from your apps), and eventually you are bound to come across something like the following: This error occurs most frequently when suspending an … Continue reading

Posted in coding, objective-c | Tagged , , | 1 Comment

[Cocoa + iPhone] UITableViewCell: It’s Broken!

I present for your consideration the following screenshot: It shows a basic table-view, in which each cell has been assigned the same image (using its built-in ‘imageView‘ property). The source image is 20 pixels square, and the imageView’s ‘contentMode‘ property … Continue reading

Posted in coding, objective-c | Tagged , , , | Leave a comment

[Cocoa + iPhone] Unraveling Apple’s Pagecurl

First off, I encourage anyone that’s unfamiliar of this topic to read through this short but very sweet blog post on the subject (and to take a quick look at his sample code). We’ll be picking up where Steven left … Continue reading

Posted in coding, objective-c | Tagged , , , | 10 Comments