## Functional analysis. – Inverted to the continuous left of Dirac Lipschitz-Free Space

You'll need that $$X$$ It is contractible at least.

Leave $$X$$ be the unit circle with the inherited metric of $$mathbb {R} ^ 2$$ and some point chosen as the base point. Assume that $$f$$ is a retraction of $$AE (X)$$ on $$X$$. As $$AE (X)$$ It is a Banach space that is contractible. Leave $$g: AE (X) times (0,1) rightarrow AE (X)$$ be a contraction of $$AE (X)$$ at any point then the function $$(x, t) mapsto f (g ( delta (x), t))$$ It is a contraction of $$X$$ to a point but $$X$$ It is not a contractible space, so it does not exist. $$f$$ It can exist

I vaguely suspect that you need $$X$$ Be an absolute recant. Having a reverse continuum to the left certainly implies that $$X$$ It is an absolute setback in relation to the Lipschitz inlays in Banach spaces.

## finsler – Functional Minkowski in vector spaces of infinite dimensions

In Finsler's geometry of finite dimension, we define functional Minkowski in tangent spaces that are vector spaces of finite dimension. The definition of Minkowksi functional can be generalized to vector spaces of infinite dimensions that admit at least one internal product, but I have not found in the literature such a generalization. Is there a problem with the use of this definition in spaces of infinite dimensions?

## Functional programming: toggle the background color of a page using JavaScript closures

This question is more to see if I can get some information about the "design pattern" that I tried to implement here. I'm learning about closing in JavaScript and I think I'm starting to understand it. I wonder if the way I wrote this code is of good quality, something that you would expect to see in the production code or at least something a little more "united". Open to any criticism, obviously, here to learn.

The code in question is trying to respond to a given challenge in JavaScript: The Hard Parts (by Will Sentance) in Frontend Masters. According to the challenge, it seems that I went further because the solution provided, when executed, does not work correctly.

The challenge:

Write a changeColor function that when invoked first will verify if
the background color of the current page is "rgb (221, 238, 255)". Yes it is
change the color to "rgb (255, 238, 221)". If it is not, it establishes the
color to "rgb (221, 238, 255)".

Add a click event listener to the previous # 1 button (it has an "activate" ID). When you click, the button must log in to the console "pressed
1. You must also configure an event listener by clicking on button # 2 (ID of
"colour"). That listener must log in to the console "click 2" and then
call the changeColor function that you just created.

Clear the console and press the & # 39; Run with JS & # 39; Look what code has been executed analyzing the console. Next, try changing the
background color by clicking on button # 2. What has to happen for the
button to work?

According to the wording of the challenge, it seemed that the suggested solution was (in pseudo-ish code):

``````activationButton.addEventListener ("click", () => {
console.log ("activation button pressed")
console.log ("pressed color changer button")
change the color ()
})
})
``````

The obvious problem with the above code is that a new event listener will be added to the ChangerButton color each time you click on the activation button. This is where I started thinking about trying to use a closure to track a state variable so I can make sure that the listener of the event is only added to the second button once. In addition, this is the solution provided in the set of solutions for the challenge.

For that purpose, this is what I came up with (suppose the correct HTML is there, etc.):

``````(function () {

come on clickCount = 0

changeColor () {function
if (document.body.style.backgroundColor === "rgb (221, 238, 255)") {
document.body.style.backgroundColor = "rgb (255, 238, 221)"
} else {
document.body.style.backgroundColor = "rgb (221, 238, 255)"
}
}

enableButton2 () {function
const btn2 = document.querySelector (& # 39; # color & # 39;)
console.log ("click # 2")
change color ()
})
}

const btn1 = document.querySelector (& # 39; # enable & # 39;)
clickCount ++
yes (clickCount === 1) {
activateButton2 ()
}
console.log ("click # 1")
he came back
})

he came back {
changeColor: changeColor,
activateButton2: activateButton2
}
}) ()
``````

This works the way I would expect: the color change functionality and the console logs are activated as I expected.

One question I had was about containing the button variables within the IIFE. I feel like I see a lot of front-end scripts that put all the query selectors at the top of the script. Is there any reason to do so instead of including them within a function like this? If I understand the closing correctly, once the event handlers are created, there is a persistent reference to everything in the IIFE, so I can activate this function and the buttons and their controllers persist and behave as expected.

It also seems that you could probably use a Boolean to track the "click" status of the first button, and a change statement to verify the background color of the page.

Any other pointer that someone wants to offer?

## Functional analysis. Conceptual explanation of the occurrence of entropy in \$ frac {d} {dp} | x | _p \$

by $$x in mathbb {R} ^ d$$, an elementary computation produces that
$$frac {d} {dp} log | x | _p = frac {1} {p ^ 2} sum_ {i = 1} ^ d frac {| x_i | ^ p} { | x | _p ^ p} log frac {| x_i | ^ p} { | x | _p ^ p} = frac {1} {p ^ 2} operatorname {Ent} ( mu_ {x, p}),$$
where $$mu_ {x, p}$$ It is the law of a random variable that takes values ​​in $${1, ldots, d }$$ that takes the value $$i$$ with proportional probability to $$| x_i | ^ p$$ Y $$operatorname {Ent} ( mu_ {x, p}) = sum mu_ {x, p} (i) log mu_ {x, p} (i)$$ It is your entropy.

