This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Dimitris Vlachakis (TheCrafter) on 23/10/2019 | |
* https://github.com/TheCrafter | |
* https://gist.github.com/TheCrafter/eb32496eaa050e0fa616705789c4df6c | |
* | |
* A wrapper around promises that allows for easy chaining them together. | |
* | |
* Example usage: | |
* {code} | |
* const pc = new PromiseChain<number>(125); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Dimitris Vlachakis (TheCrafter) on 11/9/2019 | |
* https://github.com/TheCrafter | |
* https://gist.github.com/TheCrafter/418401b6ad59fa0190a6d9ab4d5f9fb2 | |
* | |
* Example: https://www.typescriptlang.org/play/?strictPropertyInitialization=false#code/PQKhCgAIUhhAnApgQwC6ICaQEYE9IAiAlgLZGrxEDOkAagDbIDGAFsgNbWQAUAKi4gTIAZungBKSAHsAdpACM84AE5gAJgAM85VBgtUqAA5UAXMGABzciwCu2AHRMpJYP0HwRY3ZH1HT5qypUeytUWwcnFzchUUR4YAAWeQAOBK1sADZkDABWZWFkLWUNZAyMZWRsBNzhfOw1b11vAGVSQ3pESAB3D0NDOMhUKUhkenopLsgkKil6ADciGQsRyEN4Z2pOxAAPMRlR+lx7XWBwcHNIAFVUInpIYRsZJhvZQeHWRCZ2e6l4SBkbGNpH9HhhEMJFphIHNRjZEFR7JAAEqIdrMTpdayQXBSGx-CYyY4PJ4vORg4TcKTYABWJhGMlwkgA3lApohUHi5ABCSk0yAAXkF-0BdwAPqLpHzBfzIKDwZCMOIANzgAC+Z1AEGgkAAgt1ev0-sh1qDIAAFdZkKidMJoEZjCY0IZsmbzRDAJDUz6oSDkSA7PYHI6QNxIX00UYzbzISAAImm7NjkBInzYMmoJF9JHaiBTMnQWBm3U6GFkAHIfWw5jbhkgALRMJBoG0CSAAeRsYgtG2tkq9z28RGExcg1JsQW6yHzbzZdfHnXIx21vGGQWNPvHi2WfpxNn+iChzsQ1gGTAOLvZ3EknlPTZuS0Grap-Z9v1WyCoVC3g3gcOjNEMY1kBTMQfj+BNUAASRkWBZCCX9njfLoBDkRsUHvZYwk6Z9vURfg0DLGhsE+ZB50gGYQNIe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gr.thecrafter.testapp; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.preference.PreferenceManager; | |
import android.util.Log; | |
import com.google.gson.Gson; | |
import java.util.ArrayList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Ternary search trie basic implementation. This piece of code was modified by Dimitris Vlachakis | |
* on 18/9/2017. You can find more info about the original work and its authors (Robert Sedgewick | |
* and Kevin Wayne) <a href="http://algs4.cs.princeton.edu/52trie/TST.java.html">here</a>. | |
*/ | |
public class TST<Value> { | |
private int size; // size |