Skip to content

Instantly share code, notes, and snippets.

@westnordost
westnordost / oh_parser_test.kts
Last active June 19, 2021 20:10
OpeningHoursParser test with real data
import ch.poole.openinghoursparser.*
import java.io.ByteArrayInputStream
import java.net.HttpURLConnection
import java.net.URL
import java.nio.charset.StandardCharsets
var total = 0
var parsed = 0
val url = URL("https://sophox.org/sparql?query=select%20%3Fopening_hours%20where%20%7B%3Felement%20osmt%3Aopening_hours%20%3Fopening_hours%7D%20")
val connection = url.openConnection() as HttpURLConnection
@westnordost
westnordost / MainActivity.java
Created October 12, 2018 23:39
Performance test flipping argb arrays
package de.westnordost.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import java.util.Random;
public class MainActivity extends AppCompatActivity
{
@Override