How to Create All Permutations of Variables from a Variable Number of STL Vectors
Generate all combinations from multiple lists
Let us assume a shared ownership house, where everything is 50/50 in terms of deposit, monthly payments, bills, and eventually estate agent costs, and lawyer costs when the house is sold.  If the mortgage is over 25 years and for the first 5 years both owners live in the house and split everything 50/50, how do the calculations and ownership percentages change if one of the owners decides to move on and rent elsewhere, leaving the other owner to pay 100% of the mortgage bills etc etc?  After the 25 years, do both owners still get 50/50 when the house is sold? How to add greek polytonic with setxkbmap I want to add greek polytonic keyboard layout under Lubuntu (so in LXDE). I already realized there is no easy tool to do it with the graphic interface, so I need to use setxkbmap executing something the like of:  setxkbmap pl,gr   Now, how to make setxkbmap set the greek polytonic variant? Profitable strategy in coin tossing? Is there a difference between them? If so, how and when are they used?  For example:     I fixed a little/small typo. Roots of a functionwith condition $\int_0^\pi f(x) \sin x dx = \int_0^\pi f(x) \cos x dx =0.$ Let $f:[0,\pi] \rightarrow \Bbb R$ be a continuous function which satisfies $\int_0^\pi f(x) \sin x dx = \int_0^\pi f(x) \cos x dx =0.$ Show that $f$ has at least two roots. How to find out why "context is incorrect"? Modular Arithmetic - Find the Square Root Figure refs stop working after I added a new counter I was using the amspset document class for generating exam practice problems. I had wanted to add some referencing to the problems so I started a new counter like this (adapted from some Tex Exchange post)  \newcounter{P} \newcommand{\plb}[1]{\refstepcounter{P}\label{#1} \textbf{P-\ref{#1}.}}  \begin{problem} \plb{p1} A parallel-wire transmission line is constructed of \#6 AWG copper wire (diameter $d=0.162$ in., conductivity $\sigma_c=5.8\times 10^7$ S/m) with a 12-inch separation in air. Assuming no leakage between the two wires, find $R'$, $L'$, $G'$, and $C'$. Assume a working frequency of 1 MHz. \end{problem}  \begin{solution} Using Table.~\ref{tab:tlparam} and Fig.~\ref{fig:tlempl},  \[ Rs = \sqrt{\pi f \mu_c/\sigma_c} = 2.61\times10^{-4}~ \Omega\] \[ R' = \frac{2R_s}{\pi d} = 4.04\times10^{-2} ~\Omega\text{/m} \] \[ L' = \frac{\mu_0}{\pi} \ln{\frac{2D}{d}}=2.0~\mu \text{H/m} \] \[ C' = \frac{\pi \epsilon}{\displaystyle\ln{\frac{2D}{d}}}=5.56 ~\text{pF/m} \] $G'=0$ because the problem states that there is no leakage between the two wires. \end{solution}  \begin{figure}[ht] \begin{centering}     \includegraphics{fig24}     \caption{(Fig.2-4 from FAE) A few examples of transmission lines.} \end{centering} \label{fig:tlempl} \end{figure}  \begin{table}[ht] \caption{(Table 2-1 from FAE)Transmission-line parameters $R'$, $L'$, $G'$, and $C'$ for three types of lines.}     \begin{tabular}{c}         \hspace{3cm}\includegraphics{tb21}     \end{tabular} \label{tab:tlparam} \end{table} ... and more   Now all the figure references stop working, I get "Fig. " instead of "Fig. 1". The table references are alright though. Any idea what the problem could be? The Maximum possible order for an element $S_n$ When a user who approved an edit is removed, an incorrect "-2 reverted" event appears in reputation history I am aware that . But now there is an extraneous "reverted" event to go along with user removal:     Source: .   The edit was not reverted, it's . In any case, I should not lose 2 points twice for the total of -4. And indeed, my reputation only dropped from 131 to 129 despite what the history suggests.   So the line with "-2 reverted" is a bug.     A more extreme example:  got 21 "reverted" events on 2017-06-30, none of which should be there. His rep loss is 42, not 84 as the reputation history says. Emacs: How to use a major mode for non-standard file extension Proof of a basic $AC_\omega$ equivalence On  it is mentioned that "...  in order to prove that every accumulation point $x$ of a set $S\subseteq \mathbf R$ is the limit of some sequence of elements of $S\setminus \{x\}$, one uses (a weak form of) the axiom of countable choice. When formulated for accumulation points of arbitrary metric spaces, the statement becomes equivalent to $AC_\omega$. ..."  I have Herrlich's paper "Choice principles in elementary topology and analysis" where in theorem 2.4. it is stated that these are indeed equivalent. Then I looked up the reference he quotes, [4], which are Bentley H.L., Herrlich H., Countable choice and pseudometric spaces which does not contain the proof and  does also not contain the proof, hence my question:   Where can I see a proof of      "if $S$ is a set in a metric space $X$ with accumulation point $s$   then there exists a sequence $s_n$ in $S$ converging to $s$"   $\implies$ $AC_\omega$   ? (the other implication is clear to me). Thanks. mean value theorem question I was trying to solve the following:  Given: $0 &lt; a &lt; b$ and $n&gt;1$, prove: $$na^{n-1}(b-a) &lt; b^n-a^n &lt; nb^{n-1}(b-a)$$  I managed to get this far using the mean value theorem: $$a^n(b-a)&lt;b^n -a^n&lt;b^n (b-a)$$ Any idea how to continue? Prove that for every positive integer $n$, $1/1^2+1/2^2+1/3^2+\cdots+1/n^2\le2-1/n$ Is there a more accurate way to create a Javascript timer than setTimeout? Something that has always bugged me is how unpredictable the setTimeout() method in Javascript is.  In my experience, the timer is horribly inaccurate in a lot of situations. By inaccurate, I mean the actual delay time seems to vary by 250-500ms more or less. Although this isn't a huge amount of time, when using it to hide/show UI elements the time can be visibly noticeable.  Are there any tricks that can be done to ensure that setTimeout() performs accurately (without resorting to an external API) or is this a lost cause? Element of, subset of and empty sets Why $SU(3)$ and not $U(3)$? Is there a good reason not to pick $U(3)$ as the colour group? Is there any experiment or intrinsic reason that would ruled out $U(3)$ as colour group instead? I'm new to Delphi, and I've been running some tests to see what object variables and stack variables are initialized to by default:  TInstanceVariables = class   fBoolean: boolean; // always starts off as false   fInteger: integer; // always starts off as zero   fObject: TObject; // always starts off as nil end;   This is the behaviour I'm used to from other languages, but I'm wondering if it's safe to rely on it in Delphi?  For example, I'm wondering if it might depend on a compiler setting, or perhaps work differently on different machines.  Is it normal to rely on default initialized values for objects, or do you explicitly set all instance variables in the constructor?  As for stack (procedure-level) variables, my tests are showing that unitialized booleans are true, unitialized integers are 2129993264, and uninialized objects are just invalid pointers (i.e. not nil).  I'm guessing the norm is to always set procedure-level variables before accessing them? Add folder to PATH How to add something to PATH ? I have added like   PATH=$PATH:/home/example export PATH   and it works until I restart , after that when  I type env in PATH there is no /home/example. Why can rm remove read-only files?