Skip to content

Instantly share code, notes, and snippets.

View menion's full-sized avatar
🥕

Jiří M. aka Menion menion

🥕
View GitHub Profile
@menion
menion / DatasetOptimizer.java
Last active January 9, 2019 21:11
Source code for class, that optimize single variable in Locus Map tracks, like elevation, speed, etc.
/****************************************************************************
*
* Created by menion
* Copyright (c) 2019. All rights reserved.
*
* This file is part of the Asamm team software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
@menion
menion / MapDatabase.java
Created September 20, 2017 17:49
Extraction of language from MapsForge based file
/**
* Extracts substring of preferred language from multilingual string.<br/>
* Example multilingual string: "Base\ren\bEnglish\rjp\bJapan\rzh_py\bPin-yin".
* <p/>
* Use '\r' delimiter among names and '\b' delimiter between each language and name.
*/
private String extract(String s) {
// check string
if (s == null || s.trim().isEmpty()) {
return null;