When should I set the AllowUnsafeUpdates property?
When & why I need to use web.AllowUnsafeUpdates = true
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? How to test with Math.random in JavaScript? Roll a 6-sided die until the total $\geq M$. Mean amount by which $M$ is exceeded? Here is the question:  You roll a fair 6-sided dice iteratively until the sum of the dice rolls is greater than or equal to M. What is the mean and standard deviation of the sum minus M when M=300?  Should I write a code to answer these kind of questions?  Please give me some hints on that. thanks! Show group of order $4n + 2$ has a subgroup of index 2. Let $n$ be a positive integer. Show that any group of order $4n + 2$ has a subgroup of index 2. (Hint: Use left regular representation and Cauchy's Theorem to get an odd permutation.)  I can easily observe that $\vert G \vert = 2(2n + 1)$ so $2 \mid \vert G \vert$ and 2 is prime. We have satisfied the hypothesis of Cauchy's Theorem so we can say $G$ contains an element of order 2.  This is where I am stuck  I am confused about how the left regular representation relates to the group. So my understanding at this point is that every group is isomorphic to a subgroup of some symmetric group. My question: is the left regular representation $\varphi : G \to S_G$ an isomorphism? where $G \cong S_G$ or is $S_G$ the same thing as $S_{\vert G \vert}$ and $\varphi$ is only an injection? I'm using Dummit and Foote for definitions.  I saw an argument online that said that since we have an element of order 2, there is a $\sigma \in S_G$ of order 2, but it is a product of $2n + 1$ disjoint 2-cycles. I don't understand how they could claim this and tried working it out on my own but didn't get there. -- They then went on to use the parity mapping $\varepsilon : S_G \to \{\pm1\}$ and since we have an odd permutation $\sigma$, we have $[S_G:\text{ker }\varepsilon] = 2$. I understood their computation but not how that directly shows that $G$ has a subgroup of order 2? unless $G \cong S_G$ because of how left regular representation is defined. (but again, I'm not understanding that concept very well yet.)  So, to be clear about my questions:   What is meant by left regular representation, is it an isomorphism or just an injection? and how would it be used here. If it is an isomorphism, the argument online starts to make more sense, but how can they say that since $\sigma$ is even, it is made up of $2n + 1$ disjoint transpositions? If you have a full, proof, I'd appreciate it, but good hints are just as good!   Thanks you! Who should own files shared by a group and where should they go Is $\{\frac{m}{10^n}\mid m,n\in\mathbb Z,\ n\geq 0\}$ dense in $\mathbb R$? The set $S$ of real numbers of the form $m/10^n$, $m,n$ integers and $n$ greater than or equal to $0$, is a dense subset of $\mathbb R$ or not??   I know dense means closure of $S$ in $\mathbb R$ is $\mathbb R$ then it will be dense. How to prove or disprove I have no idea. I have Windows 8 (final, MSDN) on my Macbook Pro Retina.  Windows 8's ongoing, continuous tantrum of insisting that it's on a tablet device is causing it to always have a touch keyboard 'icon' on  the taskbar.  The 'icon' is actually a toolbar and I can temporarily disable it by right clicking the taskbar and DE-selecting it. However, upon rebooting the system, it always insists on coming back and activating itself.    How can I permanently disable the touch keyboard toolbar in the taskbar? In ArcMap, when you export data to PDF it preserves the layering within the PDF so that you can turn on/off individual map layers (within the PDF itself).  When I export from QGIS to PDF, I don't appear to have the option for this.  Does QGIS support preserving layers when exporting to PDF?  Is there a special setting needed to enable this capability?  Or has anyone wrote a plugin for this feature? What I am asking here is to please remove the privilege to participate in Meta for MSE.  This privilege is literally useless. You can't really have a meta site for a meta site. There's no Meta.Meta.SE here or any other SE site out there: Meta.SE covers for every site in SE, including itself.     When users find out that you don't really get anything new, it's kinda sad for those people. There is no use for it except just to be there and fill up the space between the first and third privilege. Privileges should be shown only if you earn something new, and this privilege to participate in the meta isn't new because it's where you report problems in all of SE, including Meta.SE.    So please remove the privilege to participate in meta just for Meta.SE.    This is not a dupe as this is a feature-request to remove it, not support on why it is there. How do you access browser history? Some e-Marketing tools claim to choose which web page to display based on where you were before. That is, if you've been browsing truck sites and then go to Ford.com, your first page would be of the Ford Explorer.  I know you can get the immediate preceding page with HTTP_REFERRER, but how do you know where they were 6 sites ago? Combinatorial Proof for Binomial Identity: $\sum_{k = 0}^n \binom{k}{p} = \binom{n+1}{p+1}$ I am studying combinatorics and I came across the identity $$\sum\limits_{k=0}^n \binom kp =\binom {n+1}{p+1}.$$ I have read the algebraic proof and it does not appeal to me. Is there an elegant counting trick we can use to arrive at this identity? Why can't I log into minecraft with a mojang account? I created a Mojang account and downloaded the Minecraft launcher, but when I started it up, I couldn't log in. Since the log in fields did not require a username, I tried typing in my email, and still couldn't log in. I've tried after resetting my password, but that didn't work either. What am I supposed to do to log in and play? How do the Planets and Sun get their initial rotation? Why do Venus and Mercury rotate so slowly compared to other planets?  Why does Venus rotate in a different direction to Mercury, Earth and Mars? If you have a single atom in a box, what state of matter would it be in? If the walls of the box were made of a completely inert material, what state of matter would the atom be in? Or would it not have one? I realized this is a duplicate of several other questions. I'm looking for a library/method to parse an html file with more html specific features than generic xml parsing libraries. Network booting couldn't find kernel image I have a problem with PXE booting. I followed  on the Ubuntu help wiki. But I get an error on client machine:  Could not find kernel image: vmlinuz-3.13.0-24-generic   And now, question. This image should be in pxelinux.cfg folder, am I right? When is it appropriate to use that as opposed to which with relative clauses? I am trying to write an if statement to test whether there are any files matching a certain pattern. If there is a text file in a directory it should run a given script.  My code currently:  if [ -f /*.txt ]; then ./script fi   Please give some ideas; I only want to run the script if there is a .txt in the directory. Is it wrong to ask the same question elsewhere? I just posted a question to  and afterward realized that it might not be answered very quickly due to how specific it was. So I also posted it on the   I plan to update both the SU and Ubuntu posts with the final answer I end up using, but I can't help but feel users from both places might not like that I've posted to both.  So my question is: Is it frowned upon to post the same question elsewhere and link to it? Does blocking an attack with the Shield spell still trigger Armor of Agathys? I am contemplating a Oath of Conquest Paladin / Sorcerer multiclass character, with a 1 level dip in hexblade warlock. This character will have access to the Armor of Agathys and Shield spells, which potentially allows for a pretty nice combo. The Shield spell states (PHB 275):  Casting Time: 1 reaction, which you take when you are hit by an attack or targeted by the magic missile spell... Until the start of your next turn, you have a +5 bonus to AC, including against the triggering attack,  It looks like you are indeed hit by an attack, but since you have a bonus to AC, you can potentially force that attack to miss instead. Armor of Agathys states (PHB 215),  If a creature hits you with a melee attack while you have these hit points, the creature takes 5 cold damage.  If I cast Shield and cause an attack that &quot;hit&quot; me to miss, does Armor of Agathys still deal damage? I am leaning toward yes, though this combo seems a little too strong--Shield is already a strong spell, and this character will eventually have 9 1st level spell slots and a 7th level spell slot. Not only can they freely block attacks with Shield, but they can also deal up to 35 (5d10) damage to the attacker without an attack roll or saving throw. While a Warlock would have to spend both of their spell slots to do this once, my character would be able to do this 4 times with spell slots to spare. Some notes:    ask about reducing the damage from a confirmed hit to zero. This question is asking about what happens when the Shield spell causes the attack to miss entirely. A number of online resources, such as the Roll20 5th edition compendium, seem to be missing the correct casting time for the Shield spell. Answerers should make sure they're looking at the correct version from the PHB.