It took a while, but I finally feel I can get auto layout to do the basic things that I need it to do. I’ve put together a test app with a few different layouts – each in a separate view controller. My approach to work with auto layout has been: Define the layout and behavior of the objects to put in the view Add one by one the elements
Category: "Technology"
New install of Mapnik on iMac with Mac OSX Lion
Another mapnik install, another set of issues… I had a brand new OSX Lion install on my imac, but had a few issues with the brew install of Mapnik as I wanted to link it to Cairo. See the Homebrew Mapnik instruction page brew install python Change the .bash_profile to add export PATH=/usr/local/bin:/usr/local/sbin:$PATH. brew install git brew install postgresql brew install icu4c brew install proj brew install libtiff brew install
On extracting timetable/spreadsheet data from PDF files
For my work on Kemtro, I recently explored how I could extract timetable information available in PDF files. There are still many transport agencies that do not want (or can’t for various reasons) make their data available in a friendly format (GTFS). I’m not aware of any easy and centralized way of doing that, so I did what I typically do when it comes to ‘liberating’ data: I first scraped
Debian and Postgres – missing locales
Problem: (postgres)-# create database “newdb” WITH ENCODING = ‘UTF8′ LC_CTYPE=’en_US.utf8′ LC_COLLATE=’en_US.utf8′ TEMPLATE template0; createdb: database creation failed: ERROR: encoding UTF8 does not match locale en_US DETAIL: The chosen LC_CTYPE setting requires encoding LATIN1. 1 2 3 (postgres)-# create database “newdb” WITH ENCODING = ‘UTF8′ LC_CTYPE=’en_US.utf8′ LC_COLLATE=’en_US.utf8′ TEMPLATE template0; createdb: database creation failed: ERROR: encoding UTF8 does not match locale en_US DETAIL: The chosen LC_CTYPE setting requires encoding LATIN1. Check what
Quick solution for sudo issue with missing pam configuration file
Spent a bit too long fixing a sudo problem right after an apt-get upgrade on a Debian machine. The original problem: # sudo ls sudo: unable to initialize PAM: No such file or directory 1 2 # sudo ls sudo: unable to initialize PAM: No such file or directory Sudo errors are logged with syslog by default. Some message should be in one of the /var/log/xx.log files. If you don’t