I am trying to build a class template that inherits the class. If the class template is given a primitive type as template argument, then it gives an illegal inheritance error. I tried doing  template &lt;class Class_&gt; struct EndianGuard_ : public Class_ {   EndianGuard_ () {     cout &lt;&lt; "Guarding a Class" &lt;&lt; endl;   } }  template &lt;typename PrimitiveType_&gt; struct EndianGuard_ {   EndianGuard_ (PrimitiveType_ Value) : Value(Value) {     cout &lt;&lt; "Guarding a primitive type" &lt;&lt; endl;   }   PrimitiveType_ Value; }   of course I knew it doesn't work that way but I am desperate. How can I differentiate primitive type and a structure?
I am looking for a way to identify primitives types in a template class definition.  I mean, having this class :  template&lt;class T&gt; class A{ void doWork(){    if(T isPrimitiveType())      doSomething();    else      doSomethingElse();  } private: T *t;  };   Is there is any way to "implement" isPrimitiveType().
g++ undefined reference to typeinfo Can I request the code behind a research paper from the author? check if Gutenberg is currently in use How can I check if the editor that is currently being used is Gutenberg in a WordPress plugin?  I need this because Gutenberg lacks post_submitbox_misc_actions, so I need a fallback which will only be used if the current editor is Gutenberg. Why does my document 'error' when using '%' I am designing gamecards in LaTeX  Everything is going pretty ok so far but when i try to insert the %-sign for a question about percentages my file keeps giving errors.  I tried putting the percentage between dollarsigns because i know just % will make it a 'remark' and that the dollarsign makes it 'mathematical data'.   Whats the reason for the error?   P.s. the error says: file ended while scanning use of \kaart. ...    Codesample:   {\kaart{Bekijk statistiek kaart F:   Schat het percentage mensen dat als lievelingseten spaghetti opgaven, je mag er slechts $ 2% $ langs zitten. } { $ 11% $}} How to use if-else option in JSTL Same gravatar is displayed for different users in the stackexchange.com , under the Top Network Askers in the right side bar.   The red circled image's source (&lt;img src=) are from   https://www.gravatar.com/avatar/?s=18&amp;d=identicon&amp;r=PG&amp;s=30                                ^   Seems the gravatar id is missing here in the image source.  For an example from the list, the user  gravatar id should be    https://www.gravatar.com/avatar/66c66c4d97a7bc3859a85253f003e1fb?s=18&amp;d=identicon&amp;r=PG&amp;s=30   but it is mapped with   https://www.gravatar.com/avatar/?s=18&amp;d=identicon&amp;r=PG&amp;s=30   which caused the display issue. Is it possible to create a geocoding and reverse geocoding service based on the shapefiles data List comprehension rebinds names even after scope of comprehension. Is this right? If $f \circ g$ is surjective, then f is surjective Let $f: X \rightarrow Y$ and $g: Y \rightarrow X$  If $f \circ g$ is surjective, then f is surjective, too.  I think that is true.   Question: How can I proove that? I have so far:   $\forall y \in Y: \exists x \in X : f(x)=y$  $\forall x \in Y : \exists y \in Y : f \circ g(y)= x$ Access Javascript variable inside of an Apex:repeat I am currently trying to add some customer markers to a map. I can add a single marker to the map but when I move that same logic inside of an Apex:repeat I no longer have access to the map variable.  My Javascript:  &lt;script type="text/javascript"&gt;      function initialize() {       var mapProp = {         center:new google.maps.LatLng(52.634092,-0.148315),         zoom:10,         mapTypeId:google.maps.MapTypeId.ROADMAP       };                  var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);            }     google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt;   My VP page:     &lt;apex:repeat value="{!Locations}" var="local" id="mapMarkers" &gt;     &lt;script type="text/javascript"&gt;          var lat = '{!Locations[0].Geolocation__Latitude__s}';         var lng = '{!Locations[0].Geolocation__Longitude__s}';         var marker=new google.maps.Marker({             position: new google.maps.LatLng(lat, lng)             });                   marker.setMap(map);      &lt;/script&gt; &lt;/apex:repeat&gt;   The !Locations list is in my controller and just pulls the latitude and longitude from my Tree__c object:     public List&lt;Tree__c&gt; getLocations() {     List&lt;Tree__c&gt; locations = Database.query('SELECT Geolocation__Latitude__s, Geolocation__Longitude__s FROM Tree__c WHERE Geolocation__Latitude__s !=null AND Geolocation__Longitude__s !=null ');     return locations; } Evaluating a PDF to find an unkown constant Evaluate the PDF to find K  $1 = \int_0^{\infty} \frac{k}{(1+x)^4}$  using u substitution I got:  $u=1+x$ and $du= dx$  $\int_0^{\infty} \frac{k}{u^4} \to \frac{k}{\frac{-1}{3} u^3}$   Since $u^4 du = \frac{u^{-4+1}}{-4+1}=$ $\frac{u^{-3}}{-3}$  which evaluating gives:  $1=\frac{k}{\frac{-1}{3(1+x)^3}} \vert_0^{\infty} \to \frac{-3k}{(1+x)^3} \vert_0^{\infty} = 0 -3k$   and $k= \frac{-1}{3}$  somehow though they came up with $\frac{-k}{3} \frac{1}{(1+x)^3}$ after integrating $\int_0^{\infty} \frac{k}{(1+x)^3}$   Was my approach correct to use substitution? Where does my work go wrong? $\lim_{h\to 0}\int \frac{f(x+h)-f(x)}{h}\,\mathrm{d}x = f(b)-f(a)$ Let $f:[a,b]\to  R$ be integrable and continuous on $(a,b)$. Prove that: $$\lim_{h\to 0} \int_a^b\frac{f(x+h)-f(x)}{h} \,\mathrm{d}x = f(b)-f(a).$$  What I've tried so far: make a change of variables, which didn't help. I also thought of using the intermediate value theorem inside the integral, but the function being differentiable is not specified. Any help, tips? Thanks in advance! How do I clone a generic list in C#? Processing time/speed for Mosaic to New Raster I have a question on speeding up “Mosaic to New Raster” or finding an alternative.  After completing a suitability analysis we are trying to define movement corridors.  We used a modified CircuitScape that left 4 folders, each containing 1080 raster tiles across our study area.  We now need combine all 1080 rasters in each folder then combine these 4 combined rasters into a final raster which will be analyzed for paths.  I tried a python script that just wouldn’t work so I went on to Model Builder.  It iterates through the grids in the folder, collects the values (raster names), then mosaics all to a new raster.  It has been running for 5 days now and the results window indicates it is working.  I’m hoping it will conclude in the next day or 2.  But, we still have 3 more folders, each with 1080 rasters, that need to be mosaicked.  So….is there a way to speed up Mosaic to New Raster or is there an alternative I could use to produce the final grid?    The cell size is 270 meters, 540 x 540 columns and rows, 1 band, 32 bit floating. Prove that  $ n &lt; 2^{n}  $ for all natural numbers $n$.  I tried this with induction: Inequality clearly holds when $n=1$. Supposing that when $n=k$, $k&lt;2^{k}$. Considering $k+1 &lt;2^{k}+1$, but where do I go from here?  Any other methods maybe? How to check file types of uploaded files in PHP? On the PHP website, the only real checking they suggest is using is_uploaded_file() or move_uploaded_file(), . Of course you usually don't want user's uploading any type of file, for a variety of reasons.  Because of this, I have often used some "strict" mime type checking. Of course this is very flawed because often mime types are wrong and users can't upload their file. It is also very easy to fake and/or change. And along with all of that, each browser and OS deals with them differently.  Another method is to check the extension, which of course is even easier to change than mime type.  If you only want images, using something like getimagesize() will work.  What about other types of files? PDFs, Word documents or Excel files? Or even text only files?  Edit: If you don't have  or  and system("file -bi $uploadedfile") gives you the wrong file type, what other options are there? Windows 10 100% Disk Usage after Startup After startup for 5 minutes my system is very slow. The Task Manager shows that the disk usage is at 100%. (Later this number is around 2-4 %, but sometimes for 1-2 minutes go up again at 100%.)  I searched a lot on Google. For example I read , and also other pages. I opened two topic on Microsoft answer.  and one in Hungarian.  But I didn't found the solution yet. So I would like to ask Community's help. :)  Here the steps I already done:   I disabled everything at startups (including services) and the issue is the same.  I disabled Prefetch and Superfetch, the Baground Intellingent Transmission, Windows Search and Windows Defender but the issue is still persists. I made a health check on HDD, I made defrag and file system error check, but there are no errors. Also I tried to reinstall the HDD's driver. I made a full hardware check up, with no errors. The Windows and all the drivers are up-to-date. I tried a clean start. The issue is the same. I deleted Dropbox and all antivirus. I turned of the MSI mode.      I using also Linux, where this error is not occurs. Good to know, that Windows had 4 partitions, but I deleted 2 of them for the Linux. I don't know what partitions was these but both was only 10 - 20 MB.  I using a Dell Inspiron 15R SE 7520 with Windows 10 Home.  Personally I think it can be the Intel Rapid Store Technology "driver", because the problem started around when I installed it. (However I'm not sure.) And my hardware not supported yet by Intel, so I have no the newest driver. However I deleted Intel's software and driver and the issue is the same.    Thank you in advance for your assistance! Trying to hide spam/offensive deletions on user profiles announces them Let $G(r, n)$ be the Grassmannian of the set of all $r$-planes in a $n$-dim vector space. How to show that the cohomology of a Grassmannian has a basis consisting of the equivalent classes represented by Schubert cycles? I am confused since I don't know how to compute the cohomology of a variety (how to construct the co-chain complex). I am really appreciate if you can compute the cohomology of, for example, $G(2,4)$ and show that it has a basis consisting of the equivalent classes represented by Schubert cycles. Solving infinite sums with primes. Let $p_n$ denote the $n$'th prime number.  How would one go about proving that infinite products like: $$\prod_{k=1}^\infty1 - \frac{1}{(p_k)^2} = \frac{6}{\pi^2}$$  or  $$\prod_{k=1}^\infty\frac{{p_k}^2}{{p_k}^2 - 1} = \frac{\pi^2}{6}$$ are correct?  Is there any way to prove it except by exhaustion?