## homological algebra – Is every middle exact functor a derived functor?

Assume for the sake of simplicity we are working with categories of modules over some ring. Call a functor $$F$$ middle exact if for an exact sequence $$0 to A to B to C to 0$$, we have that $$FA to FB to FC$$ is exact.

We know that for any right (resp. left) exact functor $$F$$, $$L_nF$$ (resp. $$R^nF$$) are middle exact, since they fit into a long exact sequence
$$… to L_n(A) to L_n(B) to L_n(C) to …$$

1. Is it then true that any middle exact functor $$F$$ comes from this construction, i.e. $$F = L_nG$$ or $$R^nG$$ for some $$G$$?

2. Is there a way to compute $$G$$ and $$n$$, given that we know $$F=L_nG$$ (or $$R^nG$$)?

## find my iphone – How does the Tech Support know my exact location given my location services is turned off?

When I logged in to support.apple.com and search for the nearest service provider, it said it is not possible, as I expected. My location services are turned off since Day 1. There is no particular reason, I just do not need that for the device in question. Only one device is added to the particular account, and I never really carry this device to anywhere.

I remember to have search up my zip code once (on the support website to get the nearest provider) which probably might be available to them (albeit unlikely), or they probably have the data because of the details provided by Apple Store from where I purchased it.

It freaks me out, since I do not see something that they see. Not because they have the details.

## landscape – Where can I find lots of high-quality photos taken in the same exact location – but at many different times?

A lot of you might be familiar with macOS’s ‘Dynamic Wallpapers’.
The basic idea is: a wallpaper that shows a picture of a location at different times of day. Apple, for example, took 16 different shots of the Mojave desert to create a beautiful, dynamic wallpaper that matches your local time. I’m using this Windows adaption which works fantastically. However, I would like to create my own version of this concept that not only matches time of day, but local weather conditions as well.

To get to my question: Where can I find lots of high quality images of a location (landscape, city, anything) taken from the same exact spot, with the same camera, angle and lens (and so on) but at many different times and weather conditions? Ideally, with many such combinations – rainy midnight, overcast 3 AM, clear noon, …

My first thought was to look for live webcams and sample these images over a longer period of time – but there aren’t that many 4K+ webcams to begin with – and those that are available would still show pretty bad compression artifacts from the livestream. Apple uses very high resolution images to accomodate their Pro lineup of displays, which makes their implementation look great.

Perhaps there are stationary cameras that take periodic images instead of streaming a live video feed? Unfortunately, googling did nothing for me in that regard.

The obvious solution would be to take these pictures myself, but I would need a lot of time, great scenery and an expensive camera + lens for the desired results, none of which are available to me.

I know this is a long shot, but if anyone knows an image source that would match my description, I would be able to move forward with my idea. Thanks a lot!

PS: If you know a better place to ask this question (different forum, subreddit, etc.) that would, of course, also help a lot.

## list manipulation – exact division and geometric sequences

I imagine this problem has a name that I don’t know; it’s probably some sort of exact division problem. Here goes: imagine you have to divide 4 cookies among 11 people. Divide the cookies equally among the 11 people with the constraint that you are a World Champion at halving cookies. 🙂

So naturally, you just halve all the cookies until there are more pieces than people, then repeat for each new size. With the (4, 11) case above, there are 4 pieces to start. Halve them all until there are 16 pieces and everyone eats one piece. There are five pieces left over, halve them all until there are 20, everyone eats one…you get the idea.

It’s lovely that each person will get 1/4 + 1/16 + 1/32 + 1/64 + 1/256 + 1/4096 + 1/16384 + … = 4/11 of the total.

But the pretty part — for me! — is that the sequence above is not geometric; it’s actually five different geometric sequences. (That’s how I see it, anyway.) It’s 1/4 + 1/4096 + … and 1/16 + 1/16384 + … and so on; each of the five sequences has a common ratio of 1/1024, so it’s straightforward to show the sum is exactly 4/11.

Here’s the Mathematica part. With pen & paper, it took a little playing around to realize that the denominators of the first five terms above are 4, 16, 32, 64, 256, and then the structure of the problem repeats. At that point, the doubling process gives the same number of “remaining” pieces, so those five denominators are the foundation of the sum. Just to check, I computed

