Greeting to all in this room,  Please help with this statement.  "Replace John with Andrew" which one becomes trashed among John and Andrew?
I often see "replace with" and "replace by" used interchangeably, but this doesn't sound right to me:     I replaced that component by this one.   I would use "with" in such a sentence. "By" only seems reasonable in passive, although "with" sounds like it would there work too:     That component was replaced by this one.   That component was replaced with this one.   In my native language, the equivalent of "replace by" can only be used in passive, and even then it's a bit weird unless a person is the object replacing something – perhaps this affects my judgment?  Web searches haven't come up with anything conclusive; the results are contradictory and speculative at best.  Are "replace with" and "replace by" interchangeable in active context? What about passive? Are there stylistic reasons to prefer one over the other?
Dynamically access object property using variable Error while writing strcat() using pointers Distance from a point to a plane in normed spaces How can we calculate the distance from a point to a plane in normed spaces ? where we are not inner product, for example:  Calculate the distance in $(C[0,1],||\cdot||)$ endowed with the supremum norm $$||f||=\sup_{t\in[0,1]}|f(t)|$$ from the function $f(t)=t^2$ to the linear hull of the functions $g(t)=t$  and  $h(t)=\sin(t)$  Any hints would be appreciated. Should I use 'or' or 'nor' after a negative statement? This document does not cover the SDK interfaces nor any other reference material.   I think the above is correct, but my grammatical checker in Microsoft Word underlines nor and suggests or. Why? How to detect, from browser, if user is running in Remote Desktop session? I have parent folder "parent". Inside this folder I have subfolders, and a file named "names.txt". this file includes the names of these subfolders as follow:  Parent_folder folder1 folder2 folder3 folder4 . . . . names.txt   The content of the file "names.txt" is as follow:  folder1 folder2 folder3 folder4 . . .   Inside every folder I have images and I want to apply consecutively 10 scripts on every image ( every script must finish it is job inside every folder, then the second script must be run). These scripts have different names and they are exist in one folder. I set an environment by sourcing a file then I can call these scripts by its name from terminal .At the same time I want to apply this process on all the folders at once. i.e. when script #1 is running, I want it to be running on all the folders at the same time. When it is done and script #2 will start. I want it to start in all the folders at once and so on... In order to achieve this I wrote the following code:  #!/bin/bash path=PATH/TO/THE/PARENT/FOLDER for i in $(cat $path/names.txt); do { script#1 } &amp; { script#2 } &amp; . . .  done   This code is not working efficiently as all the commands are running at once. I want the commands to run on all the folders at once but consecutively.  What I am doing wrong? Why do ssh operations always ask for passphrase? (with ed25519) I just updated my ssh key and added a passphrase, however it constantly nags me for it now, such as when I do a git (or mercurial hg) push.  ssh-agent is running:  xxx  1303  1118  0 09:16 ?  00:00:00 /usr/bin/ssh-agent    /usr/bin/dbus-launch --exit-with-session     /usr/bin/im-launch mate-session   I tried ssh-add:  &gt; ssh-add Identity added: /home/…/.ssh/id_rsa (/home/…/.ssh/id_rsa) Enter passphrase for /home/…/.ssh/id_ed25519:  Could not add identity "/home/…/.ssh/id_ed25519":      communication with agent failed   What is missing?  16.04 Ubuntu Mate, in case it matters. How to specify a short int literal without casting? How many ways can $r$ nonconsecutive integers be chosen from the first $n$ integers? During self-study, I ran across the question of how many ways six numbers can be chosen from the numbers 1 - 49 without replacement, stipulating that no two of the numbers be consecutive.  I can obtain a simple lower bound by saying that, in the worst-case scenario, when you choose a particular number, there are now three numbers that cannot be chosen next.  For example, if I first pick 17, then I can't choose 16, 17, or 18 for the remaining choices.  This gives me the lower bound  $$\frac{49*46*43*40*37*34}{6!} = 6,773,770 \frac{8}{9}$$  This is about 48% of ${}_{49}C_6 =  13,983,816$.  The real answer must be bigger (and an integer).  I haven't found a way to calculate it, though.  The original problem asked to show that the probability of having non-consecutive integers when you choose six is greater than 50%, so if the problem is complicated to count exactly, better approximations that show the answer is above 50% would also be appreciated.   Of course, I can use a computer to do the counting, but I'm interested in learning what methods I'm missing. I am working on a media project that contains little clips from movies and I wonder if there any way to avoid downloading all of the data instead only the specified parts of the movies? Can I override the Javascript Function object to log all function calls? Show that $|f(z_1)|=|f(z_2)|≤|z_1|^2=|z_2|^2$. Let $f\in H(B(0,1))$, $f(0)=0$, $f(B(0,1))\subset B(0,1)$. Suppose there are 2 different points $z_1$,$z_2\in B(0,1)$, s.t. $|z_1|=|z_2|$, $f(z_1)=f(z_2)$. Show that $|f(z_1)|=|f(z_2)|≤|z_1|^2=|z_2|^2$.    I have used the Schwarz-Pick Proposition to prove that $|f(z_1)|=|f(z_2)|≤|z_1|=|z_2|$ directly, but that is not enough. Thank you for help! Doing principal component analysis or factor analysis on binary data I have a dataset with a large number of Yes/No responses. Can I use principal components (PCA) or any other data reduction analyses (such as factor analysis) for this type of data? Please advise how I go about doing this using SPSS. How to duplicate sys.stdout to a log file? Edit: Since it appears that there's either no solution, or I'm doing something so non-standard that nobody knows - I'll revise my question to also ask: What is the best way to accomplish logging when a python app is making a lot of system calls?  My app has two modes.  In interactive mode, I want all output to go to the screen as well as to a log file, including output from any system calls.  In daemon mode, all output goes to the log.  Daemon mode works great using os.dup2().  I can't find a way to "tee" all output to a log in interactive mode, without modifying each and every system call.    In other words, I want the functionality of the command line 'tee' for any output generated by a python app, including system call output.  To clarify:   To redirect all output I do something like this, and it works great:  # open our log file so = se = open("%s.log" % self.name, 'w', 0)  # re-open stdout without buffering sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)  # redirect stdout and stderr to the log file opened above os.dup2(so.fileno(), sys.stdout.fileno()) os.dup2(se.fileno(), sys.stderr.fileno())   The nice thing about this is that it requires no special print calls from the rest of the code.  The code also runs some shell commands, so it's nice not having to deal with each of their output individually as well.  Simply, I want to do the same, except duplicating instead of redirecting.  At first thought, I thought that simply reversing the dup2's should work.  Why doesn't it?  Here's my test:   import os, sys  ### my broken solution: so = se = open("a.log", 'w', 0) sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)  os.dup2(sys.stdout.fileno(), so.fileno()) os.dup2(sys.stderr.fileno(), se.fileno()) ###  print("foo bar")  os.spawnve("P_WAIT", "/bin/ls", ["/bin/ls"], {}) os.execve("/bin/ls", ["/bin/ls"], os.environ)   The file "a.log" should be identical to what was displayed on the screen. Citing a range of papers using numeric keys as in \cite{a, b, c} -> [1-3] Do votes get canceled if voting privilege is lost? If I'm below 15 reputation, I can't alter the public score of an answer/question.  Suppose I gain the privilege by getting the required rep and vote some posts up. Then, for any reason, I fall below 15 and lose the ability to vote. What about the votes I already did cast?  Do post scores get altered by ignoring my vote, or will they stay the same? In other words, is losing a privilege retroactive?  If yes, what about when I gain my privilege back? Are my votes automatically restored, or do I have to cast them again from scratch?  I made the easiest example, but this applies to any higher privilege Ubuntu does not offers me "install alongside Windows" Any of the partitions makes in Windows was not recognised by Ubuntu, or Zorin OS, or LinuxMint. It's like a blank hard disc, 250 gb free. I'm a new Linux user, but what confuses me is that I was able to install Ubuntu alongside Windows on my laptop with no problems, but on PC... no way! Right-Click menu awareness on Web Application The web application I am building has a custom right-click menu. I'm concerned that the user might not find this menu as normally right-clicking will only display the default browser's menu. Is there a standard way to make the user aware of custom right-click menus? Is there another way to show this information? Differences in development between .NET and Mono Why is printf better than echo?