Ubuntu 16.04 Server updates - Temporary failure resolving 'ro.archive.ubuntu.com'
apt-get update fails to fetch files, “Temporary failure resolving …” error
Is there a measurable set $A$ such that $m(A \cap B) = \frac12 m(B)$ for every open set $B$? How do I iterate over the words of a string? I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include &lt;iostream&gt; #include &lt;sstream&gt; #include &lt;string&gt;  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss &gt;&gt; subs;         cout &lt;&lt; "Substring: " &lt;&lt; subs &lt;&lt; endl;     } while (iss); }   Is there a more elegant way to do this? Command to display and execute code (math formulae) Similar to  I would like to have a command to display and execute code. The code should be displayed with the listings package.  For example something like  \documentclass{scrartcl} \usepackage{amsmath,listings} \newcommand*{\codeExample}[1]{Code: \lstinline!\string{#1}! yields #1} \begin{document}   \codeExample{$\lVert a\rVert$} \end{document}   should for best of cases display $\lVert a \rVert$ as verbatim (\lstinline!...!) code and after that the rendered math code. Is something like that possible? The code above yields several mistakes. I think I miss something to avoid #1 being tokenised? Do I keep my Windows installation if I install Ubuntu with Wubi, the Windows installer? Markov/Chebychev inequality If Z is a square integrable random variable such that $E[Z]&gt;0$, then prove that  $$P(Z\geq k) \geq \frac{(E(Z)-k)^2}{E(Z^2)} \forall k \in [0,E(Z)]. $$  This is a homework question and I don't even understand why the inequality is reversed comparing to Markov/Chebychev inequality. Should Cauchy-Schwartz inequality be used? If yes, then how to begin? Thanks a ton! StandardSetController with History records While I can post external texts into question and answer bodies, it preserves the old font style, spacing and size (although the markdown display won’t be affected by that.)   App Version: 1.6.6.2 Device: iPhone 6 OS Version: Version 11.0.3 (Build 15A432) Extract single file from tar to other folder I've searched for multiple forums for this questions and have seen different answers but so far, nothing have worked yet even from the ones I've seen here.  I want to extract a single file from a tar to a different directory.  I've tried this:  tar xvf file.tar -C /home/dir/ filename   or this:  tar -x filename -f file.tar -C /home/dir   But got these errors respectively:  x filename, 14826 bytes, 29 media blocks. File -C not present in the archive. File /home/dir not present in the archive.   and:  tar: /dev/rmt0: A file or directory in the path name does not exist.   The first extracted the file but in the same directory, not to the folder I wanted. I am always really hesitant to mess around with $IFS because it's clobbering a global.   But often it makes loading strings into a bash array nice and concise, and for bash scripting, conciseness is hard to come by.   So I figure it might be better than nothing if I try to "save" the starting contents of $IFS to another variable and then restore it immediately after i am done using $IFS for something.   Is this practical? Or is it essentially pointless and I should just directly set IFS back to whatever it needs to be for its subsequent uses? When something gets wet, it usually appears darker. This can be observed with soil, sand, cloth, paper, concrete, bricks...  What is the reason for this? How does water soaking into the material change its optical properties? How to enable projection transformation in QGIS My QGIS project has two layers, one layer is retrieved by Google layer plugin which fetches the static Google map image whose CRS is +proj=merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +a=6378137 +b=6378137 +units=m +no_defs and another vector layer is a postgis layer whose CRS is +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs.  I digitalized some polygon features from Google Layers and added it to the vector layer. However, QGIS seems do not make the automatic CRS transformation. How can I change its projection?   Thanks In classical logic, why is $(p\Rightarrow q)$ True if $p$ is False and $q$ is True? $C^1[a,b]$ is closed in $C[a,b]$ Using CLI, how do I change the user's profile picture? A similar task for changing the desktop background, can be achieved using the following script:   FILE="/backgrounds/background.png" gsettings set org.gnome.desktop.background picture-uri "$FILE"   How would I achieve the same result, but with the user's avatar/profile picture? why does OSX add extra '._' when I tar a directory? I'd just like to know why if I "tar -czf" a file/directory, osx adds a:  ._  for each file? I see these when I untar in linux. Or when I work with the uncompressed project in eclipse as it doesn't like them at all. I use 10.7.5. Proof/Derivation of Closed form of Binomial Expression $\sum\limits_{k=0}^{2n}(-1)^k\binom{2n}{k}^2$ The binomial expression given as follows: $$\sum_{k=0}^{2n}\left(-1\right)^{k}\binom{2n}{k}^{2}$$ results nicely into the following closed form: $$(-1)^{n}\binom{2n}{n}$$ I wish to know how exactly is it being done? I haven't been able to make much progress in solving it. My approach: \begin{align} \sum_{k=0}^{2n}(-1)^{k}\binom{2n}{k}^{2} = \binom{2n}{0}^{2} - \binom{2n}{1}^{2} + \binom{2n}{2}^{2} - ... -\binom{2n}{2n-1}^{2} + \binom{2n}{2n}^{2} \\ = \binom{2n}{0}.\binom{2n}{0} - \binom{2n}{1}.\binom{2n}{1} + \binom{2n}{2}.\binom{2n}{2} - ... -\binom{2n}{2n-1}.\binom{2n}{2n-1} + \binom{2n}{2n}.\binom{2n}{2n} \\ \text{By Symmetry of binomial coefficients} \\ = \binom{2n}{2n}.\binom{2n}{0} - \binom{2n}{2n -1}.\binom{2n}{1} + \binom{2n}{2n-2}.\binom{2n}{2} - ... -\binom{2n}{1}.\binom{2n}{2n-1} + \binom{2n}{0}.\binom{2n}{2n} \\ = \binom{2n}{2n}.\binom{2n}{0} + \binom{2n}{2n -1}.\binom{2n}{1} + \binom{2n}{2n-2}.\binom{2n}{2} + ... +\binom{2n}{1}.\binom{2n}{2n-1} + \binom{2n}{0}.\binom{2n}{2n} - 2.\left(\binom{2n}{2n -1}.\binom{2n}{1} + \binom{2n}{2n -3}.\binom{2n}{3} + ... + \binom{2n}{1}.\binom{2n}{2n-1}\right) \\ \text{By Vandermond's identity, first component, i.e.not enclosed within -2.(...) evaluates to C(4n, 2n)} \\ \binom{4n}{2n} - 2.(\binom{2n}{2n -1}.\binom{2n}{1} + \binom{2n}{2n -3}.\binom{2n}{3} + ... + \binom{2n}{1}.\binom{2n}{2n-1}) \end{align} I'm lost beyond this point. It will be extremely helpful if someone can direct me in the right direction or provide the answer to this perplexing and challenging problem. Thank you. Coupon Collector Problem with Batched Selections I am trying to solve a variation on the .  In this scenario, someone is selecting coupons at random with replacement from n different possible coupons. However, the person is not selecting coupons one at a time, but instead, in batches.  Here's an example problem formulation: There are 100 distinct coupons. A person makes selections in 10-coupon batches at random (each coupon with replacement). What is the expected number of batches necessary to have selected 80 unique coupons?  I have been able to determine the expected number of selections necessary to have selected k unique coupons when selecting one at a time (much like Henry's ), but I'm a bit stumped as to how to go about solving it with this particular wrinkle.  Any tips/guidance would be greatly appreciated. Removing nodes from an XmlDocument How to determine a Python variable's type? How do I see the type of a variable whether it is unsigned 32 bit, signed 16 bit, etc.?  How do I view it? My specific question is with the ASUS M3N78-VM motherboard that my home server uses. I currently have 4x2GB installed for a total of 8GB but I was hoping to upgrade to say 16GB (4x4GB). The official specifications of that motherboard says it only supports up to 8GB but it was released back when only 2GB sticks were available. What, if any, would prevent it from working with 4GB sticks now that 4GB sticks are available?  My general question is with motherboards in general... what would prevent a motherboard from working with bigger sticks if its all just the same type (DDR2 for example and same speeds) of memory?