Why should someone edit questions from years (3 to 7 years ago, for example)?
Editing old questions
I'm running Fedora 25 and I need to take a few particular screen captures so I've read that shutter is a great tool for that. Sadly I am unable to use it for some reason. Whenever I try to take a screenshot this is the result: Using maxTimeMS parameter with aggregation queries on Mongo 2.6 and Pymongo 2.7.1 Something that confuses me, but has never caused any problems... the recommended way to dispatch an event is as follows:  public event EventHandler SomeEvent; ... {     ....     if(SomeEvent!=null)SomeEvent(); }   In a multi-threaded environment, how does this code guarantee that another thread will not alter the invocation list of SomeEvent between the check for null and the invocation of the event? Let $p, q \in \mathbb R$ be positive reals for which $p + q = 1$. How to prove that for any two natural numbers $n, m$ the following inequality is true?  $(1 - p^n)^m + (1 - q^m)^n \ge 1$  I don't have a big knowledge about solving inequalities, so I tried to use cauchy-schwarz inequality, binomial theorem and some other baisc techniques, but it lead me nowhere. I've been thinking about it for a long time and now I'm completly stuck. Are S.P.E.C.I.A.L. skills capped at 10? We know that the maximum level a dweller can train to on any SPECIAL skill is 10, however this does not consider bonuses given from their outfit.    Is there any additional benefit for going over 10? For example, a dweller with an Intelligence skill of 10 wearing a lab coat that boosts Intelligence by 3?   If it is a hard cap, would it be more useful to use outfits that raise a secondary characteristic instead? Prove that $\frac{a_1^2}{a_1+a_2}+\frac{a_2^2}{a_2+a_3}+ \cdots \frac{a_n^2}{a_n+a_1} \geq \frac12$ Let $a_1, a_2, a_3, \dots , a_n$ be positive real numbers whose sum is $1$. Prove that $$\frac{a_1^2}{a_1+a_2}+\frac{a_2^2}{a_2+a_3}+ \ldots +\frac{a_n^2}{a_n+a_1} \geq \frac12\,.$$  I thought maybe the Cauchy and QM inequalities would be helpful. But I can't see how to apply it. Another thought (might be unhelpful) is that the sum of the denominators on the left hand side is $2$ (the denominator on the right hand side). I would really appreciate any hints. Where do I place my own .sty or .cls files, to make them available to all my .tex files? I know how to define a package or a class, but how do I make it available (to myself) at all times?  Say I have the package file commonstuff.sty (or myprettyclass.cls), that I want to be able to include in any .tex file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?  Note: I know I can just place it in the same folder as the .tex file, but that's not what I'm after here. I'm looking for a way to "install" the package centrally on my computer. I have the following sentence:     If T had still been alive, there is the great possibility that either T or C ...   My teacher says that the word "then" must appear after the comma, but I think that it's implied and unnecessary. Who is right? How to use PostgreSQL/PostGIS with ArcGIS for Desktop? How to prove $\hat{p}|x\rangle=i\hbar\frac{\partial}{\partial x}|x\rangle$,using $[\hat{x},\hat{p}]=i\hbar$? How to prove $$\hat{p}|x\rangle=i\hbar\frac{\partial}{\partial x}|x\rangle,$$ using $$[\hat{x},\hat{p}]=i\hbar~?$$ The question seems to be uncomplete because for any $f(x)$ $$[\hat{x},\hat{p}+f(x)]=i\hbar.$$ But that's my homework. Can someone add some appropriate assumptions and prove the question?  Here is a seemingly right answer:  $$ \hat{Q} = e^{-i \frac{u}{\hbar} \hat{p}},[\hat{x},\hat{Q}]=u \hat{Q} $$ $$ \hat{x}\hat{Q}|x\rangle = (x+u)\hat{Q}|x\rangle $$ $$ \hat{Q}|x\rangle = |x+u\rangle $$ $$ \hat{T} = e^{i \frac{u}{\hbar} \hat{x}},[\hat{p},\hat{T}]=u \hat{T} $$ $$ \hat{p}\hat{T}|p\rangle = (p+u)\hat{T}|p\rangle $$ $$ \hat{T}|p\rangle = |p+u\rangle $$  Therefore  $$ \langle x | p \rangle = e^{i\frac{px}{\hbar}} \langle 0 |_x |0 \rangle_p $$  $$ \delta(p-p') = \langle p | p' \rangle  = 2\pi \hbar |\langle 0 |_x |0 \rangle_p|^2 \delta(p-p') $$ $$ \langle 0 |_x |0 \rangle_p = \sqrt{\frac{1}{2 \pi \hbar}}$$ $$ \hat{p}|x\rangle = \int \hat{p} |p\rangle\langle p |x\rangle= \int \hat{p} |p\rangle e^{-i\frac{px}{\hbar}}\sqrt{\frac{1}{2 \pi \hbar}} = i\hbar\frac{\partial}{\partial x}|x\rangle $$ Which assumption is made here? How to calculate relatedness in haplodiploid organisms (mainly full sisters and full brothers)? I have tried to calculate the relatedness for haplodiploid organisms, but cannot understand the calculations behind full sister and full brother.  (taken from  I have managed to solve the other cases. Since female will have ZZ:  female will share 1/2 of her genes with daughter female will share 1/2 of her genes with son female will share 1/2 of her genes with mother female will share 1/2 of her genes with father  Since male will have only Z:  male will share 1 (100%) of his genes with his daughter male won't share anything with his son (unfertilized eggs leads to male in haplodiploidy system) male will share 1(100%) of his genes with his mother male won't share anything with his father (unfertilized eggs leads to male in haplodiploidy system)  Even though I figured out how others work, I wasn't able to calculate r for fullsister fullbrother? How can it be 3/4,1/4,1/2,1/2? Error in updating to ADT rev 23 for Eclipse Opening Careers notification crashes app When Apple was in the high $600 or so range, it split 6 times and made it more affordable to purchase more shares for less, even though the value was technically the same. I see companies like Google are extremely high per share and am wondering why or why not they would or wouldn't split their stock right now. Make Chrome always execute with flags, for eg., directly opening an HTML file I want to run Chrome with a given set of flags, always  I created a shortcut and added the flag to it in the following way, so my target of the shortcut says:  C:\&lt;application-path&gt;\chrome.exe --user-data-dir=D:\Chrome   But when I double click an HTML file, or if any other application triggers Chrome, it looses the flag value. The result - A new chrome window opens with Default profile directory.  I want to make the flag permanent, so that its active irrespective of however Chrome executes.  I tried changing the following registry key:  HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command   It was this earlier:  "C:\&lt;application-path&gt;\chrome.exe" -- "%1"    I changed to following attempts which did not work:  1. "C:\&lt;application-path&gt;\chrome.exe" -- "%1" --user-data-dir=D:\Chrome 2. "C:\&lt;application-path&gt;\chrome.exe" -- "%1" -- "user-data-dir=D:\Chrome" 3. "C:\&lt;application-path&gt;\chrome.exe" -- "%1 user-data-dir=D:\Chrome"   Conclusively, when I try to open a link from any application, it doesn't open in my current Chrome as a new tab, rather opens a new Chrome window with no plugins and extensions since its from other directory.  Why I have changed my default directory? - because the OS drive was getting low on memory due to heave Chrome caches and apps. In The Matrix Reloaded, the Architect reveals to Neo that Trinity is about to die. I can't help but wonder if Neo would still choose the left door if the Architect had withheld that information.  The Architect could have designed a better choice mechanism so as to trick Neo into making a choice in the machine's favor rather than a highly risky one.   Did I miss anything important in the movie? I'm trying to access an XML file within a jar file, from a separate jar that's running as a desktop application.  I can get the URL to the file I need, but when I pass that to a FileReader (as a String) I get a FileNotFoundException saying "The file name, directory name, or volume label syntax is incorrect."  As a point of reference, I have no trouble reading image resources from the same jar, passing the URL to an ImageIcon constructor.  This seems to indicate that the method I'm using to get the URL is correct.  URL url = getClass().getResource("/xxx/xxx/xxx/services.xml"); ServicesLoader jsl = new ServicesLoader( url.toString() );   Inside the ServicesLoader class I have   XMLReader xr = XMLReaderFactory.createXMLReader(); xr.setContentHandler( this ); xr.setErrorHandler( this ); xr.parse( new InputSource( new FileReader( filename )));   What's wrong with using this technique to read the XML file? Best way to remove file extension from a string? So, I'm using a script I've made to convert videos to the webm format. A certain program calls the script, sending %f which is the full, absolute file name of the video, like this:  converter.sh %f   where %f has two possible extensions, .avi or .mpg.  # /bin/bash ffmpeg -i $1 `dirname $1``basename $1 avi`webm &amp;&amp; rm $1   It currently works perfectly when $1 contains a .avi file, because basename removes the .avi extension. When $1 ends with .mpg instead, the result is .mpgwebm.  How can I modify that script to be able to receive those two possible different formats?    Resuming: If $1 is /somedir/video.avi, the script should do:  ffmpeg -i /somedir/video.avi /somedir/video.webm   And if $1 is /somedir/video.mpg, the script should do:  ffmpeg -i /somedir/video.mpg /somedir/video.webm   I know this might be fool for some people, but I'm kind of new with the bash. What the reason the number of lines differs?  $ head -n 100000 ./access.log &gt; ./data/log.sample $ cat $_ | wc -l 1933424 Minipage: 2 tables side by side isn't working I have the following code to layout two tables side by side:  \begin{minipage}{0.3\textwidth} \begin{tabular}{c | c | c | c | c | c | c} F &amp; D &amp; E &amp; G &amp; P &amp; A &amp; L\\ \hline C &amp; H &amp; I &amp; I &amp; U &amp; G &amp; F\\ \hline G &amp; Z &amp; G &amp; A &amp; F &amp; Z &amp; U\\ \hline F &amp; R &amp; \textbf{H} &amp; \textbf{A} &amp; \textbf{U} &amp; \textbf{S} &amp; Z\\ \hline R &amp; P &amp; L &amp; I &amp; N &amp; F &amp; H\\ \hline L &amp; U &amp; G &amp; I &amp; A &amp; C &amp; T\\ \hline A &amp; B &amp; D &amp; N &amp; E &amp; R &amp; Z\\ \end{tabular}  \end{minipage}  \begin{minipage}{0.3\textwidth} \begin{tabular}{c | c | c | c | c | c | c} F &amp; D &amp; E &amp; G &amp; P &amp; A &amp; L\\ \hline C &amp; H &amp; I &amp; I &amp; U &amp; G &amp; F\\ \hline G &amp; Z &amp; G &amp; A &amp; F &amp; Z &amp; U\\ \hline F &amp; R &amp; \textbf{H} &amp; \textbf{A} &amp; \textbf{U} &amp; \textbf{S} &amp; Z\\ \hline R &amp; P &amp; L &amp; I &amp; N &amp; F &amp; H\\ \hline L &amp; U &amp; G &amp; I &amp; A &amp; C &amp; T\\ \hline A &amp; B &amp; D &amp; N &amp; E &amp; R &amp; Z\\ \end{tabular}  \end{minipage}   But it doesn't work. The tables are one below the other. What am I doing wrong?