$$f$$ is defined on some $$(a,b)$$. For $$forall yin (a,b)$$, there exists a positive constant $$C$$ such that
$$|f(x)-f(y)| leq C|x-y| .$$

Does there exist some neighborhood $$U(x)$$ of $$x$$ such that

$$|f(t)-f(s)| leq C’|t-s|$$

for $$forall t,s in U(x)$$ and a positive constant $$C’$$.

## conditions – Is Armor Class a difficulty class (DC)?

[…] You take a status penalty equal to this value to all your checks and DCs […]

Compare it to Clumsy:

[…] You take a status penalty equal to the condition value to Dexterity-based checks and DCs, including AC, Reflex saves, ranged attack rolls, and skill checks […]

The wording of Clumsy seems to imply that AC is just one of the DCs, but is not clear. I really hope it is, otherwise Frightened is not nearly as good as I thought.

## 8 – How can I extend the webform #states conditions to save a custom set of conditions for webform fields?

I need to store sets of conditions on the webform field level (these would then be evaluated according to the field’s submitted values within a custom submit callback).

I would like these conditions to be editable on the webform field level just like #states conditions that honour the field type for value ranges, set values, boolean etc:

No new custom state is necessarily needed here as this new type of condition would not be related to interacting fields. I’m merely looking for a way to expand webforms and add a custom field to each element that will allow adding (on the UI) sets of conditions based on its value(s). These sets would be part of the field’s properties and accessible in a validation / submit callback.

## big list – Conditions equivalent to finiteness

We’ve all probably come across some conditions that naturally imply finiteness, or are equivalent to it. For $$ZFC$$ examples:

1. A set $$X$$ can be ordered in such a way that the ordering is well-founded and reverse well-founded iff $$X$$ is finite.
2. A field has finite characteristic iff its underlying set is finite.
3. The discrete topology on $$X$$ is compact iff $$X$$ is finite (this can probably be strengthened topologists).

What other conditions are equivalent to being finite in various background theories?

More ZFC examples are definitely welcome, but I’m also interested if working in weaker/stronger background theories can make fewer/more conditions equivalent to finiteness, or perhaps break an iff in one direction. Some more examples Dedekind finiteness occurred to me just after I wrote this:

1. A set $$X$$ is finite iff it has no infinite subsets.
2. A set $$X$$ is finite iff every self-injection is a surjection.

These both fail if we remove choice unless I’m mistaken.

## differential equations – Solve PDE with contraints and unknown boundary conditions

I have a 2D PDE

``````mu = -0.1;
lambda = -1;
x10 = 0;
x20 = 0;
eq = {mu*x1 + D(h1(x1, x2), x1)*mu*x1 +
D(h1(x1, x2), x2)*lambda*(x2 - x1^2) == mu*(x1 + h1(x1, x2)),
lambda*(x2 - x1^2) + D(h2(x1, x2), x1)*mu*x1 +
D(h2(x1, x2), x2)*lambda*(x2 - x1^2) ==
lambda*(x2 + h2(x1, x2))};

``````

The definite region is {x1, -2, 2} and {x2, -2, 2}. The problem is that I don’t know the boundary condition of the PDE, but I do have a constraint that the gradient of h1 and h2 at point (x10, x20) is zero.

``````D(h1(x1, x2), x1)/.{x1 -> x10, x2 -> x20} == 0
D(h1(x1, x2), x2)/.{x1 -> x10, x2 -> x20} == 0
D(h2(x1, x2), x1)/.{x1 -> x10, x2 -> x20} == 0
D(h2(x1, x2), x2)/.{x1 -> x10, x2 -> x20} == 0
``````

How can I approximate h1(x1, x2) and h2(x1, x2) numerically in Mathematica?

## 8 – How to unflag/reset a flag again, when matching some conditions in onFlag event?

in my custom module I have an event subscriber service for flag module. I used the tutorial here as a base for learning: Link to Tutorial

Here is my code:

``````namespace DrupalMYMODULEEventSubscriber;

use SymfonyComponentEventDispatcherEventSubscriberInterface;
use DrupalflagEventFlagEvents;
use DrupalflagEventFlaggingEvent;
use DrupalflagEventUnflaggingEvent;
use DrupaluserUserInterface;
use DrupaluserEntityUser;

