(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| try { | |
| PackageInfo info = getPackageManager().getPackageInfo( | |
| "com.audacityit.jigglemed", PackageManager.GET_SIGNATURES); | |
| for (Signature signature : info.signatures) { | |
| MessageDigest md = MessageDigest.getInstance("SHA"); | |
| md.update(signature.toByteArray()); | |
| Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT)); | |
| } | |
| } catch (Exception e) { |
| //Date converter | |
| public static String dateConverter(String dateFromApi) { | |
| TimeZone tz = Calendar.getInstance().getTimeZone(); | |
| SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); | |
| inputFormat.setTimeZone(TimeZone.getTimeZone("GMT")); | |
| SimpleDateFormat outputFormat = new SimpleDateFormat("dd MMM h:mm a"); | |
| Date date = null; | |
| try { |
| <?xml version="1.0" encoding="utf-8"?> | |
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <gradient | |
| android:angle="90" | |
| android:startColor="#494949" | |
| android:endColor="#1cffffff" | |
| android:type="linear" /> | |
| </shape> |
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <item | |
| android:bottom="0dp" | |
| android:right="0dp" | |
| android:top="0dp"> | |
| <shape android:shape="line"> | |
| <stroke | |
| android:width="1dp" |
| private Map<Integer, Person> map; | |
| private SparseArray<Person> sparseArray; | |
| //Memory allocation 17.45 | |
| public void onMapBtnClick() { | |
| map = new Hashmap(); | |
| for(int i = 0; i< 10000; i++) { | |
| Person p = new Person(i, "Person " + i); | |
| map.put(i, p); |