``````Total(
Sum(1/2^# (1/2^10)^n, {n, 0, Infinity}) & /@ {2, 4, 5, 6, 8}
)
``````

The result is, in fact, 4/11. Sweet. Similarly, I tried two other cases: 3 cookies and 5 people as well as 5 cookies and 9 people. The pattern so far is this, where the formatting is (cookies, people) –> listOfPortions.

(3, 5) –> {1/2, 1/16, 1/32, 1/256, …}

(5, 9) –> {1/2, 1/32, 1/64, 1/128, 1/2048, …}

Each case “works,” and each person would end up with c/p as the total amount. But despite having three examples, I don’t see an explicit pattern, and I think there are few ways to describe the pattern. I could describe it in terms of the actual portions, or I could describe it with the exponents on each denominator. So at this point, I have three questions:

• does this problem have a name?!

• do you have hints or suggestions for a function like `portions(c, p, n)` that gives the first `n` terms of the sequence based on `c` cookies and `p` people?

• follow up: how would you present this problem to a group of students? what are your thoughts? what other functions or computations would you show them?

I know the SE community asks its users to come prepared and ask good questions. I know almost all of the content on here is more sophisticated than this problem. So I’m not asking anyone to code this for me but rather suggestions or things to try. The logic is straightforward: double the current number of pieces until it exceeds the number of people, subtract the number of people from that doubled number, and repeat. But I’m not sure how to translate that into the terms of a sequence that will sum to c/p. This feels like a `NestList()` or `NestWhileList()` situation, but I don’t have it yet.

I appreciate any suggestions. Thanks!

## python – Exact probability for coin flip streaks

This question determined the probability of having a streak of six heads or six tails in 100 coin flips. But only experimentally, trying it 10,000 times and counting how often it was true (and then dividing that by 10,000). It’s about 80%.

I decided to compute the exact probability. There are 2100 possible outcomes of 100 flips. So compute how many of them have such a streak, and then divide by 2100

My naive solution gets me the number for 20 flips in few seconds:

``````from itertools import product

def naive(flips, streak):
return sum('h' * streak in ''.join(p) or
't' * streak in ''.join(p)
for p in product('ht', repeat=flips))
``````

Result:

``````>>> naive(20, 6)
248384
``````

My fast solution gets me the number for 100 flips instantly:

``````from collections import Counter

def fast(flips, streak):
needles = 'h' * streak, 't' * streak
groups = {'-' * streak: 1}
total = 0
for i in range(flips):
next_groups = Counter()
for ending, count in groups.items():
for coin in 'ht':
new_ending = ending(1:) + coin
if new_ending in needles:
total += count * 2**(flips - 1 - i)
else:
next_groups(new_ending) += count
groups = next_groups
``````

The idea is to have a pool of still ongoing games, but grouped by the last six flips, and counts for how often that group has appeared. Then do the 100 flips one at a time, updating the groups and their counts. Any group that at some point ends with a streak doesn’t continue playing, instead I add it to the total result. The group occurred `count` times, there are `flips - 1 - i` flips left, and they can be anything, so multiply `count` with 2flips – 1 – i.

Results:

``````>>> fast(20, 6)
248384
>>> fast(100, 6)
1022766552856718355261682015984
``````

And dividing by 2100 gives me the percentage similar to those of the linked-to experiments:

``````>>> 100 * fast(100, 6) / 2**100
80.68205487163246
``````

Any comments, suggestions for improvement?

## Exact duplicates in Google Contacts not found in “Duplicates”

When I export a contact of Google Contacts in Google CSV format and import it again without changing the file, I get two exact the same contacts. Google can not find it in Duplicates:

Background: I have a website that creates that CSV also and after import it created many duplicates. I tried to solve it and found out that a simple export and import creates the same problem. Is it a bug in Google Contacts or can I do something to solve this problem?

This is the content of the CSV file:

```Name,Given Name,Additional Name,Family Name,Yomi Name,Given Name Yomi,Additional Name Yomi,Family Name Yomi,Name Prefix,Name Suffix,Initials,Nickname,Short Name,Maiden Name,Birthday,Gender,Location,Billing Information,Directory Server,Mileage,Occupation,Hobby,Sensitivity,Priority,Subject,Notes,Language,Photo,Group Membership,Organization 1 - Type,Organization 1 - Name,Organization 1 - Yomi Name,Organization 1 - Title,Organization 1 - Department,Organization 1 - Symbol,Organization 1 - Location,Organization 1 - Job Description,Website 1 - Type,Website 1 - Value Jan Puin,Jan,Puin,,,,,,,,,,,,,,,,,,,,,,,Belgisch bedrijf die hier nog niets hebben. Stageloper.,,,,,Company.Be,,,,,,,LinkedIn,https://www.linkedin.com/in/mark-rutte/```

## iphone – How is iOS capable of storing two photos with the **exact** same filename in the same folder?

Some backstory: I wanted to transfer some photos from my iPhone X (running iOS 13.6) to my Windows 10 PC (running Version 2004 – the “May 2020 Update”) in their original, HEIC format. I noticed that whenever you upload a photo to a cloud storage platform (Google Drive, OneDrive) or via email (for example, the default Mail, Gmail, or Outlook apps), the HEIC photo is converted to a JPG file format. The only way to transfer the original HEIC format is via iTunes (or some other equivalent software), or – more quickly – by just connecting the iPhone via USB and using Windows’ File Explorer to retrieve the file.

So, I did the latter and was browsing the directory for the photo that I wanted. Let’s say, for example’s sake, that the photo’s filename was “IMG_100.HEIC”. The corresponding directory structure was: `This PCApple iPhoneInternal StorageDCIM120APPLEIMG_100.HEIC`. However, I was shocked to see that there were – in fact – two files named “IMG_100.HEIC” in the exact same folder! What’s more is that the photos weren’t even the same (different date taken, different location, etc).

So, how is this even possible and how come iOS is able to store multiple photos with identical filenames in the same directory – something that is generally forbidden to do, to my knowledge, at least in Windows?

## Giving an exact position to a set of selected layers Photoshop

I have selected an image made out of multiple layers but I want it to have an exact distance from left, right, up and down. so far, I can only use my eyes to move the picture but how to set an exact distance for the layers?