I was looking at  and I noticed that it specifies the legal types we can always cast to:   byte* char* unsigned char*   But I did not see void* in the list. Is this an oversight? My use case requires a reinterpret_cast because I'm casting from an int** to a void*. And I will eventually cast from the void* back to an int**.
I am little confused with the applicability of reinterpret_cast vs static_cast. From what I have read the general rules are to use static cast when the types can be interpreted at compile time hence the word static. This is the cast the C++ compiler uses internally for implicit casts also.  reinterpret_casts are applicable in two scenarios:   convert integer types to pointer types and vice versa  convert one pointer type to another. The general idea I get is this is unportable and should be avoided.     Where I am a little confused is one usage which I need, I am calling C++ from C and the C code needs to hold on to the C++ object so basically it holds a void*. What cast should be used to convert between the void * and the Class type?  I have seen usage of both static_cast and reinterpret_cast? Though from what I have been reading it appears static is better as the cast can happen at compile time? Though it says to use reinterpret_cast to convert from one pointer type to another?
Understanding the proof of infinitely many primes $\equiv 3\pmod{\!4}$ Theorem: There are infinitely many primes congruent to $3 \mod 4$. Proof: Assume that $p_1 = 3, . . . , p_n$ are primes of the form $p_j ≡ 3 \mod 4$. We will construct a new one by looking at $N = 4p_1 · · · p_n − 1$ (putting $N = 4p_1 · · · p_n+3$ would also work).  There is more to this proof but the rest of it I understand, what I don't get is where it says &quot;$N = 4p_1 · · · p_n − 1$ (putting $N = 4p_1 · · · p_n+3$ would also work)&quot;. I do not understand why we are writing $4p_1 · · · p_n − 1$. Is there a more clear way to prove this theorem? Displaying multiple fields as labels if one field is null in QGIS? I am having some issues trying to show multiple fields for a single label in QGIS. In QGIS2.6, attempting to display labels for a feature consisting of multiple fields results in an empty label if one of the fields is null. So for example, in the label expression dialog:  concat("Temp Site",'\n',"Notes",'\n',"Function")   will function normally unless one of the fields is null, then it results in no label being shown. Using the '||' operator instead in the expression dialog also results in the same behaviour:  "Temp Site" || '\n'  ||  "Notes" || '\n'  ||  "Function"   Is there a way to display the labels even if one of the fields is null? We have a org wide email addressed which has been "Verified" into our sandbox. I understant org wide email addressed is unsupported metadata, so this was achieved as pre deployment step.   Into our repo, we have a workflow that send email alert to that org wide email address. "  Workflow   ... &lt;senderAddress&gt;noreply@mycompany.com.au&lt;/senderAddress&gt; &lt;senderType&gt;OrgWideEmailAddress&lt;/senderType&gt;    The problem we are facing is that we are still getting the following error even if this org wide email address is verified:      You must specify a verified Org Wide Email Address for this sender   type.   Is that a bug in the metadata api or expected behaviour ? Ideally we would like to not have to do that as a post deployment step.   PS: We are running DX under api version 43.0 I want to find questions within the C++ tag but with zero answers. How can I do that? What effect does the Barr body have, in relation to female Turner syndrome? Why do persons with  have  developmental abnormalities, when normal XX-females do not, even though they only have 1 active X chromosome? From what I know, one X-chromosome is inactivated into a Barr body in normal XX-females, but these obviously don't show the symptoms of Turner syndrome. What function does the inactive chromosome have? Maybe the underlying question is what the Voltage-Current curve looks like. Can I drive it from a voltage source (like you drive a heater) or from a current source (like you drive an LED)? Or even different than those two options?  ADDITIONAL1: Say (hypothetically) I have two commercially available identical Peltier's, they are spec'd 6V/3A. Can I connect these in series to a 12Vdc power supply without any worries?  CONCLUSION1: Current/Voltage load curve is reasonably linear, both driving from current or voltage source will do fine as long as the device is operated within its spec. (Olin Lathrop, Russell McMahon)  CONCLUSION2: Don't drive a Peltier from PWM, power loss due to current increase, grows more rapidly than cooling power. (Olin Lathrop)  CONCLUSION3: Beware the mechanical wear of the device with continues cycling. Eg. don't use a thermostat on/off controller. (Russell McMahon) What should be in the sources.list for Kali Rolling Linux? This is exact content from my sources.list:  #  # deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160830-11:29]/ kali-rolling contrib main non-free #deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160830-11:29]/ kali-rolling contrib main non-free   I couldn't install the Synaptic package manager and was told to modify sources.list.  I googled a lot and added some repos into it and ran update and upgrade command only to see Kali crash... I had to recover it.  Please mention the exact content that should be there to ensure that Kali Linux works. Taylor expansion for $\arcsin^2{x}$ I stumbled upon this particular expansion that was included in  post.    $$ \displaystyle \arcsin^{2}(x) = \frac{1}{2} \sum_{n=1}^{\infty} \frac{1}{n^{2} \binom{2n}{n}} (2x)^{2n}$$    This caught my eye because I remember trying to derive a Taylor series for $\arcsin^{2}(x)$ a while ago without much success.  Can anyone prove this or point me to a material that would show a proof of this identity?  EDIT :  Feel free to use any mathematical apparatus at hand. I'm not interested in a proof fit for a certain level, nor am I looking for utmost elegance (though that would be lovely). Disabled mac os SIP but still can't delete default apps I'm using mac os 11.2.1 Big Sur. My question concerns using the Terminal utility to delete Apple default apps protected by SIP. I have disabled System Integrity Protection and confirmed that it is off by typing: csrutil  Terminal duly returns &quot;disabled&quot; to confirm that SIP is definitely off. I then attempted to delete various Apple default apps, as follows: sudo rm -rf FaceTime.app/  sudo rm -rf TV.app/  sudo rm -rf Mail.app/  But nothing seems to happen. The apps are still in my Applications folder and launch normally. If I try to delete them manually, I get a beep and the deletion is rejected just as if SIP were still enabled. Can someone suggest a better way to remove Mail? Why do computers only use 0 and 1? Why do computers only use 0 and 1? Won't the addition of other numbers such as 2 or 3 speed up computers? Also, 2 and 3 can be used to shorten the bit-length of integers (2 and 3 can be used to end an integer, so that the number 1 only needs one two bits.)..  Why is binary computer more preferred? Shouldn't the badge requirements scale? Many badges have fixed requirements, such as:   Answer score of 100 or more   However different websites means a different level of difficulty: the more active users a website has, the easier the badge is to get.  On a new and/or low-view website getting this badge may be impossible for several months; on a website like stack overflow now you can obtain it in a day, and it's relatively easy (compared to other SE sites).  Do you think it would be a good idea to implement a formula that allows the required score to scale? The more active users voting, the more votes are required to get it?  If yes how would you handle people who got it for a post that no longer meets the requirements? Mysterious contact by advanced aliens; leaves humans insane It'd be great if anyone could remember the source of this short story I only dimly remember, but recall finding quite haunting back in my youth.  I read it maybe 20 years ago in a paperback that probably dated from the '80s.  It begins with the protagonist (a young man) being being woken by a deafening noise coming through his cochlear implant.  He's on a spaceship, and has volunteered to be put in a capsule and fired off to a remote part of the solar system.  Once in place in their capsule, the volunteers are visited by what is (presumably) a highly intelligent alien life-form, and gifted with some artefact containing priceless knowledge, like, for example, the cure for cancer.  The (unexplained) encounter leaves the them completely and irrevocably insane, perhaps terrified out of the minds.  Yet despite this, volunteers still clamour to be chosen for the mission. $k[x]/(x^n)$ module with finite free resolution is free I need to generate random numbers within a specified interval, [max;min].  Also, the random numbers should be uniformly distributed over the interval, not located to a particular point.  Currenly I am generating as:  for(int i=0; i&lt;6; i++) {     DWORD random = rand()%(max-min+1) + min; }   From my tests, random numbers are generated around one point only.  Example min = 3604607; max = 7654607;   Random numbers generated:  3631594 3609293 3630000 3628441 3636376 3621404   From answers below: OK, RAND_MAX is 32767. I am on C++ Windows platform. Is there any other method to generate random numbers with a uniform distribution? Migration stats not consistent between sites Apparently, as a result of  it appears that Yannis and myself see different statistics when going to the programmers.SE.com migration stats tool and the stackoverflow.com tool respectively.    :        while I see:        Why are the rejection rates so radically different?  Which is correct?  (Or am I simply misinterpreting the data somehow and these are representing different statistics) I use to run  $s =~ s/[^[:print:]]//g;   on Perl to get rid of non printable characters.   In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is printable or not.   What would you do?   EDIT: It has to support Unicode characters as well. The string.printable way will happily strip them out of the output.  curses.ascii.isprint will return false for any unicode character. Do I add quotes around my thoughts? He staggered in, late as usual, his hair this way and his collar the other. His socks were as mismatched as were his principles. I thought to myself, here comes yet another disastrous sales meeting.  It seems to me too much to write :     I thought to myself 'Here comes yet another disastrous sales meeting'.   The Authorised Version deliberately did away with punctuated speech, retaining only the capital to indicate the beginning of a quote but leaving out quotation marks.  Can I therefore do the same in common writing, for my thoughts ?     I thought to myself, Here comes yet another disastrous sales meeting.   I cannot find another question on EL&amp;U which covers this. How do I implement basic "Long Polling"? Performance differences between visibility:hidden and display:none Reentering serial number in Windows 7 Does anyone know how to install a new serial on a working copy of Windows 7 - I get notified that my software is not genuine but cannot reenter the serial