Tutorial by Examples: 23

A one-liner that helps granting or revoking vulnerable permissions. granting adb shell pm grant <sample.package.id> android.permission.<PERMISSION_NAME> revoking adb shell pm revoke <sample.package.id> android.permission.<PERMISSION_NAME> Granting all run...
This attribute can change the background of the Status Bar icons (at the top of the screen) to white. <style name="AppTheme" parent="Theme.AppCompat"> <item name="android:windowLightStatusBar">true</item> </style>
Android 6 (API23) introduced Doze mode which interferes with AlarmManager. It uses certain maintenance windows to handle alarms, so even if you used setExactAndAllowWhileIdle() you cannot make sure that your alarm fires at the desired point of time. You can turn this behavior off for your app using...
Prior to Json.NET 4.5 dates were written using the Microsoft format: "/Date(1198908717056)/". If your server sends date in this format you can use the below code to serialize it to NSDate: Objective-C (NSDate*) getDateFromJSON:(NSString *)dateString { // Expect date in this format ...
Usually this means that the Master crashed and that sync_binlog was OFF. The solution is to CHANGE MASTER to POS=0 of the next binlog file (see the Master) on the Slave. The cause: The Master sends replication items to the Slave before flushing to its binlog (when sync_binlog=OFF). If the Master cr...
Sometimes we want to use a where query on a a collection of records returned which is not ActiveRecord::Relation.Hence we get the above error as Where clause is know to ActiveRecord and not to Array. There is a precise solution for this by using Joins. EXAMPLE:- Suppose i need to find all user ...
Given a normalized phone number like +178612345678 we will get a formatted number with the provided pattern. private String getFormattedNumber(String phoneNumber) { PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance(); Phonemetadata.NumberFormat numberFormat = new P...
dvConstraint = (XSSFDataValidationConstraint)validationHelper.CreateTimeConstraint(OperatorType.BETWEEN, "=TIME(0,0,0)", "=TIME(23,59,59)");

Page 1 of 1