A belated happy new year! I’ve been reading a lot of ‘lifehacker’ blogs recently - the original LifeHacker, ZenHabits and unclutterer.com being the main three - and am hoping that 2009 will be a good year to declutter (both digitally and in the real world!). I thought it best, then, to outline some goals at the start of the year and see where I get with them over the remaining 359 days. Read the rest of this entry »
I am currently using rsync as a backup solution between two computers and an external backup drive, all operating across my wireless LAN. However, every so often - and always when syncing a lot of files - rsync has knocked out my wireless internet. Today, I decided to find out what was going on, and found the solution:
rsync --bwlimit=500 ...
It turns out that rsync was overloading my router with data, causing it to reset the connection. Setting a bandwidth limit (in kBPS) to one nearer that of the router prevents overloading, and allows the scripts to complete.
If storing a date/timestamp in a varchar or text field in postgres, the to_timestamp() function will let you access the value as a ‘real’ date. The second parameter tells the function the format of your string:
SELECT to_timestamp('2008-08-01', 'YYYY-MM-DD') AS date;
A frustrating problem I came across today when I tried binding an NSPopUpButton’s selection key to an NSArrayController’s selection was that the NSPopUpButton would always display a ‘ghost’ object -one of the opaque classes internal to Cocoa/Core-Data Bindings(<_NSControllerObjectProxy… or similar).
It turns out that NSPopUpButton does not record the user’s selection, so even if I had been able to get rid of the ghost object, I wouldn’t have been able to access the selected object.
The solution is to manually maintain a currently selected object in the window controller - File’s Owner in Interface Builder; in this case, selectedPackage: