Searching an array list of objects for an object with a certain field value
How do I compare strings in Java?
How to set a shortcut for "Always on Top" for window? In 12.04 (Unity), I would like to assign a shortcut to the "always on top option" for a window. Probably something like Ctrl+Shift+Home to turn on and Ctrl+Shift+End to turn off, or whatever. Is there an option to do this somewhere in the Compiz Settings Manager?  This (old)  claimed that      For compiz, Enable Extra WM Actions. Check the properties, and insert ALT+A to Key field for Toggle Always-On-Top action.   But I couldn't find that. I am debating whether or not to get the Potato Sack (yes, I realize I've been debating for several weeks now) bundle through steam.  I already own: Defense Grid: The Awakening, Super Meat Boy, and Audiosurf, all of which are part of the sack pack. What happens if I buy the Potato Sack?  Do I get 2nd copies of the three above mentioned games to gift elsewhere?  Is the price of the bundle reduced by the games I already have?  Do I get nothing special for already owning those 3 games? Does the condition $\lim\limits_{n\to\infty}\frac{a_{n+1}}{a_n}=1$ imply that $a_n$ convergent?  When I say convergent I mean to $L\in \mathbb{R}$ or to $\infty$ or to $-\infty$  I have a gut feeling this statement is false, just can't find a series which contradicts it.  Thanks a lot How to show that $\mathbb{Q}$ is not $G_\delta$ Can we have a moderator only "flag for community team/developer attention" link on posts? Show that the square of any prime number is the Factof of some integer How can I handle the warning of file_get_contents() function in PHP? I have been texture painting in look dev mode. But when i try to render it, everything looks very dark. I have 3 sun lights in my scene, ambient turned on in Eevee settings. What am i missing? I really like the look of my scene in Look Dev mode, how can i achieve the same look when my scene is rendered too? Questions on "All Horse are the Same Color" Proof by Complete Induction I'm bugged by the following that's summarized on p. 109 of .     False theorem: All horses are the same color.      Proof by induction:      $\fbox{$P(n)$ is the statement: In every set of horses of size $n$, all $n$ horses are the same color.}$   $\fbox{Base Case or $P(1)$:}$ One horse is the same color as itself. This is true by inspection.   $\fbox{Induction Step:}$ Assume $P(k)$ for some $k \geq 1$.   $\fbox{Proof of $P(k + 1) :$}$   Since $\{H_1, H_2, ... , H_n\}$ is a set of $n$ horses, the induction hypothesis applies to this set. Thus, all the horses in this set are the same color.   Since $\{H_2, H_3, ... , H_{n+1}\}$ is also a set of $n$ horses, the induction step likewise holds for this set. Thus, all the horses in this set are the same color too.         Therefore, all $n +1$ horses in $\{H_1, H_2, H_3, ... , H_n , H_{n+1}\}$ are the same color. QED.   The issue the instructor was trying to point out is clearly valid. For the case $n = 1$, there is only ${H_1}$. So this case says nothing about possible overlapping elements of each set of $(n + 1)$, for instance $H_2$ in the above proof.    But it was proposed in the class discussion that this was the only problem. Had you been able to prove $P(2)$ true, then a proof of the above format would have been fine.    My interpretation is that yes, you could prove all horses are the same color, if you can prove that any set of two horses will be the same color. But this format would not work.  Why not? The problem I see is that the above proof is for the existence of at least one particular pair of sets of horses of sizes $n$ and $n + 1$, such that in each set, all horses are the same color.  Particularly when the set of size $n$ is a subset of the set of size $n + 1$.  In order to prove the induction step, don't you need to prove that sets of sizes $n$ and $n + 1$, do not necessarily contain the same, overlapping elements?  You could prove that any horse can be added to a set of 2 horses.  Take the last two, and they must be the same color, and so on.  Wwhatever color the first two happen to be, all other horses must thus be the same color.    Am I misinterpreting the example, or am I making a logical error? Thanks in advance. I've started putting into practice the answer to . Yet I would like to change this so that there are brackets around the citations:   in the superscript in text,     in the superscript in footnote,  in the bibliography.   I've managed to get the first one and the last one working. The second one however, I don't know how to do this.   Note that I mainly write in english and in dutch, so I don't think there is much babel interference.  Also, would there be a way to order the footnotes so that first all ''normal'' \footnote{} are printed and below that all \sfcite{} citational footnotes (per page that is)?  Here's what I've managed to concoct:  \documentclass{article} \usepackage[english]{babel} \usepackage[pdfborder={0 0 0}]{hyperref} \usepackage[citestyle=numeric-comp,sorting=none,hyperref]{biblatex} \usepackage{filecontents}  % No brackets around the number of each bibliography entry \DeclareFieldFormat{labelnumberwidth}{\textbf{[#1]}}  %--------------------------------------------------------------- % Essentially verbatim from Joseph Wright % http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/ \makeatletter \ExecuteBibliographyOptions{citetracker,sorting=none}  \DeclareCiteCommand{\notefullcite}[\mkbibbrackets]     {\usebibmacro{cite:init}%         \usebibmacro{prenote}}     {\usebibmacro{citeindex}%         \usebibmacro{notefullcite}%         \usebibmacro{cite:comp}}     {}     {\usebibmacro{cite:dump}%         \usebibmacro{postnote}}  \newbibmacro*{notefullcite}{%     \ifciteseen         {}         {\footnotetext[\thefield{labelnumber}]{%             \usedriver{}{\thefield{entrytype}}\addperiod}}}  \DeclareCiteCommand{\sfcite}[\cbx@superscript]%     {\usebibmacro{cite:init}%         \let\multicitedelim=\supercitedelim         \iffieldundef{prenote}         {}         {\BibliographyWarning{Ignoring prenote argument}}%     \iffieldundef{postnote}         {}         {\BibliographyWarning{Ignoring postnote argument}}}     {\usebibmacro{citeindex}%         \usebibmacro{sfcite}%         \usebibmacro{cite:comp}}     {}     {\usebibmacro{cite:dump}}  \newbibmacro*{sfcite}{%     \ifciteseen         {}         {\xappto\cbx@citehook{%             \noexpand\footnotetext[\thefield{labelnumber}]{%             \fullcite{\thefield{entrykey}}\addperiod}}}}  \newrobustcmd{\cbx@superscript}[1]{%     \mkbibsuperscript{[#1]}%     \cbx@citehook     \global\let\cbx@citehook=\empty} \let\cbx@citehook=\empty \makeatother %---------------------------------------------------------------  \begin{filecontents}{\jobname.bib} @article{ref1,     hyphenation = {american},     title = {Natural Products as Sources of New Drugs over the Last 25 Years},     author = {Newman, D.J. and Cragg, G.M.},     journal = {J. of Nat. Prod.},     volume = {70},     number = {3},     pages = {461--477},     year = {2007}} @article{ref2,     hyphenation = {american},     title = {Natural products as leads to potential drugs: an old process or the new hope for drug discovery?},     author = {Newman, D.J.},     journal = {J. of Med. Chem.},     volume = {51},     number = {9},     pages = {2589--2599},     year = {2008}} @online{ref3,     author = {Quintin, C.},     title = {Les eponges},     url = {http://christophe.quintin.pagesperso-orange.fr/Liste_Doc.html},     urldate = {2009-05-03} } \end{filecontents}  \addbibresource{\jobname.bib}  \begin{document} First citation.\sfcite{ref1,ref2} Some text\footnote{A footnote}.   \pagebreak Second citation\sfcite{ref1}, second citation\sfcite{ref2}, first citation.\sfcite{ref3} \printbibliography \end{document} How to get the current branch name in Git? Suppose $Y_1, \ldots, Y_n$ is a random sample from a normal distribution with mean $\mu$ and variance $\sigma^2$. Let $S^2$ be the sample variance, which is unbiased for $\sigma^2$.  GOAL: Show that $S = \sqrt{S^2}$ is a biased estimator of $\sigma$.  I realize that $(n-1)S^2/ \sigma ^2$ is chi-square with $(n-1)$ degrees of freedom.  I am given that $$E(S) = E\left[\frac{\sigma}{\sqrt{n-1}} \left[\frac{(n-1)S^2}{\sigma^2}\right]^{1/2}\right] = \frac{\sigma}{\sqrt{n-1}} \int_0^\infty v^{1/2} \frac{1}{\Gamma[(n-1)/2] 2^{(n-1)/2}} v^{(n-1)/2} e^{-v/2} \, dv$$  Can anyone help me understand why they have $v^{1/2}$ and $v^{(n-1)/2}$ (combining them $v^{n/2}$ as I think it should be $v^{1/2}$ and $v^{\frac{(n-1)}{2}-1}$ (combining both terms give $v^{(n-2)/2}$ since the pdf for chi-square distribution is $$ f(v) = \frac{v^{(x/2)-1} e^{-v/2}}{2^{x/2}\Gamma(x/2)},$$ where $x$ is degree of freedom?  Could anyone please tell me which one is the correct answer with explanation?  Thank you I'm using OSX 10.9. I'm trying to set up Internet Sharing to connect my Android to my Mac directly over Wi-Fi. Every tutorial I've come across (including ) mentions checking a box for "AirPort" in a "To computers using" list. However, the option is simply not available on my machine:    I have a few related questions:   Why isn't the AirPort option available? Is there anything I can do to make it available? If there isn't, how can I work around it to finish setting up Internet Sharing so I can connect my Android and my Mac directly over Wi-Fi? What do *args and **kwargs mean? What exactly do *args and **kwargs mean?  According to the Python documentation, from what it seems, it passes in a tuple of arguments.  def foo(hello, *args):     print hello      for each in args:         print each  if __name__ == '__main__':     foo("LOVE", ["lol", "lololol"])   This prints out:  LOVE ['lol', 'lololol']   How do you effectively use them? Why are there two ticker symbols for Google — GOOGL and GOOG?  They seem to be mostly identical, but their market values are different: currently, 551.64 for  and 548.79 for . Why are mutable structs “evil”? Following the discussions here on SO I already read several times the remark that mutable structs are “evil” (like in the answer to this ).  What's the actual problem with mutability and structs in C#? When I ordered this TP-Link AC1300 Wireless Dual Band PCI-Express Adapter (Archer T6E), I looked into customers reviews and they said it worked fine with no drivers on Ubuntu. I didn't have a CD/DVD player on my desktop so I (on a laptop with a DVD drive) copied and pasted the DVD support disk content on to a USB drive and used that. But when I tried to run autorun.exe it puts up archive manager and says An error occurred while loading the archive Ubuntu verison- Ubuntu 16.04 LTS.  Output from: lspci -vnn  02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 11) Subsystem: ASRock Incorporation Motherboard (one of many) [1849:8168] Kernel driver in use: r8169  Kernel modules: r8169   I am fairly new to Ubuntu (1 month) and have learned alot (sudo commands) and now know that windows is overpriced and that ubuntu is better in most fields.  Thanks for the help. Why does work depend on distance? So the formula for work is$$ \left[\text{work}\right] ~=~ \left[\text{force}\right]  \, \times \, \left[\text{distance}\right] \,. $$  I'm trying to get an understanding of how this represents energy.  If I'm in a vacuum, and I push a block with a force of $1 \, \mathrm{N},$ it will move forwards infinitely. So as long as I wait long enough, the distance will keep increasing. This seems to imply that the longer I wait, the more work (energy) has been applied to the block.  I must be missing something, but I can't really pinpoint what it is.  It only really seems to make sense when I think of the opposite scenario: when slowing down a block that is (initially) going at a constant speed. How far can one get in analysis without leaving $\mathbb{Q}$? Suppose you're trying to teach analysis to a stubborn algebraist who refuses to acknowledge the existence of any characteristic $0$ field other than $\mathbb{Q}$.  How ugly are things going to get for him?  The algebraist argues that the real numbers are a silly construction because any real number can be approximated to arbitrarily high precision by the rational numbers - i.e., given any real number $r$ and any $\epsilon&gt;0$, the set $\left\{x\in\mathbb{Q}:\left|x-r\right|&lt;\epsilon\right\}$ is nonempty, thus sating the mad gods of algebra.  As @J.M. and @75064 pointed out to me in chat, we do start having some topology problems, for example that $f(x)=x^2$ and $g(x)=2$ are nonintersecting functions in $\mathbb{Q}$.  They do, however, come arbitrarily close to intersecting, i.e. given any $\epsilon&gt;0$ there exist rational solutions to $\left|2-x^2\right|&lt;\epsilon$.  The algebraist doesn't find this totally unsatisfying.     Where is this guy really going to start running into trouble?  Are there definitions in analysis which simply can't be reasonably formulated without leaving the rational numbers?  Which concepts would be particularly difficult to understand without the rest of the reals? Merging folders with mv?