I have been curious about the following question: Is there a good conceptual reason for an entropy to appear here?

Obviously, the calculation is very easy, but could you have predicted this equality without any calculation?

## Functional analysis. Weighted internal product of vectors of independent random units.

Leave $$u = (u_1, …, u_n)$$ Y $$v = (v_1, …, v_n)$$ be independent at random in the vector unit $$mathbb {R} ^ n$$. Leave $$lambda = ( lambda_1, …, lambda_n)$$ be a fixed unit vector in $$mathbb {R} ^ n$$. What is the distribution of
$$X = sum_ {i = 1} ^ k lambda_iu_iv_i$$
for $$k leq n / 2$$? Is it possible to note the density function (with respect to the Lebesgue measure) of $$X$$?

by $$k = 1$$, it is well known that $$X$$ It is related to the beta distribution. What happens $$k geq2$$? The distribution is compatible in intervals $$[-|lambda|_{infty},|lambda|_infty]$$. Different configuration of $$lambda$$ with the same $$| lambda | _ { infty}$$ It will lead to different distributions. How does the configuration of $$lambda$$ Does the distribution affect?

WLOG, we can assume $$lambda_1 geq lambda_2 geq … geq lambda_k geq0$$. leave $$1 = tau_1 geq frac { lambda_2} { lambda_1} = tau_2 geq … geq frac { lambda_k} { lambda_1} = tau_k geq0$$. We just need to examine the following random variable:
$$Y = sum_ {i = 1} ^ k tau_iu_iv_i$$
that relies on [-1,1].

## Functional analysis. Characterization of closed-range self-adjoint operators.

Leave $$T: mathrm {sun} (T) subseteq H a H & # 39;$$ be a dense, self-enclosed operator between two Hilbert spaces $$𝐻$$ Y $$𝐻 '$$. In general, the range of $$T$$ Its closure is not guaranteed. What tools are available to verify if the range is closed? More precisely, what are a list of equivalent closed-range formulations or conditions that imply a closed range?

## Functional analysis. – Given a composite norm, what polygon describes its unit ball?

Note: This is very similar to this question of mine in Math.Se, which has not yet received any response.

It is known that for any centrally symmetric convex polygon $$A$$ there is a norm $$| cdot |$$whose ball of unity is $$A$$namely $$| x | = inf {t> 0: frac {x} {t} in A }$$.
But what is the reverse, given a "composite" rule?
$$| cdot | : = sum_ {k in mathbb {N}} alpha_k | cdot | _k,$$
in a vector space $$V$$, where $$sum_ {k in mathbb {N}} alpha_k = 1$$, such that the norm converges and the $${i_k } _ {k in mathbb {N}}$$ just being a set of indexes for the standards used, What can we say about the unit ball centered at zero with respect to $$| cdot |$$, $$mathscr {B}: = { omega in V: | | omega | <1 }$$.

It is clear that a polygon with an odd number of vertices can not occur due to the symmetry of the norm.

## Functional programming: refactoring an if statement into a higher order function in Swift

Using Swift, I am sorting some objects first by date order, then second by title if the date is the same, according to the following extract:

``````.sorted {
yes \$ 0.date! = \$ 1.date {
return \$ 0. date <\$ 1 date // object date
} else {
return \$ 0.title <\$ 1.title // String
}
}
``````

This brief si / else is used several times, and as such I would like to extract this functionality and convert it into a reusable component. Any ideas or suggestions on how this can be achieved, given that the return value could be a date or a chain?

## Legacy Code – Is the lack of functional requirements nimble?

That the lack or lack of functional requirements is agile, is a recipe for disaster. You can not rebuild a system when you do not know how that system works.

You should tell the owner of the company that you have no idea how the previous system works.

Your best option is to work with the owner of your business or with a few experienced users to understand the business processes at stake and develop your own acceptance tests. If you can work with some end users, you can get more information about how the previous system works.

If not, you must perform some exploratory tests in a non-production environment to meet your own requirements. Many times, when a business owner says "make it work like the old one", they have time constraints and can not help you as the owner of a business. You need the experience of some experienced users, or a lot of manual testing on your part to understand how the old system works.

Inform the business owner that the lack of requirements and the understanding of the previous system will greatly increase the time it takes to rebuild it, approximately triple the time or more. When faced with the increase in the schedule and the cost, the owner of the company will provide the necessary experience to meet the requirements faster or decide that the rewrite is not economically viable at this time.

You will obtain one of the following:

• Adequate requirements and a faster development cycle.
• Time to gather requirements and rebuild the software.
• A new project that will not end up being a black mark in your career.

## Functional analysis: a string rule in the distribution space \$ mathcal {D} & # 39; \$

Many calculation retention results for distributions. Anyway I did not find anything about a string rule for distributional derivatives (obviously, when they are of the function type, therefore, the elements of $$L ^ 1_ {loc} subset mathcal {D} & # 39;$$).

Any result possibly not technical but interesting?