November 29, 2009 - 5:19 pm
Posted in apple, technology | No comments
To reset Xcode to the default settings:
$ defaults delete com.apple.Xcode
$ rm -rf ~/Library/Application\ Support/Xcode
First, I dislike having a lot of popup windows so I set the layout to “All-In-One” to keep most things within a single window:
And my usual indentation style:
I like having the files autosaved on build:
=
August 21, 2009 - 11:31 pm
Posted in technology | No comments
I’d been using the sqlite3 that came installed on Mac OS X but I ran into some portability issues — not every system has it installed. So I decided to bite the bullet and include it with my code.
It was trivial! I downloaded a zip with 3 files (sqlite3.c,sqlite3.h, and sqlite3ext.h). [...]
May 21, 2009 - 7:29 pm
Posted in technology | No comments
So last week I wrote about initializing a std::map from two std::vectors. How about doing the reverse? How do I get a list of the keys or a list of the values into a vector?
So I wrote a functor, based on std::unary_function, that returns the pair.first and another that returns the pair.second:
#include <utility>
#include [...]
May 19, 2009 - 9:22 pm
Posted in technology | No comments
I was using the std::stream_iterator, for example:
std::vector<int> vals;
vals.push_back (12);
vals.push_back (22);
vals.push_back (5);
vals.push_back (30);
// The std::ostream_iterator appends the ","
std::ostringstream str3;
std::copy (vals.begin(), vals.end(), std::ostream_iterator<int> (str3, ","));
[...]
May 8, 2009 - 8:24 pm
Posted in technology | No comments
I had two vector’s with the first being the keys and the second being the values. It took a couple tries before I got the STL working for me!
The first thing was to check if the std::map constructors had something useful. It certainly seems like taking two sets of iterators would be a [...]
May 6, 2009 - 9:40 pm
Posted in technology | No comments
I’ve gotten pretty careful about keeping time in UTC and then converting it to localtime for the user to understand. For the first time, I actually had to find the localtime in a non-local timezone. It’s ugly. It seems you have to mess with the TZ environment variable. Here’s what I [...]