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
package nl.anwb.geocontext | |
import com.fasterxml.jackson.annotation.JsonTypeInfo | |
import com.fasterxml.jackson.databind.DatabindContext | |
import com.fasterxml.jackson.databind.DeserializationFeature | |
import com.fasterxml.jackson.databind.JavaType | |
import com.fasterxml.jackson.databind.MapperFeature | |
import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver | |
import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase | |
import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule |
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 kotlin.math.abs | |
import kotlin.math.roundToLong | |
enum class DistanceUnit(private val orderLowerIsLarger: Int) { | |
KILOMETERS(1), | |
HECTOMETERS(2), | |
DECAMETERS(3), | |
METERS(4), | |
DECIMETERS(5), | |
CENTIMETERS(6), |
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
@JvmInline | |
value class Distance internal constructor(private val rawValue: Long) : Comparable<Distance> { | |
override fun compareTo(other: Distance) = this.rawValue.compareTo(other.rawValue) | |
val inWholeMeters: Long | |
get() = toLong(DistanceUnit.METERS) | |
val inWholeKilometers: Long | |
get() = toLong(DistanceUnit.KILOMETERS) |
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
public class CircularDrawable extends Drawable { | |
private final Bitmap mBitmap; | |
private final Paint mPaint; | |
private final RectF mRectF; | |
private final int mBitmapWidth; | |
private final int mBitmapHeight; | |
public CircularDrawable(Bitmap bitmap) { | |
mBitmap = bitmap; | |
mRectF = new RectF(); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration scan="true"> | |
<shutdownHook/> | |
<appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<charset>UTF-8</charset> | |
<Pattern>%d %-4relative [%thread] %-5level %logger{35} - %msg%n</Pattern> | |
</encoder> | |
</appender> |
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
SetOutputFilter DEFLATE | |
# mod_deflate configuration | |
<IfModule mod_deflate.c> | |
# Restrict compression to these MIME types | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/json |
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
// Usage: | |
// blacklist | |
String[] blacklist = new String[]{"com.any.package", "net.other.package"}; | |
// your share intent | |
Intent intent = new Intent(Intent.ACTION_SEND); | |
intent.setType("text/plain"); | |
intent.putExtra(Intent.EXTRA_TEXT, "some text"); | |
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject"); | |
// ... anything else you want to add | |
// invoke custom chooser |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration scan="true"> | |
<appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<charset>UTF-8</charset> | |
<Pattern>%d %-4relative [%thread] %-5level %logger{35} - %msg%n</Pattern> | |
</encoder> | |
</appender> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript" src="js/jquery.js"></script> | |
<script type="text/javascript" src="js/jcarousellite.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function (){ | |
$(".carousel").jCarouselLite({ | |
btnNext: ".next", |