It's a somewhat different kind of ring buffer, because there's just one index, but I used it in my signal processing class for a finite-impulse-response filter.
Choose N to be a power of two >= the length of your filter.
Increment index i mod N, write the sample at buffer position x[i], output sum of x[i-k mod N] * a[k] where a[k] are your filter coefficients, repeat with next sample at next time step.
In Brisbane I think our ticketing system cost overhead is maybe 10%?
The cost of the programme rolling out new ticketing infra (the first major ticketing system upgrade in ~15 years since we first got integrated ticketing, going from a stored-value smart card to also being able to tap your credit card) is roughly the same amount of money as the annual revenue from fares.
So hundreds of millions of dollars to be saved then, and that's just for the periodic upgrades, which are an up-front cost and therefore cost you even more in terms of time value of money.
Then as long as the system is in place you need to pay ongoing costs to repair and maintain the equipment, enforcement against anyone who skips the fare, payment network fees, customer service for anyone with payment issues or damaged cards, connectivity service for anything that needs to be networked, etc.
And the overhead percentage depends on the fares. If it was ~10% when the fare was $5, what is it when the fare is $0.50? Well:
> If fare revenue is now only about $20 million per year, does it even cover the cost of fare collection? The current ticketing system rollout was expected to cost $371m, but ended up at $434m – which appears to cover operations for 17 years from 2018… so $25.5m per year. [0]
You'll find that when the number of columns is a multiple of 6 you'll get obvious columns in the dots, and if it's +1 or -1 modulo 6 the columns become diagonal stripes (the process sort of continues for ±2 and at ±3 it's pretty broken down).
It's a fairly straightforward number theory result that every prime > 3 is congruent to ±1 modulo 6 so that's probably what you're seeing.
(Can't be +2 or +4 because that's divisible by 2, can't be +3 because that's divisible by 3, leaving +1 and +5 aka -1.)
I'd suggest high local wealth and economic productivity tend to correlate strongly with increased housing costs.
People move there for the jobs, and the ones who do have jobs tend to have relatively well paying ones, so can pay more for housing. But the ones who don't have a well paying job are in trouble...
Like everyone else, homeless people tend to have ties to specific areas, and by the time you're homeless you tend not to have the capital required to move and restart someplace else.
Basically at what point do you decide you're "failing" (no moral valence intended) in one area in which you have a support network that you're willing to risk moving to a totally new area and starting over? At that point, do you have the resources required to do so successfully?
I live in Boulder and homelessness is a big problem here. Some people tie it to housing costs, which I don't buy. There are nearby towns with housing that is substantially cheaper, within a 30 minute bus ride if you really need to get to Boulder for some reason.
And how good is that support network if it leaves you camping in a tent down by the river? I'm not taking about moving across the state, just down the road a bit.
>There are nearby towns with housing that is substantially cheaper, within a 30 minute bus ride if you really need to get to Boulder for some reason.
That's great! But if you have no place to store your clean (or dirty) clothes, or to shower, how many landlords are going to rent to you? How many employers are going to offer you a job?
You're talking about getting out of homelessness, I'm talking about not becoming homeless in the first place. It's not like rent increases happen overnight
You said "I live in Boulder and homelessness is a big problem here...And how good is that support network if it leaves you camping in a tent down by the river?"
Nope. Definitely not talking about homeless poeple. Gotcha.
I suppose with SQLite files, you could at least in theory diff their SQL-dump representations, though you'd presumably want a way to canonicalise said representation. In a way I suppose each (VCS) commit is a bit like a database migration.
Choose N to be a power of two >= the length of your filter.
Increment index i mod N, write the sample at buffer position x[i], output sum of x[i-k mod N] * a[k] where a[k] are your filter coefficients, repeat with next sample at next time step.
reply