What should I do to find the distance between two very far points?  p1 = "POINT(6.2 61.1)" p2 = "POINT(6.1 61.0)"  select ST_Distance(   ST_Transform(ST_GeomFromWKT('$p1'), 'EPSG:4326', '$epsg'),   ST_Transform(ST_GeomFromWKT('$p2'), 'EPSG:4326', '$epsg') ) as distance   with EPSG:3857 this is 25550.25 but with EPSG:32632 I'm got 12382.11 and leaning on Google that's right.   I'm using GeoSpark library in my calculations.  Update: My range of longitude approximately from 20 to 190  Update 2: I can't use PostGIS, I'm using Hadoop and GeoSpark
I have a simple question about calculating distances in PostGIS.  I would like to get the distance between two geometries. I am using this sid : 4269 in meters what i am doing now is this : ST_Distance((a.geom,b.geom)) FROM ... but I am getting result in degrees. I think that I should work with geography but how can I cast a geom to a geography? I tried with (a.geom::geography) but i am getting an error.  What can I do to get my result in meters?   Thank You
For random variable $X$ that follows some distribution, $f(x)$ is the probability density function of that distribution if and only if $$\mathbb{E}[\phi(X)] = \int_{-\infty}^\infty \phi(x) f(x)dx$$ for all functions $\phi$.  Context: My professor used this in lecture to demonstrate a way to find the distribution of $cX$ given random variable $X$ that follows a specific distribution.   What is the name of this theorem? Have I missed any qualifications/caveats? I am in particular curious about whether "for all functions" is correct. My professor mentioned "positive, bounded, deterministic functions," but I am not sure what he meant by that. Where can I find a proof of this theorem? How can I remap keyboard keys in windows 8.1? I'm looking for a simple utility which will modify registry and would not require running at startup. I tried sharpkeys but, it does not seem to work in windows 8.1. Any other suggestions? Or a simple how-to tutorial for windows 8.1?  Edit: Keytweak isn't working either. Actually I want to map an unused key to function key (fn) and neither sharpkeys nor keytweak detect the keystroke for that key.   Thanks GRUB2 does not show Windows 8 option to boot into after Dual Boot Yesterday, I tried to dualboot Ubuntu 16.04 onto my hard drive, creating a new partition for Ubuntu alongside my existing Windows 8. First, I disabled the fast-boot option in Windows 8, and still GRUB did not load, and it went directly to Windows boot-up. Then I did some research and found this article:     Basically, I issued the BCDEdit command in Windows, and entered in the following code:  bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi   When I reboot, I get a basic GRUB2 terminal, and after I type in the exit command, then a second Shell prompt appears, and after typing the exit command again, the GRUB2 menu to select the OS to boot finally appears... with only Ubuntu and Ubuntu memory test as options, not Windows 8.  After booting into Ubuntu, I tried to run the Boot-repair Utility, but that shows this following error:   How do I approach this problem? The Pastebin log is here:   Thanks for the help! Does *first of all* always go with *second of all*? According to , first of all is twice as popular as firstly, but secondly is a hundred times more popular than second of all.  When I present two points, do I have to be consistent in the choice of these phrases (if I use firstly, should the other be secondly)?  Because If I choose the most popular, my sentence would be like "First of all he is rich, secondly he is also smart." Which exhibits kind of inconsistency. How does it sound? How to make two people play at the same time? My brother owns Skyrim on steam. We use Steam Family Share, but we were wondering how both of us could play it at the same time? How can I duplicate Apple's tiny USB power adapter? I'm designing a project that controls 110VAC (plug in, socket out), and also has a microprocessor inside.  I'd really like this project to not need a wall wart to get it's 5V, so I want to include a small DC power supply inside.    Apple's USB power adapter looks like a great small design that I can fit inside my case.  I'm guessing this is a switching power supply but I can't find any teardowns or schematics anywhere.  Does anyone know how this thing works?  I know I could make my own 110V->5VDC supply from a bridge rectifier and some caps, but I'd like to also be super safe.  What's in the Apple brick? How to find a computer name in a LAN from the IP address? My network includes machines running Linux and others running Windows. And my machine is running Linux. Let $f,g:X\to Y$ be maps of spaces such that $f\simeq g$. Is it true that the mapping cones $\operatorname{cone}(f)$ and $\operatorname{cone}(g)$ are homotopy equivalent?  Can we write down an explicit homotopy equivalence? It ought not to be too hard to get a map $\operatorname{cone}(f)\to \operatorname{cone}(g)$ from the existence of a homotopy $H:X\times I\to Y$, but I haven't been able to find a sensible candidate, despite trying for quite a while. How do I sort a list of dictionaries by a value of the dictionary? I have a list of dictionaries and want each item to be sorted by a specific value. Take into consideration the list: [{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}]  When sorted by name, it should become: [{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}] Would you please explain the difference between these two sentences?     Spain ceded (or gave) Puerto Rico to the United States. Since then, Puerto Rico has been a U.S. territory.      Spain ceded(or gave) Puerto Rico to the United States. Since then, Puerto Rico was a U.S. territory.   I am stuck between 'has been' and 'was' in the above sentences. In Ubuntu 18.04, when moving the windows there is a resize effect that occurs when accidentally touching one of the screen edges.  This control was available in CCSM and Ubuntu Tweak in previous versions with Unity.  I'm not finding it in GNOME Tweaks.  I also searched the repository with:  apt search ubuntu.*tweak A screen of mine burnt out, and was replaced with a screen of lower resolution. It works in safe mode as that is in 800x600 resolution, but when I try to boot to normal mode, it fails. Is there a way to change the resolution for normal mode in safe mode? Fantasy Short Story that appeared in an anthology about 1968-1971 I read this short story around 1971.  The basic plot is for a steward to lead the king's son to another city state.  Along the way they have a number of interactions with people/subjects that demonstrate the immaturity of the son.  Last one involves the son beating up the suitor of a innkeeper's daughter.  When confronted by the steward, the son displays his contempt and chauvinistic regard of his future subjects and the steward kills him.  Turns out the trip was a test of his suitability to assume the crown and the steward explains to the king that he was not worthy.  Been looking in all the anthologies can seem unable to find it.  Thanks for your help The  claims that likelihood and probability are distinct concepts.     In non-technical parlance, "likelihood" is usually a synonym for "probability," but in statistical usage there is a clear distinction in perspective: the number that is the probability of some observed outcomes given a set of parameter values is regarded as the likelihood of the set of parameter values given the observed outcomes.    Can someone give a more down-to-earth description of what this means?  In addition, some examples of how "probability" and "likelihood" disagree would be nice. I need your help with this: Let $f$, $p$, and $g$ be a polynomials in $F[x]$, assume that $f$, $g$, and $p$ are nononzero.  If $\gcd(f,p)=1$ and $fg$ is divisible by $p$ with no remainder, I need to prove that $g$ is  divisible by $p$ with no remainder  Thanks. Support showing image in original size in overlay Equivalence of definitions of prime ideal in commutative ring Academic dishonest: Possession of unauthorized materials during an exam that you didn't even know existed So unfortunately during an exam, I had the misfortune of using an eraser (with cover) that was not mine and had a small amount of words inside it unknown to me. I did not know this was the case, as I don't have a habit of unraveling erasers or looking at them closely?  However, now I face the problem in trying to defend myself against the accusation of me cheating.  I'm specifically concerned on my university's blank statement of "possession of unauthorized materials during an exam" is considered academic dishonesty. Seems like student conduct has all the power in trying to prove academic dishonesty, despite none of my test containing any of what to me is  unreadable, small notes. $f(z)=\frac1{2\pi i}\int_{\Gamma}\frac{f(\zeta)}{z-\zeta}d\zeta$ if $\lim_{z\to\infty}f(z)=0$ and $f$ is analytic in $|z|\ge1$ Let $f$ be analytic in $|z|\ge1$ and  $\lim_{z\to\infty}f(z)=0$. Then is $f(z)=\frac1{2\pi i}\int_{\Gamma}\frac{f(\zeta)}{z-\zeta}d\zeta$,$\forall |z|\ge2$, where $\Gamma$ is the circle of radius $2$ with centre at the origin.   I think yes, by the Cauchy integral formula. But, how do we ensure that the non analyticity of $f$ in $|z|&lt;1$ dosent affect the formula? Thanks beforehand. Possible Duplicate:          Both words seem to be used interchangeably. I generally don't differentiate between them and intuitively pick one over the other. Is there a standardized way to distinguish between the two?