How to output batch file output to BOTH file AND console?
How do I echo and send console output to a file in a bat script?
The  claims that likelihood and probability are distinct concepts.     In non-technical parlance, "likelihood" is usually a synonym for "probability," but in statistical usage there is a clear distinction in perspective: the number that is the probability of some observed outcomes given a set of parameter values is regarded as the likelihood of the set of parameter values given the observed outcomes.    Can someone give a more down-to-earth description of what this means?  In addition, some examples of how "probability" and "likelihood" disagree would be nice. Four tasks in parallel... how do I do that? I have a bunch of PNG images on a directory. I have an application called pngout that I run to compress these images. This application is called by a script I did. The problem is that this script does one at a time, something like this:  FILES=(./*.png) for f in  "${FILES[@]}" do         echo "Processing $f file..."         # take action on each file. $f store current file name         ./pngout -s0 $f R${f/\.\//} done   Processing just one file at a time, takes a lot of time. After running this app, I see that the CPU is just 10%. So I discovered that I can divide these files in 4 batches, put each batch in a directory and fire 4, from four terminal windows, four processes, so I have four instances of my script, at the same time, processing those images and the job takes 1/4 of the time.  The second problem is that I lost time dividing the images and batches and copying the script to four directories, open 4 terminal windows, bla bla...  How do that with one script, without having to divide anything?  I mean two things: first how do I from a bash script, fire a process to the background ? (just add &amp; to the end?) Second: how do I stop sending tasks to the background after sending the fourth tasks and put the script to wait until the tasks end? I mean, just sending a new task to the background as one tasks end, keeping always 4 tasks in parallel? if I do not do that the loop will fire zillions of tasks to the background and the CPU will clog. How do I add .e00 data into my QGIS project? How to prove or disprove $\forall x\in\Bbb{R}, \forall n\in\Bbb{N},n\gt 0\implies \lfloor\frac{\lfloor x\rfloor}{n}\rfloor=\lfloor\frac{x}{n}\rfloor$. How to prove or disprove $\forall x\in\Bbb{R}, \forall n\in\Bbb{N},n\gt 0\implies \left\lfloor\frac{\lfloor x\rfloor}{n}\right\rfloor=\left\lfloor\frac{x}{n}\right\rfloor$.  So we want to prove $\left\lfloor\frac{\lfloor x\rfloor}{n}\right\rfloor\ge\left\lfloor\frac{x}{n}\right\rfloor$ and $\left\lfloor\frac{\lfloor x\rfloor}{n}\right\rfloor\le\left\lfloor\frac{x}{n}\right\rfloor$  Since $\lfloor x\rfloor\le x$, we can just start from here and prove  $\left\lfloor\frac{\lfloor x\rfloor}{n}\right\rfloor\le\left\lfloor\frac{x}{n}\right\rfloor$  But for $\left\lfloor\frac{\lfloor x\rfloor}{n}\right\rfloor\ge\left\lfloor\frac{x}{n}\right\rfloor$, I have no idea how to start. Let $C_*$ be a chain complex such that each $C_i$ is a torsion-free, finite-range abelian group with $C_i=0$ for all $i&lt;0$. Suppose that $C_i=0$ for all $i$ is large enough. The Euler characteristic of $C_*$ chain complex is defined as $$\chi(C_*)=\sum_{i\geq 0}(-1)^iRank(C_i)$$ Prove that $$\chi(C_*)=\sum_{i\geq 0}(-1)^iRank(H_i(C_*))$$  I have to prove that $\sum_{i\geq 0}(-1)^iRank(C_i)=\sum_{i\geq 0}(-1)^iRank(H_i(C_*))$, I think that one way to do this is by showing that $Rank(C_i)=Rank(H_i(C_*))$ but I do not know if this is true in general, in a nutshell, I want to show that the cardinality of the base of any $C_i$ is the same as the cardinality of the basis of the corresponding homology, how can I do this? Thank you trim is not part of the standard c/c++ library? Is it me or are there no standard trim functions in the c or c++ library? is there any single function that acts as a trim? If not can anyone tell me Why trim is not part of the standard library? (i know trim is in boost)  My trim code is  std::string trim(const std::string &amp;str) {     size_t s = str.find_first_not_of(" \n\r\t");     size_t e = str.find_last_not_of (" \n\r\t");      if(( string::npos == s) || ( string::npos == e))         return "";     else         return str.substr(s, e-s+1); }   test: cout &lt;&lt; trim("  \n\r\r\n \r\n text here\nwith return   \n\r\r\n \r\n "); -edit- i mostly wanted to know why it wasnt in the standard library, BobbyShaftoe answer is great. Is Force lightning from the feet plausible? In all the canons of Star Wars, there has not been one instance of a Force-user projecting Force lightning from their feet. Why? Is it implausible? Sort an array without rewriting a key Does anyone remember a cartoon with 4-5 humanoid robots on Saturday morning in the mid-80s?  As far as I can remember, they had "powers" to zap things and maybe fly but I don't remember much of the story/plot/enemies/powers.  I don't remember humans in the show.  One scene I remember was the were on some ice world and were being chased by this huge polar kraken type monster.  They got cornered at the edge of this ice sheet and some water.  One of the robots (the leader I guess) asked if someone had any power to do anything.  They all looked at each other and one of the female robots said she did and zapped the ice sheet so they floated away from the kraken.  However, since all of them ran out of power, they couldn't do anything except stand on the ice sheet and float in the water.  I don't remember anything after this scene, probably because my parents shut off the TV, or I'm just that old.  It's also possible I caught the re-runs of it, so it's possible it's late 70s or early 80s. More than a decade ago, I read a short story about a small group of people at the end of the world. The story was premised on some sort of mass-produced device which took ambient heat and turned it into power. The devices had been overused, and now the world was freezing.   I think the people were essentially bandits; the main character may have been a woman who lured men to her house and killed them for their body heat? There was also a strong implication that one person she had done this to was an alien who had come to warn that the devices were destroying the world.  I think the story was in a hardbound collection, and I think the collection was from the late 70's or very early 80's.  (Calling it a "short story" is just meant to distinguish it from a full novel — it may have actually been a novella or similar.) ShellExecuteEx code 31 error any time I try to launch an EXE, how to find problematic driver? Providing command key-value arguments with commas in value When using commands that allow using key-value pairs, how can one provide an argument value that has commas in it? As an example, say I'm using the \newacronym command from the glossaries package as below:  \newacronym[firstplural = Alphas, Bravos, and Charlies (ABCs), plural = ABCs]{ABC}{ABC}{Alpha, Bravo, Charlie}   Unfortunately, the comma is used to separate key-value pairs so the Bravos, and Charlies (ABCs) portion doesn't get parsed correctly. Is there a way to overcome this? Wireless disabled by hardware switch on an Asus X550V How can I get fireworks? What are the requirements for making fireworks appear at the end of a level in the original Super Mario Bros.? How does JavaScript .prototype work? I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test();  I remember a lot discussion I had with people a while back (I'm not exactly sure what I'm doing) but as I understand it, there's no concept of a class. It's just an object, and instances of those objects are clones of the original, right? But what is the exact purpose of this &quot;.prototype&quot; property in JavaScript? How does it relate to instantiating objects? Update: correct way var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong!  function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK'); } // OK  Also these  really helped a lot. I'm very new to classical propositional logic, and my lecturer is using a system with the following axioms:  A1. X→(Y→X)  A2. (X→(Y→Z))→((X→Y)→(X→Z))  A3. (¬Y→¬X)→(X→Y)  Use uniform substitution and Modes Ponens (MP) as rule of inference. Deduction Theorem also allowed.  I'd like to deduce the following:  (a) X, Y ⊢ ¬(X→(¬Y)) (conjunction, but expressed in terms of NOT and IMPLIES)  (b) X→((X→Y)→Y)  (c) (X→Y)→(((¬Y)→X)→Y)  (d) (((¬Y)→X)→Y)→(X→Y)  Remark: The last two are to show that the axiom (A3) can be replaced with a different axiom:  B3. (¬Y→¬X)→(((¬Y)→X)→Y).  Solution: Bram28 proves (b) and (c) below. I demonstrate (a) and (d).  (d) is alright; first, I claim that X, ((¬Y→X)→Y) ⊢ Y.  Axiom (A1) gives ⊢X→(¬Y→X) so that ((¬Y→X)→Y)⊢X→Y by Hypothetical Syllogism (HS), which Bram28 shows to be valid.  Now that we have ((¬Y→X)→Y)⊢X→Y just apply the deduction theorem to get what we want: ⊢((¬Y→X)→Y)→(X→Y).  (a) is slightly trickier. Axiom (A1) gives ⊢ Y→(X→Y) so that X, Y ⊢ (X→Y).  Next, by part (b), we have as a theorem that ⊢X→((X→¬Y)→¬Y).  Therefore X, Y ⊢(X→¬Y)→¬Y.  But ⊢(¬¬(X→¬Y))→(X→¬Y) by DN Elim, which Bram28 shows to be valid.  By HS, X, Y ⊢(¬¬(X→¬Y))→¬Y.  By Axiom (A3) and MP, X, Y ⊢(Y→¬(X→¬Y)).  Also, rather trivially X, Y ⊢Y.  Finally by MP we conclude X, Y ⊢¬(X→¬Y) as required. With regards to  post about  and the part about retaining reputation earned from deleted posts that have a score of 3 or better and were visible on the site for 60 days, does this also apply to self-deleted posts and will it continue to do so? I culled a few of my own answers over the weekend that were less than stellar, and my reputation dropped 1.8k, but the rep is back today after the changes were announced. I thought it would be useful to clarify that this also applies to self-deleted stuff. I can't distinguish the difference in meaning between these  two sentences.   It really doesn't matter.  It doesn't  really matter.    It seems that there is a nuanced difference, but I cannot see what this is. Is there a way to stream Netflix content to my Ubuntu machine? How to remove indentation in footnote?