When I attempt to call the method target on a std::function object using a template parameter pack, the compiler throws an error, but it works fine if the template parameters are specified explicitly in a proxy variable. Example, modified from : #include &lt;functional&gt; #include &lt;iostream&gt;  int f(int, int) { return 1; } int g(int, int) { return 2; }  template &lt;typename... Args&gt; void test(std::function&lt;int(Args...)&gt; const&amp; arg) {     auto &amp;&amp; ptr = arg.target&lt;int(*)(Args...)&gt;(); // error: expected primary-expression before 'int'      if (ptr &amp;&amp; *ptr == f)         std::cout &lt;&lt; &quot;it is the function f\n&quot;;     if (ptr &amp;&amp; *ptr == g)         std::cout &lt;&lt; &quot;it is the function g\n&quot;; }  int test() {     test&lt;int, int&gt;(std::function&lt;int(int, int)&gt;(f));     test&lt;int, int&gt;(std::function&lt;int(int, int)&gt;(g)); }  I've tried various other ways to call target including the following: int (*const* ptr)(Args...) = arg.target&lt;int(*)(Args...)&gt;(); // error: expected primary-expression before 'int' int (*const* ptr)(int, int) = arg.target&lt;int(*)(Args...)&gt;(); // error: expected primary-expression before 'int' int (*const* ptr)(int, int) = arg.target&lt;int(*)(int, int)&gt;(); // error: expected primary-expression before 'int'  const std::function&lt;int(Args...)&gt;&amp; func = arg; auto &amp;&amp; ptr = arg.target&lt;int(*)(Args...)&gt;(); // error: expected primary-expression before 'int'  The compiler only appeared to be satisfied when using a proxy variable as seen here: const std::function&lt;int(int, int)&gt;&amp; func = arg; auto &amp;&amp; ptr = func.target&lt;int(*)(Args...)&gt;(); // OK, but requires specifying the template arguments for func  As can be seen, this workaround deviates from the previous non-working example only by explicitly specifying the function parameters instead of relying on the parameter pack. (I could bypass the proxy variable with a static_cast e.g. static_cast&lt;std::function&lt;int(int,int)&gt;&amp;&gt;(arg).target&lt;int(*)(Args...)&gt;(), but this also requires knowing the parameters for the cast.) If I already knew what parameters were going to be used then I wouldn't be using a variadic template since it wouldn't be necessary. But since I don't, how can I fix this? Am I doing something wrong, is this a compiler bug, or what exactly is going on here? Note: For reference, I'm compiling with GCC version 6.3.0 with MinGW on Windows 10.
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?
Benefit of date in URL segments I was curious about the date in URL segments, is there any SEO point of benefit? For example the following URLs:  http://techcrunch.com/2013/06/18/netflix-will-launch-in-the-netherlands-later-this-year-as-its-international-expansion-slows/ http://tips-for-new-bloggers.blogspot.in/2007/02/adding-favicon-icon-to-blogger-url.html  https://community.jivesoftware.com/blogs/jivespace/2013/05/15/eol-of-the-html5-ipad-web-app   In all the above URLs there is date segment. The information of those blogs can be fetched via blog stub like "netflix-will-launch-in-the-netherlands-later-this-year-as-its-international-expansion-slows" so why to use that date part? Generalizing the case $p=2$ we would like to know if the statement below is true.  Let $p$ the smallest prime dividing the order of $G$. If $H$ is a subgroup of $G$ with index $p$ then $H$ is normal. With the release of iOS 6, the most commonly used mobile browser now supports standard generic image upload buttons. This is actually really handy.  I can take screenshots on my phone or iPad, and use them to answer questions about apps made to run on those devices (or ) to answer questions. Until the release of iOS 6 however, the only way to use these images in my answer was to either sync them over to my computer, and then answer from a desktop, or use a specialized app to upload the images, such as PicUp or DropBox, and then manually write out the markdown code.  After iOS 6, the Image Upload button works just fine, if I switch to viewing the full site from my iDevice, rather than the mobile view. I can upload images directly, and the markdown is handled for me. It's awesome, except for the fact that the non-mobile site is decidedly non-awesome on the small screen of my phone.  Which brings me to my feature request: Add the Image Upload button (and other markdown shortcuts, as deemed worthwhile) to the ask/answer editors on the mobile version of SE sites. Examples of PCA where PCs with low variance are "useful" How to find historical stock price for a de-listed or defunct company? With services like Google Finance or Yahoo Finance it is very convenient to find the historical stock price metric of a listed company, but if the company is not listed, I can't find the data.  For example, I want to see the price metrics for Macromedia, which had been listed in 1993 on NASDAQ (MACR), then acquired by Adobe in 2005. How could I find its historical price metrics? I have a spreadsheet full of addresses to geocode in ArcMap 10.  I've added the spreadsheet to the map, then started to geocode them via the context menu's "Geocode addresses" item.  Many were matched automatically, and most of the unmatched I've been able to resolve within the Interactive Rematch dialog. But I have a handful of addresses where I get no result at all.  I can, however, locate these points on Google Maps, and I can get the latitude and longitude that way.  How can I enter that data into the table to locate the missing points?  I have tried editing the data and putting the lat/lon values into the X and Y columns, (via Edit Features -> Start Editing, then Open Attribute Table on the context menu).  But when I Flash the point, I don't see it.  The lat &amp; lon are consistent with the other data points on the map (i.e., not swapped, and using the correct sign).  How can I add the points to the table? Let $A$ be a complex matrix such that $A^n = I$, show that $A$ is diagonalisable.  How do I do this?    I would hazard a guess that since $A^n = I$ that means that $A^n$ is obvious diagonal, and I suppose that a diagonal matrix can only be formed by the square of another diagonal matrix, but I am not sure if that is the case. Also I think this neglects the complex cases.  Is there a Jordan block argument that I should use? Lost my APFS partition after using EaseUS partition manager on Bootcamp I used macOS mojave(APFS partition) and Windows10(Bootcamp). And I tried to expand Bootcamp partition with moving Windows OEM partition by EaseUS partition master in windows. After this, I can’t find APFS partition installed macOS.  I use MacBook Pro 2016.  I think “disk0s2” was APFS partition, but now it is “Windows Recovery” partition.  Do you have any ideas to solve this? (I am Japanese, so I'm sorry for my poor English)  I tried “gpt show” and “diskutil list” on macOS Recovery   Additional information  I tried dd if=/dev/disk0s2 count=1 bs=512 command in a Terminal app of macOS Utility from network boot, and the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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0-bash-3.2#   . Necessary and Sufficient conditions for $(i \, j)$ and $(1 \, 2 \, \dotsc \, n)$ generate $S_n$. I have a homework question that asks     Find necessary and sufficient conditions on $1 \leq i &lt; j \leq n$ so that $(i \, j)$ and $(1 \, 2 \, \dotsc \, n)$ generate $S_n$.   Here is what I have done so far.  Call $c = (1 \, 2 \, \dotsc \, n)$.  I made the observation that $$ \overbrace{c c \dotsb c}^{n - j + 1} (i \, j) \overbrace{c^{-1} c^{-1} \dotsb c^{-1}}^{n - j + 1} = (1 + i - j + n \, 1). $$ Thus, $\langle (i \, j), c \rangle = \langle (1 \, i - j + n + 1), c \rangle$, so it suffices to look at $\langle (1 \, k), c \rangle$ for positive integers $2 \leq k \leq n$.  I've checked that, for the value $k=2$, $\langle (1 \, 2), c \rangle = S_n$.  This immediately implies $\langle (1 \, n), c \rangle = S_n$.  I suspect that no other values of $k$ will work, but am not sure how to prove it. I read this sentence on an educational website:     Now times have changed and you are ready for situations involving forces in two dimensions.   Shouldn't there be a comma before and, since the subject of the sentence has changed (things vs. you)?      Now times have changed, and you are ready for situations involving forces in two dimensions.   What is the exact comma rule for joining two clauses with and? How to rig a shirt with buttons so that the buttons follow the mesh of the shirt I didn't address this in a while because I was busy with something else, but now it has cycled back into my schedule.  Right now I have a shirt modeled and bones set in place. It's already technically rigged, but the only issue is the buttons.   I'm not entirely sure how to go about connecting them to the shirt's deformations. I tried to combine them and the shirt into one object, but because of the shirt's modifiers, (Solidify and subsurf, which I don't want to apply yet), the buttons become extremely deformed. I've tried to match the weight painting intensity where a button is at in correspondence with the shirt, but that doesn't seem to work, maybe it has to do with the specifics of where the button is?   Is there a way to make the buttons follow the shirt's deformations without deforming the mesh vertices of the button? I know that if I probably apply the modifiers on the shirt and combine it with the buttons, it would be okay, but I'm not okay with doing that just yet with the shirt.    I rigged the shirt by deleting all vertex groups, assigning empty groups to the mesh from the armature, and then assigned automatic groups in the weight paint menu.  Is there a way to do this? I can't boot into a usable system after updates. What should I do? Since some system updates, my machine can no longer boot properly. I am no Ubuntu guru. I do not have a week to spare diagnosing the issue. I just want to retrieve important data from this machine's hard drive and get a working computer again ASAP.  What should I do? What's with those who ask a question, but don't ever seem to come back to add requested info? On stackoverflow, there seem to be quite a few programmers who ask a question, usually with one line like:  "How do I release memory after memory warning? My app crashes. Thanks and welcome for reply."   And a bunch of us will ask questions like   what platform? give us some more detail about the crash.   Weeks will go by and the original poster never adds any more details.  In the meantime, some respondents go ahead and answer the question thoroughly, covering possible platforms/scenarios, etc.  Of course no answer is ever selected by the OP.  Then the OP shows up again, and asks another question, sometimes its the same question asked differently, sometimes not.    What is going on here?  Do they have one chance every so often to get a query out on the Internet and they get through and they post and then they can't get back?  Or are they forgetful, since they are posting the same question to tens or hundreds of sites?    I'm just curious.  Seems like they shoot themselves in the foot when they have a captive audience waiting for more details of their problem, yet they never provide those details. If $I$ and $J$ are ideals in a ring $R$ with $1$ such that $I+J = R$, show that $I^m$ and $J^n$ are co-maximal for all $m,n \in \mathbb{N}$ If $I$ and $J$ are ideals in a ring $R$ with 1 which are  co-maximal, i.e $I+J = R$, show that $I^m$ and $J^n$ are co-maximal for all $m,n$ in $\mathbb{N}$  Work done:     Should I proceed using    By taking $$K=I^m+J^m \neq R$$  Let $$S=\{I,J \in R \mid I^m+J^n \neq R \}$$ be the required partially order set ordered by inclusion then  $$I+J \subseteq I^n+J \subseteq I^n+J^m \subseteq \ldots $$  Then, I think this chain doesn't have an upper bound...as $I^m+J^n \neq R$ for all $ m,n \in \mathbb N$. Am I right??  Thanks for any help!! Characterize the groups $G$ for which the map $\iota: G \to G$, sending $x \mapsto x^{-1}$ for all $x \in G$, is an automorphism of $G$ I have trouble on this question: "Characterize the groups G for which the map $$\iota: G \to G$$ sending $$x \mapsto x^{-1}$$ for all $x \in G$, is an automorphism of $G$." From  post I have seen that $G$ must be abelian. Can anyone propose another characteristic of $G$ that I can derive from the given conditions besides abelian? Thank you so much!! Can I remove a digital signature from a DLL? The following question was asked on a high school test, where the students were given a few minutes per question, at most:     Given that,   $$P(x)=x^{104}+x^{93}+x^{82}+x^{71}+1$$   and,   $$Q(x)=x^4+x^3+x^2+x+1$$   what is the remainder of $P(x)$ divided by $Q(x)$?     The given answer was:     Let $Q(x)=0$. Multiplying both sides by $x-1$:   $$(x-1)(x^4+x^3+x^2+x+1)=0 \implies x^5 - 1=0 \implies x^5 = 1$$   Substituting $x^5=1$ in $P(x)$ gives $x^4+x^3+x^2+x+1$. Thus,   $$P(x)\equiv\mathbf0\pmod{Q(x)}$$     Obviously, a student is required to come up with a “trick” rather than doing brute force polynomial division. How is the student supposed to think of the suggested method? Is it obvious? How else could one approach the problem? What is needed for a game's stats to be saved? Last night I played a few games with my friend. While in the last game, I suddenly remembered something I had to do and was about to leave but my friend told me that I would lose my progress if I did so. I stayed until the end, through the scoreboard screen and quit while the next map was loading. Taking a look  now, I can't see any of yesterday's games. I don't remember how much XP I had yesterday so there is no sure way for me to check that. I had gotten a dozen ribbon and I don't see them in the feed, but there could be specific conditions to be showing them.  My questions then.   If you quit a game early, do you lose progress / XP? What if you quit on the scoreboard? Do you need to wait for the next map to load to save your progress? Any idea why the games aren't showing up? Some of them I definitely waited for the next map to load. Is there a delay for them to be shown on Battlelog?   Thanks. I am just learning ArcGIS 10.2 and it was working well until I tried to use the Export to a Geodatabase (single) option for a dbs table I made. Since then, it seems I now get the same Script Error for import/export functions. However, I just tried to export to Geodatabase (multiple) and error did not pop up. I spoke with tech support and they could not help me so far. I really do not know much about GIS so it is hard for me to fix this problem and cannot proceed with some things. How Do I get into the castle walls? I already have the pink and red leather gloves, the armor, the crown, and the monkey's staff (and they're all enchanted). Regardless of how many health potions I use, I always die. Help!