Quantcast
Channel: David Janes' Code Weblog » tips
Browsing index pages (10 articles)

NSURLConnection, ETag and caching

If you’re using NSURLConnection and using If-None-Match/ETag and you’re depending on getting a 304 status to determine that “nothing changed”, make sure you do this: [request...

View Article


iTunes & Missing Files

If you’re like me and keep your iTunes files on external disks, you’ll occasionally end up in a situation where the external disk is not available and iTunes ends up marking all your files with an...

View Article


Python, Sqlite3, FTS3 & MacOSX

If you can’t load FTS3 on a Mac, this post on StackOverflow tells you how to solve the problem. The final bit of magic is in: from pysqlite2 import dbapi2 as sqlite3

View Article

Good-bye Delicious

Yahoo sold Delicious to another company and for the most part it hasn’t worked for me since the transition. I don’t use the “social” part of the bookmarking: I just try to bookmark every interesting...

View Article

Adding alpha levels to images with PIL

I recently was tasked by a client with replacing a number of images — PNGs with alpha levels, such that parts of the image were transparent — with new pictures. The issue was how to get the exact same...

View Article


How to add XCode '#pragma mark'-like sections for Python code

Just add in your Python comments: # MARK: comment # TODO: comment # FIXME: comment # !!!: comment # ???: comment From here.

View Article

Image may be NSFW.
Clik here to view.

Make INPUT fields select dates using the YUI Calendar Control

Here’s a lengthy Javascript code segment that can be dropped into any of your existing forms that provide for a date selection range. It has the following functionality: clicking a date field pops up a...

View Article

PIL, libjpeg, jpeg and Mac OS/X Snow Leopard

If you want to the use the Python Imaging Library on Mac OS/X Snow Leopard, these instructions appear to be the best way to to get libjpeg installed: 1. Download the source from...

View Article


Django 1.1 and ImageField

Having recently upgraded to Django 1.1, I suddenly started getting the error messages that look like: File "/Library/Python/2.6/site-packages/django/db/models/fields/related.py", line 257, in __get__...

View Article


18 Hours of JAR Hell with Android & Google Maps

Yesterday, my experiments came with Android programming came to a crashing halt when I tried to use the Google Maps libraries. No matter what I tried – adding every possible Google Maps SDK, manually...

View Article
Browsing index pages (10 articles)


Latest Images