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
def fetch[R : Fetchable](s: SQLCursor): R = implicitly[Fetchable[R]].fetch(s) | |
trait Fetchable[R] { | |
def fetch(s: SQLCursor): R | |
} | |
implicit object IntIsFetchable extends Fetchable[Int] { | |
def fetch(s: SQLCursor): Int = s.getInt | |
} |
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
def countChange(money: Int, coins: List[Int]): Int = | |
if (money < 0 || coins.isEmpty) | |
0 | |
else if (money == 0) | |
1 | |
else | |
countChange(money - coins.head, coins) + countChange(money, coins.tail) |
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
def powerSet[A](xs: List[A]): List[List[A]] = | |
xs.foldLeft(List(Nil: List[A]))((accum, elem) => accum.flatMap(l => Seq(l, elem :: l))) |
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
command Prose set background=light wrap linebreak |
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
* { | |
raster-opacity: 0.7; | |
raster-channel-selection: 1; | |
raster-channel-selection: 1 2 3; | |
raster-contrast-enhancement: normalize; | |
raster-contrast-enhancement: histogram; | |
raster-contrast-enhancement: gamma-value(2); | |
raster-shaded-relief: brightness-only; | |
raster-shaded-relief: relief-factor(55); | |
raster-shaded-relief: brightness-only relief-factor(55); |
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
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
#init-hook= | |
# Profiled execution. |
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 Request | |
class RequestVerbs(req: Request) { | |
def <:< (headers: Map[String, String]): Request | |
} | |
implicit def requestsForVerbs(req: Request): RequestVerbs = | |
new RequestVerbs(req) | |
def url(theUrl: String): Request |
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> |
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.apache.commons |
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"?> | |
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.1.0" maxFeatures="100" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> | |
<wfs:Query xmlns:feature="http://geonode.org" typeName="feature:conflicts" srsName="EPSG:900913"> | |
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> | |
<ogc:And> | |
<ogc:PropertyIsBetween> | |
<ogc:PropertyName>EpEndDate</ogc:PropertyName> | |
<ogc:LowerBoundary> | |
<ogc:Literal>1946-07-21T04:00:00.000Z</ogc:Literal> | |
</ogc:LowerBoundary> |