Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
26903: /austest/jdk/jdk1.8.0_322/jre/bin/java -Dprocess.name=test-tomcat -Dmo
------------ lwp# 1 / thread# 1 ---------------
fffffffeffae23f4 lwp_wait (2, ffffffff7fffc6e0)
fffffffeffad93a0 _thrp_join (2, 0, ffffffff7fffc850, 1, ffffffff7fffc6e0, fffffffeffc2c940) + 18
fffffffeffad9538 thr_join (2, 0, ffffffff7fffc850, ffffffff7fffc910, 0, ffffffff7fffc85c) + 10
fffffffefb910f44 ContinueInNewThread0 (fffffffefb907748, 100000, ffffffff7fffc910, ffffffff7fffc9a8, 44, 100000) + 30
fffffffefb90dd2c ContinueInNewThread (ffffffff7fffcb38, fffffffefeaedc08, 114400, ffffffffffeebb60, fffffffefeaed960, fffffffefeaed9e8) + 94
fffffffefb910fc0 JVMInit (ffffffff7fffcb38, 0, 1, 1001018a8, 1, ffffffff7fffe7ec) + 2c
fffffffefb907718 JLI_Launch (0, fffffffefb91a098, aa8, 800, ffffffffffeff038, 100c00) + 388
0000000100000ad0 main (1, 100000b70, 100000b50, 100000b58, 100000, 400) + 90
@davidmoten
davidmoten / threads.txt
Last active May 20, 2022 00:03
Blocked threads, first line of every thread's stack trace
- akka.dispatch.TaskInvocation$.apply(akka.event.EventStream, java.lang.Runnable, scala.Function0) @bci=0, line=45 (Interpreted frame)
- au.gov.amsa.drift.wms.DriftData.refresh() @bci=26, line=83 (Interpreted frame)
- au.gov.amsa.util.rx.RxUtil$2.call(java.lang.Object) @bci=30, line=88 (Interpreted frame)
- com.sun.jmx.remote.internal.ServerCommunicatorAdmin.logtime(java.lang.String, long) @bci=5, line=210 (Interpreted frame)
- com.sun.org.apache.xml.internal.serializer.NamespaceMappings.initNamespaces() @bci=20, line=122 (Compiled frame)
- com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run() @bci=298, line=795 (Interpreted frame)
- com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run() @bci=298, line=795 (Interpreted frame)
- com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run() @bci=298, line=795 (Interpreted frame)
- com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run() @bci=298, line=795 (Interpreted frame)
- com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run() @bci=433, line=808 (Interpreted frame)
{
"openapi": "3.0.0",
"info": {
"version": "1.0",
"title": "Beacon Decoder",
"description": "Beacon decoding for First Generation and Second Generation Beacon HexIds and Detection messages"
},
"paths": {
"/beacon/hexId/{hex}/decode": {
"get": {

When writing your CloudFormation yaml:

  • Don't use Default values on Parameter. This is because making a change to just the Default value of a parameter is not considered by CloudFormation in it's difference analysis. Once the value has been set it stays set.
  • Use !Ref parameterName instead of !Sub '${parameterName}'
  • Don't pollute the cloudformation.yaml with notions of non-prod and prod modes. Pass one application parameter in with names like myapp-dev, myapp-test and use ${application} to build your resource names.
  • When you create buckets use a suffix with the lower-case (an S3 constraint) account id. This is so you can deploy your cloudformation.yaml to any account without conflicts.
  • Never use that Fn:Join nonsense. Use !Sub instead. For example:
!Sub "arn:aws:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:${mySecretName}-*
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
2019-11-01 02:00:00 150.64640324219087
2019-11-01 03:00:00 3.0346504559370184
2019-11-01 04:00:00 79.3982868194948
2019-11-01 05:00:00 115.18010500147818
2019-11-01 06:00:00 88.12555954679421
2019-11-01 07:00:00 144.42418101988704
2019-11-01 08:00:00 127.0908476866422
2019-11-01 09:00:00 87.0908476865906
2019-11-01 10:00:00 169.31306990880188
2019-11-01 11:00:00 112.8686254643784
// search with the index for an hour around Sydney
int count =
index
.search(
new double[] { -33.68, 150.86, t},
new double[] { -34.06, 151.34, t + TimeUnit.HOURS.toMillis(1)})
.concurrency(1)
.url("https://craft-positions.s3-ap-southeast-2.amazonaws.com/input-sorted.csv")
.count()
.get();
@davidmoten
davidmoten / medium-spatial-s3-load-index.java
Last active June 29, 2019 07:18
medium-spatial-s3-load-index.java
Index<CSVRecord> index =
Index
.serializer(serializer)
.pointMapper(pointMapper)
.read(new URL("https://craft-positions.s3-ap-southeast-2.amazonaws.com/input-sorted.csv.idx"));
import java.io.File;
import java.nio.charset.StandardCharsets;
import org.apache.commons.csv.CSVFormat;
import com.github.davidmoten.bigsorter.Serializer;
import com.github.davidmoten.shi.Index;

Index 
  .serializer(Serializer.csv(
 CSVFormat.DEFAULT
@davidmoten
davidmoten / algorithms
Created July 9, 2018 22:58
Algorithms
From https://www.quora.com/What-are-the-algorithms-required-to-solve-all-problems-using-C++-in-any-competitive-coding-contest
Mathematics:
(a)Number Theory
Prime Number Generation (Sieve, Segmented Sieve)
Euler Totient Theorem
Fermat’s Theorem
HCF & LCM (Euclid)
Linear Diophantine Equations (Extended Euclid)
* Subscriber should be FlowableSubscribe otherwise onAssembly does extra checks (unnecessary overhead)