Expansion of spacetime and matter
Why does space expansion not expand matter?
Is there a test for the different styles within maths mode?  What I really want is to be able to save the current style to reinvoke it later on, but a \if along the lines of \ifmmode would work just as well.  In the specific example, I want to measure how big something will be when displayed in maths mode, so I do:  \settoheight{\mathheight}{some bit of maths}   except that it complains because the some bit of maths gets put in a box and measured, and the box doesn't know that it's maths.  So instead I put:  \settoheight{\mathheight}{\(some bit of maths\)}   except that then I get the wrong answer if this is used in displayed maths.  So ideally, I want:  \ifdisplaystyle  \let\currentstyle\displaystyle \else  \iftextstyle   \let\currentstyle\textstyle  ...  \fi \fi \settoheight{\mathheight}{\(\currentstyle some bit of maths\)}   and then I'll be happy.  Is there such a test?    Okay, so \mathchoice is clearly the way to go (thanks Martin!), but its behaviour is a little odd and since I want to use it to define a macro depending on which mode I'm in, this oddity is quite important.  Here's the code:  \newcommand{\mathtest}{% \gdef\name{a}% \mathchoice{% \name \gdef\name{b}% }{% \name \gdef\name{c}% }{% \name \gdef\name{d}% }{% \name \gdef\name{e}% }% \name}  \[ \mathtest \]   If \mathchoice behaved like \if, this ought to print ab.  But it prints ae.  All the options to \mathchoice get processed (which makes me wonder a bit how it works, but that's by-the-by).  So, is there an obvious way to make \mathchoice behave a little more like \if? $\dfrac{pq}{r}+\dfrac{qr}{p}+\dfrac{pr}{q}\in\Bbb Z\,\Rightarrow\, \dfrac{pq}{r},\dfrac{qr}{p},\dfrac{pr}{q}\in\Bbb Z$ Let $p,q,r$ be integers such that the symmetric sum of fractions $\dfrac{pq}{r}+\dfrac{qr}{p}+\dfrac{pr}{q}$ is an integer. Prove that each of the numbers: $\dfrac{pq}{r},\dfrac{qr}{p},\dfrac{pr}{q}$ is an integer. How to do this? Someone posted but deleted soon. Every irreducible Polynomial is primitive or irreducible constant In chapter 1, of Landau-Lifshitz Mechanics' book, Landau through isotropy and homogeneity of space and homogeneity of time proves that the Lagrangian must depend of magnitude of velocity of the particle.  This seemed fine. But he didn't give a reason as to why it must depend of $|v|^2$ and not on some $|v|^n$ where $n\neq2$. Setting custom UITableViewCells height Unity Tweak tool fails to start with the error "com.canonical.unity.webapps schema is missing" com.canonical.unity.webapps   In order to work properly, Unity Tweak Tool recommends you install the necessary packages Eigenspace of the companion matrix of a monic polynomial How do I prove that the eigenspace of an $n\times n$ companion matrix  $$ C_p=\begin{bmatrix} 0 &amp; 1 &amp; 0 &amp;\cdots &amp; 0\\ 0 &amp; 0 &amp; 1 &amp;\cdots &amp; 0 \\ \vdots&amp;\vdots &amp;\vdots&amp;\ddots&amp;\vdots\\ 0 &amp; 0 &amp; 0 &amp;\cdots &amp;1 \\ -\alpha_0 &amp;-\alpha_1 &amp;-\alpha_2 &amp;\cdots&amp;-\alpha_{n-1} \end{bmatrix} $$ equals $\operatorname{Span}\{v_{\lambda} \} $ where $v_{\lambda}$ is an eigenvector of the companion matrix w.r.t. the eigenvalue $\lambda$: $$ v_{\lambda} =  \begin{bmatrix} 1 \\ \lambda\\ \lambda^{2} \\ \vdots\\ \lambda^{n-1} \end{bmatrix}. $$ I hope this is not a repeat question. I tried searching but couldn't come up with the right search words for this question.  I see the following in the sidebar of my flagging history tab:    I notice that I have raised 28 helpful flags from my user page, but I see "27 deemed helpful" and "1 deemed helpful". What is the difference between the top half and the bottom half of the entries in the flagging history sidebar? How should I interpret the results displayed in the sidebar? Schengen visa refusal on threat to public policy, security, health I applied for German Schengen visa as a medical escort to my relative in a different country from  where I reside, but my visa application was refused and the refusal letter  was written in German as the following:        Ein oder mehrere Mitgliedstaaten sind der Auffassung, dass Sie eine Gefahr für die öffentliche Ordnung, die innere Sicherheit, die   öffentliche Gesundheit gemäß Artikel 2 Absatz 19 der Verordnung (EG)   Nr 562/2006 (Schengener Grenzkodex) oder die internationalen   Beziehungen eines oder mehrerer Mitgliedstaaten darstellen.      I was in Germany for nearly a year with my relative during his treatment; I extended my stay there 3 times; and I returned back home two months ago in order to renew my passport. I applied again using the same documents that I used for my extension in Germany.    First, can anyone tell me what the refusal means? Next, is there any possibility that there is a mistake in the assessment?    Note: In English this reason is...     One or more member state(s) consider you to be a threat to public   policy, internal security, public health as defined in Article 2(19)   of Regulation (EC) No 562/2006 (Schengen Borders Code) or the   international relations of one or more of the member states). Modify all bash commands through a program before executing them I am trying to create a program which require such feature. The flow will be like:   User enter a bash command User hit the enter My script will get command, current directory,.. as variables. Program can optionally modify the command. Modified command will get executed normally.   Is there any way to do this?  Note: I need this for my personal use, I am not going to distribute this program. 2 GROUP BY WITH DISTINCT , SUM , COUNT : PHP MYQL Ref :   I got answer (thanks coytech ) but i need one more column in its :  as per :  id | mid | pid | owgh | nwgh | 1    3      12    1.5    0.6 2    3      12    1.5    0.3 3    3      14    0.6    0.4 4    3      15    1.2    1.1 5    4      16    1.5    1.0 6    4      17    2.4    1.2  7    3      19    3.0    1.4   i got answer      Select mid ,          COUNT(distinct pid) as cpid  ,          SUM(nwgh) as totalnwgh  from test  GROUP BY mid   sqlfiddle :   mid  cpid       totalnwgh 3      4          3.8 4      2          2.2    But above i need one more column that's as below : totowgh  mid cpid        totalnwgh  totowgh 3      4          3.8        6.3 (DISTINCT value as per pid column) 4      2          2.2        3.9   where totowgh = 6.3 come by DISTINCT value of owgh column  as per distinct pid column  mid = 3 has count 5 but distinct pid  = 4 for mid=3 same way "distinct" owgh = 6.3 for mid=3 and distinct pid.  As pid=12 , column owgh value 1.5 is twice ...hence its is count 1 time hence,  1.5 + 0.6 + 1.2 + 3 = 6.3 ( please not this is as per DISTINCT value of pid )  Please note : i need distinct owgh value as per distinct pid or group by pid .. because if i replace value of owgh 0.6 with 1.5 then it will be 5.7 instead of 7.2 but value of owgh 0.6 belong to pid = 14 and not pid = 12 hence totalcount of owgh change ...but i need is 7.2  SEE WHAT I MEANS   : $f_n → f$ uniformly on $S$ and each $f_n$ is cont on $S$. Let $(x_n)$ be a sequence of points in $S$ converging to $x \in S$. Then $f_n(x_n) → f(x)$. Assume that $f_n → f$ uniformly on $S$ and each $f_n$ is continuous on $S$. Let $(x_n)$ be a sequence of points in $S$ converging to $x \in S$. Then $f_n(x_n) → f(x)$.  I'm stuck in thinking about it and I don't manage to prove it neither to find a counterexample. Thanks for your help. My PC was working yesterday without any problem. I shut it down and tried to open this morning. It prints out these messages on the black screen:  systemd-udevd[713]: failed to execute '/bin/systemctl' '/bin/systemctl start --no-block nvidia-persistenced.service': No such file or directory  systemd-udevd[852]: failed to execute '/bin/systemctl' '/bin/systemctl stop--no-block nvidia-persistenced': No such file or directory   It then continued with the login screen. I entered my password and pressed enter. It waited for a while and the login screen reappeared again.  How can I fix the problem? "In the case of medical diagnostics, there is a cost associated with each medical procedure that provides additional information (blood test, x-ray, etc.)."   Should that end with "etc.).", "etc)." or "etc.)"? Marriage Tax Benefits How can one prove that numbers of the form $4x^2+1$ can only be divided by primes of the form $4y+1$ (e.g. there is no $x$ for which $7$ divides $4x^2+1$)?   On a quick lookup, the statement is given as the first comment in  and of course, manual testing concurs with this Who is blowing the horn to alert the Night's Watch? I think I've got it down to the most basic case:  int main(int argc, char ** argv) {   int * arr;    foo(arr);   printf("car[3]=%d\n",arr[3]);   free (arr);   return 1; }  void foo(int * arr) {   arr = (int*) malloc( sizeof(int)*25 );   arr[3] = 69; }   The output is this:  &gt; ./a.out   car[3]=-1869558540  a.out(4100) malloc: *** error for object 0x8fe01037: Non-aligned pointer                          being freed  *** set a breakpoint in malloc_error_break to debug &gt;   If anyone can shed light on where my understanding is failing, it'd be greatly appreciated. I just installed Call of Duty 4 and when I try to run the single player mode nothing happens. I just see a quick flicker on the desktop but the game doesn't launch. When I try to run it again, it gives me this message:      It appears that cod4 did not quit properly the last time it ran. Do you want to run the game in safe mode?    Multiplayer seems to work fine and when I try to switch to single player from the multiplayer menu the same thing happens, it just goes back to my desktop and that message shows up again Radially symmetric charge distribution (dipole moment) a) There's a radially symmetric charge density $\rho(r)$ centered around the origin. Determine the dipolemoment of that charge density. b) Let $\rho(r)$ be an arbitrary charge density now. Under what circumstances does the dipole moment of the displaced charge density  $\rho '(\vec{r}) = \rho (\vec{r}-\vec{b})$ differ from the one not displaced at all.  Here were my ideas so far: a) Just thinking about the situation it has to be zero, right? I mean, since there's no real dipole. But how do I show that mathematically? I was thinking of just going like this (it may be wrong): Let the charge density be $\rho (r)=kr$, then we can get the charge q by integrating: $$q=4\pi \int_0^R kr\cdot r^2dr=\pi k R^4$$ I'm looking at the charge distribution as a spherical electron cloud with radius $R$. Then, since $p=qd$ and $d$ is zero because there are no two different charges the dipole moment is zero. Is that sufficient as an answer? b) I don't know how to approach this one. My guess is that its dipole moment is also zero because we're only looking at a displacement here. Anyone got any idea? I would appreciate any advice on this.