class MYMODULEFlagSubscriber implements EventSubscriberInterface {

/**
* Do the logic when the upgrade flag is triggered to flag.
*/
public function onFlag(FlaggingEvent \$event) {
\$flagging = \$event->getFlagging();
\$flag = \$flagging->getFlag();
\$flag_machine_name = \$flag->id();
if (\$flag_machine_name === 'my_awesome_flag') {
\$entity_nid = \$flagging->getFlaggable()->id();
\$user_is_active = \$user->isActive();
\$field_1 = \$user->get('field_1')->value;
\$field_2 = \$user->get('field_2')->value;
\$break_with_error = FALSE;
\$roles_to_ignore = (
'team_sales',
);
if (!\$user->hasRole('authenticated_level_2')) {
if ((\$user_is_active == TRUE) && (\$field_1 == 1) && (\$field_2 == 1)) {
foreach (\$roles_to_ignore as \$role_to_ignore) {
if (\$user->hasRole(\$role_to_ignore)) {
\$break_with_error = TRUE;
\$upgrade_message = 'The User has a company role already and can not being upgraded as a Level 2 user.';
break;
}
}
}
else {
\$break_with_error = TRUE;
\$upgrade_message = 'The User can not being upgraded as a Level 2 User. Reasons: 2. The account is not activated yet, 3. The user has not yet checked field 2';
}
}
else {
\$break_with_error = TRUE;
}

switch (\$break_with_error) {
case TRUE:
\$flagging->unflag(\$flag_machine_name, \$entity_nid);
return;

case FALSE:
\$user->save();
return;
}

}
}
``````

My Problem is

How can I unflag the flag again, when my logic checks settings and my variable \$break_with_error becomes true?

``````\$flagging->unflag(\$flag_machine_name, \$entity_nid);
``````

throws me an PHP error.

Update:

My intention was the following:

I use the flag here as a substitute for a link/button to trigger the “business logic” checks and to give the user a additional role with more privileges if the checks are passed.

In my opinion it’s a easy way to quickly have a link/button in multiple variants (e.g. in a view or as a field in user account). Another advantage is, that other people (in my case sales team or other admins) see the business logic checks have performed already when the user entity is flagged. But in case the logic checks are failing, the user entity should unflagged again.

For other opportunities to have a “business logic trigger” I’m open and thankful of course. 🙂

## 8 – Flag EventSubscriber: How to unflag/reset a flag again, when matching some conditions in onFlag event?

in my custom module I have an event subscriber service for flag module. I used the tutorial here as a base for learning: Link to Tutorial

Here is my code:

``````namespace DrupalMYMODULEEventSubscriber;

use SymfonyComponentEventDispatcherEventSubscriberInterface;
use DrupalflagEventFlagEvents;
use DrupalflagEventFlaggingEvent;
use DrupalflagEventUnflaggingEvent;
use DrupaluserUserInterface;
use DrupaluserEntityUser;

class MYMODULEFlagSubscriber implements EventSubscriberInterface {

/**
* Do the logic when the upgrade flag is triggered to flag.
*/
public function onFlag(FlaggingEvent \$event) {
\$flagging = \$event->getFlagging();
\$flag = \$flagging->getFlag();
\$flag_machine_name = \$flag->id();
if (\$flag_machine_name === 'my_awesome_flag') {
\$entity_nid = \$flagging->getFlaggable()->id();
\$user_is_active = \$user->isActive();
\$field_1 = \$user->get('field_1')->value;
\$field_2 = \$user->get('field_2')->value;
\$break_with_error = FALSE;
\$roles_to_ignore = (
'team_sales',
);
if (!\$user->hasRole('authenticated_level_2')) {
if ((\$user_is_active == TRUE) && (\$field_1 == 1) && (\$field_2 == 1)) {
foreach (\$roles_to_ignore as \$role_to_ignore) {
if (\$user->hasRole(\$role_to_ignore)) {
\$break_with_error = TRUE;
\$upgrade_message = 'The User has a company role already and can not being upgraded as a Level 2 user.';
break;
}
}
}
else {
\$break_with_error = TRUE;
\$upgrade_message = 'The User can not being upgraded as a Level 2 User. Reasons: 2. The account is not activated yet, 3. The user has not yet checked field 2';
}
}
else {
\$break_with_error = TRUE;
}

switch (\$break_with_error) {
case TRUE:
\$flagging->unflag(\$flag_machine_name, \$entity_nid);
return;

case FALSE:
\$user->save();
return;
}

}
}
``````

My Problem is

How can I unflag the flag again, when my logic checks settings and my variable \$break_with_error becomes true?

``````\$flagging->unflag(\$flag_machine_name, \$entity_nid);
``````

throws me an PHP error.

## boundary conditions – Partial differential equation, The arguments should be ordered consistently, PDE parsing error, NDSolveValue

We consider the partial differential equation

(rho+nu) V(y,x) == Log(1 / (1 + y (x-y) (beta(psi – D(V(y,x),y)) – eps D(V(y,x),x)))) – eps y (x-y) D(V(y,x),x)

with the boundary condition

V(y,y) == 0

rho, nu, beta, psi, eps are strictly positive, known constants.

We want to solve for V(y,x) over the domain {(y,x) | y <= x, 0 <= y <= 1, 0.6 <= x <= 1}.

We pose the following problem to Mathematica:

``````par = {rho -> 0.00014, nu -> 0.00182, psi -> 227.1, beta -> 0.0966, eps -> 0.01};

set = {(rho + nu) V(y, x) == Log(1/(1 + y (x - y) (beta (psi - D(V(y, x), y)) - eps D(V(y, x), x)))) - eps y (x - y) D(V(y, x), x) , V(y, y) == 0} /. par;

Reg = ImplicitRegion((y <= x), {{y, 0, 1}, {x, 0.6, 1}});

NDSolve(set, V, {y, x} ∈ Reg)
``````

We get the error message:

``````NDSolve: The arguments should be ordered consistently.
``````

We don’t understand this message.

bbgodfrey explains that Mathematica might not be able to solve problems with such a boundary condition. Following bbgodfrey’s suggested approach we therefore try to solve the equation without the boundary condition, using NDSolveValue (because bbgodfrey uses DSolveValue). We pose the problem

``````NDSolveValue((rho + nu) V(y, x) == Log(1/(1 + y (x - y) (beta (psi - D(V(y, x), y)) - eps D(V(y, x), x)))) - eps y (x - y) D(V(y, x), x) /. par, V, {y, x} ∈ Reg)
``````

This yields the error message

``````NDSolveValue::femper: PDE parsing error of {0.00196701 V+0.01 V\$3966 (x-y) y-Log(1/(1+(Times(<<2>>)+Times(<<2>>)) (x+Times(<<2>>)) y))}. Inconsistent equation dimensions.
``````

We are beginners as far as PDEs in Mathematica (and StackExchange) are concerned. Thank you for suggestions on how to proceed.

## corporate policy – If I accidentally agree for new WhatsApp’s terms and conditions, How to revert that?

As a general rule of thumb with these things, the only way to disagree with the terms of use is by not using it.

If you’re expecting that you can “revert” your agreement and only be subject to the previous terms, then I’m afraid you will be disappointed. While a company may decide to allow that, it’s highly unlikely that Facebook does in this case. In all cases that I am aware of, abiding by terms and conditions is a requirement for using their services.

So how do you revert your agreement? Simple.

## dnd 5e – Evocation Wizard’s Sculpt Spell Ability with spells that persist over time – under what conditions is protection maintained?

One of my current players has the first Wizard Evoker for whom I have GMed.

His PC’s Sculpt Spells ability was easy to interpret at lower levels, when his evocation spells, like thunderwave and fireball, were instantaneous.

As he advances, however, he may obtain spells that have longer durations, such as Storm Sphere, Wall of Ice, or Whirlwind. I am realizing that I do not know how to adjudicate Sculpt Spell with spells that persist, especially when the initial conditions of the Sculpt Spell ability no longer apply.

Sculpt Spells says:

Beginning at 2nd level, you can create pockets of relative safety within the effects of your evocation spells. When you cast an evocation spell that affects other creatures that you can see, you can choose a number of them equal to 1 + the spell’s level. The chosen creatures automatically succeed on their saving throws against the spell, and they take no damage if they would normally take half damage on a successful save.

Storm Sphere, for example, has a a duration of Concentration (up to 1 minute) and says in part:

Each creature in the sphere when it appears or that ends its turn there must succeed on a Strength saving throw or take 2d6 bludgeoning damage.

To use the Sculpt Spell ability, the Evoker must see the creatures he is designating as being protected at the time he casts the Storm Sphere, and they must be in the area of the sphere at the time he casts it. It is clear that designating the protected creatures happens “when you cast”.

What is not clear to me is whether the protection is for just the first round (“when you cast”) or is meant to persist and provide protection on subsequent rounds.

If the protection normally persists, can it be lost if the creatures no longer meet the conditions that were required for them to be designated as protected?

What would happen to a protected creature if it was to exit the area of the Sphere and later re-enter?

Does the Evoker need to maintain them in his sight to maintain their protection? If they were originally protected when the spell was cast, but later became invisible, would it end their protection if the Evoker could no longer see them?

It is possible that reviewers may mark this as asking multiple questions. To be clear, I see all of these as examples of one question – Under what conditions does the protection afforded by Sculpt Spell persist or not persist over time?