I ran into a code yesterday, like this: #include &lt;stdio.h&gt; using namespace std;  class test { public:     test()     {         printf(&quot;This is test's construct\n&quot;);     }      ~test()     {         printf(&quot;This is test's destroy\n&quot;);     } };  int main() {     test t(); // no output     return 0; }  when I run this program, no output But if I change test t();  into test t;  the output is as follows This is test's construct This is test's destroy  So I want to ask why the first example has no output?
Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?
How can I prove that the additive group of rationals is not isomorphic to a direct product of two nontrivial groups? I am working through Paolo Aluffi's new GSM text on my own (self-study). On page 63, he asks the reader to     Prove that $\Bbb{Q}$ is not the direct product of two nontrivial groups.   For some context, this is an exercise following a section entitled "The category Grp".  I am assuming that he means "is not isomorphic to the direct product of two nontrivial groups", and I can see two possible ways to proceed with this proof, but have been unsuccessful with either approach.    Approach 1:  Show that the additive group of rationals has a property that is preserved by isomorphism that the direct product of two nontrivial groups does not have or vice-versa.  This seems challenging unless I can significantly narrow down the properties that a direct product of two nontrivial groups that was isomorphic to $\Bbb{Q}$ would necessarily have.  Approach 2:  Considering the section in which this question occurs, show that if $G$ and $H$ are nontrivial groups and $\Bbb{Q} \cong G \times H$, then there are homomorphisms $\varphi_{G}:\Bbb{Q} \rightarrow G$ and $\varphi_{H}:\Bbb{Q} \rightarrow H$ which do not factor or do not factor uniquely through the product $G \times H$.  This would be a contradiction, as $G \times H$ is a final object in the category Grp.  I would greatly appreciate suggestions on how to proceed further with either of these approaches or with alternate approaches. What's a word like "disregard" or "bypass" that means "hides"? A Basic Question about Gravity, Inertia or Momentum or something along those lines Why is it that if I'm sitting on a seat on a bus or train and its moving quite fast, I am able to throw something in the air and easily catch it? Why is it that I haven't moved 'past' the thing during the time its travelling up and down? Show that $\lim_{x \to +\infty}\left(f(x)+f'(x)\right)=0 \Rightarrow \lim_{x \to +\infty} f(x)=0$ How to show that $\lim_{x \to +\infty}(f(x)+f'(x))=0 $ implies $\lim_{x \to +\infty} f(x)=0$? the slash (/) after a directory name on shell commands I have a little question here.  If I have two files, say filea and fileb, mv filea fileb would   delete fileb rename filea to fileb   Then if I have two directories, say dira and dirb, mv dira dirb would   move dira into dirb (it will become dirb/dira)   Noting that in both cases there are no notice or message, then this is pretty inconsistent to me. I think mv dira dirb should just overwrite dirb with the contents of dira (or merge the two directories under a directory named dirb).  I remember reading somewhere that a directory name with a slash (like dira/) is treated like a directory, and name with no slash (like dira) is treated like a file (to certain extents, of course). Anyway now I want to make the shell (zsh and possibly bash) respect my notation of a directory by using a slash. Is there a terminal option which enable me to enforce that?  To clarify, here is my desired behaviour:   mv dira dirb results in dirb being overwritten with the contents of dira mv dira dirb/ results in dira being moved into dirb (in dirb/dira)   Has anyone thought the same way as me? Or am I just weird? Find $ \lim\limits_{ x\to 100 } \dfrac { 10-\sqrt { x } }{ x-100 }$  (without using a calculator and other machines...?) Force.com IDE 35.0.0.201510211056 and Force.com IDE Debugger 35.0.0.201510211056 in eclipse but it doesn't show this option to run test class, is their any way i can see it because it show the Apex_Test_Result panel but running a test class option is missing. plz help How do I configure internet connection for Terminal on Ubuntu 14.04? I've installed on Ubuntu 14.04 and with I've Broadband connection setup, Browser connection is OK,  but Terminal not connection via internet, when command type "sudo apt-get update" by terminal then showing me Error, see screenshot, How I can fix this ? The interval [0,1] andd [3,5] are equivalent. Is my proof correct? How should ip2long converted IP's be stored in MySQL? How can I install a Canon printer or scanner driver? I tried to install the MP190 drivers, but appeared a message show me that requires to have libcupsys2. I understand that libcup2 is an update of libcupsys2.   How do I solve this? Are there proprietary drivers for my Canon printer or scanner? How to prove the inequality $a_1^{a_1}a_2^{a_2}\cdots a_n^{a_n} > \left(\frac{a_1+\dots+a_n}{n}\right)^{a_1+\dots+a_n}$? If $a_1,\dots,a_n$ are all unequal positive quantities, then prove that: $$\prod_{i=1}^n a_i^{a_i} &gt; \left(\frac{\sum_{i=1}^n a_i}{n}\right)^{\sum_{i=1}^n a_i}$$ No other conditions are given. I tried to solve it using logarithms, but I could not understand how can I prove $${a_1\log a_1}+{a_2 \log a_2}+\dots+{a_n\log a_n} &gt; {(a_1+\dots +a_n)}  \left(\log(a+\dots+a_n)-\log(n)\right)$$ And please tell me, is there any standard method to solve this kind of problems? There are many tutorials that use a pull-up or pull-down resistor in conjunction with a switch to avoid a floating ground, e.g.        Many of these projects use a 10K resistor, merely remarking that it is a good value.  Given a a particular circuit, how do I determine the appropriate value for a pull-down resistor?  Can it be calculated, or is it best determined by experimentation? I created a custom counter 'rtaskno' and a command '\rtask' as following:  \newcounter{rtaskno} \newcommand{\rtask}{%    \stepcounter{rtaskno}%    \thertaskno}   I like to use them as following:  \section{Task \rtask. Blah Blah..}  \section{Task \rtask. Blah Blah..}  \section{Task \rtask. Blah Blah..}  \section{Task \rtask. Blah Blah..}   Later in the text, if I want to cross-reference 'Task 3', how can I do it? Where to put label? I found the below in  web-site:     We use much in questions and negative clauses to talk about degrees of something.      We don’t use much in affirmative clauses.   Also, it the same web-site, I found the following:     She runs much faster than he does.    also I noticed that some web-sites use much with affirmative clauses:     May we all be having this much fun and getting this much exercise when we're his age!    Is it Okey to use much in affirmative clauses? If yes, when can we use it? and what is the rules?  Update:  Here is another example on how often the word "much" is used  in informal style:     After much consideration I will NOT be performing at the Inauguration with my improv group Capitol Hill-arious How to measure capacitance without LC meter? I would like to use capacitors salvaged from old electronics, but I currently don't have an LC meter.    What would be some really simple circuits, that would convert capacitance to something I can measure (voltage, current, frequency)? Commutator Subgroup of Direct Product equals the Direct Product of the Commutator Subgroups I need to prove that $(G_{1}\times G_{2})^{\prime} = G_{1}^{\prime} \times G_{2}^{\prime}$, where $G^{\prime}$ denotes the commutator subgroup of $G$ - i.e., $G^{\prime}=[G,G]$, the subgroup generated by all commutators of elements of $G$.   Recall that the commutator of two elements $x$ and $y$ in a group $G$, denoted $[x,y]$ is defined to equal $x^{-1}y^{-1}xy$.  I have posted my proof as an answer below. Could somebody please take a look at it and let me know if it's okay? If not, please let me know what I need to do in order to fix it. Thank you. :)    Edit: I have been informed that my answer given below actually shows only equality of the set of commutators, and that $G^{\prime}$ consists of products of commutators. So, this question is no longer a proof check, but I am asking specifically how to fix what I have written below in order to make it actually answer the thing I set out to prove. I am having a bit of trouble understanding some of the hints given me thus far, and am going to need more detail in any answers given in order for them to be helpful. Short story with spaceship and humanity not realising they should be on it The plot is about:   A spaceship travelling through the universe Earth is a rogue planet whose inhabitants have been cut off and don't realise that their true purpose is to be part of the spaceship   The reason earth was in turmoil (wars etc.) was that they didn't realise that their true role was to fit into the ship  The ship contained 3 or 4 beings that made the thing work Planets throughout the universe are populated with the various beings which are components of the space craft   I seem to remember like an eye shaped being Each of them fulfil their role Humans are part of that as well.  There are loads of planets with humans on but earth has gotten overlooked so it never realised that's what they were designed for The story concludes with the ships picking up someone from Earth   and with the "human" realising that this is what they should really be doing  Humans have a different name that explains their role in the ship.   I probably read it around 30 years ago in English in a sci-fi collection book. Number of zero digits in factorials Here is a riddle someone has been asked in a job interview: How many zero digits are there in $100!$?  Well, I found the first $24$ quite fast by counting how many times five divides $100!$ ($5$ divides $20$ times and $25$ divides it $4$ times).   However, there are more zero digits in the middle of the number (these can be found by hand, by typing factorial(100) in sage).  My question is whether there is a smart way to determine the number of zero digits in $100!$, and more generally in $n!$.  By the way, this will not affect the job interview as it was finished some time ago. Showing a Sequence and its Limit are Closed Let $(X, d)$ be a metric space, and $(x_n)_{n \in \mathbb{N}}$ a sequence in $X$, with $x_n \rightarrow x$ w.r.t. $d$ for some $x \in X$. Show that the set $\{x_n : n \in \mathbb{N}\}\cup\{x\}$ is closed in $(X, d)$.   I figured I should use $\overline{F} = F \cup F'$ to show the above set is closed. Let $(x_n)_{n \in \mathbb{N}} = F$. Then, all elements of the sequence are in  $F$, which is equal to $\{x_n : n \in \mathbb{N}\}$. Clearly, the sequence (or $F$) has only one accumulation point, $x$. So, $F' = \{x\}$. This shows $\{x_n : n \in \mathbb{N}\}\cup\{x\} = \overline{F}$, and thus is closed.  Is this sufficient in proving the problem? Or would I have to show that $x$ is the only accumulation point as well (figured I don't have to because we know limits are unique)? Any advice would be very helpful. Thank you.