Getting a class' method with a string
Calling a function of a module by using its name (a string)
How to change material's color in blender game engine? Prove if $|z| < 1$ and $ |w| < 1$, then $|1-zw^*| \neq 0$ and $| {{z-w} \over {1-zw^*}}| < 1$ How did Dumbledore gain the loyalty of Fawkes? How did Dumbledore find Fawkes. Did Dumbledore have Fawkes even when working as a Transfiguration teacher or acquired it after having Headmaster position. They both have a very strong bond between them. When did Dumbledore gain this. Update: Dumbledore says that Ollivander wrote to him when Harry's wand was purchased; if Dumbledore did not have Fawkes before 1938, he would not know about the two feathers being in the wands, so Fawkes and Dumbledore must have met and bonded before 1938  “My wand's feather came from Fawkes?” Harry said, amazed. &quot;Yes,” said Dumbledore. “Mr. Ollivander wrote to tell me you had bought the second wand, the moment you left his shop four years ago.” -Harry Potter and the Goblet Of Fire, Chapter 36-The Parting Of the Ways.  Update 2: JKR says that Dumbledore was the only owner of Fawkes. So it is to be believed that Fawkes was a wild Phoenix before its bonding with Dumbledore.  Peter Humphreys for BBC Newsround: Who did Fawkes previously belong to and will he play a vital role in the next book? JK Rowling: I am not going to answer about the role in the next books, which probably gives you a big clue, and he has never been owned by anyone but Dumbledore. You will notice that when Harry goes back in the Pensieve in this book, Fawkes is never there, and ­­ no, I am sorry, not in this book, I take that back. When Harry has previously seen the study with a different headmaster he saw it with Dippet and Fawkes was not there then. Fawkes is Dumbledore's possession, not a Hogwarts possession. British Airways (BA) just changed our flight times, leaving us only 1h15mins for our layover in Heathrow. We arrive from Brussels in terminal 5 in Heathrow at 7:55 and our next flight leaves for Miami in Heathrow terminal 3 at 9:10.  This seems awfully short.   Does anyone know whether this is doable?   The flights are in November, so I'm still hoping that the flights will change back to the original flight times, which would give us an additional hour for the layover, but in case this does not happen, what are the chances that we will make the connecting flight in 1h15mins? What is the name of the character $\wp$? What is the name of the character whose code is $\wp$ ?  Thanks Bring a window to the front in WPF What is the difference between these two Breusch-Pagan Tests? Using R on some data and trying to see whether or not my data is heteroscedastic, I've found two implementations of the Breusch-Pagan test,  (package lmtest) and  (package car). However, these produce different results. What is the difference between the two? When should you choose to use one or the other?  &gt; model &lt;- lm(y ~ x) &gt; bp &lt;- bptest(model) &gt; bp studentized Breusch-Pagan test  data:  model  BP = 3.3596, df = 1, p-value = 0.06681  &gt; ncvTest(model) Non-constant Variance Score Test  Variance formula: ~ fitted.values  Chisquare = 3.858704    Df = 1     p = 0.04948855    These example shows that according to the tests, my data is in one case heteroscedastic and in the other case homoscedastic. I did find  so bptest might be studentized and ncvTest might not be, however, what does this mean then? Odd behavor with POSIXct/POSIXlt and subsecond accuracy At which embassy should I apply for a Schengen visa when staying a few days in several countries? I'm planning to go to Germany on Sept 6-8, then Netherlands on Sept 8-11 and exit Switzerland on Sept 11-14.  My question is:  Which embassy do I need to apply for the Schengen visa? The number of days are the same for Netherlands and Switzerland, but I'm planning to apply in Netherlands since it will be my second point of entry. Computing the cardinality of a combinatorial set Define two sets: $S_1$ and $S_2$ where we have that $a$ is an odd natural number and $b\in \mathbb{N}$, $S_1 = \Big\{ \frac{2}{a},\frac{2}{a-2},\frac{2}{a-4},...,\frac{2}{a-(a-1)},$ $\frac{2+4}{a+2},\frac{2+4}{a},\frac{2+4}{a-2},...,\frac{2+4}{a-(a-1)},$ $\frac{2+8}{a+4},...,\frac{2+8}{a-2},...,\frac{2+8}{a-(a-1)},$ $\vdots$ $\frac{2+4\lfloor\frac{b}{2}\rfloor}{a+\lfloor\frac{b}{2}\rfloor},\frac{2+4\lfloor\frac{b}{2}\rfloor}{a+\lfloor\frac{b}{2}\rfloor-2},...,\frac{2+4\lfloor\frac{b}{2}\rfloor}{a-(a-1)},$ $\frac{2+4(\lfloor\frac{b}{2}\rfloor+1)}{a+\lfloor\frac{b}{2}\rfloor},\frac{2+4(\lfloor\frac{b}{2}\rfloor+1)}{a+\lfloor\frac{b}{2}\rfloor-2},...,\frac{2+4(\lfloor\frac{b}{2}\rfloor+1)}{a-(a-1),}$ $\frac{2+4(\lfloor\frac{b}{2}\rfloor+2)}{a+\lfloor\frac{b}{2}\rfloor-2},\frac{2+4(\lfloor\frac{b}{2}\rfloor+2)}{a+\lfloor\frac{b}{2}\rfloor-4},...,\frac{2+4(\lfloor\frac{b}{2}\rfloor+2)}{a-(a-1)}$ $\vdots$ $\frac{2+4b}{a},\frac{2+4b}{a-2},...,\frac{2+4b}{a-(a-1)} \Big\}$ and $S_2 = \Big\{ \frac{2}{\lceil\frac{a}{2}\rceil}, \frac{2}{\lceil\frac{a}{2}\rceil-1},\frac{2}{\lceil\frac{a}{2}\rceil-2},...,\frac{2}{1}$ $\frac{2+2}{\lceil\frac{a}{2}\rceil+1},\frac{2+2}{\lceil\frac{a}{2}\rceil},\frac{2+2}{\lceil\frac{a}{2}\rceil-1},...,\frac{2+2}{1},$ $\vdots$ $\frac{2+2(\lfloor\frac{b}{2}\rfloor-1)}{\lceil\frac{a}{2}\rceil+(\lfloor\frac{b}{2}\rfloor-1)},\frac{2+2(\lfloor\frac{b}{2}\rfloor-1)}{\lceil\frac{a}{2}\rceil+(\lfloor\frac{b}{2}\rfloor-2)},...,\frac{2+2(\lfloor\frac{b}{2}\rfloor-1)}{1}$ $\frac{2+2\lfloor\frac{b}{2}\rfloor}{\lceil\frac{a}{2}\rceil+\lfloor\frac{b}{2}\rfloor},...,\frac{2+2\lfloor\frac{b}{2}\rfloor}{1},$ $\frac{2+2(\lfloor\frac{b}{2}\rfloor+1)}{\lceil\frac{a}{2}\rceil+\lfloor\frac{b}{2}\rfloor-1},...,\frac{2+2(\lfloor\frac{b}{2}\rfloor+1)}{1},$ $\frac{2+(\lfloor\frac{b}{2}\rfloor+2)}{\lceil\frac{a}{2}\rceil+\lfloor\frac{b}{2}\rfloor-2},...,\frac{2+(\lfloor\frac{b}{2}\rfloor+2)}{1}$ $\vdots$ $\frac{2+2b}{\lceil\frac{a}{2}\rceil-1},...,\frac{2+2b}{1} \Big\}$ The question is, how do I determine the cardinality of the intersection of these two sets i.e. how would I compute the value $|S_1 \cap S_2|$? Note that duplicates may appear within both sets such as $\frac{1}{2}=\frac{2}{4}$ etc. Therefore we must make sure that for each fraction $\frac{n}{m}$ we have $\text{gcd}(n,m)=1$. I am aware of the existence of , but not entirely sure if that identity would be useful here. Monty hall problem extended. What are the mechanics by which Time Dilation and Length Contraction occur? What are the mechanics of time dilation and length contraction? Going beyond the mathematical equations involving light and the "speed limit of the universe", what is observed is merely a phenomenon and not a true explanation of why time dilates or length contracts.  It has been proven to work out, but do we know why?  Is it something that happens at a subatomic level? Up my street and down the lane Possible Duplicate:          Except where there is obvious difference in elevation e.g. on a sloping road, how do native speakers decide whether to use up or down in phrases like up the road when referring to a location along the same road? Generating random points uniformly on a disk I have to randomly generate 1000 points over a unit disk such that are uniformly distributed on this disk. Now, for that, I select a radius $r$ and angular orientation $\alpha$ such that the radius $r$ is a uniformly distributed variate from $r \in [0,1]$ while $\alpha$ is a uniformly distributed variate from $\alpha \in [0, 2\pi]$ using the following code r &lt;- runif(1000, min=0, max=1)  alpha &lt;- runif(1000, min=0, max=2*pi) x &lt;- r*cos(alpha) y &lt;- r*sin(alpha) plot(x,y, pch=19, col=rgb(0,0,0,0.05), asp=1)  Then I look at my sample space and it looks like this:  This obviously doesn't look like a sample with uniform distribution over the disk. Hence, I guessed that the problem might be occurring as a result of a lack of independence between the variables $r$ and $\alpha$ in contingency to how they've been linked computationally. To take care of that I wrote a new code. rm(list=ls()) r &lt;- runif(32, min=0, max=1) df_res &lt;- data.frame(matrix(c(-Inf, Inf), byrow = T, nrow = 1)) for (i in 1:32) {   for (j in 1:32) {     alpha &lt;- runif(32, min=0, max=2*pi)     r &lt;- runif(32, min=0, max=1)     df &lt;- data.frame(matrix(c(r[i],alpha[j]), byrow = T, nrow = 1))     df_res &lt;- rbind(df_res,df)   } } df_res &lt;- subset(df_res, df_res$X1 != -Inf) x&lt;- df_res$X1 *cos(df_res$X2) y &lt;- df_res$X1 *sin(df_res$X2) plot(x,y, pch=19, col=rgb(0,0,0,0.05), asp=1)  And, yet again the sample looks non-uniformly distributed over the disk  I'm starting to suspect that there is a deeper mathematical problem going on in the vicinity. Could someone help me write code that would create a sample space uniformly distributed over the disk, or explain the mathematical fallacy if any in my reasoning? Inspired by :  In my answer, I had stated that Patronuses appear to not be physical beings because they have no effect on anything other than Dementors.     They don't cause leaves to stir in the movies. They passed straight through the tent. They don't appear to be bound by normal laws pf physics and can travel great distances almost immediately (Shacklebolt was presumably in London when his Patronus issued the warning). They can apparently walk across water without sinking (as they did in The Prisoner of Azkaban). They can jump, walk, and float in mid-air (as seen in the Room of Requirement in the movie version of The Order of the Phoenix). They make no footprints in lightly powdered snow (The Deathly Hallows Chapter 19) and make no sound of crunching snow as Harry does (further down the same page in Chapter 19).   I stated incorrectly that the only place in canon where there is an exception is with Dementors, where the Patronus physically fends them off with its horns.  A Dementor is clearly a physical being, if it prised Dudley's mouth open and (in the movie anyway) physically slid open the train door.)   Based on comments and further thought, I can think of at least two other examples when a Patronus interacts physically with a physical being.   As pointed out by Slytherincess, a Patronus can fend off a Lethifold (Living Shroud). When training, the Patonus took form against a Boggart, which had taken the form of a Dementor.   All three of these things have, AFAIK, only three things in common (but I may be off).   They are evil They are magical They are, indeed, physical beings.   So the question is, why can a Patronus interact with all three of these, but seems to have no physical effect on everyday things? I am using a premium legit version of Minecraft that I purchased. I can log into minecraft.net as well as mojang.com but I am unable to login to Minecraft the game through the minecraft.exe or the Technic launcher. The Minecraft servers are up and running fine. My internet connection is also fine. I double checked my credentials and even tried changing my password. I tried using both my username and my email. I tried all of this on two separate accounts that I own. I tried deleting my login, launcher, launcher.pack.lzma, and launcher_profiles.json and then reopening Minecraft. I tried re-downloading minecraft.exe.   Nothing has worked and I seem to have run out of options. I sent a help request to Mojang but in the meantime I was hoping that maybe you guys could offer some advice. How do I make windows save their position on screen after re-attaching a display? Why can Arwen decide her mortality? How to set up reverse tethering over USB? My HTC G2 phone is rooted and running Cyanogenmod 7 I don't have a data plan. Sometimes I want to connect the phone to the Internet when there isn't Wi-Fi, to update Market apps, backup SMS messages to Gmail, sync new contacts from Gmail, etc.  Things I can't do with USB mass storage mode. I have a Windows 7 Professional computer connected to the Internet, but I'm not allowed to set up an ad-hoc Wi-Fi network.  (If I do, they will notice and hunt me down.)   Is there a way for the phone to access the Internet through the USB connection to the computer?  If so, how do I set it up? Javascript Remoting - sending sObject as argument