```mermaid
sequenceDiagram
participant dotcom
participant iframe
participant viewscreen
dotcom->>iframe: loads html w/ iframe url
iframe->>viewscreen: request template
viewscreen->>iframe: html & javascript
iframe->>dotcom: iframe ready
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
#! /bin/zsh | |
# Buttery powered state | |
adb shell dumpsys battery | grep powered | |
# Unplug battery | |
adb shell dumpsys battery unplug | |
# Reset battery | |
adb shell dumpsys battery reset |
Prior to Android 7, the system had a single preferred locale, and fallback behavior was quite rudimentary. Starting with Android 7, the user can now specify a priority list of locales, and fallback behavior is improved.
However, in many cases it is still surprisingly difficult to make full use of locale fallback, and there are some hidden gotchas when trying to fully support both Android 7 and earlier versions.
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
/** | |
* Created by Awesometic | |
* It's encrypt returns Base64 encoded, and also decrypt for Base64 encoded cipher | |
* references: http://stackoverflow.com/questions/12471999/rsa-encryption-decryption-in-android | |
*/ | |
import android.util.Base64; | |
import java.nio.charset.StandardCharsets; | |
import java.security.InvalidKeyException; | |
import java.security.KeyFactory; |
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
function mySlowFunction(baseNumber) { | |
console.time('mySlowFunction'); | |
let result = 0; | |
for (var i = Math.pow(baseNumber, 7); i >= 0; i--) { | |
result += Math.atan(i) * Math.tan(i); | |
}; | |
console.timeEnd('mySlowFunction'); | |
} | |
mySlowFunction(8); // higher number => more iterations => slower |