linear algebra – How well-behaved are the operations of mapping a matrix to the $S$ or $N$ part of the $S+N$ decomposition?

Consider the maps $S,N colon mathrm{Mat}_{n}(mathbb{C}) to mathrm{Mat}_{n}(mathbb{C}) $ taking a matrix to the $S$ or $N$ part of the $S+N$ decomposition. How well-behaved are these maps? Are they e.g. continuous/Lipschitz/differentiable/smooth/holomorphic, and if not (which I suppose is the case), do they satisfy some weaker versions of these properties? What about all the other properties one could consider?

linux – Selinux: changing root mapping

I want to control some accesses of root in Linux- fedora, for example, I want to run a process and I want root not to be able to kill it.

I use SELinux and I changed root mapping from unconfined to guest_u:

Login Name           SELinux User         MLS/MCS Range        Service

root                 guest_u              s0                   *

also, I changed my current account to root SELinux User mode. like this:

Login Name           SELinux User         MLS/MCS Range        Service

my_user              root                 s0-s0:c0.c1023       *
root                 guest_u              s0                   *

theoretically, after registering changes by rebooting, my user must have grant root privileges and the root must be unable to do many actions and activities.
but this not happened. and my root still can do everything (enabled by sudo su – from current account) and my current account can’t do what I want.

could someone explain to me what’s happened there, after I registering changes? and why I cannot reach what I want here??

thank you for any feedback!

real analysis – Is there any injective mapping from smooth functions on closed interval to smooth functions on circle? Motivated by signal processing

One advantage of Discrete Cosine Transform (DCT) over Discrete Fourier Transform (DFT) is that DCT maps any “continuous” signal defined on interval to a continuous one defined on circle.

I will omit this signal processing stuff and just describe what it means in our every-day mathematical language.

Let say we have a continuous function $f:(0,1)tomathbb{R}$, and we wish to decompose it into countable series of whole-valued frequencies. Thus, we would have to wrap $f$ around the circle and in general it would result in discontinuity (see image below) since in general $f(0)neq f(1).$

The trick with Cosine Transform is to reflect $f$ across $y$-axis resulting in function defined on $(-1,1)$. This function has equal values at boundaries so it could be wrapped around circle continuously (see image below).

enter image description here

I wonder if the trick from Cosine Transform can be pushed further to preserve smoothness. More precisely, is there any injective operation $Phi$ such that it maps any smooth function $f:(0,1)tomathbb{R}$ to a smooth function $Phi(f):S^1tomathbb{R}$? If so, is there any “simple” such $Phi$ like in the Cosine Transform?

python – How can I write this csv header mapping with less code?

Morning all! I have the following code where I am trying to map columns from the input file to output. I have written it using multiple loops is there a way to write this with less code?

input.csv contains:

  Name, Age, Gender, Nationality
  Joe, 18, Male, British

import csv

