Matrix operations preserving the middle coefficients of characteristic polynomial

Let $ n$ be a positive integer. For a ring $ A$ and matrix $ M \in \mathrm{Mat}_{n \times n}(A)$ , let $ \chi_{M}(t) = \det(M-t \operatorname{id}_{n}) = (-1)^{n}(t^{n} – \sigma_{M,1}t^{n-1} + \dotsb + (-1)^{n}\sigma_{M,n}) \in A[t]$ be the characteristic polynomial. Here $ \sigma_{M,1}$ is the trace of $ M$ and $ \sigma_{M,n}$ is the determinant of $ M$ . Recall that $ \sigma_{M,1}$ is additive and $ \sigma_{M,n}$ is multiplicative, i.e. $ \sigma_{M_{1}+M_{2},1} = \sigma_{M_{1},1} + \sigma_{M_{2},1}$ and $ \sigma_{M_{1}M_{2},1} = \sigma_{M_{1},1}\sigma_{M_{2},1}$ .

Are there any matrix operations that preserve the middle coefficients $ \sigma_{M,2},\dotsc,\sigma_{M,n-1}$ in any reasonable sense?

This is related to the question Geometric interpretation of characteristic polynomial but I don’t yet understand whether it answers my question.

What type of navigation to use for middle sized website?

I am redesigning a website for our association with around 40 pages, which may be divided into the 4 main categories, each containing the same number of links.

On the old, outdated site, the links were in the single sidebar, which required the large ammount of scrolling due to the font size. The major audience are people over 50, so the aim is not to make the drastic change to the navigation, so they do not get confused and they view the website mainly on the desktop.

The initial idea was to include the navigation on the right side of the header, where each category is a drop-down menu with the links, however drop-down menus are not considered to be the good UX practice, moreover, the navigation appears to be chaotic on the screens with lower width due the long name of our association (25 characters), i.e. there is a small space between the name of the assoc. and the navigation.

The another idea is to use a mega menu, where all of the four categories with their links are listed. Moreover, each category would be visually separated by using the one of the four dominant colors of the assoc. Also, all links on the one screen would resemble the old site’s navigation the visitors are used to.

All sources I have found, state, that mega menus are the good decision for huge websites, e.g. for corporations or eshops with hundreds of pages, where each main category has its own mega menu.

Is using the single mega menu for the whole website (triggered by clicking the menu button) the good idea?

Thank you for your suggestions.

Notepad ++ Remove start and end of a string while keeping the middle

I have a text file that contains something like this:

iosudhfsdkflasgj \aaa asdgsdga3453t.ggsdg\n \bbb hjdfghjdfgjhh \ccc jtj56ywyrty546y \bbb yjksfgh \aaa sefgwetgwgeregerg \bbb u56j56jh \ddd agfwegaewrg\n \bbb

Basically the string in the middle have letters, number and sometimes \n at the end,right before \bbb. The string in the middle can have few or many characters.

I want to remove the strings \aaa and \bbb where is starting with \aaa and ending with \bbb, but keep the middle part. i also dont want to touch those starting with \ccc, \ddd, \eee …

Thank you!

Quicksort implementation with pivotal calculated as middle element

I read quick sort algorhitm and implemented in like this:

public List<Integer> sort(List<Integer> list) {     if (list.size() <= 1) {         return list;     }      int pivotalValue = list.get(list.size() / 2);      List<Integer> left = new ArrayList<>();     List<Integer> pivotalValues = new ArrayList<>();     List<Integer> right = new ArrayList<>();     for (Integer element : list) {         if (element < pivotalValue) {             left.add(element);         } else if (element > pivotalValue) {             right.add(element);         } else {             pivotalValues.add(element);         }     }     List<Integer> sortedLeft = sort(left);     List<Integer> sortedRight = sort(right);     sortedLeft.addAll(pivotalValues);     sortedLeft.addAll(sortedRight);     return sortedLeft;  } 

What do you think about my implementation?

Middle database between the site and back office

I was thinking about transfers between the website and the back office, where we will have a middle database between them. This would mean we will no longer read or write directly to the web database but instead, I read and write only to the middle database.

With this approach, it would be much easier to trace the data transfers to and from back office and website. We would always have an audit trail of what information was passed. But it would mean that I would have to have a method to export data to the middle database and to import data from the middle database.

Do you think this is possible for Drupal?

PS. The back office currently creates nodes using MySQL queries, but I’m thinking about adding additional source via RestAPI, however, I’m worried about the side effect (I think services are quicker).

Squeezing in the middle of a room

As per the rule on squeezing :

A creature can squeeze through or into a space that is at least half as wide as its space. Movement while squeezing is hampered, and the squeezing creature suffers a -4 penalty on attack rolls and a -4 penalty to Armor Class

Let’s presume the following layout enter image description here

Where O is an ogre, A are pc characters and XX, YY, ZZ are a ‘squeezed’ ogre moving to avoid Attack of opportunity to move past the PC and arrive in the back of the room after spending 60 feet of movement (10 ft per square cost because of squeezing)

Is that movement allowed as per RAW ruling ?