The Basilisk in Book 2 reminds me much of Greek mythology Medusa who could kill anyone who sees her with his/her naked eyes.  It was not that some sort of rays or extreme heat or light emits from the eyes (Medusa or Basilisk) - Its just that they look so fearsome and horrified that the person who sees them die of the mere shock.   Now, a person with feelings of fear and foreboding, understandably could die of shock on seeing a real life 50 foot or so giant snake with huge fangs but this however doesn't give any explanation on how the plastic camera of Colin Creevy was damaged and the film inside was burnt when Colin saw the Basilisk through it.   Any theory?
As far as we know the gaze of the basilisk will instantly kill someone or eventually petrify him/her in case the gaze is somehow softened or reflected.   But why would it melt the film in Colin's camera? The film is just plastics with some specific chemicals.   A bit broader question would be - is the some information that the basilisk's gaze is somehow destructive to non-alive objects too and under what circumstances could it happen?
Generate random numbers uniformly over an entire range I need to generate random numbers within a specified interval, [max;min].  Also, the random numbers should be uniformly distributed over the interval, not located to a particular point.  Currenly I am generating as:  for(int i=0; i&lt;6; i++) {     DWORD random = rand()%(max-min+1) + min; }   From my tests, random numbers are generated around one point only.  Example min = 3604607; max = 7654607;   Random numbers generated:  3631594 3609293 3630000 3628441 3636376 3621404   From answers below: OK, RAND_MAX is 32767. I am on C++ Windows platform. Is there any other method to generate random numbers with a uniform distribution? Where to spend a night in the Mumbai airport My girlfriend and I have a layover at the Mumbai airport from 19:35 to 05:55 and we would like to sleep in a cheap place near to the airport (maximum 30 minutes away). Is there any cheap hotel near there? Or any cheap lounge where to sleep well? (flight at 05:55 is an intercontinental flight and we prefer to stay "fresh"). If not possible, is the airport a safe place to sleep? Interpreting the 'metric' column in routing table I'm a little confused about the output I'm seeing in my routing table, particularly the 'metric' column:  $ route -n Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0 172.16.35.0     0.0.0.0         255.255.255.0   U     0      0        0 vmnet1 192.168.0.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0 192.168.82.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet8   According to the man page, metric indicates the 'distance' to the target. I was a little confused about what exactly "target" was. I assumed it was my router (it goes to gateway 0.0.0.0, which then goes to my router at 192.168.0.1). Thus, I expected the metric to be a single hop to my router. However, it's 9! Why is this so number high? Can you use class features while Polymorphed? More specifically I'm trying to understand if a Barbarian who has been polymorphed, either willingly or not would be able to . However this also applies to things such as , or , anything a player might want to continue to use while no longer themselves.  Many questions specify you're able to rage while Wild Shaped, as  specifies      You retain the benefit of any features from your class, race, or other source and can use them if the new form is physically capable of doing so.   However,  specifies the following,     The target's game statistics, including mental ability scores, are replaced by the statistics of the chosen beast. It retains it's alignment and personality.   And     The creature is limited in the actions it can perform by the nature of its new form.   Unlike Wild Shape, nowhere does polymorph specify that you retain benefits from your class or race. Does this imply that class abilities do not carry over to polymorphed individuals? If I have NM cable running into a junction box, can I strip the sheath of the NM cable starting inside the junction box and run the conductors without a sheath through conduit that is connected to the junction box? I understand that the wiring you'd typically use through conduit is THHN or NM (if you want to use the conduit solely as protection).  But I'd like to be able to take this incoming NM cable and have it's conductors only continue on through conduit along with some other THHN that's coming from another source. The individual conductors of the NM cable while not labeled can still be traced back to where the sheathing ends, so technically the conductors are still identifiable as to what they are. If need be, I could splice the NM conductors to THHN wire in the junction box, but I don't see a reason to add a splice where I don't think it's needed. My reasoning for why I think this should be OK is that if you terminate NM cable in a panel, you typically have a foot or so of the conductors without the sheath and there's nothing identifying those other than tracing it back to the sheath it came from. Java rounding to nearest 0.05 Is there a way to achieve the equivalent of a  in javascript regular expressions?  I need to match a string that does not start with a specific set of characters.  It seems I am unable to find a regex that does this without failing if the matched part is found at the beginning of the string.  Negative lookbehinds seem to be the only answer, but javascript doesn't have one.  EDIT: This is the regex that I would like to work, but it doesn't:  (?&lt;!([abcdefg]))m  So it would match the 'm' in 'jim' or 'm', but not 'jam' Maximum Likelihood Estimator for $\theta$ when $X_1,\dots, X_n \sim U(-\theta,\theta)$ Exercise :     Calculate a Maximum Likelihood Estimator for the model $X_1,\dots, X_n \; \sim U(-\theta,\theta)$.   Solution :  The distribution function $f(x)$ for the given Uniform model is :  $$f(x) = \begin{cases} 1/2\theta, \; \; -\theta \leq x \leq \theta \\ 0 \quad \; \; , \quad\text{elsewhere} \end{cases}$$  Thus, we can calculate the likelihood function as :  $$L(\theta)=\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n\mathbb I_{[-\theta,\theta]}(x_i)= \bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[0,\theta]}(|x_i|) $$  $$=$$  $$\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[-\infty,\theta]}(|x_i|)\prod_{i=1}^n \mathbb I_{[0, +\infty]}(|x_i|)$$  $$=$$  $$\boxed{\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[-\infty,\theta]}(\max|x_i|)}$$  Question : How does one derive the final expression in the box from the previous one ? I can't seem to comprehend how this is equal to the step before.  Other than that, to find the maximum likelihood estimator you need a $\theta$ sufficiently small but also $\max |x_i| \leq \theta$ which means that the MLE is : $\hat{\theta} = \max |x_i|$. ...And you jumped in.  What would happen when you got to the middle of the Earth? Would you gradually slow down, until you got to the middle and once you were in middle would every direction feel like it was up? Prove that the multiplicative inverse of $a$ modulo $m$ exists if and only if $a$ and $m$ are coprime. Prove that the multiplicative inverse of $a$ modulo $m$ exists if and only if $a$ and $m$ are coprime.  Can someone help me with this? I looked around but did not find that anyone has asked this before, but what are the fonts that are standard/recommended while writing academic reports/papers? $n$ choose $k$ where $n$ is less than $k$ Favorite questions in the Android app Self adjoint operators and trace class property This is a variation of the  questioned some time ago.  For a complex Hilbert space $H$ let $T: H \rightarrow H$ be a bounded operator. We call that $T$ is a trace-class operator if the following sum  $$\sum_{i}{\langle |T|e_{i}, e_{i} \rangle} &lt; \infty$$  converges, where $|T| = (T T^{*})^{\frac{1}{2}}$ is the absolute value of the operator.  Assume that  $$\sum_{i}{\langle Te_{i}, e_{i} \rangle}$$  converges for any basis in the space $H$. How to prove that if the aformentioned property holds then the operator is a trace class operator?  The progress on the problem is the following: Given an arbitrary bounded operator $T: H \rightarrow H$, one can use the following decomposition $$T = \big( \frac{T + T^{*}}{2} \big) ^{*} + i \big( \frac{T^{*} - T}{2i} \big) ^{*}$$  The latter line gives the decomposition $$T = A + i B$$ where $A, B$ are normal operators.  For the normal operators we can apply the spectral theorem that proposes that $T$ is unitary equivalent to  $$(UT U^{-1})(f(x)) = g(x) f(x)$$  where  $$U: H \rightarrow L^{2}(X, \mu)$$ $$g \in L^{\infty}(X, \mu)$$  Though this decomposition classify the operator in a broad sence, i see no direct way to conclude the statement. Are the any hints that may extend the previous argument? If not, are there any ways to conclude the statement? Is there a quasistatic process that is not reversible? I have seen several questions and good answers on the link between reversible and quasistatic processes, such as  or . However, these questions only adress one side of the problem : a reversible process is necessarily quasistatic.  I am interested in the other side of the equivalence : is there a process that is quasistatic, yet not reversible ? It looks to me that an irreversible process cannot be made perfectly quasistatic.  The  article about quasistatic processes takes as an example the very slow compression of a gas with friction. As the compression occurs very slowly, the transformation is quasistatic, and the friction makes it irreversible. I am not convinced by this example : if you press on the piston with a vanishingly small force you will have to reach the threshold of the Coulomb law for solid friction before moving the piston anyway. It makes the process non-quasi-static, however small the Coulomb threshold might be.  Another example I've heard of is the reaction between a strong acid and a strong base. It is always an irreversible process, and you could make it quasistatic by adding very small drops of base into acid at a time. But by trying to do that, you would inevitably reach a limit to the size of the drop imposed by surface tension.  Even if "reversible" and "quasistatic" mean very different things, is it true to consider that in practice, a reversible process and a quasistatic process is essentially the same thing ? Intuitive understanding of the elements in the stress-energy tensor There is an image in the Wikipedia about the :    I have a rough understanding of the stress tensor: you imagine cutting out a tiny cube from the fluid and form a matrix out of the forces on each side of it: it's not hard to see that the forces that push the faces outwards so the x direction of the force on the x side, the y direction of the force on the y side, etc. is the pressure, while other forces directions are the shear stress (these can be non-zero is some jelly-like substance).  Now the first question: Why is the lower half of the spatial part is the momentum flux, while only the upper one is the shear stress on the image? Is the image wrong? Isn't the spatial part describe the classical stress tensor?   The second question is: what's the intuition behind the temporal part?  So if I have a Minkowski spacetime and cut out a cube of it, then it's quite hard to see why "pressure" on the temporal face means density, also why "shear stresses" on the temporal face translate to momentum density, not speaking of the "temporal force components" the spatial faces...  Also stresses are measured in Pascals, mass density is measured in $kg/m^3$ while momentum density is in the units of $Ns/m^3$. These units doesn't seem to be compatible, but still they are in the same matrix, why?  EDIT: It has been pointed out that momentum flux refer to the entire blue part, it indeed have a lighter frame I didn't notice. Then yet another subquestion: what's the difference between the momentum density and momentum flux? Assume that $X$ and $Y$ are two random variables such that $Y=E[X|Y]$ almost surely and $X= E[Y|X]$ almost surely. Prove that $X=Y$ almost surely.   The hint I was given is to evaluate: $$E[X-Y;X&gt;a,Y\leq a] + E[X-Y;X\leq a,Y\leq a]$$  which I can write as: $$\int_A(X-Y)dP +\int_B(X-Y)dP$$ where $A=\{X&gt;a, Y\leq a\}$ and $B=\{X\leq a,Y\leq a\}$.  But I need some more hints. How do I enable Remote Desktop connection on Xubuntu 11.10? Get driving directions using Google Maps API v2 Why don't the Google Docs CTRL + ALT shortcuts work? I'm currently using Google Docs, but when I try to use the keyboard shortcuts like Ctrl+Alt+M it gives µ instead.    Is Chrome (9) overruling Google Docs in some way?  How can I get these shortcuts working?  I'm using Chrome dev 9 on a Dutch Windows 7 with a US-layout keyboard