## Find all G edges such that exists G MSP that contains them

I have the follwing question in homework: Let $$G = (V,E)$$ be Undirected graph, And let $$A$$ be $$A$$ = {$$e ∈ E$$ | there exists msp $$T$$ such that $$e ∈ T$$}. We were asked to find A in $$O(|E|log(|V|)$$. Any suggestions?

## How do I make cross-sales on Woocommerce with a checkbox such as this (picture) I want to make my website similar to this, where you can just click a checkbox and it adds the product to cart, and to the price counter as well.

## How to calculate the transformation such that two points with different position, orientation and origins line up?

Let’s say you have two different 3D Objects which both contain a node that is off center (not at the origin) and have an orientation. How do you calculate the transform for one of the object so that both of these nodes line up? As in both nodes end up at the same position in space and the same orientation?

In gaming terms, both 3D objects have “snap” points and I’d like to calculate how to transform one of them so that they snap together at that specific node. The cubes are the 3D objects, the X/Y/Z axis represent the origin of each of these objects, and the arrow is the node. The goal would be in this case both arrows overlap and thus the cubes end up at the exact same place. Note the origin is NOT at the same spot for both objects.

Posted on Categories Free Proxy

## Does the Armor of Agathys spell still damage attackers if you have temp HP from another source, such as the Dark One’s Blessing feature? [duplicate]

• How does Armor of Agathys interact with getting temporary hit points? 3 answers

Recently, I played a warlock in a 5e one-shot. We were playing at level 7 and I was a Pact of the Blade warlock with the Fiend patron. As a Fiend Warlock, I have a feature called “Dark One’s Blessing”, :

Starting at 1st level, when you reduce a hostile creature to 0 hit points, you gain temporary hit points equal to your Charisma modifier + your warlock level (minimum of 1).

The description of the Armor of Agathys spell reads:

A protective magical force surrounds you, manifesting as a spectral frost that covers you and your gear. You gain 5 temporary hit points for the duration. If a creature hits you with a melee attack while you have these hit points, the creature takes 5 cold damage.

At Higher Levels. When you cast this spell using a spell slot o f 2nd level or higher, both the temporary hit points and the cold damage increase by 5 for each slot level above 1st.

The situation was that there was a pack of ‘minions’ (4th-edition term, I know… but they were low-AC 5 hp monsters that died in 1 hit most of the time) attacking my group. The dragonborn wizard knew Fly, and grabbed the halfling and flew out of reach of the group of minions; I was left there with Armor of Agathys cast on me at level 4, so I had 20 temp hp and did 20 damage to each minion.

The question comes from the functionality of Temp HP (THP)… It does not stack. Instead, you must choose which set to acquire, either keeping the THP you currently have or using the new number provided by whatever is trying to give you more THP.

Once I was below 20 THP from the attacks made on me by this swarm of minions, I started taking the 10 (warlock level + CHA mod= 7+3) THP provided by Dark One’s Blessing. After rereading Armor of Agathys today, I noted it says ‘while you have these hit points’… leading me to believe that choosing to take the 10THP from Dark One’s Blessing would remove the Armor of Agathys and its damaging capability.

TL;DR

Does Armor of Agathys only work if you have THP from the spell specifically, or does it still work if you gain more THP from another source (like from Dark One’s Blessing) while the spell is still active?

Posted on Categories Best Proxies

## There exist two language $L_1$ and $L_2$ such that $L_1$ and $L_2$ are recursive, but $L_1L_2$ is non-recursive

Statements True or False.

There exist two language $$L_1$$ and $$L_2$$ such that $$L_1$$ and $$L_2$$ are recurvise, but $$L_1L_2$$ is non-recursive.

For me the statements is True because I can describe a non-recursive (I have understood recursively enumerable) procedure from two recurvise languages.

Proof:

Suppose that $$L_1$$ and $$L_2$$ are recursive languages. Then there is a Turing machine M1 that accepts any input in $$L_1$$ and rejects any input not in $$L_1$$. Similarly, there is a Turing machine M2 that accepts any input in $$L_2$$ and rejects any input not in $$L_2$$. To determine if $$w ∈ L_1L_2$$, we nondeterministically guess where to break the string into $$w_1w_2$$, and run M1 on $$w_1$$ and M2 on $$w_2$$. Then if w is in the language, M1 and M2 will both eventually accept.

Posted on Categories proxies

## What use would a privacy browser, such as Firefox Focus for iPhone, have for an internal web server?

The Mozilla Foundation has a “privacy browser” called Firefox Focus that is available for example iPhone (here). This browser has an always-on ad blocking function.

I was checking the third-party licenses used by this iPhone version (image shown below) and noticed that it includes the use of GCDWebServer.

[ ]

The GitHub page for GCDWebServer says that:

GCDWebServer is a modern and lightweight GCD based HTTP 1.1 server designed to be embedded in iOS, macOS & tvOS apps.

There is a support information for this browser here but the documentation does not mention the use of an internal web server.

This issue has relevance in evaluating the risks from possible open ports in connection with determining whether to allow this browser in corporate bring-your-own-device configuration.

Question: What use would a mobile device web browser have for running an embedded web server?

Posted on Categories proxies

## Find a threshold such that one function is always bigger than the other

Given the recursively defined function $$c$$, which I believe is a variant of the Péter-Ackermann function: $$c(m,n)=\begin{cases}0&\text{for }m=0\ n^2+n+1&\text{for }m = 1\text{ and }n\ge 0\ c(m-1, 1)&\text{for }m>1\text{ and }n=0\ c(m-1,c(m,n-1))&\text{for }m>1\text{ and }n>0\ \end{cases}$$

and the function $$d$$ that builds a “tower” of powers of $$2$$ of size $$n+2$$:

$$d(n) = \underbrace{2^{2^{.^{.^{.^{.^{2}}}}}}}_{\text{ n+2 }}$$

The inputs $$m$$ and $$n$$ are both natural numbers. I’m asked to find an $$x$$, such that for all numbers $$y \ge x$$, $$c(y,y) > d(y)$$.

I rewrote the two functions using Python in order to calculate some values:

 c(m, n):     if m == 0:         return 0     else if m == 1 and n >= 0:         return n**2+n+1              # return n^2+n+1     else if m > 1 and n == 0:         return c(m-1, 1)     else if m > 1 and n > 0:         return c(m-1, c(m, n-1))  
 d(n):     exp_num = n-1     result = 2     while exp_num != -1:         result = result**2           # result = result^2         exp_num = exp_num - 1     final_result = 2**result         # final_result = 2^result     return final_result  

Some inputs and outputs:

c(1, 1) = 3

c(2, 2) = 183

d(1) = 16

d(2) = 65536

d(3) = 115792089237316195423570985008687907853269984665640564039457584007913129639936

I believe the threshold is $$3$$, as c(3, 3) doesn’t seem to be realistically computable considering there are over 19K digit in A(4, 2) (where A is the Péter-Ackermann function). Unfortunately I have no idea how to prove this. Any help would be much appreciated.

Posted on Categories proxies

## Given two functions, find a threshold such that one is always bigger than the other

I’ve written the following two functions in Python (they should also be fairly easy to understand as Pseudo):

 c(m, n):     if m == 0:         return 0     else if m == 1 and n >= 0:         return n**2+n+1              # return n^2+n+1     else if m > 1 and n == 0:         return c(m-1, 1)     else if m > 1 and n > 0:         return c(m-1, c(m, n-1))  
 d(n):     exp_num = n-1     result = 2     while exp_num != -1:         result = result**2           # result = result^2         exp_num -= 1     final_result = 2**result         # final_result = 2^result     return final_result  

Where the inputs m and n are both natural numbers. I’m asked to find an x, such that for all numbers y >= x, c(y,y) > d(y).

Some inputs and outputs:

c(1, 1) = 3

c(2, 2) = 183

d(1) = 16

d(2) = 65536

d(3) = 115792089237316195423570985008687907853269984665640564039457584007913129639936

As you can see d grows extremely faster than c, which I believe is a variant of the Péter-Ackermann function. How can I approach this problem? Any help would be much appreciated.

Posted on Categories proxies

## Find the minimal subset of rows of some matrix such that the sum of each column over this rows exceeds some threshold

Let $$A$$ be a an $$n\times m$$ real valued matrix. The problem is to find the minimal subset $$I$$ of rows (if there is any) such that the sum of each column $$j$$ over the corresponding rows exceeds some threshold $$t_j$$, i.e. $$\sum_{i\in I}A[i,j]>t_j$$ for all $$j\in\{1,\dots m\}$$.

Or, stated as optimization problem:

Let $$A\in\mathbb{R}^{n\times m}, t\in\mathbb{R}^m$$. Now solve \begin{align}\min_{\xi\in\{0,1\}^n}&\sum_{i=1}^n\xi_i\\text{s.t.}&\,A^\top\xi>t\,.\end{align}

Actually, i would need a solution only for $$m=2$$, but the general might be interesting too.

Posted on Categories proxies

## When is an effect from something magical (such as a magical item) considered a magical effect?

Similar to How do I know if an ability is magical? But because of the context in which I am asking, I believe this is not a duplicate question. I am not wondering what things are magical, but what effects from magical things are magical effects. This issue comes up in several areas, I am particularly having difficulty discerning what constitutes for ‘magical light’ for the purpose of the darkness spell. Is, for example the light from the light cantrip or continual flame ‘magical’ light? (Disclosure, I am aware that darkness would dispel light or a level 2 continual flame). I can find tens of answers to threads that make an assumption that the effects are magical because it originates from a magic item, as well as the contrary, answers made assuming effects from magic items aren’t necessarily magical effects; I have even found tweets from JC that assume one thing at one time, then the opposite at another time. Unfortunately, none of these threads directly answer when the effect is magical or not! They run on the assumption that a specific effect is magical, or the assumption that a specific effect is not. So when is an effect from a magical source a magical effect? I think if this question can be answered it would provide closure for a lot of the conflicting answers I am finding.

I also do not think this question is what is asked in threads like What is considered magical light for the purposes of the Darkness spell?, Does light from a flame from a magic weapon dispel Darkness?, or Does Lightbringer illuminate or dispel the Darkness spell?.

Posted on Categories Best Proxies