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
public static void main (String[] args) { | |
//a map with key type : String, value type : String | |
Map<String,String> mp = new HashMap<String,String>(); | |
mp.put("John","Math"); mp.put("Jack","Math"); map.put("Jeff","History"); | |
//3 differents ways to iterate over the map | |
for (String key : mp.keySet()){ | |
//iterate over keys | |
System.out.println(key+" "+mp.get(key)); | |
} |
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
<!-- Internet --> | |
<uses-permission android:name="android.permission.INTERNET"/> | |
<!-- State --> | |
<uses-permission android:name="android.permission.READ_PHONE_STATE"/> | |
<uses-permission android:name="android.permission.WAKE_LOCK" /> | |
<!-- Permissions options for the `location` group --> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> |
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 'dart:async'; | |
// Creditos | |
// https://stackoverflow.com/a/52922130/7834829 | |
class Debouncer<T> { | |
Debouncer({ | |
required this.duration, | |
this.onValue | |
}); |