I am computing the distance of a map I am getting from ArcGIS' REST services by using a calculator as provided by . In a nutshell, it uses a GeodeticCalculator for distance computation based on latitude and longitude.  I then use the distance and my display width to compute a scale. My display is currently 362*230 (custom display hence the off measurements). When comparing the distances on screen to the distances as given by Google maps, the measurement always overestimated. However, it did so by a factor of roughly 1.2. I not use this as a correction coefficient and am accurate to about 1m in 1 km.  While this solution works (for now), I would like to know where this offset could come from. Below is a bit of code to show how the computation is done. Note that scale is a field of the class this method resides in.  /** Relevant fields */ private GeodeticCalculator calculator = new GeodeticCalculator(CRS.decode("EPSG:3857")); private static final double CORRECTION = 1.2;  /** More code left out for reasons of brevity. */  public double computeScale(double latMin, double latMax, double lonMin, double lonMax) {                calculator.setStartingPosition(new DirectPosition2D(latMin, lonMin));     calculator.setDestinationPosition(new DirectPosition2D(latMax, lonMax));             double distance = calculator.getOrthodromicDistance();     scale = distance / (Calibration.getTableWidth() / 10) / CORRECTION;     return distance; }
I'm currently reading documentation about map projections to understand the source code of the Proj4 project.  The scale factor is named in a variety of sources I read. This sources explained its definition and its value for some projections.   In the source code of Proj4, for the mercator projection (sphere and ellipse case), the scale factor influences the coordinates on the projection :   //P-&gt;k0 is the scale factor xy.x = P-&gt;k0 * lp.lam; xy.y = - P-&gt;k0 * log(pj_tsfn(lp.phi, sin(lp.phi), P-&gt;e));   Why and how I should use the scale factor during the computation of the projection ? Is there any valuable resources on the web ?  This question in asked in the sense of projection computation. I can find the formula for the inverse and forward projection as well as the scale factor in a various of resources, but no one explains how I should use both in a algorithm. You have the definition of the projection and the definition of the scale factor, but it's not clearly written that I should multiply or divide the result by the scale factor.   Is it a general rule : if I find the formula for any projection with the related scale factor, should I, in all cases, always divide or multiply the results by the scale factor ?
How to check if a string "StartsWith" another string? Python — How can I find the square matrix of a lower triangular numpy matrix? (with a symmetrical upper triangle) Was Hogwarts named such because of a connection to warthogs? Was Hogwarts named 'Hogwarts' because of a connection to warthogs?  Or was it named for hogs and warts separately, or something else entirely? The importance of a factor depends on how importance is defined.   The word importance has a fuzzy nature open to different   interpretations and the importance of a factor depends on how   importance is defined.      In other words, importance is ...   How can I complete this sentence with one word?   Edit:  I prefer to use a neutral word without negative connotations, since I'm not against having different interpretations in this case. Rather, I mean depending on how importance is defined, we need a different method. The class of cardinal numbers is well ordered I'm looking for a proof that the class of cardinal numbers is well ordered under the order relation $|A|\leq |B| \Leftrightarrow$ exists an injection $f:A \to B$.  In fact, I've found a very beautiful proof in an article, but I think it's not the standard one. Can photons be detected without being absorbed? I am thinking about a detector that would beep if light passes through it. Is it possible? Green is the most common circuit-board color because it has become an industry standard.  What I'm interested in is How the traditional "PCB Green" become a standard in the first place?   Were there any interesting historical reasons for the initial choice, or was it just a product of what one particularly successful company was doing that became the de-facto standard? This is the achievements drop-down on Ask Ubuntu:    It doesn't look very good. The same happens on Meta SE - so it's a new and old top-bar issue.    Mac OS 10.12.6, Chrome 60.0.3112.113. Also happens in Safari 11.0 and Chrome incognito mode with no extensions, so is not a user-script issue. Zoom at 100%.  Does not happen with Chrome on Windows 10. What is the difference between find . and /home/user/* as an input to for command.? For example:  for var in $(find .) do echo "$var" done   or  for var in /home/user/* do echo "$var" done   In the first case for command breaks up the file with names containing spaces. While in the second case it does not. Why? As we know, whenever school ends, Harry is sent back to live with the Dursleys, where he suffers from abuse. He would much prefer to live with the Weasleys, and often visits there before returning to school. It stands to reason that they probably don't live that far from each other, since:   Both Harry and the Weasleys use Platform 9&frac34; to get to school Ron was able to take Harry to the Burrow in a flying car within a reasonable amount of time   It's heavily hinted at that the Weasleys are poor. However, it's not like Harry would live there permanently. Three months isn't that bad, not to mention he's pretty well-off from his parents' money. There would be little to no extra expense on the Weasleys.  The only explanation is that Dumbledore goes out of his way to ensure Harry lives with the Dursleys. If so, why is this? Does decrease in temperature affect mass $E=mc^2$? My understanding of Quantum physics and String Theory is very basic and I don't yet have a grasp on the maths, but in my research I have come up with a question.  Does a decrease in temperature also signify/create a decrease in mass?  I am quite willing to believe the concepts I think I am beginning to understand are totally misconceptions on my part.  But, as I see it mass is a product/mark of disruption to the Higgs field as a particle moves.  If these particles are ultimately composed of vibrating Strings, their mass is given by the rate at which they vibrate and how it interacts with the Higgs field.  I don't have any idea if, as the temperature (as we know it) approaches 0k, the string/quark/sparticle would change its state in any way or if the changing of the state of the String would change what type of particle it represents.  It seems I'm more full of questions than answers, but that's why I love these topics!  I know what I'm learning is new if the best and brightest are still working on the 'basics' to just make their systems work :). Using C# .NET 2.0, I have a composite data class that does have the [Serializable] attribute on it.  I am creating an XMLSerializer class and passing that into the constructor:  XmlSerializer serializer = new XmlSerializer(typeof(DataClass));   I am getting an exception saying:      There was an error reflecting type.   Inside the data class there is another composite object.  Does this also need to have the [Serializable] attribute, or by having it on the top object, does it recursively apply it to all objects inside? Is there word for this, other than know-it-all? Just wondering, if there's a word for:  One who makes it appear as if they're an expert on a subject while there are also signals (subtly or blatantly noticeable) that this person doesn't know very much on the subject or at least as much as they're acting like they do on the subject; pretending to have much knowledge on a subject matter.  I found pedantic but I don't suppose it's the right word. Smileys in LaTeX I would like to include smileys in my LaTeX document. Is there any package with lots of different smileys?  In mnsymbol and wasysym, I found some general symbols:  \documentclass{article} \usepackage{MnSymbol,wasysym} \begin{document} wasysym: \smiley{} \frownie{} \blacksmiley{}  MnSymbol: \(\smile{} \frown{}\) \end{document}     But I do not like the output. Actually, I am looking for smileys which look like "default smiles" in Google Talk, MSN, ... ;) &lt;- this one is my favourite. ;) As the output of df -h shows here, something is eating up 5GB of free space. So, it's not available to use.   I'm also noticing sometimes that the hard disk gets filled up to 100% sometimes. So, I had to restart the machine or delete some unncessary files. Only noticed these in /home partition. Don't know whether these two are related, but appreciate if anyone can put some insight into this.  $ df -h Filesystem            Size  Used Avail Use% Mounted on /dev/sda8             100G   92G  2.7G  98% /home Scenario: I have a custom button on a standard layout, which will call an apex class to do some validation on a record. If not validated, it needs to throw out some errors on that page. What are the best UX options to achieve this?  I am not too sure how to achieve this. Within a trigger, you can use the addError method to add the custom errors.  Can my Apex class reference the fields of a standard object? The ideal approach would be to do the following:  Contact.Email.addError('Please enter the right format here');   How can I achieve this via an apex class that the custom button will call?  What I have thought: Having a VF Page popup on the screen so that user can see all the errors, but that's not the best approach as UX is a big deal for this application  Thanks. How do I install iTunes? I have an iPhone and run Ubuntu on all of my personal computers. Since I did not want to keep a separate partition with Windows on it for the sole purpose of running iTunes, I attempted to install It using Wine.   I installed Wine 1.4 from the Software Center and installed iTunes 10.6.3. When I tried to run it I got a slew of error messages. I hopped over to google where it was suggested that I install it through PlayOnLinux. I did so with the same result. Further googling revealed that iTunes 10.6.x is confirmed to work with Wine 1.5.1 and up.   I installed Wine 1.5.1 following the instructions I found and was unable to get it to open. I did the same with 1.5.9 with the same results. I opened the Package Manager and installed the Wine 1.5.9 packages through it, and it appears to have installed properly.   When trying to install iTunes I got he error "This iTunes installer requires Windows Vista 64 bit or later". Realizing that Wine uses XP as a default I ran winecfg and changed it to Windows 7. This changed nothing and I tried changing it through winetricks to no avail. I even changed it to Vista with the same results.   Does anyone know what is going wrong here and how to fix it? Thanks Why marinade meat with acid or enzymes? ORA-00918: column ambiguously defined in SELECT * Behavior of $\sum_{n=1}^\infty n^{-1}z^n$ on the circle of convergence Consider the following complex power series :$$\sum_{n=1}^\infty\frac{z^n}{n}$$ The radius of convergence of this series is $1$ and the series is divergent for $z=1$. I want to know what are the values of $z\in C:=\lbrace z\in\mathbb{C}: |z|=1\rbrace$, the circle of convergence, for which the given series converges.