How to get a parameter value from the current URL in views-view-fields.html.twig?

I need the argument value in the theme templates and using the views-views-fields--view_name--block_1.jhtml.twig.


I’m current getting the current URL like that:

{% set url = url('current')%} 

Which outputs:

https://example.com/questions/12225 

But I need only the 12225 value from the current url. How can I get the last parameter from the current URL in Twig?

Use a single shortcut to activate an app (might running in other spaces) in the current space

Background: I have two spaces, one is for work and one is for entertaining. They are for different purposes, and it is a common situation where the same app is running in both spaces (for example, a web browser app can have 2 different windows, one is related to work and one to Internet browsing, and they are distributed in different spaces).

What I want to achieve: I like the ability to activate an app quickly by using a single shortcut (by using Keyboard maestro, or Karabiner, or BetterTouchTool, or whatever app you would recommend to me). This single shortcut can achieve several things in different situations:

  1. When the app is not running in any of the space, then the obvious thing is to launch it in the current space

  2. When the app is running and have window(s) open in the other space –

    2.1. But there is no window open in the current space – then open a new window of this app

    2.2. And there is already existing window(s) open in the current space – then resume the existing window(s)

Do you know how can I achieve this effect? I have tried many ways with the aforementioned OS assistant apps, but because they can only tell whether the specific app is running and is at the front (even if it is only running and at the front in the other space), but cannot tell if there is a window open or not in the current space, so I cannot achieve 2.1 and 2.2 both at the same time using a single shortcut.

If I activate the app (similar to clicking on the dock icon but with a shortcut) with window(s) running in the other space, then only 2.2 can be achieved not 2.1. In fact, nothing would happen in the case of 2.1, no popping out any window or switching to the other space or anything, because the system assume that the app is running and it already has its focus on it, while in fact the running window is on the other space so the current space cannot see a thing. You always have to follow with a next move, for example, command + N to create a new window, or just switch to the other space to check whether there is a window open, and it’s overall a very jarring experience.

Or, I can always open a new window of the app in the current space using shortcut, but in that case only 2.1 can be achieved not 2.2. It’s very useful to resume the existing window(s) where you have already been working on in the current space.

Hopefully I have made my conundrum clear enough. It would be much easier for me to navigate the whole OS if I can find a way to work this out, so thank you for any input!

Alt+Tab on Excel 2010 re-selects the current Excel window by default

I have a problem with Microsoft Office 2010 on Windows 10.

The Microsoft Office suite of programs behaves inconsistently with regards to Alt+Tab. By default Excel, Word, Powerpoint, Publisher, and Visio all display multiple windows in the taskbar. Word, Powerpoint, and Publisher allow Alt+Tabing between documents as if each window was a separately opened program. Visio only has a single item in the Alt+Tab list, no matter how many windows (documents) are open, so documents can’t be switched between with Alt+Tab.

Worst of all, Excel treats each window as a separate item as most of the Office programs do, but if an Excel document (spreadsheet) is the active program, the highlight is “sticky”, staying on the first item in the Alt+Tab list (Excel) instead of moving to the second item as all other programs do. It is necessary to keep holding Alt while letting go of Tab and then pressing it a second time to get the second item to highlight. After this, further Tab presses work as normal. I.e. pressing Alt+Tab once and letting go of both keys has no useful effect if Excel is the active program, as the same program remains as the active one.

This answer: https://superuser.com/a/923381/148107 says to uncheck File => Options => Advanced => Display => Show all windows in the Taskbar. While this does allow Alt+Tab to work the same for Excel as it does for other programs, Excel no longer works the way the rest of the Office suite does because Alt+Tab can’t be used to switch between documents anymore, as well as hiding all non-active documents on the taskbar (different from Visio, where all the documents are available on the taskbar, but only the active one appears in the Alt+Tab task list).

Is there a way to get the Alt+Tab list (with window preview) to automatically highlight the second item on a single press if Excel is the currently active program, and Excel document switching is enabled?

Magento 2 – Best way to check if the current category is child

I want to change the design of my store depends of the categories and subcategories.

I need to check if the current category is subcategory and if is subcategory then display something there.

I made this before in Magento 1.9 with the getLevel function:

$  isLevel2 = $  _category->getLevel() == 2; if ($  isLevel2) { 

how I can get the Level in Magento 2 version?

Thank you

Can i get distribution list of current user in SharePoint using JSOM or REST API

I have written a logic to check if the current user belongs in a Specific SharePoint Group e.g. “Visitors”. However this user is present in the DL and the DL is added in the SP group, e.g. DL-Org. The query returns null as the user is not present in the group directly.

Is there a way to get the SP groups the user is part of if the User is present in a DL group?

$r$-differential posets: current state of the art

In the nice paper “On the rank function of a differential poset” (2011) by Richard Stanley and Fabrizio Zanello a number of interesting questions was asked about such posets. I would like to know which of them are already answered, what are new questions appeared in the field and so on, what are now considered to be the most important and so on. Maybe, some new surveys appeared?