## Function getUrl of magento 2 doesn’t work correct

In template I try to get url link but it doesn’t work correct. I try to use this code:

## How to plot the result of Grad function?

When I calculate the gradient of a two dimension function like $$r=\frac{1}{\sqrt{x^2+y^2}}$$ with the syntax of

h[x_,y_]:=Grad[1/r,{x,y}] 

and when I checked the result with

h[x,y][[1]] h[x,y][[2]] 

I got a right result of $$-\frac{x}{(\sqrt{x^2+y^2})^{-3/2}}$$ and $$-\frac{y}{(\sqrt{x^2+y^2})^{-3/2}}$$, respectively.

However, when I tried to plot the function with syntax of

VectorPlot[{h[x,y][[1]],h[x,y][[2]]},{x,0.1,0.3},{y,-0.3,0.3}] 

I found the value in y direction is 0, and I also confirmed with

Plot3D[h[x,y][[1]],{x,-0.3,0.3},{y,-0.3,0.3}] Plot3D[h[x,y][[2]],{x,-0.3,0.3},{y,-0.3,0.3}] 

and the results are that the first one has a proper plot while the second one shows the function value is 0.

Would anyone give me some clue that how this happened? Thank you and best regards!

## How to compute function rolling averages maximum for each possible interval length?

I’m searching for a fast way to calculate

$$g(k):=\max_{0 for $$0

given some discreet function $$f$$ defined on $$[0; T]$$.

Is there algorithm to do it faster then naive $$O(n^2)$$? If so how?

## How to custom search function in Magento 2

Because search of magento 2 work wrong with my shop, so i want custom search function in magento 2 but i don’t know it where. Please help me, where is function in vendor

## Time complexity, Big-O for this function?

def f(n):     if n < 100000:         return 0;     for(int i = 0; i < n*n; i++){         return f(n-1) 

What is the time complexity?

My answer is $$O((n!)^2)$$. Here’s my thought process:

1. The for loop will be running $$n^2$$ the first time.

2. However, during the first loop (i.e., $$i = 0$$), it will call $$f(n-1)$$, hence the next for loop will be $$(n-1)^2$$.

3. This will keep going until $$n <10000$$ (base case). Assuming $$n$$ is very huge, the number of calls for each function to base case is essentially $$n$$ times.

4. Now, considering all the for loops, the total number of calls is essentially $$n^2 \cdot (n-1)^2 \cdot (n-2)^2 \cdots 1!$$ (there will be a total of $$n$$ times multiplication, and each multiplication will be $$n-1$$ of the previous one because of $$f(n-1)$$ call).

## Does JavaScript stop executing script when a Web Assembly function is called?

I am fairly inexperienced with web development and want to put a lot of time into learning JavaScript and Web Assembly because they both seem like extremely powerful tools when used together. When structuring my projects should I assume that the V8 engine will just stop executing code when I run a wasm function from JS, or will they run simultaneously?