## Is equal spacing in Stacks in design tools useful?

More and more design tools are implementing some form of stacked groups that allow you to automatically set vertical spacing between the items in the group. The way this is implemented is that a single value for the spacing between all elements in the group is set and applied.

I’m questioning the validity of this. When I have a few elements stacked vertically the spacing between those elements is most likely not all going to be the same. Therefore I don’t see the point of having a single value spacing in a vertical stack. Am I an exception here? Or am I missing something?

Example of a vertical stack:

• Paragraph
• Image
• Paragraph

## Equal partition up to one integer

In the partition problem, a set of positive integers has to be partitioned into two subsets with an equal sum. This problem is known to be NP-hard. But the following variant is easy:

Partition a set of integers into two subsets, such that the difference between their sums is at most the largest integer.

A solution always exists, and can be found using the following algorithm:

• Order the integers by descending value.
• Put the largest integer in subset A, the second in subset B, the third in subset A, etc.

The sum in subset A is always at least as large as the sum in subset B, but if we remove the largest integer from subset A, then the sum in subset B is at least as large as the remainder. Hence, the partition is equal up to one integer.

MY QUESTION IS: what happens when there are cardinality constraints on the subsets? For example, suppose there are $$4 m$$ integers, subset A must contain $$m$$ and subset B must contain $$3 m$$ integers. The algorithm above does not work, and indeed an equal partition up-to-one-integer may not exist. What is an algorithm to decide whether such a partition exists?

## Read calculated column previous value if status equal Closed

I have a “Days Past Due” calculated Column and used your calculated formula (link Sharepoint 2013 Custom List Calculate difference between Today and Column Value) and is working fine. But there is another column called [Status] and if value equals “Closed” then it should bring the previous days value. Meaning will freeze the value and will not get changed next day.

Example: Days Past due-> “7 days Past” and Status-> “In Progress” then tomorrow it should increase by one. But if I edit the item tomorrow and set Status-> “Closed” then it should show previous calculated column data which is “7 days Past”

Below is the code I tried but did not get result.

=IF(ISBLANK([Target Completion Date]),"Missing date",     IF(OR(Status="1. Open",Status="2. In Progress"),     "<img src='/_layouts/images/blank.gif'      onload=""{"       & "    var SPday=new Date(); "       & " SPday.setFullYear("       & YEAR([Target Completion Date])       & ","       & MONTH([Target Completion Date])-1       & ","&DAY([Target Completion Date])       & ");"       & " var Days=Math.round((SPday.getTime()-new Date().getTime())/86400000);"       & "    this.parentNode.innerHTML=Math.abs(Days)+' days '+((Days<0)?'past':'left');"       & "}"">","<img src='/_layouts/images/blank.gif' onload=""{ "       & "    var Days=this.parentNode.text();"       & "    this.parentNode.innerHTML=Days;"       & "}"">"     ) ) 

Any help will be appreciated.

Thanks a lot.

## Player takes my fluff descriptions as equal to crunch, and when I disagree, says “You’re letting rules get in the way of the story” [on hold]

(Disclaimer: This is a hypothetical question in the sense that I’m not currently in this situation. However, it’s not entirely made up; it’s very closely based on a situation I saw someone else on a forum experiencing, and I found it so interesting I wanted to see what this community thought about it. So in the rest of this message, I assume a persona based on the GM who presented this situation to me.)

I GM mainly 3.X/D20 systems and other rules-heavy traditional systems. Most of my players seem OK with how I GM, and then there’s one guy. I’ll call him Kamina, because he loves “being cool” and shonen-anime-esque over-the-top-ness. He’s always trying to do stuff like this. Often I/we get into arguments with him over this, but I don’t think Rule of Cool is the whole issue here…

Kamina tends to take a long time on his turns. He likes adding colorful description and narration. To make it very clear, I’m OK with players narrating some stuff, adding to the conversation… so long as they realize how I GM. When I GM, I add fluff description myself, but (at least in these crunchy trad games) that’s all it is: fluff. I understand these systems as drawing a line between “rules” and “fluff”, and I hope my players can recognize that distinction. Kamina doesn’t. When players contribute narration, I hope they’ll expect me to treat it the same way I expect them to treat my narration; IE, a lot of it will be regarded as color that doesn’t impact future rules invocations. Kamina doesn’t. He spends lots of time analyzing every word I (and sometimes other players) say and then figuring how to incorporate those details into his narration and actions.

Kamina’s “creativity” mostly looks to me like trying to do stuff that’s totally outside the rules, or more insidiously, stuff that’s functionally already there in the rules. Like, he’ll describe his character aiming for a bad guy’s weak spot in a system where there are no called shot rules, and then he’ll get annoyed when I don’t give him a to-hit or damage bonus for it. I assume that, if there are no called shot rules, that aiming is abstracted into the standard to-hit and damage rules. I assume that characters can be assumed to be trying their best and that players don’t have to micromanage every move like that because it would just make already crunchy games take even longer. Kamina doesn’t seem to be satisfied with that.

