Bash - Set a variable
Spaces in variable assignments in shell scripts
Empty drives show 2 GB used, Explorer shows nothing I have 4 drives in Windows: C:, D:, E: and F:. Except C:, all of them are empty.    Suddenly it shows up to 2 GB space used – even when there are no files.     [  When I format the drives, it's fine for a while until it shows used space again.  I use Windows 8.1 Pro 64 Bit. Number of bitstrings with $000$ as substring I have $F_n$ number of bitstrings that have $000$, How would I prove that for $n \ge 4$ , $a_n = a_{n-1} +a_{n-2}+a_{n-3}+ 2^{n-3}$?  Now there are many  ways to go about this but if I choose starting a $n-3$ bit string and append it with $000$ how would I show that? I use the babel package in order to write in greek with font "kerkis".  I want to add code in english ("courier new" font) to my latex document but I get some difficulties.  Can anybody help me, please. Thank you in advance.  \documentclass[12pt]{article} \usepackage[english,greek]{babel} \usepackage[utf8x]{inputenc} \usepackage{graphicx} \usepackage{fancybox} \usepackage{verbatim} \usepackage{courier} \usepackage{kerkis} \usepackage{float} \usepackage{geometry} \usepackage{fancyhdr} \usepackage{titlesec} \usepackage{tocloft} \usepackage{hyperref} \usepackage{afterpage} \usepackage{color}    \usepackage{listings}  \renewcommand{\lstlistingname}{Κώδικας}  \lstset{  %matlab   backgroundcolor=\color{white},     basicstyle=\normalsize,    % COURIER NEW?        commentstyle=\color{green},    % comment style   escapeinside={\%*}{*)},           extendedchars=true,               frame=single,                              keywordstyle=\color{blue},       % keyword style   numbers=left,                     numbersep=5pt,                     numberstyle=\normalsize\color{black},    rulecolor=\color{black},           stepnumber=1,                      stringstyle=\color{magenta},     % string style }   \begin{document}  \selectlanguage{greek} Ελληνικά: \textlatin{this word means greek}  \selectlanguage{english} Now I write in english  \selectlanguage{greek} Ελληνικά  %\selectlanguage{english}???  \begin{lstlisting}[caption = \textlatin{example1.m}] { % Entropy E = 0; for i = 1:J     if p(i) ~= 0         E = E + p(i)*log2(1/p(i));     end end } \end{lstlisting}  \end{document} How to recover data from a USB-connected hard disk that shows no partition? I'm basically searching for the opposite of putting all your eggs in one basket, where the risk is total failure because you did not hedge your efforts. I'm searching for a phrase that encompasses splitting your efforts and evokes the prospect of failing at both. A bird in the hand is worth two in the bush also encompasses a sense of having focused your efforts, but only alludes to total failure. To satisfy the criteria, the phrase must cover:  attempting two things (or multiple iterations of one thing) both of which you might succeed at, if you addressed them serially but both of which you fail at because you address them in parallel  Here are the idioms/phrases that do not sufficiently cover the idea and why:  &quot;A servant to two masters&quot;  This has the sense of competing priorities, but not the sense of failing to achieve your goals.  &quot;Jack of all trades. Master of none.&quot;  The sense is insufficiently pejorative. Being a jack-of-all-trades can be seen as an advantage; I'm trying to focus on the lack of mastery.  &quot;The man who fancied himself a wit, and was half-right.&quot;  From Christopher Hitchens. Hilarious, but lacking the sense of split effort between two things.  &quot;Walking and chewing gum at the same time.&quot;  An idiom for multi-tasking, not for failing to multi-task. Edit Addressing a few suggestions and another one that occurred to me:  &quot;Hedging your bets&quot; or &quot;Betting against yourself&quot;  In this case, you cannot win both bets, but you will almost certainly win one. You limit your upside, but also limit your risk. I'm looking in particular for total, catastrophic failure due to split attention/effort.  &quot;Can't walk and chew gum at the same time&quot;  Failing to do two fairly simple things that most everyone can do, not failing at two hard things because you tried to do both.  &quot;Robbing Peter to pay Paul&quot;  In this case, Paul gets paid. If you were to rob Peter to pay Paul, and get robbed yourself before you could get the money to Paul, that'd be closer. :)  &quot;Spreading yourself too thin&quot;  An actual English idiom, but missing the implied sense of failure.  &quot;Too many irons in the fire&quot;  &quot;A lot of irons in the fire&quot; can be viewed positively, so this is missing the sense of a strategic misstep.  &quot;Between a rock and a hard place&quot;  The sense is of needing to act but having no good alternative.  &quot;Falling between two stools&quot;  My favorite answer so far because it does appear to be an actual English idiom (not a proverb). In that sense, it's great, but some of the usages are closer to a failure of  than a failure of effort. And falling between two stools implies that the attempted action was simply sitting down.  &quot;Chasing two rabbits and catching none.&quot;  This is the exact sense I was looking for, but it appears to be a cross-cultural proverb rather than idiomatic English like &quot;putting all your eggs in one basket&quot;. I'll be accepting it, and using it in my work! But if there are other ideas, please let me know. How to compute $\lim_{n\rightarrow\infty}e^{-n}\left(1+n+\frac{n^2}{2!}\cdots+\frac{n^n}{n!}\right)$ There is a probabilistic method to solve it. But I am not familiar with probability. I am trying to compute it by analytic method, such as using L Hospital's rule or Stolz formula, but they are not working. Can we have cross-site badges? Prove that $\left(\sum^n_{k=1}x_k\right)\left(\sum^n_{k=1}y_k\right)\geq n^2$ How can I start to learn web development? I'm very interested in learning web development and have learned some basics regarding HTML and CSS a few years back from W3Schools, but I never learned how to develop websites that are up to today's standards, i.e. free-flowing sites without the use of tables to govern the design of the site.  What are some good resources that I can start with? Boot drops to a (initramfs) prompts/busybox I often read that one should not place swap partitions on a SSD drive, as this may harm the device. Is this true? Can you please explain the reason to me?  Because I otherwise would have thought that placing swap on an SSD is the best choice, as it's much faster than HDDs and therefore swapping RAM contents to the SSD is not as slow as it would be with the HDD... How to download Ubuntu over an unreliable connection Eclipse error: "The import XXX cannot be resolved" What does the notation like 8.6e-28 mean? What is the 'e' for? I have a problem with the interpretation of a test result in which the p-value is 8.6e-28. How should it be interpreted? What is the e for?  Specifically, I used White's Test for the homoscedasticity assumption of a linear regression:  White's general test statistic :  150.0535  Chi-sq( 9)  P-value =  8.6e-28 I am trying to show that $X^n-Y^m$ is irreducible in $\Bbb{C}[X,Y]$ iff $\gcd(n,m)=1$ where $n,m$ are positive integers.    I showed that if $\gcd(n,m)$ is not $1$, then $X^n-Y^m$ is reducible. How to show the other direction. Please help. Can I be automatically notified of prolonged blocking in SQL server? About once a week I have to resolve a blocking chain on a SQL Server 2005 database, caused by a long-lived read lock from an Access 2003 front-end. The lock is taken out whenever a user opens a certain form and is released once the user has finished scrolling through the form or closes it. Since many of our users open this form as reference, these locks stay around for a while. Any update to the table causes the blocking, and suddenly nobody can select from this table since they're all waiting on the first lock. This is quite a problem for us, since lots of apps rely on this data. I understand that this locking behavior is part of how Access works with linked tables.  I've been solving the problem from Activity Monitor,  whenever I find out about it. This is a problem not only because it takes me time to do it manually, but also because it's reactive. By the time I hear about it, it's already been a problem for a lot of people.  I'd like to know if there is an automatic way to check for these long-lasting blocking chains, and either be emailed or have the problem resolved automatically. The logic seems straightforward enough ("if any process matching this SELECT query has been blocking for longer than a minute, notify me/kill it") but I don't know how to implement this with SQL Server.  For what it's worth, I think the proper solution is to fix or rewrite the app. However, due to departmental politics, this is not an option for the next few months, so I'm looking for a stopgap. When you lift a box from the floor, the potential energy changes but kinetic energy does not change. Does it violate conservation of energy? Please try and answer this question. Incompatibility between etextools and etoolbox command \dolistloop (\forlistloop)? Prove that if $V$ is an inner product space, then $|\langle x,y\rangle| = \Vert x \Vert\Vert y\Vert$ if and only if one of the vectors $x$ or $y$ is a multiple of the other.  I am given a hint to let $a= \frac{\langle x,y\rangle}{\|y\|^2}$, and let $z = x - ay$, then prove $y$ and $z$ are orthogonal and $|a|= \frac{\|x\|}{\|y\|}$. I don't know how they come up with this, what was the original idea? What is the difference between using IDisposable vs a destructor in C#? When would I implement IDispose on a class as opposed to a destructor?  I read , but I'm still missing the point.    My assumption is that if I implement IDispose on an object, I can explicitly 'destruct' it as opposed to waiting for the garbage collector to do it.  Is this correct?  Does that mean I should always explicitly call Dispose on an object?  What are some common examples of this?