Why does the following code not work (using VS2013)?  class Test1 { public:   template&lt;typename T&gt;   using my_type = T; };  template&lt;typename T, typename V&gt; class My : public T { public:   using t_type = T;   using my_type2 = t_type::my_type&lt;V&gt;; };  int main() {   const My&lt;Test1, double&gt;::my_type2 x = 5.5;    return 0; }   Test1::my_type would have a more complex type. My would be a policy based class where Test1 would be one of the policies. my_type2 should become a specific type based on the policy. And Test1 can't be a template directly taking the type of V. Thanks.
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?
When I try to launch Minecraft 1.7.4 or newer, the game crashes on startup, and the game output screen says this:  #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=*, pid=*, tid=* # # JRE version: Java™ SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13) # Java VM: Java HotSpot™ Client VM (* mixed mode, sharing windows-* ) # Problematic frame: # C  [ig4dev32.dll+0x3e88] OR # C  [ig4dev64.dll+0x55ec] OR # C  [ig4icd32.dll+0x104a77] OR  # C  [ig4icd64.dll+0x84930a]   This happens with both Java 7 and 8.  What causes this error, and what can I do to fix the issue? What does size of a directory mean in output of 'ls -l' command? What's the difference between "established" and "founded" In this sentence: "CARE was ...... in 1945 to help people after World War II."    A. founded  B. built C. established D. constructed    The answer is C. But why don't we use "founded" in this case, I think they have the same meaning. Can you help me to give a reason for that? Center of a free product Let $A$ and $B$ be two groups and let $G=A*B$ be their free product. Suppose both $A$ and $B$ are nontrivial. I want now to prove that $G$ is infinite and that $Z(G)$ is trivial.  I think I can prove that $G$ is infinite using this argument: two reduced words of $A*B$ are equal if and only if they have the same length and the ith letter of the first word is the same as the ith letter of the second one. Hence one can find a reduced word of $G$ of length arbitrarily big (since we are sure it won't be equal to a shorter word). Do you think it works? Has anyone another suggestion?  On the other hand, I don't really have a clue for the second part except trying to analyze a long list of cases of reduced words and prove for each one that the only element with which they commute is the identity. Does anyone have a smarter idea?  Thanks in advance! I'm writing a thesis which is an aggregate of separate articles. I have the source code for the articles and I'm using \include to include them in the main document of the thesis. So in my main.tex (thesis document), I have  \include{article1} some pages in between the two articles \include{article2}   The problem that I'm getting is with the Appendix sections. In article 1, I have at the end:  \appendix \numberwithin{equation}{section} \section{Coefficients}\label{sec:Coeffic} \subsection{Good coefficients} then comes the first line of appendix   This gives in article 1 (when  compiled separately with the article class):     A. Coefficients      A.1. Good coefficients   and equation numbers in the Appendix A as (A.1), (A.2)  which is ok and what is expected.  When I put article 1 within main.tex, I use \include command. Also, I removed the document class for article 1 and put \chapter instead.  But when I compile main.tex (the thesis document), I get the appendix sections as:     .1 Coefficients      .1.1 Good coefficients   and the equation numbers in the appendix A as (.1.1), (.1.2) etc  My article 1 is treated as a chapter in the main thesis document (main.tex) and the title and section numbers, equation numbers are preceded by A in main.tex. This is what I want.  Maybe it would be ok to get the appendix in my main.tex as     A.A. Coefficients      A.A.1 Good coefficients   and the equation numbers in the Appendix as (A.A.1), (A.A.2) etc  to denote that it refers to appendix A of paper A. First A is for the first article and second A is for first appendix. How to get this? Decode HTML entities in Python string? General closed form of $\int_{0}^{\theta_0} \frac{1}{\sqrt{\cos \theta-\cos \theta_0}} d\theta$ I once asked a  about how to integrate the reciprocal of the square root of cosine.  Is  there a general closed form for the integral $$\int_{0}^{\theta_0} \frac{1}{\sqrt{\cos \theta-\cos \theta_0}} d\theta$$   in terms of the gamma function?  Thank you. My question is in the title. I'm a little lost in how to solve this problem. There is a hint associated with the problem that states the following:   Use a line integral to show that $ |f(z)| \leq A + |z| $ where A = $\max\{1, |f(0)|\}$  Thanks for the help. Proof of relation between divided difference and interpolation polynomial coefficient Given data points $\{(x_i,f(x_i)\}_{i=0}^{m}$, if we define divided difference recursively as: $$f[x_0,\cdots,x_{k+1}] = \frac{f[x_1,\cdots,x_{k+1}]-f[x_0,\cdots,x_k]}{x_{k+1}-x_0} \text{ with the definition that} f[x_0] = f(x_0)$$ then it is true that the unique interpolating polynomial $L_m(x)$ of degree $m$ such that $L_m(x_i) = f(x_i)$ for all $i = 0\cdots m$ is given by: $$ L_m(x) = \sum_{k=0}^mf[x_0,\cdots,x_k]\omega_k(x), \text{ where } \omega_k(x) = \prod_{i=0}^{k-1}(x-x_i). $$ The question asks to show this. That is, show the coefficients of the interpolating polynomial of degree $m$ in the basis $\{\omega_k\}_{k=0}^{m}$ is exactly $a_k = f[x_0,\cdots,x_k]$, the divided differences. To tackle this problem, I've attempted to use induction. The base step is trivial as $a_0 = f(x_0)$, but I am stuck on the inductive step. I supposed the degree $m$ interpolating polynomial of some data $\{(x_i,f(x_i)\}_{i=0}^{m}$ is indeed given by: $$ L_m(x) = \sum_{k=0}^mf[x_0,\cdots,x_k]\omega_k(x) $$ and I want to argue that $L_{m+1}(x) = \sum_{k=0}^{m+1}f[x_0,\cdots,x_k]\omega_k(x)$ is the interpolating polynomial of degree $m+1$ interpolating $\{(x_i,f(x_i)\}_{i=0}^{m+1}$, with any additional point $(x_{m+1},f(x_{m+1}))$ added. Clearly, $L_{m+1}(x)$ interpolates $\{(x_i,f(x_i)\}_{i=0}^{m}$ by definition of the $\omega_k$'s, but I am stuck at showing $L_{m+1}(x_{m+1}) = f(x_{m+1})$. Hints will be extremely appreciated! How to add a browser tab icon (favicon) for a website? Whenever I try to install anything with the Ubuntu Software Center, the following error appears.     Failed to download repository information      Check your Internet connection.      E:Unable to parse package file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_multiverse_i18n_Index (1) Proving an inequality by induction, how to figure out intermediate inductive steps? I'm working on proving the following statement using induction:  $$ \sum_{r=1}^n \frac{1}{r^2} \le \frac{2n}{n+1} $$  Fair enough. I'll start with the basis step:  Basis Step: (n=1) $$ \sum_{r=1}^n \frac{1}{r^2} \le \frac{2n}{n+1} $$ $$ \frac{1}{1^2} \le \frac{2}{1+1} $$ $$ 1 \le 1  \checkmark  $$  Inductive Step: $$ \sum_{r=1}^{n+1} \frac{1}{r^2} \le \frac{2(n+1)}{(n+1)+1} $$ $$ \sum_{r=1}^{n+1} \frac{1}{r^2} \le \frac{2(n+1)}{n+2} $$  My goal is to prove $\forall_{n\ge1} s(n) \implies s(n+1) $ or that this inequality holds true for all $n\ge1$.  I'm not quite sure to go from here on the inductive step. I understand that I need to basically work some clever substitution and manipulation into the problem to end up with: $$ \sum_{r=1}^{n+1} \frac{1}{r^2} \le \frac{2n}{n+1} $$  However, I'm not quite sure what needs to done to obtain this after attempting a few times. How to open a web page from my application? I want to show the IP address like below  lo : 127.0.0.1  eth0 : 192.168.5.123 eth1 : 192.172.0.212 wlan0 : 10.1.0.124   I'm able to print all IP address by ifconfig | awk '/inet addr/{print substr($2,6)}'. But it is only printing the IPs. Every system have their own interface names and addresses. So my script has to show their interfaces with respect to IP addresses. If you are falling, can you Misty Step to the ground to avoid damage? If I fall off a cliff - say, 1000 feet - can I wait (readied action?) until I am near enough to the ground (my understanding is you fall 500 ft/round) then  safely to the ground? Or, does the momentum from the fall carry over through the teleport and I still splatter across the rocks? Regular expression: match start or whitespace Method defined as testMethod do not support web service callouts, test skipped How many $m\times n$ tables are there if they are subject to the following two conditions?    In each cell of the table we have $1$ or $-1$. The product of all the cells in any given row and the product of all cells in any given column equals $-1$.    I already know if Parity of $m$ and $n$ are different there is no such a table. what is the answer in general? Install 0bda:f179 Realtek Semiconductor Corp. (rtl8188fu), or Netgear rtl8812au USB WiFi adapters he became firm friend or friends?