Why the number is rounded over ssh? localhost:~ $ df -k / | awk '{print $3/1024/1024/1024}' 0 0.00618061  localhost:~ $ ssh localhost "df -k / | awk '{print $3/1024/1024/1024}'" 01 01
Quoting in ssh $host $FOO and ssh $host "sudo su user -c $FOO" type constructs I often end up issuing complex commands over ssh; these commands involve piping to awk or perl one-lines, and as a result contain single quotes and $'s.  I have neither been able to figure out a hard and fast rule to do the quoting properly, nor found a good reference for it.  For instance, consider the following:  # what I'd run locally: CMD='pgrep -fl java | grep -i datanode | awk '{print $1}' # this works with ssh $host "$CMD": CMD='pgrep -fl java | grep -i datanode | awk '"'"'{print $1}'"'"   (Note the extra quotes in the awk statement.)  But how do I get this to work with, e.g. ssh $host "sudo su user -c '$CMD'"?  Is there a general recipe for managing quotes in such scenarios?..
How do you forcefully remove apps in Windows 10? How can I remove apps that Windows doesn't seem to allow to be uninstalled, like Xbox and Groove Music? Windows 10 high memory usage (unknown reason) Say there are $m+n$ elements split into two groups ($m$ and $n$). The variance of the first group is $\sigma_m^2$ and the variance of the second group is $\sigma^2_n$. The elements themselves are assumed to be unknown but I know the means $\mu_m$ and $\mu_n$.  Is there a way to calculate the combined variance $\sigma^2_{(m+n)}$?   The variance doesn't have to be unbiased so denominator is $(m+n)$ and not $(m+n-1)$. Is it possible to convert a Physical Ubuntu Install (Intel based PC with Ubuntu 10.10) to a virtual box disk, so that I can use that same environment on a separate pc or can keep it virtual for testing?  Something similar to "Disk2VHD" which converts a physical Windows 2K3 and above box into a VHD or VMware image.  Will be grateful for your assistance ! Kind Regards How can I install firmware-b43-installer driver if I can't connect to internet by wire? Total combinations from number of unique combination? How can you find count of the total combinations possible if you have the count of unique combinations? Suppose I need to form a sum of $3$ using $\{1,2\}$ Unique combn. $(1+1+1)$, $(1+2)$ hence '$2$' unique but total is '$3$' i.e, $(1+1+1)$, $(1+2)$, $(2+1)$ I know the elements used to make the combination Note: Number of unique combinations (ie. 2 here) is known. How can I find the total number of combination given the unique combinations? Matching a sentence with grep Can I get SSH to use an askpass program even if it was run from a terminal? says:  SSH_ASKPASS    If  ssh needs a passphrase, it will read the passphrase from the    current terminal if it was run from a terminal.  If ssh does not    have  a  terminal associated with it but DISPLAY and SSH_ASKPASS    are set, it will execute the program  specified  by  SSH_ASKPASS    and open an X11 window to read the passphrase.   I'd like SSH to use an askpass program even if it was run from a terminal.  On occasion, I have to connect to servers, where there's some delay in showing a password prompt (maybe due to network issues, maybe due to attempted reverse DNS lookups, …). I get annoyed and switch to something else, and forget about the attempted connection. (Insert joke about attention span of a goldfish.) When I finally get back to it, the prompt's timed out and even a correct password would just result in a closed connection.  Keys would be one solution, but not every system I use has my usual SSH keys. However, I usually use Ubuntu systems, and Ubuntu has an SSH askpass program installed by default.  If an askpass window popped up, however, I'd be immediately aware of it. That's a good enough compromise for me, if only I can get it to work. Where is a good place to learn classical optics for high school competitions? I need to learn basic optics for a high school academic competition. Does anyone know any good places, preferably free and online, to learn the basics of optics, like lenses, angles of incidence, etc.? I can't seem to find an MIT OpenCourseWare course addressing the issue. Mirror modifier mirrors on different axis/axes from the selected one(s) I have 2 objects a face and an ear. Mirror modifier works fine for the face. But when I use mirror modifier to duplicate the ear on X axis, it duplicates on Z axis. And when I use mirror modifier on Z axis it mirrors on X axis. How to correct the axis orientation? Word for person who looks for flattery What word could be used to describe a person who seeks and seems to depend on constant positive feedback from the people around him. What is a contrast matrix? What exactly is contrast matrix (a term, pertaining to an analysis with categorical predictors) and how exactly is contrast matrix specified? I.e. what are columns, what are rows, what are the constraints on that matrix and what does number in column j and row i mean? I tried to look into the docs and web but it seems that everyone uses it yet there's no defition anywhere. I could backward-engineer the available pre-defined contrasts, but I think the definition should be available without that.  &gt; contr.treatment(4)   2 3 4 1 0 0 0 2 1 0 0 3 0 1 0 4 0 0 1 &gt; contr.sum(4)   [,1] [,2] [,3] 1    1    0    0 2    0    1    0 3    0    0    1 4   -1   -1   -1 &gt; contr.helmert(4)   [,1] [,2] [,3] 1   -1   -1   -1 2    1   -1   -1 3    0    2   -1 4    0    0    3 &gt; contr.SAS(4)   1 2 3 1 1 0 0 2 0 1 0 3 0 0 1 4 0 0 0 Change how questions marked as duplicates by the asker are represented Situation: when a user self-marks their post as a duplicate, it shows as closed by "community" rather than the original poster.  Problems: this is not clear at all to most users of SE what has happened. It looks like the question was "mod closed" as a duplicate against the asker's wishes.    Suggestion: instead of the community user "closing" the post, have the final close user be the asker (or make it "Community &amp; Asker"). This will help clear up confusion and streamline the process for understanding what happens. I'm creating a composite image, in order to create a timeseries. I've already created the composited image, but i am having difficulty masking the clouds of the composite image. I've followed the code from a page having similar problems, however when I run the code (after replacing all the l8_mayo to composite as that is the name of my composite var), I get the error code of composite.map not a function. This error does not come up when I run the exact same code from the previous answer. Can someone explain how to overcome this problem? Here is the page I used:  here is my code and the link to my code:  (point is the long, lat for Lake Manyara, Tanzania)  //load images for composite var sr14= ee.ImageCollection('LANDSAT/LC08/C01/T1_SR') .filterBounds(point) .filterDate('2014-01-01','2014-03-01') .select(['B4','B3','B2']);  // Temporally composite the images with a maximum value function. var composite = sr14.max(); Map.setCenter(35.8244, -3.5799); Map.addLayer(composite, {}, 'max value composite');  var getQABits = function(image, start, end, newName) { // Compute the bits we need to extract. var pattern = 0; for (var i = start; i &lt;= end; i++) {    pattern += Math.pow(2, i); } // Return a single band image of the extracted QA bits, giving the band // a new name. return image.select([0], [newName])               .bitwiseAnd(pattern)               .rightShift(start); };  // A function to mask out cloudy pixels. var cloud_shadows = function(image) { // Select the QA band. var QA = image.select(['BQA']); // Get the internal_cloud_algorithm_flag bit. return getQABits(QA, 7,8, 'Cloud_shadows').eq(1); // Return an image masking out cloudy areas. };  // A function to mask out cloudy pixels. var clouds = function(image) { // Select the QA band. var QA = image.select(['BQA']); // Get the internal_cloud_algorithm_flag bit. return getQABits(QA, 4,4, 'Cloud').eq(0); // Return an image masking out cloudy areas. };  var maskClouds = function(image) { var cs = cloud_shadows(image); var c = clouds(image); image = image.updateMask(cs); return image.updateMask(c); };  var composite_free = composite.map(maskClouds);  Map.addLayer(composite_free, 'composite collection without clouds'); how to create a roster sheet in sharepoint 2010 This is a  about DNS/Hostnames resolution to IPs/Ports   Example 1  I'm running a web server on port 80 and another on port 87. I would like to use DNS so that www.example.com goes to port 87. How can I accomplish this using DNS only?  Example 2  I'm running a service on my server on a non-standard port. How can I get clients to connect to this non-standard port automatically? Can I use DNS? Is there some application specific support where DNS could indicate the IP and Port?   Example 3  Do some application protocols specifically support hostname awareness, and allow special actions to be taken based on this information? Are there other questions on Server Fault that cover some of these?  Commandeering: This question was originally asking about running IIS and Apache on the same server, but the same concepts can be applied to any server software receiving connections from clients. The Answers below describe the technical problems and solutions of using DNS and application protocol support to assign a port number for a client to connect. From a previous question, we have that $\sqrt[3]{3} \notin \mathbb{Q}(\sqrt[4]{3})$, and I am assuming that we would need to use this to justify the answer to the question.   Would it be right to use some idea of a splitting field here? Or is it something to do with $\mathbb{Q}(\sqrt[3]{3}, \sqrt[4]{3})$ not containing a primitive 3rd root of unity?   This is a past exam paper question worth 8 marks, so it doesn't seem like it's a few lined answer, but I am a little stuck on where to go. SyntaxError: invalid syntax // SyntaxError: unexpected EOF while parsing How do I detect text inside of this, this is HTML &amp; this is XPath. I tried  HTML     &lt;span class="messageText"&gt;Hello.&lt;/span&gt; XPath     //*[@id="liveAgentChatLogText"]/span[22]/span[2]   I tried with this but it didn't work, it said no such element found.  driver.find_element(By.XPATH, '//*[@id="liveAgentChatLogText"]//*[contains(string(.), "Hello")]') Inverse elements in the absence of identities/associativity. How to convert ISO 8601 date (string) to Date?