Skip to content

Instantly share code, notes, and snippets.

@purplefox
purplefox / cla.txt
Created May 21, 2024 19:41
SpiritSoft Contributor License Agreement
Thank you for your interest in SpiritSoft. To clarify the intellectual property license granted with Contributions from any person or entity,
SpiritSoft must have on file a signed Contributor License Agreement ("CLA") from each Contributor, indicating agreement with the license terms
below. This agreement is for your protection as a Contributor as well as the protection of SpiritSoft and its users. It does not change
your rights to use your own Contributions for any other purpose.
You accept and agree to the following terms and conditions for Your Contributions (present and future) that you submit to SpiritSoft.
Except for the license granted herein to SpiritSoft and recipients of software distributed by SpiritSoft, You reserve all right, title,
and interest in and to Your Contributions.
1. Definitions.
package scratch;
import java.util.HashMap;
import java.util.Map;
public class StartsWithPerf {
public static void main(String[] args) {
try {
new StartsWithPerf().go();
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
public class Main {
public static void main(String[] args) {
try {
new Main().doIt();
/*
* Copyright 2020 Confluent Inc.
*
* Licensed under the Confluent Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.confluent.io/confluent-community-license
*
* Unless required by applicable law or agreed to in writing, software
Tim-Foxs-MBP15:json_request tfox$ curl -X POST http://localhost:8088/query -H "Content-Type: application/json" -d '{
"ksql": "SELECT * FROM riderLocations WHERE GEO_DISTANCE(latitude, longitude, 37.4133, -122.1162) <= 5 EMIT CHANGES;",
"streamsProperties": {
"ksql.streams.auto.offset.reset": "earliest"
}
}'
[{"header":{"queryId":"none","schema":"`ROWKEY` STRING, `PROFILEID` STRING, `LATITUDE` DOUBLE, `LONGITUDE` DOUBLE"}},
{"row":{"columns":["4ab5cbad","4ab5cbad",37.3952,-122.0813]}},
{"row":{"columns":["8b6eae59","8b6eae59",37.3944,-122.0813]}},
{"row":{"columns":["4a7c7b41","4a7c7b41",37.4049,-122.0822]}},
(base) Tim-Foxs-MBP15:json_request tfox$ python pyreq.py
query
<Response [200]>
b'['
b'{'
b'"'
b'h'
b'e'
b'a'
b'd'
public class Http2NoTlsTest {
@Test
public void testHttp2NoTls() throws Exception {
Vertx vertx = Vertx.vertx();
HttpServer server =
vertx.createHttpServer(new HttpServerOptions());
public <T> T deserialiseObject(final Buffer buffer, final HttpServerResponse response,
final Class<T> clazz) {
final ObjectMapper objectMapper = DatabindCodec.mapper();
try {
final T t = objectMapper.readValue(buffer.getBytes(), clazz);
} catch (UnrecognizedPropertyException e) {
sendUnrecognisedPropertyError(e.getPropertyName(), response);
return null;
} catch (MismatchedInputException e) {
final int startIndex = e.getMessage().indexOf('\'');
/*
* Copyright 2018 Confluent Inc.
*
* Licensed under the Confluent Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.confluent.io/confluent-community-license
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2018 Confluent Inc.
*
* Licensed under the Confluent Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.confluent.io/confluent-community-license
*
* Unless required by applicable law or agreed to in writing, software