renamed_headers = {
    "Name": "First_name",
    "Surname": "None",
    "Age": "Age_Years",
    "Gender": "Gender_Type",

with open("input.csv") as input_file, open(
    r"output.csv", "w", newline=""
) as output_file:
    reader = csv.DictReader(input_file, delimiter=",")
    writer = csv.writer(output_file, delimiter=",")

# write headers
header_line = ()
for header_name in renamed_headers.keys():

# write values
for item in reader:
    row_to_write = ()
    for value in renamed_headers.values():
        if value:


complex analysis – Is $e^z$ a conformal mapping if the domain is $-pi leqq Im z

My text gives an example of a conformal mapping :

enter image description here

I was wondering whether we still have a conformal mapping if we change the domain from $-pi leqq Im z<pi$ so the mapping is to the entire complex plane minus the origin. This is still a one to one map and I believe the partial derivatives are continuous. I hope this is not a bad question. I am just asking because very small changes in the domain can change the continuity or differentiability of complex mappings.

redux – Mapping object in ReactJS

I have a JSON like this:

  "Status": true,
  "models": (

that I am trying to map

<Form.Control as="select" defaultValue={checkoutForm.Model} onChange={handleChange("Model")}>
          , index) => (
                      <option key={index}>{makes}</option> 


and here is my redux state
enter image description here

unfortunately, I am getting ‘TypeError: is not a function’ error and I don’t see why

Thanks for your help.

google maps – Need book/framework/tutorial recommendations for live mapping web application

Guys looking for some assistance pointing me in the right direction,
I’m not new to programming (I’ve been doing applications in C and Python for some time) but I’ve never touched web development.

There is a lot of information out there, some advice with the best frameworks, mapping-api’s & languages alone for the task described below would be helpful.
A solution that leverages the python experience would be preferred as getting the application up soon is a big priority (so far I’ve been looking into django).

The application is for a live map that allows the client to see location updates in real time without having to refresh the page (one or more pin gets updated coordinates and can move around on the map as the coordinates change).
If a user zooms in on the specific pin under inspection, each refresh of the page should ‘remember’ where the user was looking, and how zoomed in they were.
The pins visible to the user are associated with their account.

The coordinates for the pins are updated on the back-end periodically (This part already works, it’s the client-side-presentation/web app that needs work now).

So far I’ve tried using django with a mapbox api. The problem I’ve had is that my code requires the user to manually refresh the page this is obviously not feasible. Even getting the page to auto-refresh prevents the map & streets etc from loading fully before each refresh, and also the user would need to zoom in again on the location of interest.

I’m not expecting anyone to write the code but what I really need is direction, once I get a good book recommendation/ web tutorial that solves these types of problems I’d be most appreciative.

I’m not sure if it’s my lack of javascript skills or it’s the mapbox api that’s limited in the live-update feature set. A recommendation for a mapping api that can do this properly will also be helpful.

In fact, I think the main problem is either from not knowing javascript or trying to use the wrong mapping api. I expect a decent amount of users in the first year but for now whatever is the easiest to use for this task just to get off the ground will do.

Your feedback is appreciated.

complexity theory – Is there a mapping reduction for every two language $A$ and $B$ to some language $C$?

One of my friend told me that there is a language $C$ for every two languages $A$ and $B$ s.t $A leq_{m} C$ and $B leq_{m} C$ , he simply define two languages $A’={0w|w in A}$ and $B’={1w|w in B}$ so $C=A’ cup B’$ and he define the function $f(w)=0w$ if $w in A$ and and $f(w)=1w$ otherwise. I suspect this function is turing-computable. Suppose $A$ be $overline{HP}$ which is not RE. How we can decide if $w in A$ ? Even i ask myself can we realy prove that such a mapp-reduction always exist ?

linux – How to check ip-port mapping after adding a port-forwarding rule by firewall-cmd

In CentOS7, I have made a tcp relay by command “firewall-cmd –add-forward-ports …”.
However, now I need to know the mapping rules between incoming ip and the port assigned to the ip by NAT as the new source port.

Is there a translation table somewhere in my system or how can I get the in-time-mapping?
Now the only possible way I have thought out is to add some LOG rule in iptables where a forwarding is accepted.

How can I make my resource mapping faster?

I have a Direct3D 11 application and recently I’ve started to implement a new feature on it, the UI(User Interface).

It seems to work well, but I’m having one problem with optimization when it comes to moving stuff on my window, currently I can create a 2D square with textures and a 300×300 resolution.I can drag it around my screen by calling a function that updates the square position on my screen.

bool Model::UpdateModel2D(ID3D11DeviceContext* pDeviceContext, short NewX, short NewY)

if ((m_PreviousX == NewX) || (m_PreviousY == NewY)) // detects if the UI position is the same as before
    return true;
ModelData* pNewData;
ZeroMemory(&ms, sizeof(D3D11_MAPPED_SUBRESOURCE));

ModelData pData(6); //Builds two triangles in order to form a square.

pData(0).VertexData = XMFLOAT3(NewX, NewY, 0.0f);
pData(0).TextureCoords = XMFLOAT2(0.0f, 0.0f);

pData(1).VertexData = XMFLOAT3(NewX + 300.0f, NewY + 300.0f, 0.0f);
pData(1).TextureCoords = XMFLOAT2(1.0f, 1.0f);

pData(2).VertexData = XMFLOAT3(NewX, NewY + 300, 0.0f);
pData(2).TextureCoords = XMFLOAT2(0.0f, 1.0f);

pData(3).VertexData = XMFLOAT3(NewX, NewY, 0.0f);
pData(3).TextureCoords = XMFLOAT2(0.0f, 0.0f);

pData(4).VertexData = XMFLOAT3(NewX + 300.0f, NewY, 0.0f);
pData(4).TextureCoords = XMFLOAT2(1.0f, 0.0f);

pData(5).VertexData = XMFLOAT3(NewX + 300.0f, NewY + 300.0f, 0.0f);
pData(5).TextureCoords = XMFLOAT2(1.0f, 1.0f);

hr = pDeviceContext->Map(m_pVertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &ms);
if (FAILED(hr))
    return false;

pNewData = (ModelData*)ms.pData;
memcpy(pNewData, pData, sizeof(ModelData) * m_NumVertices); //updates the position of the 2D square
pDeviceContext->Unmap(m_pVertexBuffer, 0);

return true;

To drag this square I have to left click on it and move my mouse, but this is an issue because my application get’s too slow, and it looks like the longer I hold it on my mouse, the slower the application get’s, until it get’s released. If someone knows how to improve updating my buffers, please help me.