How to display singular form of category name?

I have the following code to show the names of the categories for a single post. My categories are named in the plural (i.e. articles, letters, translations, commentaries, etc.), but in this function I want to return a singular version of the name, i.e. article, letter, translation, commentary, etc.).

$  categories = get_the_terms( $  post->ID, 'category' ); if( !empty( $  categories ) && !is_wp_error( $  categories ) ) {         foreach( $  categories as $  category ) {         $  catdisplay = sprintf(             '<a target="_blank" href="%1$  s">%2$  s</a>%3$  s',             esc_url( get_term_link( $  category ) ),             esc_html( $  category->name ),             '<span class="cat-sep">, </span>'         );          echo sprintf( esc_html__( '%s', 'textdomain' ), $  catdisplay );     } } 

I was thinking to build in something with the following logic: if name = “articles” return “article”, or if name returned = “commentaries” return “commentary”, but am unsure how to accomplish that or if there’s a better way to do it. I’m also open to better ways to structure the above code.

How to solve a matrix PDE and stop solving when solution becomes singular?


My question consists of two parts:

  1. How do I get mathematica to solve a PDE Matrix system and plot the result? See below for the PDE matrix system. (By plot the result I mean plot the region where the solution $ \Theta$ is nonsingular.)
  2. How do I stop the integration when the solution matrix becomes singular? I know that away from $ (x_1,x_2)=(0,0)$ the solution matrix $ \Theta$ will become singular how do I stop Mathematica from trying to solve pass this point?

The PDE matrix system I am trying to solve is \begin{align} \dot{\Theta}(x_1,x_2)+A&=\lambda \Theta(x_1,x_2) &\quad \text{Equation}\ \Theta(0,0)&=\begin{pmatrix} 1 & -\frac{1}{2} -\frac{\sqrt{3}}{2} \ 1 & -\frac{1}{2}-\frac{1}{2\sqrt{3}}+\frac{2}{\sqrt{3}} \end{pmatrix} &\quad \text{Initial condition} \end{align} I have specified the values of $ \dot{\Theta}(x_1,x_2),A,\lambda$ in the block below:

(* Definitions *) A = {{-(x1^2 - 1), -2 x2 x1 - 1}, {1, 0}} lambda = {{1/2, -Sqrt[3]/2}, {Sqrt[3]/2, 1/2}} (*Value of theta for x1=x2=0 *) ThetaInit = {{1, -1/2 - Sqrt[3]/2}, {1, -1/2 - 1/(2 Sqrt[3]) +      2/Sqrt[3]}} (*Derative of Theta in terms of t. Note \ \frac{dtheta}{dt}=x1'(t)\frac{\partial theta}{\partial x1}+x2'(t) \ \frac{\partial theta}{\partial x2} *) ThetaDot = ( -(x1^2 - 1) x2 - x1) D[Theta[x1, x2], x1] +    x2 D[Theta[x1, x2], x2] 

Notes

  • If you need any clarification please feel free to ask.

I’m going to play D&D as twins who had their minds’ merged. Any tips on playing two characters as a singular? [on hold]

So I’m going into a new campaign in D&D 5e as twins who were caught at a young age by mind flayers. Instead of being assimilated, they were found to be immune of the Illithids powers. Long story short, twins play as one character, does anyone have any tips for playing two characters as one in D&D? Advice on character creation is mostly what I need, I have an idea on how to play.

Plural or Singular + (s) in title name for dropdown fields

When designing dropdown fields for users that can hold 1 or more values, would you suggest to use the plural form of the title word, or the singular form followed by a (s).

Example 1: Teams

Example 2: Team(s)

In my opinion, the first example implies that the user can select multiple values. On the other hand, the second example shows that a user can also just select 1 value, but it looks not as clean as the first example.

Thanks and kind regards

Allow Sharepoint REST API app access to a singular list and nothing else

By default the permissions of a sharepoint app seem limited to read/write/full control over the entire site.

I’m looking for a way to grant a supplier access to a list but do not want them to be able to access the information stored on the site other than the list.