There are other systems which might be better suited to Kamina. But he tells me, “You can totally play D20 systems my way!” and I think, “Maybe, but why should I?”

So my main question is, Can I (and my group) reconcile with this player, and is it worth the effort to try?

## Is the Kleene star of an intersection always equal to the intersection of kleene stars?

I know that the Kleene star of an intersection contained in the intersection of Kleene stars, but are they necessarily equal?

For example, given two formal languages, A and B, does (A*∩B*) equal to (A∩B)*?

## What is the minimal degree $d$ required for a B tree with $44*10^6$ keys so that it’s height is less than or equal to $5$

What is the minimal degree $$d$$ required so a B – tree with $$44*10^6$$ keys will have a height $$h$$, such that $$h\leq 5$$

My attempt was to build the tallest tree possible with minimum degree $$d$$ and $$n = 44,000,000$$ keys and then solve for $$d$$. That would mean any other tree with a minimal degree $$d’$$ such that $$d’\geq d$$ and $$n$$ keys will be shorter than the one I built:

at depth 0 , we have the root and that’s $$1$$ node

at depth 1, we got exactly $$2$$ nodes

at depth 2, since we’re going for the tallest tree each node will have a minimal number of keys so $$d-1$$ keys each, that means $$d$$ children each so a total of $$2d$$ nodes.

at depth 3, following the same reasoning , $$2d^2$$ nodes.

at depth $$h$$, there are $$2d^{h-1}$$ nodes

total number of keys is :

$$n = 1+ (d-1)\sum_{k=0}^{h-1} {2d^k} = 1 + (d-1) \frac{2(d^h-1)}{d-1} = 2d^h-1 = 44*10^6$$

so:

$$2d^5-1=44,000,000$$

$$d= 29.4$$

$$d\geq 30$$

is that even correct ?

## Segment 3d mesh into multiple 3d meshes with equal size

Given a 3d mesh, for example the stanford bunny, how can I segment the mesh in a way that each segment has a roughly equal size between them? Assuming the target number of segments is given as an input.

To keep things simple, let’s start with assuming the vertices are uniformly distributed in the mesh, therefore the problem can be simplified to segmenting the mesh so each segment has roughly the same vertices.

I’ve seen methods like finding a bounding box of the mesh, and divide the bounding box uniformly and segment the mesh based on that. But the problem with this method is the size of each segment can be quite different if the shape of the original mesh is irregular.

I’ve also seen a method based on Shape Diameter Function, but again the size of each segment can be different depends on the original mesh.

The problem is I am not sure what’s the right keyword to look up on Google to see what’s being done in the literature. I would appreciate any pointers.

## Why values can not be replaced with their extensionally equal values in an intensional system?

Thomas Streicher states in Investigations into Intensional Type Theory(§Introduction p.5) that:

Although in Intensional constructive set theory (Intensional Type Theory) one can do most of the things one wants to do… certain theorems simply do not hold due to the lack of extensionality. A typical example is that from $$t\in B a$$ and $$p\in Id A ab$$ one is not allowed t conclude that $$t\in Bb$$ where $$A$$ is a type and $$B$$ is a family of types indexed over $$A$$.(But of course one is allowed to infer $$t\in Bb$$ from $$t\in Ba$$ and $$a=b\in A$$ !)

An almost similar thin is mentioned in Definition of extensional and propositional equality in Martin-Lof extensional type theory :

The (Id-DefEq) means that extensional equality is baked into the type system: if you have a type constructor 𝑇:((𝑥:𝑈)→𝑉)→𝖲𝖾𝗍 then you can use a value of type 𝑇 𝑓 in a context expecting 𝑇 𝑔 if 𝑓 and 𝑔 map equal inputs to equal outputs. Again this is not true in an intensional system, where 𝑓 and 𝑔 might be incompatible if they’re syntactically different.

Why is that? Isn’t it that two functions that are producing exactly same output for their inputs, equal? So why can’t one be replaced with another in a context? What makes definitionally equal functions eligible to be replaced with each other, but not the extensionally equal ones?

## Given a sequence of integers $A_1,A_2,A_3 ……A_n$ , find number triples giving equal xor?

For giving sequence $$A_1,A_2,A_3 ……A_n$$ , find number of triples $$i,j,k$$ such that $$1<=i and $$A_i + A_{i+1} + … A_{j-1} = A_{j} + A_{j+1} ….. A_{k}$$ .Where $$+$$ is bitwise xor operation .

I tried to solve it using dynamic programming somewhat similar to https://www.geeksforgeeks.org/count-number-of-subsets-having-a-particular-xor-value/ , but it’s time complexity if $$O(n*m)$$ , where m is maximum element in the array .Can we do better than $$O(n*n)$$ or $$O(n*m)$$ ?