monotone

Monotone - only pull the latest revision of a repository

I have a remote monotone repos I want to pull from, but I really only need the latest revision (Nope, don't need the history. Yes I'm sure. And I really don't want to wait the hour-and-a-half required to get the full history). Is there a quick and easy way I can do that? ...

Avoiding unnecessary sort in SQL Server GROUP BY?

I have tables of data samples, with a timestamp and some data. Each table has a clustered index on the timestamp, and then a data-specific key. Data samples are not necessarily equidistant. I need to downsample the data in a particular time range in order to draw graphs - say, going from 100,000 rows to N, where N is about 50. While I m...

combining git and monotone

I need to work with an monotone repository. However I'm used to git and looking for way to push my changes into monotone (like git-svn). According to monotone doc I can import the monotone repo into git. But do you know some good way to push my changes from git back to monotone? ...

Completely Sorted matrix

Hi, this was asked to me in one of my job interviews - M is a 2d n-by-n matrix in which every row and every column is sorted are all elements are different. I need an O(n) algorithm - Given indices i, j, i0, j0 as input, compute the number of elements of M smaller than M[i, j] and larger than M[i0, j0]. I tried various approaches for t...