Why should I flag a question as a duplicate, instead of answering it?
What's the incentive to flag duplicates?
"He added" vs. "Did he add" (inversion after negative adverb) A skydiver jumps out of a plane from a height of $2200$m. The skydiver's height, $h$ meters above the ground, can be modeled by the function $$s = 2200 - 4.9t^2$$ How fast is the skydiver falling at $t = 4$s?  If the skydiver is approaching a height of $2200$m, I reasoned that I could use the following definition to find the solution $${f(x+h)-f(x)\over h}$$ I entered the function into this definition and got stuck when I got to this$$f'(x) = \lim_{x\to 0} {2200-4.9t^2-9.8th-4.9h^2\over h}$$ Where can I go from here? Can I continue with this method or did I make a mistake a few steps back? New Solution  How does this look? Allow an edit to notify downvoters: "I think I've fixed the issue now - please check" I am currently writing an academic text and need to directly quote/cite text from a paper. What is best practice when I need to add a remark/note to the quote?  For instance, I would do it like this: The authors claim that "we do the best work ever in the area of CS (note: Computer Science)".  So in the above case the actually quoted text is "we do the best work ever in the area of CS", however, I want to add a note which explains the abbreviation "CS".  How should this be done?  Related questions: Prove that, $f'(0) \ge -\sqrt{2}$ for a function $f$ satisfying some conditions on $(-1,1)$. Let $f:(-1,1)\to \mathbb{R}$ be a twice differentiable function such that, $f(0)=1$, $f'(x)≤0$, $f(x)≥0$ and $f''(x)≤f(x)$ for all $x≥0$. Prove that, $f'(0)≥-\sqrt2$   Progress: I was able to prove $f'(0)≥-2$. For this I have applied Cauchy MVT for $f'$ and $g$ on $[0,x]$ for any $x\in (0,1)$ where $g: [0,x]\to\mathbb{R}$ is defined by, $g(x)=\sqrt{x+1}$. But, couldn't find another approach to get $-\sqrt{2}$. I am a Chinese citizen holding a HK SAR passport. How long am I able to visit the UK within a 365-day period?  My stamp is for 6 months. Could I leave within 6 months but re-enter again a couple of weeks for another 6 months? Why are second order linear PDEs classified as either elliptic, hyperbolic or parabolic? Is there a geometric interpretation of second order linear partial differential equations which explains why they are classified as either elliptic, hyperbolic or parabolic, or is this just a naming convention? That is, do they have any relation with actual ellipses, hyperbolas and parabolas? printing a block of text that matches a pattern Using just shell script, how to search a text file and list all whole blocks of lines that has inside some text (simple grep criteria).   The text file has blocks of lines separated by "-----------------" (precisely, each block start with "\n\n\n--------------------"... about 50 chars "-").  A sample could be:  ------------------------------- Abracadabra, blablablalbalba blablablabla, banana    ------------------------------- Text, sample text, sample text, sample text Text, sample text, sample text, sample text Text, sample text, sample text, sample text Text, sample text, sample text, sample text   -------------------------------   Text, sample text, sample text, sample text banana. Sample text, sample text, sample text, sample text Text, sample text, sample text, sample text   Lets consider the word "banana" the search criteria. So, the blocks listed would be:  ------------------------------- Abracadabra, blablablalbalba blablablabla, banana   ------------------------------- Text, sample text, sample text, sample text banana. Sample text, sample text, sample text, sample text Text, sample text, sample text, sample text   EDIT:  Testing answers to try awk, like: awk 'BEGIN{RS="\n------------"}/INFO/{print}' where INFO is what was searched for. I cannot get the whole block. So, follows a real sample and the result:  A REAL SAMPLE (including the first 3 new lines):      ------------------------------------------------- Diretório separado do nome o arquivo: adis, IWZLM (/home/interx/adis/src/IWZLM.SRC) Gerando rotina em linguagem C: (yla5 adis IWZLM -if) .INFO =>Rotina BLOQUEADA (status 'M'): Geracao ignorada (use -is para ignorar checagem do status)  [  OK-I ] IWZLM (adis) - Lista lay: Geracao ignorada do codigo em C.    ------------------------------------------------- Diretório separado do nome d arquivo: adis, ADISA (/home/interx/adis/src/ADISA.SRC) Gerando rotina em linguagem C: (yla5 adis ADISA -if) .ERRO: Falha inesperada  Compilando o programa: (ycomp adis ADISA -exe adis/exe/ADISA.temp.exe ) adis/exe/ADISA.temp.exe => adis/exe/ADISA  [  OK   ] ADISA (adis) - Menu A : Gerada e compilada com sucesso.    ------------------------------------------------- Diretório separado do nome o arquivo: adis, ADISD1 (/home/interx/adis/src/ADISD1.SRC) Gerando rotina em linguagem C: (yla5 adis ADISD1 -if) .ATENCAO: Definicao nao localizada  Compilando o programa: (ycomp adis ADISD1 -exe adis/exe/ADISD1.temp.exe ) adis/exe/ADISD1.temp.exe => adis/exe/ADISD1  [  OK   ] ADISD1 (adis) - Menu : Gerada e compilada com sucesso.   I cannot get the whole block, just the line containing "INFO", like a ordinary grep, either setting or not ORS:  $ cat file  | awk 'BEGIN{RS="\n------------"}/INFO/{print}'  .INFO =&gt;Rotina BLOQUEADA (status 'M'): Geracao ignorada (use -is para ignorar checagem do status)   NOTES: It is the awk from AIX 7.1, not gawk. Present Perfect or simple past? Why is $2\pi i \neq 0?$ Why can't we use entanglement to defy Heisenberg's Uncertainty Principle? In principle, it is possible to entangle any property of two particles, including speed and momentum. Surely then, this could be used to defy the Uncertainty Principle, which states that the momentum and position of a particle cannot be together measured with accuracy, but the more accurate one gets, the less accurate the other becomes:  $$\Delta x\Delta p=\dfrac{\hbar}{2}.$$  If one was to set up an experiment where two particles are entangled, one could then measure the position of one particle with great accurary at the same time as measuring the momentum of the other particle with great accuracy, which would mean that, as the two particles are entangled, one would then know the momentum of the particle they measured the position of.  Therefore, the Uncertainty Principle would have been defied, as both momentum and position have been measured with a high accuracy.  However, this can't be true, as someone would have thought of this before.  So why wouldn't this work? For $n\geq 3$ there exist $x,y\in S_n$ such that $x$ and $y$ have order $2$ and $xy$ has order $n$. Assume that $n\geq 3$. Let $S_n$ be the symmetric group with $n!$ elements. Prove that there exists $x$ and $y$ in $S_n$ such that $x$ and $y$ have order $2$ and $xy$ has order $n$.  For $n=3$, it is easy to see that $x=(1, 2)$ and $y=(1, 3)$ works. How to prove it for the general case? delete vs delete[] operators in C++ How to load a taxonomy term with case-sensitive? I used this      $this-&gt;termStorage-&gt;loadByProperties(['name' =&gt; 'test']);   I got two terms: Test, test. I want to get only one: test  This is working without case-sensitive:       $this-&gt;termStorage-&gt;getQuery()-&gt;condition('name', 'test', '=')-&gt;execute();       \Drupal::database()-&gt;select('taxonomy_term_field_data', 't')       -&gt;condition('t.name', 'test')       -&gt;fields('t', ['name'])       -&gt;execute()       -&gt;fetchAll();       \Drupal::database()-&gt;query("SELECT name FROM taxonomy_term_field_data WHERE name='test'")-&gt;fetchAll(); With Unix script, I'd like to add values in column 1 if text in column 2 is the same and print the sum.  I have a file that is:    7 GeneA 2 GeneB 6 GeneC 2 GeneB 9 GeneA   I want the output to look like:   16 GeneA 4  GeneB 6  GeneC   Thanks How do I use variables in a sed command? I tried the following code to replace QQ with ZZ, but it doesn't do what I want:  var1=QQ sed -i 's/$var1/ZZ/g' $file   However, this code does what I want:  sed -i 's/QQ/ZZ/g' $file   How do I use variables in sed? How to avoid bad box with long words with no hyphenation? How do I deal with a compromised server? This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault. Let $G$ be  a group and $H$ be a subgroup of $G$ of index $2$ .Then show that if $a,b\notin H$ then $ab\in H$.   $a,b\notin H\implies aH,bH\neq H\implies $ $aH=bH$  since $H$ has only two distinct left cosets in $G$.  $\implies a^{-1}b\in H$  How to show that $ab\in H$ from here? Suppose I have a python object x and a string s, how do I set the attribute s on x? So:  &gt;&gt;&gt; x = SomeObject() &gt;&gt;&gt; attr = 'myAttr' &gt;&gt;&gt; # magic goes here &gt;&gt;&gt; x.myAttr 'magic'   What's the magic? The goal of this, incidentally, is to cache calls to x.__getattr__().