when i wanta set the environment variable for java: someone said "~/.bashrc" and someone else said "/etc/profile" or "~/.profile"  i wanta know what different from these files?   And why the commod is  "export PATH=$JAVA_HOME/bin:$PATH" but "export PATH=$JAVA_HOME/bin"
I've used a number of different *nix-based systems of the years, and it seems like every flavor of Bash I use has a different algorithm for deciding which startup scripts to run.  For the purposes of tasks like setting up environment variables and aliases and printing startup messages (e.g. MOTDs), which startup script is the appropriate place to do these?  What's the difference between putting things in .bashrc, .bash_profile, and .environment?  I've also seen other files such as .login, .bash_login, and .profile; are these ever relevant?  What are the differences in which ones get run when logging in physically, logging in remotely via ssh, and opening a new terminal window?  Are there any significant differences across platforms (including Mac OS X (and its Terminal.app) and Cygwin Bash)?
How can I check if an application is running from a batch (well cmd) file?  I need to not launch another instance if a program is already running. (I can't change the app to make it single instance only.)  Also the application could be running as any user. More section headings? I am a novice in LaTeX and I have one question.  Can someone tell me what if you want more heading's in LaTeX. Like 5 or 10 or even 15. Is there a package for that? $x,y,z$ are independent and uniform random on $[0,1]$.  I know that $P(x \geq yz) = 3/4$ by triple integrating the triple density function.  However, is there a easier way to get this solution? Without triple integration. I'm having difficulty solving an exercise in my course.  The question is:      Prove that $n!\geq 2^n$.   We have to do this by induction. I started like this:   The lowest natural number where the assumption is correct is $4$ as: $4! \geq 2^4 \iff 24 \ge 16$. The assumption is: $n! \ge 2^n$.   Now proof for $(n+1)$ which brings me to: $(n+1)! \ge 2^{(n+1)}$  I think I can rewrite it somehow like this:  $$ {(n+1)} \times {n!}  \stackrel{\text{(definition of factorial)}}{\ge} 2^n \times 2 $$  $$ (n+1) \times 2^n \ge 2^n \times 2 $$  Then I think I can eliminate the $2^n$ and have something like this: $n+1 \ge 2$, or $n \ge 1$.  But I think I'm wrong here some where and was hoping somebody has some advice on this. How can I prove the above assumption?  Any help would be appreciated, kind regards. I have some edges that are not on the x, y or z axis. What is a simple way to straighten them? For example, I can scale and then use Shift+Z to straighten on the x and y axis.  Any shortcuts other than temporarily rotating the entire object to put the edges on an axis? Prove that every terms of a sequence defined by a recurrence relation is a perfect square. What is the average & max temperature of an airplane cargo hold? I want to take some chocolates to offer in my luggage. Chocolates are a bit sensitive to heat, though. What is the average temperature inside a cargo hold? 'Average by' itself can be misleading. What is the max temperature there?  I don't know much about airplane mechanics but I assume they have some cooling systems like any other engine. Such systems, depending on where they are placed, might influence temperature in the cargo hold. I also fear temperatures in the ground while exterior temperatures are higher, and luggage is being put inside. What are max temperatures near the airplane in such situation? CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page I have the following page (deadlink: http://www.workingstorage.com/Sample.htm ) that has a footer which I can't make sit at the bottom of the page. I want the footer to  stick to the window bottom when the page is short and the screen is not filled, and stay at the document end and move down as normal when there is more than a screenful of content (instead of overlapping the content).  The CSS is inherited and befuddles me. I can't seem to change it properly to put a minimum height on the content or make the footer go to the bottom. Excel multiple FIND formula "Please ask a new question" encourages question repetition for duplicates I just had a case of a user who re-posted his question because his first question was closed as a duplicate. And, logically, I closed his re-post as a duplicate of his original, asking him to edit his original and explain why it's not a duplicate, so we can reopen it.  This process has worked like that for years now, but suddenly I realized that with the new message, question repetition is even encouraged:     This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.   Clearly, a new user who finds their questions closed will now be happy to just post their question again and again, until it's not a duplicate anymore, instead of just fixing their original post.  We need to be more explicit about this, and show this message to the OP of the question:     If those answers do not fully address your question, please edit your question and explain why it is not a duplicate.   The original message should still be visible to other users and visitors, as they can't fix that question, of course. In Ubuntu releases prior to Ubuntu 19.10 Eoan Ermine, when I run a command with sudo, that command receives my home directory in the $HOME environment variable. This is the behavior I have long expected and . If I want sudo to reset the $HOME environment variable, so that it refers to the target user's home directory instead of my own, I have to pass the -H option (or -i, though that does more).    ek@Kip:~$ lsb_release -d Description:    Ubuntu 18.04.3 LTS ek@Kip:~$ sudo printenv HOME  # Shows ek's home, not root's. /home/ek ek@Kip:~$ sudo -u as printenv HOME  # Shows ek's home, not as's. /home/ek ek@Kip:~$ sudo -H printenv HOME  # Shows root's home. /root ek@Kip:~$ sudo -Hu as printenv HOME  # Shows as's home. /home/as   When I first upgraded to Ubuntu 19.10, I was surprised to discover that sudo seems to reset $HOME no matter what! I continue to observe this now that 19.10 is released and I've installed updates--both on newly installed systems and one I upgraded to 19.10.  ek@Cord:~$ lsb_release -d Description:    Ubuntu 19.10 ek@Cord:~$ sudo printenv HOME  # Shows root's home, even without -H or -i. /root ek@Cord:~$ sudo -u as printenv HOME  # Shows as's home, even without -H or -i. /home/as ek@Cord:~$ sudo -H printenv HOME  # Also shows root's home. /root ek@Cord:~$ sudo -Hu as printenv HOME  # Also shows as's home. /home/as   I thought this might be due to .  But I checked, and always_set_home does not appear in any Defaults line in my 19.10 /etc/sudoers file.  What makes sudo treat $HOME differently starting in 19.10, and why was this change made? Does this make it safe to use plain sudo in cases where I would previously have used sudo -H? Noun-adjective reversal - was it ever in use in plain speech? Starting a new online business I have just started to work on an online business mode website. My dream is to make it live and bring revenue from the website. However, the project is in Incubator phase.   In this situation, can i register it as a Business, Open a Business Bank Account and start making the Purchases such as Servers, Software's etc.  Whether i have to pay Tax for my start up business ?  Location : New Jersey, US Permanently blocking a domain in iptables Suppose I want to block Facebook permanently. To do this, I have followed following processes:     #host -t a www.facebook.com   Sample output:     www.facebook.com has address 69.171.224.40   Find CIDR     #whois 69.171.224.40 | grep CIDR   Sample output:     CIDR:           69.171.224.0/19   To prevent outgoing access to www.facebook.com  Approach 1:     #iptables -I FORWARD -p tcp -d 69.171.224.0/19 -j DROP   Approach 2:     #iptables -I FORWARD -p tcp -d www.facebook.com -j DROP   Both Approaches work well. In approach 1, IP address may be changed so it will not block Facebook permanently. I don't know about approach 2 whether it will block Facebook permanently or not. If above approaches are not right way to block a domain permanently, how can I do it? I've got a weird question. Assume that you have a small sample where the dependent variable that you're going to analyze with a simple linear model is highly left skewed. Thus you assume that $u$ is not normally distributed, because this would result in normally distributed $y$. But when you compute the QQ-Normal plot there is evidence, that the residuals are normally distributed. Thus anyone can assume that the error term is normally distributed, although $y$ is not. So what does it mean, when the error term seems to be normally distributed, but $y$ does not? Performing deep learning land cover classification using R? I am really new to Deep Learning and, unfortunately, I can't find example codes on land cover classification other than  where the author wrote a script in R for a large dataset.   The main reason that I am asking is because recently I found a few papers on Remote Sensing Image classification using Deep Learning and I was wondering if there were any R examples on that subject.  So, is there a code example, preferably a step-by-step, which I can use?  I found several git repos like  that can do Deep Learning classification with R, BUTT, I am still looking for a simple multi-spectral image segmentation method. An example of that can be found at  and I also found a similar question in  for which the answer is "use something else other than R if you can".  If I find anything that works today I will be posting a working answer. Use property to show that if $f_n \rightarrow f$ in measure on finite measure set $E$ then $f_n^2 \rightarrow f^2$ in measure on $E$. Consider the following problem:     Let $E$ have finite measure, $\{f_n\} \rightarrow f$ in measure on $E$ and $g$ be a measurable function on $E$ that is finite almost everywhere. Use the fact that $\{f_n \cdot g\} \rightarrow f_n \cdot g$ to prove that $\{f_n^2 \} \rightarrow f^2$ in measure on $E$. Infer from this that if $\{g_n\} \rightarrow g$ in measure on $E$ then $\{f_n \cdot g_n \} \rightarrow f \cdot g$ in measure on $E$.   I'm struggling understand how I can apply the fact that $\{f_n \cdot g\} \rightarrow f_n \cdot g$ in measure to prove that $\{f_n^2 \} \rightarrow f^2$ in measure. I've been able to come up with a proof of the fact that if $\{g_n\} \rightarrow g$ in measure then $\{f_n \cdot g_n \} \rightarrow f \cdot g$ in measure, and this clearly implies the claim that $\{f_n^2 \} \rightarrow f^2$ in measure. Unfortunately my proof doesn't rely on the fact that $\{f_n \cdot g\} \rightarrow f_n \cdot g$ so it doesn't answer the problem since it explicitly asks us to prove it a certain way.  So far my best attempt to utilize the fact is as follows. Let $\eta &gt; 0$ then by triangle inequality and monotonicity of measure  \begin{align*}     \lim_{n\rightarrow \infty}\mu\left\{ \left|f_n^2 - f^2\right| &gt; \eta \right\} &amp;\leq \lim_{n\rightarrow \infty}\mu \left\{\left|f_n - f\right|\cdot \left|f_n\right| + \left|f_n - f\right| \cdot \left|f\right| &gt; \eta \right\} \\     &amp;\leq \lim_{n\rightarrow \infty}\mu\left\{\left|f_n - f\right|\cdot \left|f_n\right| &gt; \eta/2 \right\} + \lim_{n\rightarrow \infty}\mu\left\{\left|f_n - f\right| \cdot \left|f\right| &gt; \eta/2 \right\} \end{align*}  By the fact that $\{f_n \cdot f\} \rightarrow f \cdot f$ in measure \begin{equation*} \lim_{n\rightarrow \infty}\mu\left\{\left|f_n - f\right| \cdot \left|f\right| &gt; \eta/2 \right\} = \mu\left\{\left|f_n \cdot f - f\cdot f\right| &gt; \eta/2 \right\} = 0. \end{equation*} I don't see how to deal with the other limit without first proving the most general statement $\{f_n \cdot g_n \} \rightarrow f \cdot g$ in measure.   Any help or advice is greatly appreciated. How to solve $x^3=-1$? How to solve $x^3=-1$? I got following:  $x^3=-1$   $x=(-1)^{\frac{1}{3}}$  $x=\frac{(-1)^{\frac{1}{2}}}{(-1)^{\frac{1}{6}}}=\frac{i}{(-1)^{\frac{1}{6}}}$... Why won't any faces show up in the UV Image Editor? Hello Physics StackExchange!  I will put the TL;DR in the beginning: I need a self contained, relatively hand-holding sequence of textbooks that covers up from the end of Griffith's Intro to QM to relativistic QM/particle physics to QFT.    This will be my first post. I'm a medical physics grad student who majored in biomedical engineering for my undergrad, with serious regrets about not doing math/physics double major in hindsight. Oh well. I've made it my goal to eventually understand QFT.  My background in relevant subjects is Calc 1 to 3 and Diff EQ, 2 part freshman physics, an E&amp;M course that used Griffiths Electrodynamics, a summer of self studying Griffith's QM (got most of the way through). I will also be officially taking a class in QM using Griffith's textbook this next spring. I am aware of the Lagrangian and Hamiltonian approaches to mechanics as well. In addition I have familiarity with special and basic general relativity using tensors and all this. What would be the best way for me to get from where I am now to a strong understanding of QFT autodidactically? I have no aversion to studying pure maths where I need to.  EDIT: My question is much different than simply asking for a handholding explanation of QFT. Generally these textbooks assume a certain amount of physics/math background, and I was asking for a sequence of textbooks leading up to QFT from the end of a specific textbook, Griffith's QM. Did you even read my question? Did you read the thing you linked me to?