Can  anyone  explain  me  on  a  simple  example  the  difference  between  mutable  and  immutable  objects  in  java?
I'm trying to get my head around mutable vs immutable objects. Using mutable objects gets a lot of bad press (e.g. returning an array of strings from a method) but I'm having trouble understanding what the negative impacts are of this. What are the best practices around using mutable objects? Should you avoid them whenever possible?
List all columns for a specified table biblatex: change name of author according to language? Usually a name stays the same in whatever language. So, whenever I quote a work by Knuth -- be it in an English article or a German one -- I will quote him as Donald E. Knuth.  This is not always the case with ancient or medieval names. They are spelled differently in different languages. Two examples in English | German | French:   Aristotle | Aristoteles | Aristote Thomas Aquinas | Thomas von Aquin | Thomas d'Aquin   This means that when I write an English article, I need a bib-file that contains the English names, but when I want to write a German article, I need to go through my bib file and change the names accordingly. Depending on how often I in fact publish in English or German this could keep me busy and is prone to error.  So, I though, maybe I could have the different names already included in one single bib-file and let biblatex choose the correct name according to the primary language used in the document. Any ideas?  NB: I do not want to use in one single document both spellings Aristotle and Aristoteles (as the following MWE might make you think). Of course, if the article's primary language is English, then all the references to Aristotle will use the English spelling of his name. However, I want to be able to write articles in different languages, without (a) having to edit my bib-files each time or (b) generally maintaing not one single bib-file but two different ones, one for each language, or (c) having two distinct entries in one bib-file  MWE  % !TEX TS-program = lualatexmk \documentclass{scrartcl}  \usepackage{fontspec}         \setmainfont[Ligatures=TeX]{Times New Roman}  \usepackage[ngerman, british]{babel} \usepackage[babel]{csquotes} \usepackage[style=verbose,abbreviate=false,backend=biber]{biblatex}  \usepackage{filecontents}  \begin{filecontents}{\jobname.bib} @book{aristotle:ross:1924,     Author = {Aristotle},    % It is here, I think, that something could be done, e.g., ...     Title = {Metaphysics},     % ... british=Aristotle,ngerman=Aristoteles,french=Aristote     Editor = {William David Ross},     Commentator = {William David Ross},     Introduction = {William David Ross},     Hyphenation = {british},     Location = {Oxford},     Publisher = {Clarendon Press},     Volumes = {2},     Year = {1924}} \end{filecontents}  \addbibresource{\jobname.bib}  \begin{document}  \selectlanguage{british} Some English text.\footcite{aristotle:ross:1924}  \selectlanguage{ngerman} Etwas Text auf Deutsch.\footcite{aristotle:ross:1924}  \end{document} Suppress "In:" biblatex Why does changing a copy of an argument change the argument? Proving that a normal, abelian subgroup of G is in the center of G if |G/N| and |Aut(N)| are relatively prime. Share Wireless connection with Wired Ethernet Port Wasn't the density of the universe at the moment after the Big Bang so great as to create a black hole? If the answer is that the universe/space-time can expand anyway what does it imply about what our universe looks like from the outside? More section headings? I am a novice in LaTeX and I have one question.  Can someone tell me what if you want more heading's in LaTeX. Like 5 or 10 or even 15. Is there a package for that? Dealing with bundle/omnibus/list-of-questions question that consists of rather distinct questions I have looked at the various help pages but I couldn't find a clear guideline for the following issue: often enough someone will ask in the same post (i.e. in the same SE-question) a whole bunch of questions (in the plain English sense of the word), which while may be about the same topic are nevertheless sufficiently distinct that each may require several paragraphs of text to answer adequately.   I can see an upside for leaving related questions grouped together from the asker's perspective: "there's a thread (on SE) answering all my questions about topic T!" On the other hand, from the perspective of organizing questions by having a clear heading/title for each (actual) question and so forth, i.e. from the perspective of SE being a fairly structured database of Q&amp;As instead of being a more like a collection of forum threads "I'm confused about topic T", the omnibus question-list approach seems clearly sub-optimal.  The omnibus approach also makes the issue of accepting answers (and perhaps reviewing such actions) difficult: if two different users give replies to different parts/sub-sets of the question-list, which one is the most adequate one? Even upvoting all partial answers seems iffy because it actually penalizes the user(s) who provides(s) the most complete answer to the question-list: since a user can only give at most one upvote to another user's answer, if user X provides answers to A &amp; B in the same SE-answer, he can only get at most one upvote from user Y, whereas if these were two different SE-answers, he could get two upvotes from user Y.  So, given the above problems, which I think are real enough, is there anything in the SE system addressing list-of-questions question splitting? I a chat discussion it was suggested that \hspace*{\fill} (with a space before it to allow for a line break) was sufficient to always get the text following aligned to the right. And indeed, it is aligned to the right.    However, in one case it is inserting an additional line  break where one should not be required as illustrated by the last example here.  I want the text bumped to the next line if and only if (iff ) there is no room:    If I remove the space before the \hspace*{\fill}, there are cases (second and third) where a new line should have been inserted but is not:    Related Question:      I have tried the suggestions at the related question and:   Martin Scharrer's suggestion of using \hbox{}\hfill results in the text being on the left for the last case. Herbert's \When macro exhibits a similar problem for the last case. Thorsten Donig's \signed macro does yield the correct number of lines, but portions of the file name for the middle two cases show up on the second line when they easily fit in the first line.     Notes:  I believe that this is unrelated to the problem, as I was able to reproduce the problem without it.  But, am mentioning it here in case it causes an issue with the proposed solution.  I am using \texttt for the file name. This resulted in an additional complication which I initially thought was the cause of the problem.  So, my actual use case is commented out below and it incorporates a solution from        Code:  \documentclass{article} \usepackage[paperwidth=7.0cm,showframe]{geometry} \usepackage{xcolor} \usepackage{xparse}   \newcommand*{\FillLine}[2]{% \noindent\parbox{\linewidth}{%     \raggedright     File:~#2 % &lt;-- Need space here     %Space before \hspace* allows for a break before it     \hspace*{\fill}\texttt{\small CONFIDENTIAL}%  }% }  %\newcommand*{\EnableHyphenationInTexttt}{\hyphenchar\font=45\relax} % %\newcommand*{\FillLine}[2]{% %    \noindent\parbox{\linewidth}{% %       \raggedright %       File:~\texttt{\EnableHyphenationInTexttt#2} % &lt;-- Need space here %       %Space before \hspace* allows for a break before it %       \hspace*{\fill}\texttt{\small CONFIDENTIAL}%  %    }% %}  \begin{document} \FillLine{Name}{Value}  \bigskip \FillLine{Name}{A-Long-Value}  \bigskip \FillLine{Name}{iiiiiii-iiiii-iiiiiii}  \bigskip \FillLine{Name}{Some-Really-Really-Long-Value} \end{document} I've seen the full proof of the Triangle Inequality  \begin{equation*} |x+y|\le|x|+|y|.  \end{equation*} However, I haven't seen the proof of the reverse triangle inequality:  \begin{equation*} ||x|-|y||\le|x-y|. \end{equation*} Would you please prove this using only the Triangle Inequality above?  Thank you very much. $n!+1$ being a perfect square Sleeping in a batch file When writing a batch file to automate something on a Windows box, I've needed to pause its execution for several seconds (usually in a test/wait loop, waiting for a process to start). At the time, the best solution I could find uses ping (I kid you not) to achieve the desired effect. I've found a better write-up of it , which describes a callable "wait.bat", implemented as follows:  @ping 127.0.0.1 -n 2 -w 1000 &gt; nul @ping 127.0.0.1 -n %1% -w 1000&gt; nul   You can then include calls to wait.bat in your own batch file, passing in the number of seconds to sleep.   (at last!). In the meantime, for those of us still using Windows&nbsp;XP, Windows 2000 or (sadly) , is there a better way?  I modified the sleep.py script in the , so that it defaults to one second if no arguments are passed on the command line:  import time, sys  time.sleep(float(sys.argv[1]) if len(sys.argv) &gt; 1 else 1) I don't understand why the interior of $\mathbb{Q}$ in $\mathbb{R}$ is empty, since, for every ball with the center being a rational number, given an $\epsilon&gt;0$, I can find an infinite sequence of rational numbers that approach this point. For example, take $\frac{1}{2}$. The sequence $\frac{1}{2}+\frac{1}{n}$ can be made as close as I want to the number $\frac{1}{2}$, therefore I can always have open balls with center $\frac{1}{2}$ such that there are rationals inside it. How to accomplish SQL Server 2012+2014 high availability Maybe I'm searching for the wrong thing, but I can't see how I can do this.  I have two servers:   Server A (has SQL Server 2012 installed) Server B (has SQL Server 2014 installed)   Server A provides an API via IIS. The code both inserts and gets data from the database depending on the API call.  Server B does exactly the same for its local database.  I would like to have it so that the two databases are consistent copies of each other. I do believe this is what HA accomplishes.   So a load balancer, for example, might direct API calls to A sometimes, and B sometimes, but the data needs to be consistent either way.  I found some documentation on HA for SQL Server 2012, but not on how to do this for a mixed environment of 2012 and 2014.  Any help or pointers to documentation would be great! Thanks. A question on limsup How do I install Java, including in my browser, so websites with Java work? Testing for linear dependence among the columns of a matrix I have a correlation matrix of security returns whose determinant is zero. (This is a bit surprising since the sample correlation matrix and the corresponding covariance matrix should theoretically be positive definite.)  My hypothesis is that at least one security is linearly dependent on other securities. Is there a function in R that sequentially tests each column a matrix for linear dependence?  For example, one approach would be to build up a correlation matrix one security at a time and calculate the determinant at each step. When the determinant = 0 then stop as you have identified the security who is a linear combination of other securities.  Any other techniques to identify linear dependence in such a matrix are appreciated. Chat flag notification, but no flag It appears  is back. Upon refreshing any chat page (even when dumping the cache and hard reloading), a chat flag notification is displayed, but there is no chat flag. Windows Explorer sort method I'm looking for an algorithm that sorts strings similar to the way files (and folders) are sorted in Windows Explorer. It seems that numeric values in strings are taken into account when sorted which results in something like  name 1, name 2, name 10   instead of  name 1, name 10, name 2   which you get with a regular string comparison.  I was about to start writing this myself but wanted to check if anyone had done this before and was willing to share some code or insights. The way I would approach this would be to add leading zeros to the numeric values in the name before comparing them. This would result in something like  name 00001, name 00010, name 00002   which when sorted with a regular string sort would give me the correct result.  Any ideas?