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
class Foo { | |
var bar: String = "" | |
} | |
val instance = new Foo | |
locally { | |
import instance._ | |
bar = "Special value" | |
} |
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
trait MySelf[A <: MySelf[_]] { | |
def me: A | |
} | |
class Me extends MySelf[Me] { | |
def me: Me = this | |
} | |
class I extends MySelf[I] { | |
def me: I = this |
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.RenderingHints; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.Serializable; | |
import java.net.URL; | |
import java.util.HashMap; | |
import javax.imageio.ImageIO; |
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
$ git checkout master | |
$ git merge feature_branch | |
$ git checkout synth | |
$ git merge master | |
$ git checkout master | |
$ git push origin master synth |
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 org.geoscript._ | |
import style_new._ | |
import filter.Expression.enrichString | |
// import enrichString for spiffy "".cql method, otherwise strings are treated as literals | |
// alternatively: import org.geotools.filter.text.ecql.ECQL.{ toExpression => cql } | |
// to use cql("") | |
val states = layer.Shapefile("geoscript/src/test/resources/data/states.shp") | |
val theme = |
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 logging | |
for _module in ["geonode.maps.views"]: | |
_logger = logging.getLogger(_module) | |
_logger.addHandler(logging.FileHandler("geonode.log")) | |
_logger.setLevel(logging.DEBUG) |
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
* { | |
mark: url("http://example.com/example.jpg"); | |
mark-size: [ATTR * 6]; | |
} |
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 os | |
def vexec(cmd): | |
os.system("source bin/activate && DJANGO_SETTINGS_MODULE=geonode.settings " + cmd) |
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
#!/usr/bin/env python | |
from geoserver.catalog import Catalog | |
from itertools import cycle, izip | |
import re | |
_punc = re.compile(r"[\.:]") #regex for punctuation that confuses restconfig | |
_foregrounds = ["#ffbbbb", "#bbffbb", "#bbbbff", "#ffffbb", "#bbffff", "#ffbbff"] | |
_backgrounds = ["#880000", "#008800", "#000088", "#888800", "#008888", "#880088"] |
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
val orig = xml.XML.load("OSM_Roads.sld") | |
val ftypes = orig \\ "FeatureTypeStyle" | |
val printer = new xml.PrettyPrinter(80, 2) | |
for (name <- Seq("railway", "aeroway", "highway")) { | |
val nodes = | |
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"> | |
<UserStyle> |