Preferred solution would be to limit the app using user permissions like a regular user.

Ideal of strictly singular operators

Let $ X$ be a Banach space. An operator $ T:X\to X$ is called strictly singular iff for any infinite dimensional subspace $ Y\subseteq X,$ $ T|_{Y}:Y\to T(Y)$ is not an isomorphism.

It is known that for $ X=\ell_p,$ $ 1\leq p<\infty,$ an operator is strictly singular iff it is compact. Also $ T:\ell_\infty\to\ell_\infty$ is strictly singular iff $ T$ is weakly compact. Can someone provide me proofs for these facts? I could not really locate proofs of the above mentioned facts in literature.

Random matrix with given singular value distribution

Let $ X\in\mathbb{R}^{n\times n}$ be a random matrix defined in the following way: $ $ X=U\Sigma V^T$ $ where $ U,V$ are iid uniformly distributed on $ O(n)$ , $ \Sigma=diag\{\sigma_1,…,\sigma_n\}$ and $ (\sigma_1,…,\sigma_n)$ have joint density $ f(\sigma_1,…,\sigma_n)$ with respect to the Lebesgue measure on $ \mathbb{R}^n$ . Moreover, we assume $ f$ is invariant under permutation of coordinates and change of sign of each coordinate.

Now the question is, what is the density of $ X$ with respect to the Lebesgue measure on $ \mathbb{R}^{n\times n}$

Can the cardinality of the set of all intervening cardinals between sets and their power sets be always singular?

This is a question that I’ve posted to Mathematics Stack Exchange, that was un-answered.

To re-iterate it here:

Is the following known to be consistent relative to some large cardinal assumption?

$ \forall \kappa [\kappa >2 \to \kappa < \kappa^* < 2^\kappa \wedge singular(\kappa^*)]$

where $ \kappa$ is a cardinal and $ “<“$ is strict cardinal smaller than, and $ \kappa^* = |\{\lambda|\kappa < \lambda < 2^\kappa\}|$

Solving numerically a special singular integral equation

I am trying to code the following integral equation to find the solution numerically using Mathematica. In fact the exact solution is x^2 (1 - x).

First we define the following functions:

phi[x_]:=Piecewise[{{1, 0 <= x < 1}}, 0] 
f[x_] := 1/    1155 (112 (-1 + x)^(3/4) +       x (144 (-1 + x)^(3/4) +          x (1155 + 256 (-1 + x)^(3/4) -             1280 x^(3/4) - (1155 + 512 (-1 + x)^(3/4)) x +             1024 x^(7/4)))); exactsoln[x_] := x^2 (1 - x); 

I am trying to solve the following integral equation for u (x) (numerically). where

u[x] - Integrate[(x - t)^(-1/4)*u[t], {t, 0, x}] -     Integrate[(x - t)^(-1/4)*u[t], {t, 0, 1}] = f[x]; 

where f[x] is defined as above. Here is the numerical scheme. Our goal is to find the coefficients c[j, k]. We approximate the solution u by the approximated solution \approx[x] which can be written as

approxsoln[x_, n_] :=   Sum[c[j, k]*psijk[x, j, k], {j, -n, n}, {k, -2^n, 2^n - 1}] 

If you plug the function approxsoln[x,n] in the integral equation, we will end up by

Sum[c[j, k]*(psijk[x, j, k] -       Integrate[(x - t)^(-1/4)* psijk[t, j, k], {t, 0, x}] -       Integrate[(x - t)^(-1/4)* psijk[t, j, k], {t, 0, 1}]), {j, -n,     n}, {k, -2^n, 2^n - 1}]; 

Now every thing is known except the coefficients c[j,k]. We need to use a suitable subdivision, may be divide the interval [0,1] into (2n+1) 2^(n+1) points (to meet the size of the truncated sum in approxsoln[x,n]) to be used in the equation to construct a system of linear equation, to find these coefficients in order to find the approximated solution (approxsoln[x,n]) defined above. Is there any way to code this problem using Mathematica. I think it is worth to try for n=10 first.