When I’m searching for files, I use this function:
It searches for files and directories with partial matches of the first parameter:
1 2 | |
If I supply a second parameter, it is taken as the directory to search in:
1 2 3 | |
When I’m searching for files, I use this function:
It searches for files and directories with partial matches of the first parameter:
1 2 | |
If I supply a second parameter, it is taken as the directory to search in:
1 2 3 | |
If I do this:
1 2 | |
there is always the doubt whether I’m accessing a local variable, or calling methods foo and foo=.
When you want to call an instance’s own methods, use self:
1 2 | |

The HTML5 history API allows AJAX-based sites to avoid “breaking the back button”. Every time you update the page, you store the new content is the window.history object. When the user presses the back button, you retrieve the current item from window.history and update the page with it.
1 2 | |
While working on my C++ ActiveRecord implementation, I had a few problems implementing the insertion operator for the main ActiveRecord::Base class.
The class ActiveRecord::Base class is a template class, and the problem was how to correctly declare the operator.
At the time I was unable to find examples on the Internet, so I thought I’d provide my own.

I’m trying out Gosu, which is a 2D game library written in C++ with Ruby bindings (Wikipedia article).
I’ve just started using a new kind of abbreviation system for Git:
1
| |
I’ve put together a rake-based system for building C and C++ projects.
I’ve called it Rake::Builder, it’s available on GitHub here.

I have a young relative who draws a lot of comic strips, and thinking it would be nice if he could publish them, I looked around for an Open Source system.
I wanted something that was as near to XKCD as possible - latest comic, next/previous and random.
Not finding anything that was both pretty and ultra-simple, I decided to write my own.
The version for my relative is here -
the system will be up on GitHub as soon as I finish making it configurable.
This is a quick run down of how to get started with using googletest on Ubuntu.
Each C++ object needs to hold its instance data. But, there is often not a perfect match between the sum of the byte sizes of the member variables and the size of an object: The space occupied will often be greater than the sum of the sizes of the member variables.
The reasons are: