Can't find command, although it is in the PATH I just  git on CentOS 6.8. When I run the command git from a bash-shell, I get the following error message:  -bash: /usr/bin/git: Bestand of map bestaat niet   Sorry, Dutch installation. Meaning: "File or folder doesn't exist". Git is installed.  When I run /usr/local/bin/git --version, I get the following output:  /usr/local/bin/git: /usr/local/lib/libz.so.1: no version information available (required by /usr/local/bin/git) git version 2.5.3   (not sure if the libz message is a problem).  which git points to /usr/local/bin/git, so that's fine too. echo $PATH returns /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin. I've looked for aliases and other clues in .bash_profile, .bashrc and /etc/bashrc, but nothing...  How can I run git with just entering the command git?
How do I clear Bash's cache of paths to executables? When I execute a program without specifying the full path to the executable, and Bash must search the directories in $PATH to find the binary, it seems that Bash remembers the path in some sort of cache. For example, I installed a build of Subversion from source to /usr/local, then typed svnsync help at the Bash prompt. Bash located the binary /usr/local/bin/svnsync for "svnsync" and executed it. Then when I deleted the installation of Subversion in /usr/local and re-ran svnsync help, Bash responds:  bash: /usr/local/bin/svnsync: No such file or directory   But, when I start a new instance of Bash, it finds and executes /usr/bin/svnsync.  How do I clear the cache of paths to executables?
Evaluation of $\sum_{k=0}^n{n\choose k}^2u^k$ I am trying to evaluate the finite sum \begin{equation} f(u)=\sum_{k=0}^n{n\choose k}^2u^k,\quad 0&lt;u\le1 \end{equation}  In an first attempt, I think of the generating function \begin{equation} (1+x)^n(u+x)^n = \sum_{k\ge0}{n\choose k}x^k\sum_{k\ge0}{n\choose k}u^kx^{n-k}=\cdots+x^n\sum_{k\ge0}{n\choose k}^2u^k+\cdots \end{equation}  which means that $f(u)$ is the coefficients of the term $x^n$.  Expanding $(1+x)^n(u+x)^n$ into $[1+(1+u)x+x^2]^n$, and using the multinomial expansion, I get an expression for the coefficient of $x^n$. However, such an expression is more complicated than $f(u)$. It seems I am making the problem even more difficult.  Can someone help me find the value of $f(u)$.  Thank you. Should not we apply pseudo-forces all the time as the Earth is a non-inertial frame of reference? How to vote on friends / colleagues ' questions (or answers) Almost every time a colleague of mine asks a question, we have discussed this problem beforehand. Also, we sometimes meta-discuss the question for stackoverflow (why did I get the &quot;this might be subjective&quot; warning, is this understandable enough, etc). This is less so with answers, but I could believe for some groups this works the same. For now I'll stick to questions, but you could s/question/answer if you like. The resulting question is almost always  Interesting for me, and a problem I don't know the answer to. I probably would favorite it According to me a valid and good question (as we talked about it beforehand) I would probably want to upvote it.  Now I believe to read that &quot;ring voting&quot; is a thing, and I tried to find some questions about this, but didn't find many. I did find and read this blogpost from 2008:  . It reads to me that upvoting 'fraud' is more commonplace then downvoting and it might seem anomalous that I would upvote almost all questions from one user. If all colleagues would do this to their team, you'd get some mediocre questions getting a lot of votes, and some users getting a lot of attention, points etc from that. If you would -as seems to be done -, sort the amount of upvotes for my colleague, you'd get me being 'anomalous' in front of the crowd. On the other hand, as explained above, I do want to upvote almost all stuff some of my colleagues put on here for (I believe) the right reasons: they are questions I consider good and interesting. It's just that I know of all their questions (as they tell me about them), which obviously isn't the case for a random user. So what is the deal?  When is upvoting content from one user frowned upon? Would my usecase be in danger of being a (what I consider 'false') positive for the fraud-detection? (and would you agree with that or not) How to prevent this false positive (if you agree with me it is one, otherwise this is a moot question) -&gt; As noted in the comments: I'm not looking for tricks, so an answer could be &quot;don't vote for your colleagues&quot;. I agree that there should be no to 'tricks' around that could be used for real fraud of course What does "may they rot there" mean? piping in real time This is more a conceptual thing than a current problem.  Would it be possible to do this:  tail -f &lt;file&gt; | grep "string" | sed 's/stuff//g' &gt;&gt; output.txt  The problem I'm thinking is that tail -f never terminates so it won't progress in the command. I'm trying to read and output a file in real-time. If this doesn't work how would I do it? Limit distribution of infinite sum of Bernoulli random variables Prove there are k consecutive non-squarefree integers So, I've got a question for class that asks me to prove the existence of arbitrarily long runs of consecutive integers where $\mu(n)$ is zero.   I've started the proof, but I need a bit of help midway through.  Assume there exists a run of length n, which we currently assume is the longest possible chain.  If we induct on n, we can assume there is a run of the form $m_1p_1^2, m_2p_2^2, ..., m_np_n^2$ (where each of the $p_i$ are prime).  If I add $M =  lcm(m_1p_1^2, m_2p_2^2, ..., m_np_n^2)$ to each number, I get another run of length n.  So here's where the issue starts. When I talked to my advisor about it, he referenced a theorem where there exists a prime $p$ congruent to $1\ mod\ M$.  I am unfamiliar with this theorem, so I'm not sure how to use this information. Any chance I can get some help? Or else is there a simpler way to go about this problem? Why can Naruto still use Rasenshuriken? I want to dynamically create a sequence of strings by manipulate an array of elements and create some arithmetic procedure.  for name in FIRST SECOND THIRD FOURTH FIFTH; do     $name = $(( $6 + 1 ))     $name = "${$name}q;d"     echo "${$name}"; printf "\n" done   The desire outcome would be the below for $6 equals 0.  1q;d 2q;d 3q;d 4q;d 5q;d   But I get this error  reel_first_part.sh: line 18: FIRST: command not found reel_first_part.sh: line 19: ${$name}q;d: bad substitution reel_first_part.sh: line 18: FIRST: command not found reel_first_part.sh: line 19: ${$name}q;d: bad substitution reel_first_part.sh: line 18: FIRST: command not found reel_first_part.sh: line 19: ${$name}q;d: bad substitution   I guess it's something simple. It used to work when I did something like   FIRST=$(( $6 + 1 )) FIRST="${FIRST}q;d" This is a question I've been asked several times by students and I tend to have a hard time phrasing it in terms they can understand. This is a natural question to ask and it is not usually well covered in textbooks, so I would like to know of various perspectives and explanations that I can use when teaching.  The question comes up naturally in what is usually students' second course in quantum physics / quantum mechanics. At that stage one is fairly comfortable with the concept of wavefunctions and with the Schrödinger equation, and has had some limited exposure to operators. One common case, for example, is to explain that some operators commute and that this means the corresponding observables are 'compatible' and that there exists a mutual eigenbasis; the commutation relation is usually expressed as $[A,B]=0$ but no more is said about that object.  This naturally leaves students wondering     what is, exactly, the physical significance of the object $[A,B]$ itself?   and this is not an easy question. I would like answers to address this directly, ideally at a variety of levels of abstraction and required background. Note also that I'm much more interested in the object $[A,B]$ itself than what the consequences and interpretations are when it is zero, as those are far easier and explored in much more depth in most resources.    One reason this is a hard question (and that commutators are such confusing objects for students) is that they serve a variety of purposes, with only thin connecting threads between them (at least as seen from the bottom-up perspective).   Commutation relations are usually expressed in the form $[A,B]=0$ even though, a priori, there appears to be little motivation for the introduction of such terminology. A lot of stock is placed behind the canonical commutation relation $[x,p]=i \hbar$, though it is not always clear what it means.  (In my view, the fundamental principle that this encodes is essentially de Broglie's relation $\lambda=h/p$; this is made rigorous by the  but that's quite a bit to expect a student to grasp at a first go.) From this there is a natural extension to the Heisenberg Uncertainty Principle, which in its general form includes a commutator (and an anticommutator, to make things worse). Canonically-conjugate pairs of observables are often introduced, and this is often aided by observations on commutators. (On the other hand, the energy-time and angle-angular momentum conjugacy relations cannot be expressed in terms of commutators, making things even fuzzier.) Commutators are used very frequently, for example, when studying the angular momentum algebra of quantum mechanics. It is clear they play a big role in encoding symmetries in quantum mechanics but it is hardly made clear how and why, and particularly why the combination $AB-BA$ should be important for symmetry considerations.  This becomes even more important in more rigorous treatments of quantum mechanics, where the specifics of the Hilbert space become less important and the algebra of observable operators takes centre stage. The commutator is the central operation of that algebra, but again it's not very clear why that combination should be special. An analogy is occasionally made to the Poisson brackets of hamiltonian mechanics, but this hardly helps - Poisson brackets are equally mysterious. This also ties the commutator in with time evolution, both on the classical side and via the Heisenberg equation of motion.   I can't think of any more at the moment but they are a huge number of opposing directions which can make everything very confusing, and there is rarely a uniting thread. So: what are commutators, exactly, and why are they so important? How can I pin a program to the Windows 7 Taskbar, with parameters? When I'm using rendered viewport it initially takes a while before rendering starts, but once it does, I can freely move around and rendering a new view happens almost instantaneously. When on the other hand I'm rendering a movie, for each frame Blender takes a significant amount of time before rendering even starts, usually doing the following:  Synchronizing object, Updating images, Updating meshes, Updating Scene BVH, Packing BVH,  Why does it do this? And is it possible to disable this to increase movie rendering speed? A friend has been kind enough to lend me a DSLR for a few months.  It's my first foray into DSLR photography, or indeed any kind of photography beyond simply aiming my Canon IXUS at something and clicking the button.    Over the last few weeks, I've been busy studying, practising and trying to learn as much as possible ahead of a planned trip to Norway where I hope to see, and get some photos of, the Aurora Borealis.  I currently have:   Canon Rebel Xsi (450D) Canon 50mm f/1.4 L  Canon 18-55m kit lens Aluminium full height tripod with ball head Cable release Spare battery &amp; memory cards   I'm prepared to spend the night wrapped up outdoors, in the hope that they will make an appearance. I'd like some advice on how to get the most out of this kit for the trip:   How should I go about setting up to get pics of the Aurora?  How might I achieve optimum focus? From what I've read, I'll need to use the tripod and cable release, with IS turned off, on continuous shooting mode with long exposure times. But I'd like some more specific tips in terms of which aperture and ISO settings might work best? Should I use one of the lenses above, or would it be worthwhile renting a better, wide angle lens; if so, which would you recommend? "The train will leave" vs. "is going to leave" vs. "leaves" vs. "is leaving" Interfaces with static fields in java for sharing 'constants' I'm looking at some open source Java projects to get into Java and notice a lot of them have some sort of 'constants' interface.  For instance,  has an interface called , and most other core classes implement this interface. The interface is riddled with static members. Is there a reason for this approach, or is this considered bad practice? Why not use enums where it makes sense, or a static class?  I find it strange to use an interface to allow for some sort of pseudo 'global variables'.  public interface PConstants {    // LOTS OF static fields...    static public final int SHINE = 31;    // emissive (by default kept black)   static public final int ER = 32;   static public final int EG = 33;   static public final int EB = 34;    // has this vertex been lit yet   static public final int BEEN_LIT = 35;    static public final int VERTEX_FIELD_COUNT = 36;     // renderers known to processing.core    static final String P2D    = "processing.core.PGraphics2D";   static final String P3D    = "processing.core.PGraphics3D";   static final String JAVA2D = "processing.core.PGraphicsJava2D";   static final String OPENGL = "processing.opengl.PGraphicsOpenGL";   static final String PDF    = "processing.pdf.PGraphicsPDF";   static final String DXF    = "processing.dxf.RawDXF";     // platform IDs for PApplet.platform    static final int OTHER   = 0;   static final int WINDOWS = 1;   static final int MACOSX  = 2;   static final int LINUX   = 3;    static final String[] platformNames = {     "other", "windows", "macosx", "linux"   };    // and on and on  } How should I approach obvious proofs like these    I have been trying but couldn't find an elegant way to work these. Any help is highly appreciated ! Especially looking for a nice proof/hint for first problem A word for something that is deeper, more compelling than what is obvious or visible Conjugation: Do we cite authors or papers? When referencing to another work in a scientific paper, do we cite the paper or its author(s)?  This question is intended to clarify the conjugation of the verb that follows the reference -- especially in these cases:   One author, two papers:     Jane Doe (2015a, 2015b) list-s the very specific conditions under which...   -> lists (singular: referencing to Jane Doe) or list (plural: referencing to both papers) Several authors, one paper:     John Doe, et al. (2015) claim-s this and that.   -> claim (plural: referencing to the multiple authors of the paper) or claims (singular: referencing to the single paper). I use 'Helvetica' as my font and build my document using Texmaker. But the PDF generated has jagged edges while using this font and when I use a different font (say Times or even Helvetica sans-serif) it builds just fine.     Please suggest if there is anyway I can get over this. The problem with these jagged edges is that it appears very dull and unreadable at 100% resolution.  OK guys, now here is the MWE  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper,twoside,12pt]{book}  %% Language %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} %\usepackage[utf8]{inputenc} \usepackage{graphicx,color,subfigure}  %% Line Spacing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{setspace} %\singlespacing        %% 1-spacing (default) %\onehalfspacing       %% 1,5-spacing \doublespacing        %% 2-spacing  %% Other Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[left=1.5in, right=1.5in, top=1in, bottom=1in, includefoot, headheight=13.6pt]{geometry} \usepackage[pagebackref=true,breaklinks=true,letterpaper=true,colorlinks,bookmarks=false]{hyperref} \usepackage{helvet} \usepackage[square,numbers]{natbib} \usepackage{hyphenat} \usepackage{fancyhdr}   \begin{document}  \pagestyle{empty} %No headings for the first pages.  \cleardoublepage %The first chapter should start on an odd page.  \pagestyle{plain} %Now display headings: headings / fancy / ...  \pagebreak  %------------------------------------------------------------------------ \chapter{Divorce}   A major change that has occurred in the Western family is an increased incidence in divorce. Whereas in the past, divorce was a relatively rare occurrence, in recent times it has become quite commonplace. This change is borne out clearly in census figures. For example thirty years ago in Australia, only one marriage in ten ended in divorce; nowadays the figure is more than one in three (Australian Bureau of Statistics, 1996: p.45). A consequence of this change has been a substantial increase in the number of single parent families and the attendant problems that this brings (Kilmartin, 1997).   \end{document} Why is Buoyant Force $V\rho g$? For a submerged object, buoyant force ($F_b$) is defined as:  $$F_b = V_{\text{submerged}} \times \rho \text{ (density)} \times g \text{ (gravitational constant)}$$   Conceptually, the buoyant force equation says that buoyant force exerted is equal to the weight of the volume of water a given object displaced. Why? I went online to   and found the following explanation, but it seems like non-sequitur to me:      Explanation: When an object is removed, the volume that the object occupied will fill with fluid. This volume of fluid must be supported by the pressure of the surrounding liquid since a fluid can not support itself. When no object is present, the net upward force on this volume of fluid must equal to its weight, i.e. the weight of the fluid displaced. When the object is present, this same upward force will act on the object.