How to preserve the Checkbox value after closing the notebook

I am trying to create a to-do list style for the stylesheet. The goal is to have a CellDingbat that is a check box. And after pressing enter, a new cell with a checkbox CellDingbat should be created, just like the style Item.

Initially, I posted the question in another thread, and with the help from @kglr I was able to create a to-do list style that has the desired behavior. Now, to make this to-do list style more practically useful, I would like the state of the Checkbox to be preserved after closing and re-opening the notebook. Can anyone suggest how to achieve this?

How to check effeciently that some changes preserve the topological ordering?

I have an acyclic directed graph with $ k$ connected components. I also have a topological ordering $ L$ (a sequence of vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering).

So, let’s say for example $ L = i_0,i_1,..,i_n$ .

I have the following operations:

  1. Exchange(i,j): it simply exchange the positions of i and j in the list. Meaning that $ L = ..,i,..,j,..$ becomes $ L’=..,j,..,i..$

  2. Inserting(i,p): it simply remove $ i$ from its position and inserts it in position $ p$ . Meaning that we have $ L=a,b,c,i,d,e,f$ then inserting(i,6) gives $ L”=a,b,c,d,e,i,f$ .

Now how to check that $ L’$ and $ L”$ are also valid topological sorting? Apart from doing a graph traversal of course because I want to exploit the two facts: i) the graph comes in $ k$ connected components and ii) some parts of $ L$ remain unchanged in $ L’$ and $ L”$ so its not useful to check them. Please consider indicating the complexity of your approaches.

Can Channel Divinity: Preserve Life target swallowed creatures?

I saw this question and was reminded of something that happened in one of my games recently: I, as a Life Cleric, used my Channel Divinity: Preserve Life feature on an ally who had been swallowed (It didn’t affect the outcome significantly; I had two other possible plans that would probably have saved said ally).

But I’m curious. My ally had total cover, which prevented targetting her with a spell (say, Mass Cure Wounds, as in the linked question). But Preserve Life is not a spell. RAW, is this legal?

How does Tor preserve anonymity if it uses normal Internet Routing?

I’m studying Tor and Onion Routing and I don’t understand how it preserves anonymity if the Internet routing is still done using public ip addresses.

Let’s suppose we have the following Tor circuit: Tor Browser -> A -> B -> C -> Server. If someone follows the traffic from relay to relay then the anonymity is broken. Even though it uses 3 layers of encryption the routing is done by public ip addresses which are in clear text in the ip header.

Or when the server responds back it sends the packets to the public ip address of C. Some authority could follow to route from the server to C to B to A to the client and knows that the client is communicating with the server.

Can anyone say if I’m right? Or the entire security of Tor is based on the fact that no one can ever control all 3 relays (or statistically is very improbable)?

How can I preserve the uniqueness of a document without a database?

I’m willing to create a system of transferable documents (identified by it’s ID) whose author can transfer his ownership of that document to another person (identified by his/her ID).

For example:

  1. Alice; owner of document 1.
  2. Alice transfers his ownership of that document to Bob.
  3. Now: Bob is owner of document 1. 4. Alice says she is the owner of document 1, but she fails.

(Item 4 is very important)

We can make sure that the system with it’s author remains untouched by using digital signature. But if Alice made a copy of that document signed when she was the owner, there would be no way to prevent her from saying she is not the owner of the document.

So we would need something to make a signature to expire whenever it is transferred.

IF I HAD A DATABASE: I would simply add that signature to a ban list.

Are there any solutions to preserve the uniqueness of this document?

Why multiplying float number by multiple of 10 seems to preserve better precision?

It is famous that for float numbers:

.1 + .2 != .3 

but

1+2=3 

It seems that multiplying floats by 10 allows you to preserve more precision. To further illustrate the case, we can do this in python:

sum([3000000000.001]*300) #900000000000.2957  sum([3000000000.001 * 1000]*300) / 1000 #900000000000.3 

By multiplying each element in the list by 1000 and divide the sum of the list by 1000, I can get the “correct” answer. I am wondering: 1) why it’s the case. 2) Will this always work, and 3) At what magnitude, will this method backfire, if it will.

What structure do natural isomorphisms preserve?

My understanding from model theory is that, given groups A and B, the statement $ A \cong B $ implies that any for any first order statement $ P$ in the language of groups, $ P(A) \iff P(B) $ .

Can an analogous statement be made for naturally isomorphic functors F and G? IE is it true that $ F \cong G \implies P(F) \iff P(G)$ for some collection of propositions about functors?

I’ve been told that isomorphisms are the “right” notion of equivalence for algebraic structures because they “preserve structure,” and I’m struggling greatly to see why natural isomorphisms are the “right” notion of equivalence of functors.

I’ve seen explainations like:

Set functions $ X \times C \rightarrow D $ can be identified with functions $ X \rightarrow D^C $ . Morphisms in a category $ X$ can be identified with functors $ 2 \rightarrow X$ , so morphisms in the functor category $ D^C$ should be identified with functors $ 2 \rightarrow D^C$ . But in analogy with set functions, $ 2\rightarrow D^C$ ‘equals’ $ 2 \times C \rightarrow D$ from which the definition of natural transformations can be derived.

The above explanation intuitively relates to a basic property of set functions and products, but doesn’t on the surface tell me about what specifically is true/preserved about isomorphic functors.

The definition of natural transformation is forced if we mandate that $ Cat$ be cartesian closed, but again I fail to see the relation to preservation of ‘structure.’

I’ve seen references to the ‘principle of equivalence’ which seems to support the idea that isomorphic objects should be be indistinguishable in some language.

From ncatlab:

Michael Makkai proposed the Principle of Isomorphism, “all grammatically correct properties of objects of a fixed category are to be invariant under isomorphism”

How does the definition of natural isomorphisms make this statement true in the category $ D^C$ with functors as objects and morphisms as natural transformations? What’s invariant? If natural transformations represent a “change in perspective” analogous to conjugation, what is preserved between the perspectives?

Can anyone give a formalization of the ideas behind the responses at https://math.stackexchange.com/questions/1077895/functorial-properties-preserved-by-natural-isomorphism?

I’m really stuck here. I feel like I’m missing something obvious.

Further reading: https://math.stackexchange.com/questions/1432782/how-different-can-equivalent-categories-be, https://math.stackexchange.com/questions/1685227/why-not-just-define-equivalence-relations-on-objects-and-morphisms-for-equivalen, and Can skeleta simplify category theory?.

Google Sheets – How to preserve colors of each series from changing when inserting new data in Chart Editor?

This issue occurs on every chart type. As an example, I have a pie chart created from a long table of data where each column is assigned a specific text color, so each slice of the pie corresponds to the color of that column. I maintain this color coding on various other graphs of the same data to aid in reading the data.

When I insert a new column into the table data, I want to assign it a new color, and have its slice take that color. The new data is inserted into the series of the pie chart. However, the series will not keep their assigned colors, instead the inserted series will take the color of the series that was in its place, causing a domino effect as every series after will shift its color. The last series will have a new color. As such all the slices in the chart after the inserted slice will no longer correspond to the color of its column.

Chart before and after inserting new data

I then have to manually change each series back to its original assigned color which is extremely time-consuming and frustrating every time I want to insert new data.

How can I preserve the color of each slice/series so that the colors don’t all change when I insert new data?