I have a basic memory allocation related question. What would be the total sizes of the below structs in C?  typedef struct rubble {     int betty;     char barney[4];     struct rubble* bambam; } rubble;  typedef struct{     short* wilma[2];     short fred[2];     rubble dino; }flinstone;   For rubble = betty( 4 bytes ) + barney ( 4 bytes ) + bambam ( ? ). What would be the size of the bambam pointer to rubble type?  For flinstone = wilma ( 4 bytes ? ) + fred ( 4 bytes ) + dino( sizeof(rubble) )  How do we calculate the size of pointer to type short in this case?
Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?
Got French Schengen visa but no "VIS" after giving fingerprints Are Mersenne prime exponents always odd? I have been researching  so I can write a program that finds them. A Mersenne prime looks like $2^n-1$. When calculating them, I have noticed that the $n$ value always appears to be odd. Is there confirmation or proof of this being true? I accidentally unset all the directories of $PATH while trying to add a new one in ~/.bashrc. I opened a new terminal window as I was editing and now $PATH is empty. I'm worried if I boot from another drive to find the $PATH I won't be able to boot into this drive again.  Basically, what is the default result of echo $PATH? I'm trying to process some data in Excel. The data includes numeric account numbers and other long numeric strings (like cell phone MEIDs). I am not doing math operations on these strings, so I want Excel to treat them as plain text.  Here is what is making me nuts (this is Excel 2010):   Take a long number like 1240800388917 and paste it in a cell in a new worksheet. Excel's default cell format is general, so the string is presented in scientific notation as 1.2408E+12 Right click on the cell, select Format Cells, set the format to Text   The cell is still displayed in scientific notation, even though the format has been set to text.  Now, if I do the steps in a different order:   Format an empty cell as text. Right click on the cell, select Format Cells, set the format to Text Take a long number like 1240800388917 and paste it in to the text formatted cell   Now, the cell is displayed as a string and not in scientific notation.  The results remaining in scientific notation even though the cell is formatted as text just seems broken to me. I've seen suggested work-arounds like: use CSV import and set the format to text, add a space character to the beginning of each numeric string, and others.  Is there a simple good work around to easily keep these strings formatted as text?  Why on earth does Excel do this?  Related SU questions I found:  and I'm trying to compute the shadow of 3D objects on the ground. To do this I'm assuming parallel rays from Sun origin.   Let's assume the Sun direction is given by azimuth $\varphi$ and elevation $\theta$ angles. So the direction unit vector is retrieved as:  $$ \hat{\mathbf{s}} = \mathbf{R}_y\left(\theta\right)\mathbf{R}_z\left(\varphi\right)\hat{\boldsymbol{\imath}}$$  where $\mathbf{R}_{x/y/z}$ are the rotation matrices along the $x, y, z$ axes given by, for example, Euler-Rodrigues equation, and $\hat{\boldsymbol{\imath}}$ is the unit vector along $x$-axis.  A point on a ray-line has the equation:  \begin{equation} \mathbf{r} = \mathbf{r}_p + \lambda\hat{\mathbf{s}}  \tag{1} \end{equation}  being $\mathbf{r}_p$ a point on that line.  A point on a general plane is given by the equation:  \begin{equation} \left(\mathbf{r} - \mathbf{r_0}\right)\cdot \hat{\mathbf{n}} = 0 \tag{2} \end{equation}  being $\mathbf{r}_0$ a point on the plane and $\hat{\mathbf{n}}$ the unit vector normal to that plane.   Ensuring the validity of both equations (1) and (2) allows to compute the $\lambda$ multiplier and retrieve the position vector of the projected point (writing $\tilde{\mathbf{r}} = \mathbf{r_p} - \mathbf{r_o}$)  \begin{gather} \lambda = - \left(\frac{\tilde{\mathbf{r}}\cdot \hat{\mathbf{n}}} {\hat{\mathbf{s}}\cdot\hat{\mathbf{n}}}\right) \\ \mathbf{r}_\text{proj} = \mathbf{r}_p - \left(\frac{\tilde{\mathbf{r}}\cdot \hat{\mathbf{n}}} {\hat{\mathbf{s}}\cdot\hat{\mathbf{n}}}\right)\hat{\mathbf{s}} \tag{3} \end{gather}  Applying eq. (3) to all the vertices of a mesh $\left\{\mathbf{r}_{p_i}\right\}$ .   A problem can be noted: $\hat{\mathbf{s}}\cdot \hat{\mathbf{n}}$ can be zero (e.g. Sun is horizontal, i.e. the ray is ortogonal to the normal of plane).   Are there some conceptual mistakes in my reasoning? Is there a way to rewrite the operation as a linear operator applied to the set of vertices position vectors?   $$ \left[\mathbf{A}\right]\left\{\mathbf{r}_{p_i}\right\} = \mathbf{r}_\text{proj}$$ What is the best backup strategy for macbook pro laptop? I have a lot of data on my macbook pro retina laptop and i am looking for the best backup strategy.  I have previously had a windows desktop with an external harddrive connected all of the time and a backup program that copied to the external harddrive incrementally.  I am trying to figure out the best backup strategy given its a laptop that i move around with and travel with alot (so can't really have a external hard drive always connected)  What is the recommended backup solution for map laptops? : So how many named special cases of each modal verb are there, in toto? There's   1. subjunctive should, and   2. mandative should, and   3. , at least;   and I s[up]pose 4. Should we? is suggestive should, and   5. Shouldn't we? is tag **should**, and I can think of a lot more.    I ask about only operative uses of this modal verb including literary and formal usage,  but please omit anything obsolete. I'm trying to classify them and learn the formal terms describing each. Are there any apt others in addition to the ones above? (I added the enumeration below)  1. What's 'subjunctive should'?  Whenever should is conjugated in the subjunctive mood? 5. What's a tag **should** ? 6. Where does  should/would  feature? What's it called? This should is detailed in   or  or . sum pair of columns based on matching fields What resolution should a large format artwork for print be? Prove 24 divides $u^3-u$ for all odd natural numbers $u$ At our college, a professor told us to prove by a semi-formal demonstration (without complete induction):   For every odd natural: $24\mid(u^3-u)$   He said that that example was taken from a high school book - maybe I din't get something, but I really have no idea to prove that without using complete induction.  Any idea of smart demonstration?  Thanks for your help. (Excuse my bad English.) Carrying confidential corporate data into US on laptop/Drive/device - how to prevent data theft? If I travel to the US and had privacy concerns (for instance may be I was afraid that a rogue customs official may steal said data) what is the current recommended best practice to avoid this? Concurrent updates to GDAL (to 2.1.3) and QGIS (to 2.18.5) on Linux Mint 18.1 from the Ubuntugis repos breaks QGIS, with a noted dependency for the virtual package gdal-abi-2-1-2 being uninstallable.    The stable Ubuntugis ppa currently supplies GDAL 2.1.0 (gdal-abi-2-1-0) while the Ubuntugis-unstable ppa has been updated to GDAL 2.1.3 (gdal-abi-2-1-3).  Has anyone found a way around this?    Update:  QGIS bug report for those interested is here:     UPDATE 2  The ticket has been closed as fixed. Everything should be back to normal now. Do multiple instances of the Extra Attack feature stack? The WotC article  creates the &quot;Favored Soul&quot; sorcerous origin, which grants the the sorcerer the Extra Attack feature at level 6. Say I made Favored Soul sorcerer go up to level 6, and then multiclassed into Ranger to get its Extra Attack at level 5. Would the two Extra Attack features stack so that I could get 3 or 4 attacks in a turn? Convert a string to an enum in C# What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: StatusEnum MyStatus = StatusEnum.Parse(&quot;Active&quot;);  but that isn't a valid code. Is there any way to increase the drop rate of items? Some items in Terraria drop only very rarely from certain enemies. It's a pain having to farm so many enemies to try to get these rare items. Is there any way to make them drop more often? How does a wheelie work? So I've been trying to create a mathematical model for an electric motorcycle and began to wonder about the maximum possible torque that could be supplied to the rear driven wheel without having the bike begin to lift up on one wheel.  I found ways to calculate this value online; however, the basic concept as to how the bike actually lifts escapes me.    My problem started when I began to think about what axis the bike will rotate about when it is doing the wheelie.  My first intuition was that the frame and front wheel, together, rotate about the rear axle.  But when I drew a free body diagram of the frame/front wheel system just at liftoff (see below) I made note that the only forces acting about the rear axle, point O, is the force of weight.  This means that an increase in applied torque and subsequently, the applied force Fa, should not effect the rotation about the rear axle.  I know that the applied force on the back wheel is indeed correlated with the propensity for a bike to wheelie, so I considered that the axis of rotation I was choosing was wrong.  If we take the free body diagram above and sum the moments about the center of mass, we would find that an increased applied force would in fact cause the solid body to rotate.  The problem with this understanding is that during rotation, the center of mass of the drawn system should actually rises relative to the surface the bike is moving across.  If the bike were to be truly rotating about its center of mass, then the back wheel would begin to dip below the surface of the road like you might see in a glitchy video game.    So I suspect that the bike is in fact rotating about the back axle, but I don't understand why, please help!  edit: I added the external torque from the back wheel to the frame, which would allow the bike to rotate about the back axle  edit 2:  I suppose that the torque acting on the frame via the engine should not effect the rotation as the movement of a motorcycle can be perfectly replicated by applying a force at the back axle.  A third possible axis of rotation might be the lowest point of the back wheel. Apache 2.4 - 403 HTTP status code how many terms will there be once you collect terms with equal monomials? What is the sum of all the coefficients? If you expand $(x_1+x_2+\cdots+x_k)^n$, how many terms will there be once you collect terms with equal monomials? What is the sum of all the coefficients?  I'm kind of lost here. This came up with other questions on the topic of binomial coefficients, and i have figured those out. I have spent almost an hour trying to figure where to start and haven't made any progress. Short story with space microbes latching onto electromagnetic fields This is a sci-fi story set on Earth. From the depths of space comes these microbes that latch onto electromagnetic fields. Anything electronic is rendered useless. There's the usual stuff where governments try to solve the issue but make it ultimately worse. It's only when they realise that the microbes surround the planet that they realise it is futile. The story closes with people having returned to a simpler life, using medieval farming methods, not using electricity in any form, getting about by horse, etc. I think it was a short story. Is this a valid proof for the reverse triangle inequality: Given $x,\,y\in\mathbb{R}^n$, $\|x-y\|\ge |\|x\| - \|y\||$. $\def\a{{\bf a}} \def\b{{\bf b}}$ $\def\x{{\bf x}}$ $\def\y{{\bf y}}$  I've seen various methods of proving the reverse triangle inequality but I was wondering if this one is fine as well.   Prove the reverse triangle inequality:  Given $\x,\,\y\in\mathbb{R}^n$, $\|\x-\y\|\ge |\|\x\| - \|\y\||$.   $\textbf{Solution}$ Let $\x,\y \in \mathbb{R}^n$. Now, $\x=\x-\y+\y$ and so $||\x|| = ||\x-\y+\y|| \le ||\x-\y|| + ||\y||$ by triangle inequality. Thus, $||\x|| - ||\y|| \le ||\x-\y||$ [*].   Now for $\y$. Again, $\y = \y-\x+\x$ so $||\y|| = ||\y-\x+\x||$ implies $||\y|| \le ||\y-\x|| + ||\x||$ by triangle inequality. So, $||\y|| - ||\x||\le ||\x-\y||$. Hence, $-||\x-\y|| \le ||\x|| - ||\y||$ [**].   By [*] and [**], $-||\x-\y|| \le ||\x|| - ||\y|| &lt; ||\x-\y||$ implying $\bigl ||\x|| - ||\y|| \bigr\rvert \le ||\x-\y||$ for all $\x,\y \in \mathbb{R}^n$.