Auto-increase Build number in Xcode
There are lots of tutorials online showing how to implement automatic Build number increase in Xcode.
The simplest one is adding a new Run Script Phase to Project Build Phases and inserting agvtool bump. Unfortunately, I found that this causes a strange issue when the project build randomly stops at the very end and just shows Build Cancelled without any explanation or error. While this happens only some of the time, the project Archiving process fails with the same outcome pretty much every time.
Android Device Monitor can't access data folder
Issue
Android Device Monitor doesn't have permissions to access data folder and it appears to be empty when trying to open.
Arduino - Calculate Person's Age in Years, Months, Days
Here is code I recently used to calculate persons age in Years, Months, and Days on Arduino:
#include "RTClib.h"
RTC_DS3231 rtc; // Using DS3231 Real Time Clock
DateTime now = rtc.now(); // Current Date and Time
DateTime dob = DateTime(1984,8,16,0,0,0); // Date of Birth (1984.08.16 00:00:00)
int t0 = dob.year() * 12 + dob.month() - 1;
int t = now.year() * 12 + now.month() - 1;
int dm = t - t0;
int Y;
int M;
int D;
//Calculate age in Y/M/D
if(now.day() >= dob.day()){
Y = floor(dm/12);
M = dm % 12;
D = now.day() - dob.day();
}
else {
dm--;
t--;
Y = floor(dm/12);
M = dm % 12;
DateTime tmp = DateTime(floor(t/12),(t%12)+1,dob.day(),0,0,0);
D = (now.unixtime() - tmp.unixtime())/60/60/24;
}
Read more: Arduino - Calculate Person's Age in Years, Months, Days
The WIFI_SERVICE must be looked up on the Application context...
Issue
Generating signed APK in Android Studio 2.3 fails with following error:
Error: The WIFI_SERVICE must be looked up on the Application context or memory will leak on devices < Android N. Try changing to .getApplicationContext() [WifiManagerLeak]
Read more: The WIFI_SERVICE must be looked up on the Application context...
- ListView Pop-Up Context Menu broken in Android 7 (API 24)
- The number of method references in a .dex file cannot exceed 64k
- java.lang.OutOfMemoryError: GC overhead limit exceeded
- Android Studio - bindView called multiple times for each listView row
- Pebble - Traffic and Weather
- Get Google Maps Distance Matrix API Key
- UWP VisualStateManager Adaptive Triggers don't work inside Data Template
- TextView doesn't respond to click events (Android Studio)
- Android WRITE_EXTERNAL_STORAGE permission requires app restart - EACCES (Permission denied)
- Uploading existing Android Studio project to SVN (Subversion)