About 5 years ago, I managed to convert a pointer to a int, store it temporarily and then take that int and convert it back to a pointer (Objective-C). But I can't for my life remember how I did it.  Can anyone help me out?
I am trying to adapt an existing code to a 64 bit machine. The main problem is that in one function, the previous coder uses a void* argument that is converted into suitable type in the function itself. A short example:  void function(MESSAGE_ID id, void* param) {     if(id == FOO) {         int real_param = (int)param;         // ...     } }   Of course, on a 64 bit machine, I get the error:  error: cast from 'void*' to 'int' loses precision   I would like to correct this so that it still works on a 32 bit machine and as cleanly as possible. Any idea ?
Evaluate $ \int_{0}^{\frac{\pi}2}\frac1{(1+x^2)(1+\tan x)}\:\mathrm dx$ Can others in my party go through TSA PreCheck? If I have  (i.e. I have a KTN from TSA and the "pre-check" logo gets printed on my boarding pass) and a travel companion does not, can they go with me through the PreCheck security lines? This is assuming that the travel companion is booked in the same reservation on the same flights and is also a U.S. citizen and not on any no-fly or otherwise increased scrutiny lists.  I'm guessing the answer is no, but I haven't seen anything from TSA specifically addressing this. Can you retrain the Magic Initiate spell using the Spellcasting feature? got me thinking about the mechanics of the Magic Initiate feat when you have class levels in the class into which you were inducted.    Among the classes you can pick with this feat are the Bard, Sorcerer, and Warlock, which know a limited number of spells and all have the same statement under Spells Known.     Additionally, when you gain a level in this class, you can choose one of the [class] spells you know and replace it with another spell from the [class] spell list , which must also be of a level for which you have spell slots.   The term "learning" is used both to describe new spells acquired on level-up and the spell acquired through the feat. This would seem to indicate your Magic Initiate spell counts among the spells you know, and is thus eligible for retraining if you learned it as a spell of your class.  An odd change in wording occurs during the Magic Initiate feat description (emphasis mine):     In addition, choose one 1st-level spell from the same list. You learn that spell and can cast it at its lowest level.   This generalization in describing the learned spell's level seems to imply that there exists a scenario where it would not be appropriate to restrict the spell to being cast as a 1st-level spell.  Could one of the charisma casters retrain Magic Initiate into a higher level spell, which they could then cast once per long rest without using a slot?  This would turn an otherwise unexciting feat into, effectively, a Mystic Arcanum for Bards and Sorcerers. This seems too powerful to be intentional,  but the feat description appears to have gone out of its way to permit it. Is there a way to check if a file is in use? mariadb Unknown system variable 'server_uuid' Im trying to setup replication between mariadb(10.1.31-MariaDB - MASTER) and mysql(5.7.12-log - SLAVE). After executed the start slave, I got the below error.     Fatal error: The slave I/O thread stops because a fatal error is   encountered when it tries to get the value of SERVER_UUID variable   from master.   Then I tried to get the value of master_uuid.  MariaDB [(none)]&gt; show variables like '%server_uuid%'; Empty set (0.00 sec)   Then tried to setup this in mysql prompt.  MariaDB [(none)]&gt; set global  server_uuid = 11123c25-cac0-3523-8089-4c54d9b46f33; ERROR 1193 (HY000): Unknown system variable 'server_uuid'   And also I tried to setup auto.cnf in data directory.  [auto] server_uuid = 11123c25-cac0-3523-8089-4c54d9b46f33  chmod 644 auto.cnf   But still im getting the fatal error is encountered when it tries to get the value of SERVER_UUID variable from master. How do I add a Pokestop to my area? Hypernym for "audiobook", "podcast", "speech", etc.? In school, I have always seen sets. I was watching a video the other day about functors, and they started talking about a set being a collection, but not vice-versa. I also heard people talking about classes. What is their relation? Some background would be nice.   It has to do with something called Russell's paradox, but I don't know what that is.   I think that the difference between a family and a set is that the former is a function and the latter is a set. Is this right? Number of zero digits in factorials Here is a riddle someone has been asked in a job interview: How many zero digits are there in $100!$?  Well, I found the first $24$ quite fast by counting how many times five divides $100!$ ($5$ divides $20$ times and $25$ divides it $4$ times).   However, there are more zero digits in the middle of the number (these can be found by hand, by typing factorial(100) in sage).  My question is whether there is a smart way to determine the number of zero digits in $100!$, and more generally in $n!$.  By the way, this will not affect the job interview as it was finished some time ago. Proof relation between Levi-Civita symbol and Kronecker deltas in Group Theory In order to prove the following identity: $$\sum_{k}\epsilon_{ijk}\epsilon_{lmk}=\delta_{il}\delta_{jm}-\delta_{im}\delta_{jl}$$ Instead of checking this by brute force, Landau writes thr product of Levi-Civita symbols as: $$\epsilon_{ijk}\epsilon_{lmn}=\det\left|    \begin{array}{cccc}       \delta_{il}   &amp; \delta_{im}  &amp; \delta_{in}   \\       \delta_{jl}   &amp; \delta_{jm}  &amp; \delta_{jn}   \\       \delta_{kl}   &amp; \delta_{km}  &amp; \delta_{kn}       \end{array} \right| $$  The proof that the equalty holds is quite straightforward if you consider what values the indices can take. But I've been told that there's a much more profound and elegant demonstration based on the representation of the symmetric group.  Does anybody know this approach based on group theory? Any open subset of $\Bbb R$ is a countable union of disjoint open intervals Let $U$ be an open set in $\mathbb R$. Then $U$ is a countable union of disjoint intervals.    This question has probably been asked. However, I am not interested in just getting the answer to it. Rather, I am interested in collecting as many different proofs of it which are as diverse as possible. A professor told me that there are many. So, I invite everyone who has seen proofs of this fact to share them with the community. I think it is a result worth knowing how to prove in many different ways and having a post that combines as many of them as possible will, no doubt, be quite useful. After two days, I will place a bounty on this question to attract as many people as possible. Of course, any comments, corrections, suggestions, links to papers/notes etc. are more than welcome. What is the REST endpoint URL to get list of site collections? If I go to SharePoint 2013 site, click on Admin -> SharePoint, you will see a list of site collections (the link is https://somename-admin.sharepoint.com/_layouts/15/online/SiteCollections.aspx)  What is the REST endpoint URL to get this list of site collections ?  I was trying _api/search/query?querytext='contentclass:sts_site' or _api/search/query?querytext='contentclass:sts_web', but it doesn't give the whole list... trim is not part of the standard c/c++ library? Is it me or are there no standard trim functions in the c or c++ library? is there any single function that acts as a trim? If not can anyone tell me Why trim is not part of the standard library? (i know trim is in boost)  My trim code is  std::string trim(const std::string &amp;str) {     size_t s = str.find_first_not_of(" \n\r\t");     size_t e = str.find_last_not_of (" \n\r\t");      if(( string::npos == s) || ( string::npos == e))         return "";     else         return str.substr(s, e-s+1); }   test: cout &lt;&lt; trim("  \n\r\r\n \r\n text here\nwith return   \n\r\r\n \r\n "); -edit- i mostly wanted to know why it wasnt in the standard library, BobbyShaftoe answer is great. How do I delete folders and files that were older than 7 days on the command line? I want to delete folders and its files were created longer than 7 days using the command line. I have a late 2013 27" iMac running  Yosemite, and it randomly shuts off every now and then. I tried everything Reset SMC. Diagnostics, reformat Macintosh HD but still occurs and running out of options. I met this equation frequently in Guass-Newton optimizations. But I dont understand why the left and right side of the equation can be equal.  Lets say the Jacobian is $2$ by $2$   and Hessian is $$\begin{bmatrix}\frac{\partial^2f_1}{\partial^2 x_1 } &amp; \frac{\partial^2f_1}{\partial^2 x_2  } \\ \frac{\partial^2f_2}{\partial^2 x_1 } &amp; \frac{\partial^2f_2}{\partial^2 x_2  }\end{bmatrix}$$   But the right hand side of the equation is  $$J^TJ =\begin{bmatrix} \left( \frac{\partial f_1}{\partial x_1} \right)^2 + \left( \frac{\partial f_2}{\partial x_1} \right)^2  &amp;  \frac{\partial f_1}{\partial x_1}\frac{\partial f_1}{\partial x_2} +\frac{\partial f_2}{\partial x_1}\frac{\partial f_2}{\partial x_1}\\ \frac{\partial f_1}{\partial x_1}\frac{\partial f_1}{\partial x_2} +\frac{\partial f_2}{\partial x_1}\frac{\partial f_2}{\partial x_1} &amp;\left( \frac{\partial f_1}{\partial x_2} \right)^2 + \left( \frac{\partial f_2}{\partial x_2} \right)^2\end{bmatrix} $$  Why can these two be equal as presented in papers? I am notified about old comments instead of new ones I have three notifications pending but when I open the tab they were a month ago. When I refresh the page I see the correct three notifications. Pictures:  Here you see notifications from March but it is April:    Here I refreshed the page and recognized that there are indeed three unread notifications.    This behavior occurred already three times before, always with the spinlock question as first comment. Today I finally realized that there were indeed notifications pending.  Is this a bug to report? If this is not the right side to ask about this - where should I go to?  Edit 1  Browser: Firefox 28.0 (current version) Windows 7 on a Laptop  It only appears on the favourites side. When I open  I see the current comments.  Edit 2  On favourites I see the old issue    On meta and stackoverflow I see the new comment   Edit3  Still an issue on April 11th and April 16th. The question is more like: Can somebody remove this or show me a way to remove it or let it remove?  Edit4  April 20th at 14:00GMT the favourite tags turned into an error page: Let $A \in Mat_{n \times n}(F)$ a matrix which satisfies $A^n=0$ and $A^{n-1} \ne 0$ for some positive integer $n$. Let $v \in F^n$ be such that $A^{n-1}v \ne 0$.  Prove that $\{v, Av, A^2v,...,A^{n-1}v\}$ is a basis for $F^n$.     So, from definition of $A$, I know that $A^iv \ne 0$ for all $0\le i \le n-1$. I know I need to prove the set is linearly independent and span $F^n$ to prove it's a basis, but I just don't know how. Fixing "Page is not mobile friendly" report from Google test In search results google reports "this page is not mobile-friendly". I want to fix this.   when I test my website in the mobile-friendly test, it reports:   Content wider than screen. Clickable elements too close together.   How can I find the items/content that are creating these problems?  Any help would be appreciated. Is the sign of principal components meaningless? Does the sign of the vectors returned by PCA have any significance after I center my variables?