Skip to content

Instantly share code, notes, and snippets.

View Taosif7's full-sized avatar
🎯
Focusing

Taosif Jamal Taosif7

🎯
Focusing
View GitHub Profile
@Taosif7
Taosif7 / GeoHash.dart
Last active February 10, 2022 09:42
Dart Geohash Implementation
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());
}
@Taosif7
Taosif7 / InfiniteCounter.java
Created September 23, 2020 09:06
A Timer That runs infinitely and calls its listeners on definite intervals
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];