This file contains 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 os | |
panId = os.urandom(2) | |
xPanId = os.urandom(8) | |
key = os.urandom(16) | |
print('PanID: 0x' + bytes(panId).hex()) | |
print('xPanID: ' + bytes(xPanId).hex()) | |
print('key: ' + bytes(key).hex()) |
This file contains 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 os | |
from random import randrange | |
if os.name == 'nt': | |
from win10toast import ToastNotifier | |
workouts = [ | |
([10, 20, 30, 40], "Situps"), | |
([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "Pullups"), | |
([5, 10, 15, 20, 25, 30, 35, 40], "Pushups"), | |
([10, 15, 20, 25, 30, 35, 40], "Squads"), |
This file contains 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
**Where:** | |
... | |
**Summary:** | |
... | |
**Steps to reproduce:** | |
1. ... | |
2. ... |
This file contains 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
String uri = "tel:XXXXXXX"; //<-- put a valid number here | |
Intent intent = new Intent("android.intent.action.CALL"); | |
intent.setData(Uri.parse(uri)); | |
intent.setFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK | Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP); | |
List<ResolveInfo> resInfo = getPackageManager().queryIntentActivities(intent, 0); | |
List<LabeledIntent> intentList = new ArrayList<>(); | |
for (int i = 0; i < resInfo.size(); i++) { | |
// Extract the label, append it, and repackage it in a LabeledIntent | |
ResolveInfo ri = resInfo.get(i); |
This file contains 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
flavorDimensions "environment", "build" | |
productFlavors { | |
staging { | |
dimension "environment" | |
buildConfigField "String", "ENVIRONMENT", "\"development\"" | |
buildConfigField "boolean", "UNITY_DEBUG", "true" | |
buildConfigField "boolean", "IS_PRODUCTION", "false" | |
versionName = android.defaultConfig.versionName |
This file contains 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
private void applyAttributes(Context context, AttributeSet attrs) { | |
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.CustomView, 0, 0); | |
try { | |
weightValue = a.getString(R.styleable.CustomView_wheight_value); | |
weightKey = a.getBoolean(R.styleable.CustomView_wheight_key); | |
} finally { | |
a.recycle(); | |
} | |
} |