Skip to content

Instantly share code, notes, and snippets.

View KucherenkoIhor's full-sized avatar

Ihor Kucherenko KucherenkoIhor

View GitHub Profile
{
"success": true,
"payload": {
"orders": [
{
"id": "d1817860-3a72-40f7-b89d-05bbfef2084a",
"incrementId": 16267,
"contactId": null,
"contactInfo": null,
"fulfillmentStatus": "fulfilled",
2023-03-03 07:01:36.317 1123-1123/? D/RecentsOrientedState: current RecentsOrientedState: [this=RecentsOrientedState@23252d7 mOrientationHandler=PortraitPagedViewHandler@df4f7c4 mDisplayRotation=0 mTouchRotation=0 mRecentsActivityRotation=0 isRecentsActivityRotationAllowed=true mSystemRotation=false mFlags=257]
2023-03-03 07:01:36.317 1123-1123/? I/chatty: uid=10135(com.android.launcher3) identical 4 lines
2023-03-03 07:01:36.317 1123-1123/? D/RecentsOrientedState: current RecentsOrientedState: [this=RecentsOrientedState@23252d7 mOrientationHandler=PortraitPagedViewHandler@df4f7c4 mDisplayRotation=0 mTouchRotation=0 mRecentsActivityRotation=0 isRecentsActivityRotationAllowed=true mSystemRotation=false mFlags=257]
2023-03-03 07:01:37.841 619-702/? E/WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_UNKNOWN, .description = unknown error}
2023-03-03 07:01:38.843 543-543/? W/adbd: timeout expired while flushing socket, closing
2023-03-03 07:01:39.057 619-632/? I/system_server: oneway
SwitchAction switchAction = new SwitchAction("Test switch", new SwitchAction.Listener() {
@Override
public void onCheckedChanged(boolean value) {
Toast.makeText(MainActivity.this, "Switch checked", Toast.LENGTH_LONG).show();
}
});
ButtonAction buttonAction = new ButtonAction("Test button", new ButtonAction.Listener() {
@Override
public void onClick() {
@KucherenkoIhor
KucherenkoIhor / DifferentTypesFunctionComposing.kt
Last active February 8, 2018 06:56
compising of functions with different types
fun length(str: String): Int = str.length
fun strPlusX(x: Int): String = "string " + x
fun add6To(x: Int): Int = x + 6
fun xMultipleX(x: Int): Int = x * x
operator fun <P1, R1, R2> ((R1) -> R2).plus(f: (P1) -> R1): (P1) -> R2 {
return {p1: P1 -> this(f(p1)) }
@KucherenkoIhor
KucherenkoIhor / FunctionsComposition.kt
Created February 8, 2018 05:55
KotlinFunctionComposition
val xMinus3 = {x: Int -> x - 3}
val composedFull = compose(::xPlusX, ::add5To, ::xMulX)
val composed4 = compose(xMinus3, ::xPlusX, ::add5To, ::xMulX)
fun <R> compose(vararg funs: (R) -> R): (R) -> R = { x: R ->
funs.reduceRight { acc, function -> { acc(function(it)) } }(x)
}
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
app:layout_constraintBottom_toTopOf="@+id/ivBottom"
openssl s_client -connect www.api.disappears.com:443 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
openssl s_client -showcerts -connect www.api.disappears.com:443
@GET("/users/{username}/exists")
Observable<Response<Boolean>> userExist(@Path("username") String username);
@POST("/users")
Observable<Response<Void>> signup(@Body User user);
@POST("/login")
Observable<Response<Void>> login(@Body User user);
@POST("/logout")
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.KucherenkoIhor:RxValidationTextInputLayout:0.1.1'
}
val textInputLayouts = arrayOf(
tilFirstName,
tilLastName,
tilEmail,
tilPhone,
tilYear,
tilDob,
tilPassword,
tilConfirmPassword)