One of the motivations behind requiring C++ programmers to put the typename keyword before accessing a type nested inside a templatized type was to prevent ambiguity in templates. For example, consider the following code, which assumes the existence of a template type called MyTemplate:  template &lt;typename T&gt; void MyFunction(const T&amp; elem) {     int itr;     while(true)     {         typename MyTemplate&lt;T&gt;::Inner * itr;     } }   Consider the line           typename MyTemplate&lt;T&gt;::Inner * itr.    Since we have the typename keyword here, the compiler understands that we're declaring a pointer of type MyTemplate::Inner* called itr. If we don't put the  typename  keyword in here, C++ will think that    MyTemplate&lt;T&gt;::Inner  is a class constant rather than a type. What will the statement     MyTemplate&lt;T&gt;::Inner * itr mean in this case? Does the difference between these two cases help explain why the typename keyword is necessary?
In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template &lt;typename T, typename Tail&gt; // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template&lt;typename U&gt; struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion&lt;U&gt; dummy;      };     template&lt; &gt; struct inUnion&lt;T&gt; {     }; }; template &lt;typename T&gt; // For the last node Tn. struct UnionNode&lt;T, void&gt; {     // ...     template&lt;typename U&gt; struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template&lt; &gt; struct inUnion&lt;T&gt; {     }; };   The problem I have is in the typedef Tail::inUnion&lt;U&gt; dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion&lt;U&gt; names a type and not a function?
Where should I put  tags in HTML markup? permission denied for root@localhost for ssh connection I just installed Ubuntu 14.04 and LAMP on that. Then, I wanted to configure my server, so tried out  tutorial.  When I give the command:  ssh root@localhost   I get : Permission denied, please try again. I have logged in as root user through the command :  sudo -i   I also tried the same, by logging in through:  sudo -s   I use the same password as that I used to log in as user, but still am getting the same error message.  Could someone help me out here?  PS: I looked into  but didn't seem to work for me. Deriving of formula for finding the length of median In the below image    $AD$ is the median of $\triangle ABC$  We know that $m_A = \frac 1 2 \sqrt{2b^2 + 2c^2 - a^2} $    But can someone tell me how it's derived !! I am just unable to think of it !!   But I assume it muste be linked with the Appolonius Theorem !! I have an uploaded video and I want to cut sections of audio (strong language) or add beeps on top without reuploading the video. When I can scroll down far enough to have the hot network questions overlap the footer (because my question is short) there is no background under the text:    Could they either be given a white background: (just disable the transparency option)    Or stop at the footer:      This also happens with the help text on some sites, as per this bug report:     Ubuntu 14.04.1 (Latest LTS Version), . Same problem with  and .  Windows 10 Pro,  and .  (Images linked to screenshot of browser)  My question is different from  because my issue is the lack of background on the footer.   I think there was a site redesign? How to *disable* automatic reboots in Windows 10? Windows 10 lets you 'schedule' a reboot for later. I want to disable it.  Evidently Windows scheduled itself for a reboot last night when I wasn't looking and just closed everything I had been working on the night before.  I reboot on the regular; I don't need Windows to do that for me.  Can I disable it completely? I don't mind if it downloads everything, and then says "hey, you should reboot," but it should never reboot itself, ever.  I'm using the "Pro" edition of Windows 10. Can you use your off-handed weapon for your main attack action? My friend is 2 weapon fighting a flesh golem. He has one sword that does lightning damage, and one sword that does fire damage. His right hand holds the lightning sword, and his left hand holds the fire sword.  My friend wants to attack with his left hand because lightning heals the golem. However, the DM says that because his left hand is his left hand, he can't use it as his "main" hand, and only attack with it. Is this rules as written/intended? Where should the period be put when an entire sentence is quoted at the end of a sentence? How to change file encoding in NetBeans? What does `invalid initialization of non-const reference` mean? Ubuntu 13.04 on Mac Mini 6,2 ethernet port Broadcom NetXtreme BCM57766 not detected The said network adapter is not recognized in 13.04. In 12.04 and 12.10 I had used the driver proposed from broadcom download site, configured as dkms package it was always updated.  On the 3.8.x kernels this provided kernel driver from broadcom does not compile anymore - and the distribution provided tg3 drivers does not recognize the ethernet adapter - even though it is a newer version.  ~$ modinfo /lib/modules/3.8.0-19 generic/kernel/drivers/net/ethernet/broadcom/tg3.ko | grep -i version version:        3.128 srcversion:     D737202366709FE01964BF0 vermagic:       3.8.0-19-generic SMP mod_unload modversions    Here the working version on kernel 3.5.x using dkms  ~$ modinfo /lib/modules/3.5.0-25-generic/updates/dkms/tg3.ko | grep version version:        3.124c srcversion:     D01ED9A7BF2C3956E212A63 vermagic:       3.5.0-25-generic SMP mod_unload modversions    The Network card:  ~$ lspci -nn | grep 0200 01:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM57766 Gigabit Ethernet PCIe [14e4:1686] (rev 01)   As found on the i7 Mac Mini 6,2.  Anyone knows where I can get a kernel that recognizes that ethernet device ? That chip is supported somehow ... And - the 3.8.x kernel is way better on the HD4000 chip - reason I use it.  Note - to get the WiFi working, just make sure you load the b43 driver at boot (/etc/modules). At least then you have Network connectivity. I need to show that $$ \int\limits_1^{\infty}x^\alpha\sin(x^\beta)dx $$ converges if and only if $\alpha + 1 &lt; \beta$. I used substitution and integration to get $$ \lim\limits_{t\to\infty}\int\limits_1^tx^\alpha\sin(x^\beta)dx \overset{u = x^\beta}{\underset{du = \beta x^{\beta-1}}{=} }\lim\limits_{t\to\infty}\left(\frac{1}{\beta}\int\limits_1^{t^\beta}u^{\frac{\alpha + 1 - \beta}{\beta}}\sin{u}du\right) $$ If $\alpha + 1 -\beta &lt; 0$, then we have a product if a function with bounded anti-derivative and a differentiable decreasing function which tend to 0, and from Dirichlet's criterion, the integral converges.   For the converse, I used integration by parts $$  = \frac{1}{\beta}\lim\limits_{t\to\infty}\left(\left.-u^{\frac{\alpha + 1-\beta}{\beta}}\cos{u}\right|_1^{t^\beta} + \frac{\alpha+1-\beta}{\beta}\int\limits_1^{t^\beta}u^{\frac{\alpha + 1-2\beta}{\beta}}\cos{u}du\right) $$ For $\alpha + 1 -\beta\geq 0$, I get that the first term indeed diverges, but this is not enough to show total divergence. How can one show it? I make heavy use of screen's "log" command to log the output of a session to a file, when I am making changes in a given environment. I searched through tmux's man page, but couldn't find an equivalent. Is anyone aware of a similar feature in tmux, or do I have to write my own wrapper scripts to do this?  EDIT: I'm aware of 'script' and other utilities that allow me to log a session. The reason that screen's functionality is so useful is the ability to define a logfile variable which uses string escapes to uniquely identify each session.  e.g. I have a shell function which, given a hostname, will SSH to that host in a new screen window and set the window title to the hostname. When I start a log of that session, it is prefixed with the window title.  If this functionality doesn't exist in tmux, I'll have to create a new set of shell functions to set up 'scripts' of sessions I want to log. This isn't hugely difficult, but it may not be worth the effort given that screen does exactly what I need already. Does the Polyjuice Potion Dark Mark work? I was just reading Harry Potter and the Deathly Hallows, and I was wondering, when Hermione Granger changed into Bellatrix Lestrange, she should've obtained the Dark Mark, temporarily.  Now, my question is: would the Dark Mark work if pressed? Conventions for function notation I'm in year 11 right now and I just had a brief discussion with my maths teacher about function notation in trigonometry.  For a test, I wrote this,   sin(50)^2   I assumed that would be interpreted as sin(50)*sin(50)  But I was told the correct notation for this is is  sin^2 (50)   or optionally  (sin (50))^2   I'm curious if that is the 'proper' mathematical convention, or just how things are taught in high schools?  I'm Australian, in case there are some regional differences.  Thanks for the help! I'm currently studying from "Introduction to Electromagnetics" by D.J. Griffiths. In the book the significance of the displacement current term is explained by looking a non-steady capacitor circuit (shown below).  Using the integral equation and balloon-shaped surface, it is said that $I_{enc}=0$ but $\int \partial\vec{E}/\partial t \cdot d\vec{a}=I/\epsilon_0$. This statement makes sense to me - there is no physical current flowing between the plates but there is a changing electric flux through the balloon surface.  My misunderstanding is with the flat Amperian loop surface where it is mentioned that $\vec{E}=0$ and $I_{enc}=I$ in this case. Obviously there is a current flow $I_{enc}$ in the Amperian loop, but why is $\vec{E}=0$? Just looking at the equations directly, I would have thought there would be a combination of both current terms (including displacement current due to changing electric field in the wire) in a capacitor charging/discharging situation.  I've attempted to seek other explanations on this from other texts,  and elsewhere in this stackexchange site, but this has made me more confused. Clarification on this would be appreciated.     Differential form of Ampere's-Maxwell's equation: $$\nabla \times \vec{B}=\mu_0\vec{J}+\mu_0\epsilon_0\frac{\partial \vec{E}}{\partial t}$$  Integral form of Ampere's-Maxwell's equation: $$ \oint\vec{B}\cdot d\vec{l} = \mu_0I_{enc}+\mu_0\epsilon_0 \int \frac{\partial \vec{E}}{\partial t} \cdot d\vec{a} $$ What is the best way to explain how to choose between "its" and "it's"? Probably one of the most frequent grammar mistakes in the English language is:     The dog sat on it's mat.   Since spelling checkers don't catch it, and it is even logical, since you would correctly write:     The dog sat on Fluffy's mat.   What is the best way to explain to a learner of English how to choose between it's and its? How do I remotely wake my Mac over Wi-Fi? The API Sandbox This is the same concept as .  Why do we need more than one? this is in order to test the API, some methods support vectored ids (for example /questions/id1;id2/comments) and for that two sandboxes are needed. What is the difference between a neural network and a deep neural network, and why do the deep ones work better? I haven't seen the question stated precisely in these terms, and this is why I make a new question.  What I am interested in knowing is not the definition of a neural network, but understanding the actual difference with a deep neural network.  For more context: I know what a neural network is and how backpropagation works. I know that a DNN must have multiple hidden layers. However, 10 years ago in class I learned that having several layers or one layer (not counting the input and output layers) was equivalent in terms of the functions a neural network is able to represent (see Cybenko's ), and that having more layers made it more complex to analyse without gain in performance. Obviously, that is not the case anymore.  I suppose, maybe wrongly, that the differences are in terms of training algorithm and properties rather than structure, and therefore I would really appreciate if the answer could underline the reasons that made the move to DNN possible (e.g. mathematical proof or randomly playing with networks?) and desirable (e.g. speed of convergence?)