how to automaticaly start a service in linux if it fails
How to automatically restart a linux background process if it fails?
How do you properly use namespaces in C++? Matrices that can only be permutation matrices How to prove that if $A$ and $B$ are two $n×n$ matrices with non negative integer entries such that $AB=I$ then $A$ and $B$ are permutation matrices?  Permutation matrices are matrices with the columns just a permutation of the identity matrix. How do I proceed. Can somebody give hint? Math mode accents In my long document I, sadly, have to use several accents to denote different kinds of symbols. Currently, I use primes ($x'$), hat, tilde, and overline. In addition I use two colored symbols (red colored tilde and blue $\prescript\ulcorner$), as I need further distinguishment.  Now I'd like to have no colors in my document, while I still have at least six different ways to differentiate certain symbols.  Which alternatives could I use that are easy to recognize and 'stand out', while they are different to prime/hat/tilde/overline?  EDIT: The reader should be able to see the kind of accent used even if the symbol in question is in a sub-script (possibly even a sub-sub-script). How to install MySQL workbench? Installing MySQL workbench on 10.04 or 10.10 is not a problem, as the deb packages are available on MySQL's website.  But there is no 11.04 deb package available.  So, how do I install MySQL workbench on 11.04 and keep it updated automatically when updates become available to ubuntu via apt-get update. Manual/automatic line breaks and text alignment in TikZ nodes How can I insert a line break in a TikZ node? Simply putting \\ where I want the break doesn't work (see MWE).  Is there a way to make lines break automatically at some specified width?  And can I control the alignment of the text (left, right, centered, justified)?  \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node {First line\\second line}; \end{tikzpicture} \end{document} What counts as a "visual illusion" for a character that has Truesight? Creatures with Truesight, have a number of benefits, one of which is that they     automatically detect visual illusions and succeed on saving throws   against them   How do you determine if a spell creates a visual illusion? Is it as simple as "If the illusion creates something that the target can see, it's visual" or is there a more specific rule?  For some context, this came up into play in our last session where a Wizard PC cast Mental Prison on an enemy with Truesight an we weren't exactly sure how to rule it at the time and decided to research it after the session was over. Proving $f(x,y,z)=\big(\frac{x}{a+x+y+z}, \frac{y}{a+x+y+z}, \frac{z}{a+x+y+z} \big)$ is injective Let $a\in \mathbb{R}$, $a\neq 0$, and $E=\{(x,y,z)\in \mathbb{R}^3:a+x+y+z\neq 0\}$ and $f:E\rightarrow \mathbb{R}^3$ defined by $$ f(x,y,z)=\big(\frac{x}{a+x+y+z}, \frac{y}{a+x+y+z}, \frac{z}{a+x+y+z} \big) $$ Show that $f$ is injective.    I've been trying to prove it directly by showing that if $f(x_1,y_1,z_1)=f(x_2,y_2,z_2)\Rightarrow$ $x_1=x_2, y_1=y_2,z_1=z_2$. But I get a system of equations which I'm find difficult to deal with. Any help would be greatly appreciated. It was suggested that I should get myself a polarizer filter to get over my reflection problem. (  )  I found out that a Nikon 52mm Circular Polarizing Filter CPL   while I can get another filter for less than half the price — . (Please note that I know nothing about these filters and googled them just for the example.)  What is the difference between polarizer filters?  I need to remove the glare and nothing else — would either of the two do the magic for me? What filter do you recommend for me? What is the need of complex functions in wave analysis? It is commonly known that waves can be express in terms of sine or cosine function. But when I study further, I seen that for analyising the waves, it is common to use complex functions in the form $$y=y_{_0}e^{i(kx-\omega{t})}$$ where $y_{_0}$ is the amplitude, $k$ is the wave number, $\omega$ is the angular velocity and $x$ &amp; $t$ are position an time respectively. Ofcourse, I know that the function $e^{ix}$ can be written in the form $\cos{x}+i\sin{x}$ and so it is a periodic function with period $2\pi$ but my question is for what purpose we define it in terms of complex numbers? It seem to be more convenient to use real functions for real variables such as amplitude, electric and magnetic field of an electro magnetic wave, and also in quantum mechanics. What actually this interpretation means or what is the advantage of such functions? Is there any way to run file explorer as administrator under Windows 10 After install Windows 10, it seems that I lost the ability to run explorer.exe as administrator with a user in administrator group.   The reason I want to do that is, in our team's development environment, we are using a C# exe to do some environment configuration which will start command prompt under administrator mode and subst a drive. As a result those substed drives are not visible within the file explorer since it is run not as administrator. That will be kind of inconvenience and sometimes make mistakes.   I was able to run explorer.exe from task manager with the option "create with privileges" checked and then I can see all the drives in explorer. But now this is not working anymore.   I knew there are other options to workaround this workflow, but just want to make sure that if it is now totally impossible under Windows 10?  Any comment is appreciated. Rotation of rigid body with two different angular velocities Consider a cylinder that rotates about a vertical fixed axis with angular velocity $\vec{\Omega}$ while rotating about  a vertical axis passing through its center of mass with angular velocity $\vec{\omega}$.    Now the two angular velocities of rotation $\omega$ and $\Omega$ are not the same I suppose and there is no link between the two angular velocities, is that right?  Firstly what is the angular velocity of the rigid body? I suppose that it is  $$\vec{\omega^{*}}=\vec{\omega}+\vec{\Omega}$$  But why?  And then what is the moment of inertia with respect to the axis $z$ of the rigid body? If I use parallel axis theorem I get  $$I_{z}=I_{cm}+mR^2$$  Where $R$ is the distance from $z$. But that doesn't seem right. The cylinder is not rotating about its center of mass at the same angular velocity of rotation about $z$. So using $(1)$ give some incorrect results. For istance kinetic energy  $$K=\frac{1}{2} I_{z} \vec{\Omega}^2= \frac{1}{2}(I_{cm}+mR^2)\vec{\Omega}^2$$  But that's the kinetic energy of a body rotating about $z$ and center of mass with the same angular velocity $\vec{\Omega}$, and this is not the case.  I'm confused, can anyone help me with give suggestion about angular velocity and moment of inertia in problems where the rigid body is rotating at the same time about two different axes? Origin of the dot and cross product? Most questions usually just relate to what these can be used for, that's fairly obvious to me since I've been programming 3D games/simulations for a while, but I've never really understood the inner workings of them... I could get the cross product equation as a determinant of a carefully-constructed matrix,   but what I want to ask is... How did the dot and cross product come to be? When were they "invented"? Some detailed proofs? Did someone say: "Hey, wouldn't it be nice if we could construct a way to calculate a vector that is perpendicular to two given operands?"  Basically, how/why do they work?  I would appreciate explanations, links to other explanations, other web resources... I've been searching the Internet lately for explanations, but most of them are on how to use it and nothing that really gives substance to it. I connected an external screen to my laptop, but my desktop didn't automagically extend to it, as it used to do about a year ago (older version of Ubuntu).  I went to the display settings. The screen was listed there (correct resolution, brand name, etc.). But when i put the switch on 'on' and click 'apply', i get this error:   Failed to apply configuration: %s  GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface `org.gnome.SettingsDaemon.XRANDR_2' on object at path /org/gnome/SettingsDaemon/XRANDR   It's been like this for a few months now, but i'd really like to be able to use an external screen/beamer again.  Any ideas?  Thanks. What is crop factor and how does it relate to focal length? Why can't my subclass access a protected variable of its superclass, when it's in a different package? Removing the first line of CSV file My daughter, 13, has said she wants to be a boy. A little background: we moved to a new state a year and a half ago. In her new school, she felt isolated among her peers until she met a girl in art, and became good friends. She joined the drama club, and made  friends with some 8th graders. They joined “the diversity club”. This club is a LGBT club. The kids put on a play they wrote and starred in, which had homosexual connotations. “Romeo and Juliet”, but script  rewritten to include  2 females as the couple, for instance.   My daughter got so wrapped up in it, that her life was as if she was copying the play. She’s no longer friends with the friend from art, but remains close with the 8th grade crowd. They all labeled themselves. One week, my daughter said she was gay, then, changed to bi, then onto pan. (I had to google that one). Now she is emphatic about being disgusted with her body and wants to be a boy. She wants to donate all the “girly” clothes she picked out last year, and tossed out all the makeup she bought a few months ago.   All her life, she was the classic girly girl. She had crushes on boys, and she and this boy were inseparable since first grade. She was sad when it came time to move away. When we settled here, she became sullen and angry, putting herself down. She now sees a therapist who she really likes. We’ve been working on her self esteem issues. She’s wanting us to call her “he” and by a male name. I can’t do that. She’s my daughter. She is female. Had we seen this coming, maybe I could come to accepting. But it happened out of the blue.  Sometimes the old her comes back-I got a makeup sample and she was interested in trying it, looked at me, then quickly put it down and said “ewww, makeup”—just a few months ago, she bought a bunch. She’s now wanting to wear boys clothes and talks of wearing a suit to her prom. She is very impressionable, and seems affected by viral YouTube videos about kids coming coming out to their mothers, and the mothers gleefully embrace with happy tears. She has told me when she’s 18, she’s having her breasts removed.    Nothing seems normal to me anymore-in terms of how she always was-this new situation just doesn’t fit.  My gut tells me this is a phase.  I’m hoping it’s a phase. But with all I’m seeing in the media about this, I’m not sure. I love her; this is too much for me to process. I’m a stay at home mom; we were inseparable. I knew her. Until now.:(  She cut off all her beautiful hair, and wears boys shorts, baggy tee shirts, and bought this awful men’s deodorant spray. Please help me sort this out. I’m at my wits end.  Do you think this is a phase? Is this common? How do I remove snap? apt pretends it's not there but I can still call commands with it.  Trying to rm it says "read only file system"  root@tunnel:/# apt remove snap Reading package lists... Done Building dependency tree Reading state information... Done Package 'snap' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@tunnel:/# snap whoami email: - I want to make an arena where mobs will fight each other and a player can bet on one side or the other. For example: There are 2 skeletons in dyed armor; red and blue. Each color representing a team. When they spawn I want them to fight each and then when one dies I want it to announce which team is the winner and give the player the "money" due. I'm just not sure how to get the skeletons to attack each other without a player instigating it. Kill a blocker with an instant - is it still blocking? We are in the combat phase:   I declared my attackers  My opponent declared his blockers, stating which attackers he was blocking I cast an instant, which automatically kills his blocker. There is nothing blocking my attacker now   Now we're in the damage phase. I said that my attacker now does damage and  reduces my opponent's hit points. My opponent said that because my attacker was blocked no damage could be done. I pointed out that the blocker was destroyed before the damage phase, so therefore he wasn't blocking, but he wasn't having it. (My attacker does not have trample)  Is this covered by a specific section in the rules?