Please explain the output of this piece of C code I am not able to make sense of the first line inside the loop body.  How to interpret this statement:         printf("%d", i++[a]);      #include &lt;stdio.h&gt;      int main()     {          int a[5] = {1,2,3,4,5};          for(int i=0; i&lt;5; i+2){             printf("%d", i++[a]);             printf(",%d",i);         }          return 0;     }   Output  1,12,23,34,45,5
With arrays, why is it the case that a[5] == 5[a]? As Joel points out in , in  (aka: K &amp; R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?
Encouraging people to explain downvotes in the street or on the street How to apply the same style to different columns? For many of my datasets I have the same imported data duplicated numerous times, each iteration displaying the data values for a different column (in my case it's fish catch weight per gridded cell per year, so lots of iterations of the same grid, with a different pattern of values per year).  For presentation purposes, it strikes me as helpful to use the same scale for each year, so I go to the original data and divide the maximum value into (arbitrarily) 10 classes and manually input the values and labels after setting the desired colour ramp and input data field:   This is extremely tedious, not just the manual excel calculation part, but also the input interface for the values &amp; labels*, hence my intention to make use of the 'save style' option. HOWEVER: when I save the style as QML and load it for the next layer, it saves everything - including the data field (in my case, year). When I change this field, QGis automatically generates the values &amp; labels based on the data for that field, ditching all of the values &amp; labels I set.   Is there any way to avoid this happening &amp; thereby duplicate class number, values and labels for each field by simply loading a style? (somewhat meta) Am I going around this the wrong way, OR, is there a different face I could use to climb this mountain? Prove that if $P$ is a $p$-Sylow subgroup of $G$ and $N \triangleleft\&gt; G$ then:    $ PN/N $ is a $p$-Sylow subgroup of $G/N$ $P \cap N $ is a $p$-Sylow subgroup of $N$ Why is $ the default symbol for a user shell and # the default symbol for a root shell? Operating a standard bash shell on a server, the PS1 prompt defaults to ending in a $ for non-root users, and # for root.  IE:  ubuntu@server:~$ sudo su root@server:/home/ubuntu#   Why is this? How to solve $x^3=-1$? How to solve $x^3=-1$? I got following:  $x^3=-1$   $x=(-1)^{\frac{1}{3}}$  $x=\frac{(-1)^{\frac{1}{2}}}{(-1)^{\frac{1}{6}}}=\frac{i}{(-1)^{\frac{1}{6}}}$... What is the coefficient of the term $a^i b^j c^k$ in the expansion of $(a+b+c)^n$? What is the coefficient of the term $a^i b^j c^k$  in the expansion of   $(a+b+c)^n$ ?   Given solution:     Before collecting like terms, each term in the expansion is a product   of $n$ factors each  of which is $a, b,$ or $c$.  Those terms which   have exactly i a’s, j b’s and k c’s can be combined into   the single term $a^i b^j c^k$ and the number of such terms will be   equal to the number of n letter strings containing i a’s, j b’s and k   c’s, which by the Mississippi rule is $\frac{n!}{(i!\times j! \times  k!)}$.   I understand that this problem is actually about the derivation of the coefficient of the multinomial theorem,but I am not sure about the combinatoric reasoning,what I mean is that I understand the analogy problem but what I couldn't is how the analogy holds here,Could anybody explain this to me? We have given isosceles triangle $ABC$ with baseline $AB$. Point $M$ is midpoint of AB. Draw perpendicular line to side $AC$ through $M$ which intersects $AC$ in point $H$. Let $P$ be midpoint of $MH$. Show that lines $BH$ and $CP$ are perpendicular to each other.  I also have "hint": Construct height $BD$ to side $AC$ and look at the triangles $ABD$ and $MCH$.  Analytically there is no problem but I get stuck in geometrical approach to solution. Why are the power transmission/distribution systems AC and not DC? Why are there non-visible objects in my final render? The names of the derived functors $\operatorname{Tor}$ and $\operatorname{Ext}$ seem quite cryptic to me. Does anyone know what these abbreviations stand for? I would be glad if someone could tell me where these names come from. Special package combination gives "No room for new \write." Create alphabetical pager Cheat-proof online die roller? I am looking for an online die roller that works similarly to the following:   The GM provides a string identifier to the player. E.g., "gandalf attacks balrog #12"   The player enters the id on the roller site, which checks it for uniqueness vs the DB, then generates the results, lined to that id.   The GM can check the results by id.     An alternative implementation would be for the GM to request a range of pre-generated ids from the site and hand them out to the players for rolls. E.g., "please roll 5d8 with id #314159265"  Is there anything similar?  Notes and Clarifications:  As Thales Sarczuk inferred, this is indeed for "play by forum/email" games.  The idea is to have "verifiable" rolls, preventing "roll until you you get a good result" scenarios. However, it will be used on forums that are not gaming-specific so using plugins is not an option.  Thank you! I want to extrude a curve in two directions.    Or join both curves into one, is it possible? I've tried copying it and then join segments, but I don't see Remove Doubles option while working with curves. Estimating Uniform distribution endpoints using data with errors Suppose I have a random variable $X$ ~ $Unif(0,\theta)$ where I want to estimate $\theta$. I draw a sample $X_1,...,X_n$.One way is to get a point estimate using e.g.  maximum likelihood estimation via the sufficient statistic $X_{(n)}$.  However, suppose I want a 95% confidence interval of sorts on the value of $\theta$, how should I construct one?  The reason why I am interested in confidence interval is because of the following issue, which is actually my main question (the above prelude on confidence interval is just a suggestion on possible approach). So actually my sample came with some noise, in a sense that I actually observe $X_1+E_1,...,X_n+E_n$ where $E_i$~$N(0,\sigma_i^2)$ independently from each other and from the $X$'s. How should I make some form of statistical estimation about $\theta$? I would prefer some form of confidence estimate. I'm trying to draw a rounded rectangle with round "holes" using  but I need the rectangle borders to be thick and "holes" borders to be thin. Is there a better way to do so than:  \begin{tikzpicture}[x=1mm, y=1mm]     % Background         \fill[fill=black!10] (1.5, 1.5) rectangle (15, -15);      % Fill     \fill[fill=black!2, even odd rule, rounded corners=0.5mm]          (0, 0) rectangle (10, -10)          (2, -2) circle[radius=1.25mm]         (2, -5) circle[radius=1.25mm];     % Rectangle border     \draw[thick, rounded corners=0.5mm] (0, 0) rectangle (10, -10);     % Holes borders     \draw[thin] (2, -2) circle (1.25mm);     \draw[thin] (2, -5) circle (1.25mm); \end{tikzpicture}   The result image should look like this: When to use 'the' in front of a country? Bit of an issue here, trying to render this glass scene    Looks fine in the viewport, but when I hit render    Does anyone know the cause of different view port and final render, and how to fix it?  Here's my Universal type tranformer in Haskell