What would be the size of MyStruct on windows 7 , 64 bit  ?      typedef struct MyStruct_tag    {        char        c;        double      d;        int         s;     } MyStruct;   My answer:   1 (Char) + 7 (Padding) + 8 (double) + 4 (int) = 20 bytes    But the answer is coming out 24 bytes. What is going on ?
Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?
In what cases I should skip 's in possessive case? Advantages of parallel over serial connections As far as my understanding goes, parallel data connections are faster than serial at the same frequency. However, when you increase the frequency in parallel you start getting bits 'cross-talking' and getting transferred onto the next bus. Serial however, since it's only a single bus line, can have the frequency increased to make it faster than parallel without a problem. Also, surely parallel is more expensive as it uses more lines.  So my question is, what actually is the benefit of using a parallel data connection over a serial one? Are there any? If not, why do we still use parallel connections? Adjusting font size with TikZ picture Taking from the PGF manual,  \begin{tikzpicture}   \draw [help lines] (0,0) grid (3,3);   \coordinate (a) at (rnd,rnd);   \coordinate (b) at (3-rnd,3-rnd);   \draw (a) -- (b);   \node (c) at (1,2) {x};   \draw let \p1 = ($ (a)!(c)!(b) - (c) $),             \n1 = {veclen(\x1,\y1)}         in circle [at=(c), radius=\n1]; \end{tikzpicture}   I'd like to increase the size of x. The problem is that I have multiple circles in the same diagram. Some of them require a larger sized font, while others are okay at default. How do I do this? How do you construct a std::string with an embedded null? If I want to construct a std::string with a line like:  std::string my_string("a\0b");   Where i want to have three characters in the resulting string (a, null, b), I only get one.  What is the proper syntax? How do I get Gmail to ask me to be a mailto handler again? Shows "unable to locate package unzip" error I have installed Ubuntu 12.04 server , shows    E:unable to locate the package unzip   the above error is also shown, if I try to install packages also. Can any one help me out to get out from this error. Bias of maximum likelihood estimators for logistic regression Checking if file is checked out through CSOM How many ways can $r$ nonconsecutive integers be chosen from the first $n$ integers? During self-study, I ran across the question of how many ways six numbers can be chosen from the numbers 1 - 49 without replacement, stipulating that no two of the numbers be consecutive.  I can obtain a simple lower bound by saying that, in the worst-case scenario, when you choose a particular number, there are now three numbers that cannot be chosen next.  For example, if I first pick 17, then I can't choose 16, 17, or 18 for the remaining choices.  This gives me the lower bound  $$\frac{49*46*43*40*37*34}{6!} = 6,773,770 \frac{8}{9}$$  This is about 48% of ${}_{49}C_6 =  13,983,816$.  The real answer must be bigger (and an integer).  I haven't found a way to calculate it, though.  The original problem asked to show that the probability of having non-consecutive integers when you choose six is greater than 50%, so if the problem is complicated to count exactly, better approximations that show the answer is above 50% would also be appreciated.   Of course, I can use a computer to do the counting, but I'm interested in learning what methods I'm missing. Find $ P(Z>X+Y)$ where $X,Y,Z \sim U(0,1)$ independently I'm trying to follow a line in a derivation for $P(Z&gt;X+Y)$ where $X,Y,Z$ are independent continuous random variables distributed uniformly on $(0,1)$.  I've already derived the pdf of $X+Y$ using the convolution theorem, but there's a line in the answer that says:  $P(Z&gt;X+Y) = \mathbb{E}[\ P(Z&gt;X+Y\ |\  X+Y )\  ]$ where $\mathbb{E}$ is the expectation.  I'm not familiar with this result. Could anyone give a pointer to a similar result if one exists?  Thanks. In the Harry Potter world, there's the term "muggle" for people with no magical abilities, "muggle-born" for those with magical abilities who's parents are muggles and "squib" for those with no magical abilities who's parents are magical.  But is there any collective term for all magical people (as opposed to wizards for males and witches for females)?  I don't recall seeing any word that refers to all men and women and children with magical abilities, and it's the only group left without noun or collective noun to describe them. How do I delete files that are locked when no other app can delete them? So I found out that I had a Trojan on my external hard drive. My anti-virus app killed it, but it has created a bunch of random files on my computer which cannot be deleted. These are image files. They cannot be renamed - using any method - nor can they be moved, cut, copied, permanently deleted or even opened (in any program).  How can we rid these files from our system?  I have tried:   Right-click > Delete Shift+Delete (Permanently Delete) Swearing   and then:   FileASSASSIN from MalwareBytes Eraser program sdelete program several commands in cmd   but none of them have been successful. How can I completely obliterate these files? Is clockwise or counter-clockwise rotated text easier to read? When rotating text with css, should it be rotated clockwise or counter-clockwise?  Is one more readable than the other?  Counter Clockwise:   &nbsp;&nbsp;&nbsp;&nbsp;&mdash;&nbsp;&nbsp;&nbsp; Clockwise: How do you cite a Github repository? Virtualbox Server/Client topology The problems that appear in difficult math competitions such as the IMO or the Putnam exam are usually very difficult and require some ingenuity to solve. They also usually don't look like they can be solved by simply knowing more advanced theory and the such.  How do people typically come up with these problems? Do they arise naturally from advanced mathematics (the somewhat infamous 'grasshopper problem' from the 2009 IMO comes to mind - to my not exactly knowledgeable mind this problem looks like it popped out of basically nowhere)? What is the perspective that mathematicians take when seemingly "inventing" these problems with no theoretical motivation to them whatsoever? Ubuntu 18.04 opening system settings logs me out How do you calculate this limit $\lim_{n\to\infty}\sum_{k=1}^{n} \frac{k}{n^2+k^2}$? How to find the value of $\lim_{n\to\infty}S(n)$, where $S(n)$ is given by $$S(n)=\displaystyle\sum_{k=1}^{n} \dfrac{k}{n^2+k^2}$$   is unable to calculate it.  This is a question from a questions booklet, and the options for the answer are--  $\begin{align} &amp;A) \dfrac{\pi}{2} \\ &amp;B) \log 2 \\ &amp;C) \dfrac{\pi}{4} \\ &amp;D) \dfrac{1}{2} \log 2 \end{align}$ How could towns restrain a magic user? The modern concept of crime and punishment is very reliant on the ability to disarm and restrain and control an individual (think handcuffs, the dividers in police cars, and jails).  How can that be replicated in a world where even a wizard's apprentice has a much power as an armed man with a handgun?  I've seen stories where magical restraints are present, but you can't write that into every thorp and hamlet, even in Eberron.    How can you restrain a magic user in a fantasy setting?   Either answers that conform to modern concepts of crime and punishment or answers about restraining a magic-user in a psuedo-medieval setting are acceptable. MySQL autoincrement column jumps by 10- why? I have a couple tables in which I created an object ID as either an Int or Bigint, and in both cases, they seem to autoincrement by 10 (ie, the first insert is object ID 1, the second is object ID 11, the third is object ID 21, etc).  Two questions:   Why does it do that? Is that a problem?