dart run encode.dart alert.rfwtxt alert.rfw
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
List the technology stack of Android and iOS in a widely topics (from development tools, language, async handling, state handling, unit testing framework, UI testing framework, nework framework, deployment tools, DI framework, architecture, local data handling, modulariation, ci/cd, push notification framework, oauth framework, crashlytics framework, logging framework, product flavors solution). | |
For example, topic "UI development", Android use Jetpack compose UI, ios use swiftUI, topic "Development tool", Android use ANdroid studio, iOS use XCode in a table. |
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
headers { | |
set("header-abc", "abc") | |
set("header-ABC", "ABC") | |
append("header-xyz", "xyz") | |
append("header-XYZ", "XYZ") | |
} | |
2024-01-10 11:53:39.983 [outine#6] INFO io.ktor.client.HttpClient | |
- REQUEST: https://ktor.io/docs/welcome.html | |
METHOD: HttpMethod(value=GET) |
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
class MainApplication : Application() { | |
private val createdActivities = mutableListOf<WeakReference<Activity>>() | |
override fun onCreate() { | |
super.onCreate() | |
registerActivityLifecycleCallbacks(activityLifecycleCallbacks()) | |
} | |
fun closeAllActivities() { |
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
mvn exec:java -Dexec.mainClass="identity.FleetProvisioningSample" \ | |
-Dexec.args="--endpoint {yourEndpoint}.iot.ap-southeast-2.amazonaws.com \ | |
--rootca {yourRootCaPath}.pem \ | |
--cert {yourCertPath}.pem.crt \ | |
--key {yourPrivateKeyPath}.pem.key \ | |
--templateName {yourTemplateName} | |
--templateParameters {\"serialNumber\":Mac21}" -e -X |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<meta name='viewport' content='width=device-width'> | |
<title>Privacy Policy</title> | |
<style> body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; padding:1em; } </style> | |
</head> | |
<body> | |
<strong>Privacy Policy</strong> <p> |
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
/** | |
* Return query text changes observable. | |
* | |
* - filter: to filter undesired text like blank text to avoid unnecessary API call. | |
* - debounce: to ignore the previous items in the given time and only emit the last one, to avoid too much API calls. | |
* - distinctUntilChanged: to avoid the duplicate API call. | |
*/ | |
fun EditText.queryTextChanges(): Observable<String> { | |
return textChanges() | |
.map { it.toString() } |
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 org.junit.Assert.* | |
import org.junit.Before | |
import org.junit.Test | |
class ViewTest { | |
private lateinit var firstColour: Colour | |
private lateinit var secondColour: Colour | |
private lateinit var overlappedColour: Colour |
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 kotlin.math.roundToInt | |
/** | |
* Colour in RGB, with each value between 0 – 255 (e.g. R=255, G=0, B=0 would imply a red chart) | |
* | |
* @throws IllegalArgumentException if one of the parameters [r], [g] and [b] is out of bound [0, 255] | |
*/ | |
data class Colour(val r: Int, val g: Int, val b: Int) { | |
init { | |
if (r !in QUALIFIED_RANGE || g !in QUALIFIED_RANGE || b !in QUALIFIED_RANGE) |
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
package cc.cubone.turbo.core.bluetooth; | |
/** | |
* Interface definition for a callback to be invoked when bluetooth state changed. | |
*/ | |
public interface BluetoothCallback { | |
/** | |
* Called when the bluetooth is off. | |
*/ |
NewerOlder