I found this article:  and I have some question about part of the presented code:  First: I think that is something about dependent name but I am not sure what is a purpouse of this part:   template &lt;typename T&gt;     typename instance_counter&lt;T&gt;::counter instance_counter&lt;T&gt;::icounter{};   And second one:  template &lt;typename T&gt; struct counted : T, private instance_counter&lt;T&gt; {     using T::T; };   Could somebody give me an explanation about these codes?
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?
How do I completely remove Ubuntu 12.04 on my Mac? I have dual booted Ubuntu 12.04 on my Mac using disk utility and the rEFIt tool.The battery life is very bad and therefore I want to switch back to Ubuntu 10.04 . How can I completely remove the 12.04 partition? Let $M$ be a smooth manifold and let $N$ be a manifold with boundary. If $dF_{p}$ is an isomorphism, then $F\left(p\right)\in\mbox{int}M $. Let $M$ be a smooth manifold and let $N$ be a manifold with boundary, both with the same dimension $n$. If $dF_{p}$ is an isomorphism, then $F\left(p\right)\in\mbox{int}N  $.  I am trying to prove this theorem to prove a result about smooth embeddings.  Here is how I am thinking the problem could be solved. Assume thet $F(p)$ is a boundary point of $N$. Then there exists a chart $(V,\psi)$ at $F(p)$ such that $\psi(V) $ is an open subset of the upper half space $\mathbb{H}^{n}$. I guess we have to use some fact about $M$ having no boundary and the the fact that $dF_p$ is an isomorphism to show that there is a contradiction, but I cannot figure that out. Does there exist a function $f: \mathbb{R} \to \mathbb{R}$ having the following properties?   $f(x) = 0$ for all $x \le 0$. $f(x) = 1$ for all $x \ge 1$. For $0 &lt; x &lt; 1$, $f$ is strictly increasing. $f$ is everywhere $C^\infty$. The sequence of $L^\infty$ norms $\langle \left\lVert f \right\rVert_\infty, \left\lVert f' \right\rVert_\infty, \left\lVert f'' \right\rVert_\infty, \dots \rangle$ is bounded.   If we impose only the first four conditions, there is : for $0 &lt; x &lt; 1$, define $f(x)$ by $$ f(x) = \frac{e^{-1/x}}{e^{-1/x} + e^{-1/(1-x)}} = \frac{1}{1 + e^{1/x - 1/(1-x)}} $$ However, the derivatives of this function appear to grow quite rapidly. (I'm not sure how to verify this, but it seems at least exponential to me.)  If such a function does not exist, what is the smallest order of asymptotic growth that the sequence $\langle \left\lVert f \right\rVert_\infty, \left\lVert f' \right\rVert_\infty, \left\lVert f'' \right\rVert_\infty, \dots \rangle$ can have? Since Naruto failed the Genin exam so many times, doesn't that mean he's older than Sasuke and Sakura? libsensors5 or libsensors-config upgrade problem C++ GCC 4.3.2 error on vector of char-array String handling by OneHotEncoder I am reading everywhere on new questions and blogs that since version 0.20, OneHotEncoder is able to handle string features. Moreover, the documentation is what looks more ambiguous. Here are the first two lines from the documentation:  Encode categorical integer features as a one-hot numeric array. The input to this transformer should be an array-like of integers or strings, denoting the values taken on by categorical (discrete) features.  First line says it  encodes categorical integer features  and the next line says  input should be array like of integers or strings.  When i tried it, i still got the value error. print(X.columns) encoder = OneHotEncoder(categorical_features=[1,4,5]) encoder.fit(X)  Index(['age', 'sex', 'bmi', 'children', 'smoker', 'region'], dtype='object') ValueError: could not convert string to float: 'female'  I am aware of the means to handle encoding of string features with LabelEncoder, ColumnTransfomer and pd.getDummies() but specifically want to understand about this. Comparing two strings in Bash I have the following if block in my bash script:  if [ ${PACKAGENAME} -eq kakadu-v6_4-00902C ]; then   echo "successfully entered if block!!" fi   The script execution is not entering my if block even though $PACKAGENAME is equal to kakadu-v6_4-00902C. What am I doing wrong? Why is 128==128 false but 127==127 is true when comparing Integer wrappers in Java? Getting error message when trying to start a virtual machine I have been using VMWare on Windows for a long time. But after a long wait, I moved to VirtualBox on Ubuntu 11.10. I installed Ubuntu, 32 Bit, installed all available updates and installed Virtual Box. When I try to create a new Windows installation inside VirtualBox, I got the following error messages.  VirtualBox - Error  Failed to open a session for the virtual machine Windows XP. The virtual machine '**Windows XP**' has terminated unexpectedly during startup with exit code 1. Details  Result Code: NS_ERROR_FAILURE (0x80004005) Component: Machine Interface: IMachine {5eaa9319-62fc-4b0a-843c-0cb1940f8a91}   2nd error dialogue  Virtualbox - Error in suplibOsinit Kernal driver not installed (rc--1908) Please install the virtualbox-dkmbs package and execute 'modprobe vboxdrv' as root.    I have already tried reinstalling VirtualBox. Google result seem to indicate the the problem happens due to Kernel updates.   Is there anyway I can get this working? I need this for malware analysis and if VirtualBox is going to crash on me all the time, then I won't be able to use Ubuntu for work.  Output to dpkg -l | grep virtual   server rc  virtualbox                             4.1.2-dfsg-1ubuntu1                     x86 virtualization solution - base binaries rc  virtualbox-qt                          4.1.2-dfsg-1ubuntu1                     x86 virtualization solution - Qt based user interface  cute 'modprobe vboxdrv' as root.&lt;p&gt; I can't figure how to print the string "-n" with the over 30 years-old command echo.  I tried these:  Michaels:Scripts$ echo -n Michaels:Scripts$ echo "-n" Michaels:Scripts$ echo -e "-n" Michaels:Scripts$ echo -- -n -- -n Michaels:Script$ echo -- "-n" -- -n Michaels:Script$ echo "\-n" \-n   I use Mac OS X ML. I consider this behaviour very weird and unexpected. I have a MacBook Pro 2009 running MacOS El Capitan. Recently the Wi-Fi has stopped working.   When I click on the Wi-Fi icon it displays the message "No hardware installed", but Ethernet still works.   Is there any way of fixing this by using a Wi-Fi dongle or something of the sort, if so do I need a specific dongle and how do I install it? How do I sort a list of dictionaries by a value of the dictionary? Compare given date with today SF novel about one-way scientific expedition to inhabited planet, where telepathic aliens "talk" sort of ++like this++ and ~*~this~*~ I'm looking for a novel I read in the mid-to-late 1990s. It was a science fiction novel about an expedition of scientists sent at sub-light-speed (maybe in cryo-sleep?) to investigate a star system. Once there they set up a permanent scientific outpost.  There was at least one inhabited planet in the system, with a sentient species that communicated telepathically. The aliens' speech was represented with various symbols instead of quotation marks, with each named character having (I think) its own characteristic set of symbols, as in the title of the question. The scientists are eventually able to communicate with these (generally friendly) aliens.  The thing I remember most clearly is the end of the book. This was a one-way trip for the scientists, so gradually they all die off from various causes. When the next-to-last member of the crew dies of old age, the survivor is looking for an epigraph for her funeral, and (ironically, considering my current plight) can't find it in his search of the electronic library. He finally discovers it under "humor" because it's by Mark Twain: "Wherever she was, there was Eden." (This quote, of course, I found immediately in  and many other sources; it's from Eve's Diary.)  Other pieces of information I'm less sure of:   I don't think the planet was hospitable to humans; it may have been something like a gas giant, with the aliens "swimming" through the gas. I think the scientists stayed in an orbital space station, though they may have made expeditions to the planet in vehicles or protective suits. There may have been a "twin" planet, or a moon in an eccentric orbit, that caused periodic "flares" of some sort on the aliens' planet. There might have been some conflict between the crew early on, maybe because there was a non-scientific (military) commander, or perhaps just because people have conflict. I think the author was of sort of middling fame; respected and known by SF enthusiasts, but not a superstar like Asimov or Clarke. Almost certainly male, and probably with a professional science background. I think the science was fairly authentic, although the first-contact bit was obviously highly speculative. When running 'screen ls' the screen stops with the text [screen is terminating]. I would like screen to keep the session alive and reattach to it to see the output of ls.  Of course the real thing is that I don't run screen ls, but rather a screen fsck ..., so I would like to ensure that the screen is not terminating when this command is finished.  I would love to have an answer that is useful for an already existing running screen session, so some interactive keys like C-a ... or C-a : (Enter command line mode) If one uses Shadow Evocation on a willing ally (e.g. Telekinetic Charge) can they choose not to disbelieve? Shadow Evocation  Nondamaging effects have normal effects except against those who disbelieve them. Against disbelievers, they have no effect.  Disbelief  Creatures encountering an illusion usually do not receive saving throws to recognize it as illusory until they study it carefully or interact with it in some fashion. A successful saving throw against an illusion reveals it to be false, but a figment or phantasm remains as a translucent outline. A failed saving throw indicates that a character fails to notice something is amiss. A character faced with proof that an illusion isn't real needs no saving throw. If any viewer successfully disbelieves an illusion and communicates this fact to others, each such viewer gains a saving throw with a +4 bonus.  (my emphasis) Voluntarily Giving up a Saving Throw  A creature can voluntarily forego a saving throw and willingly accept a spell's result. Even a character with a special resistance to magic can suppress this quality.  If I understand the above correctly,  If the ally believes the caster actually cast Telekinetic Charge, it seems they get a save which they could forgoe and so be guaranteed the benefit of the spell. &gt;&gt; We're good here. If the ally knows the caster didn't cast Telekinetic Charge, (say because of a high Spellcraft check or because she knows the caster's spell list) they have proof that the illusion isn't real and so need no saving throw. &gt;&gt; Even though she &quot;needs no saving throw&quot;, can she still choose to forego the save and be effected by the spell?  In other words, I think the question boils down to: Does one always have a choice not disbelieve an illusion, even when one has proof that it's not real? Adding vertical space at the start of a page I'd like to, first thing before writing anything on a page, add some vertical space.  Minimal (non)working example:  \documentclass{article} \begin{document}  \vspace{250px} I want to be further down on the page :(  \vspace{250px} Haha! Sucker :D \end{document}     How can I get the first \vspace to work, just like the second one? I have tried to dig around for this, but I can't find a way (other than stepping one by one through past reviews) to see what proportion of my review decisions match the eventual outcome of the review.  This stat would give me confidence that I'm in line with the review guidance and not becoming too lenient in my old age. If it gets too low, I can then double check individual reviews to find out why I'm missing the mark. I'm searching a way to append a group in Python.  It should behave exactly like the Append function (ShiftF1) works, all objects should be local and editable. The idea is to append a character (with rig etc.) via Python and not Link it (to be able to modify it without making everything local one by one).  Thanks