I have a code that should read the mouse coordinates, but it only works in ArcMap, can I somehow translate it into code for ArcGlobe, otherwise it gives an error: CreateObject cannot open map document. def onMouseDownMap(self, x, y, button, shift):         mxd = arcpy.mapping.MapDocument(&quot;CURRENT&quot;)         df = mxd.activeDataFrame         sr = df.spatialReference         point = arcpy.Point(X=x, Y=y)         pointGeometry = arcpy.PointGeometry(point,sr).projecntAs(arcpy.SpatialReference(4326))         X=pointGeometry.firstPoint.X         Y=pointGeometry.firstPoint.Y         pythonaddins.MessageBox(&quot;Your mouse clicked at &quot; + str(X) + &quot; , &quot; + str(Y),&quot;My Coordinates:&quot;)
Work in ArcGlobe and I want to calculate the coordinates of the globe latitude and longitude, but the coordinates from the mouse click is read from the screen, not the globe, because when I clicked on the corner of the screen it shows me the coordinates 0,0. How can I make it so that coordinates read with globe and not with the screen? import arcpy import pythonaddins  class ToolClass2(object):     &quot;&quot;&quot;Implementation for coord_addin.tool (Tool)&quot;&quot;&quot;     def __init__(self):         self.enabled = True         self.shape = &quot;NONE&quot; # Can set to &quot;Line&quot;, &quot;Circle&quot; or &quot;Rectangle&quot; for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks.     def onMouseDown(self, x, y, button, shift):         pythonaddins.MessageBox(&quot;Long&quot; + &quot; &quot; + str(x) + '\n'+ &quot;Lat&quot;+ &quot; &quot; + str(y), 'Coordinates', 0)         pass     def onMouseDownMap(self, x, y, button, shift):         #pythonaddins.MessageBox(&quot;Long&quot; + &quot; &quot; + str(x) + '\n'+ &quot;Lat&quot;+ &quot; &quot; + str(y), 'Coordinates', 0)         pass     def onMouseUp(self, x, y, button, shift):         pass     def onMouseUpMap(self, x, y, button, shift):         pass     def onMouseMove(self, x, y, button, shift):         pass     def onMouseMoveMap(self, x, y, button, shift):         pass     def onDblClick(self):         pass     def onKeyDown(self, keycode, shift):         pass     def onKeyUp(self, keycode, shift):         pass     def deactivate(self):         pass     def onCircle(self, circle_geometry):         pass     def onLine(self, line_geometry):         pass     def onRectangle(self, rectangle_geometry):         pass
Can I have 2x2 workspaces in GNOME 3? I have just upgraded to Ubuntu 17.10 and found out there is no option to have 2 by 2 workspaces. I was able to configure 4 "static" workspaces using , but I would like to have them in 2 rows by 2. Any ideas? What is the cardinality of the set of all topologies on $\mathbb{R}$? This was  on Quora. I thought about it a little bit but didn't make much progress beyond some obvious upper and lower bounds. The answer probably depends on AC and perhaps also GCH or other axioms. A quick search also failed to provide answers. An elementary question regarding a multiplicative character over finite fields Mods folder missing from .minecraft folder I have Windows 10 and when I go to look in my .minecraft folder in the AppData folder, the mods folder is not there.    How can I find the mods folder? How can I replace a string in a file(s)? Can the jQuery UI Datepicker be made to disable Saturdays and Sundays (and holidays)? I use a datepicker for choosing an appointment day.  I already set the date range to be only for the next month.  That works fine.  I want to exclude Saturdays and Sundays from the available choices.  Can this be done?  If so, how? For each positive even integer $n$, set   $$P_n = \displaystyle {{n} \choose {\frac{n}{2}}}\frac{1}{2^n}.$$  Show that $\displaystyle \lim_{n \to \infty} P_n$ exists and determine its value.   Here's what I have so far: each $P_n$ can be thought of as the probability of tossing a fair coin $n$ times, and obtaining exactly $\frac{n}{2}$ heads. My expectation is that $P_n \to 1$, since in any large trial, one would expect to record just about as many heads as tails. But I'm not sure how to mathematically justify this hunch.  Hints or solutions are greatly appreciated. How do I get the form id of my form? I've just begun to make my modules and I'm at a standstill. I got this code from someone else and am trying to customize it:  function hook_form_alter(&amp;$form, &amp;$form_state, $form_id) {   if ($form_id == 'the form id for the node form') {     $form['#submit'][] = 'my_custom_submit_handler';   } } 1.  Why is the wave function complex? I've collected some layman explanations but they are incomplete and unsatisfactory. However in the book by Merzbacher in the initial few pages he provides an explanation that I need some help with: that the de Broglie wavelength and the wavelength of an elastic wave do not show similar properties under a Galilean transformation. He basically says that both are equivalent under a gauge transform and also, separately by Lorentz transforms. This, accompanied with the observation that $\psi$ is not observable, so there is no "reason for it being real". Can someone give me an intuitive prelude by what is a gauge transform and why does it give the same result as a Lorentz tranformation in a non-relativistic setting? And eventually how in this "grand scheme" the complex nature of the wave function becomes evident.. in a way that a dummy like me can understand.  2.   A wavefunction can be thought of as a scalar field (has a scalar value in every point ($r,t$) given by $\psi:\mathbb{R^3}\times \mathbb{R}\rightarrow \mathbb{C}$ and also as a ray in Hilbert space (a vector). How are these two perspectives the same (this is possibly something elementary that I am missing out, or getting confused by definitions and terminology, if that is the case I am desperate for help ;)   3.   One way I have thought about the above question is that the wave function can be equivalently written in $\psi:\mathbb{R^3}\times \mathbb{R}\rightarrow \mathbb{R}^2 $ i.e, Since a wave function is complex, the Schroedinger equation could in principle be written equivalently as coupled differential equations in two real functions which staisfy the Cauchy-Riemann conditions. ie, if $$\psi(x,t) = u(x,t) + i v(x,t)$$ and $u_x=v_t$ ; $u_t = -v_x$ and we get $$\hbar \partial_t u  = -\frac{\hbar^2}{2m} \partial_x^2v + V v$$ $$\hbar \partial_t v  = \frac{\hbar^2}{2m} \partial_x^2u - V u$$ (..in 1-D) If this is correct what are the interpretations of the $u,v$.. and why isn't it useful. (I am assuming that physical problems always have an analytic $\psi(r,t)$). Which 1970s UK fantasy kids TV show has an older brother die? I stumbled upon  on last weekend, it introduces an integral trick that exploits . On its last page, the author, Mr. Anonymous, left several exercises without any hints, one of them is to evaluate the Gaussian integral $$ \int^\infty_0 e^{-x^2} \,dx= \frac{\sqrt{\pi}}{2} $$ using this parametrization trick. I had been evaluating it through trial and error using different paramatrizations, but no luck so far.     Here are what I have tried so far:   A first instinct would be do something like:$$ I(b) = \int^\infty_0 e^{-f(b)x^2}\,dx $$ for some permissible function $f(\cdot)$, differentiating it will lead to a simple solvable ode: $$ \frac{I'(b)}{I(b)} = -\frac{f'(b)}{2f(b)} $$ which gives: $$ I(b) = \frac{C}{\sqrt{f(b)}}. $$ However, finding this constant $C$ basically is equivalent to evaluating the original integral, we are stuck here without leaving this parametrization trick framework. A second try involves an exercise on the same page: $$ I(b) = \int^\infty_0 e^{-\frac{b^2}{x^2}-x^2}dx. $$ Taking derivative and rescaling the integral using change of variable we have: $$ I'(b) = -2I(b). $$ This gives us another impossible to solve constant $C$ in: $$ I(b) = C e^{-2b} $$ without leaving this framework yet again. The third try is trying modify Américo Tavares's answer in this : $$ I(b) = \int^\infty_0 be^{-b^2x^2}\,dx. $$ It is easy to show that: $$ I'(b) = \int^\infty_0 e^{-b^2x^2}\,dx - \int^\infty_0 2b^2 x^2 e^{-b^2x^2}\,dx = 0 $$ by an integration by parts identity: $$ \int^\infty_0 x^2 e^{- c x^2}\,dx = \frac{1}{2c}\int^\infty_0 e^{- c x^2}\,dx . $$ Then $I(b) = C$, ouch, stuck again at this constant.     Notice in that  question, Bryan Yocks's answer is somewhat similar to the idea of parametrization, however he has to introduce another parametric integration to produce a definite integral leading to $\arctan$.  Is there such a one shot parametrization trick solution like the author Anonymous claimed to be "creative parameterizations and a dose of differentiation under the integral"? Where can I find good ConTeXt documentation BeanFactory vs ApplicationContext I'm pretty new to the Spring Framework, I've been playing around with it and putting a few samples apps together for the purposes of evaluating Spring MVC for use in an upcoming company project. So far I really like what I see in Spring MVC, seems very easy to use and encourages you to write classes that are very unit test-friendly.  Just as an exercise, I'm writing a main method for one of my sample/test projects. One thing I'm unclear about is the exact differences between BeanFactory and ApplicationContext - which is appropriate to use in which conditions?  I understand that ApplicationContext extends BeanFactory, but if I'm just writing a simple main method, do I need the extra functionality that ApplicationContext provides? And just exactly what kind of extra functionality does ApplicationContext provide?  In addition to answering "which should I use in a main() method", are there any standards or guidelines as far as which implementation I should use in such a scenario? Should my main() method be written to depend on the bean/application configuration to be in XML format - is that a safe assumption, or am I locking the user into something specific?  And does this answer change in a web environment - if any of my classes needed to be aware of Spring, are they more likely to need ApplicationContext?  Thanks for any help. I know a lot of these questions are probably answered in the reference manual, but I'm having a hard time finding a clear breakdown of these two interfaces and the pros/cons of each without reading thru the manual with a fine-tooth comb. Evolution threads extra lines before signature Where did the "Magic Blood" of the Harry Potter Universe Originate From? Storage order vs Result order This is a spin-off question from .   says this on the subject of storage order (clustered index) and the output order     A lot of people believe that a clustered index guarantees a sort order on output. But that's not what it does; it guarantees a storage order on disk.   See, for example, .   I've read the blog post by Hugo Kornelis and understands that an index doesn't guarantee that the sql server reads the records in a specific order. Yet I have a hard time accepting that I can't assume this for my scenario?  CREATE TABLE [dbo].[SensorValues](   [DeviceId] [int] NOT NULL,   [SensorId] [int] NOT NULL,   [SensorValue] [int] NOT NULL,   [Date] [int] NOT NULL, CONSTRAINT [PK_SensorValues] PRIMARY KEY CLUSTERED  (   [DeviceId] ASC,   [SensorId] ASC,   [Date] DESC ) WITH (     FILLFACTOR=75,     DATA_COMPRESSION = PAGE,     PAD_INDEX = OFF,     STATISTICS_NORECOMPUTE = OFF,     SORT_IN_TEMPDB = OFF,     IGNORE_DUP_KEY = OFF,     ONLINE = OFF,     ALLOW_ROW_LOCKS = ON,     ALLOW_PAGE_LOCKS = ON)   ON [MyPartitioningScheme]([Date])   My original query was this:  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date &lt; 1339225010   ORDER BY Date DESC   But I suggest that I could as well use this one (read below for my explanation):  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date &lt; 1339225010   As you can see, my table rows are small (16bytes) and I've got only one index, a clustered. In my scenario, the table consists of 100.000.000 records at this moment (and this will most likely increase tenfold).  When the database server queries this table it has two ways of finding my rows, either it seeks the primary key and thereby reading and returning my values in desc. order of Date, or it has to do a full table scan. My conclusion is that a full table scan on all those records will be way too slow and the database server will therefore always seek the table via its primary key and thereby returning the values sorted by Date DESC What is the point of stacking favorite notifications? I noticed I have more notifications than favorites, which means that the notifications are stacked (in other words, there can be more than 1 notification per question).    Here is my reasoning:   Why do they add up?, I don't know where is the benefit of knowing that some of the questions had multiple changes if we are not able to see which questions had how many changes   Since we don't know what questions had what amount of changes, the amount of notifications is just a meaningless number that don't help us too much. Here are some possible solutions:   Add a max of 1 notification per question Keep the same number, but allow us to see how many new changes there were on every question I can't find Karliah at the Ragged Flagon During the 'Hard Answers' Thieves Guild quest, Karliah asked me to meet her at the Ragged Flagon.  However, it seems that she doesn't show up at the rendezvous point.  Where do I find her? , clicking &quot;link&quot; &quot;share&quot; for anwers yields a short (traceable) URL in the &quot;share a link to this answer&quot; dialog, such as †:  These short URLs show no clue about the linked question whatsoever. Also, when different people use a short URL for the very same post, then the user id suffix makes those be different URLs for a browser. Such links will then not be shown as visited‡. I know how to get URLs that have a proper slug. But as I see  pop up on these sites (where referrals ), I assume many others just don't realize full URLs would be better for use on these sites themselves? Or many don't want to do the little effort to get the full URL? So: can we please have an easy way to get the full URL as well, in a way that is easily found for those who don't know about the different links? (Currently for questions, clicking &quot;link&quot; has the same effect. But then one can also right-click the title, or take the URL from the location bar, to get the full human-readable URL. Once, Jeff .)  † The short links for answers are not (yet) [automatically converted][6] into a clickable question title either, unlike links such as `https://meta.stackexchange.com/questions/74274/privacy-leak-in-permalink#75963`, which renders as https://meta.stackexchange.com/questions/74274/privacy-leak-in-permalink#75963 But I guess that will change soon.  ‡ On Meta the CSS for posts doesn't indicate such difference anyway, which is a different issue. NIST randomness test p values I have a binary sequence of length $2^{20}$. I am using the NIST statistical test, assess.   What should be taken for ./assess and  How many bitstreams? in this test? In the final Analysis report, what p-values should be there to pass this test?