Skip to content

Instantly share code, notes, and snippets.

@westnordost
westnordost / oh_parser_test.kts
Last active Jun 19, 2021
OpeningHoursParser test with real data
View oh_parser_test.kts
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 Oct 12, 2018
Performance test flipping argb arrays
View MainActivity.java
package de.westnordost.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import java.util.Random;
public class MainActivity extends AppCompatActivity
{
@Override