scope – Code to Show Groovy is a Statically Scoped Language

I want to double check that I understand this code correctly as it relates to Groovy and static scoping.

Because int b = 5 is declared outside of the int foo( ) method, ) will return 10.

Since int bar( ) returns int foo( ), ) will return 10.

If on the other hand, Groovy were dynamically scoped, ) would output 7 because b is not defined in foo( ).

As a result, the compiler would look to the value of b as it is defined in bar( ) and return 7.

The part I’m not certain of is whether ) would also return 7, or would it still return 10 under dynamic scoping rules?

I think I understand this, I just want to make sure my explanation is correct.

Any input and/or constructive criticism is welcomed and appreciated.


class ScopeExample {
    int b = 5
    int foo() {
        int a = b + 5
    int bar() {
        int b = 2
    static void main(String ... args) {
        def x = new ScopeExample()
        println //returns 10
        println //returns 10

20.04 – KDE: Task switcher does not show thumbnails

I have upgraded 2 laptops to Ubuntu 20.04.

On laptop A I can choose the KDE Task Switcher ‘Grid’ (which works perfectly). I cannot choose that on laptop B. I can install ‘Thumbnail Grid’ but that does not show thumbnails when switching.

I have the feeling this is because laptop B has an older graphics card and that KDE has disabled some eye candy that just happens to also remove the thumbnail window in task switcher.

Some 3D features do work on laptop B: Task switcher ‘Flip switch’ shows the windows in smooth 3D. I just happen to like ‘Grid’ much better.

How can I change to ‘Grid’ and show the thumbnails for all windows, just like I have on laptop A? Can I possibly just copy some file in ~/.kde?

2013 – How to show SharePoint People picker for Contact in Workflow email?

It’s by default the workflow email text can only return Login name, display name, email address and user Id number.

As a workaround, you can use Rest Api to retrieve the user profile from people picker , here is a similar post for your reference:

Is it possible to extract additional fields from people picker in a workflow

real analysis – Let $Te_n=e_{n+1}$ show that $T:Hto H$ is isometric.

Let $H$ be a Hilbert space with an orthonormal basis $(e_n)$ and let $T:Hto H$ be the (only) bounded operator that satisfy:

$T(e_n)=e_{n+1}$ for all $nin N$.
Show that $T$ is isometric but not unitary.

Let $H_1,H_2$ Hilbert spaces and $T : H_1→ H_2$
T is called unitary if:

$T$ is surjective, and
$T$ preserves the inner product.

Let $X,Y$ be norm spaces.
$T:Xto Y$.
$T$ is called isometry if it preserves norm:
$||Tx||=||x|| forall xin X$.

T is Isometry

Since (e_n) is an orthonormal basis of H:

Let $xin H$ so we want to show that $||Tx||=||x||$.
From a theorem in functionl analysis, we have
$||x||^2=sum_{n} |<x,e_n>|^2$ for every $xin H$.So we can substitute $Txin H$ but i cannot see how to use then the given definition of the operator $T$.
From the same theorem, we get also:
$x=sum_{n} <x,e_n>e_n$ for all $xin H$ but then how to use this for showing that the operator is not unitary i.e. it does not preserve inner product, using the definition of $T$.

kql – Show a filtered document library from Sharepoint site to another site (same intranet)

I’m trying to design a site in our intranet to show documents related to our department. I want to show documents in libraries/folders/lists from the main site on our site and be able to filter them depending on the Properties (columns in the libraries/folders/lists) they are defined with (for example “Process”, “Document Type” & “Target Group”).
I try to use a Higlighted Content web part and write a query with KQL. However i cannot access them as i hoped, for example:

Process: "Standards"

I’ve read that they must be Queryable and such, but how do i find that out? I have no admin access to the main site and cant seem to find the info.

complexity theory – Show that NL ⊆ P

$textsf{PATH}$ is in $textsf{NL}$, because to solve it, you just need to keep in memory the current vertex you are in, and guess (non-deterministicaly) the next one on the path until you reach your destination. Since you keep the current vertex $v$, numbered from $0$ to $|V| – 1$, you need a memory space corresponding to the binary encoding of $v$, which is at most $1 + log_2(|V| – 1)$. You also need to keep the potential adjacent vertex of $v$, next in the path.

All in all, a Turing Machine solving this problem would only need $O(log |V|)$ additionnal space memory (the memory of the graph and of the starting vertex and the destination vertex of the path you are guessing are not considered in the memory used, because they are part of the input).

$textsf{PATH}$ is $textsf{NL}$-hard, because to solve any $textsf{NL}$ problem, you have to determine if there exists a sequence of possible transitions from the initial configuration to an accepting configuration in the Turing Machine of the problem. If you consider a graph of the possible configurations (where there exists an edge from a configuration $alpha$ to a configuration $beta$ if and only if one can go from $alpha$ to $beta$ in one transition in the Turing Machine), then solving the $textsf{NL}$ problem is the same as solving $textsf{PATH}$ in the graph of possible configurations.

You then need to prove that the graph of configurations can be constructed in logarithmic additionnal space. This can be done, because if a non-deterministic Turing Machine works in space $s(n)$, then the number of possible configurations is $2^{O(s(n))}$. Considering the binary encoding of those configurations, one can determine if there exists an edge between two configurations in deterministic space $O(s(n))$.

Now, since $textsf{PATH}$ is solvable in polynomial time (with a graph traversal algorithm, for example), that means that any $textsf{NL}$ problem is solvable in polynomial time (via the $textsf{NL}$-completude of $textsf{PATH}$), so $textsf{NL}subseteq textsf{P}$. This stands true, because if a Turing Machine uses $s(n)$ space memory, then it has at most $2^{O(s(n))}$ configurations, and exploring all of them takes time $2^{O(s(n))}$. Since $s(n) = log n$ for problems in $textsf{NL}$, the total time is indeed $n^{O(1)}$.

The forms on my website are not leading. The fields do not show. URL Page –

This is what the form looks like when i’m logged into wordpress

And for normal users as you can see on URL the fields do not populate and it doesnt even look like a form. Inspecting does show some type error but I’m not sure if that’s the issue.

2020 M1 MacBook Pro: Built-in display does not show entire desktop (truncates 300px from right and 200 px from bottom)

It seems like I have a desktop which is slightly larger than my screen. When I maximise a window the bottom portion (approx 300 pixels) and right portion (approx 200 px) are not visible. I can move the mouse to that invisible and perform click operations but the pointer is not visible on screen. (It is shown when in the visible region). Attempting to scroll beyond the visible extremities does not pan the screen.

See the attached screen shots. For the truncated ones, I captured a portion of the visible regions, starting at the top of the screen and moving to the right-most visible (or bottom most). For the non-truncated ones I moved the mouse enough such that I could be confident of being at the extremity of the desktop – but I had to do this unseen.

Horizontal truncation:
visible portion of status bar, showing horizontal truncation

full status bar

The same thing happens with vertical truncation, but the images take up a lot of vertical space in this post and don’t really add much (though I can add them if this is desired).

I’ve had to move the Dock to the left of the screen in order to make it visible but I would prefer to keep it on the bottom.

In terms of my machine setup:

I’m using a new 2020 issued M1 MacBook Pro running Big Sur. I’ve tried both with and without an external display. With an external display, that external display shows fine (and has no truncated region). But in both setups, the built-in display of the laptop is truncated.

In case it matters: I migrated my data to it from a 2015 edition MacBook Pro which had been upgraded to Mojave.

I’ve tried looking in System Preferences but don’t see anything related to screen size in the Displays subsection. I’ve also tried looking for zoom/magnifying settings (such as might be used for a11y reasons), again to no avail.

I’d welcome suggestions for things to try here.