Skip to content

Instantly share code, notes, and snippets.

View igor-suhorukov's full-sized avatar

Igor Suhorukov igor-suhorukov

View GitHub Profile
public static void main(String[] args) throws Exception{
CliClient cliClient = new CliClient();
Map<String, MethodCall> connect = cliClient.connect(UUID.randomUUID().toString(), "127.0.0.1", 60001, "org.springframework.boot.*");
Set<Map.Entry<String, MethodCall>> entries = connect.entrySet();
for(Map.Entry<String, MethodCall> entry : entries){
if(entry.getKey().endsWith("<init>") ||
entry.getKey().endsWith("<clinit>")) continue;
String diagram = SdEditDataRenderer.getSequenceDiagram(entry.getValue());
if(diagram.split("\n").length>100){
System.out.println("diagram too large "+entry.getKey());
Document document = DocumentBuilderFactory.newInstance().newInstance().newDocumentBuilder().parse(new File("pom.xml"));
try(QueryProcessor proc = new QueryProcessor("declare variable $mydoc external; $mydoc//node()[text()='Igor Sukhorukov']", context)) {
proc.bind("mydoc", document);
// Execute the query
Value result = proc.value();
// Print result as string.
System.out.println(result);
}
package org.springframework.test.context.junit4.spr16716;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.model.Statement;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.core.NestedExceptionUtils;
import org.springframework.test.context.junit4.statements.SpringFailOnTimeout;
https://download.bbbike.org/osm/bbbike/Moscow/Moscow.osm.pbf
https://github.com/graphhopper/graphhopper/blob/master/docs/core/routing.md
try(Serializer ser = proc.getSerializer(System.out)) {
for(Item item; (item = iter.next()) != null;) {
ser.serialize(item);
}
}
We can't make this file beautiful and searchable because it's too large.
h3_3,boundary,count
591823266205663231,"POLYGON((120.10358607069817 15.510195871574709,120.22141862218274 14.899499904599395,120.81868590836929 14.722922947667586,121.30126620084671 15.160283198483569,121.18304008131692 15.773841771094991,120.58260671086101 15.947189339751416,120.10358607069817 15.510195871574709))",18721
591807048409153535,"POLYGON((122.59643448840511 8.227278416540846,122.71366991545283 7.584078712043026,123.31870440634808 7.372581230667052,123.80936502099208 7.806833066822373,123.69194019385529 8.453143386633078,123.0840222708228 8.662100093134153,122.59643448840511 8.227278416540846))",13041
591824159558860799,"POLYGON((120.81868590836929 14.722922947667586,120.93661639766515 14.106000495972893,121.53748492482866 13.923580945621623,122.02350225038069 14.361208048899902,121.90523509962613 14.980975889806329,121.30126620084671 15.160283198483569,120.81868590836929 14.722922947667586))",12277
591823541083570175,"POLYGON((119.39237793569895 16.285011784191337,119.5100755625715 15.680781343736
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="OSMTracker for Android™ - https://github.com/labexp/osmtracker-android" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd ">
<metadata>
<name>2023-07-08_09-10-38</name>
<keywords>osmtracker</keywords>
</metadata>
<wpt lat="7.90826759" lon="98.3847553">
<ele>-1.541015625</ele>
<time>2023-07-08T02:10:50Z</time>
<name><![CDATA[8floor abandoned hotel or lux house ]]></name>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creator="GraphHopper" version="1.1" xmlns:gh="https://graphhopper.com/public/schema/gpx/1.1">
<metadata><copyright author="OpenStreetMap contributors"/><link href="http://graphhopper.com"><text>GraphHopper GPX</text></link><time>2023-07-20T08:59:17.657Z</time></metadata>
<trk>
<name>GraphHopper Track</name><desc></desc>
<trkseg><trkpt lat="7.909020" lon="98.386340"><ele>17.4</ele></trkpt>
<trkpt lat="7.909020" lon="98.386340"><ele>17.5</ele></trkpt>
<trkpt lat="7.909030" lon="98.386360"><ele>17.6</ele></trkpt>
<trkpt lat="7.909050" lon="98.386390"><ele>17.7</ele></trkpt>
<trkpt lat="7.909210" lon="98.386640"><ele>17.2</ele></trkpt>
<trkpt lat="7.909160" lon="98.386750"><ele>17.1</ele></trkpt>
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2" version="1.1" creator="GraphHopper">
<metadata>
<name>GraphHopper-Track-2023-07-20-3km</name>
<author>
<name>gpx.studio</name>
<link href="https://gpx.studio"></link>
</author>
</metadata>
<wpt lat="7.909881801658163" lon="98.38646626307471">
We can't make this file beautiful and searchable because it's too large.
8a11aa7b6d6ffff noisy_place https://www.openstreetmap.org/way/426574944
8a11aa7b6d5ffff industrial https://www.openstreetmap.org/way/502316997
8a11aa7b6d2ffff industrial https://www.openstreetmap.org/way/283851867
8a11aa7b6d27fff noisy_place https://www.openstreetmap.org/way/153685191
8a11aa7b6acffff noisy_place https://www.openstreetmap.org/relation/13572220
8a11aa7b6aaffff noisy_place https://www.openstreetmap.org/way/244427404
8a11aa7b6a87fff noisy_place https://www.openstreetmap.org/way/153685188
8a11aa7b6917fff industrial https://www.openstreetmap.org/way/389190470
8a11aa7b68dffff noisy_place https://www.openstreetmap.org/way/263142449
8a11aa7b68d7fff noisy_place https://www.openstreetmap.org/way/355356821