I'm using a dotfile manage software, named . Using a config file named .env, contents like: git_folder="~/code/Git".  Also use a script to setup this dotfile tool before the first use of it, as follows,  #!/bin/bash  env1="~/Dropbox/.env" env2="/mnt/d/Dropbox/.env"  if [ -f $env1 ]; then     echo "Found dotdrop env file, installing dotfiles..."     source $env1     eval $(grep -v "^#" $env1) dotdrop --cfg=${git_folder}/dotfiles/config.yaml install elif [ -f $env2 ]; then     echo "Found dotdrop env file, installing dotfiles..."     source $env2     eval $(grep -v "^#" $env2) dotdrop --cfg=${git_folder}/dotfiles/config.yaml install else echo "Pls sync environment files first!" fi   If I store my config file at ~/Dropbox/.env, when I run the script, I just got "Pls sync environment files first!"(run in if condition is expected). If config file stored at /mnt/d/Dropbox/.env, the script will go through the elif condition, which is expected.  Find the reason until I run the script in dubug mode, and get the difference:  ➜  scripts git:(master) ✗ bash -x dotdrop_setup.sh  + env1='~/Dropbox/.env' + env2=/mnt/d/Dropbox/.env + '[' -f '~/Dropbox/.env' ']' + '[' -f /mnt/d/Dropbox/.env ']' + echo 'Pls sync environment files first!' Pls sync environment files first!   So, I think the difference between ~ and /home/user is the reason.   After I change ~ to /home/roach(roach is user name), it works.  ➜  scripts git:(master) ✗ bash -x dotdrop_setup.sh + env1=/home/roach/Dropbox/.env + env2=/mnt/d/Dropbox/.env + '[' -f /home/roach/Dropbox/.env ']' + echo 'Found dotdrop env file, installing dotfiles...' Found dotdrop env file, installing dotfiles... + source /home/roach/Dropbox/.env ++ git_folder='~/code/Git' ++ grep -v '^#' /home/roach/Dropbox/.env + eval git_folder='~/code/Git' ++ dotdrop '--cfg=~/code/Git/dotfiles/config.yaml' install      _       _      _   __| | ___ | |_ __| |_ __ ___  _ __  / _` |/ _ \| __/ _` | '__/ _ \| '_ |  \__,_|\___/ \__\__,_|_|  \___/| .__/  v0.22.0                                |_|   0 dotfile(s) installed.   The debug shows '' surround + env1='~/Dropbox/.env' is removed which I think is the reason.  But, WHY?    Additional question,  alias dotdrop="eval $(grep -v "^#" $env1) /usr/bin/dotdrop --cfg=${git_folder}/dotfiles/config.yaml install" is a config add to bashrc, zshrc, etc. It doesn't work if I add it to my script directly!  Finally, found I have to add source $env,  So WHY it works in a bashrc file?
According to  and my own understanding, the tilde expands to the home directory:  $ echo ~ /home/braiam   Now, whenever I want the shell expansion to work, i. e. using variable names such $FOO, and do not break due unexpected characters, such spaces, etc. one should use double quotes ":  $ FOO="some string with spaces" $ BAR="echo $FOO" $ echo $BAR echo some string with spaces   Why doesn't this expansion works with the tilde?  $ echo ~/some/path /home/braiam/some/path $ echo "~/some/path" ~/some/path
An elementary proof of $\int_{0}^{1}\frac{\arctan x}{\sqrt{x(1-x^2)}}\,dx = \frac{1}{32}\sqrt{2\pi}\,\Gamma\left(\tfrac{1}{4}\right)^2$ What if 'kill -9' does not work? I have a process I can't kill with kill -9 &lt;pid&gt;. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option. Is calling a linear-equation a linear-function, misnomer or completely wrong? From my college life, I remember many professors used to call a linear-equation a linear-function, however:  A standard definition of linear function (or linear map) is:  $$f(x+y)=f(x)+f(y),$$ $$f(\alpha x)=\alpha f(x).$$  Where as linear equation is defined as:  $$f(x)=mx+b.$$  So, linear-equation is NOT a linear-function, according to the definitions defined above.  Though, for $b=0$ the linear-equation becomes a linear-function, but it is not true in general.  Question: Is it misnomer to call a linear-equation a linear-function, or it is completely wrong to say that? And linear-equation must be considered strictly as an affine-mapping. For an infinite line charge, $E$ falls off with $1/r$; for an infinite sheet of charge it's independent of r! The infinitesimal contributions to $E$ fall off with $1/r^2$, so why doesn't the total $E$ fall off the same way for the infinite line and sheet charges? Is this a valid partial fraction decomposition? Write $\dfrac{4x+1}{x^2 - x - 2}$ using partial fractions. $$ \frac{4x+1}{x^2 - x - 2} = \frac{4x+1}{(x+1)(x+2)} = \frac{A}{x+1} + \frac{B}{x-2} = \frac{A(x-2)+B(x+1)}{(x+1)(x-2)}$$ $$4x+1 = A(x-2)+B(x+1)$$ $$x=2 \Rightarrow 4 \cdot2 + 1 = A(0) + B(3) \Rightarrow B = 3$$ $$x = -1 \Rightarrow 4(-1) +1 = A(-3)+ B(0) \Rightarrow A = 1$$ Thus, $$\frac{4x+1}{x^2-x-2} = \frac{1}{x+1} + \frac{3}{x-2}\textrm{.}$$  The substitution of $x$ ($x = 2, -1$) is a common method to find out the coefficient of the partial fractions. However, the equation on the third line is obtained by multiplying $(x+1)(x-2)$, which is assumed to be nonzero. Here we have a contradiction. Furthermore, the original function is not defined at $x=-1,2$. How can we substitute these value for $x$? So is this method valid and rigorous? How to modify it so that it is rigorous? ALERT! /dev/disk/by-uuid/xxxxxxxxx does not exist. Dropping to a shell I am using Ubuntu 14.04.  I ran in terminal sudo apt-get update. Then I rebooted the system. And now I see:   ALERT! /dev/disk/by-uuid/xxxxxxxxx does not exist. Dropping to a shell initramfs:_   I can't boot up LIVE Ubuntu from USB flash drive. Yes, I double checked BIOS setup and the USB flash drive is OK and runs on another machine. Right now I am going to buy a  DVD and burn a Live DVD from another laptop.  sudo blkid gives me:   /dev/loop0: TYPE="squashfs"   /dev/sda1: UUID="xxxx" TYPE="ext4"    /dev/sr0: LABEL="Ubuntu 14.04.1 LTS i386" TYPE="iso960"      /etc/fstab has the same UUID="xxxx" and there is a line with:   errors=remount-ro 0      I tried using boot-repair but I still can't log in to Ubuntu.  I don't want to reinstall Ubuntu, because I have a lot of data there.  Do you have any advice how this can be solved? MySQL shutting down without warning, out of memory? Multiple Inheritance in C# Since multiple inheritance is bad (it makes the source more complicated) C# does not provide such a pattern directly. But sometimes it would be helpful to have this ability. For instance I'm able to implement the missing multiple inheritance pattern using interfaces and three classes like that: public interface IFirst { void FirstMethod(); } public interface ISecond { void SecondMethod(); }  public class First:IFirst  {      public void FirstMethod() { Console.WriteLine(&quot;First&quot;); }  }  public class Second:ISecond  {      public void SecondMethod() { Console.WriteLine(&quot;Second&quot;); }  }  public class FirstAndSecond: IFirst, ISecond {     First first = new First();     Second second = new Second();     public void FirstMethod() { first.FirstMethod(); }     public void SecondMethod() { second.SecondMethod(); } }  Every time I add a method to one of the interfaces I need to change the class FirstAndSecond as well. Is there a way to inject multiple existing classes into one new class like it is possible in C++? Maybe there is a solution using some kind of code generation? Or it may look like this (imaginary c# syntax): public class FirstAndSecond: IFirst from First, ISecond from Second { }  So that there won't be a need to update the class FirstAndSecond when I modify one of the interfaces.  EDIT Maybe it would be better to consider a practical example: You have an existing class (e.g. a text based TCP client based on ITextTcpClient) which you do already use at different locations inside your project.  Now you feel the need to create a component of your class to be easy accessible for windows forms developers. As far as I know you currently have two ways to do this:  Write a new class that is inherited from components and implements the interface of the TextTcpClient class using an instance of the class itself as shown with FirstAndSecond.  Write a new class that inherits from TextTcpClient and somehow implements IComponent (haven't actually tried this yet).   In both cases you need to do work per method and not per class. Since you know that we will need all the methods of TextTcpClient and Component it would be the easiest solution to just combine those two into one class. To avoid conflicts this may be done by code generation where the result could be altered afterwards but typing this by hand is a pure pain in the ass. I'm trying to get through my first SalesForce mod and it's definitely been a rocky path. I have one task I'm trying to do, but this section is holding me back.  I have two custom fields.  One a pick list and the other a text box. I have added them to the Approve/Reject Approval Request section in the Opportunity page. I added the fields through the Select Fields to Display on Approval Page Layout and they DO show up on the Approve/Reject Approval Request section. I added them in like ().  However, just the label for the fields show, the field itself is nowhere to be found and can't be used.    You can see and even use the fields when you open the Opportunity page itself, but when you go to use the Approve/Reject, you can't do anything with them or see any values.  I was never a SalesForce user and got this tossed in my lap and really don't know my way around yet. I appreciate any help on this!!  Thanks!!  Kurt How to understand intuitively the Stolz-Cesaro Theorem for sequences? I have to give a presentation on the theorem in Real Analysis with a fellow student. While I've looked over the  and verified that, yes, step B does indeed follow logically from step A, etc. and have internalized the proof to the extent that I can replicate it myself on paper, I still feel that I have made little progress as to why this theorem works the way it does, i.e. what is the intuition behind the theorem, such that it should make sense that it follows the way it does. Therefore I ask: what kind of intuition is there about this theorem? It would also be helpful to understand how the theorem can be used effectively in analysis.  I have seen it referred to as a sort of L'Hopital's rule for sequences, which certainly seems to make sense, but I similarly have little intuitive understanding of how that rule works, either.  I am asking this question not only for my personal understanding, but also for the sake of being able to present it in an illuminating manner, such that the rest of the class can also come away with the same sort of intuition of how the theorem works and how it is useful. Any help would be greatly appreciated.  EDIT: I should point out that the formulation of the theorem we are being tasked to prove is the following:  Let $\lbrace a_n \rbrace$, $\lbrace b_n \rbrace$ be sequences, ${b_n}$ strictly increasing and unbounded. Then if $\lim\limits_{n \to \infty} \frac {a_{n+1} - a_n}{b_{n+1} - b_n} = l$ for some $l \in \mathbb R$, then $\lim\limits_{n \to \infty} \frac{a_n}{b_n} = l$ also. I am working on parameter estimation and one of the estimators involves a summation of $_nC_k$ ($n$ choose $k$) expressions. For some iterations, I need to compute expressions like $_0C_1$, $_0C_2$, etc.  In general how do we compute $_nC_k$ when $n$ is less than $k$? Do we still use the formula $\frac{n!}{(n-k)!k!}$ and use the gamma function to compute the negative factorial?  Thanks! Centering in tabularx and X columns How can I center the column when using X in tabularx environment like in this example?  \begin{tabularx}{\textwidth}{@{}lXXXXX@{}}  1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 \\    \end{tabularx} How to delete column/field in PyQGIS? How can I create a brace spanning multiple lines on the right side of an itemized list? I have an itemized list:  \begin{itemize}     \item Lorem     \item Ipsum     \item Sit     \item Dolor     \item Amet \end{itemize}   I want to create an accolade on the right side of 'Lorem' and 'Ipsum', and add a bit of text at the point of the accolade. The level of this text should be between the first and the second line. How can I get this done? Pygame rotating cubes around axis When I can scroll down far enough to have the hot network questions overlap the footer (because my question is short) there is no background under the text:    Could they either be given a white background: (just disable the transparency option)    Or stop at the footer:      This also happens with the help text on some sites, as per this bug report:     Ubuntu 14.04.1 (Latest LTS Version), . Same problem with  and .  Windows 10 Pro,  and .  (Images linked to screenshot of browser)  My question is different from  because my issue is the lack of background on the footer.   I think there was a site redesign? Temperature and kinetic energy of molecules I was wondering if temperature is related to the average translational kinetic energy of the molecules then why does the average kinetic energy of say a moving object not affect the temperature? What is the mechanism regarding these vibrational motions that imparts temperature. Also do a gas and liquid at the same temperature possess the same kinetic energy? and a heavier molecule traveling at the same speed as a lighter molecule will have a greater temperature? How many distinct ways to climb stairs in 1 or 2 steps at a time? (Fibonacci puzzle) There is a very interesting puzzle for Fibonacci sequence:     You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb $1$ or $2$ steps. In how many distinct ways can you climb to the top?   The answer is Fibonacci sequence: $F(n) = F(n - 1) + F(n - 2)$. The explanation is that you could reach the $n$th step either from the $(n - 1)$th step or $(n - 2)$th step.  What I fail to understand is why isn't the answer $F(n) = (F(n - 1) + 1) + (F(n - 2) + 2)$. Since, after reaching $(n - 1)$th step I have to take $1$ step to reach the $n$th step and after reaching $(n - 2)$th step I have to take another $2$ steps to reach the $n$th step.  I know I might be ignoring some very stupid detail but it's better to ask and be called a fool once than to remain a fool forever. Why don't wizards always use multiple wands? Prove that $\lim \limits_{n \to \infty} \frac{x^n}{n!} = 0$, $x \in \Bbb R$.