This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.locationtech.jts.geom._ | |
import java.util.Comparator | |
val comparator: Comparator[Point] = new Comparator[Point] { | |
override def compare(o1: Point, o2: Point): Int = { | |
println(s"Called compare with $o1 $o2") | |
if (o1 == null) { | |
+1 | |
} else if(o2 == null) { | |
-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Demo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.URL | |
import org.apache.hadoop.fs.FsUrlStreamHandlerFactory | |
import org.apache.naming.resources.DirContextURLStreamHandlerFactory | |
class HadoopURLFactoryRegister { | |
println("Trying to register the Hadoop URL handlers.") | |
val factory = new FsUrlStreamHandlerFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |