For academic purposes I'm reinventing the wheel a bit and try to write a HAL library. Now in designing it I encountered a compiler error that I do not understand. template&lt; class DRIVER, class PORT, class PIN &gt; class Instance {         Instance(){}     public:           static void set(const bool val)        {          DRIVER::GPIOPeripheral&lt;PORT, PIN&gt;::set(val);        }       // ... };  The idea is that a driver class defines the 'how' and an GPIO class defines the, well, GPIO interface abstraction. The driver class looks something like this: class SOC_xyz  {     SOC_xyz(){};  public:     template&lt;class PORT, class PIN&gt;     class GPIOPeripheral     {         static void set(const bool val){ /* ... */ };     } };  The call in the actual code looks like this: typedef Instance&lt;SOC_t, PORT0_t, PIN0_t&gt; GPIO0_0; GPIO0_0::set(1);  Now the compiler gives me a  error: expected primary-expression before ',' token  for the Instance::set function where the DRIVER::GPIOPeripheral&lt;PORT, PIN&gt; gets called. From my understanding it tries to tell me that the class-template-member addressing part is wrong but this is beyond my C++ knowledge. Is that, what I try to do, even possible?
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?
Comparing two logit or probit curves using a single parameter I've conducted a psychological experiment on the same subject, under two different condition. For each condition I've collected the number of correct and wrong answer for each stimulus (number of trials per stimulus = 10; number of stimulus = 15). From the data collected I fitted a psychometric curve (probit or logit curve), and now I want to compare the results.  Consider subject 1: His answers are collected in the following matrices  **COND_1**     correct cnt   Y  N   1   0 10   2   0 10   3   0 10   4   0 10   5   0 10   6   0 10   7   1  9   8   4  6   9   5  5   10  7  3   11  8  2   12  7  3   13 10  0   14 10  0   15 10  0  **COND_2**     correct cnt   Y  N   1   0 10   2   2  8   3   2  8   4   3  7   5   2  8   6   4  6   7   8  2   8  10  0   9   8  2   10 10  0   11  9  1   12 10  0   13 10  0   14 10  0   15 10  0  COND_1.1 &lt;- matrix(c(0, 2, 2, 3, 2, 4, 8, 10, 8, 10, 9, 10, 10, 10, 10, 10, 8, 8, 7, 8, 6, 2, 0, 2, 0, 1, 0, 0, 0, 0), byrow=F, ncol=2)  COND_1.2 &lt;- matrix(c(0, 0, 0, 0, 0, 0, 1, 4, 5, 7, 8, 7, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 6, 5, 3, 2, 3, 0, 0, 0), byrow=F, ncol=2)  cnt &lt;- seq(from=0, to=1.4, by=0.1)  ddprob.1.1 &lt;- glm(COND_1.1 ~ cnt, family = binomial(link = "probit"))  ddprob.2.1 &lt;- glm(COND_2.1 ~ cnt, family = binomial(link = "probit"))     Observing the plot, you can surely say that performance under condition 2 is better then the performance under condition 1. In fact if you compute some parameters like AUC, p25, p50, p75 (the value of the stimulus at which the number of correct answers are 25%, 50% and 75% each) [threshold parameters], you'll see that:  COND_1      COND_2 AUC    &lt;    AUC p25    &gt;    p25 p50    &gt;    p50 p75    &gt;    p75     Now consider subject 2:  COND_1     correct cnt   Y  N   1   0 10   2   0 10   3   0 10   4   0 10   5   3  7   6   3  7   7   4  6   8   5  5   9   9  1   10  9  1   11 10  0   12 10  0   13 10  0   14 10  0   15 10  0  COND_2     correct cnt   Y  N   1   0 10   2   1  9   3   0 10   4   4  6   5   2  8   6   6  4   7   4  6   8   7  3   9   4  6   10  7  3   11  7  3   12 10  0   13  9  1   14 10  0   15 10  0   COND_1.2 &lt;- matrix(c(0, 0, 0, 0, 3, 3, 4, 5, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 7, 7, 6, 5, 1, 1, 0, 0, 0, 0, 0), byrow=F, ncol=2) COND_2.2 &lt;- matrix(c(0, 1, 0, 4, 2, 6, 4, 7, 4, 7, 7, 10, 9, 10, 10, 10, 9, 10, 6, 8, 4, 6, 3, 6, 3, 3, 0, 1, 0, 0), byrow=F, ncol=2) cnt &lt;- seq(from=0, to=1.4, by=0.1)  ddprob.1.1 &lt;- glm(COND_1.2 ~ cnt, family = binomial(link = "probit")) ddprob.2.1 &lt;- glm(COND_2.2 ~ cnt, family = binomial(link = "probit"))   The plotted curves are shown in the image below.    Can you say what performance is better? Under condition 1 or under condition 2? Extrapolating AUC, p25, p50, p75, you have:  COND_1      COND_2 AUC     &gt;   AUC p25     &gt;   p25 p50     =   p50 p75     &lt;   p75   So my question is: Is there a method to say that a generic curve (logit, probit or whatelse) is HIGHER then another? Is there a method to compare (a single number of "performance") that describe the differences of the two curves? My example shows that AUC, p25, p50, p75 are not good parameters. I'd like to compute a single numeric parameter for each curves, to make a simple t-paired test, extrapolated from the distribution seen. Resetting Ubuntu to factory settings I've had a lot of problems lately and now I'm having problems logging in at the login screen. I'm giving up and just want to reset and start over. How can I "factory reset" Ubuntu, in this situation, or, for future reference, in general? Drawing on an image with TikZ Recently I have learned how to draw simple stuff with TikZ. I really like it. Now I wonder if it is possible to draw with TikZ on a image. Instead of pasting a image in Illustrator and adding some vectors to point something in the picture I would like to do it using TikZ. Is it possible?   For example, on a picture of a computer (PNG,etc) I would like to draw some arrows and labels saying "Keyboard", "Monitor", etc. Book a return flight a year in advance Is it possible to buy an airline ticket that has me returning to my country after a year being abroad? I can't seem to book a flight that far in advance online. References in externalized pgfplots I was writing on an document with a lot of pgfplots in it. Because of the memory limitation in LaTeX and in order to save some compiling time I tried out the externalize command. With most of the plots it perfectly worked out. But when I use the \ref command, namely \ref{&lt;legendname&gt;} the legend gets lost and instead there is a ??.  I think this question in a way is similar to  and . But no answer to these questions could solve my problem. Even the use of xr and zref packages showed no effect.  Am I just missing something?    MWE of the maindocument:  \documentclass{article} \usepackage{zref-user} \usepackage{xr-hyper} \usepackage{pgfplots} \usetikzlibrary{pgfplots.groupplots} \usepgfplotslibrary{external}  \tikzexternalize \externaldocument{part1}  \begin{document} \input{part1} \end{document}     With part1.tex looking like this:  \begin{tikzpicture}     \begin{groupplot}[       group style= {  columns=3,xlabels at=edge bottom,                 y descriptions at=edge left,                 horizontal sep=2cm,group name=plots},     width=0.4\textwidth,     xtick=data,     legend columns=3]     \nextgroupplot[xlabel=site 1,legend to name=grouplegend]     \addplot coordinates {(1,20)(2,23)(3,24.5)};     \addlegendentry {AaAaA,BbBbB,CcCcC}%     \nextgroupplot[xlabel=site 2]     \addplot coordinates {(1,14)(2,16)(3,17)};     \nextgroupplot[xlabel=site 3]     \addplot coordinates {(1,10)(2,11.5)(3,12.25)};     \end{groupplot}   % Legend     \node at (plots c2r1.north) [anchor=south] {\ref{grouplegend}}; \end{tikzpicture}     I'm writing with MikTeX 2.9 and the latest updates of the packages used. For compiling I used the command pdflatex -enable-write18 &lt;file name&gt;.  I hope the MWE is short enough ;) and some knows how to solve this problem. Are there any examples of subspaces  of $\ell^{2}$ and $\ell^{\infty}$ which are not closed? In Star Trek TOS, we see the Defiant disappear to unknown parts  ('The Tholian Web'), and Star Trek: Enterprise revealed that the Defiant went back in time to the mirror universe ('In a Mirror Darkly', parts 1 &amp; 2).   Because of this, one might wonder why (in-universe) the mirror universe didn't obtain (and maintain) technological superiority over the main timeline. (Granted, the out of universe answer is that TOS depicted the two universes as having essentially the same level of tech)  So does any work (whether STO, or a pocket books work) address why the mirror universe didn't simply leap frog the main universe's technology?   (Or to put it another way, why did the mirror universe's technology appear to stagnate for a century after obtaining access to the Defiant's advanced technology?) How can I get TeXstudio's syntax highlighting to recognize an unknown command? TeXstudio does not recognize the LaTeX command \rm (red highlighting in the document, with the message: unrecognized command), even after I activate all possible completion files (.cwl).  In such a case, what can I do so that TeXstudio recognizes a certain command for highlighting? 16.04 Japanese Text Input not working euler's theorem of homogeneuos function suppose that $f$ is a mapping from $\mathbb R^n \to \mathbb R$.  a positively homogeneous of degree $n$ and suppose $f_1, f_2, .... f_N$ are continuous for $a \neq 0$. then   $$\sum_{i=1}^n a_if_i(a)= n*f(a)$$   now, they asked me to prove this. (Which is a total no no to me)  I write my proof as;  $f$ is a mapping from $\mathbb R^n \to \mathbb R$  A homogeneous function of degree $n$ if for all $a \in \mathbb R^n$ and all $L&gt;0$, $f(La)=L^n\,f(a)$. let $a \in \mathbb R^n$ and define function $g$ be a mapping from $[0,\infty) \to \mathbb R$. so I write $g(L) = f(La)-L^nf(a)$. then $L≥0$ let $L=0$ then, $g(L)=0$ and therefore $g'(x) =0$?  then i don't know what's goes next. can anyone help me about this? Using C++ library in C code Story ID - ruthless criminal; legal/illegal citizen ranks Novel written before 2000.  The story begins on a planet which has been so environmentally damaged that the atmosphere is too toxic to breathe, forcing the population to live in air-tight domes or modules connected by tunnels.  Near the beginning, the protagonist working as a low-ranking gang or mob member. He's assigned to either kill or collect money from someone; when he confronts them, they taunt him about how the floor is electrified, how their body weight is shifted forward so shooting them will cause them to fall against an alarm button, and various other reasons why he can't possibly do anything... they continue right up until they're blown apart by some kind of miniature rocket launched from the protagonist's shoe.     Afterwards, I believe, his superiors in the organisation attempt to kill him because they deem him as "too dangerous", which causes him to retaliate by blowing up one of the passages, suffocating the people who were threatening him. From this point, or shortly after, he begins his own organisation which quickly grows in power until he is virtual ruler of the planet; eventually he cleans up the planet's environment to the point where people can live outside, again. At some point he meets a woman, courts her, but ultimately leaves her abruptly, telling her he swore never to let anyone have power over him, and since he's starting to fall in love with her, she's starting to have too much influence over him.   &nbsp;     The society in this universe has ranked legal and illegal citizenships, with either 50 or 100 being the lowest rank, and rank 1 being the highest... after the protagonists becomes a level 1 illegal citizen, he sets his sights on becoming a legal citizen, which requires him to (at least in appearance) divest himself of all his criminal ties and assets, which he does by creating a complex nested structure of ownership between himself and the illegal organisations he controls.   &nbsp;     As his influence increases in the legal world, he begins doing business with an alien race who, in order to trust him, give him the chance to let them implant him with some kind of organism that will kill him if he even thinks about betraying them.   &nbsp;     Near the end of the story there is a part where someone close to him is trying to figure out why he's amassing so much money and military power, when he's not intending on using it against the human race, and can't use it against the aliens. Hide parameterless constructor on struct Choosing power supply, how to get the voltage and current ratings? On the moderator , the tooltip will display the text used for voting on a question; this is incorrect.   Steps to reproduce:   Cast a vote for or against any candidate Undo that vote   At this point, the tooltip content is changed, at least for that candidate.  See screenshots:           As you can see, the message doesn't quite fit here; these are certainly not questions. In how many different ways can we place $8$ identical rooks on a chess board so that no two of them attack each other? In how many different ways can we place $8$ identical rooks on a chess board so that no two of them attack each other?  I tried to draw diagrams onto a $8\times8$ square but I'm only getting $16$ ways.  Does that sound right?  Thanks for the help! Why does a Ball bounce back if Forces are Equal and Opposite? When a ball is thrown onto a wall, the ball exerts a force onto the wall. According to Newton's Third Law, the wall will exert an equal and opposite force to the ball. Thus, how would the ball be able to bounce back? Shouldn't it just slide down the wall? Schadenfreude is the joy or pleasure derived from the misfortunes of others. What is the word for joy or pleasure derived from the happiness of others? wp_get_nav_menu_items order doesn't work how to prove $G_1$ and $G_2$ aren't isomorphic?