Testing private class member in C++ without friend
How do I test a private function or a class that has private methods, fields or inner classes?
I'm having difficulty solving an exercise in my course.  The question is:      Prove that $n!\geq 2^n$.   We have to do this by induction. I started like this:   The lowest natural number where the assumption is correct is $4$ as: $4! \geq 2^4 \iff 24 \ge 16$. The assumption is: $n! \ge 2^n$.   Now proof for $(n+1)$ which brings me to: $(n+1)! \ge 2^{(n+1)}$  I think I can rewrite it somehow like this:  $$ {(n+1)} \times {n!}  \stackrel{\text{(definition of factorial)}}{\ge} 2^n \times 2 $$  $$ (n+1) \times 2^n \ge 2^n \times 2 $$  Then I think I can eliminate the $2^n$ and have something like this: $n+1 \ge 2$, or $n \ge 1$.  But I think I'm wrong here some where and was hoping somebody has some advice on this. How can I prove the above assumption?  Any help would be appreciated, kind regards. What is the scientific name of this evergreen plant? This plant is found in India. It is an evergreen plant. Would love to know the scientific name. Is there a difference between installing an application via Ubuntu Software Center or a terminal? Does anyone know if there's a way to get an Android phone to reboot into recovery mode, from the Android command line?  Note:  I do NOT have adb access.  I do NOT know the magic power-on sequence to do it from the boot loader. I've tried the common things and nothing works.  I DO have root. (And can enter commands directly on the device using a terminal emulator.)  I know it's possible, somehow, because applications like ROM Manager do it. But how? How many square meters "twenty feet square" is? One would assume it to be about 2 square meters, but this is obviously not the case. In fact, I'm reading Illium by Dan Simmons. A quote follows:     Much like the room they had faxed into, this space was windowless and about twenty feet square. But unlike the other room, this one was warm, lighted, and free of snow or ice. And unlike the other room, this one was almost filled with an oval metal machine about fifteen feet long.   By this description, "twenty feet square" seems to mean 20x20 feet aka 400 square feet or 40 square meters. Given that Dan Simmons is a renowned American writer, it's not likely that he just can't speak English correctly. So, who's right and who's wrong here? How to check iOS version? How to reinstall default packages In an attempt to uninstall wine I ran the command sudo apt-get purge wine* which as you may have guessed removed many of the default packages. I am wondering if there is a way to use the installation disk to reinstall the default packages without overwriting the file system. Not sure if it makes a difference or not, but I am duel booting Windows 8 and Ubuntu 14.04 which was updated from Ubuntu 12.04.  Thanks in advance. Give the "some of your recent flags have been declined" banner some room The "some of your recent flags have been declined" message recently got a banner, which makes it stand out  more (which is nice) but it touches the 'Flag' button, which is less nice. Can it have some margin at the bottom (and perhaps less padding?)    Tested in the latest Safari and Firefox on macOS Catalina. After my lie down, I posted  on SO. As I suspected would happen, it got moved to programmers. Unfortunately, the kind of people I'm interested in getting answers from (litb,skeet et al - the top SO programmers in their respective disciplines) don't frequent Programmers much. So my question is, where to ask somewhat non-specific questions of high-powered users? If I use a program such as SpeedFan to keep my fans at 100% power 24/7, will it harm my computer? I don't care about my power bill but if the excess power could harm my computer I would worry. I have a 350 watt power supply so I don't think the excess power usage will harm it. Here's what I think:  Pros   Things it cools off are kept cooler Cooler parts = faster computer Cooler parts = slower fail rate   Cons   It just sounds wrong. I know this sounds dumb but still Most fans are designed to do their job already I'm either gaming or just browsing the web. Obviously gaming while keeping the fans on can be beneficial but my computer doesn't get very hot while browsing the internet. When lecturing about conservation of energy in the 1960s, Richard Feynman remarked:     It is important to realize that in physics today, we have no knowledge of what energy is. We do not have a picture that energy comes in little blobs of a definite amount. It is not that way. However, there are formulas for calculating some numerical quantity, and when we add it all together it gives “28” —always the same number. It is an abstract thing in that it does not tell us the mechanism or the reasons for the various formulas.    50 some years later, have we made any progress in terms of understanding the fundamental nature of what energy is? Why do the Localization of a Ring This question may be a bit vague, but neverthless, i would like to see an answer. Wikipedia tells me that:   In abstract algebra, localization is a systematic method of adding multiplicative inverses to a ring.   It is clear that for integral domains, we have the Field of Fractions, and we work on it. It's obvious that a Field has multiplicative inverses. Now if we consider any arbitrary ring $R$, by the definition of localization, it means that we are adding multiplicative inverses to $R$ thereby wanting $R$ to be a division ring or a field. My question, why is it so important to look at this concept of Localization. Or how would the theory look like if we never had the concept of Localization. Two column float with [t] using the cas-dc template I am using the cas-dc template for Elsevier. When trying to use \begin{figure*}[t], except I get the error 'The module 'cas/fig' does not have a key called 'cas/fig/t'. Other templates I use work fine. I have included \usepackage{stfloats}. I don't see anything mentioned that strictly forbids it, unless I missed this. Anyone know why? Key '@' (Keycode 49) and key '<' (keycode 94) are inverted on macbookPro keyboard What is the difference between a builtin command and one that is not? Power set of a finite set is finite proof, no cardinality of power set Prove that $\mathcal{P}(A)$ of a finite set $A$ is finite.      I need to prove this without using the cardinality of $\mathcal{P}(A)$.  This is my attempt, which is by induction: $\newcommand{\lbrac}[1]{\left(#1\right)}$ $\newcommand{\sett}[1]{\left\{#1\right\}}$ $\newcommand{\pset}[1]{\mathcal{P}\lbrac{#1}}$ Proof by induction over cardinality.  If $A = \varnothing$, then $\pset{A} = \sett{\varnothing}$, which is finite.  Suppose that for a set $A$ of cardinality $n$, $\pset{A}$ is finite.  Let $A$ be a set of cardinality $n+1$. $A$ is not empty, since it is of cardinality $n+1 &gt; 0$, and therefore pick some $x\in A$. It follows that $A = \lbrac{A-\sett{x}}\cup\sett{x}$. We claim that $$ \pset{A} = \pset{\lbrac{A - \sett{x}}\cup\sett{x}} = \pset{A - \sett{x}}\cup\sett{C | C\in\pset{A}\wedge x\in C} $$ Suppose $B\in\pset{A} = \pset{\lbrac{A-\sett{x}}\cup{x}}$. Then either $x\in B$ or $x\not\in B$. If $x\in B$, then $x\in B \wedge B\in\pset{A}\Rightarrow B\in C$. If $x\not\in B$ then $B\subseteq A - \sett{x}$.  \newline Either way, $B\in \pset{A - \sett{x}}\cup\sett{C | C\in\pset{A}\wedge x\in C}\Rightarrow \pset{A}\subseteq\pset{A - \sett{x}}\cup\sett{C | C\in\pset{A}\wedge x\in C}$.  Suppose $B\in\pset{A - \sett{x}}\cup\sett{C | C\in\pset{A}\wedge x\in C}$. Then either $B\in\pset{A-\sett{x}}$ or $B\in\sett{C | C\in\pset{A}\wedge x\in C}$ (or both).  If $B\in\pset{A-\sett{x}}$, then $B\subseteq(A-\sett{x})\cup\sett{x} = A$, and if $B\in\sett{C | C\in\pset{A}\wedge x\in C}$, then by definition, $B\subseteq A$. Either way, we get that $B\in\pset{A} \Rightarrow \pset{A - \sett{x}}\cup\sett{C | C\in\pset{A}\wedge x\in C} \subseteq \pset{A}$.  Since we have shown both sets are contained in each other, they are equal.  My goal is to now prove that $\sett{C|C\in\pset{A} \wedge x\in C}$ is finite. I didn't manage to do so without non rigorous claims that could also "prove" the main question.  If this set is finite, and by induction hypothesis $\pset{A - \sett{x}}$ is finite, I'll be done.  Any ideas on how to prove $\sett{C|C\in\pset{A} \wedge x\in C}$ is finite? What's the difference between struct and class in .NET? Given sequence of $L-$Lipschitz functions which converges pointwise, prove uniform convergence Let $f_n:[a.b]\rightarrow \mathbb{R}$ be sequence of $L-$Lipschitz functions, that is: $$\forall x,y\in[a,b]: |f_n(x)-f_n(y)|\leq L|x-y|$$   Suppose $f_n \rightarrow f$ pointwise, prove $f_n \rightrightarrows f$   I have all the parts of the puzzle for the proof, and I'm trying to put them all together, I'm using  in my answer.  I would appreciate is you could correct my proof, and if you have an alternative proof, I would be more then happy to see it.  My proof:   Let $\epsilon&gt;0.$  $f_n$ are uniformly continuous on $[a,b]:$  $\tag{1} \exists \delta&gt;0\ \forall x,y\in[a,b]: |f_n(x)-f_n(y)|&lt;\frac{\epsilon}{3}$  $f$ is also $L-$Lipschitz:  $\tag{2} \forall x,y\in[a,b]:|f(x)-f(y)|&lt;L|x-y|=\frac{\epsilon}{3}$  Let us set a partition of $[a,b]$ such as Stephen Montgomery-Smith suggests:     Pick points $x_1,\dots,x_m \in [a,b]$ which are distance   $\frac{\epsilon}{3}$ from each other.        For each $1 \le i \le m$, find a number $N_i$ so that for all $n \ge  N_i$ we have $|f_n(x_i)-f(x_i)| \le \epsilon/3$.   Let $N = \max_{1 \le i \le m} N_i$      Now given any $x \in [a,b]$, pick $1 \le i \le m$ such that $|x-x_i| &lt;\frac{\epsilon}{3L}:  |f_n(x)-f(x)|&lt;\frac{\epsilon}{3} \tag{3}$   $$\begin{align}|f_n(y)-f(y)| &amp;=|f_n(y)-f_n(x)+f_n(x)-f(x)+f(x)-f(y)| \\ &amp;\leq |f_n(y)-f_n(x)| + |f_n(x)-f(x)|+|f(x)-f(y)| \\ &amp;&lt; \frac{\epsilon}{3} + \frac{\epsilon}{3} + \frac{\epsilon}{3} = \epsilon \\\end{align}$$ How do I recover or "undelete" files that I accidentally deleted? I've accidentally deleted some really important files on my machine, and I'm looking to find out how to recover them.  Using the Trash bins "restore" isn't an option, as the files aren't there (mostly likely I wasn't paying attention and permanently deleted them from there).  Is there any way that I can un-delete these files? This is fairly easy.  If I go to https://webserver.com/someurl?a=b, will the someurl?a=b part be protected, or just the contents of the site?