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
| String chars = "0123456789bcdefghjkmnpqrstuvwxyz"; | |
| const BITS_PER_BASE32_CHAR = 5; | |
| main() { | |
| LatLng location = LatLng(22.5678, 72.1234); | |
| String geohash = encode(location, 8); | |
| print("Original: " + location.toString()); | |
| print("GeoHash: " + geohash); | |
| print("Decoded: " + decodeGeoCode(geohash).toString()); | |
| } |
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 android.os.CountDownTimer; | |
| import java.util.Arrays; | |
| public class InfiniteCounter extends CountDownTimer { | |
| private static final int MAX_LISTENERS = 100; | |
| private static InfiniteCounter timer; | |
| private static InfiniteCounterListener[] listenerList = new InfiniteCounterListener[MAX_LISTENERS]; |
NewerOlder