This file contains hidden or 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
| object Combine { | |
| def linear[A](xs: Seq[A]): Seq[Seq[A]] = | |
| xs match { | |
| case Seq() => Seq(Seq()) | |
| case Seq(h, t @ _*) => | |
| linear(t) flatMap { ts => Seq(ts, h +: ts) } | |
| } | |
| def binary[A](xs: Seq[A]): Seq[Seq[A]] = | |
| xs match { |
This file contains hidden or 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
| * { fill: blue, symbol('shape://slash'); } | |
| :fill { stroke: red; } |
This file contains hidden or 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
| /* Stack a red cross on top of a white circle to make a marker for hospital points */ | |
| * { | |
| mark: symbol(circle), symbol(cross); | |
| } | |
| :nth-mark(1) { | |
| fill: white; | |
| stroke: red; | |
| } |
This file contains hidden or 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
| scala> val Title = """(Mrs?).*""".r | |
| Title: scala.util.matching.Regex = (Mrs?).* | |
| scala> "Mr. Belvedere" match { | |
| | case Title(title) => println("hey there " + title) | |
| | case _ => println("who are you?"); | |
| | } | |
| hey there Mr | |
| scala> val TitleName = """(Mrs?)(.*)""".r |
This file contains hidden or 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
| ........................................................E............. | |
| ====================================================================== | |
| ERROR: /data/search/detail -> Test accessing the data search detail for a layer | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/home/dwins/geonode-git/src/GeoNodePy/geonode/maps/tests.py", line 68, in test_search_detail | |
| response = c.get('/data/search/detail', {'uuid':layer.uuid}) | |
| File "/home/dwins/geonode-git/lib/python2.6/site-packages/django/test/client.py", line 290, in get | |
| response = self.request(**r) | |
| File "/home/dwins/geonode-git/lib/python2.6/site-packages/django/core/handlers/base.py", line 100, in get_response |
This file contains hidden or 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 scala.util.parsing.combinator.{ Parsers, RegexParsers } | |
| import scala.util.parsing.input.{ CharSequenceReader, Reader } | |
| object ParsingExample extends Parsers { | |
| override type Elem = Char | |
| object Delimiter extends Parser[String] { | |
| def apply(reader: Input): ParseResult[String] = { | |
| if (reader atEnd) { | |
| Failure("end of string", reader) |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <sld:UserStyle xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"> | |
| <sld:Name>Default Styler</sld:Name> | |
| <sld:Title/> | |
| <sld:FeatureTypeStyle> | |
| <sld:Name>name</sld:Name> | |
| <sld:Rule> | |
| <ogc:Filter> | |
| <ogc:Or> | |
| <ogc:Or> |
This file contains hidden or 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
| <StyledLayerDescriptor version="1.0.0"> | |
| <NamedLayer> | |
| <Name>Rivers</Name> | |
| <NamedStyle> | |
| <Name>CenterLine</Name> | |
| </NamedStyle> | |
| </NamedLayer> | |
| <NamedLayer> | |
| <Name>Roads</Name> | |
| <NamedStyle> |
This file contains hidden or 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.awt.Graphics2D; | |
| import java.awt.Rectangle; | |
| import java.awt.image.BufferedImage; | |
| import java.io.File; | |
| import java.net.URL; | |
| import javax.imageio.ImageIO; | |
| import org.geotools.data.FeatureSource; | |
| import org.geotools.data.shapefile.ShapefileDataStore; | |
| import org.geotools.factory.CommonFactoryFinder; | |
| import org.geotools.geometry.jts.ReferencedEnvelope; |